Нет описания

001-no_cpp.patch 3.4MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594645956459664597645986459964600646016460264603646046460564606646076460864609646106461164612646136461464615646166461764618646196462064621646226462364624646256462664627646286462964630646316463264633646346463564636646376463864639646406464164642646436464464645646466464764648646496465064651646526465364654646556465664657646586465964660646616466264663646646466564666646676466864669646706467164672646736467464675646766467764678646796468064681646826468364684646856468664687646886468964690646916469264693646946469564696646976469864699647006470164702647036470464705647066470764708647096471064711647126471364714647156471664717647186471964720647216472264723647246472564726647276472864729647306473164732647336473464735647366473764738647396474064741647426474364744647456474664747647486474964750647516475264753647546475564756647576475864759647606476164762647636476464765647666476764768647696477064771647726477364774647756477664777647786477964780647816478264783647846478564786647876478864789647906479164792647936479464795647966479764798647996480064801648026480364804648056480664807648086480964810648116481264813648146481564816648176481864819648206482164822648236482464825648266482764828648296483064831648326483364834648356483664837648386483964840648416484264843648446484564846648476484864849648506485164852648536485464855648566485764858648596486064861648626486364864648656486664867648686486964870648716487264873648746487564876648776487864879648806488164882648836488464885648866488764888648896489064891648926489364894648956489664897648986489964900649016490264903649046490564906649076490864909649106491164912649136491464915649166491764918649196492064921649226492364924649256492664927649286492964930649316493264933649346493564936649376493864939649406494164942649436494464945649466494764948649496495064951649526495364954649556495664957649586495964960649616496264963649646496564966649676496864969649706497164972649736497464975649766497764978649796498064981649826498364984649856498664987649886498964990649916499264993649946499564996649976499864999650006500165002650036500465005650066500765008650096501065011650126501365014650156501665017650186501965020650216502265023650246502565026650276502865029650306503165032650336503465035650366503765038650396504065041650426504365044650456504665047650486504965050650516505265053650546505565056650576505865059650606506165062650636506465065650666506765068650696507065071650726507365074650756507665077650786507965080650816508265083650846508565086650876508865089650906509165092650936509465095650966509765098650996510065101651026510365104651056510665107651086510965110651116511265113651146511565116651176511865119651206512165122651236512465125651266512765128651296513065131651326513365134651356513665137651386513965140651416514265143651446514565146651476514865149651506515165152651536515465155651566515765158651596516065161651626516365164651656516665167651686516965170651716517265173651746517565176651776517865179651806518165182651836518465185651866518765188651896519065191651926519365194651956519665197651986519965200652016520265203652046520565206652076520865209652106521165212652136521465215652166521765218652196522065221652226522365224652256522665227652286522965230652316523265233652346523565236652376523865239652406524165242652436524465245652466524765248652496525065251652526525365254652556525665257652586525965260652616526265263652646526565266652676526865269652706527165272652736527465275652766527765278652796528065281652826528365284652856528665287652886528965290652916529265293652946529565296652976529865299653006530165302653036530465305653066530765308653096531065311653126531365314653156531665317653186531965320653216532265323653246532565326653276532865329653306533165332653336533465335653366533765338653396534065341653426534365344653456534665347653486534965350653516535265353653546535565356653576535865359653606536165362653636536465365653666536765368653696537065371653726537365374653756537665377653786537965380653816538265383653846538565386653876538865389653906539165392653936539465395653966539765398653996540065401654026540365404654056540665407654086540965410654116541265413654146541565416654176541865419654206542165422654236542465425654266542765428654296543065431654326543365434654356543665437654386543965440654416544265443654446544565446654476544865449654506545165452654536545465455654566545765458654596546065461654626546365464654656546665467654686546965470654716547265473654746547565476654776547865479654806548165482654836548465485654866548765488654896549065491654926549365494654956549665497654986549965500655016550265503655046550565506655076550865509655106551165512655136551465515655166551765518655196552065521655226552365524655256552665527655286552965530655316553265533655346553565536655376553865539655406554165542655436554465545655466554765548655496555065551655526555365554655556555665557655586555965560655616556265563655646556565566655676556865569655706557165572655736557465575655766557765578655796558065581655826558365584655856558665587655886558965590655916559265593655946559565596655976559865599656006560165602656036560465605656066560765608656096561065611656126561365614656156561665617656186561965620656216562265623656246562565626656276562865629656306563165632656336563465635656366563765638656396564065641656426564365644656456564665647656486564965650656516565265653656546565565656656576565865659656606566165662656636566465665656666566765668656696567065671656726567365674656756567665677656786567965680656816568265683656846568565686656876568865689656906569165692656936569465695656966569765698656996570065701657026570365704657056570665707657086570965710657116571265713657146571565716657176571865719657206572165722657236572465725657266572765728657296573065731657326573365734657356573665737657386573965740657416574265743657446574565746657476574865749657506575165752657536575465755657566575765758657596576065761657626576365764657656576665767657686576965770657716577265773657746577565776657776577865779657806578165782657836578465785657866578765788657896579065791657926579365794657956579665797657986579965800658016580265803658046580565806658076580865809658106581165812658136581465815658166581765818658196582065821658226582365824658256582665827658286582965830658316583265833658346583565836658376583865839658406584165842658436584465845658466584765848658496585065851658526585365854658556585665857658586585965860658616586265863658646586565866658676586865869658706587165872658736587465875658766587765878658796588065881658826588365884658856588665887658886588965890658916589265893658946589565896658976589865899659006590165902659036590465905659066590765908659096591065911659126591365914659156591665917659186591965920659216592265923659246592565926659276592865929659306593165932659336593465935659366593765938659396594065941659426594365944659456594665947659486594965950659516595265953659546595565956659576595865959659606596165962659636596465965659666596765968659696597065971659726597365974659756597665977659786597965980659816598265983659846598565986659876598865989659906599165992659936599465995659966599765998659996600066001660026600366004660056600666007660086600966010660116601266013660146601566016660176601866019660206602166022660236602466025660266602766028660296603066031660326603366034660356603666037660386603966040660416604266043660446604566046660476604866049660506605166052660536605466055660566605766058660596606066061660626606366064660656606666067660686606966070660716607266073660746607566076660776607866079660806608166082660836608466085660866608766088660896609066091660926609366094660956609666097660986609966100661016610266103661046610566106661076610866109661106611166112661136611466115661166611766118661196612066121661226612366124661256612666127661286612966130661316613266133661346613566136661376613866139661406614166142661436614466145661466614766148661496615066151661526615366154661556615666157661586615966160661616616266163661646616566166661676616866169661706617166172661736617466175661766617766178661796618066181661826618366184661856618666187661886618966190661916619266193661946619566196661976619866199662006620166202662036620466205662066620766208662096621066211662126621366214662156621666217662186621966220662216622266223662246622566226662276622866229662306623166232662336623466235662366623766238662396624066241662426624366244662456624666247662486624966250662516625266253662546625566256662576625866259662606626166262662636626466265662666626766268662696627066271662726627366274662756627666277662786627966280662816628266283662846628566286662876628866289662906629166292662936629466295662966629766298662996630066301663026630366304663056630666307663086630966310663116631266313663146631566316663176631866319663206632166322663236632466325663266632766328663296633066331663326633366334663356633666337663386633966340663416634266343663446634566346663476634866349663506635166352663536635466355663566635766358663596636066361663626636366364663656636666367663686636966370663716637266373663746637566376663776637866379663806638166382663836638466385663866638766388663896639066391663926639366394663956639666397663986639966400664016640266403664046640566406664076640866409664106641166412664136641466415664166641766418664196642066421664226642366424664256642666427664286642966430664316643266433664346643566436664376643866439664406644166442664436644466445664466644766448664496645066451664526645366454664556645666457664586645966460664616646266463664646646566466664676646866469664706647166472664736647466475664766647766478664796648066481664826648366484664856648666487664886648966490664916649266493664946649566496664976649866499665006650166502665036650466505665066650766508665096651066511665126651366514665156651666517665186651966520665216652266523665246652566526665276652866529665306653166532665336653466535665366653766538665396654066541665426654366544665456654666547665486654966550665516655266553665546655566556665576655866559665606656166562665636656466565665666656766568665696657066571665726657366574665756657666577665786657966580665816658266583665846658566586665876658866589665906659166592665936659466595665966659766598665996660066601666026660366604666056660666607666086660966610666116661266613666146661566616666176661866619666206662166622666236662466625666266662766628666296663066631666326663366634666356663666637666386663966640666416664266643666446664566646666476664866649666506665166652666536665466655666566665766658666596666066661666626666366664666656666666667666686666966670666716667266673666746667566676666776667866679666806668166682666836668466685666866668766688666896669066691666926669366694666956669666697666986669966700667016670266703667046670566706667076670866709667106671166712667136671466715667166671766718667196672066721667226672366724667256672666727667286672966730667316673266733667346673566736667376673866739667406674166742667436674466745667466674766748667496675066751667526675366754667556675666757667586675966760667616676266763667646676566766667676676866769667706677166772667736677466775667766677766778667796678066781667826678366784667856678666787667886678966790667916679266793667946679566796667976679866799668006680166802668036680466805668066680766808668096681066811668126681366814668156681666817668186681966820668216682266823668246682566826668276682866829668306683166832668336683466835668366683766838668396684066841668426684366844668456684666847668486684966850668516685266853668546685566856668576685866859668606686166862668636686466865668666686766868668696687066871668726687366874668756687666877668786687966880668816688266883668846688566886668876688866889668906689166892668936689466895668966689766898668996690066901669026690366904669056690666907669086690966910669116691266913669146691566916669176691866919669206692166922669236692466925669266692766928669296693066931669326693366934669356693666937669386693966940669416694266943669446694566946669476694866949669506695166952669536695466955669566695766958669596696066961669626696366964669656696666967669686696966970669716697266973669746697566976669776697866979669806698166982669836698466985669866698766988669896699066991669926699366994669956699666997669986699967000670016700267003670046700567006670076700867009670106701167012670136701467015670166701767018670196702067021670226702367024670256702667027670286702967030670316703267033670346703567036670376703867039670406704167042670436704467045670466704767048670496705067051670526705367054670556705667057670586705967060670616706267063670646706567066670676706867069670706707167072670736707467075670766707767078670796708067081670826708367084670856708667087670886708967090670916709267093670946709567096670976709867099671006710167102671036710467105671066710767108671096711067111671126711367114671156711667117671186711967120671216712267123671246712567126671276712867129671306713167132671336713467135671366713767138671396714067141671426714367144671456714667147671486714967150671516715267153671546715567156671576715867159671606716167162671636716467165671666716767168671696717067171671726717367174671756717667177671786717967180671816718267183671846718567186671876718867189671906719167192671936719467195671966719767198671996720067201672026720367204672056720667207672086720967210672116721267213672146721567216672176721867219672206722167222672236722467225672266722767228672296723067231672326723367234672356723667237672386723967240672416724267243672446724567246672476724867249672506725167252672536725467255672566725767258672596726067261672626726367264672656726667267672686726967270672716727267273672746727567276672776727867279672806728167282672836728467285672866728767288672896729067291672926729367294672956729667297672986729967300673016730267303673046730567306673076730867309673106731167312673136731467315673166731767318673196732067321673226732367324673256732667327673286732967330673316733267333673346733567336673376733867339673406734167342673436734467345673466734767348673496735067351673526735367354673556735667357673586735967360673616736267363673646736567366673676736867369673706737167372673736737467375673766737767378673796738067381673826738367384673856738667387673886738967390673916739267393673946739567396673976739867399674006740167402674036740467405674066740767408674096741067411674126741367414674156741667417674186741967420674216742267423674246742567426674276742867429674306743167432674336743467435674366743767438674396744067441674426744367444674456744667447674486744967450674516745267453674546745567456674576745867459674606746167462674636746467465674666746767468674696747067471674726747367474674756747667477674786747967480674816748267483674846748567486674876748867489674906749167492674936749467495674966749767498674996750067501675026750367504675056750667507675086750967510675116751267513675146751567516675176751867519675206752167522675236752467525675266752767528675296753067531675326753367534675356753667537675386753967540675416754267543675446754567546675476754867549675506755167552675536755467555675566755767558675596756067561675626756367564675656756667567675686756967570675716757267573675746757567576675776757867579675806758167582675836758467585675866758767588675896759067591675926759367594675956759667597675986759967600676016760267603676046760567606676076760867609676106761167612676136761467615676166761767618676196762067621676226762367624676256762667627676286762967630676316763267633676346763567636676376763867639676406764167642676436764467645676466764767648676496765067651676526765367654676556765667657676586765967660676616766267663676646766567666676676766867669676706767167672676736767467675676766767767678676796768067681676826768367684676856768667687676886768967690676916769267693676946769567696676976769867699677006770167702677036770467705677066770767708677096771067711677126771367714677156771667717677186771967720677216772267723677246772567726677276772867729677306773167732677336773467735677366773767738677396774067741677426774367744677456774667747677486774967750677516775267753677546775567756677576775867759677606776167762677636776467765677666776767768677696777067771677726777367774677756777667777677786777967780677816778267783677846778567786677876778867789677906779167792677936779467795677966779767798677996780067801678026780367804678056780667807678086780967810678116781267813678146781567816678176781867819678206782167822678236782467825678266782767828678296783067831678326783367834678356783667837678386783967840678416784267843678446784567846678476784867849678506785167852678536785467855678566785767858678596786067861678626786367864678656786667867678686786967870678716787267873678746787567876678776787867879678806788167882678836788467885678866788767888678896789067891678926789367894678956789667897678986789967900679016790267903679046790567906679076790867909679106791167912679136791467915679166791767918679196792067921679226792367924679256792667927679286792967930679316793267933679346793567936679376793867939679406794167942679436794467945679466794767948679496795067951679526795367954679556795667957679586795967960679616796267963679646796567966679676796867969679706797167972679736797467975679766797767978679796798067981679826798367984679856798667987679886798967990679916799267993679946799567996679976799867999680006800168002680036800468005680066800768008680096801068011680126801368014680156801668017680186801968020680216802268023680246802568026680276802868029680306803168032680336803468035680366803768038680396804068041680426804368044680456804668047680486804968050680516805268053680546805568056680576805868059680606806168062680636806468065680666806768068680696807068071680726807368074680756807668077680786807968080680816808268083680846808568086680876808868089680906809168092680936809468095680966809768098680996810068101681026810368104681056810668107681086810968110681116811268113681146811568116681176811868119681206812168122681236812468125681266812768128681296813068131681326813368134681356813668137681386813968140681416814268143681446814568146681476814868149681506815168152681536815468155681566815768158681596816068161681626816368164681656816668167681686816968170681716817268173681746817568176681776817868179681806818168182681836818468185681866818768188681896819068191681926819368194681956819668197681986819968200682016820268203682046820568206682076820868209682106821168212682136821468215682166821768218682196822068221682226822368224682256822668227682286822968230682316823268233682346823568236682376823868239682406824168242682436824468245682466824768248682496825068251682526825368254682556825668257682586825968260682616826268263682646826568266682676826868269682706827168272682736827468275682766827768278682796828068281682826828368284682856828668287682886828968290682916829268293682946829568296682976829868299683006830168302683036830468305683066830768308683096831068311683126831368314683156831668317683186831968320683216832268323683246832568326683276832868329683306833168332683336833468335683366833768338683396834068341683426834368344683456834668347683486834968350683516835268353683546835568356683576835868359683606836168362683636836468365683666836768368683696837068371683726837368374683756837668377683786837968380683816838268383683846838568386683876838868389683906839168392683936839468395683966839768398683996840068401684026840368404684056840668407684086840968410684116841268413684146841568416684176841868419684206842168422684236842468425684266842768428684296843068431684326843368434684356843668437684386843968440684416844268443684446844568446684476844868449684506845168452684536845468455684566845768458684596846068461684626846368464684656846668467684686846968470684716847268473684746847568476684776847868479684806848168482684836848468485684866848768488684896849068491684926849368494684956849668497684986849968500685016850268503685046850568506685076850868509685106851168512685136851468515685166851768518685196852068521685226852368524685256852668527685286852968530685316853268533685346853568536685376853868539685406854168542685436854468545685466854768548685496855068551685526855368554685556855668557685586855968560685616856268563685646856568566685676856868569685706857168572685736857468575685766857768578685796858068581685826858368584685856858668587685886858968590685916859268593685946859568596685976859868599686006860168602686036860468605686066860768608686096861068611686126861368614686156861668617686186861968620686216862268623686246862568626686276862868629686306863168632686336863468635686366863768638686396864068641686426864368644686456864668647686486864968650686516865268653686546865568656686576865868659686606866168662686636866468665686666866768668686696867068671686726867368674686756867668677686786867968680686816868268683686846868568686686876868868689686906869168692686936869468695686966869768698686996870068701687026870368704687056870668707687086870968710687116871268713687146871568716687176871868719687206872168722687236872468725687266872768728687296873068731687326873368734687356873668737687386873968740687416874268743687446874568746687476874868749687506875168752687536875468755687566875768758687596876068761687626876368764687656876668767687686876968770687716877268773687746877568776687776877868779687806878168782687836878468785687866878768788687896879068791687926879368794687956879668797687986879968800688016880268803688046880568806688076880868809688106881168812688136881468815688166881768818688196882068821688226882368824688256882668827688286882968830688316883268833688346883568836688376883868839688406884168842688436884468845688466884768848688496885068851688526885368854688556885668857688586885968860688616886268863688646886568866688676886868869688706887168872688736887468875688766887768878688796888068881688826888368884688856888668887688886888968890688916889268893688946889568896688976889868899689006890168902689036890468905689066890768908689096891068911689126891368914689156891668917689186891968920689216892268923689246892568926689276892868929689306893168932689336893468935689366893768938689396894068941689426894368944689456894668947689486894968950689516895268953689546895568956689576895868959689606896168962689636896468965689666896768968689696897068971689726897368974689756897668977689786897968980689816898268983689846898568986689876898868989689906899168992689936899468995689966899768998689996900069001690026900369004690056900669007690086900969010690116901269013690146901569016690176901869019690206902169022690236902469025690266902769028690296903069031690326903369034690356903669037690386903969040690416904269043690446904569046690476904869049690506905169052690536905469055690566905769058690596906069061690626906369064690656906669067690686906969070690716907269073690746907569076690776907869079690806908169082690836908469085690866908769088690896909069091690926909369094690956909669097690986909969100691016910269103691046910569106691076910869109691106911169112691136911469115691166911769118691196912069121691226912369124691256912669127691286912969130691316913269133691346913569136691376913869139691406914169142691436914469145691466914769148691496915069151691526915369154691556915669157691586915969160691616916269163691646916569166691676916869169691706917169172691736917469175691766917769178691796918069181691826918369184691856918669187691886918969190691916919269193691946919569196691976919869199692006920169202692036920469205692066920769208692096921069211692126921369214692156921669217692186921969220692216922269223692246922569226692276922869229692306923169232692336923469235692366923769238692396924069241692426924369244692456924669247692486924969250692516925269253692546925569256692576925869259692606926169262692636926469265692666926769268692696927069271692726927369274692756927669277692786927969280692816928269283692846928569286692876928869289692906929169292692936929469295692966929769298692996930069301693026930369304693056930669307693086930969310693116931269313693146931569316693176931869319693206932169322693236932469325693266932769328693296933069331693326933369334693356933669337693386933969340693416934269343693446934569346693476934869349693506935169352693536935469355693566935769358693596936069361693626936369364693656936669367693686936969370693716937269373693746937569376693776937869379693806938169382693836938469385693866938769388693896939069391693926939369394693956939669397693986939969400694016940269403694046940569406694076940869409694106941169412694136941469415694166941769418694196942069421694226942369424694256942669427694286942969430694316943269433694346943569436694376943869439694406944169442694436944469445694466944769448694496945069451694526945369454694556945669457694586945969460694616946269463694646946569466694676946869469694706947169472694736947469475694766947769478694796948069481694826948369484694856948669487694886948969490694916949269493694946949569496694976949869499695006950169502695036950469505695066950769508695096951069511695126951369514695156951669517695186951969520695216952269523695246952569526695276952869529695306953169532695336953469535695366953769538695396954069541695426954369544695456954669547695486954969550695516955269553695546955569556695576955869559695606956169562695636956469565695666956769568695696957069571695726957369574695756957669577695786957969580695816958269583695846958569586695876958869589695906959169592695936959469595695966959769598695996960069601696026960369604696056960669607696086960969610696116961269613696146961569616696176961869619696206962169622696236962469625696266962769628696296963069631696326963369634696356963669637696386963969640696416964269643696446964569646696476964869649696506965169652696536965469655696566965769658696596966069661696626966369664696656966669667696686966969670696716967269673696746967569676696776967869679696806968169682696836968469685696866968769688696896969069691696926969369694696956969669697696986969969700697016970269703697046970569706697076970869709697106971169712697136971469715697166971769718697196972069721697226972369724697256972669727697286972969730697316973269733697346973569736697376973869739697406974169742697436974469745697466974769748697496975069751697526975369754697556975669757697586975969760697616976269763697646976569766697676976869769697706977169772697736977469775697766977769778697796978069781697826978369784697856978669787697886978969790697916979269793697946979569796697976979869799698006980169802698036980469805698066980769808698096981069811698126981369814698156981669817698186981969820698216982269823698246982569826698276982869829698306983169832698336983469835698366983769838698396984069841698426984369844698456984669847698486984969850698516985269853698546985569856698576985869859698606986169862698636986469865698666986769868698696987069871698726987369874698756987669877698786987969880698816988269883698846988569886698876988869889698906989169892698936989469895698966989769898698996990069901699026990369904699056990669907699086990969910699116991269913699146991569916699176991869919699206992169922699236992469925699266992769928699296993069931699326993369934699356993669937699386993969940699416994269943699446994569946699476994869949699506995169952699536995469955699566995769958699596996069961699626996369964699656996669967699686996969970699716997269973699746997569976699776997869979699806998169982699836998469985699866998769988699896999069991699926999369994699956999669997699986999970000700017000270003700047000570006700077000870009700107001170012700137001470015700167001770018700197002070021700227002370024700257002670027700287002970030700317003270033700347003570036700377003870039700407004170042700437004470045700467004770048700497005070051700527005370054700557005670057700587005970060700617006270063700647006570066700677006870069700707007170072700737007470075700767007770078700797008070081700827008370084700857008670087700887008970090700917009270093700947009570096700977009870099701007010170102701037010470105701067010770108701097011070111701127011370114701157011670117701187011970120701217012270123701247012570126701277012870129701307013170132701337013470135701367013770138701397014070141701427014370144701457014670147701487014970150701517015270153701547015570156701577015870159701607016170162701637016470165701667016770168701697017070171701727017370174701757017670177701787017970180701817018270183701847018570186701877018870189701907019170192701937019470195701967019770198701997020070201702027020370204702057020670207702087020970210702117021270213702147021570216702177021870219702207022170222702237022470225702267022770228702297023070231702327023370234702357023670237702387023970240702417024270243702447024570246702477024870249702507025170252702537025470255702567025770258702597026070261702627026370264702657026670267702687026970270702717027270273702747027570276702777027870279702807028170282702837028470285702867028770288702897029070291702927029370294702957029670297702987029970300703017030270303703047030570306703077030870309703107031170312703137031470315703167031770318703197032070321703227032370324703257032670327703287032970330703317033270333703347033570336703377033870339703407034170342703437034470345703467034770348703497035070351703527035370354703557035670357703587035970360703617036270363703647036570366703677036870369703707037170372703737037470375703767037770378703797038070381703827038370384703857038670387703887038970390703917039270393703947039570396703977039870399704007040170402704037040470405704067040770408704097041070411704127041370414704157041670417704187041970420704217042270423704247042570426704277042870429704307043170432704337043470435704367043770438704397044070441704427044370444704457044670447704487044970450704517045270453704547045570456704577045870459704607046170462704637046470465704667046770468704697047070471704727047370474704757047670477704787047970480704817048270483704847048570486704877048870489704907049170492704937049470495704967049770498704997050070501705027050370504705057050670507705087050970510705117051270513705147051570516705177051870519705207052170522705237052470525705267052770528705297053070531705327053370534705357053670537705387053970540705417054270543705447054570546705477054870549705507055170552705537055470555705567055770558705597056070561705627056370564705657056670567705687056970570705717057270573705747057570576705777057870579705807058170582705837058470585705867058770588705897059070591705927059370594705957059670597705987059970600706017060270603706047060570606706077060870609706107061170612706137061470615706167061770618706197062070621706227062370624706257062670627706287062970630706317063270633706347063570636706377063870639706407064170642706437064470645706467064770648706497065070651706527065370654706557065670657706587065970660706617066270663706647066570666706677066870669706707067170672706737067470675706767067770678706797068070681706827068370684706857068670687706887068970690706917069270693706947069570696706977069870699707007070170702707037070470705707067070770708707097071070711707127071370714707157071670717707187071970720707217072270723707247072570726707277072870729707307073170732707337073470735707367073770738707397074070741707427074370744707457074670747707487074970750707517075270753707547075570756707577075870759707607076170762707637076470765707667076770768707697077070771707727077370774707757077670777707787077970780707817078270783707847078570786707877078870789707907079170792707937079470795707967079770798707997080070801708027080370804708057080670807708087080970810708117081270813708147081570816708177081870819708207082170822708237082470825708267082770828708297083070831708327083370834708357083670837708387083970840708417084270843708447084570846708477084870849708507085170852708537085470855708567085770858708597086070861708627086370864708657086670867708687086970870708717087270873708747087570876708777087870879708807088170882708837088470885708867088770888708897089070891708927089370894708957089670897708987089970900709017090270903709047090570906709077090870909709107091170912709137091470915709167091770918709197092070921709227092370924709257092670927709287092970930709317093270933709347093570936709377093870939709407094170942709437094470945709467094770948709497095070951709527095370954709557095670957709587095970960709617096270963709647096570966709677096870969709707097170972709737097470975709767097770978709797098070981709827098370984709857098670987709887098970990709917099270993709947099570996709977099870999710007100171002710037100471005710067100771008710097101071011710127101371014710157101671017710187101971020710217102271023710247102571026710277102871029710307103171032710337103471035710367103771038710397104071041710427104371044710457104671047710487104971050710517105271053710547105571056710577105871059710607106171062710637106471065710667106771068710697107071071710727107371074710757107671077710787107971080710817108271083710847108571086710877108871089710907109171092710937109471095710967109771098710997110071101711027110371104711057110671107711087110971110711117111271113711147111571116711177111871119711207112171122711237112471125711267112771128711297113071131711327113371134711357113671137711387113971140711417114271143711447114571146711477114871149711507115171152711537115471155711567115771158711597116071161711627116371164711657116671167711687116971170711717117271173711747117571176711777117871179711807118171182711837118471185711867118771188711897119071191711927119371194711957119671197711987119971200712017120271203712047120571206712077120871209712107121171212712137121471215712167121771218712197122071221712227122371224712257122671227712287122971230712317123271233712347123571236712377123871239712407124171242712437124471245712467124771248712497125071251712527125371254712557125671257712587125971260712617126271263712647126571266712677126871269712707127171272712737127471275712767127771278712797128071281712827128371284712857128671287712887128971290712917129271293712947129571296712977129871299713007130171302713037130471305713067130771308713097131071311713127131371314713157131671317713187131971320713217132271323713247132571326713277132871329713307133171332713337133471335713367133771338713397134071341713427134371344713457134671347713487134971350713517135271353713547135571356713577135871359713607136171362713637136471365713667136771368713697137071371713727137371374713757137671377713787137971380713817138271383713847138571386713877138871389713907139171392713937139471395713967139771398713997140071401714027140371404714057140671407714087140971410714117141271413714147141571416714177141871419714207142171422714237142471425714267142771428714297143071431714327143371434714357143671437714387143971440714417144271443714447144571446714477144871449714507145171452714537145471455714567145771458714597146071461714627146371464714657146671467714687146971470714717147271473714747147571476714777147871479714807148171482714837148471485714867148771488714897149071491714927149371494714957149671497714987149971500715017150271503715047150571506715077150871509715107151171512715137151471515715167151771518715197152071521715227152371524715257152671527715287152971530715317153271533715347153571536715377153871539715407154171542715437154471545715467154771548715497155071551715527155371554715557155671557715587155971560715617156271563715647156571566715677156871569715707157171572715737157471575715767157771578715797158071581715827158371584715857158671587715887158971590715917159271593715947159571596715977159871599716007160171602716037160471605716067160771608716097161071611716127161371614716157161671617716187161971620716217162271623716247162571626716277162871629716307163171632716337163471635716367163771638716397164071641716427164371644716457164671647716487164971650716517165271653716547165571656716577165871659716607166171662716637166471665716667166771668716697167071671716727167371674716757167671677716787167971680716817168271683716847168571686716877168871689716907169171692716937169471695716967169771698716997170071701717027170371704717057170671707717087170971710717117171271713717147171571716717177171871719717207172171722717237172471725717267172771728717297173071731717327173371734717357173671737717387173971740717417174271743717447174571746717477174871749717507175171752717537175471755717567175771758717597176071761717627176371764717657176671767717687176971770717717177271773717747177571776717777177871779717807178171782717837178471785717867178771788717897179071791717927179371794717957179671797717987179971800718017180271803718047180571806718077180871809718107181171812718137181471815718167181771818718197182071821718227182371824718257182671827718287182971830718317183271833718347183571836718377183871839718407184171842718437184471845718467184771848718497185071851718527185371854718557185671857718587185971860718617186271863718647186571866718677186871869718707187171872718737187471875718767187771878718797188071881718827188371884718857188671887718887188971890718917189271893718947189571896718977189871899719007190171902719037190471905719067190771908719097191071911719127191371914719157191671917719187191971920719217192271923719247192571926719277192871929719307193171932719337193471935719367193771938719397194071941719427194371944719457194671947719487194971950719517195271953719547195571956719577195871959719607196171962719637196471965719667196771968719697197071971719727197371974719757197671977719787197971980719817198271983719847198571986719877198871989719907199171992719937199471995719967199771998719997200072001720027200372004720057200672007720087200972010720117201272013720147201572016720177201872019720207202172022720237202472025720267202772028720297203072031720327203372034720357203672037720387203972040720417204272043720447204572046720477204872049720507205172052720537205472055720567205772058720597206072061720627206372064720657206672067720687206972070720717207272073720747207572076720777207872079720807208172082720837208472085720867208772088720897209072091720927209372094720957209672097720987209972100721017210272103721047210572106721077210872109721107211172112721137211472115721167211772118721197212072121721227212372124721257212672127721287212972130721317213272133721347213572136721377213872139721407214172142721437214472145721467214772148721497215072151721527215372154721557215672157721587215972160721617216272163721647216572166721677216872169721707217172172721737217472175721767217772178721797218072181721827218372184721857218672187721887218972190721917219272193721947219572196721977219872199722007220172202722037220472205722067220772208722097221072211722127221372214722157221672217722187221972220722217222272223722247222572226722277222872229722307223172232722337223472235722367223772238722397224072241722427224372244722457224672247722487224972250722517225272253722547225572256722577225872259722607226172262722637226472265722667226772268722697227072271722727227372274722757227672277722787227972280722817228272283722847228572286722877228872289722907229172292722937229472295722967229772298722997230072301723027230372304723057230672307723087230972310723117231272313723147231572316723177231872319723207232172322723237232472325723267232772328723297233072331723327233372334723357233672337723387233972340723417234272343723447234572346723477234872349723507235172352723537235472355723567235772358723597236072361723627236372364723657236672367723687236972370723717237272373723747237572376723777237872379723807238172382723837238472385723867238772388723897239072391723927239372394723957239672397723987239972400724017240272403724047240572406724077240872409724107241172412724137241472415724167241772418724197242072421724227242372424724257242672427724287242972430724317243272433724347243572436724377243872439724407244172442724437244472445724467244772448724497245072451724527245372454724557245672457724587245972460724617246272463724647246572466724677246872469724707247172472724737247472475724767247772478724797248072481724827248372484724857248672487724887248972490724917249272493724947249572496724977249872499725007250172502725037250472505725067250772508725097251072511725127251372514725157251672517725187251972520725217252272523725247252572526725277252872529725307253172532725337253472535725367253772538725397254072541725427254372544725457254672547725487254972550725517255272553725547255572556725577255872559725607256172562725637256472565725667256772568725697257072571725727257372574725757257672577725787257972580725817258272583725847258572586725877258872589725907259172592725937259472595725967259772598725997260072601726027260372604726057260672607726087260972610726117261272613726147261572616726177261872619726207262172622726237262472625726267262772628726297263072631726327263372634726357263672637726387263972640726417264272643726447264572646726477264872649726507265172652726537265472655726567265772658726597266072661726627266372664726657266672667726687266972670726717267272673726747267572676726777267872679726807268172682726837268472685726867268772688726897269072691726927269372694726957269672697726987269972700727017270272703727047270572706727077270872709727107271172712727137271472715727167271772718727197272072721727227272372724727257272672727727287272972730727317273272733727347273572736727377273872739727407274172742727437274472745727467274772748727497275072751727527275372754727557275672757727587275972760727617276272763727647276572766727677276872769727707277172772727737277472775727767277772778727797278072781727827278372784727857278672787727887278972790727917279272793727947279572796727977279872799728007280172802728037280472805728067280772808728097281072811728127281372814728157281672817728187281972820728217282272823728247282572826728277282872829728307283172832728337283472835728367283772838728397284072841728427284372844728457284672847728487284972850728517285272853728547285572856728577285872859728607286172862728637286472865728667286772868728697287072871728727287372874728757287672877728787287972880728817288272883728847288572886728877288872889728907289172892728937289472895728967289772898728997290072901729027290372904729057290672907729087290972910729117291272913729147291572916729177291872919729207292172922729237292472925729267292772928729297293072931729327293372934729357293672937729387293972940729417294272943729447294572946729477294872949729507295172952729537295472955729567295772958729597296072961729627296372964729657296672967729687296972970729717297272973729747297572976729777297872979729807298172982729837298472985729867298772988729897299072991729927299372994729957299672997729987299973000730017300273003730047300573006730077300873009730107301173012730137301473015730167301773018730197302073021730227302373024730257302673027730287302973030730317303273033730347303573036730377303873039730407304173042730437304473045730467304773048730497305073051730527305373054730557305673057730587305973060730617306273063730647306573066730677306873069730707307173072730737307473075730767307773078730797308073081730827308373084730857308673087730887308973090730917309273093730947309573096730977309873099731007310173102731037310473105731067310773108731097311073111731127311373114731157311673117731187311973120731217312273123731247312573126731277312873129731307313173132731337313473135731367313773138731397314073141731427314373144731457314673147731487314973150731517315273153731547315573156731577315873159731607316173162731637316473165731667316773168731697317073171731727317373174731757317673177731787317973180731817318273183731847318573186731877318873189731907319173192731937319473195731967319773198731997320073201732027320373204732057320673207732087320973210732117321273213732147321573216732177321873219732207322173222732237322473225732267322773228732297323073231732327323373234732357323673237732387323973240732417324273243732447324573246732477324873249732507325173252732537325473255732567325773258732597326073261732627326373264732657326673267732687326973270732717327273273732747327573276732777327873279732807328173282732837328473285732867328773288732897329073291732927329373294732957329673297732987329973300733017330273303733047330573306733077330873309733107331173312733137331473315733167331773318733197332073321733227332373324733257332673327733287332973330733317333273333733347333573336733377333873339733407334173342733437334473345733467334773348733497335073351733527335373354733557335673357733587335973360733617336273363733647336573366733677336873369733707337173372733737337473375733767337773378733797338073381733827338373384733857338673387733887338973390733917339273393733947339573396733977339873399734007340173402734037340473405734067340773408734097341073411734127341373414734157341673417734187341973420734217342273423734247342573426734277342873429734307343173432734337343473435734367343773438734397344073441734427344373444734457344673447734487344973450734517345273453734547345573456734577345873459734607346173462734637346473465734667346773468734697347073471734727347373474734757347673477734787347973480734817348273483734847348573486734877348873489734907349173492734937349473495734967349773498734997350073501735027350373504735057350673507735087350973510735117351273513735147351573516735177351873519735207352173522735237352473525735267352773528735297353073531735327353373534735357353673537735387353973540735417354273543735447354573546735477354873549735507355173552735537355473555735567355773558735597356073561735627356373564735657356673567735687356973570735717357273573735747357573576735777357873579735807358173582735837358473585735867358773588735897359073591735927359373594735957359673597735987359973600736017360273603736047360573606736077360873609736107361173612736137361473615736167361773618736197362073621736227362373624736257362673627736287362973630736317363273633736347363573636736377363873639736407364173642736437364473645736467364773648736497365073651736527365373654736557365673657736587365973660736617366273663736647366573666736677366873669736707367173672736737367473675736767367773678736797368073681736827368373684736857368673687736887368973690736917369273693736947369573696736977369873699737007370173702737037370473705737067370773708737097371073711737127371373714737157371673717737187371973720737217372273723737247372573726737277372873729737307373173732737337373473735737367373773738737397374073741737427374373744737457374673747737487374973750737517375273753737547375573756737577375873759737607376173762737637376473765737667376773768737697377073771737727377373774737757377673777737787377973780737817378273783737847378573786737877378873789737907379173792737937379473795737967379773798737997380073801738027380373804738057380673807738087380973810738117381273813738147381573816738177381873819738207382173822738237382473825738267382773828738297383073831738327383373834738357383673837738387383973840738417384273843738447384573846738477384873849738507385173852738537385473855738567385773858738597386073861738627386373864738657386673867738687386973870738717387273873738747387573876738777387873879738807388173882738837388473885738867388773888738897389073891738927389373894738957389673897738987389973900739017390273903739047390573906739077390873909739107391173912739137391473915739167391773918739197392073921739227392373924739257392673927739287392973930739317393273933739347393573936739377393873939739407394173942739437394473945739467394773948739497395073951739527395373954739557395673957739587395973960739617396273963739647396573966739677396873969739707397173972739737397473975739767397773978739797398073981739827398373984739857398673987739887398973990739917399273993739947399573996739977399873999740007400174002740037400474005740067400774008740097401074011740127401374014740157401674017740187401974020740217402274023740247402574026740277402874029740307403174032740337403474035740367403774038740397404074041740427404374044740457404674047740487404974050740517405274053740547405574056740577405874059740607406174062740637406474065740667406774068740697407074071740727407374074740757407674077740787407974080740817408274083740847408574086740877408874089740907409174092740937409474095740967409774098740997410074101741027410374104741057410674107741087410974110741117411274113741147411574116741177411874119741207412174122741237412474125741267412774128741297413074131741327413374134741357413674137741387413974140741417414274143741447414574146741477414874149741507415174152741537415474155741567415774158741597416074161741627416374164741657416674167741687416974170741717417274173741747417574176741777417874179741807418174182741837418474185741867418774188741897419074191741927419374194741957419674197741987419974200742017420274203742047420574206742077420874209742107421174212742137421474215742167421774218742197422074221742227422374224742257422674227742287422974230742317423274233742347423574236742377423874239742407424174242742437424474245742467424774248742497425074251742527425374254742557425674257742587425974260742617426274263742647426574266742677426874269742707427174272742737427474275742767427774278742797428074281742827428374284742857428674287742887428974290742917429274293742947429574296742977429874299743007430174302743037430474305743067430774308743097431074311743127431374314743157431674317743187431974320743217432274323743247432574326743277432874329743307433174332743337433474335743367433774338743397434074341743427434374344743457434674347743487434974350743517435274353743547435574356743577435874359743607436174362743637436474365743667436774368743697437074371743727437374374743757437674377743787437974380743817438274383743847438574386743877438874389743907439174392743937439474395743967439774398743997440074401744027440374404744057440674407744087440974410744117441274413744147441574416744177441874419744207442174422744237442474425744267442774428744297443074431744327443374434744357443674437744387443974440744417444274443744447444574446744477444874449744507445174452744537445474455744567445774458744597446074461744627446374464744657446674467744687446974470744717447274473744747447574476744777447874479744807448174482744837448474485744867448774488744897449074491744927449374494744957449674497744987449974500745017450274503745047450574506745077450874509745107451174512745137451474515745167451774518745197452074521745227452374524745257452674527745287452974530745317453274533745347453574536745377453874539745407454174542745437454474545745467454774548745497455074551745527455374554745557455674557745587455974560745617456274563745647456574566745677456874569745707457174572745737457474575745767457774578745797458074581745827458374584745857458674587745887458974590745917459274593745947459574596745977459874599746007460174602746037460474605746067460774608746097461074611746127461374614746157461674617746187461974620746217462274623746247462574626746277462874629746307463174632746337463474635746367463774638746397464074641746427464374644746457464674647746487464974650746517465274653746547465574656746577465874659746607466174662746637466474665746667466774668746697467074671746727467374674746757467674677746787467974680746817468274683746847468574686746877468874689746907469174692746937469474695746967469774698746997470074701747027470374704747057470674707747087470974710747117471274713747147471574716747177471874719747207472174722747237472474725747267472774728747297473074731747327473374734747357473674737747387473974740747417474274743747447474574746747477474874749747507475174752747537475474755747567475774758747597476074761747627476374764747657476674767747687476974770747717477274773747747477574776747777477874779747807478174782747837478474785747867478774788747897479074791747927479374794747957479674797747987479974800748017480274803748047480574806748077480874809748107481174812748137481474815748167481774818748197482074821748227482374824748257482674827748287482974830748317483274833748347483574836748377483874839748407484174842748437484474845748467484774848748497485074851748527485374854748557485674857748587485974860748617486274863748647486574866748677486874869748707487174872748737487474875748767487774878748797488074881748827488374884748857488674887748887488974890748917489274893748947489574896748977489874899749007490174902749037490474905749067490774908749097491074911749127491374914749157491674917749187491974920749217492274923749247492574926749277492874929749307493174932749337493474935749367493774938749397494074941749427494374944749457494674947749487494974950749517495274953749547495574956749577495874959749607496174962749637496474965749667496774968749697497074971749727497374974749757497674977749787497974980749817498274983749847498574986749877498874989749907499174992749937499474995749967499774998749997500075001750027500375004750057500675007750087500975010750117501275013750147501575016750177501875019750207502175022750237502475025750267502775028750297503075031750327503375034750357503675037750387503975040750417504275043750447504575046750477504875049750507505175052750537505475055750567505775058750597506075061750627506375064750657506675067750687506975070750717507275073750747507575076750777507875079750807508175082750837508475085750867508775088750897509075091750927509375094750957509675097750987509975100751017510275103751047510575106751077510875109751107511175112751137511475115751167511775118751197512075121751227512375124751257512675127751287512975130751317513275133751347513575136751377513875139751407514175142751437514475145751467514775148751497515075151751527515375154751557515675157751587515975160751617516275163751647516575166751677516875169751707517175172751737517475175751767517775178751797518075181751827518375184751857518675187751887518975190751917519275193751947519575196751977519875199752007520175202752037520475205752067520775208752097521075211752127521375214752157521675217752187521975220752217522275223752247522575226752277522875229752307523175232752337523475235752367523775238752397524075241752427524375244752457524675247752487524975250752517525275253752547525575256752577525875259752607526175262752637526475265752667526775268752697527075271752727527375274752757527675277752787527975280752817528275283752847528575286752877528875289752907529175292752937529475295752967529775298752997530075301753027530375304753057530675307753087530975310753117531275313753147531575316753177531875319753207532175322753237532475325753267532775328753297533075331753327533375334753357533675337753387533975340753417534275343753447534575346753477534875349753507535175352753537535475355753567535775358753597536075361753627536375364753657536675367753687536975370753717537275373753747537575376753777537875379753807538175382753837538475385753867538775388753897539075391753927539375394753957539675397753987539975400754017540275403754047540575406754077540875409754107541175412754137541475415754167541775418754197542075421754227542375424754257542675427754287542975430754317543275433754347543575436754377543875439754407544175442754437544475445754467544775448754497545075451754527545375454754557545675457754587545975460754617546275463754647546575466754677546875469754707547175472754737547475475754767547775478754797548075481754827548375484754857548675487754887548975490754917549275493754947549575496754977549875499755007550175502755037550475505755067550775508755097551075511755127551375514755157551675517755187551975520755217552275523755247552575526755277552875529755307553175532755337553475535755367553775538755397554075541755427554375544755457554675547755487554975550755517555275553755547555575556755577555875559755607556175562755637556475565755667556775568755697557075571755727557375574755757557675577755787557975580755817558275583755847558575586755877558875589755907559175592755937559475595755967559775598755997560075601756027560375604756057560675607756087560975610756117561275613756147561575616756177561875619756207562175622756237562475625756267562775628756297563075631756327563375634756357563675637756387563975640756417564275643756447564575646756477564875649756507565175652756537565475655756567565775658756597566075661756627566375664756657566675667756687566975670756717567275673756747567575676756777567875679756807568175682756837568475685756867568775688756897569075691756927569375694756957569675697756987569975700757017570275703757047570575706757077570875709757107571175712757137571475715757167571775718757197572075721757227572375724757257572675727757287572975730757317573275733757347573575736757377573875739757407574175742757437574475745757467574775748757497575075751757527575375754757557575675757757587575975760757617576275763757647576575766757677576875769757707577175772757737577475775757767577775778757797578075781757827578375784757857578675787757887578975790757917579275793757947579575796757977579875799758007580175802758037580475805758067580775808758097581075811758127581375814758157581675817758187581975820758217582275823758247582575826758277582875829758307583175832758337583475835758367583775838758397584075841758427584375844758457584675847758487584975850758517585275853758547585575856758577585875859758607586175862758637586475865758667586775868758697587075871758727587375874758757587675877758787587975880758817588275883758847588575886758877588875889758907589175892758937589475895758967589775898758997590075901759027590375904759057590675907759087590975910759117591275913759147591575916759177591875919759207592175922759237592475925759267592775928759297593075931759327593375934759357593675937759387593975940759417594275943759447594575946759477594875949759507595175952759537595475955759567595775958759597596075961759627596375964759657596675967759687596975970759717597275973759747597575976759777597875979759807598175982759837598475985759867598775988759897599075991759927599375994759957599675997759987599976000760017600276003760047600576006760077600876009760107601176012760137601476015760167601776018760197602076021760227602376024760257602676027760287602976030760317603276033760347603576036760377603876039760407604176042760437604476045760467604776048760497605076051760527605376054760557605676057760587605976060760617606276063760647606576066760677606876069760707607176072760737607476075760767607776078760797608076081760827608376084760857608676087760887608976090760917609276093760947609576096760977609876099761007610176102761037610476105761067610776108761097611076111761127611376114761157611676117761187611976120761217612276123761247612576126761277612876129761307613176132761337613476135761367613776138761397614076141761427614376144761457614676147761487614976150761517615276153761547615576156761577615876159761607616176162761637616476165761667616776168761697617076171761727617376174761757617676177761787617976180761817618276183761847618576186761877618876189761907619176192761937619476195761967619776198761997620076201762027620376204762057620676207762087620976210762117621276213762147621576216762177621876219762207622176222762237622476225762267622776228762297623076231762327623376234762357623676237762387623976240762417624276243762447624576246762477624876249762507625176252762537625476255762567625776258762597626076261762627626376264762657626676267762687626976270762717627276273762747627576276762777627876279762807628176282762837628476285762867628776288762897629076291762927629376294762957629676297762987629976300763017630276303763047630576306763077630876309763107631176312763137631476315763167631776318763197632076321763227632376324763257632676327763287632976330763317633276333763347633576336763377633876339763407634176342763437634476345763467634776348763497635076351763527635376354763557635676357763587635976360763617636276363763647636576366763677636876369763707637176372763737637476375763767637776378763797638076381763827638376384763857638676387763887638976390763917639276393763947639576396763977639876399764007640176402764037640476405764067640776408764097641076411764127641376414764157641676417764187641976420764217642276423764247642576426764277642876429764307643176432764337643476435764367643776438764397644076441764427644376444764457644676447764487644976450764517645276453764547645576456764577645876459764607646176462764637646476465764667646776468764697647076471764727647376474764757647676477764787647976480764817648276483764847648576486764877648876489764907649176492764937649476495764967649776498764997650076501765027650376504765057650676507765087650976510765117651276513765147651576516765177651876519765207652176522765237652476525765267652776528765297653076531765327653376534765357653676537765387653976540765417654276543765447654576546765477654876549765507655176552765537655476555765567655776558765597656076561765627656376564765657656676567765687656976570765717657276573765747657576576765777657876579765807658176582765837658476585765867658776588765897659076591765927659376594765957659676597765987659976600766017660276603766047660576606766077660876609766107661176612766137661476615766167661776618766197662076621766227662376624766257662676627766287662976630766317663276633766347663576636766377663876639766407664176642766437664476645766467664776648766497665076651766527665376654766557665676657766587665976660766617666276663766647666576666766677666876669766707667176672766737667476675766767667776678766797668076681766827668376684766857668676687766887668976690766917669276693766947669576696766977669876699767007670176702767037670476705767067670776708767097671076711767127671376714767157671676717767187671976720767217672276723767247672576726767277672876729767307673176732767337673476735767367673776738767397674076741767427674376744767457674676747767487674976750767517675276753767547675576756767577675876759767607676176762767637676476765767667676776768767697677076771767727677376774767757677676777767787677976780767817678276783767847678576786767877678876789767907679176792767937679476795767967679776798767997680076801768027680376804768057680676807768087680976810768117681276813768147681576816768177681876819768207682176822768237682476825768267682776828768297683076831768327683376834768357683676837768387683976840768417684276843768447684576846768477684876849768507685176852768537685476855768567685776858768597686076861768627686376864768657686676867768687686976870768717687276873768747687576876768777687876879768807688176882768837688476885768867688776888768897689076891768927689376894768957689676897768987689976900769017690276903769047690576906769077690876909769107691176912769137691476915769167691776918769197692076921769227692376924769257692676927769287692976930769317693276933769347693576936769377693876939769407694176942769437694476945769467694776948769497695076951769527695376954769557695676957769587695976960769617696276963769647696576966769677696876969769707697176972769737697476975769767697776978769797698076981769827698376984769857698676987769887698976990769917699276993769947699576996769977699876999770007700177002770037700477005770067700777008770097701077011770127701377014770157701677017770187701977020770217702277023770247702577026770277702877029770307703177032770337703477035770367703777038770397704077041770427704377044770457704677047770487704977050770517705277053770547705577056770577705877059770607706177062770637706477065770667706777068770697707077071770727707377074770757707677077770787707977080770817708277083770847708577086770877708877089770907709177092770937709477095770967709777098770997710077101771027710377104771057710677107771087710977110771117711277113771147711577116771177711877119771207712177122771237712477125771267712777128771297713077131771327713377134771357713677137771387713977140771417714277143771447714577146771477714877149771507715177152771537715477155771567715777158771597716077161771627716377164771657716677167771687716977170771717717277173771747717577176771777717877179771807718177182771837718477185771867718777188771897719077191771927719377194771957719677197771987719977200772017720277203772047720577206772077720877209772107721177212772137721477215772167721777218772197722077221772227722377224772257722677227772287722977230772317723277233772347723577236772377723877239772407724177242772437724477245772467724777248772497725077251772527725377254772557725677257772587725977260772617726277263772647726577266772677726877269772707727177272772737727477275772767727777278772797728077281772827728377284772857728677287772887728977290772917729277293772947729577296772977729877299773007730177302773037730477305773067730777308773097731077311773127731377314773157731677317773187731977320773217732277323773247732577326773277732877329773307733177332773337733477335773367733777338773397734077341773427734377344773457734677347773487734977350773517735277353773547735577356773577735877359773607736177362773637736477365773667736777368773697737077371773727737377374773757737677377773787737977380773817738277383773847738577386773877738877389773907739177392773937739477395773967739777398773997740077401774027740377404774057740677407774087740977410774117741277413774147741577416774177741877419774207742177422774237742477425774267742777428774297743077431774327743377434774357743677437774387743977440774417744277443774447744577446774477744877449774507745177452774537745477455774567745777458774597746077461774627746377464774657746677467774687746977470774717747277473774747747577476774777747877479774807748177482774837748477485774867748777488774897749077491774927749377494774957749677497774987749977500775017750277503775047750577506775077750877509775107751177512775137751477515775167751777518775197752077521775227752377524775257752677527775287752977530775317753277533775347753577536775377753877539775407754177542775437754477545775467754777548775497755077551775527755377554775557755677557775587755977560775617756277563775647756577566775677756877569775707757177572775737757477575775767757777578775797758077581775827758377584775857758677587775887758977590775917759277593775947759577596775977759877599776007760177602776037760477605776067760777608776097761077611776127761377614776157761677617776187761977620776217762277623776247762577626776277762877629776307763177632776337763477635776367763777638776397764077641776427764377644776457764677647776487764977650776517765277653776547765577656776577765877659776607766177662776637766477665776667766777668776697767077671776727767377674776757767677677776787767977680776817768277683776847768577686776877768877689776907769177692776937769477695776967769777698776997770077701777027770377704777057770677707777087770977710777117771277713777147771577716777177771877719777207772177722777237772477725777267772777728777297773077731777327773377734777357773677737777387773977740777417774277743777447774577746777477774877749777507775177752777537775477755777567775777758777597776077761777627776377764777657776677767777687776977770777717777277773777747777577776777777777877779777807778177782777837778477785777867778777788777897779077791777927779377794777957779677797777987779977800778017780277803778047780577806778077780877809778107781177812778137781477815778167781777818778197782077821778227782377824778257782677827778287782977830778317783277833778347783577836778377783877839778407784177842778437784477845778467784777848778497785077851778527785377854778557785677857778587785977860778617786277863778647786577866778677786877869778707787177872778737787477875778767787777878778797788077881778827788377884778857788677887778887788977890778917789277893778947789577896778977789877899779007790177902779037790477905779067790777908779097791077911779127791377914779157791677917779187791977920779217792277923779247792577926779277792877929779307793177932779337793477935779367793777938779397794077941779427794377944779457794677947779487794977950779517795277953779547795577956779577795877959779607796177962779637796477965779667796777968779697797077971779727797377974779757797677977779787797977980779817798277983779847798577986779877798877989779907799177992779937799477995779967799777998779997800078001780027800378004780057800678007780087800978010780117801278013780147801578016780177801878019780207802178022780237802478025780267802778028780297803078031780327803378034780357803678037780387803978040780417804278043780447804578046780477804878049780507805178052780537805478055780567805778058780597806078061780627806378064780657806678067780687806978070780717807278073780747807578076780777807878079780807808178082780837808478085780867808778088780897809078091780927809378094780957809678097780987809978100781017810278103781047810578106781077810878109781107811178112781137811478115781167811778118781197812078121781227812378124781257812678127781287812978130781317813278133781347813578136781377813878139781407814178142781437814478145781467814778148781497815078151781527815378154781557815678157781587815978160781617816278163781647816578166781677816878169781707817178172781737817478175781767817778178781797818078181781827818378184781857818678187781887818978190781917819278193781947819578196781977819878199782007820178202782037820478205782067820778208782097821078211782127821378214782157821678217782187821978220782217822278223782247822578226782277822878229782307823178232782337823478235782367823778238782397824078241782427824378244782457824678247782487824978250782517825278253782547825578256782577825878259782607826178262782637826478265782667826778268782697827078271782727827378274782757827678277782787827978280782817828278283782847828578286782877828878289782907829178292782937829478295782967829778298782997830078301783027830378304783057830678307783087830978310783117831278313783147831578316783177831878319783207832178322783237832478325783267832778328783297833078331783327833378334783357833678337783387833978340783417834278343783447834578346783477834878349783507835178352783537835478355783567835778358783597836078361783627836378364783657836678367783687836978370783717837278373783747837578376783777837878379783807838178382783837838478385783867838778388783897839078391783927839378394783957839678397783987839978400784017840278403784047840578406784077840878409784107841178412784137841478415784167841778418784197842078421784227842378424784257842678427784287842978430784317843278433784347843578436784377843878439784407844178442784437844478445784467844778448784497845078451784527845378454784557845678457784587845978460784617846278463784647846578466784677846878469784707847178472784737847478475784767847778478784797848078481784827848378484784857848678487784887848978490784917849278493784947849578496784977849878499785007850178502785037850478505785067850778508785097851078511785127851378514785157851678517785187851978520785217852278523785247852578526785277852878529785307853178532785337853478535785367853778538785397854078541785427854378544785457854678547785487854978550785517855278553785547855578556785577855878559785607856178562785637856478565785667856778568785697857078571785727857378574785757857678577785787857978580785817858278583785847858578586785877858878589785907859178592785937859478595785967859778598785997860078601786027860378604786057860678607786087860978610786117861278613786147861578616786177861878619786207862178622786237862478625786267862778628786297863078631786327863378634786357863678637786387863978640786417864278643786447864578646786477864878649786507865178652786537865478655786567865778658786597866078661786627866378664786657866678667786687866978670786717867278673786747867578676786777867878679786807868178682786837868478685786867868778688786897869078691786927869378694786957869678697786987869978700787017870278703787047870578706787077870878709787107871178712787137871478715787167871778718787197872078721787227872378724787257872678727787287872978730787317873278733787347873578736787377873878739787407874178742787437874478745787467874778748787497875078751787527875378754787557875678757787587875978760787617876278763787647876578766787677876878769787707877178772787737877478775787767877778778787797878078781787827878378784787857878678787787887878978790787917879278793787947879578796787977879878799788007880178802788037880478805788067880778808788097881078811788127881378814788157881678817788187881978820788217882278823788247882578826788277882878829788307883178832788337883478835788367883778838788397884078841788427884378844788457884678847788487884978850788517885278853788547885578856788577885878859788607886178862788637886478865788667886778868788697887078871788727887378874788757887678877788787887978880788817888278883788847888578886788877888878889788907889178892788937889478895788967889778898788997890078901789027890378904789057890678907789087890978910789117891278913789147891578916789177891878919789207892178922789237892478925789267892778928789297893078931789327893378934789357893678937789387893978940789417894278943789447894578946789477894878949789507895178952789537895478955789567895778958789597896078961789627896378964789657896678967789687896978970789717897278973789747897578976789777897878979789807898178982789837898478985789867898778988789897899078991789927899378994789957899678997789987899979000790017900279003790047900579006790077900879009790107901179012790137901479015790167901779018790197902079021790227902379024790257902679027790287902979030790317903279033790347903579036790377903879039790407904179042790437904479045790467904779048790497905079051790527905379054790557905679057790587905979060790617906279063790647906579066790677906879069790707907179072790737907479075790767907779078790797908079081790827908379084790857908679087790887908979090790917909279093790947909579096790977909879099791007910179102791037910479105791067910779108791097911079111791127911379114791157911679117791187911979120791217912279123791247912579126791277912879129791307913179132791337913479135791367913779138791397914079141791427914379144791457914679147791487914979150791517915279153791547915579156791577915879159791607916179162791637916479165791667916779168791697917079171791727917379174791757917679177791787917979180791817918279183791847918579186791877918879189791907919179192791937919479195791967919779198791997920079201792027920379204792057920679207792087920979210792117921279213792147921579216792177921879219792207922179222792237922479225792267922779228792297923079231792327923379234792357923679237792387923979240792417924279243792447924579246792477924879249792507925179252792537925479255792567925779258792597926079261792627926379264792657926679267792687926979270792717927279273792747927579276792777927879279792807928179282792837928479285792867928779288792897929079291792927929379294792957929679297792987929979300793017930279303793047930579306793077930879309793107931179312793137931479315793167931779318793197932079321793227932379324793257932679327793287932979330793317933279333793347933579336793377933879339793407934179342793437934479345793467934779348793497935079351793527935379354793557935679357793587935979360793617936279363793647936579366793677936879369793707937179372793737937479375793767937779378793797938079381793827938379384793857938679387793887938979390793917939279393793947939579396793977939879399794007940179402794037940479405794067940779408794097941079411794127941379414794157941679417794187941979420794217942279423794247942579426794277942879429794307943179432794337943479435794367943779438794397944079441794427944379444794457944679447794487944979450794517945279453794547945579456794577945879459794607946179462794637946479465794667946779468794697947079471794727947379474794757947679477794787947979480794817948279483794847948579486794877948879489794907949179492794937949479495794967949779498794997950079501795027950379504795057950679507795087950979510795117951279513795147951579516795177951879519795207952179522795237952479525795267952779528795297953079531795327953379534795357953679537795387953979540795417954279543795447954579546795477954879549795507955179552795537955479555795567955779558795597956079561795627956379564795657956679567795687956979570795717957279573795747957579576795777957879579795807958179582795837958479585795867958779588795897959079591795927959379594795957959679597795987959979600796017960279603796047960579606796077960879609796107961179612796137961479615796167961779618796197962079621796227962379624796257962679627796287962979630796317963279633796347963579636796377963879639796407964179642796437964479645796467964779648796497965079651796527965379654796557965679657796587965979660796617966279663796647966579666796677966879669796707967179672796737967479675796767967779678796797968079681796827968379684796857968679687796887968979690796917969279693796947969579696796977969879699797007970179702797037970479705797067970779708797097971079711797127971379714797157971679717797187971979720797217972279723797247972579726797277972879729797307973179732797337973479735797367973779738797397974079741797427974379744797457974679747797487974979750797517975279753797547975579756797577975879759797607976179762797637976479765797667976779768797697977079771797727977379774797757977679777797787977979780797817978279783797847978579786797877978879789797907979179792797937979479795797967979779798797997980079801798027980379804798057980679807798087980979810798117981279813798147981579816798177981879819798207982179822798237982479825798267982779828798297983079831798327983379834798357983679837798387983979840798417984279843798447984579846798477984879849798507985179852798537985479855798567985779858798597986079861798627986379864798657986679867798687986979870798717987279873798747987579876798777987879879798807988179882798837988479885798867988779888798897989079891798927989379894798957989679897798987989979900799017990279903799047990579906799077990879909799107991179912799137991479915799167991779918799197992079921799227992379924799257992679927799287992979930799317993279933799347993579936799377993879939799407994179942799437994479945799467994779948799497995079951799527995379954799557995679957799587995979960799617996279963799647996579966799677996879969799707997179972799737997479975799767997779978799797998079981799827998379984799857998679987799887998979990799917999279993799947999579996799977999879999800008000180002800038000480005800068000780008800098001080011800128001380014800158001680017800188001980020800218002280023800248002580026800278002880029800308003180032800338003480035800368003780038800398004080041800428004380044800458004680047800488004980050800518005280053800548005580056800578005880059800608006180062800638006480065800668006780068800698007080071800728007380074800758007680077800788007980080800818008280083800848008580086800878008880089800908009180092800938009480095800968009780098800998010080101801028010380104801058010680107801088010980110801118011280113801148011580116801178011880119801208012180122801238012480125801268012780128801298013080131801328013380134801358013680137801388013980140801418014280143801448014580146801478014880149801508015180152801538015480155801568015780158801598016080161801628016380164801658016680167801688016980170801718017280173801748017580176801778017880179801808018180182801838018480185801868018780188801898019080191801928019380194801958019680197801988019980200802018020280203802048020580206802078020880209802108021180212802138021480215802168021780218802198022080221802228022380224802258022680227802288022980230802318023280233802348023580236802378023880239802408024180242802438024480245802468024780248802498025080251802528025380254802558025680257802588025980260802618026280263802648026580266802678026880269802708027180272802738027480275802768027780278802798028080281802828028380284802858028680287802888028980290802918029280293802948029580296802978029880299803008030180302803038030480305803068030780308803098031080311803128031380314803158031680317803188031980320803218032280323803248032580326803278032880329803308033180332803338033480335803368033780338803398034080341803428034380344803458034680347803488034980350803518035280353803548035580356803578035880359803608036180362803638036480365803668036780368803698037080371803728037380374803758037680377803788037980380803818038280383803848038580386803878038880389803908039180392803938039480395803968039780398803998040080401804028040380404804058040680407804088040980410804118041280413804148041580416804178041880419804208042180422804238042480425804268042780428804298043080431804328043380434804358043680437804388043980440804418044280443804448044580446804478044880449804508045180452804538045480455804568045780458804598046080461804628046380464804658046680467804688046980470804718047280473804748047580476804778047880479804808048180482804838048480485804868048780488804898049080491804928049380494804958049680497804988049980500805018050280503805048050580506805078050880509805108051180512805138051480515805168051780518805198052080521805228052380524805258052680527805288052980530805318053280533805348053580536805378053880539805408054180542805438054480545805468054780548805498055080551805528055380554805558055680557805588055980560805618056280563805648056580566805678056880569805708057180572805738057480575805768057780578805798058080581805828058380584805858058680587805888058980590805918059280593805948059580596805978059880599806008060180602806038060480605806068060780608806098061080611806128061380614806158061680617806188061980620806218062280623806248062580626806278062880629806308063180632806338063480635806368063780638806398064080641806428064380644806458064680647806488064980650806518065280653806548065580656806578065880659806608066180662806638066480665806668066780668806698067080671806728067380674806758067680677806788067980680806818068280683806848068580686806878068880689806908069180692806938069480695806968069780698806998070080701807028070380704807058070680707807088070980710807118071280713807148071580716807178071880719807208072180722807238072480725807268072780728807298073080731807328073380734807358073680737807388073980740807418074280743807448074580746807478074880749807508075180752807538075480755807568075780758807598076080761807628076380764807658076680767807688076980770807718077280773807748077580776807778077880779807808078180782807838078480785807868078780788807898079080791807928079380794807958079680797807988079980800808018080280803808048080580806808078080880809808108081180812808138081480815808168081780818808198082080821808228082380824808258082680827808288082980830808318083280833808348083580836808378083880839808408084180842808438084480845808468084780848808498085080851808528085380854808558085680857808588085980860808618086280863808648086580866808678086880869808708087180872808738087480875808768087780878808798088080881808828088380884808858088680887808888088980890808918089280893808948089580896808978089880899809008090180902809038090480905809068090780908809098091080911809128091380914809158091680917809188091980920809218092280923809248092580926809278092880929809308093180932809338093480935809368093780938809398094080941809428094380944809458094680947809488094980950809518095280953809548095580956809578095880959809608096180962809638096480965809668096780968809698097080971809728097380974809758097680977809788097980980809818098280983809848098580986809878098880989809908099180992809938099480995809968099780998809998100081001810028100381004810058100681007810088100981010810118101281013810148101581016810178101881019810208102181022810238102481025810268102781028810298103081031810328103381034810358103681037810388103981040810418104281043810448104581046810478104881049810508105181052810538105481055810568105781058810598106081061810628106381064810658106681067810688106981070810718107281073810748107581076810778107881079810808108181082810838108481085810868108781088810898109081091810928109381094810958109681097810988109981100811018110281103811048110581106811078110881109811108111181112811138111481115811168111781118811198112081121811228112381124811258112681127811288112981130811318113281133811348113581136811378113881139811408114181142811438114481145811468114781148811498115081151811528115381154811558115681157811588115981160811618116281163811648116581166811678116881169811708117181172811738117481175811768117781178811798118081181811828118381184811858118681187811888118981190811918119281193811948119581196811978119881199812008120181202812038120481205812068120781208812098121081211812128121381214812158121681217812188121981220812218122281223812248122581226812278122881229812308123181232812338123481235812368123781238812398124081241812428124381244812458124681247812488124981250812518125281253812548125581256812578125881259812608126181262812638126481265812668126781268812698127081271812728127381274812758127681277812788127981280812818128281283812848128581286812878128881289812908129181292812938129481295812968129781298812998130081301813028130381304813058130681307813088130981310813118131281313813148131581316813178131881319813208132181322813238132481325813268132781328813298133081331813328133381334813358133681337813388133981340813418134281343813448134581346813478134881349813508135181352813538135481355813568135781358813598136081361813628136381364813658136681367813688136981370813718137281373813748137581376813778137881379813808138181382813838138481385813868138781388813898139081391813928139381394813958139681397813988139981400814018140281403814048140581406814078140881409814108141181412814138141481415814168141781418814198142081421814228142381424814258142681427814288142981430814318143281433814348143581436814378143881439814408144181442814438144481445814468144781448814498145081451814528145381454814558145681457814588145981460814618146281463814648146581466814678146881469814708147181472814738147481475814768147781478814798148081481814828148381484814858148681487814888148981490814918149281493814948149581496814978149881499815008150181502815038150481505815068150781508815098151081511815128151381514815158151681517815188151981520815218152281523815248152581526815278152881529815308153181532815338153481535815368153781538815398154081541815428154381544815458154681547815488154981550815518155281553815548155581556815578155881559815608156181562815638156481565815668156781568815698157081571815728157381574815758157681577815788157981580815818158281583815848158581586815878158881589815908159181592815938159481595815968159781598815998160081601816028160381604816058160681607816088160981610816118161281613816148161581616816178161881619816208162181622816238162481625816268162781628816298163081631816328163381634816358163681637816388163981640816418164281643816448164581646816478164881649816508165181652816538165481655816568165781658816598166081661816628166381664816658166681667816688166981670816718167281673816748167581676816778167881679816808168181682816838168481685816868168781688816898169081691816928169381694816958169681697816988169981700817018170281703817048170581706817078170881709817108171181712817138171481715817168171781718817198172081721817228172381724817258172681727817288172981730817318173281733817348173581736817378173881739817408174181742817438174481745817468174781748817498175081751817528175381754817558175681757817588175981760817618176281763817648176581766817678176881769817708177181772817738177481775817768177781778817798178081781817828178381784817858178681787817888178981790817918179281793817948179581796817978179881799818008180181802818038180481805818068180781808818098181081811818128181381814818158181681817818188181981820818218182281823818248182581826818278182881829818308183181832818338183481835818368183781838818398184081841818428184381844818458184681847818488184981850818518185281853818548185581856818578185881859818608186181862818638186481865818668186781868818698187081871818728187381874818758187681877818788187981880818818188281883818848188581886818878188881889818908189181892818938189481895818968189781898818998190081901819028190381904819058190681907819088190981910819118191281913819148191581916819178191881919819208192181922819238192481925819268192781928819298193081931819328193381934819358193681937819388193981940819418194281943819448194581946819478194881949819508195181952819538195481955819568195781958819598196081961819628196381964819658196681967819688196981970819718197281973819748197581976819778197881979819808198181982819838198481985819868198781988819898199081991819928199381994819958199681997819988199982000820018200282003820048200582006820078200882009820108201182012820138201482015820168201782018820198202082021820228202382024820258202682027820288202982030820318203282033820348203582036820378203882039820408204182042820438204482045820468204782048820498205082051820528205382054820558205682057820588205982060820618206282063820648206582066820678206882069820708207182072820738207482075820768207782078820798208082081820828208382084820858208682087820888208982090820918209282093820948209582096820978209882099821008210182102821038210482105821068210782108821098211082111821128211382114821158211682117821188211982120821218212282123821248212582126821278212882129821308213182132821338213482135821368213782138821398214082141821428214382144821458214682147821488214982150821518215282153821548215582156821578215882159821608216182162821638216482165821668216782168821698217082171821728217382174821758217682177821788217982180821818218282183821848218582186821878218882189821908219182192821938219482195821968219782198821998220082201822028220382204822058220682207822088220982210822118221282213822148221582216822178221882219822208222182222822238222482225822268222782228822298223082231822328223382234822358223682237822388223982240822418224282243822448224582246822478224882249822508225182252822538225482255822568225782258822598226082261822628226382264822658226682267822688226982270822718227282273822748227582276822778227882279822808228182282822838228482285822868228782288822898229082291822928229382294822958229682297822988229982300823018230282303823048230582306823078230882309823108231182312823138231482315823168231782318823198232082321823228232382324823258232682327823288232982330823318233282333823348233582336823378233882339823408234182342823438234482345823468234782348823498235082351823528235382354823558235682357823588235982360823618236282363823648236582366823678236882369823708237182372823738237482375823768237782378823798238082381823828238382384823858238682387823888238982390823918239282393823948239582396823978239882399824008240182402824038240482405824068240782408824098241082411824128241382414824158241682417824188241982420824218242282423824248242582426824278242882429824308243182432824338243482435824368243782438824398244082441824428244382444824458244682447824488244982450824518245282453824548245582456824578245882459824608246182462824638246482465824668246782468824698247082471824728247382474824758247682477824788247982480824818248282483824848248582486824878248882489824908249182492824938249482495824968249782498824998250082501825028250382504825058250682507825088250982510825118251282513825148251582516825178251882519825208252182522825238252482525825268252782528825298253082531825328253382534825358253682537825388253982540825418254282543825448254582546825478254882549825508255182552825538255482555825568255782558825598256082561825628256382564825658256682567825688256982570825718257282573825748257582576825778257882579825808258182582825838258482585825868258782588825898259082591825928259382594825958259682597825988259982600826018260282603826048260582606826078260882609826108261182612826138261482615826168261782618826198262082621826228262382624826258262682627826288262982630826318263282633826348263582636826378263882639826408264182642826438264482645826468264782648826498265082651826528265382654826558265682657826588265982660826618266282663826648266582666826678266882669826708267182672826738267482675826768267782678826798268082681826828268382684826858268682687826888268982690826918269282693826948269582696826978269882699827008270182702827038270482705827068270782708827098271082711827128271382714827158271682717827188271982720827218272282723827248272582726827278272882729827308273182732827338273482735827368273782738827398274082741827428274382744827458274682747827488274982750827518275282753827548275582756827578275882759827608276182762827638276482765827668276782768827698277082771827728277382774827758277682777827788277982780827818278282783827848278582786827878278882789827908279182792827938279482795827968279782798827998280082801828028280382804828058280682807828088280982810828118281282813828148281582816828178281882819828208282182822828238282482825828268282782828828298283082831828328283382834828358283682837828388283982840828418284282843828448284582846828478284882849828508285182852828538285482855828568285782858828598286082861828628286382864828658286682867828688286982870828718287282873828748287582876828778287882879828808288182882828838288482885828868288782888828898289082891828928289382894828958289682897828988289982900829018290282903829048290582906829078290882909829108291182912829138291482915829168291782918829198292082921829228292382924829258292682927829288292982930829318293282933829348293582936829378293882939829408294182942829438294482945829468294782948829498295082951829528295382954829558295682957829588295982960829618296282963829648296582966829678296882969829708297182972829738297482975829768297782978829798298082981829828298382984829858298682987829888298982990829918299282993829948299582996829978299882999830008300183002830038300483005830068300783008830098301083011830128301383014830158301683017830188301983020830218302283023830248302583026830278302883029830308303183032830338303483035830368303783038830398304083041830428304383044830458304683047830488304983050830518305283053830548305583056830578305883059830608306183062830638306483065830668306783068830698307083071830728307383074830758307683077830788307983080830818308283083830848308583086830878308883089830908309183092830938309483095830968309783098830998310083101831028310383104831058310683107831088310983110831118311283113831148311583116831178311883119831208312183122831238312483125831268312783128831298313083131831328313383134831358313683137831388313983140831418314283143831448314583146831478314883149831508315183152831538315483155831568315783158831598316083161831628316383164831658316683167831688316983170831718317283173831748317583176831778317883179831808318183182831838318483185831868318783188831898319083191831928319383194831958319683197831988319983200832018320283203832048320583206832078320883209832108321183212832138321483215832168321783218832198322083221832228322383224832258322683227832288322983230832318323283233832348323583236832378323883239832408324183242832438324483245832468324783248832498325083251832528325383254832558325683257832588325983260832618326283263832648326583266832678326883269832708327183272832738327483275832768327783278832798328083281832828328383284832858328683287832888328983290832918329283293832948329583296832978329883299833008330183302833038330483305833068330783308833098331083311833128331383314833158331683317833188331983320833218332283323833248332583326833278332883329833308333183332833338333483335833368333783338833398334083341833428334383344833458334683347833488334983350833518335283353833548335583356833578335883359833608336183362833638336483365833668336783368833698337083371833728337383374833758337683377833788337983380833818338283383833848338583386833878338883389833908339183392833938339483395833968339783398833998340083401834028340383404834058340683407834088340983410834118341283413834148341583416834178341883419834208342183422834238342483425834268342783428834298343083431834328343383434834358343683437834388343983440834418344283443834448344583446834478344883449834508345183452834538345483455834568345783458834598346083461834628346383464834658346683467834688346983470834718347283473834748347583476834778347883479834808348183482834838348483485834868348783488834898349083491834928349383494834958349683497834988349983500835018350283503835048350583506835078350883509835108351183512835138351483515835168351783518835198352083521835228352383524835258352683527835288352983530835318353283533835348353583536835378353883539835408354183542835438354483545835468354783548835498355083551835528355383554835558355683557835588355983560835618356283563835648356583566835678356883569835708357183572835738357483575835768357783578835798358083581835828358383584835858358683587835888358983590835918359283593835948359583596835978359883599836008360183602836038360483605836068360783608836098361083611836128361383614836158361683617836188361983620836218362283623836248362583626836278362883629836308363183632836338363483635836368363783638836398364083641836428364383644836458364683647836488364983650836518365283653836548365583656836578365883659836608366183662836638366483665836668366783668836698367083671836728367383674836758367683677836788367983680836818368283683836848368583686836878368883689836908369183692836938369483695836968369783698836998370083701837028370383704837058370683707837088370983710837118371283713837148371583716837178371883719837208372183722837238372483725837268372783728837298373083731837328373383734837358373683737837388373983740837418374283743837448374583746837478374883749837508375183752837538375483755837568375783758837598376083761837628376383764837658376683767837688376983770837718377283773837748377583776837778377883779837808378183782837838378483785837868378783788837898379083791837928379383794837958379683797837988379983800838018380283803838048380583806838078380883809838108381183812838138381483815838168381783818838198382083821838228382383824838258382683827838288382983830838318383283833838348383583836838378383883839838408384183842838438384483845838468384783848838498385083851838528385383854838558385683857838588385983860838618386283863838648386583866838678386883869838708387183872838738387483875838768387783878838798388083881838828388383884838858388683887838888388983890838918389283893838948389583896838978389883899839008390183902839038390483905839068390783908839098391083911839128391383914839158391683917839188391983920839218392283923839248392583926839278392883929839308393183932839338393483935839368393783938839398394083941839428394383944839458394683947839488394983950839518395283953839548395583956839578395883959839608396183962839638396483965839668396783968839698397083971839728397383974839758397683977839788397983980839818398283983839848398583986839878398883989839908399183992839938399483995839968399783998839998400084001840028400384004840058400684007840088400984010840118401284013840148401584016840178401884019840208402184022840238402484025840268402784028840298403084031840328403384034840358403684037840388403984040840418404284043840448404584046840478404884049840508405184052840538405484055840568405784058840598406084061840628406384064840658406684067840688406984070840718407284073840748407584076840778407884079840808408184082840838408484085840868408784088840898409084091840928409384094840958409684097840988409984100841018410284103841048410584106841078410884109841108411184112841138411484115841168411784118841198412084121841228412384124841258412684127841288412984130841318413284133841348413584136841378413884139841408414184142841438414484145841468414784148841498415084151841528415384154841558415684157841588415984160841618416284163841648416584166841678416884169841708417184172841738417484175841768417784178841798418084181841828418384184841858418684187841888418984190841918419284193841948419584196841978419884199842008420184202842038420484205842068420784208842098421084211842128421384214842158421684217842188421984220842218422284223842248422584226842278422884229842308423184232842338423484235842368423784238842398424084241842428424384244842458424684247842488424984250842518425284253842548425584256842578425884259842608426184262842638426484265842668426784268842698427084271842728427384274842758427684277842788427984280842818428284283842848428584286842878428884289842908429184292842938429484295842968429784298842998430084301843028430384304843058430684307843088430984310843118431284313843148431584316843178431884319843208432184322843238432484325843268432784328843298433084331843328433384334843358433684337843388433984340843418434284343843448434584346843478434884349843508435184352843538435484355843568435784358843598436084361843628436384364843658436684367843688436984370843718437284373843748437584376843778437884379843808438184382843838438484385843868438784388843898439084391843928439384394843958439684397843988439984400844018440284403844048440584406844078440884409844108441184412844138441484415844168441784418844198442084421844228442384424844258442684427844288442984430844318443284433844348443584436844378443884439844408444184442844438444484445844468444784448844498445084451844528445384454844558445684457844588445984460844618446284463844648446584466844678446884469844708447184472844738447484475844768447784478844798448084481844828448384484844858448684487844888448984490844918449284493844948449584496844978449884499845008450184502845038450484505845068450784508845098451084511845128451384514845158451684517845188451984520845218452284523845248452584526845278452884529845308453184532845338453484535845368453784538845398454084541845428454384544845458454684547845488454984550845518455284553845548455584556845578455884559845608456184562845638456484565845668456784568845698457084571845728457384574845758457684577845788457984580845818458284583845848458584586845878458884589845908459184592845938459484595845968459784598845998460084601846028460384604846058460684607846088460984610846118461284613846148461584616846178461884619846208462184622846238462484625846268462784628846298463084631846328463384634846358463684637846388463984640846418464284643846448464584646846478464884649846508465184652846538465484655846568465784658846598466084661846628466384664846658466684667846688466984670846718467284673846748467584676846778467884679846808468184682846838468484685846868468784688846898469084691846928469384694846958469684697846988469984700847018470284703847048470584706847078470884709847108471184712847138471484715847168471784718847198472084721847228472384724847258472684727847288472984730847318473284733847348473584736847378473884739847408474184742847438474484745847468474784748847498475084751847528475384754847558475684757847588475984760847618476284763847648476584766847678476884769847708477184772847738477484775847768477784778847798478084781847828478384784847858478684787847888478984790847918479284793847948479584796847978479884799848008480184802848038480484805848068480784808848098481084811848128481384814848158481684817848188481984820848218482284823848248482584826848278482884829848308483184832848338483484835848368483784838848398484084841848428484384844848458484684847848488484984850848518485284853848548485584856848578485884859848608486184862848638486484865848668486784868848698487084871848728487384874848758487684877848788487984880848818488284883848848488584886848878488884889848908489184892848938489484895848968489784898848998490084901849028490384904849058490684907849088490984910849118491284913849148491584916849178491884919849208492184922849238492484925849268492784928849298493084931849328493384934849358493684937849388493984940849418494284943849448494584946849478494884949849508495184952849538495484955849568495784958849598496084961849628496384964849658496684967849688496984970849718497284973849748497584976849778497884979849808498184982849838498484985849868498784988849898499084991849928499384994849958499684997849988499985000850018500285003850048500585006850078500885009850108501185012850138501485015850168501785018850198502085021850228502385024850258502685027850288502985030850318503285033850348503585036850378503885039850408504185042850438504485045850468504785048850498505085051850528505385054850558505685057850588505985060850618506285063850648506585066850678506885069850708507185072850738507485075850768507785078850798508085081850828508385084850858508685087850888508985090850918509285093850948509585096850978509885099851008510185102851038510485105851068510785108851098511085111851128511385114851158511685117851188511985120851218512285123851248512585126851278512885129851308513185132851338513485135851368513785138851398514085141851428514385144851458514685147851488514985150851518515285153851548515585156851578515885159851608516185162851638516485165851668516785168851698517085171851728517385174851758517685177851788517985180851818518285183851848518585186851878518885189851908519185192851938519485195851968519785198851998520085201852028520385204852058520685207852088520985210852118521285213852148521585216852178521885219852208522185222852238522485225852268522785228852298523085231852328523385234852358523685237852388523985240852418524285243852448524585246852478524885249852508525185252852538525485255852568525785258852598526085261852628526385264852658526685267852688526985270852718527285273852748527585276852778527885279852808528185282852838528485285852868528785288852898529085291852928529385294852958529685297852988529985300853018530285303853048530585306853078530885309853108531185312853138531485315853168531785318853198532085321853228532385324853258532685327853288532985330853318533285333853348533585336853378533885339853408534185342853438534485345853468534785348853498535085351853528535385354853558535685357853588535985360853618536285363853648536585366853678536885369853708537185372853738537485375853768537785378853798538085381853828538385384853858538685387853888538985390853918539285393853948539585396853978539885399854008540185402854038540485405854068540785408854098541085411854128541385414854158541685417854188541985420854218542285423854248542585426854278542885429854308543185432854338543485435854368543785438854398544085441854428544385444854458544685447854488544985450854518545285453854548545585456854578545885459854608546185462854638546485465854668546785468854698547085471854728547385474854758547685477854788547985480854818548285483854848548585486854878548885489854908549185492854938549485495854968549785498854998550085501855028550385504855058550685507855088550985510855118551285513855148551585516855178551885519855208552185522855238552485525855268552785528855298553085531855328553385534855358553685537855388553985540855418554285543855448554585546855478554885549855508555185552855538555485555855568555785558855598556085561855628556385564855658556685567855688556985570855718557285573855748557585576855778557885579855808558185582855838558485585855868558785588855898559085591855928559385594855958559685597855988559985600856018560285603856048560585606856078560885609856108561185612856138561485615856168561785618856198562085621856228562385624856258562685627856288562985630856318563285633856348563585636856378563885639856408564185642856438564485645856468564785648856498565085651856528565385654856558565685657856588565985660856618566285663856648566585666856678566885669856708567185672856738567485675856768567785678856798568085681856828568385684856858568685687856888568985690856918569285693856948569585696856978569885699857008570185702857038570485705857068570785708857098571085711857128571385714857158571685717857188571985720857218572285723857248572585726857278572885729857308573185732857338573485735857368573785738857398574085741857428574385744857458574685747857488574985750857518575285753857548575585756857578575885759857608576185762857638576485765857668576785768857698577085771857728577385774857758577685777857788577985780857818578285783857848578585786857878578885789857908579185792857938579485795857968579785798857998580085801858028580385804858058580685807858088580985810858118581285813858148581585816858178581885819858208582185822858238582485825858268582785828858298583085831858328583385834858358583685837858388583985840858418584285843858448584585846858478584885849858508585185852858538585485855858568585785858858598586085861858628586385864858658586685867858688586985870858718587285873858748587585876858778587885879858808588185882858838588485885858868588785888858898589085891858928589385894858958589685897858988589985900859018590285903859048590585906859078590885909859108591185912859138591485915859168591785918859198592085921859228592385924859258592685927859288592985930859318593285933859348593585936859378593885939859408594185942859438594485945859468594785948859498595085951859528595385954859558595685957859588595985960859618596285963859648596585966859678596885969859708597185972859738597485975859768597785978859798598085981859828598385984859858598685987859888598985990859918599285993859948599585996859978599885999860008600186002860038600486005860068600786008860098601086011860128601386014860158601686017860188601986020860218602286023860248602586026860278602886029860308603186032860338603486035860368603786038860398604086041860428604386044860458604686047860488604986050860518605286053860548605586056860578605886059860608606186062860638606486065860668606786068860698607086071860728607386074860758607686077860788607986080860818608286083860848608586086860878608886089860908609186092860938609486095860968609786098860998610086101861028610386104861058610686107861088610986110861118611286113861148611586116861178611886119861208612186122861238612486125861268612786128861298613086131861328613386134861358613686137861388613986140861418614286143861448614586146861478614886149861508615186152861538615486155861568615786158861598616086161861628616386164861658616686167861688616986170861718617286173861748617586176861778617886179861808618186182861838618486185861868618786188861898619086191861928619386194861958619686197861988619986200862018620286203862048620586206862078620886209862108621186212862138621486215862168621786218862198622086221862228622386224862258622686227862288622986230862318623286233862348623586236862378623886239862408624186242862438624486245862468624786248862498625086251862528625386254862558625686257862588625986260862618626286263862648626586266862678626886269862708627186272862738627486275862768627786278862798628086281862828628386284862858628686287862888628986290862918629286293862948629586296862978629886299863008630186302863038630486305863068630786308863098631086311863128631386314863158631686317863188631986320863218632286323863248632586326863278632886329863308633186332863338633486335863368633786338863398634086341863428634386344863458634686347863488634986350863518635286353863548635586356863578635886359863608636186362863638636486365863668636786368863698637086371863728637386374863758637686377863788637986380863818638286383863848638586386863878638886389863908639186392863938639486395863968639786398863998640086401864028640386404864058640686407864088640986410864118641286413864148641586416864178641886419864208642186422864238642486425864268642786428864298643086431864328643386434864358643686437864388643986440864418644286443864448644586446864478644886449864508645186452864538645486455864568645786458864598646086461864628646386464864658646686467864688646986470864718647286473864748647586476864778647886479864808648186482864838648486485864868648786488864898649086491864928649386494864958649686497864988649986500865018650286503865048650586506865078650886509865108651186512865138651486515865168651786518865198652086521865228652386524865258652686527865288652986530865318653286533865348653586536865378653886539865408654186542865438654486545865468654786548865498655086551865528655386554865558655686557865588655986560865618656286563865648656586566865678656886569865708657186572865738657486575865768657786578865798658086581865828658386584865858658686587865888658986590865918659286593865948659586596865978659886599866008660186602866038660486605866068660786608866098661086611866128661386614866158661686617866188661986620866218662286623866248662586626866278662886629866308663186632866338663486635866368663786638866398664086641866428664386644866458664686647866488664986650866518665286653866548665586656866578665886659866608666186662866638666486665866668666786668866698667086671866728667386674866758667686677866788667986680866818668286683866848668586686866878668886689866908669186692866938669486695866968669786698866998670086701867028670386704867058670686707867088670986710867118671286713867148671586716867178671886719867208672186722867238672486725867268672786728867298673086731867328673386734867358673686737867388673986740867418674286743867448674586746867478674886749867508675186752867538675486755867568675786758867598676086761867628676386764867658676686767867688676986770867718677286773867748677586776867778677886779867808678186782867838678486785867868678786788867898679086791867928679386794867958679686797867988679986800868018680286803868048680586806868078680886809868108681186812868138681486815868168681786818868198682086821868228682386824868258682686827868288682986830868318683286833868348683586836868378683886839868408684186842868438684486845868468684786848868498685086851868528685386854868558685686857868588685986860868618686286863868648686586866868678686886869868708687186872868738687486875868768687786878868798688086881868828688386884868858688686887868888688986890868918689286893868948689586896868978689886899869008690186902869038690486905869068690786908869098691086911869128691386914869158691686917869188691986920869218692286923869248692586926869278692886929869308693186932869338693486935869368693786938869398694086941869428694386944869458694686947869488694986950869518695286953869548695586956869578695886959869608696186962869638696486965869668696786968869698697086971869728697386974869758697686977869788697986980869818698286983869848698586986869878698886989869908699186992869938699486995869968699786998869998700087001870028700387004870058700687007870088700987010870118701287013870148701587016870178701887019870208702187022870238702487025870268702787028870298703087031870328703387034870358703687037870388703987040870418704287043870448704587046870478704887049870508705187052870538705487055870568705787058870598706087061870628706387064870658706687067870688706987070870718707287073870748707587076870778707887079870808708187082870838708487085870868708787088870898709087091870928709387094870958709687097870988709987100871018710287103871048710587106871078710887109871108711187112871138711487115871168711787118871198712087121871228712387124871258712687127871288712987130871318713287133871348713587136871378713887139871408714187142871438714487145871468714787148871498715087151871528715387154871558715687157871588715987160871618716287163871648716587166871678716887169871708717187172871738717487175871768717787178871798718087181871828718387184871858718687187871888718987190871918719287193871948719587196871978719887199872008720187202872038720487205872068720787208872098721087211872128721387214872158721687217872188721987220872218722287223872248722587226872278722887229872308723187232872338723487235872368723787238872398724087241872428724387244872458724687247872488724987250872518725287253872548725587256872578725887259872608726187262872638726487265872668726787268872698727087271872728727387274872758727687277872788727987280872818728287283872848728587286872878728887289872908729187292872938729487295872968729787298872998730087301873028730387304873058730687307873088730987310873118731287313873148731587316873178731887319873208732187322873238732487325873268732787328873298733087331873328733387334873358733687337873388733987340873418734287343873448734587346873478734887349873508735187352873538735487355873568735787358873598736087361873628736387364873658736687367873688736987370873718737287373873748737587376873778737887379873808738187382873838738487385873868738787388873898739087391873928739387394873958739687397873988739987400874018740287403874048740587406874078740887409874108741187412874138741487415874168741787418874198742087421874228742387424874258742687427874288742987430874318743287433874348743587436874378743887439874408744187442874438744487445874468744787448874498745087451874528745387454874558745687457874588745987460874618746287463874648746587466874678746887469874708747187472874738747487475874768747787478874798748087481874828748387484874858748687487874888748987490874918749287493874948749587496874978749887499875008750187502875038750487505875068750787508875098751087511875128751387514875158751687517875188751987520875218752287523875248752587526875278752887529875308753187532875338753487535875368753787538875398754087541875428754387544875458754687547875488754987550875518755287553875548755587556875578755887559875608756187562875638756487565875668756787568875698757087571875728757387574875758757687577875788757987580875818758287583875848758587586875878758887589875908759187592875938759487595875968759787598875998760087601876028760387604876058760687607876088760987610876118761287613876148761587616876178761887619876208762187622876238762487625876268762787628876298763087631876328763387634876358763687637876388763987640876418764287643876448764587646876478764887649876508765187652876538765487655876568765787658876598766087661876628766387664876658766687667876688766987670876718767287673876748767587676876778767887679876808768187682876838768487685876868768787688876898769087691876928769387694876958769687697876988769987700877018770287703877048770587706877078770887709877108771187712877138771487715877168771787718877198772087721877228772387724877258772687727877288772987730877318773287733877348773587736877378773887739877408774187742877438774487745877468774787748877498775087751877528775387754877558775687757877588775987760877618776287763877648776587766877678776887769877708777187772877738777487775877768777787778877798778087781877828778387784877858778687787877888778987790877918779287793877948779587796877978779887799878008780187802878038780487805878068780787808878098781087811878128781387814878158781687817878188781987820878218782287823878248782587826878278782887829878308783187832878338783487835878368783787838878398784087841878428784387844878458784687847878488784987850878518785287853878548785587856878578785887859878608786187862878638786487865878668786787868878698787087871878728787387874878758787687877878788787987880878818788287883878848788587886878878788887889878908789187892878938789487895878968789787898878998790087901879028790387904879058790687907879088790987910879118791287913879148791587916879178791887919879208792187922879238792487925879268792787928879298793087931879328793387934879358793687937879388793987940879418794287943879448794587946879478794887949879508795187952879538795487955879568795787958879598796087961879628796387964879658796687967879688796987970879718797287973879748797587976879778797887979879808798187982879838798487985879868798787988879898799087991879928799387994879958799687997879988799988000880018800288003880048800588006880078800888009880108801188012880138801488015880168801788018880198802088021880228802388024880258802688027880288802988030880318803288033880348803588036880378803888039880408804188042880438804488045880468804788048880498805088051880528805388054880558805688057880588805988060880618806288063880648806588066880678806888069880708807188072880738807488075880768807788078880798808088081880828808388084880858808688087880888808988090880918809288093880948809588096880978809888099881008810188102881038810488105881068810788108881098811088111881128811388114881158811688117881188811988120881218812288123881248812588126881278812888129881308813188132881338813488135881368813788138881398814088141881428814388144881458814688147881488814988150881518815288153881548815588156881578815888159881608816188162881638816488165881668816788168881698817088171881728817388174881758817688177881788817988180881818818288183881848818588186881878818888189881908819188192881938819488195881968819788198881998820088201882028820388204882058820688207882088820988210882118821288213882148821588216882178821888219882208822188222882238822488225882268822788228882298823088231882328823388234882358823688237882388823988240882418824288243882448824588246882478824888249882508825188252882538825488255882568825788258882598826088261882628826388264882658826688267882688826988270882718827288273882748827588276882778827888279882808828188282882838828488285882868828788288882898829088291882928829388294882958829688297882988829988300883018830288303883048830588306883078830888309883108831188312883138831488315883168831788318883198832088321883228832388324883258832688327883288832988330883318833288333883348833588336883378833888339883408834188342883438834488345883468834788348883498835088351883528835388354883558835688357883588835988360883618836288363883648836588366883678836888369883708837188372883738837488375883768837788378883798838088381883828838388384883858838688387883888838988390883918839288393883948839588396883978839888399884008840188402884038840488405884068840788408884098841088411884128841388414884158841688417884188841988420884218842288423884248842588426884278842888429884308843188432884338843488435884368843788438884398844088441884428844388444884458844688447884488844988450884518845288453884548845588456884578845888459884608846188462884638846488465884668846788468884698847088471884728847388474884758847688477884788847988480884818848288483884848848588486884878848888489884908849188492884938849488495884968849788498884998850088501885028850388504885058850688507885088850988510885118851288513885148851588516885178851888519885208852188522885238852488525885268852788528885298853088531885328853388534885358853688537885388853988540885418854288543885448854588546885478854888549885508855188552885538855488555885568855788558885598856088561885628856388564885658856688567885688856988570885718857288573885748857588576885778857888579885808858188582885838858488585885868858788588885898859088591885928859388594885958859688597885988859988600886018860288603886048860588606886078860888609886108861188612886138861488615886168861788618886198862088621886228862388624886258862688627886288862988630886318863288633886348863588636886378863888639886408864188642886438864488645886468864788648886498865088651886528865388654886558865688657886588865988660886618866288663886648866588666886678866888669886708867188672886738867488675886768867788678886798868088681886828868388684886858868688687886888868988690886918869288693886948869588696886978869888699887008870188702887038870488705887068870788708887098871088711887128871388714887158871688717887188871988720887218872288723887248872588726887278872888729887308873188732887338873488735887368873788738887398874088741887428874388744887458874688747887488874988750887518875288753887548875588756887578875888759887608876188762887638876488765887668876788768887698877088771887728877388774887758877688777887788877988780887818878288783887848878588786887878878888789887908879188792887938879488795887968879788798887998880088801888028880388804888058880688807888088880988810888118881288813888148881588816888178881888819888208882188822888238882488825888268882788828888298883088831888328883388834888358883688837888388883988840888418884288843888448884588846888478884888849888508885188852888538885488855888568885788858888598886088861888628886388864888658886688867888688886988870888718887288873888748887588876888778887888879888808888188882888838888488885888868888788888888898889088891888928889388894888958889688897888988889988900889018890288903889048890588906889078890888909889108891188912889138891488915889168891788918889198892088921889228892388924889258892688927889288892988930889318893288933889348893588936889378893888939889408894188942889438894488945889468894788948889498895088951889528895388954889558895688957889588895988960889618896288963889648896588966889678896888969889708897188972889738897488975889768897788978889798898088981889828898388984889858898688987889888898988990889918899288993889948899588996889978899888999890008900189002890038900489005890068900789008890098901089011890128901389014890158901689017890188901989020890218902289023890248902589026890278902889029890308903189032890338903489035890368903789038890398904089041890428904389044890458904689047890488904989050890518905289053890548905589056890578905889059890608906189062890638906489065890668906789068890698907089071890728907389074890758907689077890788907989080890818908289083890848908589086890878908889089890908909189092890938909489095890968909789098890998910089101891028910389104891058910689107891088910989110891118911289113891148911589116891178911889119891208912189122891238912489125891268912789128891298913089131891328913389134891358913689137891388913989140891418914289143891448914589146891478914889149891508915189152891538915489155891568915789158891598916089161891628916389164891658916689167891688916989170891718917289173891748917589176891778917889179891808918189182891838918489185891868918789188891898919089191891928919389194891958919689197891988919989200892018920289203892048920589206892078920889209892108921189212892138921489215892168921789218892198922089221892228922389224892258922689227892288922989230892318923289233892348923589236892378923889239892408924189242892438924489245892468924789248892498925089251892528925389254892558925689257892588925989260892618926289263892648926589266892678926889269892708927189272892738927489275892768927789278892798928089281892828928389284892858928689287892888928989290892918929289293892948929589296892978929889299893008930189302893038930489305893068930789308893098931089311893128931389314893158931689317893188931989320893218932289323893248932589326893278932889329893308933189332893338933489335893368933789338893398934089341893428934389344893458934689347893488934989350893518935289353893548935589356893578935889359893608936189362893638936489365893668936789368893698937089371893728937389374893758937689377893788937989380893818938289383893848938589386893878938889389893908939189392893938939489395893968939789398893998940089401894028940389404894058940689407894088940989410894118941289413894148941589416894178941889419894208942189422894238942489425894268942789428894298943089431894328943389434894358943689437894388943989440894418944289443894448944589446894478944889449894508945189452894538945489455894568945789458894598946089461894628946389464894658946689467894688946989470894718947289473894748947589476894778947889479894808948189482894838948489485894868948789488894898949089491894928949389494894958949689497894988949989500895018950289503895048950589506895078950889509895108951189512895138951489515895168951789518895198952089521895228952389524895258952689527895288952989530895318953289533895348953589536895378953889539895408954189542895438954489545895468954789548895498955089551895528955389554895558955689557895588955989560895618956289563895648956589566895678956889569895708957189572895738957489575895768957789578895798958089581895828958389584895858958689587895888958989590895918959289593895948959589596895978959889599896008960189602896038960489605896068960789608896098961089611896128961389614896158961689617896188961989620896218962289623896248962589626896278962889629896308963189632896338963489635896368963789638896398964089641896428964389644896458964689647896488964989650896518965289653896548965589656896578965889659896608966189662896638966489665896668966789668896698967089671896728967389674896758967689677896788967989680896818968289683896848968589686896878968889689896908969189692896938969489695896968969789698896998970089701897028970389704897058970689707897088970989710897118971289713897148971589716897178971889719897208972189722897238972489725897268972789728897298973089731897328973389734897358973689737897388973989740897418974289743897448974589746897478974889749897508975189752897538975489755897568975789758897598976089761897628976389764897658976689767897688976989770897718977289773897748977589776897778977889779897808978189782897838978489785897868978789788897898979089791897928979389794897958979689797897988979989800898018980289803898048980589806898078980889809898108981189812898138981489815898168981789818898198982089821898228982389824898258982689827898288982989830898318983289833898348983589836898378983889839898408984189842898438984489845898468984789848898498985089851898528985389854898558985689857898588985989860898618986289863898648986589866898678986889869898708987189872898738987489875898768987789878898798988089881898828988389884898858988689887898888988989890898918989289893898948989589896898978989889899899008990189902899038990489905899068990789908899098991089911899128991389914899158991689917899188991989920899218992289923899248992589926899278992889929899308993189932899338993489935899368993789938899398994089941899428994389944899458994689947899488994989950899518995289953899548995589956899578995889959899608996189962899638996489965899668996789968899698997089971899728997389974899758997689977899788997989980899818998289983899848998589986899878998889989899908999189992899938999489995899968999789998899999000090001900029000390004900059000690007900089000990010900119001290013900149001590016900179001890019900209002190022900239002490025900269002790028900299003090031900329003390034900359003690037900389003990040900419004290043900449004590046900479004890049900509005190052900539005490055900569005790058900599006090061900629006390064900659006690067900689006990070900719007290073900749007590076900779007890079900809008190082900839008490085900869008790088900899009090091900929009390094900959009690097900989009990100901019010290103901049010590106901079010890109901109011190112901139011490115901169011790118901199012090121901229012390124901259012690127901289012990130901319013290133901349013590136901379013890139901409014190142901439014490145901469014790148901499015090151901529015390154901559015690157901589015990160901619016290163901649016590166901679016890169901709017190172901739017490175901769017790178901799018090181901829018390184901859018690187901889018990190901919019290193901949019590196901979019890199902009020190202902039020490205902069020790208902099021090211902129021390214902159021690217902189021990220902219022290223902249022590226902279022890229902309023190232902339023490235902369023790238902399024090241902429024390244902459024690247902489024990250902519025290253902549025590256902579025890259902609026190262902639026490265902669026790268902699027090271902729027390274902759027690277902789027990280902819028290283902849028590286902879028890289902909029190292902939029490295902969029790298902999030090301903029030390304903059030690307903089030990310903119031290313903149031590316903179031890319903209032190322903239032490325903269032790328903299033090331903329033390334903359033690337903389033990340903419034290343903449034590346903479034890349903509035190352903539035490355903569035790358903599036090361903629036390364903659036690367903689036990370903719037290373903749037590376903779037890379903809038190382903839038490385903869038790388903899039090391903929039390394903959039690397903989039990400904019040290403904049040590406904079040890409904109041190412904139041490415904169041790418904199042090421904229042390424904259042690427904289042990430904319043290433904349043590436904379043890439904409044190442904439044490445904469044790448904499045090451904529045390454904559045690457904589045990460904619046290463904649046590466904679046890469904709047190472904739047490475904769047790478904799048090481904829048390484904859048690487904889048990490904919049290493904949049590496904979049890499905009050190502905039050490505905069050790508905099051090511905129051390514905159051690517905189051990520905219052290523905249052590526905279052890529905309053190532905339053490535905369053790538905399054090541905429054390544905459054690547905489054990550905519055290553905549055590556905579055890559905609056190562905639056490565905669056790568905699057090571905729057390574905759057690577905789057990580905819058290583905849058590586905879058890589905909059190592905939059490595905969059790598905999060090601906029060390604906059060690607906089060990610906119061290613906149061590616906179061890619906209062190622906239062490625906269062790628906299063090631906329063390634906359063690637906389063990640906419064290643906449064590646906479064890649906509065190652906539065490655906569065790658906599066090661906629066390664906659066690667906689066990670906719067290673906749067590676906779067890679906809068190682906839068490685906869068790688906899069090691906929069390694906959069690697906989069990700907019070290703907049070590706907079070890709907109071190712907139071490715907169071790718907199072090721907229072390724907259072690727907289072990730907319073290733907349073590736907379073890739907409074190742907439074490745907469074790748907499075090751907529075390754907559075690757907589075990760907619076290763907649076590766907679076890769907709077190772907739077490775907769077790778907799078090781907829078390784907859078690787907889078990790907919079290793907949079590796907979079890799908009080190802908039080490805908069080790808908099081090811908129081390814908159081690817908189081990820908219082290823908249082590826908279082890829908309083190832908339083490835908369083790838908399084090841908429084390844908459084690847908489084990850908519085290853908549085590856908579085890859908609086190862908639086490865908669086790868908699087090871908729087390874908759087690877908789087990880908819088290883908849088590886908879088890889908909089190892908939089490895908969089790898908999090090901909029090390904909059090690907909089090990910909119091290913909149091590916909179091890919909209092190922909239092490925909269092790928909299093090931909329093390934909359093690937909389093990940909419094290943909449094590946909479094890949909509095190952909539095490955909569095790958909599096090961909629096390964909659096690967909689096990970909719097290973909749097590976909779097890979909809098190982909839098490985909869098790988909899099090991909929099390994909959099690997909989099991000910019100291003910049100591006910079100891009910109101191012910139101491015910169101791018910199102091021910229102391024910259102691027910289102991030910319103291033910349103591036910379103891039910409104191042910439104491045910469104791048910499105091051910529105391054910559105691057910589105991060910619106291063910649106591066910679106891069910709107191072910739107491075910769107791078910799108091081910829108391084910859108691087910889108991090910919109291093910949109591096910979109891099911009110191102911039110491105911069110791108911099111091111911129111391114911159111691117911189111991120911219112291123911249112591126911279112891129911309113191132911339113491135911369113791138911399114091141911429114391144911459114691147911489114991150911519115291153911549115591156911579115891159911609116191162911639116491165911669116791168911699117091171911729117391174911759117691177911789117991180911819118291183911849118591186911879118891189911909119191192911939119491195911969119791198911999120091201912029120391204912059120691207912089120991210912119121291213912149121591216912179121891219912209122191222912239122491225912269122791228
  1. diff -u --recursive --new-file vips-7.38.5-vanilla/configure.ac vips-7.38.5/configure.ac
  2. --- vips-7.38.5-vanilla/configure.ac 2014-07-17 23:48:36.205794473 -0400
  3. +++ vips-7.38.5/configure.ac 2014-07-17 23:49:32.773792981 -0400
  4. @@ -184,7 +184,6 @@
  5. AC_PROG_AWK
  6. AC_PROG_CC
  7. AC_PROG_CC_STDC
  8. -AC_PROG_CXX
  9. AC_C_CONST
  10. AC_C_RESTRICT
  11. AC_PROG_RANLIB
  12. @@ -192,19 +191,6 @@
  13. AC_PROG_LN_S
  14. AM_WITH_DMALLOC
  15. -# vips_PROG_CXX_WORKS
  16. -# Check whether the C++ compiler works.
  17. -AC_DEFUN([vips_PROG_CXX_WORKS],
  18. - [AC_REQUIRE([AC_PROG_CXX])dnl
  19. - AC_CACHE_CHECK([whether the C++ compiler works],
  20. - [vips_cv_prog_cxx_works],
  21. - [AC_LANG_PUSH([C++])
  22. - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
  23. - [vips_cv_prog_cxx_works=yes],
  24. - [vips_cv_prog_cxx_works=no])
  25. - AC_LANG_POP([C++])])
  26. -])
  27. -
  28. # option to build without C++
  29. # handy for some embedded applications
  30. # also, including C++ source causes link problems on some
  31. @@ -212,22 +198,8 @@
  32. AC_ARG_ENABLE(cxx,
  33. AS_HELP_STRING([--enable-cxx], [build C++ components (default: test)]))
  34. -if test x"$enable_cxx" != x"no"; then
  35. - vips_PROG_CXX_WORKS
  36. - if test x"$vips_cv_prog_cxx_works" = x"yes"; then
  37. - AC_DEFINE(ENABLE_CXX,1,[build C++ components])
  38. - AM_CONDITIONAL(ENABLE_CXX, true)
  39. - # need -lstdc++ for (eg.) the C++ format loaders
  40. - # this gets added to vips.pc to help mingw and friends link programs
  41. - # using libvips
  42. - VIPS_CXX_LIBS="-lstdc++"
  43. - enable_cxx=yes
  44. - fi
  45. -fi
  46. -
  47. if test x"$enable_cxx" != x"yes"; then
  48. AM_CONDITIONAL(ENABLE_CXX, false)
  49. - VIPS_CXX_LIBS=""
  50. enable_cxx=no
  51. fi
  52. @@ -688,7 +660,6 @@
  53. AC_SUBST(VIPS_CFLAGS)
  54. AC_SUBST(VIPS_INCLUDES)
  55. AC_SUBST(VIPS_LIBS)
  56. -AC_SUBST(VIPS_CXX_LIBS)
  57. AC_SUBST(PACKAGES_USED)
  58. AC_OUTPUT([
  59. @@ -700,7 +671,6 @@
  60. libvips/include/vips/Makefile
  61. libvips/Makefile
  62. libvips/arithmetic/Makefile
  63. - libvips/cimg/Makefile
  64. libvips/colour/Makefile
  65. libvips/conversion/Makefile
  66. libvips/convolution/Makefile
  67. @@ -715,9 +685,6 @@
  68. libvips/create/Makefile
  69. libvips/resample/Makefile
  70. libvips/video/Makefile
  71. - libvipsCC/include/Makefile
  72. - libvipsCC/include/vips/Makefile
  73. - libvipsCC/Makefile
  74. tools/Makefile
  75. tools/batch_crop
  76. tools/batch_image_convert
  77. @@ -725,7 +692,6 @@
  78. tools/light_correct
  79. tools/shrink_width
  80. swig/Makefile
  81. - swig/vipsCC/Makefile
  82. swig/python/setup.py
  83. man/Makefile
  84. doc/Makefile
  85. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/cimg.cpp vips-7.38.5/libvips/cimg/cimg.cpp
  86. --- vips-7.38.5-vanilla/libvips/cimg/cimg.cpp 2014-07-17 23:48:36.231794473 -0400
  87. +++ vips-7.38.5/libvips/cimg/cimg.cpp 1969-12-31 19:00:00.000000000 -0500
  88. @@ -1,300 +0,0 @@
  89. -/* Pass VIPS images through CImg
  90. - *
  91. - * JC, 15/10/07
  92. - * 29/4/10
  93. - * - oop, should be smalltile, probably
  94. - * - tiny cleanups
  95. - * - gtkdoc
  96. - */
  97. -
  98. -/*
  99. -
  100. - This file is part of VIPS.
  101. -
  102. - VIPS is free software; you can redistribute it and/or modify
  103. - it under the terms of the GNU Lesser General Public License as published by
  104. - the Free Software Foundation; either version 2 of the License, or
  105. - (at your option) any later version.
  106. -
  107. - This program is distributed in the hope that it will be useful,
  108. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  109. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  110. - GNU Lesser General Public License for more details.
  111. -
  112. - You should have received a copy of the GNU Lesser General Public License
  113. - along with this program; if not, write to the Free Software
  114. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  115. - 02110-1301 USA
  116. -
  117. - */
  118. -
  119. -/*
  120. -
  121. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  122. -
  123. - */
  124. -
  125. -#ifdef HAVE_CONFIG_H
  126. -#include <config.h>
  127. -#endif /*HAVE_CONFIG_H*/
  128. -#include <vips/intl.h>
  129. -
  130. -#include <vips/vips.h>
  131. -#include <vips/internal.h>
  132. -
  133. -/* CImg needs to call pthread directly, this is the preproc magic they
  134. - * prefer.
  135. - */
  136. -#if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \
  137. - || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \
  138. - || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \
  139. - || defined(__sgi)
  140. - #include <pthread.h>
  141. -#endif
  142. -
  143. -#include "CImg.h"
  144. -using namespace cimg_library;
  145. -
  146. -/* Save params here.
  147. - */
  148. -struct Greyc {
  149. - IMAGE *in;
  150. - IMAGE *out;
  151. - IMAGE *mask;
  152. - IMAGE **arry;
  153. -
  154. - int iterations;
  155. - float amplitude;
  156. - float sharpness;
  157. - float anisotropy;
  158. - float alpha;
  159. - float sigma;
  160. - float dl;
  161. - float da;
  162. - float gauss_prec;
  163. - int interpolation;
  164. - bool fast_approx;
  165. -};
  166. -
  167. -// copy part of a vips region into a cimg
  168. -template<typename T> static CImg<T> *
  169. -vips_to_cimg( REGION *in, Rect *area )
  170. -{
  171. - IMAGE *im = in->im;
  172. - CImg<T> *img = new CImg<T>( area->width, area->height, 1, im->Bands );
  173. -
  174. - for( int y = 0; y < area->height; y++ ) {
  175. - T *p = (T *) IM_REGION_ADDR( in, area->left, area->top + y );
  176. -
  177. - for( int x = 0; x < area->width; x++ ) {
  178. - for( int z = 0; z < im->Bands; z++ )
  179. - (*img)( x, y, z ) = p[z];
  180. -
  181. - p += im->Bands;
  182. - }
  183. - }
  184. -
  185. - return( img );
  186. -}
  187. -
  188. -// write a CImg to a vips region
  189. -// fill out->valid, img has pixels in img_rect
  190. -template<typename T> static void
  191. -cimg_to_vips( CImg<T> *img, Rect *img_rect, REGION *out )
  192. -{
  193. - IMAGE *im = out->im;
  194. - Rect *valid = &out->valid;
  195. -
  196. - g_assert( im_rect_includesrect( img_rect, valid ) );
  197. -
  198. - int x_off = valid->left - img_rect->left;
  199. - int y_off = valid->top - img_rect->top;
  200. -
  201. - for( int y = 0; y < valid->height; y++ ) {
  202. - T *p = (T *) IM_REGION_ADDR( out, valid->left, valid->top + y );
  203. -
  204. - for( int x = 0; x < valid->width; x++ ) {
  205. - for( int z = 0; z < im->Bands; z++ )
  206. - p[z] = static_cast<T>( (*img)(
  207. - x + x_off, y + y_off, z ) );
  208. -
  209. - p += im->Bands;
  210. - }
  211. - }
  212. -}
  213. -
  214. -template<typename T> static int
  215. -greyc_gen( REGION *out, REGION **in, IMAGE **arry, Greyc *greyc )
  216. -{
  217. - static const float gfact = (sizeof( T ) == 2) ? 1.0 / 256 : 1.0;
  218. - static const int tile_border = 4;
  219. -
  220. - Rect *ir = &out->valid;
  221. - Rect need;
  222. - Rect image;
  223. -
  224. - CImg<T> *img;
  225. - CImg<unsigned char> *msk;
  226. -
  227. - need = *ir;
  228. - im_rect_marginadjust( &need, tile_border );
  229. - image.left = 0;
  230. - image.top = 0;
  231. - image.width = in[0]->im->Xsize;
  232. - image.height = in[0]->im->Ysize;
  233. - im_rect_intersectrect( &need, &image, &need );
  234. - if( im_prepare( in[0], &need ) )
  235. - return( -1 );
  236. - if( in[1] && im_prepare( in[1], &need ) )
  237. - return( -1 );
  238. -
  239. - img = NULL;
  240. - msk = NULL;
  241. -
  242. - try {
  243. - img = vips_to_cimg<T>( in[0], &need );
  244. - if( in[1] )
  245. - msk = vips_to_cimg<unsigned char>( in[1], &need );
  246. - else
  247. - // empty mask
  248. - msk = new CImg<unsigned char>();
  249. -
  250. - for( int i = 0; i < greyc->iterations; i++ )
  251. - img->blur_anisotropic( *msk,
  252. - greyc->amplitude, greyc->sharpness,
  253. - greyc->anisotropy,
  254. - greyc->alpha, greyc->sigma, greyc->dl,
  255. - greyc->da, greyc->gauss_prec,
  256. - greyc->interpolation, greyc->fast_approx,
  257. - gfact );
  258. -
  259. - cimg_to_vips<T>( img, &need, out );
  260. - }
  261. - catch( CImgException e ) {
  262. - if( img )
  263. - delete( img );
  264. - if( msk )
  265. - delete( msk );
  266. -
  267. - im_error( "GREYCstoration", "%s", e.message );
  268. -
  269. - return( -1 );
  270. - }
  271. -
  272. - if( img )
  273. - delete( img );
  274. - if( msk )
  275. - delete( msk );
  276. -
  277. - return( 0 );
  278. -}
  279. -
  280. -// Hmm, strange double-cast needed
  281. -typedef int (*generate_fn)( REGION *out, REGION **in,
  282. - IMAGE **im, Greyc *greyc );
  283. -
  284. -// as a plain C function
  285. -/**
  286. - * im_greyc_mask:
  287. - * @in: input image
  288. - * @out: output image
  289. - * @mask: input mask
  290. - * @iterations: number of iterations to perform (eg. 1)
  291. - * @amplitude: scaling factor (eg. 40)
  292. - * @sharpness: degree of sharpening to apply (eg. 0.9)
  293. - * @anisotropy: how much to blur along lines (eg. 0.15)
  294. - * @alpha: blur by this much before calculating geometry (eg. 0.6)
  295. - * @sigma: blur geometry by this much (eg. 1.1)
  296. - * @dl: spatial integration step (eg. 0.8)
  297. - * @da: angular integration step (eg. 30)
  298. - * @gauss_prec: precision (eg. 2)
  299. - * @interpolation: interpolation (eg. 0 for nearest-neighbour)
  300. - *
  301. - * This operation calls the blur_anisotropic() method of the CImag image
  302. - * processing library. It is handy for denoising images and for upscaling.
  303. - *
  304. - * See also: im_conv().
  305. - *
  306. - * Returns: 0 on success, -1 on error
  307. - */
  308. -int
  309. -im_greyc_mask( IMAGE *in, IMAGE *out, IMAGE *mask,
  310. - int iterations,
  311. - float amplitude, float sharpness, float anisotropy,
  312. - float alpha, float sigma,
  313. - float dl, float da, float gauss_prec,
  314. - int interpolation, int fast_approx )
  315. -{
  316. - IMAGE **arry;
  317. - Greyc *greyc;
  318. -
  319. - if( im_piocheck( in, out ) ||
  320. - im_check_uncoded( "im_greyc_mask", in ) ||
  321. - im_check_u8or16orf( "im_greyc_mask", in ) )
  322. - return( -1 );
  323. - if( mask ) {
  324. - if( im_pincheck( mask ) ||
  325. - im_check_uncoded( "im_greyc_mask", mask ) ||
  326. - im_check_size_same( "im_greyc_mask", in, mask ) ||
  327. - im_check_format( "im_greyc_mask",
  328. - mask, IM_BANDFMT_UCHAR ) )
  329. - return( -1 );
  330. - }
  331. - if( im_cp_desc( out, in ) ||
  332. - !(arry = im_allocate_input_array( out, in, mask, NULL )) ||
  333. - !(greyc = IM_NEW( out, Greyc )) ||
  334. - im_demand_hint( out, IM_SMALLTILE, in, NULL ) )
  335. - return( -1 );
  336. -
  337. - greyc->in = in;
  338. - greyc->out = out;
  339. - greyc->mask = mask;
  340. - greyc->arry = arry;
  341. - greyc->iterations = iterations;
  342. - greyc->amplitude = amplitude;
  343. - greyc->sharpness = sharpness;
  344. - greyc->anisotropy = anisotropy;
  345. - greyc->alpha = alpha;
  346. - greyc->sigma = sigma;
  347. - greyc->dl = dl;
  348. - greyc->da = da;
  349. - greyc->gauss_prec = gauss_prec;
  350. - greyc->interpolation = interpolation;
  351. - greyc->fast_approx = fast_approx;
  352. -
  353. - switch( in->BandFmt ) {
  354. - case IM_BANDFMT_UCHAR:
  355. - if( im_generate( out,
  356. - im_start_many,
  357. - // double-cast to give g++ enough context to expand the
  358. - // template correctly
  359. - (im_generate_fn) (
  360. - (generate_fn) greyc_gen<unsigned char>),
  361. - im_stop_many, arry, greyc ) )
  362. - return( -1 );
  363. - break;
  364. -
  365. - case IM_BANDFMT_USHORT:
  366. - if( im_generate( out,
  367. - im_start_many,
  368. - (im_generate_fn) (
  369. - (generate_fn) greyc_gen<unsigned short>),
  370. - im_stop_many, arry, greyc ) )
  371. - return( -1 );
  372. - break;
  373. -
  374. - case IM_BANDFMT_FLOAT:
  375. - if( im_generate( out,
  376. - im_start_many,
  377. - (im_generate_fn) (
  378. - (generate_fn) greyc_gen<float>),
  379. - im_stop_many, arry, greyc ) )
  380. - return( -1 );
  381. - break;
  382. -
  383. - default:
  384. - g_assert( 0 );
  385. - }
  386. -
  387. - return( 0 );
  388. -}
  389. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/cimg_dispatch.c vips-7.38.5/libvips/cimg/cimg_dispatch.c
  390. --- vips-7.38.5-vanilla/libvips/cimg/cimg_dispatch.c 2014-07-17 23:48:36.230794473 -0400
  391. +++ vips-7.38.5/libvips/cimg/cimg_dispatch.c 1969-12-31 19:00:00.000000000 -0500
  392. @@ -1,171 +0,0 @@
  393. -/* Function dispatch tables for cimg wrappers.
  394. - */
  395. -
  396. -/*
  397. -
  398. - This file is part of VIPS.
  399. -
  400. - VIPS is free software; you can redistribute it and/or modify
  401. - it under the terms of the GNU Lesser General Public License as published by
  402. - the Free Software Foundation; either version 2 of the License, or
  403. - (at your option) any later version.
  404. -
  405. - This program is distributed in the hope that it will be useful,
  406. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  407. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  408. - GNU Lesser General Public License for more details.
  409. -
  410. - You should have received a copy of the GNU Lesser General Public License
  411. - along with this program; if not, write to the Free Software
  412. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  413. - 02110-1301 USA
  414. -
  415. - */
  416. -
  417. -/*
  418. -
  419. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  420. -
  421. - */
  422. -
  423. -#ifdef HAVE_CONFIG_H
  424. -#include <config.h>
  425. -#endif /*HAVE_CONFIG_H*/
  426. -#include <vips/intl.h>
  427. -
  428. -#include <stdio.h>
  429. -
  430. -#include <vips/vips.h>
  431. -
  432. -/**
  433. - * SECTION: cimg_funcs
  434. - * @short_description: expose operations from the CImg library, mostly noise
  435. - * removal
  436. - * @stability: Stable
  437. - * @include: vips/vips.h
  438. - *
  439. - * The GREYCstoration filter.
  440. - */
  441. -
  442. -static int
  443. -greyc_vec( im_object *argv )
  444. -{
  445. - IMAGE *src = (IMAGE *) argv[0];
  446. - IMAGE *dst = (IMAGE *) argv[1];
  447. -
  448. - int iterations = *((int *) argv[2]);
  449. - double amplitude = *((double *) argv[3]);
  450. - double sharpness = *((double *) argv[4]);
  451. - double anisotropy = *((double *) argv[5]);
  452. - double alpha = *((double *) argv[6]);
  453. - double sigma = *((double *) argv[7]);
  454. - double dl = *((double *) argv[8]);
  455. - double da = *((double *) argv[9]);
  456. - double gauss_prec = *((double *) argv[10]);
  457. - int interpolation = *((int *) argv[11]);
  458. - int fast_approx = *((int *) argv[12]);
  459. -
  460. - if( im_greyc_mask( src, dst, NULL,
  461. - iterations,
  462. - amplitude, sharpness, anisotropy,
  463. - alpha, sigma,
  464. - dl, da, gauss_prec,
  465. - interpolation, fast_approx ) )
  466. - return( -1 );
  467. -
  468. - return( 0 );
  469. -}
  470. -
  471. -static im_arg_desc greyc_arg_types[] = {
  472. - IM_INPUT_IMAGE( "src" ),
  473. - IM_OUTPUT_IMAGE( "dst" ),
  474. - IM_INPUT_INT( "iterations" ),
  475. - IM_INPUT_DOUBLE( "amplitude" ),
  476. - IM_INPUT_DOUBLE( "sharpness" ),
  477. - IM_INPUT_DOUBLE( "anisotropy" ),
  478. - IM_INPUT_DOUBLE( "alpha" ),
  479. - IM_INPUT_DOUBLE( "sigma" ),
  480. - IM_INPUT_DOUBLE( "dl" ),
  481. - IM_INPUT_DOUBLE( "da" ),
  482. - IM_INPUT_DOUBLE( "gauss_prec" ),
  483. - IM_INPUT_INT( "interpolation" ),
  484. - IM_INPUT_INT( "fast_approx" )
  485. -};
  486. -
  487. -static im_function greyc_desc = {
  488. - "im_greyc", /* Name */
  489. - "noise-removing filter", /* Description */
  490. - (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */
  491. - greyc_vec, /* Dispatch function */
  492. - IM_NUMBER( greyc_arg_types ), /* Size of arg list */
  493. - greyc_arg_types /* Arg list */
  494. -};
  495. -
  496. -static int
  497. -greyc_mask_vec( im_object *argv )
  498. -{
  499. - IMAGE *src = (IMAGE *) argv[0];
  500. - IMAGE *dst = (IMAGE *) argv[1];
  501. - IMAGE *mask = (IMAGE *) argv[2];
  502. -
  503. - int iterations = *((int *) argv[3]);
  504. - double amplitude = *((double *) argv[4]);
  505. - double sharpness = *((double *) argv[5]);
  506. - double anisotropy = *((double *) argv[6]);
  507. - double alpha = *((double *) argv[7]);
  508. - double sigma = *((double *) argv[8]);
  509. - double dl = *((double *) argv[9]);
  510. - double da = *((double *) argv[10]);
  511. - double gauss_prec = *((double *) argv[11]);
  512. - int interpolation = *((int *) argv[12]);
  513. - int fast_approx = *((int *) argv[13]);
  514. -
  515. - if( im_greyc_mask( src, dst, mask,
  516. - iterations,
  517. - amplitude, sharpness, anisotropy,
  518. - alpha, sigma,
  519. - dl, da, gauss_prec,
  520. - interpolation, fast_approx ) )
  521. - return( -1 );
  522. -
  523. - return( 0 );
  524. -}
  525. -
  526. -static im_arg_desc greyc_mask_arg_types[] = {
  527. - IM_INPUT_IMAGE( "src" ),
  528. - IM_OUTPUT_IMAGE( "dst" ),
  529. - IM_INPUT_IMAGE( "mask" ),
  530. - IM_INPUT_INT( "iterations" ),
  531. - IM_INPUT_DOUBLE( "amplitude" ),
  532. - IM_INPUT_DOUBLE( "sharpness" ),
  533. - IM_INPUT_DOUBLE( "anisotropy" ),
  534. - IM_INPUT_DOUBLE( "alpha" ),
  535. - IM_INPUT_DOUBLE( "sigma" ),
  536. - IM_INPUT_DOUBLE( "dl" ),
  537. - IM_INPUT_DOUBLE( "da" ),
  538. - IM_INPUT_DOUBLE( "gauss_prec" ),
  539. - IM_INPUT_INT( "interpolation" ),
  540. - IM_INPUT_INT( "fast_approx" )
  541. -};
  542. -
  543. -static im_function greyc_mask_desc = {
  544. - "im_greyc_mask", /* Name */
  545. - "noise-removing filter, with a mask", /* Description */
  546. - (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */
  547. - greyc_mask_vec, /* Dispatch function */
  548. - IM_NUMBER( greyc_mask_arg_types ),/* Size of arg list */
  549. - greyc_mask_arg_types /* Arg list */
  550. -};
  551. -
  552. -static im_function *function_list[] = {
  553. - &greyc_desc,
  554. - &greyc_mask_desc
  555. -};
  556. -
  557. -/* Package of functions.
  558. - */
  559. -im_package im__cimg = {
  560. - "cimg",
  561. - IM_NUMBER( function_list ),
  562. - function_list
  563. -};
  564. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/CImg.h vips-7.38.5/libvips/cimg/CImg.h
  565. --- vips-7.38.5-vanilla/libvips/cimg/CImg.h 2014-07-17 23:48:36.230794473 -0400
  566. +++ vips-7.38.5/libvips/cimg/CImg.h 1969-12-31 19:00:00.000000000 -0500
  567. @@ -1,22228 +0,0 @@
  568. -/*
  569. - #
  570. - # File : CImg.h
  571. - #
  572. - # Description : The C++ Template Image Processing Library
  573. - # ( http://cimg.sourceforge.net )
  574. - #
  575. - # Copyright : David Tschumperle
  576. - # ( http://www.greyc.ensicaen.fr/~dtschump/ )
  577. - #
  578. - # License : CeCILL-C
  579. - #
  580. - # This software is governed by the CeCILL-C license under French law and
  581. - # abiding by the rules of distribution of free software. You can use,
  582. - # modify and or redistribute the software under the terms of the CeCILL-C
  583. - # license as circulated by CEA, CNRS and INRIA at the following URL
  584. - # "http://www.cecill.info".
  585. - #
  586. - # As a counterpart to the access to the source code and rights to copy,
  587. - # modify and redistribute granted by the license, users are provided only
  588. - # with a limited warranty and the software's author, the holder of the
  589. - # economic rights, and the successive licensors have only limited
  590. - # liability.
  591. - #
  592. - # In this respect, the user's attention is drawn to the risks associated
  593. - # with loading, using, modifying and/or developing or reproducing the
  594. - # software by the user in light of its specific status of free software,
  595. - # that may mean that it is complicated to manipulate, and that also
  596. - # therefore means that it is reserved for developers and experienced
  597. - # professionals having in-depth computer knowledge. Users are therefore
  598. - # encouraged to load and test the software's suitability as regards their
  599. - # requirements in conditions enabling the security of their systems and/or
  600. - # data to be ensured and, more generally, to use and operate it in the
  601. - # same conditions as regards security.
  602. - #
  603. - # The fact that you are presently reading this means that you have had
  604. - # knowledge of the CeCILL-C license and that you accept its terms.
  605. - #
  606. - */
  607. -#ifndef cimg_version
  608. -#define cimg_version 1.20
  609. -
  610. -// Detect Microsoft VC++ 6.0 compiler to get some workarounds afterwards.
  611. -#if defined(_MSC_VER) && _MSC_VER<1300
  612. -#define cimg_use_visualcpp6
  613. -#endif
  614. -
  615. -// Avoid strange 'deprecated' warning messages with Visual C++ .NET.
  616. -#if defined(_MSC_VER) && _MSC_VER>=1300
  617. -#define _CRT_SECURE_NO_DEPRECATE 1
  618. -#define _CRT_NONSTDC_NO_DEPRECATE 1
  619. -#endif
  620. -
  621. -// Standard C++ includes.
  622. -#include <cstdio>
  623. -#include <cstdlib>
  624. -#include <cstdarg>
  625. -#include <cstring>
  626. -#include <cmath>
  627. -#include <ctime>
  628. -
  629. -// Overcome VisualC++ 6.0 compilers namespace 'std::' bug.
  630. -#ifdef cimg_use_visualcpp6
  631. -#define std
  632. -#endif
  633. -
  634. -/*
  635. - #
  636. - # Set CImg configuration flags.
  637. - #
  638. - # If compilation flags are not adapted to your system,
  639. - # you may override their values, before including
  640. - # the header file "CImg.h" (use the #define directive).
  641. - #
  642. - */
  643. -
  644. -// Try to detect the current system and set value of 'cimg_OS'.
  645. -#ifndef cimg_OS
  646. -#if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \
  647. - || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \
  648. - || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \
  649. - || defined(__sgi)
  650. -// Unix-like (Linux, Solaris, BSD, MacOSX, Irix,...).
  651. -#define cimg_OS 1
  652. -#ifndef cimg_display_type
  653. -#define cimg_display_type 1
  654. -#endif
  655. -#ifndef cimg_color_terminal
  656. -#define cimg_color_terminal
  657. -#endif
  658. -#elif defined(_WIN32) || defined(__WIN32__)
  659. -// Windows.
  660. -#define cimg_OS 2
  661. -#ifndef cimg_display_type
  662. -#define cimg_display_type 2
  663. -#endif
  664. -#else
  665. -// Unknown configuration : ask for minimal dependencies (no display).
  666. -#define cimg_OS 0
  667. -#ifndef cimg_display_type
  668. -#define cimg_display_type 0
  669. -#endif
  670. -#endif
  671. -#endif
  672. -
  673. -// Debug configuration.
  674. -//
  675. -// Set 'cimg_debug' to : 0 to remove debug messages (exceptions are still thrown anyway).
  676. -// 1 to display debug messages on standard error output (console).
  677. -// 2 to display debug messages with modal windows (default behavior).
  678. -// 3 to do as 2 + add extra memory access warnings (may slow down the code)
  679. -#ifndef cimg_debug
  680. -#define cimg_debug 2
  681. -#endif
  682. -
  683. -// Allow compatibility with older CImg versions.
  684. -//
  685. -// Define 'cimg_strict' to avoid keeping the compatibility with older code
  686. -#ifndef cimg_strict
  687. -#define CImgl CImgList
  688. -#define cimgl_map cimglist_for
  689. -#define cimglist_map cimglist_for
  690. -#define cimg_map cimg_for
  691. -#define cimg_mapoff cimg_foroff
  692. -#define cimg_mapX cimg_forX
  693. -#define cimg_mapY cimg_forY
  694. -#define cimg_mapZ cimg_forZ
  695. -#define cimg_mapV cimg_forV
  696. -#define cimg_mapXY cimg_forXY
  697. -#define cimg_mapXZ cimg_forXZ
  698. -#define cimg_mapXV cimg_forXV
  699. -#define cimg_mapYZ cimg_forYZ
  700. -#define cimg_mapYV cimg_forYV
  701. -#define cimg_mapZV cimg_forZV
  702. -#define cimg_mapXYZ cimg_forXYZ
  703. -#define cimg_mapXYV cimg_forXYV
  704. -#define cimg_mapXZV cimg_forXZV
  705. -#define cimg_mapYZV cimg_forYZV
  706. -#define cimg_mapXYZV cimg_forXYZV
  707. -#define cimg_imapX cimg_for_insideX
  708. -#define cimg_imapY cimg_for_insideY
  709. -#define cimg_imapZ cimg_for_insideZ
  710. -#define cimg_imapV cimg_for_insideV
  711. -#define cimg_imapXY cimg_for_insideXY
  712. -#define cimg_imapXYZ cimg_for_insideXYZ
  713. -#define cimg_bmapX cimg_for_borderX
  714. -#define cimg_bmapY cimg_for_borderY
  715. -#define cimg_bmapZ cimg_for_borderZ
  716. -#define cimg_bmapV cimg_for_borderV
  717. -#define cimg_bmapXY cimg_for_borderXY
  718. -#define cimg_bmapXYZ cimg_for_borderXYZ
  719. -#define cimg_2mapX cimg_for2X
  720. -#define cimg_2mapY cimg_for2Y
  721. -#define cimg_2mapZ cimg_for2Z
  722. -#define cimg_2mapXY cimg_for2XY
  723. -#define cimg_2mapXZ cimg_for2XZ
  724. -#define cimg_2mapYZ cimg_for2YZ
  725. -#define cimg_2mapXYZ cimg_for2XYZ
  726. -#define cimg_3mapX cimg_for3X
  727. -#define cimg_3mapY cimg_for3Y
  728. -#define cimg_3mapZ cimg_for3Z
  729. -#define cimg_3mapXY cimg_for3XY
  730. -#define cimg_3mapXZ cimg_for3XZ
  731. -#define cimg_3mapYZ cimg_for3YZ
  732. -#define cimg_3mapXYZ cimg_for3XYZ
  733. -#define cimg_4mapX cimg_for4X
  734. -#define cimg_4mapY cimg_for4Y
  735. -#define cimg_4mapZ cimg_for4Z
  736. -#define cimg_4mapXY cimg_for4XY
  737. -#define cimg_4mapXZ cimg_for4XZ
  738. -#define cimg_4mapYZ cimg_for4YZ
  739. -#define cimg_4mapXYZ cimg_for4XYZ
  740. -#define cimg_5mapX cimg_for5X
  741. -#define cimg_5mapY cimg_for5Y
  742. -#define cimg_5mapZ cimg_for5Z
  743. -#define cimg_5mapXY cimg_for5XY
  744. -#define cimg_5mapXZ cimg_for5XZ
  745. -#define cimg_5mapYZ cimg_for5YZ
  746. -#define cimg_5mapXYZ cimg_for5XYZ
  747. -#define cimg_map2x2x1 cimg_for2x2
  748. -#define cimg_map3x3x1 cimg_for3x3
  749. -#define cimg_map4x4x1 cimg_for4x4
  750. -#define cimg_map5x5x1 cimg_for5x5
  751. -#define cimg_map2x2 cimg_for2x2
  752. -#define cimg_map3x3 cimg_for3x3
  753. -#define cimg_map4x4 cimg_for4x4
  754. -#define cimg_map5x5 cimg_for5x5
  755. -#define cimg_map3x3x3 cimg_for3x3x3
  756. -#define cimg_map2x2x2 cimg_for2x2x2
  757. -#define CImg_2x2x1 CImg_2x2
  758. -#define CImg_3x3x1 CImg_3x3
  759. -#define CImg_4x4x1 CImg_4x4
  760. -#define CImg_5x5x1 CImg_5x5
  761. -#define scroll translate
  762. -#define cimg_convert_path cimg_imagemagick_path
  763. -#define load_convert load_imagemagick
  764. -#define save_convert save_imagemagick
  765. -#endif
  766. -
  767. -// Architecture-dependent includes.
  768. -#if cimg_OS==1
  769. -#include <sys/time.h>
  770. -#include <unistd.h>
  771. -#elif cimg_OS==2
  772. -#include <windows.h>
  773. -// Discard unuseful macros in windows.h
  774. -// to allow compilation with VC++ 6.0.
  775. -#ifdef min
  776. -#undef min
  777. -#undef max
  778. -#undef abs
  779. -#endif
  780. -#endif
  781. -// Display-dependent includes.
  782. -#if cimg_display_type==1
  783. -#include <X11/Xlib.h>
  784. -#include <X11/Xutil.h>
  785. -#include <X11/keysym.h>
  786. -#include <pthread.h>
  787. -#ifdef cimg_use_xshm
  788. -#include <sys/ipc.h>
  789. -#include <sys/shm.h>
  790. -#include <X11/extensions/XShm.h>
  791. -#endif
  792. -#ifdef cimg_use_xrandr
  793. -#include <X11/extensions/Xrandr.h>
  794. -#endif
  795. -#endif
  796. -
  797. -// Configuration for native PNG and JPEG support
  798. -//
  799. -// Define 'cimg_use_png', 'cimg_use_jpeg' or 'cimg_use_tiff' to enable native PNG, JPEG or TIFF files support.
  800. -// This requires you link your code with the zlib/png, jpeg or tiff libraries.
  801. -// Without these libraries, PNG,JPEG and TIFF support will be done by the Image Magick's 'convert' tool,
  802. -// or byt the GraphicsMagick 'gm' tool if installed
  803. -// (this is the case on most unix plateforms).
  804. -#ifdef cimg_use_png
  805. -extern "C" {
  806. -#include "png.h"
  807. -}
  808. -#endif
  809. -#ifdef cimg_use_jpeg
  810. -extern "C" {
  811. -#include "jpeglib.h"
  812. -}
  813. -#endif
  814. -#ifdef cimg_use_tiff
  815. -extern "C" {
  816. -#include "tiffio.h"
  817. -}
  818. -#endif
  819. -#ifdef cimg_use_magick
  820. -#include "Magick++.h"
  821. -#endif
  822. -#ifdef cimg_use_fftw3
  823. -extern "C" {
  824. -#include "fftw3.h"
  825. -}
  826. -#endif
  827. -
  828. -/*
  829. - #
  830. - #
  831. - # Define some useful macros. Macros of the CImg Library are prefixed by 'cimg_'
  832. - # Documented macros below may be safely used in your own code
  833. - # (particularly useful for option parsing, image loops and neighborhoods).
  834. - #
  835. - #
  836. - */
  837. -
  838. -// Macros used to describe the program usage, and retrieve command line arguments
  839. -// (See corresponding module 'Retrieving command line arguments' in the generated documentation).
  840. -#define cimg_usage(usage) cimg_library::cimg::option((char*)0,argc,argv,(char*)0,usage)
  841. -#define cimg_help(str) cimg_library::cimg::option((char*)0,argc,argv,str,(char*)0)
  842. -#define cimg_option(name,defaut,usage) cimg_library::cimg::option(name,argc,argv,defaut,usage)
  843. -
  844. -// Macros used for neighborhood definitions and manipulations.
  845. -// (see module 'Using Image Loops' in the generated documentation).
  846. -#define CImg_2(I,T) T I##cc,I##nc=0
  847. -#define CImg_2x2(I,T) T I##cc,I##nc=0,I##cn,I##nn=0
  848. -#define CImg_3(I,T) T I##pp,I##cp,I##np=0
  849. -#define CImg_3x3(I,T) T I##pp,I##cp,I##np=0,I##pc,I##cc,I##nc=0,I##pn,I##cn,I##nn=0
  850. -#define CImg_4(I,T) T I##pp,I##cp,I##np=0,I##ap=0
  851. -#define CImg_4x4(I,T) T I##pp,I##cp,I##np=0,I##ap=0, \
  852. - I##pc,I##cc,I##nc=0,I##ac=0, \
  853. - I##pn,I##cn,I##nn=0,I##an=0, \
  854. - I##pa,I##ca,I##na=0,I##aa=0
  855. -#define CImg_5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0
  856. -#define CImg_5x5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0, \
  857. - I##bp,I##pp,I##cp,I##np=0,I##ap=0, \
  858. - I##bc,I##pc,I##cc,I##nc=0,I##ac=0, \
  859. - I##bn,I##pn,I##cn,I##nn=0,I##an=0, \
  860. - I##ba,I##pa,I##ca,I##na=0,I##aa=0
  861. -#define CImg_2x2x2(I,T) T I##ccc,I##ncc=0,I##cnc,I##nnc=0, \
  862. - I##ccn,I##ncn=0,I##cnn,I##nnn=0
  863. -#define CImg_3x3x3(I,T) T I##ppp,I##cpp,I##npp=0,I##pcp,I##ccp,I##ncp=0,I##pnp,I##cnp,I##nnp=0, \
  864. - I##ppc,I##cpc,I##npc=0,I##pcc,I##ccc,I##ncc=0,I##pnc,I##cnc,I##nnc=0, \
  865. - I##ppn,I##cpn,I##npn=0,I##pcn,I##ccn,I##ncn=0,I##pnn,I##cnn,I##nnn=0
  866. -
  867. -#define CImg_2x2_ref(I,T,tab) T &I##cc=(tab)[0],&I##nc=(tab)[1],&I##cn=(tab)[2],&I##nn=(tab)[3]
  868. -#define CImg_3x3_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2], \
  869. - &I##pc=(tab)[3],&I##cc=(tab)[4],&I##nc=(tab)[5], \
  870. - &I##pn=(tab)[6],&I##cn=(tab)[7],&I##nn=(tab)[8]
  871. -#define CImg_4x4_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2],&I##ap=(tab)[3], \
  872. - &I##pc=(tab)[4],&I##cc=(tab)[5],&I##nc=(tab)[6],&I##ap=(tab)[7], \
  873. - &I##pn=(tab)[8],&I##cn=(tab)[9],&I##nn=(tab)[10],&I##aa=(tab)[11], \
  874. - &I##pa=(tab)[12],&I##ca=(tab)[13],&I##na=(tab)[14],&I##aa=(tab)[15]
  875. -#define CImg_5x5_ref(I,T,tab) T &I##bb=(tab)[0],&I##pb=(tab)[1],&I##cb=(tab)[2],&I##nb=(tab)[3],&I##ab=(tab)[4], \
  876. - &I##bp=(tab)[5],&I##pp=(tab)[6],&I##cp=(tab)[7],&I##np=(tab)[8],&I##ap=(tab)[9], \
  877. - &I##bc=(tab)[10],&I##pc=(tab)[11],&I##cc=(tab)[12],&I##nc=(tab)[13],&I##ac=(tab)[14], \
  878. - &I##bn=(tab)[15],&I##pn=(tab)[16],&I##cn=(tab)[17],&I##nn=(tab)[18],&I##an=(tab)[19], \
  879. - &I##ba=(tab)[20],&I##pa=(tab)[21],&I##ca=(tab)[22],&I##na=(tab)[23],&I##aa=(tab)[24]
  880. -#define CImg_2x2x2_ref(I,T,tab) T &I##ccc=(tab)[0],&I##ncc=(tab)[1],&I##cnc=(tab)[2],&I##nnc=(tab)[3], \
  881. - &I##ccn=(tab)[4],&I##ncn=(tab)[5],&I##cnn=(tab)[6],&I##nnn=(tab)[7]
  882. -#define CImg_3x3x3_ref(I,T,tab) T &I##ppp=(tab)[0],&I##cpp=(tab)[1],&I##npp=(tab)[2], \
  883. - &I##pcp=(tab)[3],&I##ccp=(tab)[4],&I##ncp=(tab)[5], \
  884. - &I##pnp=(tab)[6],&I##cnp=(tab)[7],&I##nnp=(tab)[8], \
  885. - &I##ppc=(tab)[9],&I##cpc=(tab)[10],&I##npc=(tab)[11], \
  886. - &I##pcc=(tab)[12],&I##ccc=(tab)[13],&I##ncc=(tab)[14], \
  887. - &I##pnc=(tab)[15],&I##cnc=(tab)[16],&I##nnc=(tab)[17], \
  888. - &I##ppn=(tab)[18],&I##cpn=(tab)[19],&I##npn=(tab)[20], \
  889. - &I##pcn=(tab)[21],&I##ccn=(tab)[22],&I##ncn=(tab)[23], \
  890. - &I##pnn=(tab)[24],&I##cnn=(tab)[25],&I##nnn=(tab)[26]
  891. -
  892. -#define cimg_copy2x2(J,I) I##cc=J##cc, I##nc=J##nc, I##cn=J##cn, I##nn=J##nn
  893. -#define cimg_copy3x3(J,I) I##pp=J##pp, I##cp=J##cp, I##np=J##np, \
  894. - I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, \
  895. - I##pn=J##pn, I##cn=J##cn, I##nn=J##nn
  896. -#define cimg_copy5x5(J,I) I##bb=J##bb, I##pb=J##pb, I##cb=J##cb, I##nb=J##nb, I##ab=J##ab, \
  897. - I##bp=J##bp, I##pp=J##pp, I##cp=J##cp, I##np=J##np, I##ap=J##ap, \
  898. - I##bc=J##bc, I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, I##ac=J##ac, \
  899. - I##bn=J##bn, I##pn=J##pn, I##cn=J##cn, I##nn=J##nn, I##an=J##an, \
  900. - I##ba=J##ba, I##pa=J##pa, I##ca=J##ca, I##na=J##na, I##aa=J##aa
  901. -
  902. -#define cimg_squaresum2x2(I) ( I##cc*I##cc + I##nc*I##nc + I##cn*I##cn + I##nn*I##nn )
  903. -#define cimg_squaresum3x3(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + \
  904. - I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + \
  905. - I##pn*I##pn + I##cn*I##cn + I##nn*I##nn )
  906. -#define cimg_squaresum4x4(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \
  907. - I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \
  908. - I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \
  909. - I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa )
  910. -#define cimg_squaresum5x5(I) ( I##bb*I##bb + I##pb*I##pb + I##cb*I##cb + I##nb*I##nb + I##ab*I##ab + \
  911. - I##bp*I##bp + I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \
  912. - I##bc*I##bc + I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \
  913. - I##bn*I##bn + I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \
  914. - I##ba*I##ba + I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa )
  915. -#define cimg_squaresum2x2x2(I) ( I##ccc*I##ccc + I##ncc*I##ncc + I##cnc*I##cnc + I##nnc*I##nnc + \
  916. - I##ccn*I##ccn + I##ncn*I##ncn + I##cnn*I##cnn + I##nnn*I##nnn )
  917. -#define cimg_squaresum3x3x3(I) ( I##ppp*I##ppp + I##cpp*I##cpp + I##npp*I##npp + \
  918. - I##pcp*I##pcp + I##ccp*I##ccp + I##ncp*I##ncp + \
  919. - I##pnp*I##pnp + I##cnp*I##cnp + I##nnp*I##nnp + \
  920. - I##ppc*I##ppc + I##cpc*I##cpc + I##npc*I##npc + \
  921. - I##pcc*I##pcc + I##ccc*I##ccc + I##ncc*I##ncc + \
  922. - I##pnc*I##pnc + I##cnc*I##cnc + I##nnc*I##nnc + \
  923. - I##ppn*I##ppn + I##cpn*I##cpn + I##npn*I##npn + \
  924. - I##pcn*I##pcn + I##ccn*I##ccn + I##ncn*I##ncn + \
  925. - I##pnn*I##pnn + I##cnn*I##cnn + I##nnn*I##nnn )
  926. -
  927. -#define cimg_corr2x2(I,m) ( I##cc*(m)(0,0)+I##nc*(m)(1,0)+I##cn*(m)(0,1)+I##nn*(m)(1,1) )
  928. -#define cimg_corr3x3(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0) + \
  929. - I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1) + \
  930. - I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2) )
  931. -#define cimg_corr4x4(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0)+I##ap*(m)(3,0) + \
  932. - I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1)+I##ac*(m)(3,1) + \
  933. - I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2)+I##an*(m)(3,2) + \
  934. - I##pa*(m)(0,3)+I##ca*(m)(1,3)+I##na*(m)(2,3)+I##aa*(m)(3,3) )
  935. -#define cimg_corr5x5(I,m) ( I##bb*(m)(0,0)+I##pb*(m)(1,0)+I##cb*(m)(2,0)+I##nb*(m)(3,0)+I##ab*(m)(4,0) + \
  936. - I##bp*(m)(0,1)+I##pp*(m)(1,1)+I##cp*(m)(2,1)+I##np*(m)(3,1)+I##ap*(m)(4,1) + \
  937. - I##bc*(m)(0,2)+I##pc*(m)(1,2)+I##cc*(m)(2,2)+I##nc*(m)(3,2)+I##ac*(m)(4,2) + \
  938. - I##bn*(m)(0,3)+I##pn*(m)(1,3)+I##cn*(m)(2,3)+I##nn*(m)(3,3)+I##an*(m)(4,3) + \
  939. - I##ba*(m)(0,4)+I##pa*(m)(1,4)+I##ca*(m)(2,4)+I##na*(m)(3,4)+I##aa*(m)(4,4) )
  940. -#define cimg_corr2x2x2(I,m) ( I##ccc*(m)(0,0,0)+I##ncc*(m)(1,0,0)+I##cnc*(m)(0,1,0)+I##nnc*(m)(1,1,0) + \
  941. - I##ccn*(m)(0,0,1)+I##ncn*(m)(1,0,1)+I##cnn*(m)(0,1,1)+I##nnn*(m)(1,1,1) )
  942. -#define cimg_corr3x3x3(I,m) ( I##ppp*(m)(0,0,0)+I##cpp*(m)(1,0,0)+I##npp*(m)(2,0,0) + \
  943. - I##pcp*(m)(0,1,0)+I##ccp*(m)(1,1,0)+I##ncp*(m)(2,1,0) + \
  944. - I##pnp*(m)(0,2,0)+I##cnp*(m)(1,2,0)+I##nnp*(m)(2,2,0) + \
  945. - I##ppc*(m)(0,0,1)+I##cpc*(m)(1,0,1)+I##npc*(m)(2,0,1) + \
  946. - I##pcc*(m)(0,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(2,1,1) + \
  947. - I##pnc*(m)(0,2,1)+I##cnc*(m)(1,2,1)+I##nnc*(m)(2,2,1) + \
  948. - I##ppn*(m)(0,0,2)+I##cpn*(m)(1,0,2)+I##npn*(m)(2,0,2) + \
  949. - I##pcn*(m)(0,1,2)+I##ccn*(m)(1,1,2)+I##ncn*(m)(2,1,2) + \
  950. - I##pnn*(m)(0,2,2)+I##cnn*(m)(1,2,2)+I##nnn*(m)(2,2,2) )
  951. -
  952. -#define cimg_conv2x2(I,m) ( I##cc*(m)(1,1)+I##nc*(m)(0,1)+I##cn*(m)(1,0)+I##nn*(m)(0,0) )
  953. -#define cimg_conv3x3(I,m) ( I##pp*(m)(2,2)+I##cp*(m)(1,2)+I##np*(m)(0,2) + \
  954. - I##pc*(m)(2,1)+I##cc*(m)(1,1)+I##nc*(m)(0,1) + \
  955. - I##pn*(m)(2,0)+I##cn*(m)(1,0)+I##nn*(m)(0,0) )
  956. -#define cimg_conv4x4(I,m) ( I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \
  957. - I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \
  958. - I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \
  959. - I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) )
  960. -#define cimg_conv5x5(I,m) ( I##bb*(m)(4,4)+I##pb*(m)(3,4)+I##cb*(m)(2,4)+I##nb*(m)(1,4)+I##ab*(m)(0,4) + \
  961. - I##bp*(m)(4,3)+I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \
  962. - I##bc*(m)(4,2)+I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \
  963. - I##bn*(m)(4,1)+I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \
  964. - I##ba*(m)(4,0)+I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) )
  965. -#define cimg_conv2x2x2(I,m) ( I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \
  966. - I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) )
  967. -#define cimg_conv3x3x3(I,m) ( I##ppp*(m)(2,2,2)+I##cpp*(m)(1,2,2)+I##npp*(m)(0,2,2) + \
  968. - I##pcp*(m)(2,1,2)+I##ccp*(m)(1,1,2)+I##ncp*(m)(0,1,2) + \
  969. - I##pnp*(m)(2,0,2)+I##cnp*(m)(1,0,2)+I##nnp*(m)(0,0,2) + \
  970. - I##ppc*(m)(2,2,1)+I##cpc*(m)(1,2,1)+I##npc*(m)(0,2,1) + \
  971. - I##pcc*(m)(2,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1) + \
  972. - I##pnc*(m)(2,0,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \
  973. - I##ppn*(m)(2,2,0)+I##cpn*(m)(1,2,0)+I##npn*(m)(0,2,0) + \
  974. - I##pcn*(m)(2,1,0)+I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0) + \
  975. - I##pnn*(m)(2,0,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) )
  976. -
  977. -#define cimg_get2x2(img,x,y,z,v,I) \
  978. - I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \
  979. - I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v)
  980. -#define cimg_get3x3(img,x,y,z,v,I) \
  981. - I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), \
  982. - I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \
  983. - I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v)
  984. -#define cimg_get4x4(img,x,y,z,v,I) \
  985. - I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \
  986. - I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \
  987. - I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \
  988. - I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v)
  989. -#define cimg_get5x5(img,x,y,z,v,I) \
  990. - I##bb=(img)(_b##x,_b##y,z,v), I##pb=(img)(_p##x,_b##y,z,v), I##cb=(img)(x,_b##y,z,v), I##nb=(img)(_n##x,_b##y,z,v), I##ab=(img)(_a##x,_b##y,z,v), \
  991. - I##bp=(img)(_b##x,_p##y,z,v), I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \
  992. - I##bc=(img)(_b##x, y,z,v), I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \
  993. - I##bn=(img)(_b##x,_n##y,z,v), I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \
  994. - I##ba=(img)(_b##x,_a##y,z,v), I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v)
  995. -#define cimg_get2x2x2(img,x,y,z,v,I) \
  996. - I##ccc=(img)(x,y, z,v), I##ncc=(img)(_n##x,y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \
  997. - I##ccc=(img)(x,y,_n##z,v), I##ncc=(img)(_n##x,y,_n##z,v), I##cnc=(img)(x,_n##y,_n##z,v), I##nnc=(img)(_n##x,_n##y,_n##z,v)
  998. -#define cimg_get3x3x3(img,x,y,z,v,I) \
  999. - I##ppp=(img)(_p##x,_p##y,_p##z,v), I##cpp=(img)(x,_p##y,_p##z,v), I##npp=(img)(_n##x,_p##y,_p##z,v), \
  1000. - I##pcp=(img)(_p##x, y,_p##z,v), I##ccp=(img)(x, y,_p##z,v), I##ncp=(img)(_n##x, y,_p##z,v), \
  1001. - I##pnp=(img)(_p##x,_n##y,_p##z,v), I##cnp=(img)(x,_n##y,_p##z,v), I##nnp=(img)(_n##x,_n##y,_p##z,v), \
  1002. - I##ppc=(img)(_p##x,_p##y, z,v), I##cpc=(img)(x,_p##y, z,v), I##npc=(img)(_n##x,_p##y, z,v), \
  1003. - I##pcc=(img)(_p##x, y, z,v), I##ccc=(img)(x, y, z,v), I##ncc=(img)(_n##x, y, z,v), \
  1004. - I##pnc=(img)(_p##x,_n##y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \
  1005. - I##ppn=(img)(_p##x,_p##y,_n##z,v), I##cpn=(img)(x,_p##y,_n##z,v), I##npn=(img)(_n##x,_p##y,_n##z,v), \
  1006. - I##pcn=(img)(_p##x, y,_n##z,v), I##ccn=(img)(x, y,_n##z,v), I##ncn=(img)(_n##x, y,_n##z,v), \
  1007. - I##pnn=(img)(_p##x,_n##y,_n##z,v), I##cnn=(img)(x,_n##y,_n##z,v), I##nnn=(img)(_n##x,_n##y,_n##z,v)
  1008. -
  1009. -// Macros used to define special image loops.
  1010. -// (see module 'Using Image Loops' in the generated documentation).
  1011. -#define cimg_for(img,ptr,T_ptr) for (T_ptr *ptr=(img).data+(img).size(); (ptr--)>(img).data; )
  1012. -#define cimglist_for(list,l) for (unsigned int l=0; l<(list).size; l++)
  1013. -#define cimglist_apply(list,fn) cimglist_for(list,__##fn) (list)[__##fn].fn
  1014. -#define cimg_foroff(img,off) for (unsigned int off=0; off<(img).size(); off++)
  1015. -#define cimg_forX(img,x) for (int x=0; x<(int)((img).width); x++)
  1016. -#define cimg_forY(img,y) for (int y=0; y<(int)((img).height);y++)
  1017. -#define cimg_forZ(img,z) for (int z=0; z<(int)((img).depth); z++)
  1018. -#define cimg_forV(img,v) for (int v=0; v<(int)((img).dim); v++)
  1019. -#define cimg_forXY(img,x,y) cimg_forY(img,y) cimg_forX(img,x)
  1020. -#define cimg_forXZ(img,x,z) cimg_forZ(img,z) cimg_forX(img,x)
  1021. -#define cimg_forYZ(img,y,z) cimg_forZ(img,z) cimg_forY(img,y)
  1022. -#define cimg_forXV(img,x,v) cimg_forV(img,v) cimg_forX(img,x)
  1023. -#define cimg_forYV(img,y,v) cimg_forV(img,v) cimg_forY(img,y)
  1024. -#define cimg_forZV(img,z,v) cimg_forV(img,v) cimg_forZ(img,z)
  1025. -#define cimg_forXYZ(img,x,y,z) cimg_forZ(img,z) cimg_forXY(img,x,y)
  1026. -#define cimg_forXYV(img,x,y,v) cimg_forV(img,v) cimg_forXY(img,x,y)
  1027. -#define cimg_forXZV(img,x,z,v) cimg_forV(img,v) cimg_forXZ(img,x,z)
  1028. -#define cimg_forYZV(img,y,z,v) cimg_forV(img,v) cimg_forYZ(img,y,z)
  1029. -#define cimg_forXYZV(img,x,y,z,v) cimg_forV(img,v) cimg_forXYZ(img,x,y,z)
  1030. -#define cimg_for_insideX(img,x,n) for (int x=(n); x<(int)((img).width-(n)); x++)
  1031. -#define cimg_for_insideY(img,y,n) for (int y=(n); y<(int)((img).height-(n)); y++)
  1032. -#define cimg_for_insideZ(img,z,n) for (int z=(n); z<(int)((img).depth-(n)); z++)
  1033. -#define cimg_for_insideV(img,v,n) for (int v=(n); v<(int)((img).dim-(n)); v++)
  1034. -#define cimg_for_insideXY(img,x,y,n) cimg_for_insideY(img,y,n) cimg_for_insideX(img,x,n)
  1035. -#define cimg_for_insideXYZ(img,x,y,z,n) cimg_for_insideZ(img,z,n) cimg_for_insideXY(img,x,y,n)
  1036. -#define cimg_for_borderX(img,x,n) for (int x=0; x<(int)((img).width); x==(n)-1?(x=(img).width-(n)): x++)
  1037. -#define cimg_for_borderY(img,y,n) for (int y=0; y<(int)((img).height); y==(n)-1?(x=(img).height-(n)):y++)
  1038. -#define cimg_for_borderZ(img,z,n) for (int z=0; z<(int)((img).depth); z==(n)-1?(x=(img).depth-(n)): z++)
  1039. -#define cimg_for_borderV(img,v,n) for (int v=0; v<(int)((img).dim); v==(n)-1?(x=(img).dim-(n)): v++)
  1040. -#define cimg_for_borderXY(img,x,y,n) cimg_forY(img,y) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n))?x++: \
  1041. - ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n))))
  1042. -#define cimg_for_borderXYZ(img,x,y,z,n) cimg_forYZ(img,y,z) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n) || z<(n) || z>=(int)((img).depth)-(n))?x++: \
  1043. - ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n))))
  1044. -#define cimg_for2X(img,x) for (int x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; x++, _n##x++)
  1045. -#define cimg_for2Y(img,y) for (int y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; y++, _n##y++)
  1046. -#define cimg_for2Z(img,z) for (int z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; z++, _n##z++)
  1047. -#define cimg_for2XY(img,x,y) cimg_for2Y(img,y) cimg_for2X(img,x)
  1048. -#define cimg_for2XZ(img,x,z) cimg_for2Z(img,z) cimg_for2X(img,x)
  1049. -#define cimg_for2YZ(img,y,z) cimg_for2Z(img,z) cimg_for2Y(img,y)
  1050. -#define cimg_for2XYZ(img,x,y,z) cimg_for2Z(img,z) cimg_for2XY(img,x,y)
  1051. -#define cimg_for3X(img,x) for (int x=0,_p##x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; _p##x=x++,_n##x++)
  1052. -#define cimg_for3Y(img,y) for (int y=0,_p##y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; _p##y=y++,_n##y++)
  1053. -#define cimg_for3Z(img,z) for (int z=0,_p##z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; _p##z=z++,_n##z++)
  1054. -#define cimg_for3XY(img,x,y) cimg_for3Y(img,y) cimg_for3X(img,x)
  1055. -#define cimg_for3XZ(img,x,z) cimg_for3Z(img,z) cimg_for3X(img,x)
  1056. -#define cimg_for3YZ(img,y,z) cimg_for3Z(img,z) cimg_for3Y(img,y)
  1057. -#define cimg_for3XYZ(img,x,y,z) cimg_for3Z(img,z) cimg_for3XY(img,x,y)
  1058. -#define cimg_for4X(img,x) for (int _p##x=0,x=0,_n##x=1,_a##x=2; \
  1059. - _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \
  1060. - _p##x=x++,_n##x++,_a##x++)
  1061. -#define cimg_for4Y(img,y) for (int _p##y=0,y=0,_n##y=1,_a##y=2; \
  1062. - _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \
  1063. - _p##y=y++,_n##y++,_a##y++)
  1064. -#define cimg_for4Z(img,z) for (int _p##z=0,z=0,_n##z=1,_a##z=2; \
  1065. - _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \
  1066. - _p##z=z++,_n##z++,_a##z++)
  1067. -#define cimg_for4XY(img,x,y) cimg_for4Y(img,y) cimg_for4X(img,x)
  1068. -#define cimg_for4XZ(img,x,z) cimg_for4Z(img,z) cimg_for4X(img,x)
  1069. -#define cimg_for4YZ(img,y,z) cimg_for4Z(img,z) cimg_for4Y(img,y)
  1070. -#define cimg_for4XYZ(img,x,y,z) cimg_for4Z(img,z) cimg_for4XY(img,x,y)
  1071. -#define cimg_for5X(img,x) for (int _b##x=0,_p##x=0,x=0,_n##x=1,_a##x=2; \
  1072. - _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \
  1073. - _b##x=_p##x,_p##x=x++,_n##x++,_a##x++)
  1074. -#define cimg_for5Y(img,y) for (int _b##y=0,_p##y=0,y=0,_n##y=1,_a##y=2; \
  1075. - _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \
  1076. - _b##y=_p##y,_p##y=y++,_n##y++,_a##y++)
  1077. -#define cimg_for5Z(img,z) for (int _b##z=0,_p##z=0,z=0,_n##z=1,_a##z=2; \
  1078. - _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \
  1079. - _b##z=_p##z,_p##z=z++,_n##z++,_a##z++)
  1080. -#define cimg_for5XY(img,x,y) cimg_for5Y(img,y) cimg_for5X(img,x)
  1081. -#define cimg_for5XZ(img,x,z) cimg_for5Z(img,z) cimg_for5X(img,x)
  1082. -#define cimg_for5YZ(img,y,z) cimg_for5Z(img,z) cimg_for5Y(img,y)
  1083. -#define cimg_for5XYZ(img,x,y,z) cimg_for5Z(img,z) cimg_for5XY(img,x,y)
  1084. -
  1085. -#define cimg_for2x2(img,x,y,z,v,I) cimg_for2Y(img,y) \
  1086. - for (int _n##x=1, x=(int)((I##cc=(img)(0, y,z,v)), \
  1087. - (I##cn=(img)(0,_n##y,z,v)), \
  1088. - 0); \
  1089. - (_n##x<(int)((img).width) && ((I##nc=(img)(_n##x, y,z,v)), \
  1090. - (I##nn=(img)(_n##x,_n##y,z,v)), \
  1091. - 1)) || x==--_n##x; \
  1092. - I##cc=I##nc, I##cn=I##nn, \
  1093. - x++,_n##x++ )
  1094. -
  1095. -#define cimg_for3x3(img,x,y,z,v,I) cimg_for3Y(img,y) \
  1096. - for (int _n##x=1, _p##x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \
  1097. - (I##cc=I##pc=(img)(0, y,z,v)), \
  1098. - (I##cn=I##pn=(img)(0,_n##y,z,v))), \
  1099. - x=_p##x=0; \
  1100. - (_n##x<(int)((img).width) && ((I##np=(img)(_n##x,_p##y,z,v)), \
  1101. - (I##nc=(img)(_n##x, y,z,v)), \
  1102. - (I##nn=(img)(_n##x,_n##y,z,v)), \
  1103. - 1)) || x==--_n##x; \
  1104. - I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, \
  1105. - I##cp=I##np, I##cc=I##nc, I##cn=I##nn, \
  1106. - _p##x=x++,_n##x++ )
  1107. -
  1108. -
  1109. -#define cimg_for4x4(img,x,y,z,v,I) cimg_for4Y(img,y) \
  1110. - for (int _a##x=2, _n##x=1, x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \
  1111. - (I##cc=I##pc=(img)(0, y,z,v)), \
  1112. - (I##cn=I##pn=(img)(0,_n##y,z,v)), \
  1113. - (I##ca=I##pa=(img)(0,_a##y,z,v)), \
  1114. - (I##np=(img)(_n##x,_p##y,z,v)), \
  1115. - (I##nc=(img)(_n##x, y,z,v)), \
  1116. - (I##nn=(img)(_n##x,_n##y,z,v)), \
  1117. - (I##na=(img)(_n##x,_a##y,z,v)), \
  1118. - 0), _p##x=0; \
  1119. - (_a##x<(int)((img).width) && ((I##ap=(img)(_a##x,_p##y,z,v)), \
  1120. - (I##ac=(img)(_a##x, y,z,v)), \
  1121. - (I##an=(img)(_a##x,_n##y,z,v)), \
  1122. - (I##aa=(img)(_a##x,_a##y,z,v)), \
  1123. - 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \
  1124. - I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \
  1125. - I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \
  1126. - I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \
  1127. - _p##x=x++, _n##x++, _a##x++ )
  1128. -
  1129. -#define cimg_for5x5(img,x,y,z,v,I) cimg_for5Y(img,y) \
  1130. - for (int _a##x=2, _n##x=1, _b##x=(int)((I##cb=I##pb=I##bb=(img)(0,_b##y,z,v)), \
  1131. - (I##cp=I##pp=I##bp=(img)(0,_p##y,z,v)), \
  1132. - (I##cc=I##pc=I##bc=(img)(0, y,z,v)), \
  1133. - (I##cn=I##pn=I##bn=(img)(0,_n##y,z,v)), \
  1134. - (I##ca=I##pa=I##ba=(img)(0,_a##y,z,v)), \
  1135. - (I##nb=(img)(_n##x,_b##y,z,v)), \
  1136. - (I##np=(img)(_n##x,_p##y,z,v)), \
  1137. - (I##nc=(img)(_n##x, y,z,v)), \
  1138. - (I##nn=(img)(_n##x,_n##y,z,v)), \
  1139. - (I##na=(img)(_n##x,_a##y,z,v))), \
  1140. - x=0, _p##x=_b##x=0; \
  1141. - (_a##x<(int)((img).width) && ((I##ab=(img)(_a##x,_b##y,z,v)), \
  1142. - (I##ap=(img)(_a##x,_p##y,z,v)), \
  1143. - (I##ac=(img)(_a##x, y,z,v)), \
  1144. - (I##an=(img)(_a##x,_n##y,z,v)), \
  1145. - (I##aa=(img)(_a##x,_a##y,z,v)), \
  1146. - 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \
  1147. - I##bb=I##pb, I##bp=I##pp, I##bc=I##pc, I##bn=I##pn, I##ba=I##pa, \
  1148. - I##pb=I##cb, I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \
  1149. - I##cb=I##nb, I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \
  1150. - I##nb=I##ab, I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \
  1151. - _b##x=_p##x, _p##x=x++, _n##x++, _a##x++ )
  1152. -
  1153. -#define cimg_for2x2x2(img,x,y,z,v,I) cimg_for2YZ(img,y,z) \
  1154. - for (int _n##x=1, x=(int)((I##ccc=(img)(0, y, z,v)), \
  1155. - (I##cnc=(img)(0,_n##y, z,v)), \
  1156. - (I##ccn=(img)(0, y,_n##z,v)), \
  1157. - (I##cnn=(img)(0,_n##y,_n##z,v)), \
  1158. - 0); \
  1159. - (_n##x<(int)((img).width) && ((I##ncc=(img)(_n##x, y, z,v)), \
  1160. - (I##nnc=(img)(_n##x,_n##y, z,v)), \
  1161. - (I##ncn=(img)(_n##x, y,_n##z,v)), \
  1162. - (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \
  1163. - 1)) || x==--_n##x; \
  1164. - I##ccc=I##ncc, I##cnc=I##nnc, \
  1165. - I##ccn=I##ncn, I##cnn=I##nnn, \
  1166. - x++, _n##x++ )
  1167. -
  1168. -#define cimg_for3x3x3(img,x,y,z,v,I) cimg_for3YZ(img,y,z) \
  1169. - for (int _n##x=1, _p##x=(int)((I##cpp=I##ppp=(img)(0,_p##y,_p##z,v)), \
  1170. - (I##ccp=I##pcp=(img)(0, y,_p##z,v)), \
  1171. - (I##cnp=I##pnp=(img)(0,_n##y,_p##z,v)), \
  1172. - (I##cpc=I##ppc=(img)(0,_p##y, z,v)), \
  1173. - (I##ccc=I##pcc=(img)(0, y, z,v)), \
  1174. - (I##cnc=I##pnc=(img)(0,_n##y, z,v)), \
  1175. - (I##cpn=I##ppn=(img)(0,_p##y,_n##z,v)), \
  1176. - (I##ccn=I##pcn=(img)(0, y,_n##z,v)), \
  1177. - (I##cnn=I##pnn=(img)(0,_n##y,_n##z,v))),\
  1178. - x=_p##x=0; \
  1179. - (_n##x<(int)((img).width) && ((I##npp=(img)(_n##x,_p##y,_p##z,v)), \
  1180. - (I##ncp=(img)(_n##x, y,_p##z,v)), \
  1181. - (I##nnp=(img)(_n##x,_n##y,_p##z,v)), \
  1182. - (I##npc=(img)(_n##x,_p##y, z,v)), \
  1183. - (I##ncc=(img)(_n##x, y, z,v)), \
  1184. - (I##nnc=(img)(_n##x,_n##y, z,v)), \
  1185. - (I##npn=(img)(_n##x,_p##y,_n##z,v)), \
  1186. - (I##ncn=(img)(_n##x, y,_n##z,v)), \
  1187. - (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \
  1188. - 1)) || x==--_n##x; \
  1189. - I##ppp=I##cpp, I##pcp=I##ccp, I##pnp=I##cnp, \
  1190. - I##cpp=I##npp, I##ccp=I##ncp, I##cnp=I##nnp, \
  1191. - I##ppc=I##cpc, I##pcc=I##ccc, I##pnc=I##cnc, \
  1192. - I##cpc=I##npc, I##ccc=I##ncc, I##cnc=I##nnc, \
  1193. - I##ppn=I##cpn, I##pcn=I##ccn, I##pnn=I##cnn, \
  1194. - I##cpn=I##npn, I##ccn=I##ncn, I##cnn=I##nnn, \
  1195. - _p##x=x++, _n##x++ )
  1196. -
  1197. -/*
  1198. - #------------------------------------------------
  1199. - #
  1200. - #
  1201. - # Definition of the cimg_library:: namespace
  1202. - #
  1203. - #
  1204. - #------------------------------------------------
  1205. - */
  1206. -
  1207. -//! Namespace that encompasses all classes and functions of the %CImg library.
  1208. -/**
  1209. - This namespace is defined to avoid class names collisions that could happen
  1210. - with the include of other C++ header files. Anyway, it should not happen
  1211. - very often and you may start most of your programs with
  1212. - \code
  1213. - #include "CImg.h"
  1214. - using namespace cimg_library;
  1215. - \endcode
  1216. - to simplify the declaration of %CImg Library objects variables afterwards.
  1217. -**/
  1218. -
  1219. -namespace cimg_library {
  1220. -
  1221. - // Define the CImg classes.
  1222. - template<typename T=float> struct CImg;
  1223. - template<typename T=float> struct CImgList;
  1224. - struct CImgStats;
  1225. - struct CImgDisplay;
  1226. - struct CImgException;
  1227. -
  1228. - namespace cimg {
  1229. -
  1230. - // The bodies of the functions below are defined afterwards
  1231. - inline void info();
  1232. -
  1233. - inline unsigned int& exception_mode();
  1234. -
  1235. - inline int dialog(const char *title,const char *msg,const char *button1_txt="OK",
  1236. - const char *button2_txt=0,const char *button3_txt=0,
  1237. - const char *button4_txt=0,const char *button5_txt=0,
  1238. - const char *button6_txt=0,const bool centering = false);
  1239. -
  1240. - template<typename tfunc, typename tp, typename tf>
  1241. - inline void marching_cubes(const tfunc& func, const float isovalue,
  1242. - const float x0,const float y0,const float z0,
  1243. - const float x1,const float y1,const float z1,
  1244. - const float resx,const float resy,const float resz,
  1245. - CImgList<tp>& points, CImgList<tf>& primitives,
  1246. - const bool invert_faces = false);
  1247. -
  1248. - template<typename tfunc, typename tp, typename tf>
  1249. - inline void marching_squares(const tfunc& func, const float isovalue,
  1250. - const float x0,const float y0,
  1251. - const float x1,const float y1,
  1252. - const float resx,const float resy,
  1253. - CImgList<tp>& points, CImgList<tf>& primitives);
  1254. - }
  1255. -
  1256. - /*
  1257. - #----------------------------------------------
  1258. - #
  1259. - #
  1260. - # Definition of the CImgException structures
  1261. - #
  1262. - #
  1263. - #----------------------------------------------
  1264. - */
  1265. -
  1266. - // Never use the following macro in your own code !
  1267. -#define cimg_exception_err(etype,disp_flag) \
  1268. - if (cimg::exception_mode()>=1) { \
  1269. - std::va_list ap; \
  1270. - va_start(ap,format); \
  1271. - std::vsprintf(message,format,ap); \
  1272. - va_end(ap); \
  1273. - if (cimg::exception_mode()>=2 && disp_flag) { \
  1274. - try { cimg::dialog(etype,message,"Abort"); } \
  1275. - catch (CImgException&) { std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); } \
  1276. - } else std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); \
  1277. - } \
  1278. - if (cimg::exception_mode()>=3) cimg_library::cimg::info(); \
  1279. -
  1280. - //! Class which is thrown when an error occured during a %CImg library function call.
  1281. - /**
  1282. -
  1283. - \section ex1 Overview
  1284. -
  1285. - CImgException is the base class of %CImg exceptions.
  1286. - Exceptions are thrown by the %CImg Library when an error occured in a %CImg library function call.
  1287. - CImgException is seldom thrown itself. Children classes that specify the kind of error encountered
  1288. - are generally used instead. These sub-classes are :
  1289. -
  1290. - - \b CImgInstanceException : Thrown when the instance associated to the called %CImg function is not
  1291. - correctly defined. Generally, this exception is thrown when one tries to process \a empty images. The example
  1292. - below will throw a \a CImgInstanceException.
  1293. - \code
  1294. - CImg<float> img; // Construct an empty image.
  1295. - img.blur(10); // Try to blur the image.
  1296. - \endcode
  1297. -
  1298. - - \b CImgArgumentException : Thrown when one of the arguments given to the called %CImg function is not correct.
  1299. - Generally, this exception is thrown when arguments passed to the function are outside an admissible range of values.
  1300. - The example below will throw a \a CImgArgumentException.
  1301. - \code
  1302. - CImg<float> img(100,100,1,3); // Define a 100x100 color image with float pixels.
  1303. - img = 0; // Try to fill pixels from the 0 pointer (invalid argument to operator=() ).
  1304. - \endcode
  1305. -
  1306. - - \b CImgIOException : Thrown when an error occured when trying to load or save image files.
  1307. - The example below will throw a \a CImgIOException.
  1308. - \code
  1309. - CImg<float> img("file_doesnt_exist.jpg"); // Try to load a file that doesn't exist.
  1310. - \endcode
  1311. -
  1312. - - \b CImgDisplayException : Thrown when an error occured when trying to display an image in a window.
  1313. - This exception is thrown when image display request cannot be satisfied.
  1314. -
  1315. - The parent class CImgException may be thrown itself when errors that cannot be classified in one of
  1316. - the above type occur. It is recommended not to throw CImgExceptions yourself, since there are normally
  1317. - reserved to %CImg Library functions.
  1318. - \b CImgInstanceException, \b CImgArgumentException, \b CImgIOException and \b CImgDisplayException are simple
  1319. - subclasses of CImgException and are thus not detailled more in this reference documentation.
  1320. -
  1321. - \section ex2 Exception handling
  1322. -
  1323. - When an error occurs, the %CImg Library first displays the error in a modal window.
  1324. - Then, it throws an instance of the corresponding exception class, generally leading the program to stop
  1325. - (this is the default behavior).
  1326. - You can bypass this default behavior by handling the exceptions yourself,
  1327. - using a code block <tt>try { ... } catch() { ... }</tt>.
  1328. - In this case, you can avoid the apparition of the modal window, by
  1329. - defining the environment variable <tt>cimg_debug</tt> to 0 before including the %CImg header file.
  1330. - The example below shows how to cleanly handle %CImg Library exceptions :
  1331. - \code
  1332. - #define cimg_debug 0 // Disable modal window in CImg exceptions.
  1333. - #define "CImg.h"
  1334. - int main() {
  1335. - try {
  1336. - ...; // Here, do what you want.
  1337. - }
  1338. - catch (CImgInstanceException &e) {
  1339. - std::fprintf(stderr,"CImg Library Error : %s",e.message); // Display your own error message
  1340. - ... // Do what you want now.
  1341. - }
  1342. - }
  1343. - \endcode
  1344. - **/
  1345. - struct CImgException {
  1346. - char message[1024]; //!< Message associated with the error that thrown the exception.
  1347. - CImgException() { message[0]='\0'; }
  1348. - CImgException(const char *format,...) { cimg_exception_err("CImgException",true); }
  1349. - };
  1350. -
  1351. - // The \ref CImgInstanceException class is used to throw an exception related
  1352. - // to a non suitable instance encountered in a library function call.
  1353. - struct CImgInstanceException : CImgException {
  1354. - CImgInstanceException(const char *format,...) { cimg_exception_err("CImgInstanceException",true); }
  1355. - };
  1356. -
  1357. - // The \ref CImgArgumentException class is used to throw an exception related
  1358. - // to invalid arguments encountered in a library function call.
  1359. - struct CImgArgumentException : CImgException {
  1360. - CImgArgumentException(const char *format,...) { cimg_exception_err("CImgArgumentException",true); }
  1361. - };
  1362. -
  1363. - // The \ref CImgIOException class is used to throw an exception related
  1364. - // to Input/Output file problems encountered in a library function call.
  1365. - struct CImgIOException : CImgException {
  1366. - CImgIOException(const char *format,...) { cimg_exception_err("CImgIOException",true); }
  1367. - };
  1368. -
  1369. - // The CImgDisplayException class is used to throw an exception related to display problems
  1370. - // encountered in a library function call.
  1371. - struct CImgDisplayException : CImgException {
  1372. - CImgDisplayException(const char *format,...) { cimg_exception_err("CImgDisplayException",false); }
  1373. - };
  1374. -
  1375. - /*
  1376. - #-------------------------------------
  1377. - #
  1378. - #
  1379. - # Definition of the namespace 'cimg'
  1380. - #
  1381. - #
  1382. - #-------------------------------------
  1383. - */
  1384. -
  1385. - //! Namespace that encompasses \a low-level functions and variables of the %CImg Library.
  1386. - /**
  1387. - Most of the functions and variables within this namespace are used by the library for low-level processing.
  1388. - Nevertheless, documented variables and functions of this namespace may be used safely in your own source code.
  1389. -
  1390. - \warning Never write <tt>using namespace cimg_library::cimg;</tt> in your source code, since a lot of functions of the
  1391. - <tt>cimg::</tt> namespace have prototypes similar to standard C functions defined in the global namespace <tt>::</tt>.
  1392. - **/
  1393. - namespace cimg {
  1394. -
  1395. - // Define the trait that will be used to determine the best data type to work with.
  1396. - // Considered types are : bool, uchar, char, short, ushort, int, uint, long, ulong, float and double.
  1397. - // Two rules applies there :
  1398. - // - largest of two integer types is an integer type.
  1399. - // - largest of integer/float type is a float type.
  1400. - template<typename T,typename t> struct largest { typedef t type; };
  1401. - template<> struct largest<unsigned char,bool> { typedef unsigned char type; };
  1402. - template<> struct largest<unsigned char,char> { typedef short type; };
  1403. - template<> struct largest<char,bool> { typedef char type; };
  1404. - template<> struct largest<char,unsigned char> { typedef short type; };
  1405. - template<> struct largest<char,unsigned short> { typedef int type; };
  1406. - template<> struct largest<char,unsigned int> { typedef unsigned int type; };
  1407. - template<> struct largest<char,unsigned long> { typedef unsigned long type; };
  1408. - template<> struct largest<unsigned short,bool> { typedef unsigned short type; };
  1409. - template<> struct largest<unsigned short,unsigned char> { typedef unsigned short type; };
  1410. - template<> struct largest<unsigned short,char> { typedef int type; };
  1411. - template<> struct largest<unsigned short,short> { typedef int type; };
  1412. - template<> struct largest<short,bool> { typedef short type; };
  1413. - template<> struct largest<short,unsigned char> { typedef short type; };
  1414. - template<> struct largest<short,char> { typedef short type; };
  1415. - template<> struct largest<short,unsigned short> { typedef int type; };
  1416. - template<> struct largest<short,unsigned int> { typedef unsigned int type; };
  1417. - template<> struct largest<short,unsigned long> { typedef unsigned long type; };
  1418. - template<> struct largest<unsigned int,bool> { typedef unsigned int type; };
  1419. - template<> struct largest<unsigned int,unsigned char> { typedef unsigned int type; };
  1420. - template<> struct largest<unsigned int,char> { typedef unsigned int type; };
  1421. - template<> struct largest<unsigned int,unsigned short> { typedef unsigned int type; };
  1422. - template<> struct largest<unsigned int,short> { typedef unsigned int type; };
  1423. - template<> struct largest<unsigned int,int> { typedef unsigned int type; };
  1424. - template<> struct largest<int,bool> { typedef int type; };
  1425. - template<> struct largest<int,unsigned char> { typedef int type; };
  1426. - template<> struct largest<int,char> { typedef int type; };
  1427. - template<> struct largest<int,unsigned short> { typedef int type; };
  1428. - template<> struct largest<int,short> { typedef int type; };
  1429. - template<> struct largest<int,unsigned int> { typedef unsigned int type; };
  1430. - template<> struct largest<int,unsigned long> { typedef unsigned long type; };
  1431. - template<> struct largest<float,bool> { typedef float type; };
  1432. - template<> struct largest<float,unsigned char> { typedef float type; };
  1433. - template<> struct largest<float,char> { typedef float type; };
  1434. - template<> struct largest<float,unsigned short> { typedef float type; };
  1435. - template<> struct largest<float,short> { typedef float type; };
  1436. - template<> struct largest<float,unsigned int> { typedef float type; };
  1437. - template<> struct largest<float,int> { typedef float type; };
  1438. - template<> struct largest<float,unsigned long> { typedef float type; };
  1439. - template<> struct largest<float,long> { typedef float type; };
  1440. - template<> struct largest<double,bool> { typedef double type; };
  1441. - template<> struct largest<double,unsigned char> { typedef double type; };
  1442. - template<> struct largest<double,char> { typedef double type; };
  1443. - template<> struct largest<double,unsigned short> { typedef double type; };
  1444. - template<> struct largest<double,short> { typedef double type; };
  1445. - template<> struct largest<double,unsigned int> { typedef double type; };
  1446. - template<> struct largest<double,int> { typedef double type; };
  1447. - template<> struct largest<double,unsigned long> { typedef double type; };
  1448. - template<> struct largest<double,long> { typedef double type; };
  1449. - template<> struct largest<double,float> { typedef double type; };
  1450. -
  1451. - template<typename T> struct type {
  1452. - static T min() { return (T)-1>0?(T)0:(T)-1<<(8*sizeof(T)-1); }
  1453. - static T max() { return (T)-1>0?(T)-1:~((T)-1<<(8*sizeof(T)-1)); }
  1454. - static bool is_float() { return false; }
  1455. - static const char* id() { static const char *const s = "unknown"; return s; }
  1456. - };
  1457. - template<> struct type<bool> {
  1458. - static bool min() { return false; }
  1459. - static bool max() { return true; }
  1460. - static bool is_float() { return false; }
  1461. - static const char* id() { static const char *const s = "bool"; return s; }
  1462. - };
  1463. - template<> struct type<unsigned char> {
  1464. - static unsigned char min() { return 0; }
  1465. - static unsigned char max() { return (unsigned char)~0U; }
  1466. - static bool is_float() { return false; }
  1467. - static const char* id() { static const char *const s = "unsigned char"; return s; }
  1468. - };
  1469. - template<> struct type<char> {
  1470. - static char min() { return (char)-1<<(8*sizeof(char)-1); }
  1471. - static char max() { return ~((char)-1<<(8*sizeof(char)-1)); }
  1472. - static bool is_float() { return false; }
  1473. - static const char* id() { static const char *const s = "char"; return s; }
  1474. - };
  1475. - template<> struct type<unsigned short> {
  1476. - static unsigned short min() { return 0; }
  1477. - static unsigned short max() { return (unsigned short)~0U; }
  1478. - static bool is_float() { return false; }
  1479. - static const char* id() { static const char *const s = "unsigned short"; return s; }
  1480. - };
  1481. - template<> struct type<short> {
  1482. - static short min() { return (short)-1<<(8*sizeof(short)-1); }
  1483. - static short max() { return ~((short)-1<<(8*sizeof(short)-1)); }
  1484. - static bool is_float() { return false; }
  1485. - static const char* id() { static const char *const s = "short"; return s; }
  1486. - };
  1487. - template<> struct type<unsigned int> {
  1488. - static unsigned int min() { return 0; }
  1489. - static unsigned int max() { return (unsigned int)~0U; }
  1490. - static bool is_float() { return false; }
  1491. - static const char* id() { static const char *const s = "unsigned int"; return s; }
  1492. - };
  1493. - template<> struct type<int> {
  1494. - static int min() { return (int)-1<<(8*sizeof(int)-1); }
  1495. - static int max() { return ~((int)-1<<(8*sizeof(int)-1)); }
  1496. - static bool is_float() { return false; }
  1497. - static const char* id() { static const char *const s = "int"; return s; }
  1498. - };
  1499. - template<> struct type<unsigned long> {
  1500. - static unsigned long min() { return 0; }
  1501. - static unsigned long max() { return (unsigned long)~0UL; }
  1502. - static bool is_float() { return false; }
  1503. - static const char* id() { static const char *const s = "unsigned long"; return s; }
  1504. - };
  1505. - template<> struct type<long> {
  1506. - static long min() { return (long)-1<<(8*sizeof(long)-1); }
  1507. - static long max() { return ~((long)-1<<(8*sizeof(long)-1)); }
  1508. - static bool is_float() { return false; }
  1509. - static const char* id() { static const char *const s = "long"; return s; }
  1510. - };
  1511. - template<> struct type<float> {
  1512. - static float min() { return -3.4E38f; }
  1513. - static float max() { return 3.4E38f; }
  1514. - static bool is_float() { return true; }
  1515. - static const char* id() { static const char *const s = "float"; return s; }
  1516. - };
  1517. - template<> struct type<double> {
  1518. - static double min() { return -1.7E308; }
  1519. - static double max() { return 1.7E308; }
  1520. - static bool is_float() { return true; }
  1521. - static const char* id() { static const char *const s = "double"; return s; }
  1522. - };
  1523. -
  1524. - // Define internal library variables.
  1525. -#if cimg_display_type==1
  1526. - struct X11info {
  1527. - volatile unsigned int nb_wins;
  1528. - pthread_mutex_t* mutex;
  1529. - pthread_t* event_thread;
  1530. - CImgDisplay* wins[1024];
  1531. - Display* display;
  1532. - unsigned int nb_bits;
  1533. - GC* gc;
  1534. - bool blue_first;
  1535. - bool byte_order;
  1536. - bool shm_enabled;
  1537. -#ifdef cimg_use_xrandr
  1538. - XRRScreenSize *resolutions;
  1539. - Rotation curr_rotation;
  1540. - unsigned int curr_resolution;
  1541. - unsigned int nb_resolutions;
  1542. -#endif
  1543. - X11info():nb_wins(0),mutex(0),event_thread(0),display(0),
  1544. - nb_bits(0),gc(0),blue_first(false),byte_order(false),shm_enabled(false) {
  1545. -#ifdef cimg_use_xrandr
  1546. - resolutions = 0;
  1547. - curr_rotation = 0;
  1548. - curr_resolution = nb_resolutions = 0;
  1549. -#endif
  1550. - }
  1551. - };
  1552. -#if defined(cimg_module)
  1553. - X11info& X11attr();
  1554. -#elif defined(cimg_main)
  1555. - X11info& X11attr() { static X11info val; return val; }
  1556. -#else
  1557. - inline X11info& X11attr() { static X11info val; return val; }
  1558. -#endif
  1559. -
  1560. -#elif cimg_display_type==2
  1561. - struct Win32info {
  1562. - HANDLE wait_event;
  1563. - Win32info() { wait_event = CreateEvent(0,FALSE,FALSE,0); }
  1564. - };
  1565. -#if defined(cimg_module)
  1566. - Win32info& Win32attr();
  1567. -#elif defined(cimg_main)
  1568. - Win32info& Win32attr() { static Win32info val; return val; }
  1569. -#else
  1570. - inline Win32info& Win32attr() { static Win32info val; return val; }
  1571. -#endif
  1572. -#endif
  1573. -
  1574. - inline unsigned int& exception_mode() { static unsigned int mode=cimg_debug; return mode; }
  1575. -
  1576. -#ifdef cimg_color_terminal
  1577. - const char t_normal[9] = {0x1b,'[','0',';','0',';','0','m','\0'};
  1578. - const char t_red[11] = {0x1b,'[','4',';','3','1',';','5','9','m','\0'};
  1579. - const char t_bold[5] = {0x1b,'[','1','m','\0'};
  1580. - const char t_purple[11] = {0x1b,'[','0',';','3','5',';','5','9','m','\0'};
  1581. -#else
  1582. - const char t_normal[1] = {'\0'};
  1583. - const char *const t_red = cimg::t_normal, *const t_bold = cimg::t_normal, *const t_purple = cimg::t_normal;
  1584. -#endif
  1585. -
  1586. -#if cimg_display_type==1
  1587. - // Keycodes for X11-based graphical systems
  1588. - const unsigned int keyESC = XK_Escape;
  1589. - const unsigned int keyF1 = XK_F1;
  1590. - const unsigned int keyF2 = XK_F2;
  1591. - const unsigned int keyF3 = XK_F3;
  1592. - const unsigned int keyF4 = XK_F4;
  1593. - const unsigned int keyF5 = XK_F5;
  1594. - const unsigned int keyF6 = XK_F6;
  1595. - const unsigned int keyF7 = XK_F7;
  1596. - const unsigned int keyF8 = XK_F8;
  1597. - const unsigned int keyF9 = XK_F9;
  1598. - const unsigned int keyF10 = XK_F10;
  1599. - const unsigned int keyF11 = XK_F11;
  1600. - const unsigned int keyF12 = XK_F12;
  1601. - const unsigned int keyPAUSE = XK_Pause;
  1602. - const unsigned int key1 = XK_1;
  1603. - const unsigned int key2 = XK_2;
  1604. - const unsigned int key3 = XK_3;
  1605. - const unsigned int key4 = XK_4;
  1606. - const unsigned int key5 = XK_5;
  1607. - const unsigned int key6 = XK_6;
  1608. - const unsigned int key7 = XK_7;
  1609. - const unsigned int key8 = XK_8;
  1610. - const unsigned int key9 = XK_9;
  1611. - const unsigned int key0 = XK_0;
  1612. - const unsigned int keyBACKSPACE = XK_BackSpace;
  1613. - const unsigned int keyINSERT = XK_Insert;
  1614. - const unsigned int keyHOME = XK_Home;
  1615. - const unsigned int keyPAGEUP = XK_Page_Up;
  1616. - const unsigned int keyTAB = XK_Tab;
  1617. - const unsigned int keyQ = XK_q;
  1618. - const unsigned int keyW = XK_w;
  1619. - const unsigned int keyE = XK_e;
  1620. - const unsigned int keyR = XK_r;
  1621. - const unsigned int keyT = XK_t;
  1622. - const unsigned int keyY = XK_y;
  1623. - const unsigned int keyU = XK_u;
  1624. - const unsigned int keyI = XK_i;
  1625. - const unsigned int keyO = XK_o;
  1626. - const unsigned int keyP = XK_p;
  1627. - const unsigned int keyDELETE = XK_Delete;
  1628. - const unsigned int keyEND = XK_End;
  1629. - const unsigned int keyPAGEDOWN = XK_Page_Down;
  1630. - const unsigned int keyCAPSLOCK = XK_Caps_Lock;
  1631. - const unsigned int keyA = XK_a;
  1632. - const unsigned int keyS = XK_s;
  1633. - const unsigned int keyD = XK_d;
  1634. - const unsigned int keyF = XK_f;
  1635. - const unsigned int keyG = XK_g;
  1636. - const unsigned int keyH = XK_h;
  1637. - const unsigned int keyJ = XK_j;
  1638. - const unsigned int keyK = XK_k;
  1639. - const unsigned int keyL = XK_l;
  1640. - const unsigned int keyENTER = XK_Return;
  1641. - const unsigned int keySHIFTLEFT = XK_Shift_L;
  1642. - const unsigned int keyZ = XK_z;
  1643. - const unsigned int keyX = XK_x;
  1644. - const unsigned int keyC = XK_c;
  1645. - const unsigned int keyV = XK_v;
  1646. - const unsigned int keyB = XK_b;
  1647. - const unsigned int keyN = XK_n;
  1648. - const unsigned int keyM = XK_m;
  1649. - const unsigned int keySHIFTRIGHT = XK_Shift_R;
  1650. - const unsigned int keyARROWUP = XK_Up;
  1651. - const unsigned int keyCTRLLEFT = XK_Control_L;
  1652. - const unsigned int keyAPPLEFT = XK_Super_L;
  1653. - const unsigned int keySPACE = XK_space;
  1654. - const unsigned int keyALTGR = XK_Alt_R;
  1655. - const unsigned int keyAPPRIGHT = XK_Super_R;
  1656. - const unsigned int keyMENU = XK_Menu;
  1657. - const unsigned int keyCTRLRIGHT = XK_Control_R;
  1658. - const unsigned int keyARROWLEFT = XK_Left;
  1659. - const unsigned int keyARROWDOWN = XK_Down;
  1660. - const unsigned int keyARROWRIGHT = XK_Right;
  1661. - const unsigned int keyPAD0 = XK_KP_0;
  1662. - const unsigned int keyPAD1 = XK_KP_1;
  1663. - const unsigned int keyPAD2 = XK_KP_2;
  1664. - const unsigned int keyPAD3 = XK_KP_3;
  1665. - const unsigned int keyPAD4 = XK_KP_4;
  1666. - const unsigned int keyPAD5 = XK_KP_5;
  1667. - const unsigned int keyPAD6 = XK_KP_6;
  1668. - const unsigned int keyPAD7 = XK_KP_7;
  1669. - const unsigned int keyPAD8 = XK_KP_8;
  1670. - const unsigned int keyPAD9 = XK_KP_9;
  1671. - const unsigned int keyPADADD = XK_KP_Add;
  1672. - const unsigned int keyPADSUB = XK_KP_Subtract;
  1673. - const unsigned int keyPADMUL = XK_KP_Multiply;
  1674. - const unsigned int keyPADDIV = XK_KP_Divide;
  1675. -
  1676. -#elif (cimg_display_type==2 && cimg_OS==2)
  1677. - // Keycodes for Windows-OS
  1678. - const unsigned int keyESC = VK_ESCAPE;
  1679. - const unsigned int keyF1 = VK_F1;
  1680. - const unsigned int keyF2 = VK_F2;
  1681. - const unsigned int keyF3 = VK_F3;
  1682. - const unsigned int keyF4 = VK_F4;
  1683. - const unsigned int keyF5 = VK_F5;
  1684. - const unsigned int keyF6 = VK_F6;
  1685. - const unsigned int keyF7 = VK_F7;
  1686. - const unsigned int keyF8 = VK_F8;
  1687. - const unsigned int keyF9 = VK_F9;
  1688. - const unsigned int keyF10 = VK_F10;
  1689. - const unsigned int keyF11 = VK_F11;
  1690. - const unsigned int keyF12 = VK_F12;
  1691. - const unsigned int keyPAUSE = VK_PAUSE;
  1692. - const unsigned int key1 = '1';
  1693. - const unsigned int key2 = '2';
  1694. - const unsigned int key3 = '3';
  1695. - const unsigned int key4 = '4';
  1696. - const unsigned int key5 = '5';
  1697. - const unsigned int key6 = '6';
  1698. - const unsigned int key7 = '7';
  1699. - const unsigned int key8 = '8';
  1700. - const unsigned int key9 = '9';
  1701. - const unsigned int key0 = '0';
  1702. - const unsigned int keyBACKSPACE = VK_BACK;
  1703. - const unsigned int keyINSERT = VK_INSERT;
  1704. - const unsigned int keyHOME = VK_HOME;
  1705. - const unsigned int keyPAGEUP = VK_PRIOR;
  1706. - const unsigned int keyTAB = VK_TAB;
  1707. - const unsigned int keyQ = 'Q';
  1708. - const unsigned int keyW = 'W';
  1709. - const unsigned int keyE = 'E';
  1710. - const unsigned int keyR = 'R';
  1711. - const unsigned int keyT = 'T';
  1712. - const unsigned int keyY = 'Y';
  1713. - const unsigned int keyU = 'U';
  1714. - const unsigned int keyI = 'I';
  1715. - const unsigned int keyO = 'O';
  1716. - const unsigned int keyP = 'P';
  1717. - const unsigned int keyDELETE = VK_DELETE;
  1718. - const unsigned int keyEND = VK_END;
  1719. - const unsigned int keyPAGEDOWN = VK_NEXT;
  1720. - const unsigned int keyCAPSLOCK = VK_CAPITAL;
  1721. - const unsigned int keyA = 'A';
  1722. - const unsigned int keyS = 'S';
  1723. - const unsigned int keyD = 'D';
  1724. - const unsigned int keyF = 'F';
  1725. - const unsigned int keyG = 'G';
  1726. - const unsigned int keyH = 'H';
  1727. - const unsigned int keyJ = 'J';
  1728. - const unsigned int keyK = 'K';
  1729. - const unsigned int keyL = 'L';
  1730. - const unsigned int keyENTER = VK_RETURN;
  1731. - const unsigned int keySHIFTLEFT = VK_SHIFT;
  1732. - const unsigned int keyZ = 'Z';
  1733. - const unsigned int keyX = 'X';
  1734. - const unsigned int keyC = 'C';
  1735. - const unsigned int keyV = 'V';
  1736. - const unsigned int keyB = 'B';
  1737. - const unsigned int keyN = 'N';
  1738. - const unsigned int keyM = 'M';
  1739. - const unsigned int keySHIFTRIGHT = VK_SHIFT;
  1740. - const unsigned int keyARROWUP = VK_UP;
  1741. - const unsigned int keyCTRLLEFT = VK_CONTROL;
  1742. - const unsigned int keyAPPLEFT = VK_LWIN;
  1743. - const unsigned int keySPACE = VK_SPACE;
  1744. - const unsigned int keyALTGR = VK_CONTROL;
  1745. - const unsigned int keyAPPRIGHT = VK_RWIN;
  1746. - const unsigned int keyMENU = VK_APPS;
  1747. - const unsigned int keyCTRLRIGHT = VK_CONTROL;
  1748. - const unsigned int keyARROWLEFT = VK_LEFT;
  1749. - const unsigned int keyARROWDOWN = VK_DOWN;
  1750. - const unsigned int keyARROWRIGHT = VK_RIGHT;
  1751. - const unsigned int keyPAD0 = 0x60;
  1752. - const unsigned int keyPAD1 = 0x61;
  1753. - const unsigned int keyPAD2 = 0x62;
  1754. - const unsigned int keyPAD3 = 0x63;
  1755. - const unsigned int keyPAD4 = 0x64;
  1756. - const unsigned int keyPAD5 = 0x65;
  1757. - const unsigned int keyPAD6 = 0x66;
  1758. - const unsigned int keyPAD7 = 0x67;
  1759. - const unsigned int keyPAD8 = 0x68;
  1760. - const unsigned int keyPAD9 = 0x69;
  1761. - const unsigned int keyPADADD = VK_ADD;
  1762. - const unsigned int keyPADSUB = VK_SUBTRACT;
  1763. - const unsigned int keyPADMUL = VK_MULTIPLY;
  1764. - const unsigned int keyPADDIV = VK_DIVIDE;
  1765. -#else
  1766. - // Define unknow keycodes when no display
  1767. - const unsigned int keyESC = 1U;
  1768. - const unsigned int keyF1 = 2U;
  1769. - const unsigned int keyF2 = 3U;
  1770. - const unsigned int keyF3 = 4U;
  1771. - const unsigned int keyF4 = 5U;
  1772. - const unsigned int keyF5 = 6U;
  1773. - const unsigned int keyF6 = 7U;
  1774. - const unsigned int keyF7 = 8U;
  1775. - const unsigned int keyF8 = 9U;
  1776. - const unsigned int keyF9 = 10U;
  1777. - const unsigned int keyF10 = 11U;
  1778. - const unsigned int keyF11 = 12U;
  1779. - const unsigned int keyF12 = 13U;
  1780. - const unsigned int keyPAUSE = 14U;
  1781. - const unsigned int key1 = 15U;
  1782. - const unsigned int key2 = 16U;
  1783. - const unsigned int key3 = 17U;
  1784. - const unsigned int key4 = 18U;
  1785. - const unsigned int key5 = 19U;
  1786. - const unsigned int key6 = 20U;
  1787. - const unsigned int key7 = 21U;
  1788. - const unsigned int key8 = 22U;
  1789. - const unsigned int key9 = 23U;
  1790. - const unsigned int key0 = 24U;
  1791. - const unsigned int keyBACKSPACE = 25U;
  1792. - const unsigned int keyINSERT = 26U;
  1793. - const unsigned int keyHOME = 27U;
  1794. - const unsigned int keyPAGEUP = 28U;
  1795. - const unsigned int keyTAB = 29U;
  1796. - const unsigned int keyQ = 30U;
  1797. - const unsigned int keyW = 31U;
  1798. - const unsigned int keyE = 32U;
  1799. - const unsigned int keyR = 33U;
  1800. - const unsigned int keyT = 34U;
  1801. - const unsigned int keyY = 35U;
  1802. - const unsigned int keyU = 36U;
  1803. - const unsigned int keyI = 37U;
  1804. - const unsigned int keyO = 38U;
  1805. - const unsigned int keyP = 39U;
  1806. - const unsigned int keyDELETE = 40U;
  1807. - const unsigned int keyEND = 41U;
  1808. - const unsigned int keyPAGEDOWN = 42U;
  1809. - const unsigned int keyCAPSLOCK = 43U;
  1810. - const unsigned int keyA = 44U;
  1811. - const unsigned int keyS = 45U;
  1812. - const unsigned int keyD = 46U;
  1813. - const unsigned int keyF = 47U;
  1814. - const unsigned int keyG = 48U;
  1815. - const unsigned int keyH = 49U;
  1816. - const unsigned int keyJ = 50U;
  1817. - const unsigned int keyK = 51U;
  1818. - const unsigned int keyL = 52U;
  1819. - const unsigned int keyENTER = 53U;
  1820. - const unsigned int keySHIFTLEFT = 54U;
  1821. - const unsigned int keyZ = 55U;
  1822. - const unsigned int keyX = 56U;
  1823. - const unsigned int keyC = 57U;
  1824. - const unsigned int keyV = 58U;
  1825. - const unsigned int keyB = 59U;
  1826. - const unsigned int keyN = 60U;
  1827. - const unsigned int keyM = 61U;
  1828. - const unsigned int keySHIFTRIGHT = 62U;
  1829. - const unsigned int keyARROWUP = 63U;
  1830. - const unsigned int keyCTRLLEFT = 64U;
  1831. - const unsigned int keyAPPLEFT = 65U;
  1832. - const unsigned int keySPACE = 66U;
  1833. - const unsigned int keyALTGR = 67U;
  1834. - const unsigned int keyAPPRIGHT = 68U;
  1835. - const unsigned int keyMENU = 69U;
  1836. - const unsigned int keyCTRLRIGHT = 70U;
  1837. - const unsigned int keyARROWLEFT = 71U;
  1838. - const unsigned int keyARROWDOWN = 72U;
  1839. - const unsigned int keyARROWRIGHT = 73U;
  1840. - const unsigned int keyPAD0 = 74U;
  1841. - const unsigned int keyPAD1 = 75U;
  1842. - const unsigned int keyPAD2 = 76U;
  1843. - const unsigned int keyPAD3 = 77U;
  1844. - const unsigned int keyPAD4 = 78U;
  1845. - const unsigned int keyPAD5 = 79U;
  1846. - const unsigned int keyPAD6 = 80U;
  1847. - const unsigned int keyPAD7 = 81U;
  1848. - const unsigned int keyPAD8 = 82U;
  1849. - const unsigned int keyPAD9 = 83U;
  1850. - const unsigned int keyPADADD = 84U;
  1851. - const unsigned int keyPADSUB = 85U;
  1852. - const unsigned int keyPADMUL = 86U;
  1853. - const unsigned int keyPADDIV = 87U;
  1854. -#endif
  1855. -
  1856. -#ifdef PI
  1857. -#undef PI
  1858. -#endif
  1859. - const double PI = 3.14159265358979323846; //!< Definition of the mathematical constant PI
  1860. -
  1861. - // Definition of a 7x11 font, used to return a default font for drawing text.
  1862. - const unsigned int font7x11[7*11*256/32] = {
  1863. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1864. - 0x0,0x0,0x0,0x0,0x0,0x0,0x90,0x0,0x7f0000,0x40000,0x0,0x0,0x4010c0a4,0x82000040,0x11848402,0x18480050,0x80430292,0x8023,0x9008000,
  1865. - 0x40218140,0x4000040,0x21800402,0x18000051,0x1060500,0x8083,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24002,0x4031,0x80000000,0x10000,
  1866. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c0400,0x40020000,0x80070080,0x40440e00,0x0,0x0,0x1,0x88180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1867. - 0x0,0x200000,0x0,0x0,0x80000,0x0,0x0,0x20212140,0x5000020,0x22400204,0x240000a0,0x40848500,0x4044,0x80010038,0x20424285,0xa000020,
  1868. - 0x42428204,0x2428e0a0,0x82090a14,0x4104,0x85022014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10240a7,0x88484040,0x40800000,0x270c3,0x87811e0e,
  1869. - 0x7c70e000,0x78,0x3c23c1ef,0x1f3e1e89,0xf1c44819,0xa23cf0f3,0xc3cff120,0xc18307f4,0x4040400,0x20000,0x80080080,0x40200,0x0,
  1870. - 0x40000,0x2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8188,0x50603800,0xf3c00000,0x1c004003,0xc700003e,0x18180,0xc993880,0x10204081,
  1871. - 0x2071ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x7d1224,0x48906048,0x0,0x4000000,0x0,0x9000,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,
  1872. - 0x0,0x10240aa,0x14944080,0x23610000,0x68940,0x40831010,0x8891306,0x802044,0x44522208,0x90202088,0x40448819,0xb242890a,0x24011111,
  1873. - 0x49448814,0x4040a00,0xe2c3c7,0x8e3f3cb9,0xc1c44216,0xee38b0f2,0xe78f9120,0xc18507e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1874. - 0x101c207,0x88a04001,0x9c00000,0x2200a041,0x8200113a,0x8240,0x50a3110,0x2850a142,0x850c2081,0x2040204,0x8104592,0x142850a1,
  1875. - 0x42cd1224,0x4888bc48,0x70e1c387,0xe3b3c70,0xe1c38e1c,0x38707171,0xc3870e1c,0x10791224,0x48906c41,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1876. - 0x10003ee,0x15140080,0x21810000,0x48840,0x40851020,0x8911306,0x31fd804,0x9c522408,0x90204088,0x4045081a,0xba42890a,0x24011111,
  1877. - 0x49285024,0x2041b00,0x132408,0x910844c8,0x4044821b,0x7244c913,0x24041111,0x49488822,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1878. - 0x28204,0x85006001,0x6a414000,0x3a004043,0xc700113a,0x8245,0x50a3a00,0x2850a142,0x850c4081,0x2040204,0x81045d2,0x142850a1,
  1879. - 0x24951224,0x48852250,0x8102040,0x81054089,0x12244204,0x8108992,0x24489122,0x991224,0x4888b222,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1880. - 0x1000143,0xa988080,0x2147c01f,0x88840,0x83091c2c,0x1070f000,0xc000608,0xa48bc408,0x9e3c46f8,0x40460816,0xaa42f10b,0xc3811111,
  1881. - 0x35102044,0x1041100,0xf22408,0x9f084488,0x40470212,0x62448912,0x6041111,0x55308846,0x8061c80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1882. - 0x1028704,0x8f805801,0x4be28fdf,0x220001f0,0x111a,0x60000182,0x82c5c710,0x44891224,0x489640f1,0xe3c78204,0x810e552,0x142850a1,
  1883. - 0x18a51224,0x48822250,0x78f1e3c7,0x8f1f40f9,0xf3e7c204,0x8108912,0x24489122,0x7ea91224,0x4888a222,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1884. - 0x10007e2,0x85648080,0x20010000,0x88841,0x8f8232,0x20881000,0xc1fc610,0xbefa2408,0x90204288,0x40450816,0xa642810a,0x4041110a,
  1885. - 0x36282084,0x1042080,0x1122408,0x90084488,0x40450212,0x62448912,0x184110a,0x55305082,0x8042700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1886. - 0x1028207,0x82004801,0x68050040,0x1c000040,0x110a,0x60000001,0x45484d10,0x7cf9f3e7,0xcf944081,0x2040204,0x8104532,0x142850a1,
  1887. - 0x18a51224,0x48822248,0x89122448,0x91244081,0x2040204,0x8108912,0x24489122,0xc91224,0x48852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x282,
  1888. - 0x89630080,0x20010c00,0x30108842,0x810222,0x20882306,0x3001800,0x408a2208,0x90202288,0x40448814,0xa642810a,0x2041110a,0x26442104,
  1889. - 0x840000,0x1122408,0x90084488,0x40448212,0x62448912,0x84130a,0x36485102,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x101c208,0x4f802801,
  1890. - 0x8028040,0x40,0x130a,0x2,0x85e897a0,0x44891224,0x489c2081,0x2040204,0x8104532,0x142850a1,0x24cd1224,0x48823c44,0x89122448,
  1891. - 0x91244081,0x2040204,0x8108912,0x24489122,0xc93264,0xc9852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100028f,0x109f0080,0x20010c00,
  1892. - 0x303071f3,0xc7011c1c,0x4071c306,0x802010,0x3907c1ef,0x1f201e89,0xf3844f90,0xa23c80f2,0x17810e04,0x228223f4,0x840000,0xfbc3c7,
  1893. - 0x8f083c88,0x40444212,0x6238f0f2,0x7039d04,0x228423e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1008780,0x2201800,0xf0014000,0x1f0,
  1894. - 0x1d0a,0x5,0x851e140,0x83060c18,0x30671ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x42f8e1c3,0x8702205c,0x7cf9f3e7,0xcf9b3c78,0xf1e3c204,
  1895. - 0x8107111,0xc3870e1c,0x10f1d3a7,0x4e823c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x40,0x40000400,0x200000,0x0,0x2,0x0,0x0,0x0,0x0,0x18,
  1896. - 0x0,0x4,0x44007f,0x0,0x400,0x400000,0x8010,0x0,0x6002,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x200800,0x0,0x0,0x100a,
  1897. - 0x400000,0x44,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x62018,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x31,0x80000800,
  1898. - 0x400000,0x0,0x4,0x0,0x0,0x0,0x0,0xc,0x0,0x7,0x3c0000,0x0,0x3800,0x3800000,0x8010,0x0,0x1c001,0x881c0000,0x0,0x0,0x0,0x0,0x0,0x0,
  1899. - 0x0,0x0,0x207000,0x0,0x0,0x100a,0xc00000,0x3c,0x0,0xc00,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x1c2070
  1900. - };
  1901. -
  1902. - // Definition of a 10x13 font (used in dialog boxes).
  1903. - const unsigned int font10x13[256*10*13/32] = {
  1904. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1905. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80100c0,
  1906. - 0x68000300,0x801,0xc00010,0x100c000,0x68100,0x100c0680,0x2,0x403000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1907. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1908. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x0,0x0,0x0,0x0,0x0,0x4020120,
  1909. - 0x58120480,0x402,0x1205008,0x2012050,0x58080,0x20120581,0x40000001,0x804812,0x2000000,0x0,0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1910. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x140,0x80000,0x200402,0x800000,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1911. - 0x0,0x7010,0x7000000,0x8000200,0x20000,0xc0002000,0x8008,0x0,0x0,0x0,0x0,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1912. - 0x0,0x0,0x80000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x80100c0,0x68000480,0x1001,
  1913. - 0xc00010,0x1018000,0x68100,0x100c0680,0x4,0x403000,0x1020000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140,0x28081883,0x200801,
  1914. - 0x2a00000,0x10,0x1c0201c0,0x70040f80,0xc0f81c07,0x0,0x70,0x3e0303c0,0x3c3c0f83,0xe03c2107,0xe08810,0x18c31070,0x3c0703c0,
  1915. - 0x783e0842,0x22222208,0x83e04010,0x1008000,0x4000200,0x20001,0x2002,0x408008,0x0,0x0,0x100000,0x0,0x1008,0x2000000,0x0,0x0,0x0,
  1916. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080,0x38000880,0x8078140f,0x81c00000,0x3e000,0xc020180,0x60080001,0xe0000002,0xc00042,0x108e2010,
  1917. - 0xc0300c0,0x300c0303,0xf83c3e0f,0x83e0f81c,0x701c070,0x3c0c41c0,0x701c0701,0xc0001d08,0x42108421,0x8820088,0x4020120,0x58140480,
  1918. - 0x802,0x1205008,0x3014050,0xc058080,0x20120581,0x40000002,0x804814,0x2020050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140,
  1919. - 0x281e2484,0x80200801,0x1c02000,0x10,0x22060220,0x880c0801,0x82208,0x80000001,0x20008,0x41030220,0x40220802,0x402102,0x209010,
  1920. - 0x18c31088,0x22088220,0x80080842,0x22222208,0x80204010,0x1014000,0x200,0x20001,0x2000,0x8008,0x0,0x0,0x100000,0x0,0x1008,
  1921. - 0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x40000500,0x80800010,0x40200000,0x41000,0x12020040,0x10000003,0xa0000006,
  1922. - 0x12000c4,0x31014000,0xc0300c0,0x300c0302,0x80402008,0x2008008,0x2008020,0x220c4220,0x88220882,0x20002208,0x42108421,0x8820088,
  1923. - 0x0,0x300,0x0,0x0,0x0,0x14000000,0x0,0x200200,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xfc282504,0x80001000,
  1924. - 0x82a02000,0x20,0x22020020,0x8140802,0x102208,0x80801006,0x18008,0x9c848220,0x80210802,0x802102,0x20a010,0x15429104,0x22104220,
  1925. - 0x80080842,0x22221405,0x404008,0x1022000,0x703c0,0x381e0701,0xc0783c02,0xc09008,0x1d83c070,0x3c078140,0x381c0882,0x21242208,
  1926. - 0x81e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0,0x40220500,0x80800027,0x20e02800,0x9c800,0x12020040,
  1927. - 0x20000883,0xa0200002,0x120a044,0x11064010,0x12048120,0x48120484,0x80802008,0x2008008,0x2008020,0x210a4411,0x4411044,0x10884508,
  1928. - 0x42108421,0x503c0b0,0x1c0701c0,0x701c0707,0x70381c07,0x1c07008,0x2008020,0x20f01c0,0x701c0701,0xc0201c08,0x82208822,0x883c088,
  1929. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x50281903,0x20001000,0x80802000,0x20,0x22020040,0x30240f03,0xc0101c08,0x80801018,
  1930. - 0x1fc06010,0xa48483c0,0x80210f03,0xe0803f02,0x20c010,0x15429104,0x22104220,0x70080841,0x41540805,0x804008,0x1041000,0x8220,
  1931. - 0x40220881,0x882202,0x40a008,0x12422088,0x22088180,0x40100882,0x21241408,0x80201008,0x2031000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1932. - 0x0,0x20280,0x401c0200,0x700028,0x21205000,0x92800,0xc1fc080,0x10000883,0xa0200002,0x1205049,0x12c19010,0x12048120,0x48120484,
  1933. - 0xf0803c0f,0x3c0f008,0x2008020,0x790a4411,0x4411044,0x10504908,0x42108421,0x5022088,0x2008020,0x8020080,0x88402208,0x82208808,
  1934. - 0x2008020,0x1e088220,0x88220882,0x20002608,0x82208822,0x8822088,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x501c0264,
  1935. - 0xa0001000,0x8001fc00,0x7000020,0x22020080,0x83e0082,0x20202207,0x80000020,0x1020,0xa4848220,0x80210802,0x9c2102,0x20c010,
  1936. - 0x12425104,0x3c1043c0,0x8080841,0x41540802,0x804008,0x1000000,0x78220,0x40220f81,0x882202,0x40c008,0x12422088,0x22088100,
  1937. - 0x60100881,0x41540805,0x406008,0x1849000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0xf0140200,0x880028,0x20e0a03f,0x709c800,
  1938. - 0x201c0,0x60000881,0xa0000007,0xc0284b,0x122eb020,0x12048120,0x48120487,0x80802008,0x2008008,0x2008020,0x21094411,0x4411044,
  1939. - 0x10204908,0x42108421,0x2022088,0x1e0781e0,0x781e0787,0xf8403e0f,0x83e0f808,0x2008020,0x22088220,0x88220882,0x21fc2a08,0x82208822,
  1940. - 0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xf80a0294,0x40001000,0x80002000,0x20,0x22020100,0x8040082,0x20202200,
  1941. - 0x80000018,0x1fc06020,0xa48fc220,0x80210802,0x842102,0x20a010,0x12425104,0x20104240,0x8080841,0x41541402,0x1004008,0x1000000,
  1942. - 0x88220,0x40220801,0x882202,0x40a008,0x12422088,0x22088100,0x18100881,0x41540805,0x801008,0x2046000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1943. - 0x0,0x0,0x0,0x20280,0x401c0f80,0x80880028,0x20005001,0x94800,0x20000,0x880,0xa0000000,0x5015,0x4215040,0x3f0fc3f0,0xfc3f0fc8,
  1944. - 0x80802008,0x2008008,0x2008020,0x21094411,0x4411044,0x10505108,0x42108421,0x203c088,0x22088220,0x88220888,0x80402008,0x2008008,
  1945. - 0x2008020,0x22088220,0x88220882,0x20002a08,0x82208822,0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa00a0494,0x60001000,
  1946. - 0x80002004,0x8020,0x22020200,0x88040882,0x20402201,0x801006,0x18000,0x9f084220,0x40220802,0x442102,0x209010,0x10423088,0x20088220,
  1947. - 0x8080840,0x80882202,0x2004008,0x1000000,0x88220,0x40220881,0x882202,0x409008,0x12422088,0x22088100,0x8100880,0x80881402,
  1948. - 0x1001008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0x40220200,0x80700027,0x20002801,0x92800,0x1fc000,0x980,
  1949. - 0xa0000000,0xa017,0x84417840,0x21084210,0x84210848,0x80402008,0x2008008,0x2008020,0x2208c220,0x88220882,0x20882208,0x42108421,
  1950. - 0x2020088,0x22088220,0x88220888,0xc8402208,0x82208808,0x2008020,0x22088220,0x88220882,0x20203208,0x82208822,0x2022020,0x0,0x0,0x0,
  1951. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xa03c0463,0x90000801,0x2004,0x8040,0x1c0703e0,0x70040701,0xc0401c06,0x801001,0x20020,
  1952. - 0x400843c0,0x3c3c0f82,0x3c2107,0x1c0881e,0x10423070,0x20070210,0xf0080780,0x80882202,0x3e04004,0x1000000,0x783c0,0x381e0701,
  1953. - 0x782202,0x408808,0x12422070,0x3c078100,0x700c0780,0x80882202,0x1e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0,
  1954. - 0xf8000200,0x80080010,0x40000001,0x41000,0x0,0xe80,0xa0000000,0x21,0x8e21038,0x21084210,0x84210848,0xf83c3e0f,0x83e0f81c,
  1955. - 0x701c070,0x3c08c1c0,0x701c0701,0xc0005c07,0x81e0781e,0x20200b0,0x1e0781e0,0x781e0787,0x30381c07,0x1c07008,0x2008020,0x1c0881c0,
  1956. - 0x701c0701,0xc0201c07,0x81e0781e,0x203c020,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x801,0x4,0x40,0x0,0x0,0x0,0x1000,
  1957. - 0x0,0x3c000000,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x4004,0x1000000,0x0,0x0,0x80000,0x400000,0x0,0x20008000,0x0,0x4,0x1008,0x2000000,
  1958. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x8008000f,0x80000000,0x3e000,0x0,0x800,0xa0000400,0x0,0x0,0x0,0x0,0x80000,0x0,
  1959. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x2000,0x0,0x4020040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,
  1960. - 0x402,0x8,0x40,0x0,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x7004,0x70000fc,0x0,0x0,0x700000,0x800000,0x0,0x20008000,
  1961. - 0x0,0x4,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x80f00000,0x0,0x0,0x0,0x800,0xa0001800,0x0,0x0,0x0,0x0,
  1962. - 0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x4020040
  1963. - };
  1964. -
  1965. - // Definition of a 8x17 font
  1966. - const unsigned int font8x17[8*17*256/32] = {
  1967. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  1968. - 0x0,0x0,0x0,0x2400,0x2400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20081834,0x1c0000,0x20081800,0x20081800,0x342008,
  1969. - 0x18340000,0x200818,0x80000,0x0,0x180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4200000,0x0,0x0,
  1970. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x380000,0x4000,0x2000c00,0x40100840,0x70000000,0x0,0x0,0x1c,0x10700000,0x7,0x0,
  1971. - 0x1800,0x1800,0x0,0x0,0x0,0x14,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1010242c,0x14140000,0x10102414,0x10102414,0x2c1010,0x242c1400,
  1972. - 0x101024,0x14100038,0x0,0x240000,0x0,0x0,0x30000000,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12,0x0,0x8100000,0x0,
  1973. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x80000,0x10004000,0x2001000,0x40000040,0x10000000,0x0,0x0,0x10,0x10100000,0x4,
  1974. - 0x0,0x18000000,0x0,0x0,0x0,0x34002400,0x2400,0x0,0x0,0x0,0x3c,0x0,0x8000000,0x0,0x60607800,0x0,0x140000,0x0,0x0,0x0,0x0,0x0,
  1975. - 0x44,0x10081834,0x240000,0x10081800,0x10081800,0x1c341008,0x18340000,0x100818,0x84000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102812,
  1976. - 0x8601c10,0x8100800,0x2,0x1c383e3e,0x67e1e7f,0x3e3c0000,0x38,0x1e087e1e,0x7c7f7f1e,0x417c1c42,0x4063611c,0x7e1c7e3e,0xfe414181,
  1977. - 0x63827f10,0x40081000,0x8004000,0x2001000,0x40000040,0x10000000,0x0,0x10000000,0x10,0x10100000,0x3c000008,0x0,0x24003e00,
  1978. - 0x3f007f00,0x0,0x0,0x2ce91800,0x1882,0x10101c,0xc2103c,0x143c3c00,0x3c00,0x18003c3c,0x10001f00,0x181c00,0x20200810,0x8080808,
  1979. - 0x8083e1e,0x7f7f7f7f,0x7c7c7c7c,0x7c611c1c,0x1c1c1c00,0x1e414141,0x41824044,0x810242c,0x14180000,0x8102414,0x8102414,0x382c0810,
  1980. - 0x242c1400,0x81024,0x14104014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102816,0x3e902010,0x10084910,0x4,0x22084343,0xa402102,0x41620000,
  1981. - 0x44,0x33144121,0x42404021,0x41100444,0x40636122,0x43224361,0x10416381,0x22440310,0x20082800,0x4000,0x2001000,0x40000040,
  1982. - 0x10000000,0x0,0x10000000,0x10,0x10100000,0x24000008,0x0,0x606100,0x68000300,0x8106c,0x34000000,0x4f0000,0x44,0x101020,0x441040,
  1983. - 0x420200,0x4200,0x24000404,0x7d00,0x82200,0x20203010,0x14141414,0x14082821,0x40404040,0x10101010,0x42612222,0x22222200,0x23414141,
  1984. - 0x41447e48,0x0,0x0,0x0,0x0,0x4000000,0x18,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10287f,0x49902010,0x10083e10,0x4,0x41080101,
  1985. - 0x1a404002,0x41411818,0x1004004,0x21144140,0x41404040,0x41100448,0x40555141,0x41414140,0x10412281,0x14280610,0x20084400,0x1c7c1c,
  1986. - 0x3e3c7c3a,0x5c703844,0x107f5c3c,0x7c3e3c3c,0x7e424281,0x66427e10,0x10100000,0x40100008,0x1010,0xa04000,0x48100610,0x100c3024,
  1987. - 0x24000000,0x4f3c00,0x2c107e28,0x3820,0x42281060,0x9d1e12,0xbd00,0x24100818,0x427d00,0x82248,0x20200800,0x14141414,0x14142840,
  1988. - 0x40404040,0x10101010,0x41514141,0x41414142,0x43414141,0x41284350,0x1c1c1c1c,0x1c1c6c1c,0x3c3c3c3c,0x70707070,0x3c5c3c3c,
  1989. - 0x3c3c3c18,0x3e424242,0x42427c42,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102824,0x48623010,0x10081c10,0x8,0x41080103,0x127c5e04,
  1990. - 0x41411818,0xe7f3808,0x4f144140,0x41404040,0x41100450,0x40555141,0x41414160,0x1041225a,0x1c280410,0x1008c600,0x226622,0x66661066,
  1991. - 0x62100848,0x10496266,0x66663242,0x10426681,0x24220260,0x100c0000,0xf8280008,0x1010,0x606000,0x48280428,0x28042014,0x48000000,
  1992. - 0x494200,0x52280228,0x105420,0x3cee1058,0xa12236,0xa500,0x18101004,0x427d00,0x8226c,0x76767e10,0x14141414,0x14142840,0x40404040,
  1993. - 0x10101010,0x41514141,0x41414124,0x45414141,0x41284150,0x22222222,0x22221222,0x66666666,0x10101010,0x66626666,0x66666600,
  1994. - 0x66424242,0x42226622,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100024,0x381c4900,0x10086bfe,0x8,0x4908021c,0x22036304,0x3e630000,
  1995. - 0x70000710,0x51227e40,0x417f7f43,0x7f100470,0x40554941,0x43417e3e,0x1041225a,0x8100810,0x10080000,0x24240,0x42421042,0x42100850,
  1996. - 0x10494242,0x42422040,0x1042245a,0x18240410,0x10103900,0x407c003e,0x1818,0x1c3e10,0x4f7c087c,0x7c002010,0x48000000,0x4008,
  1997. - 0x527c0410,0x105078,0x2410104c,0xa13e6c,0x7f00b900,0xfe3c3c,0x421d18,0x1c1c36,0x38383810,0x22222222,0x22144e40,0x7f7f7f7f,
  1998. - 0x10101010,0xf1494141,0x41414118,0x49414141,0x4110435c,0x2020202,0x2021240,0x42424242,0x10101010,0x42424242,0x424242ff,0x4e424242,
  1999. - 0x42244224,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000fe,0xe664d00,0x10080810,0x380010,0x41080c03,0x42014108,0x633d0000,0x70000710,
  2000. - 0x51224140,0x41404041,0x41100448,0x40494541,0x7e414203,0x1041145a,0x14101010,0x10080000,0x3e4240,0x427e1042,0x42100870,0x10494242,
  2001. - 0x4242203c,0x1042245a,0x18241810,0x10104600,0xf8f60008,0x1010,0x600320,0x48f610f6,0xf6000000,0x187eff,0x3c04,0x5ef61810,0x105020,
  2002. - 0x24fe0064,0x9d006c,0x138ad00,0x100000,0x420518,0x36,0xc0c0c020,0x22222222,0x22224840,0x40404040,0x10101010,0x41454141,0x41414118,
  2003. - 0x51414141,0x41107e46,0x3e3e3e3e,0x3e3e7e40,0x7e7e7e7e,0x10101010,0x42424242,0x42424200,0x5a424242,0x42244224,0x0,0x0,0x0,
  2004. - 0x0,0x0,0x0,0x0,0x0,0x28,0x9094500,0x10080010,0x10,0x41081801,0x7f014118,0x41010000,0xe7f3800,0x513e4140,0x41404041,0x41100444,
  2005. - 0x40414541,0x40414101,0x10411466,0x36103010,0x8080000,0x424240,0x42401042,0x42100848,0x10494242,0x42422002,0x10423c5a,0x18142010,
  2006. - 0x10100000,0x407c0010,0x1010,0x260140,0x487c307c,0x7c000000,0x180000,0x202,0x507c2010,0x105020,0x3c10003c,0x423e36,0x1004200,
  2007. - 0x100000,0x420500,0x3e6c,0x41e0440,0x3e3e3e3e,0x3e3e7840,0x40404040,0x10101010,0x41454141,0x41414124,0x61414141,0x41104042,
  2008. - 0x42424242,0x42425040,0x40404040,0x10101010,0x42424242,0x42424218,0x72424242,0x42144214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048,
  2009. - 0x49096200,0x8100010,0x18001810,0x22082043,0x2432310,0x61421818,0x1004010,0x4f634121,0x42404021,0x41104444,0x40414322,0x40234143,
  2010. - 0x10411466,0x22106010,0x8080000,0x466622,0x66621066,0x42100844,0x10494266,0x66662042,0x10461824,0x24184010,0x10100000,0x24381010,
  2011. - 0x34001018,0xda4320,0x68386038,0x38000000,0x0,0x4204,0x50384010,0x105420,0x4210100c,0x3c0012,0x3c00,0x0,0x460500,0x48,0xc020c44,
  2012. - 0x63636363,0x63228821,0x40404040,0x10101010,0x42432222,0x22222242,0x62414141,0x41104042,0x46464646,0x46465022,0x62626262,
  2013. - 0x10101010,0x66426666,0x66666618,0x66464646,0x46186618,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048,0x3e063d00,0x8100000,0x18001820,
  2014. - 0x1c3e7f3e,0x23c1e20,0x3e3c1818,0x10,0x20417e1e,0x7c7f401e,0x417c3842,0x7f41431c,0x401e40be,0x103e0866,0x41107f10,0x4080000,
  2015. - 0x3a5c1c,0x3a3c103a,0x427c0842,0xe49423c,0x7c3e203c,0xe3a1824,0x66087e10,0x10100000,0x3c103010,0x245a1010,0x5a3e10,0x3f107f10,
  2016. - 0x10000000,0x0,0x3c08,0x2e107e10,0x1038fc,0x101004,0x0,0x0,0xfe0000,0x7f0500,0x0,0x14041438,0x41414141,0x41418e1e,0x7f7f7f7f,
  2017. - 0x7c7c7c7c,0x7c431c1c,0x1c1c1c00,0xbc3e3e3e,0x3e10405c,0x3a3a3a3a,0x3a3a6e1c,0x3c3c3c3c,0x7c7c7c7c,0x3c423c3c,0x3c3c3c00,
  2018. - 0x7c3a3a3a,0x3a087c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x4200000,0x10000020,0x0,0x0,0x10,0x0,0x30000000,0x0,
  2019. - 0x0,0x0,0x60000,0x0,0x1c,0x4380000,0x0,0x2,0x800,0x0,0x40020000,0x0,0x8000c,0x10600000,0x2010,0x48000000,0x240000,0x0,0x0,
  2020. - 0x0,0x0,0x0,0x1000,0x1078,0x0,0x0,0x0,0x400500,0x0,0x1e081e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2021. - 0x84008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x20000040,0x0,0x0,0x20,0x0,0x1e000000,0x0,0x0,0x0,0x20000,0x0,
  2022. - 0x0,0x2000000,0x0,0x26,0x800,0x0,0x40020000,0x0,0x100000,0x10000000,0x2030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,
  2023. - 0x0,0x0,0x400000,0x8000000,0x41e0400,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x104010,0x0,0x0,0x0,0x0,
  2024. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x1c,0x7000,0x0,0x40020000,0x0,0x300000,
  2025. - 0x0,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x400000,0x38000000,0x0,0x0,0x1c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2026. - 0x1c,0x0,0x0,0x0,0x0,0x0,0x304030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2027. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2028. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2029. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2030. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  2031. -
  2032. - // Definition of a 10x19 font
  2033. - const unsigned int font10x19[10*19*256/32] = {
  2034. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2035. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3600000,0x36000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2036. - 0x0,0x180181c0,0xe81b0300,0x1801,0x81c06c18,0x181c06c,0xe8180,0x181c0e81,0xb0000006,0x60701b,0x1800000,0x0,0x0,0x0,0x0,0x0,
  2037. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2038. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x1c000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0,
  2039. - 0x0,0x0,0x0,0x0,0x0,0x0,0xc030360,0xb81b0480,0xc03,0x3606c0c,0x303606c,0xb80c0,0x30360b81,0xb0000003,0xc0d81b,0x3000000,0x0,
  2040. - 0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2041. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x2200000,
  2042. - 0x22000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000,0x0,0xe0,0x38078000,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000c080,0x480,0x3000,
  2043. - 0xc0800030,0xc08000,0x300,0xc080000,0xc,0x302000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x41c01,0xe020060c,
  2044. - 0x800000,0x4,0x1e0703e0,0xf8060fc1,0xe1fe1e07,0x80000000,0x78,0x307e0,0x3c7c1fe7,0xf83c408f,0x80f10440,0x18660878,0x7e0787e0,
  2045. - 0x78ff9024,0xa0140a0,0x27f83840,0x700e000,0x18000400,0x8000,0x70004002,0x410078,0x0,0x0,0x0,0x0,0x1808,0xc000000,0xf000000,
  2046. - 0xe000000,0x1400,0x1e0001f,0x8007f800,0x0,0x0,0x3a3b,0x61400000,0x14202,0x20000,0x38002020,0x3c1b00,0x3e00000,0xf8,0x1c0001c0,
  2047. - 0x78060001,0xf800000e,0x1e00020,0x8004020,0xc0300c0,0x300c0301,0xf83c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1821e0,0x781e0781,0xe0001f10,
  2048. - 0x24090240,0xa02400f8,0x18018140,0xe81b0480,0x1801,0x81406c18,0x181406c,0x190e8180,0x18140e81,0xb0000006,0x60501b,0x184006c,
  2049. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x26042202,0x200c06,0x800000,0x8,0x210d0611,0x40e0803,0x10026188,0x40000000,
  2050. - 0x8c,0xf030418,0xc6431004,0xc64082,0x110840,0x18660884,0x41084410,0x8c081024,0xa012110,0x40082020,0x101b000,0xc000400,0x8000,
  2051. - 0x80004002,0x410008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x18800000,0x10000000,0x2200,0x2300024,0x800,0x0,0x0,0x2e13,0x60800000,
  2052. - 0x8104,0x20040,0x64001040,0x80401b07,0x80100000,0x1e000,0x22000020,0x40c0003,0xc8000002,0x3300020,0x8004020,0xc0300c0,0x300c0301,
  2053. - 0x40c64010,0x4010008,0x2008020,0x43182210,0x84210842,0x10002190,0x24090240,0x9044018c,0xc030220,0xb81b0300,0xc03,0x2206c0c,
  2054. - 0x302206c,0x1e0b80c0,0x30220b81,0xb0000003,0xc0881b,0x304006c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x241f2202,
  2055. - 0x200802,0x4900000,0x8,0x21010408,0x20a0802,0x44090,0x20000000,0x4,0x11878408,0x80411004,0x804082,0x111040,0x1ce50986,0x40986409,
  2056. - 0x81022,0x12012108,0x80102020,0x1031800,0x400,0x8000,0x80004000,0x10008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x10000000,
  2057. - 0x10000000,0x18,0x4000044,0x1000,0x30180,0xd81b0000,0x13,0xe0000000,0x88,0x40,0x400018c0,0x80400018,0x61f00000,0x61800,0x22020020,
  2058. - 0x4000007,0xc8000002,0x2100020,0x8038000,0x1e0781e0,0x781e0301,0x40804010,0x4010008,0x2008020,0x41142619,0x86619866,0x18002190,
  2059. - 0x24090240,0x8887e104,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x2434a202,
  2060. - 0x200802,0x3e00000,0x10,0x40810008,0x21a0804,0x44090,0x20000000,0x80040004,0x20848409,0x409004,0x1004082,0x112040,0x14a50902,
  2061. - 0x40902409,0x81022,0x11321208,0x80202010,0x1060c00,0x7c5e0,0x781e8783,0xf07a5f0e,0x1c10808,0xfc5f078,0x5e07a170,0x7c7e1024,
  2062. - 0xa016190,0x27f82008,0x2000000,0x20000000,0x10000000,0x80200024,0x4000044,0x2000,0x18180,0xc8320000,0x12,0xa1f00037,0x7f888,
  2063. - 0x1e0,0x40410880,0x80600017,0xa2100000,0x5e800,0x22020040,0x38001027,0xc8000002,0x2100020,0x8004020,0x12048120,0x48120482,
  2064. - 0x41004010,0x4010008,0x2008020,0x40942409,0x2409024,0x9044390,0x24090240,0x88841918,0x1f07c1f0,0x7c1f07c3,0x70781e07,0x81e07838,
  2065. - 0xe0380e0,0x1f17c1e0,0x781e0781,0xe0001f90,0x24090240,0x9025e102,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xff241c41,
  2066. - 0x1001,0x1c02000,0x10,0x40810008,0x6120f85,0xe0086190,0x20c03007,0x8007800c,0x27848419,0x409004,0x1004082,0x114040,0x14a48902,
  2067. - 0x40902409,0x81022,0x11321205,0x602010,0x1000000,0x86610,0x84218840,0x80866182,0x411008,0x9261884,0x61086189,0x82101022,0x12012108,
  2068. - 0x40082008,0x2000000,0x20030000,0x20000000,0x80200024,0x4000044,0x3006030,0xc018100,0x4c260000,0x12,0x26080048,0x83000850,
  2069. - 0x20250,0x403e0500,0x8078002c,0x12302200,0x92400,0x1c0200c0,0x4001027,0xc8000002,0x3308820,0x8004020,0x12048120,0x48120482,
  2070. - 0x41004010,0x4010008,0x2008020,0x40922409,0x2409024,0x8884690,0x24090240,0x85040920,0x21886218,0x86218860,0x88842108,0x42108408,
  2071. - 0x2008020,0x21186210,0x84210842,0x10302190,0x24090240,0x88461084,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x4c240182,
  2072. - 0x80001001,0x6b02000,0x20,0x4c810010,0x78220846,0x10081e10,0x20c0301c,0x1fe0e018,0x4d8487e1,0x409fe7,0xf9007f82,0x11a040,
  2073. - 0x13248902,0x41102418,0xe0081022,0x11320c05,0x402008,0x1000000,0x2409,0x409020,0x81024082,0x412008,0x9240902,0x40902101,0x101022,
  2074. - 0x11321208,0x40102008,0x2000000,0x7e0c8000,0xfc000003,0xf0fc0018,0x43802047,0x8c8040c8,0x32008300,0x44240000,0x0,0x4000048,
  2075. - 0x8c801050,0x20440,0x40221dc0,0x808c0028,0x11d0667f,0x8009c400,0x1fc180,0x4001023,0xc8300002,0x1e0ccfb,0x3ec7b020,0x12048120,
  2076. - 0x48120482,0x79007f9f,0xe7f9fe08,0x2008020,0xf0922409,0x2409024,0x8504490,0x24090240,0x85040920,0x802008,0x2008020,0x89004090,
  2077. - 0x24090208,0x2008020,0x40902409,0x2409024,0x8304390,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,
  2078. - 0x481c0606,0xc8001001,0x802000,0x20,0x4c810020,0x4220024,0x8102108,0x60000070,0x3820,0x48884419,0x409004,0x10e4082,0x112040,
  2079. - 0x13244902,0x7e1027e0,0x3c081021,0x21320c02,0x802008,0x1000000,0x7e409,0x409020,0x81024082,0x414008,0x9240902,0x40902101,
  2080. - 0x80101022,0x11320c08,0x40202008,0x2038800,0x200bc000,0x20000000,0x80200003,0x80f04044,0xbc080bc,0x2f000200,0x0,0x0,0x6001048,
  2081. - 0x8bc02020,0x20441,0xf8220200,0x80820028,0x1000cc00,0x80094400,0x201e0,0x78001021,0xc830000f,0x8000663c,0xf03c0c0,0x21084210,
  2082. - 0x84210846,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8204890,0x24090240,0x82040930,0x1f87e1f8,0x7e1f87e0,0x89004090,
  2083. - 0x24090208,0x2008020,0x40902409,0x2409024,0x8004690,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,
  2084. - 0x480719c4,0x48001001,0x81fc00,0x7800020,0x40810040,0x2420024,0x8104087,0xa0000070,0x3820,0x48884409,0x409004,0x1024082,0x111040,
  2085. - 0x13244902,0x40102410,0x2081021,0x214a1202,0x1802008,0x1000000,0x182409,0x409fe0,0x81024082,0x41a008,0x9240902,0x40902100,
  2086. - 0xf8101021,0x214a0c04,0x80c0c008,0x1847000,0x7c1ee000,0x20000000,0x8020000c,0x8c044,0x1ee181ee,0x7b800000,0x707,0xf3ff0000,
  2087. - 0x3e0084f,0x9ee0c020,0x20440,0x40221fc0,0xc2002c,0x13f11000,0x87892400,0x20000,0x1020,0x48000000,0x3f011c6,0x31cc6180,0x21084210,
  2088. - 0x84210844,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8505090,0x24090240,0x8204191c,0x60982609,0x82609823,0xf9007f9f,
  2089. - 0xe7f9fe08,0x2008020,0x40902409,0x2409024,0x9fe4c90,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xfe048224,
  2090. - 0x28001001,0x2000,0x40,0x40810080,0x27f8024,0x8104080,0x2000001c,0x1fe0e020,0x488fc409,0x409004,0x1024082,0x110840,0x10242902,
  2091. - 0x40102408,0x2081021,0x214a1202,0x1002004,0x1000000,0x102409,0x409000,0x81024082,0x411008,0x9240902,0x40902100,0x6101021,
  2092. - 0x214a0c04,0x81002008,0x2000000,0x201dc000,0x20000000,0x80200000,0x98044,0x1dc101dc,0x77000000,0x700,0x0,0x180448,0x1dc10020,
  2093. - 0x20440,0x403e0200,0x620017,0xa000cc00,0x80052800,0x20000,0x1020,0x48000000,0x6606,0x206100,0x3f0fc3f0,0xfc3f0fc7,0xc1004010,
  2094. - 0x4010008,0x2008020,0x4090a409,0x2409024,0x8886090,0x24090240,0x8207e106,0x40902409,0x2409024,0x81004010,0x4010008,0x2008020,
  2095. - 0x40902409,0x2409024,0x8005890,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x98048224,0x30001001,0x2000,
  2096. - 0x40,0x21010100,0x2020024,0x8204080,0x40000007,0x80078000,0x48884408,0x80411004,0x824082,0x110840,0x10242986,0x40086409,0x2081021,
  2097. - 0xe14a2102,0x2002004,0x1000000,0x106409,0x409000,0x81024082,0x410808,0x9240902,0x40902100,0x2101021,0x214a1202,0x82002008,
  2098. - 0x2000000,0x300f8000,0x20000000,0x80fc001d,0xe4088044,0xf8200f8,0x3e000000,0x300,0x0,0x80c48,0xf820020,0x20640,0x40410200,
  2099. - 0x803c0018,0x60006600,0x61800,0x0,0x1020,0x48000000,0xcc0a,0x20a100,0x21084210,0x84210844,0x40804010,0x4010008,0x2008020,
  2100. - 0x4110a619,0x86619866,0x19046110,0x24090240,0x82040102,0x41906419,0x6419064,0x81004010,0x4010008,0x2008020,0x40902409,0x2409024,
  2101. - 0x8307090,0x24090240,0x82840828,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x90248222,0x30000802,0x200c,0xc080,0x21010301,
  2102. - 0x4021042,0x10202108,0xc0c03000,0x80040020,0x4d902418,0xc6431004,0xc24082,0x6210440,0x10241884,0x40084409,0x86080840,0xc0842102,
  2103. - 0x4002002,0x1000000,0x18e610,0x84218820,0x80864082,0x410408,0x9240884,0x61086101,0x6101860,0xc0842103,0x4002008,0x2000000,
  2104. - 0x10850180,0x20330000,0x80200013,0x26184024,0x5040050,0x14000000,0x0,0x0,0x4180848,0x85040020,0x20350,0x40000200,0x800c0007,
  2105. - 0x80002200,0x1e000,0x0,0x1860,0x48000000,0x880a,0x40a188,0x40902409,0x2409028,0x40c64010,0x4010008,0x2008020,0x43106210,0x84210842,
  2106. - 0x10006108,0x42108421,0x2040102,0x6398e639,0x8e6398e4,0x88842088,0x22088208,0x2008020,0x21102210,0x84210842,0x10306118,0x66198661,
  2107. - 0x83061030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0x901f01c1,0xe8000802,0xc,0xc080,0x1e07c7f8,0xf8020f81,0xe0401e07,
  2108. - 0x80c03000,0x20,0x279027e0,0x3c7c1fe4,0x3c408f,0x83c1027f,0x90241878,0x4007c404,0xf8080780,0xc0844082,0x7f82002,0x1000000,
  2109. - 0xfa5e0,0x781e87c0,0x807a409f,0xc0410207,0x9240878,0x5e07a100,0xf80e0fa0,0xc0846183,0x7f82008,0x2000000,0xf020100,0x40321360,
  2110. - 0x80200014,0xa3e0201f,0x8207f820,0x8000000,0x0,0x0,0x3e01037,0x207f820,0x201e1,0xfc000200,0x80040000,0x0,0x0,0x1fc000,0x17b0,
  2111. - 0x48000000,0x12,0xc120f0,0x40902409,0x2409028,0x783c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1061e0,0x781e0781,0xe000be07,0x81e0781e,
  2112. - 0x204017c,0x3e8fa3e8,0xfa3e8fa3,0x70781f07,0xc1f07c7f,0x1fc7f1fc,0x1e1021e0,0x781e0781,0xe0007e0f,0xa3e8fa3e,0x8305e030,0x0,
  2113. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0xc06,0xc,0x100,0x0,0x0,0x0,0x3000,0x0,0x20000000,0x0,0x0,0x0,0x0,0xc000,
  2114. - 0x0,0x0,0x2001,0x1000000,0x0,0x0,0x20000,0x400000,0x0,0x40002000,0x0,0x1,0x2008,0x2000000,0x100,0x40240000,0x80200008,0x40000000,
  2115. - 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80040000,0x0,0x0,0x0,0x1000,0x48000000,0x1f,0x181f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2116. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1040010,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x60c,0x18,0x0,
  2117. - 0x0,0x0,0x0,0x6000,0x0,0x10000000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x3800,0x7000000,0x0,0x0,0x840000,0x400000,0x0,0x40002000,
  2118. - 0x0,0x2,0x2008,0x2000000,0x200,0x40440000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80780000,0x0,0x0,0x0,0x1000,0x48000400,
  2119. - 0x2,0x1e02000,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x2040020,0x0,0x0,0x0,0x0,
  2120. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x4000,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2121. - 0x780000,0x3800000,0x0,0x40002000,0x0,0xe,0x1808,0xc000000,0x3,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,
  2122. - 0x0,0x0,0x0,0x1000,0x1c00,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0xe0400e0,
  2123. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc,
  2124. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2125. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  2126. -
  2127. - // Definition of a 12x24 font
  2128. - const unsigned int font12x24[12*24*256/32] = {
  2129. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2130. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x19,0x80000000,0x198000,0x0,0x0,0x0,0x0,
  2131. - 0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc001806,0xc81980,0x60000000,0xc001806,0x1980c00,0x18060198,0xc80c,
  2132. - 0x180600,0xc8198000,0xc001,0x80601980,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2133. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2134. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0,
  2135. - 0x0,0x0,0x0,0x0,0x0,0x0,0x600300f,0x1301980,0x90000000,0x600300f,0x1980600,0x300f0198,0x13006,0x300f01,0x30198000,0x6003,
  2136. - 0xf01980,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2137. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2138. - 0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7007,0x3c0000,0x3006019,
  2139. - 0x80000000,0x90000000,0x3006019,0x80000300,0x60198000,0x3,0x601980,0x0,0x3006,0x1980000,0x60000000,0x0,0x0,0xe0000000,0x0,
  2140. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2141. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000,
  2142. - 0x0,0x0,0x0,0x0,0x0,0xc800019,0x80000000,0x198000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x1001,0x420000,0x0,0x0,0x90000000,
  2143. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000c06,0xc80001,0x10000000,0x18000c06,0x1800,0xc060000,0xc818,0xc0600,0xc8000000,
  2144. - 0x18000,0xc0600000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80660207,0x800f8060,0x300c004,0x0,0x6,
  2145. - 0xe00703f,0x3f00383,0xf80f07fc,0x1f01f000,0x0,0xf8,0x607f,0x7c7e07,0xfe7fe0f8,0x6063fc1f,0x86066007,0xe7060f0,0x7f80f07f,
  2146. - 0x81f8fff6,0x6606c03,0x70ee077f,0xe0786000,0xf0070000,0xc000060,0xc0,0x3e000,0x60006003,0x600fc00,0x0,0x0,0x0,0x0,0x0,0x3c0603,
  2147. - 0xc0000000,0x7800000,0xf0000,0x0,0xf00001f,0x80001fe0,0x7fe000,0x0,0x0,0x0,0x168fe609,0x0,0x90e07,0x6000,0x3c000e,0x70000f8,
  2148. - 0x1980001f,0x0,0x1f8,0xf00000f,0xf00180,0xfe000,0xe00e,0x1001,0x20060,0x6006006,0x600600,0x600fe07c,0x7fe7fe7f,0xe7fe3fc3,
  2149. - 0xfc3fc3fc,0x7e07060f,0xf00f00,0xf00f0000,0xf360660,0x6606606e,0x76001e0,0xc00180f,0x1681981,0x10000000,0xc00180f,0x1980c00,
  2150. - 0x180f0198,0x3801680c,0x180f01,0x68198000,0xc001,0x80f01980,0x18600198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,
  2151. - 0x8044020c,0xc01f8060,0x2004004,0x0,0xc,0x3f81f07f,0x87f80383,0xf81f87fc,0x3f83f800,0x0,0x1fc,0x780607f,0x81fe7f87,0xfe7fe1fc,
  2152. - 0x6063fc1f,0x860c6007,0xe7061f8,0x7fc1f87f,0xc3fcfff6,0x6606c03,0x30c6067f,0xe0783000,0xf00d8000,0x6000060,0xc0,0x7e000,0x60006003,
  2153. - 0x600fc00,0x0,0x0,0xc00,0x0,0x0,0x7c0603,0xe0000000,0xfc00000,0x1f0000,0x0,0x900003f,0xc0003fe0,0x7fe000,0x0,0x0,0x0,0x1302660f,
  2154. - 0x0,0xf0606,0x6004,0x7e0006,0x60601f8,0x19800001,0x80000000,0x1f8,0x19800010,0x81080300,0x3f2000,0x2011,0x1001,0x1c0060,0x6006006,
  2155. - 0x600600,0x601fe1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f87061f,0x81f81f81,0xf81f8000,0x3fa60660,0x66066066,0x66003f0,0x6003009,
  2156. - 0x1301981,0x10000000,0x6003009,0x1980600,0x30090198,0x1f013006,0x300901,0x30198000,0x6003,0x901980,0x30600198,0x0,0x0,0x0,
  2157. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc0f8c,0xc0180060,0x6006044,0x40000000,0xc,0x3181b041,0xc41c0783,0x388018,
  2158. - 0x71c71800,0x0,0x106,0x18c0f061,0xc38261c6,0x600384,0x60606001,0x86186007,0xe78630c,0x60e30c60,0xe7040606,0x630cc03,0x39c30c00,
  2159. - 0xc0603000,0x3018c000,0x3000060,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600,0x60000000,0x18400000,0x180000,
  2160. - 0x0,0x19800070,0x40003600,0xc000,0x0,0x0,0x0,0x25a06,0x0,0x6030c,0x4,0xe20007,0xe060180,0xf000,0x80000000,0xf0000,0x10800000,
  2161. - 0x80080600,0x7f2000,0x2020,0x80001001,0x20000,0xf00f00f,0xf00f00,0x601b0382,0x60060060,0x6000600,0x60060060,0x61c78630,0xc30c30c3,
  2162. - 0xc30c000,0x30e60660,0x66066063,0xc600738,0x3006019,0x80000000,0xe0000000,0x3006019,0x80000300,0x60198000,0x3e000003,0x601980,
  2163. - 0x0,0x3006,0x1980000,0x60600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc1fcc,0xc0180060,0x6006035,0x80000000,
  2164. - 0x18,0x71c03000,0xc00c0583,0x300018,0x60c60c00,0x0,0x6,0x3060f060,0xc30060c6,0x600300,0x60606001,0x86306007,0x9e78670e,0x60670e60,
  2165. - 0x66000606,0x630c606,0x19830c01,0xc0601800,0x30306000,0x60,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600,
  2166. - 0x60000000,0x18000000,0x300000,0x0,0x78060,0x6600,0x1c000,0x300c,0x39819c0,0x0,0x25a00,0x0,0x30c,0x4,0xc00003,0xc060180,0x30c1f,
  2167. - 0x80000000,0x30c000,0x10800001,0x80700000,0x7f2000,0x2020,0x80001001,0x20060,0xf00f00f,0xf00f00,0xf01b0300,0x60060060,0x6000600,
  2168. - 0x60060060,0x60c78670,0xe70e70e7,0xe70e000,0x70c60660,0x66066063,0xc7f8618,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0,
  2169. - 0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x87ff3a4c,0xc0180060,0x400600e,0x600000,0x18,0x60c03000,
  2170. - 0xc00c0d83,0x700018,0x60c60c00,0x20,0x400006,0x3060f060,0xc6006066,0x600600,0x60606001,0x86606006,0x966c6606,0x60660660,0x66000606,
  2171. - 0x630c666,0xf019801,0x80601800,0x30603000,0x1f06f,0xf01ec0,0xf03fe1ec,0x6703e01f,0x61c0c06,0xdc6701f0,0x6f01ec0c,0xe1f87fc6,
  2172. - 0xc60cc03,0x71c60c7f,0xc0600600,0x60000000,0x30000000,0x300000,0x40040,0x88060,0x6600,0x18000,0x300c,0x1981980,0x0,0x2421f,
  2173. - 0x80003ce0,0x7fc198,0x601f,0xc02021,0x980600c0,0x40230,0x80000000,0x402000,0x19806003,0x80006,0xc7f2000,0x2020,0x80001001,
  2174. - 0x420060,0xf00f00f,0xf00f00,0xf01b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x6606208,0x60e60660,0x66066061,
  2175. - 0x987fc670,0x1f01f01f,0x1f01f01,0xf039c0f0,0xf00f00f,0xf03e03,0xe03e03e0,0x1f06701f,0x1f01f01,0xf01f0060,0x1e660c60,0xc60c60c6,
  2176. - 0xc6f060c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x7ff3207,0x8c0c0000,0xc00300e,0x600000,0x30,0x60c03000,
  2177. - 0xc01c0983,0xf0600030,0x31860c06,0x6001e0,0x78000e,0x23e1f861,0xc6006066,0x600600,0x60606001,0x86c06006,0x966c6606,0x60660660,
  2178. - 0xe7000606,0x630c666,0xf01f803,0x600c00,0x30000000,0x3f87f,0x83f83fc3,0xf83fe3fc,0x7f83e01f,0x6380c07,0xfe7f83f8,0x7f83fc0d,
  2179. - 0xf3fc7fc6,0xc71cc03,0x3183187f,0xc0600600,0x60000000,0xff806000,0x300000,0x40040,0x88070,0x6600,0x60030060,0x6001818,0x1883180,
  2180. - 0x0,0x2423f,0xc0007ff0,0x607fc1f8,0x603f,0x80c01fc1,0xf80601e0,0x5f220,0x80420000,0x5f2000,0xf006006,0x80006,0xc7f2000,0x2020,
  2181. - 0x82107c07,0xc03c0060,0x1f81f81f,0x81f81f80,0xf03b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x660671c,0x61660660,
  2182. - 0x66066061,0xf860e6c0,0x3f83f83f,0x83f83f83,0xf87fe3f8,0x3f83f83f,0x83f83e03,0xe03e03e0,0x3f87f83f,0x83f83f83,0xf83f8060,
  2183. - 0x3fc60c60,0xc60c60c3,0x187f8318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x883200,0x300c0000,0xc003035,0x80600000,
  2184. - 0x30,0x66c03001,0xc0f81983,0xf86f0030,0x1f071c06,0x600787,0xfe1e001c,0x6261987f,0x86006067,0xfe7fc600,0x7fe06001,0x87c06006,
  2185. - 0xf6646606,0x60e6067f,0xc3e00606,0x61986f6,0x600f007,0x600c00,0x30000000,0x21c71,0x830831c3,0x1c06031c,0x71c06003,0x6700c06,
  2186. - 0x6671c318,0x71831c0f,0x16040c06,0xc318606,0x1b031803,0x80600600,0x60000000,0x30009000,0x300000,0x40040,0x7003e,0x67e0,0x90070090,
  2187. - 0x9001818,0x8c3100,0x0,0x60,0x4000e730,0x900380f0,0x6034,0x80c018c7,0xfe060338,0xb0121,0x80c60000,0x909000,0x6008,0x1080006,
  2188. - 0xc3f2000,0x2011,0x3180060,0x60060e0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0x60664660,0x66066066,
  2189. - 0x66063b8,0x62660660,0x66066060,0xf06066c0,0x21c21c21,0xc21c21c2,0x1c466308,0x31c31c31,0xc31c0600,0x60060060,0x31871c31,0x83183183,
  2190. - 0x18318000,0x71860c60,0xc60c60c3,0x18718318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1981a00,0xe03e0000,0xc003044,
  2191. - 0x40600000,0x60,0x66c03001,0x80f03182,0x1c7f8030,0x3f83fc06,0x601e07,0xfe078038,0x6661987f,0x86006067,0xfe7fc61e,0x7fe06001,
  2192. - 0x87e06006,0x66666606,0x7fc6067f,0x81f80606,0x61986f6,0x6006006,0x600600,0x30000000,0xc60,0xc60060c6,0xc06060c,0x60c06003,
  2193. - 0x6e00c06,0x6660c60c,0x60c60c0e,0x6000c06,0xc318666,0x1f031803,0x600600,0x603c2000,0x30016800,0x1fe0000,0x1f81f8,0x1c1f,0x804067e1,
  2194. - 0x68060168,0x16800810,0xc42300,0x0,0x60,0x20c331,0x68030060,0x6064,0x3fc1040,0xf006031c,0xa011e,0x818c7fe0,0x909000,0x7fe1f,
  2195. - 0x80f00006,0xc0f2060,0xf80e,0x18c0780,0x780781c0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0xfc666660,
  2196. - 0x66066066,0x66061f0,0x66660660,0x66066060,0x606066e0,0xc00c00,0xc00c00c0,0xc066600,0x60c60c60,0xc60c0600,0x60060060,0x60c60c60,
  2197. - 0xc60c60c6,0xc60c000,0x61c60c60,0xc60c60c3,0x1860c318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1980f81,0x80373000,
  2198. - 0xc003004,0x7fe0001,0xf0000060,0x60c03003,0x183180,0xc71c060,0x3181ec00,0x7000,0xe070,0x66619860,0xc6006066,0x60061e,0x60606001,
  2199. - 0x87606006,0x66626606,0x7f860661,0xc01c0606,0x6198696,0xf00600e,0x600600,0x30000000,0x1fc60,0xc60060c7,0xfc06060c,0x60c06003,
  2200. - 0x7c00c06,0x6660c60c,0x60c60c0c,0x7f00c06,0xc3b8666,0xe01b007,0x3c00600,0x3c7fe000,0xff03ec00,0x1fe0000,0x40040,0xe001,0xc0806603,
  2201. - 0xec0e03ec,0x3ec00010,0x0,0x60000000,0x7f,0x10c3f3,0xec070060,0x6064,0x3fc1040,0x6000030c,0xa0100,0x3187fe1,0xf09f1000,0x7fe00,
  2202. - 0x6,0xc012060,0x0,0xc63c03,0xc03c0380,0x19819819,0x81981981,0x98330600,0x60060060,0x6000600,0x60060060,0xfc662660,0x66066066,
  2203. - 0x66060e0,0x6c660660,0x66066060,0x6060e630,0x1fc1fc1f,0xc1fc1fc1,0xfc3fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6,
  2204. - 0xc60c7fe,0x62c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe02c6,0x3c633000,0xc003004,
  2205. - 0x7fe0001,0xf00000c0,0x60c03006,0xc6180,0xc60c060,0x60c00c00,0x7000,0xe060,0x66639c60,0x66006066,0x600606,0x60606001,0x86306006,
  2206. - 0x66636606,0x60060660,0xc0060606,0x61f8696,0xf00600c,0x600300,0x30000000,0x3fc60,0xc60060c7,0xfc06060c,0x60c06003,0x7c00c06,
  2207. - 0x6660c60c,0x60c60c0c,0x1f80c06,0xc1b0666,0xe01b00e,0x3c00600,0x3c43c000,0x3007de00,0x600000,0x40040,0x30000,0x61006607,0xde0c07de,
  2208. - 0x7de00000,0x0,0xf07fefff,0x1f,0x8008c3f7,0xde0e0060,0x6064,0xc01047,0xfe00018c,0xb013f,0x86300061,0xf0911000,0x6000,0x6,
  2209. - 0xc012060,0x3f,0x8063c0cc,0x3cc0c700,0x39c39c39,0xc39c39c1,0x98630600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066,
  2210. - 0x66061f0,0x78660660,0x66066060,0x607fc618,0x3fc3fc3f,0xc3fc3fc3,0xfc7fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6,
  2211. - 0xc60c7fe,0x64c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe0260,0x6661b000,0xc003000,
  2212. - 0x600000,0xc0,0x60c0300c,0xc7fe0,0xc60c060,0x60c01c00,0x1e07,0xfe078060,0x6663fc60,0x66006066,0x600606,0x60606001,0x86386006,
  2213. - 0x6636606,0x60060660,0xe0060606,0x60f039c,0x1b806018,0x600300,0x30000000,0x70c60,0xc60060c6,0x6060c,0x60c06003,0x7600c06,
  2214. - 0x6660c60c,0x60c60c0c,0x1c0c06,0xc1b03fc,0xe01f01c,0xe00600,0x70000000,0x3007fc00,0x600000,0x40040,0x0,0x62006607,0xfc1807fc,
  2215. - 0x7fc00000,0x0,0xf0000000,0x1,0xc004c307,0xfc1c0060,0x6064,0xc018c0,0x600000d8,0x5f200,0x3180060,0x50a000,0x6000,0x6,0xc012000,
  2216. - 0x0,0xc601c0,0x4201c600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066,0x66063b8,
  2217. - 0x70660660,0x66066060,0x607f860c,0x70c70c70,0xc70c70c7,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000,
  2218. - 0x68c60c60,0xc60c60c1,0xf060c1f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3300260,0x6661e000,0xc003000,0x600000,
  2219. - 0x180,0x71c03018,0xc7fe0,0xc60c0c0,0x60c01800,0x787,0xfe1e0060,0x6663fc60,0x630060c6,0x600306,0x60606001,0x86186006,0x661e70e,
  2220. - 0x60070c60,0x60060606,0x60f039c,0x19806038,0x600180,0x30000000,0x60c60,0xc60060c6,0x6060c,0x60c06003,0x6700c06,0x6660c60c,
  2221. - 0x60c60c0c,0xc0c06,0xc1b039c,0x1f00e018,0x600600,0x60000000,0x1803f800,0x600000,0x40040,0x39e00,0x63006603,0xf83803f8,0x3f800000,
  2222. - 0x0,0x60000000,0x0,0xc00cc303,0xf8180060,0x6064,0xc01fc0,0x60060070,0x40200,0x18c0060,0x402000,0x6000,0x6,0xc012000,0x0,0x18c0140,
  2223. - 0x2014600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0300,0x60060060,0x6000600,0x60060060,0x60c61e70,0xe70e70e7,0xe70e71c,0x60e60660,0x66066060,
  2224. - 0x6060060c,0x60c60c60,0xc60c60c6,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000,0x70c60c60,0xc60c60c0,
  2225. - 0xe060c0e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x33022e0,0x6670c000,0xc003000,0x600600,0x60180,0x31803030,
  2226. - 0x41c0184,0x1831c0c0,0x71c23806,0x6001e0,0x780000,0x62630c60,0xe38261c6,0x600386,0x60606043,0x860c6006,0x661e30c,0x60030c60,
  2227. - 0x740e0607,0xe0f039c,0x31c06030,0x600180,0x30000000,0x61c71,0x830831c3,0x406031c,0x60c06003,0x6300c06,0x6660c318,0x71831c0c,
  2228. - 0x41c0c07,0x1c0e039c,0x1b00e030,0x600600,0x60000000,0x1c41b00e,0x601cc0,0x401f8,0x45240,0xe1803601,0xb03001b0,0x1b000000,
  2229. - 0x0,0x0,0x41,0xc008e711,0xb0300060,0x6034,0x80c02020,0x60060030,0x30c00,0xc60000,0x30c000,0x0,0x7,0x1c012000,0x0,0x3180240,
  2230. - 0x6024608,0x30c30c30,0xc30c30c3,0xc630382,0x60060060,0x6000600,0x60060060,0x61c61e30,0xc30c30c3,0xc30c208,0x70c70e70,0xe70e70e0,
  2231. - 0x6060068c,0x61c61c61,0xc61c61c6,0x1cc62308,0x30430430,0x43040600,0x60060060,0x31860c31,0x83183183,0x18318060,0x31c71c71,
  2232. - 0xc71c71c0,0xe07180e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2203fc0,0x663f6000,0x6006000,0x600600,0x60300,
  2233. - 0x3f81fe7f,0xc7f80187,0xf83f80c0,0x3f83f006,0x600020,0x400060,0x33e6067f,0xc1fe7f87,0xfe6001fe,0x6063fc7f,0x60e7fe6,0x660e3f8,
  2234. - 0x6001f860,0x37fc0603,0xfc06030c,0x30c0607f,0xe06000c0,0x30000000,0x7fc7f,0x83f83fc3,0xfc0603fc,0x60c7fe03,0x61807c6,0x6660c3f8,
  2235. - 0x7f83fc0c,0x7f80fc3,0xfc0e039c,0x3180607f,0xc0600600,0x60000000,0xfc0e00c,0x601986,0x66040040,0x4527f,0xc0803fe0,0xe07fe0e0,
  2236. - 0xe000000,0x0,0x0,0x7f,0x80107ff0,0xe07fc060,0x603f,0x83fe0000,0x60060018,0xf000,0x420000,0xf0000,0x7fe00,0x7,0xfe012000,
  2237. - 0x0,0x2100640,0xc0643f8,0x60660660,0x66066067,0xec3e1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f860e3f,0x83f83f83,0xf83f8000,
  2238. - 0x5fc3fc3f,0xc3fc3fc0,0x606006fc,0x7fc7fc7f,0xc7fc7fc7,0xfcffe3f8,0x3fc3fc3f,0xc3fc7fe7,0xfe7fe7fe,0x3f860c3f,0x83f83f83,
  2239. - 0xf83f8060,0x7f83fc3f,0xc3fc3fc0,0x607f8060,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2201f80,0x3c1e7000,0x6006000,
  2240. - 0x600,0x60300,0xe01fe7f,0xc3f00183,0xe01f0180,0x1f01e006,0x600000,0x60,0x3006067f,0x807c7e07,0xfe6000f8,0x6063fc3e,0x6067fe6,
  2241. - 0x660e0f0,0x6000f060,0x3bf80601,0xf806030c,0x60e0607f,0xe06000c0,0x30000000,0x1ec6f,0xf01ec0,0xf80601ec,0x60c7fe03,0x61c03c6,
  2242. - 0x6660c1f0,0x6f01ec0c,0x3f007c1,0xcc0e030c,0x71c0c07f,0xc0600600,0x60000000,0x7804018,0xe01186,0x66040040,0x39e3f,0x80401fe0,
  2243. - 0x407fe040,0x4000000,0x0,0x0,0x3f,0x203ce0,0x407fc060,0x601f,0x3fe0000,0x60060018,0x0,0x0,0x0,0x7fe00,0x6,0xe6012000,0x0,
  2244. - 0x7e0,0x1807e1f0,0x60660660,0x66066066,0x6c3e07c,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7e060e0f,0xf00f00,0xf00f0000,0x8f01f81f,
  2245. - 0x81f81f80,0x60600670,0x1ec1ec1e,0xc1ec1ec1,0xec79c0f0,0xf80f80f,0x80f87fe7,0xfe7fe7fe,0x1f060c1f,0x1f01f01,0xf01f0000,0x4f01cc1c,
  2246. - 0xc1cc1cc0,0xc06f00c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x6006000,0x600,0x600,0x0,0x0,0x0,0x0,
  2247. - 0x600000,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x600060,0x30000000,0x0,0x0,0xc,0x3,0x0,0x0,0x60000c00,0x0,
  2248. - 0x0,0xc000,0x600600,0x60000000,0x18,0xc03100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f8,0x0,0x0,0x0,0x0,0x6,
  2249. - 0x12000,0x2000000,0x40,0x20004000,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2250. - 0x0,0xc06000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x2004000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000,
  2251. - 0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0xc00,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x21c,0x3,0x0,0x0,0x60000c00,0x0,0x0,0xc000,
  2252. - 0x7c0603,0xe0000000,0x10,0xc02300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f0,0x0,0x0,0x0,0x0,0x6,0x12000,0x1000000,
  2253. - 0x40,0x7e004000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc06000c0,0x0,
  2254. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x300c000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000,0x0,0x7800000,0x0,
  2255. - 0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x3f8,0x3e,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x3c0603,0xc0000000,
  2256. - 0x10,0xfc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x60000,0x0,0x0,0x0,0x0,0x6,0x0,0x1000000,0x0,0x0,0x0,0x0,
  2257. - 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2258. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0,
  2259. - 0x0,0x1f0,0x3c,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x600,0x0,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2260. - 0x0,0x0,0x0,0x0,0x0,0x6,0x0,0xe000000,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,
  2261. - 0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2262. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2263. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2264. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  2265. -
  2266. - // Definition of a 16x32 font
  2267. - const unsigned int font16x32[16*32*256/32] = {
  2268. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2269. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2270. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2271. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70000e0,0x3c00730,0xe7001c0,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0x730,0x70000e0,0x3c00730,
  2272. - 0xe700000,0x700,0xe003c0,0xe7000e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2273. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2274. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2275. - 0x0,0x0,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2276. - 0x0,0x0,0x18001c0,0x6600ff0,0xe7003e0,0x0,0x18001c0,0x6600e70,0x18001c0,0x6600e70,0xff0,0x18001c0,0x6600ff0,0xe700000,0x180,
  2277. - 0x1c00660,0xe7001c0,0x0,0x0,0x0,0x380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2278. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2279. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,
  2280. - 0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00380,
  2281. - 0xc300ce0,0xe700630,0x0,0x1c00380,0xc300e70,0x1c00380,0xc300e70,0xce0,0x1c00380,0xc300ce0,0xe700000,0x1c0,0x3800c30,0xe700380,
  2282. - 0x0,0x0,0x0,0x7c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2283. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2284. - 0x0,0x0,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0,
  2285. - 0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x700000,0x0,0x0,0x0,0x7c007c00,0x3e000000,
  2286. - 0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000070,0x1800000,0xc60,0x0,0xe000070,0x1800000,0xe000070,
  2287. - 0x1800000,0x0,0xe000070,0x1800000,0x0,0xe00,0x700180,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2288. - 0x0,0x0,0x0,0x800000,0x0,0x600600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2289. - 0x0,0x0,0x3f0,0xfc0,0x0,0x7000000,0x38000000,0x1c0000,0xfc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,
  2290. - 0x1801f00,0x0,0x0,0x1c,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7300000,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0xe700000,
  2291. - 0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0x0,0xc000c00,0x43800000,0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2292. - 0xf80,0x70000e0,0x3c00730,0xe700c60,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0xe000730,0x70000e0,0x3c00730,0xe700000,0x700,
  2293. - 0xe003c0,0xe7000e0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300000,0x803c00,0x7c00180,
  2294. - 0xc00300,0x1000000,0x0,0x1c,0x3c007c0,0xfc007e0,0xe01ff8,0x3f03ffc,0x7e007c0,0x0,0x0,0x7c0,0x1c0,0x7f8003f0,0x7f007ff8,0x7ff803f0,
  2295. - 0x70381ffc,0xff0700e,0x7000783c,0x783807c0,0x7fc007c0,0x7fc00fc0,0x7fff7038,0x700ee007,0x780f780f,0x7ffc03f0,0x70000fc0,0x3c00000,
  2296. - 0x3000000,0x38000000,0x1c0000,0x1fc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x1801f80,0x0,0x1f80000,
  2297. - 0x7e,0x0,0x0,0x2400000,0xfc00000,0x7ff0000,0x7ffc0000,0x0,0x0,0x0,0x0,0xf30fb0c,0x2400000,0x0,0x240780f,0x1c0,0xfc,0x780f,
  2298. - 0x18003f0,0xe700000,0x7c00000,0x0,0xff0,0x3c00000,0x78007c0,0xc00000,0xff80000,0xf80,0x7c00000,0xc000c00,0x18001c0,0x1c001c0,
  2299. - 0x1c001c0,0x1c003e0,0x7fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007838,0x7c007c0,0x7c007c0,0x7c00000,0x7c67038,
  2300. - 0x70387038,0x7038780f,0x70001fe0,0x30000c0,0x2400f30,0xe700c60,0x0,0x30000c0,0x2400e70,0x30000c0,0x2400e70,0xf700f30,0x30000c0,
  2301. - 0x2400f30,0xe700000,0x300,0xc00240,0xe7000c0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,
  2302. - 0x630018c,0x807e00,0xfe00180,0xc00300,0x1000000,0x0,0x38,0xff01fc0,0x3ff01ff0,0x1e01ff8,0x7f83ffc,0x1ff80ff0,0x0,0x0,0xff0,
  2303. - 0x1f003e0,0x7fe00ff8,0x7fc07ff8,0x7ff80ff8,0x70381ffc,0xff0701c,0x7000783c,0x78381ff0,0x7fe01ff0,0x7fe01ff0,0x7fff7038,0x781ee007,
  2304. - 0x3c1e380e,0x7ffc0380,0x380001c0,0x3c00000,0x1800000,0x38000000,0x1c0000,0x3c00000,0x380001c0,0xe01c00,0x3800000,0x0,0x0,
  2305. - 0x0,0x7000000,0x0,0x0,0x1e0,0x18003c0,0x0,0x3fc0000,0x70,0x0,0x0,0x6600000,0x1ff00000,0x1fff0000,0x7ffc0000,0x0,0x0,0x0,0x0,
  2306. - 0xcf0239c,0x3c00000,0x0,0x3c0380e,0x1c0,0x2001fe,0x380e,0x18007f8,0xe700000,0x8600000,0x0,0xff0,0x7e00000,0x8c00870,0x1800000,
  2307. - 0x1ff80000,0x180,0xc600000,0xc000c00,0x38001c0,0x3e003e0,0x3e003e0,0x3e001c0,0x7fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,
  2308. - 0x7fc07838,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x1fec7038,0x70387038,0x7038380e,0x70003ce0,0x1800180,0x6600cf0,0xe7007c0,0x0,
  2309. - 0x1800180,0x6600e70,0x1800180,0x6600e70,0x7c00cf0,0x1800180,0x6600cf0,0xe700000,0x180,0x1800660,0xe700180,0x38000e70,0x0,
  2310. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630030c,0x3f0e700,0x1e200180,0x1800180,0x21100000,0x0,
  2311. - 0x38,0x1e7819c0,0x38781038,0x1e01c00,0xf080038,0x1c381c38,0x0,0x0,0x1878,0x7fc03e0,0x70e01e18,0x70e07000,0x70001e18,0x703801c0,
  2312. - 0x707038,0x70007c7c,0x7c381c70,0x70701c70,0x70703830,0x1c07038,0x381ce007,0x1c1c3c1e,0x3c0380,0x380001c0,0x7e00000,0xc00000,
  2313. - 0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0,0x70c0000,0xe0,
  2314. - 0x0,0x0,0xc300000,0x38300000,0x3c700000,0x3c0000,0x0,0x0,0x0,0x0,0xce022f4,0x1800000,0x0,0x1803c1e,0x1c0,0x2003c2,0x3c1e,
  2315. - 0x1800e08,0x7e0,0x300000,0x0,0x7e00000,0xe700000,0x600030,0x3000000,0x3f980000,0x180,0x18200000,0xc000c00,0x1e0001c0,0x3e003e0,
  2316. - 0x3e003e0,0x3e003e0,0xfe01e18,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70e07c38,0x1c701c70,0x1c701c70,0x1c700000,0x3c787038,
  2317. - 0x70387038,0x70383c1e,0x70003870,0xc00300,0xc300ce0,0x380,0x0,0xc00300,0xc300000,0xc00300,0xc300000,0xfc00ce0,0xc00300,0xc300ce0,
  2318. - 0x0,0xc0,0x3000c30,0x300,0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630031c,0xff8c300,
  2319. - 0x1c000180,0x1800180,0x39380000,0x0,0x70,0x1c3801c0,0x203c001c,0x3e01c00,0x1c000038,0x381c3838,0x0,0x0,0x1038,0xe0e03e0,0x70703c08,
  2320. - 0x70707000,0x70003808,0x703801c0,0x707070,0x70007c7c,0x7c383838,0x70383838,0x70387010,0x1c07038,0x381c700e,0x1e3c1c1c,0x780380,
  2321. - 0x1c0001c0,0xe700000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,
  2322. - 0x0,0xe000000,0xe0,0x0,0x1000100,0x3800,0x70100000,0x38700000,0x780000,0x1c0,0x7801ce0,0xe380000,0x0,0x2264,0x0,0x0,0x1c1c,
  2323. - 0x0,0x200780,0x1c1c,0x1800c00,0x1818,0x7f00000,0x0,0x18180000,0xc300000,0x600070,0x0,0x7f980000,0x180,0x18300000,0xc000c00,
  2324. - 0x3000000,0x3e003e0,0x3e003e0,0x3e003e0,0xee03c08,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838,
  2325. - 0x38380000,0x38387038,0x70387038,0x70381c1c,0x7fc03870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbc00000,0x0,0x0,0x0,0x0,0x0,0x0,
  2326. - 0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0xe88c300,0x1c000180,0x38001c0,
  2327. - 0xfe00180,0x0,0x70,0x1c3801c0,0x1c001c,0x6e01c00,0x1c000078,0x381c3818,0x0,0x40000,0x40000038,0x1c0607e0,0x70703800,0x70707000,
  2328. - 0x70003800,0x703801c0,0x7070e0,0x70007c7c,0x7c383838,0x70383838,0x70387000,0x1c07038,0x381c700e,0xf780e38,0x700380,0x1c0001c0,
  2329. - 0x1c380000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0,
  2330. - 0xe000000,0xe0,0x0,0x1000100,0x4400,0x70000000,0x38700000,0x700000,0xe0,0x7001c70,0xe380000,0x0,0x2264,0x0,0x0,0xe38,0x0,
  2331. - 0x200700,0xe38,0x1800c00,0x300c,0xc300000,0x0,0x300c0000,0xc300180,0x6003c0,0x0,0x7f980000,0x180,0x18300000,0xc000c00,0x1800000,
  2332. - 0x7e007e0,0x7e007e0,0x7e003e0,0xee03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838,0x38380000,
  2333. - 0x38387038,0x70387038,0x70380e38,0x7ff039f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x40000,0x0,0x0,0x38000000,
  2334. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0x1c80e700,0x1c000180,0x38001c0,0x3800180,
  2335. - 0x0,0xe0,0x381c01c0,0x1c001c,0x6e01c00,0x38000070,0x381c381c,0x0,0x3c0000,0x78000078,0x38030770,0x70707800,0x70387000,0x70007000,
  2336. - 0x703801c0,0x7071c0,0x7000745c,0x7638701c,0x7038701c,0x70387000,0x1c07038,0x1c38718e,0x7700f78,0xf00380,0xe0001c0,0x381c0000,
  2337. - 0x7e0,0x39e003e0,0x79c03f0,0x3ffc079c,0x39e01fc0,0xfe01c1e,0x3807778,0x39e007e0,0x39e0079c,0x73c07e0,0x7ff83838,0x701ce007,
  2338. - 0x783c701c,0x1ffc01c0,0x18001c0,0x0,0x1c000100,0xe0,0x0,0x1000100,0x4200,0x70000000,0x70700100,0xf00100,0x10000e0,0x7000c70,
  2339. - 0xc700000,0x0,0x2204,0x7e00000,0x1e380100,0x1ffc0f78,0x0,0xf80700,0xf78,0x1800e00,0x63e6,0x18300000,0x0,0x6fe60000,0xe700180,
  2340. - 0xc00060,0x3838,0x7f980000,0x180,0x18300000,0xc000c00,0x18001c0,0x7700770,0x7700770,0x77007f0,0xee07800,0x70007000,0x70007000,
  2341. - 0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1008,0x707c7038,0x70387038,0x70380f78,0x707039c0,0x7e007e0,0x7e007e0,
  2342. - 0x7e007e0,0x1f3c03e0,0x3f003f0,0x3f003f0,0x1fc01fc0,0x1fc01fc0,0x7f039e0,0x7e007e0,0x7e007e0,0x7e00380,0x7ce3838,0x38383838,
  2343. - 0x3838701c,0x39e0701c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6307fff,0x1c807e0c,0xe000180,
  2344. - 0x30000c0,0x3800180,0x0,0xe0,0x381c01c0,0x1c001c,0xce01fe0,0x38000070,0x381c381c,0x3800380,0xfc0000,0x7e0000f0,0x30030770,
  2345. - 0x70707000,0x70387000,0x70007000,0x703801c0,0x707380,0x700076dc,0x7638701c,0x7038701c,0x70387800,0x1c07038,0x1c3873ce,0x7f00770,
  2346. - 0xe00380,0xe0001c0,0x700e0000,0x1ff8,0x3ff00ff0,0xffc0ff8,0x3ffc0ffc,0x3bf01fc0,0xfe01c3c,0x3807f78,0x3bf00ff0,0x3ff00ffc,
  2347. - 0x77e0ff0,0x7ff83838,0x3838e007,0x3c783838,0x1ffc01c0,0x18001c0,0x0,0x7ff00380,0x1e0,0x0,0x1000100,0x4200,0x78000000,0x70700380,
  2348. - 0xe00380,0x3800060,0xe000e30,0x1c600000,0x0,0x2204,0xff00000,0x7f7c0380,0x1ffc0770,0x1c0,0x3fc0700,0x18040770,0x1800780,0x4e12,
  2349. - 0x18300104,0x0,0x4c320000,0x7e00180,0x1c00030,0x3838,0x7f980000,0x180,0x18302080,0xc000c00,0x18001c0,0x7700770,0x7700770,
  2350. - 0x7700770,0x1ee07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c381c,0x705c7038,0x70387038,
  2351. - 0x70380770,0x70383b80,0x1ff81ff8,0x1ff81ff8,0x1ff81ff8,0x3fbe0ff0,0xff80ff8,0xff80ff8,0x1fc01fc0,0x1fc01fc0,0xff83bf0,0xff00ff0,
  2352. - 0xff00ff0,0xff00380,0xffc3838,0x38383838,0x38383838,0x3ff03838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2353. - 0x0,0x1c0,0x7fff,0x1c803c38,0xf000000,0x70000e0,0xfe00180,0x0,0x1c0,0x381c01c0,0x3c0078,0xce01ff0,0x39e000f0,0x1c38381c,0x3800380,
  2354. - 0x3e07ffc,0xf8001f0,0x307b0770,0x70e07000,0x70387000,0x70007000,0x703801c0,0x707700,0x700076dc,0x7638701c,0x7038701c,0x70387e00,
  2355. - 0x1c07038,0x1c3873ce,0x3e007f0,0x1e00380,0x70001c0,0x0,0x1038,0x3c381e18,0x1c7c1e3c,0x3801e3c,0x3c7801c0,0xe01c78,0x380739c,
  2356. - 0x3c781c38,0x3c381c3c,0x7c21e10,0x7003838,0x3838700e,0x1ef03838,0x3c01c0,0x18001c0,0x0,0x7fe007c0,0x1c0,0x0,0x1000100,0x6400,
  2357. - 0x7e000000,0x707007c0,0x1e007c0,0x7c00070,0xe000638,0x18600000,0x0,0x0,0x1e100000,0x73ce07c0,0x3c07f0,0x1c0,0x7240700,0x1ddc3ffe,
  2358. - 0x1800de0,0x8c01,0x1870030c,0x0,0x8c310000,0x3c00180,0x3800030,0x3838,0x7f980000,0x180,0x183030c0,0xc000c00,0x430001c0,0x7700770,
  2359. - 0x7700770,0x7700770,0x1ce07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1c38,0x70dc7038,
  2360. - 0x70387038,0x703807f0,0x70383b80,0x10381038,0x10381038,0x10381038,0x21e71e18,0x1e3c1e3c,0x1e3c1e3c,0x1c001c0,0x1c001c0,0x1e383c78,
  2361. - 0x1c381c38,0x1c381c38,0x1c380380,0x1c383838,0x38383838,0x38383838,0x3c383838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2362. - 0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0x1e8000e0,0x1f000000,0x70000e0,0x39380180,0x0,0x1c0,0x3b9c01c0,0x3c07f0,0x18e01078,0x3bf800e0,
  2363. - 0x7e0383c,0x3800380,0x1f807ffc,0x3f001c0,0x61ff0e38,0x7fc07000,0x70387ff0,0x7ff07000,0x7ff801c0,0x707f00,0x7000729c,0x7338701c,
  2364. - 0x7070701c,0x70703fc0,0x1c07038,0x1e7873ce,0x1c003e0,0x3c00380,0x70001c0,0x0,0x1c,0x3c381c00,0x1c3c1c1c,0x3801c3c,0x383801c0,
  2365. - 0xe01cf0,0x380739c,0x38381c38,0x3c381c3c,0x7801c00,0x7003838,0x3838700e,0xfe03c78,0x7801c0,0x18001c0,0x0,0x1c000c20,0xff8,
  2366. - 0x0,0x1ff01ff0,0x3818,0x3fc00100,0x707e0c20,0x3c00c20,0xc200030,0xc000618,0x18c00000,0x0,0x0,0x1c000080,0xe1ce0c20,0x7803e0,
  2367. - 0x1c0,0xe200700,0xff83ffe,0x1801878,0x9801,0x1cf0071c,0x7ffc0000,0x8c310000,0x7ffe,0x7000030,0x3838,0x3f980380,0x180,0xc6038e0,
  2368. - 0x7f9c7f9c,0x3e1c01c0,0xe380e38,0xe380e38,0xe380f78,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0,0x1c001c0,0xfe387338,0x701c701c,
  2369. - 0x701c701c,0x701c0e70,0x719c7038,0x70387038,0x703803e0,0x70383b80,0x1c001c,0x1c001c,0x1c001c,0xe71c00,0x1c1c1c1c,0x1c1c1c1c,
  2370. - 0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380000,0x3c383838,0x38383838,0x38383c78,0x3c383c78,0x0,0x0,0x0,0x0,
  2371. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0xf800380,0x3f830000,0x70000e0,0x31080180,0x0,0x380,0x3b9c01c0,
  2372. - 0x7807e0,0x38e00038,0x3c3800e0,0xff01c3c,0x3800380,0x7c000000,0x7c03c0,0x61870e38,0x7fc07000,0x70387ff0,0x7ff070fc,0x7ff801c0,
  2373. - 0x707f80,0x7000739c,0x7338701c,0x7ff0701c,0x7fe00ff0,0x1c07038,0xe7073ce,0x1c003e0,0x3800380,0x38001c0,0x0,0x1c,0x381c3800,
  2374. - 0x381c380e,0x380381c,0x383801c0,0xe01de0,0x380739c,0x3838381c,0x381c381c,0x7001e00,0x7003838,0x1c70718e,0x7e01c70,0xf00380,
  2375. - 0x18001e0,0x1e000000,0x1c001bb0,0xff8,0x0,0x1000100,0xe0,0xff00300,0x707e1bb0,0x3801bb0,0x1bb00010,0x8000308,0x30c00000,0x0,
  2376. - 0x0,0x1e0000c0,0xe1ce1bb0,0xf003e0,0x1c0,0x1c203ff8,0x63003e0,0x180181c,0x9801,0xfb00e38,0x7ffc0000,0x8fc10000,0x7ffe,0xe000860,
  2377. - 0x3838,0x1f980380,0x180,0x7c01c70,0x1f001f0,0x1f003c0,0xe380e38,0xe380e38,0xe380e38,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0,
  2378. - 0x1c001c0,0xfe387338,0x701c701c,0x701c701c,0x701c07e0,0x731c7038,0x70387038,0x703803e0,0x70383980,0x1c001c,0x1c001c,0x1c001c,
  2379. - 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x387c3838,0x38383838,0x38381c70,
  2380. - 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc30,0x7f00e00,0x33c30000,0x70000e0,0x1007ffe,
  2381. - 0x0,0x380,0x3b9c01c0,0xf00078,0x30e0001c,0x3c1c01c0,0x1c381fdc,0x0,0x70000000,0x1c0380,0x63030e38,0x70707000,0x70387000,0x700070fc,
  2382. - 0x703801c0,0x707b80,0x7000739c,0x7338701c,0x7fc0701c,0x7fc001f0,0x1c07038,0xe703e5c,0x3e001c0,0x7800380,0x38001c0,0x0,0x7fc,
  2383. - 0x381c3800,0x381c380e,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7001fc0,0x7003838,0x1c70718e,0x7c01c70,
  2384. - 0xe01f00,0x180007c,0x7f8c0000,0x7fc03fb8,0x1c0,0x0,0x1000100,0x700,0x1f00600,0x70703fb8,0x7803fb8,0x3fb80000,0x8000000,0x180,
  2385. - 0x0,0x0,0x1fc00060,0xe1ce3fb8,0xe001c0,0x1c0,0x1c203ff8,0xc1801c0,0x180c,0x9801,0x1c70,0xc0000,0x8cc10000,0x180,0xfe007c0,
  2386. - 0x3838,0x7980380,0xff0,0xe38,0x3e003e00,0x3e000380,0xe380e38,0xe380e38,0xe380e38,0x38e07000,0x70007000,0x70007000,0x1c001c0,
  2387. - 0x1c001c0,0x70387338,0x701c701c,0x701c701c,0x701c03c0,0x731c7038,0x70387038,0x703801c0,0x703838e0,0x7fc07fc,0x7fc07fc,0x7fc07fc,
  2388. - 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x38dc3838,0x38383838,0x38381c70,
  2389. - 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc60,0xf83878,0x71e30000,0x70000e0,0x1007ffe,
  2390. - 0x7f0,0x380,0x381c01c0,0x1e0003c,0x60e0001c,0x381c01c0,0x381c079c,0x0,0x7c000000,0x7c0380,0x63031c1c,0x70307000,0x70387000,
  2391. - 0x7000701c,0x703801c0,0x7071c0,0x7000739c,0x71b8701c,0x7000701c,0x71e00078,0x1c07038,0xe703e7c,0x7e001c0,0xf000380,0x38001c0,
  2392. - 0x0,0x1ffc,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fc0,0x380739c,0x3838381c,0x381c381c,0x7000ff0,0x7003838,0x1ef03bdc,
  2393. - 0x3800ee0,0x1e01f00,0x180007c,0x61fc0000,0x7fc07f3c,0x1c0,0x0,0x1000100,0x1800,0x780c00,0x70707f3c,0xf007f3c,0x7f3c0000,0x0,
  2394. - 0x3c0,0x3ffcffff,0x0,0xff00030,0xe1fe7f3c,0x1e001c0,0x1c0,0x1c200700,0xc183ffe,0xe0c,0x9801,0x1ff038e0,0xc07f0,0x8c610000,
  2395. - 0x180,0x0,0x3838,0x1980380,0x0,0x1ff0071c,0xe000e000,0xe0000f80,0x1c1c1c1c,0x1c1c1c1c,0x1c1c1e38,0x38e07000,0x70007000,0x70007000,
  2396. - 0x1c001c0,0x1c001c0,0x703871b8,0x701c701c,0x701c701c,0x701c03c0,0x761c7038,0x70387038,0x703801c0,0x70703870,0x1ffc1ffc,0x1ffc1ffc,
  2397. - 0x1ffc1ffc,0xfff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x389c3838,0x38383838,
  2398. - 0x38380ee0,0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xfffc,0xbc60fc,0x70e30000,0x70000e0,
  2399. - 0x180,0x7f0,0x700,0x381c01c0,0x3e0001c,0x7ffc001c,0x381c03c0,0x381c001c,0x0,0x1f807ffc,0x3f00380,0x63031ffc,0x70387000,0x70387000,
  2400. - 0x7000701c,0x703801c0,0x7071e0,0x7000701c,0x71b8701c,0x7000701c,0x70f00038,0x1c07038,0x7e03e7c,0x77001c0,0xe000380,0x1c001c0,
  2401. - 0x0,0x3c1c,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x70003f8,0x7003838,0xee03bdc,
  2402. - 0x3c00ee0,0x3c00380,0x18000e0,0xf00000,0x1c007e7c,0x3c0,0x0,0x1000100,0x0,0x381800,0x70707e7c,0xe007e7c,0x7e7c0000,0x0,0x7c0,
  2403. - 0x0,0x0,0x3f80018,0xe1fe7e7c,0x3c001c0,0x1c0,0x1c200700,0xc183ffe,0xf0c,0x8c01,0x38e0,0xc07f0,0x8c710000,0x180,0x0,0x3838,
  2404. - 0x1980000,0x0,0x71c,0x7000f0,0x700f00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x3fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
  2405. - 0x703871b8,0x701c701c,0x701c701c,0x701c07e0,0x7c1c7038,0x70387038,0x703801c0,0x7ff03838,0x3c1c3c1c,0x3c1c3c1c,0x3c1c3c1c,
  2406. - 0x3fff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x391c3838,0x38383838,0x38380ee0,
  2407. - 0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfffc,0x9c01ce,0x70f60000,0x70000e0,0x180,
  2408. - 0x0,0x700,0x381c01c0,0x780001c,0x7ffc001c,0x381c0380,0x381c003c,0x0,0x3e07ffc,0xf800380,0x63031ffc,0x70387000,0x70387000,
  2409. - 0x7000701c,0x703801c0,0x7070f0,0x7000701c,0x71b8701c,0x7000701c,0x70700038,0x1c07038,0x7e03e7c,0xf7801c0,0x1e000380,0x1c001c0,
  2410. - 0x0,0x381c,0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7000078,0x7003838,0xee03a5c,
  2411. - 0x7c00fe0,0x78001c0,0x18001c0,0x0,0x1c003ef8,0x380,0x0,0x1000100,0x810,0x383000,0x70703ef8,0x1e003ef8,0x3ef80000,0x0,0x7c0,
  2412. - 0x0,0x0,0x78000c,0xe1c03ef8,0x78001c0,0x1c0,0x1c200700,0x63001c0,0x18003f8,0x4e12,0x1c70,0xc0000,0x4c320000,0x180,0x0,0x3838,
  2413. - 0x1980000,0x0,0xe38,0x700118,0x701e00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x7fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
  2414. - 0x703871b8,0x701c701c,0x701c701c,0x701c0e70,0x7c1c7038,0x70387038,0x703801c0,0x7fc0381c,0x381c381c,0x381c381c,0x381c381c,
  2415. - 0x78e03800,0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x3b1c3838,0x38383838,0x38380fe0,
  2416. - 0x381c0fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1860,0x9c0186,0x707e0000,0x30000c0,0x180,
  2417. - 0x0,0xe00,0x183801c0,0xf00001c,0xe0001c,0x181c0380,0x381c0038,0x0,0xfc0000,0x7e000000,0x61873c1e,0x70383800,0x70707000,0x7000381c,
  2418. - 0x703801c0,0x707070,0x7000701c,0x70f83838,0x70003838,0x70780038,0x1c07038,0x7e03c3c,0xe3801c0,0x1c000380,0xe001c0,0x0,0x381c,
  2419. - 0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01ef0,0x380739c,0x3838381c,0x381c381c,0x7000038,0x7003838,0xfe03e7c,0xfe007c0,
  2420. - 0x70001c0,0x18001c0,0x0,0xe001ff0,0x380,0x0,0x1000100,0x162c,0x381800,0x30701ff0,0x1c001ff0,0x1ff00000,0x0,0x3c0,0x0,0x0,
  2421. - 0x380018,0xe1c01ff0,0x70001c0,0x1c0,0x1c200700,0xff801c0,0x18000f0,0x63e6,0xe38,0x0,0x6c3e0000,0x0,0x0,0x3838,0x1980000,0x0,
  2422. - 0x1c70,0xf0000c,0xf01c00,0x3c1e3c1e,0x3c1e3c1e,0x3c1e3c1c,0x70e03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x707070f8,
  2423. - 0x38383838,0x38383838,0x38381c38,0x38387038,0x70387038,0x703801c0,0x7000381c,0x381c381c,0x381c381c,0x381c381c,0x70e03800,
  2424. - 0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0380,0x3e1c3838,0x38383838,0x383807c0,0x381c07c0,
  2425. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18c0,0x9c0186,0x783c0000,0x38001c0,0x180,0x3800000,
  2426. - 0x3800e00,0x1c3801c0,0x1e00003c,0xe00038,0x1c1c0780,0x381c0038,0x3800380,0x3c0000,0x78000000,0x61ff380e,0x70383808,0x70707000,
  2427. - 0x7000381c,0x703801c0,0x40707078,0x7000701c,0x70f83838,0x70003838,0x70384038,0x1c07038,0x7e03c3c,0x1e3c01c0,0x3c000380,0xe001c0,
  2428. - 0x0,0x383c,0x3c381c00,0x1c3c1c00,0x3801c3c,0x383801c0,0xe01c78,0x380739c,0x38381c38,0x3c381c3c,0x7000038,0x7003878,0x7c01e78,
  2429. - 0x1ef007c0,0xf0001c0,0x18001c0,0x0,0xe000ee0,0x7800380,0xe380000,0x1001ff0,0x2242,0x40380c00,0x38700ee0,0x3c000ee0,0xee00000,
  2430. - 0x0,0x0,0x0,0x0,0x380030,0xe1c00ee0,0xf0001c0,0x1c0,0xe200700,0xdd801c0,0x1800038,0x300c,0x71c,0x0,0x300c0000,0x0,0x0,0x3838,
  2431. - 0x1980000,0x0,0x38e0,0xb0000c,0xb01c08,0x380e380e,0x380e380e,0x380e380e,0x70e03808,0x70007000,0x70007000,0x1c001c0,0x1c001c0,
  2432. - 0x707070f8,0x38383838,0x38383838,0x3838381c,0x38387038,0x70387038,0x703801c0,0x7000381c,0x383c383c,0x383c383c,0x383c383c,
  2433. - 0x70e01c00,0x1c001c00,0x1c001c00,0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383878,0x38783878,0x387807c0,
  2434. - 0x3c3807c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x18c0,0x10b801ce,0x3c3e0000,0x38001c0,0x180,
  2435. - 0x3800000,0x3801c00,0x1e7801c0,0x3c002078,0xe02078,0x1c380700,0x1c3810f0,0x3800380,0x40000,0x40000380,0x307b380e,0x70701e18,
  2436. - 0x70e07000,0x70001c1c,0x703801c0,0x60e0703c,0x7000701c,0x70f83c78,0x70003c70,0x703c70f0,0x1c03870,0x3c01c3c,0x3c1c01c0,0x78000380,
  2437. - 0x7001c0,0x0,0x3c7c,0x3c381e18,0x1c7c1e0c,0x3801c3c,0x383801c0,0xe01c38,0x3c0739c,0x38381c38,0x3c381c3c,0x7001078,0x7803c78,
  2438. - 0x7c01c38,0x1c780380,0x1e0001c0,0x18001c0,0x0,0x70c06c0,0x7000380,0xe300000,0x1000100,0x2142,0x70f00600,0x3c7006c0,0x780006c0,
  2439. - 0x6c00000,0x0,0x0,0x0,0x0,0x10780060,0x73e206c0,0x1e0001c0,0x1c0,0x7240700,0x180c01c0,0x1800018,0x1818,0x30c,0x0,0x18180000,
  2440. - 0x0,0x0,0x3c78,0x1980000,0x0,0x30c0,0x130000c,0x1301c18,0x380e380e,0x380e380e,0x380e380e,0x70e01e18,0x70007000,0x70007000,
  2441. - 0x1c001c0,0x1c001c0,0x70e070f8,0x3c783c78,0x3c783c78,0x3c781008,0x7c783870,0x38703870,0x387001c0,0x70003a3c,0x3c7c3c7c,0x3c7c3c7c,
  2442. - 0x3c7c3c7c,0x79f11e18,0x1e0c1e0c,0x1e0c1e0c,0x1c001c0,0x1c001c0,0x1c783838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383c78,0x3c783c78,
  2443. - 0x3c780380,0x3c380380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x38c0,0x1ff800fc,0x1fee0000,
  2444. - 0x1800180,0x180,0x3800000,0x3801c00,0xff01ffc,0x3ffc3ff0,0xe03ff0,0xff00700,0x1ff81fe0,0x3800380,0x0,0x380,0x3000780f,0x7ff00ff8,
  2445. - 0x7fc07ff8,0x70000ffc,0x70381ffc,0x7fe0701c,0x7ff8701c,0x70781ff0,0x70001ff0,0x701c7ff0,0x1c01fe0,0x3c01c38,0x380e01c0,0x7ffc0380,
  2446. - 0x7001c0,0x0,0x1fdc,0x3ff00ff0,0xffc0ffc,0x3800fdc,0x38383ffe,0xe01c3c,0x1fc739c,0x38380ff0,0x3ff00ffc,0x7001ff0,0x3f81fb8,
  2447. - 0x7c01c38,0x3c3c0380,0x1ffc01c0,0x18001c0,0x0,0x3fc0380,0x7000380,0xc70718c,0x1000100,0x2244,0x7ff00200,0x1fff0380,0x7ffc0380,
  2448. - 0x3800000,0x0,0x0,0x0,0x0,0x1ff000c0,0x7f7e0380,0x1ffc01c0,0x1c0,0x3fc3ffe,0x1c0,0x1800018,0x7e0,0x104,0x0,0x7e00000,0x7ffe,
  2449. - 0x0,0x3fde,0x1980000,0x0,0x2080,0x3300018,0x3300ff0,0x780f780f,0x780f780f,0x780f780e,0xf0fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,
  2450. - 0x1ffc1ffc,0x7fc07078,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x7ff01fe0,0x1fe01fe0,0x1fe001c0,0x70003bf8,0x1fdc1fdc,0x1fdc1fdc,
  2451. - 0x1fdc1fdc,0x3fbf0ff0,0xffc0ffc,0xffc0ffc,0x3ffe3ffe,0x3ffe3ffe,0xff03838,0xff00ff0,0xff00ff0,0xff00000,0x3ff01fb8,0x1fb81fb8,
  2452. - 0x1fb80380,0x3ff00380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x31c0,0x7e00078,0x7cf0000,0x1800180,
  2453. - 0x0,0x3800000,0x3803800,0x3c01ffc,0x3ffc0fe0,0xe01fc0,0x3e00e00,0x7e00f80,0x3800380,0x0,0x380,0x18007007,0x7fc003f0,0x7f007ff8,
  2454. - 0x700003f0,0x70381ffc,0x3f80701e,0x7ff8701c,0x707807c0,0x700007c0,0x701e1fc0,0x1c00fc0,0x3c01818,0x780f01c0,0x7ffc0380,0x3801c0,
  2455. - 0x0,0xf9c,0x39e003e0,0x79c03f0,0x380079c,0x38383ffe,0xe01c1e,0x7c739c,0x383807e0,0x39e0079c,0x7000fc0,0x1f80f38,0x3801c38,
  2456. - 0x781e0380,0x1ffc01c0,0x18001c0,0x0,0x1f80100,0xe000700,0x1c60718c,0x1000100,0x1e3c,0x1fc00100,0x7ff0100,0x7ffc0100,0x1000000,
  2457. - 0x0,0x0,0x0,0x0,0xfc00080,0x3e3c0100,0x1ffc01c0,0x1c0,0xf83ffe,0x1c0,0x1800838,0x0,0x0,0x0,0x0,0x7ffe,0x0,0x3b9e,0x1980000,
  2458. - 0x0,0x0,0x2300038,0x23003e0,0x70077007,0x70077007,0x70077007,0xe0fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007078,
  2459. - 0x7c007c0,0x7c007c0,0x7c00000,0xc7c00fc0,0xfc00fc0,0xfc001c0,0x700039f0,0xf9c0f9c,0xf9c0f9c,0xf9c0f9c,0x1f1e03e0,0x3f003f0,
  2460. - 0x3f003f0,0x3ffe3ffe,0x3ffe3ffe,0x7e03838,0x7e007e0,0x7e007e0,0x7e00000,0x63e00f38,0xf380f38,0xf380380,0x39e00380,0x0,0x0,
  2461. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x3000000,0x3800,0x0,0x0,0x0,0x0,
  2462. - 0x0,0x300,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0,0x0,0x0,0x0,0x0,0x380,0x3801c0,0x0,0x0,0x0,0x0,0x1c,0x0,0xe00000,
  2463. - 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1c0,0x18001c0,0x0,0x0,0xe000700,0x18600000,0x1000100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2464. - 0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800ff0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0x1800000,0x0,0x6300070,0x6300000,0x0,
  2465. - 0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,
  2466. - 0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x7000000,
  2467. - 0x7000,0x0,0x0,0x0,0x0,0x0,0x700,0x0,0x0,0xf040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x3f0,0x1c0fc0,0x0,0x0,
  2468. - 0x0,0x0,0x1c,0x0,0xe00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1e0,0x18003c0,0x0,0x0,0xc000700,0x18c00000,0x1000000,0x0,
  2469. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x18007e0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000,
  2470. - 0x0,0x7f800e0,0x7f80000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,
  2471. - 0x0,0x0,0x0,0x0,0x0,0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,
  2472. - 0x0,0x600600,0x0,0x6000000,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,
  2473. - 0x3f0,0xfc0,0x0,0x0,0x0,0x0,0x838,0x0,0x1e00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0xf00,0xfc,0x1801f80,0x0,0x0,0x8008e00,0x30c00000,
  2474. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000,
  2475. - 0x0,0x3001c0,0x300000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,
  2476. - 0x0,0x0,0x0,0x0,0x0,0xf00,0x38000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,
  2477. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2478. - 0x0,0x0,0xff0,0x0,0x1fc00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3e00,0x7c,0x1801f00,0x0,0x0,0x800fe00,0x0,0x0,0x0,0x0,0x0,0x0,
  2479. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7c00000,0x0,0x3001fc,0x300000,
  2480. - 0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2481. - 0x3e00,0x38003e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2482. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x7e0,0x0,0x1f000000,
  2483. - 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3c00,0x0,0x1800000,0x0,0x0,0x7800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2484. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2485. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00,0x38003c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2486. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2487. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0,0x0,
  2488. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2489. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2490. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2491. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2492. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2493. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2494. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2495. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2496. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2497. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2498. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  2499. -
  2500. - // Definition of a 19x38 font
  2501. - const unsigned int font19x38[19*38*256/32] = {
  2502. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2503. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2504. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c380000,0x0,0x1c380,0x0,0x0,0x0,0x0,0x0,
  2505. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800007,0x3c003,0x86000000,
  2506. - 0x1e00000,0x3,0x80000700,0x3c00000,0x380000,0x70003c00,0x0,0xe1800e,0x1c00,0xf000e18,0x0,0x0,0x700000e0,0x780000,0x7000,0x0,
  2507. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2508. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2509. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2510. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe700000,0x0,0xe700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2511. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0000e,0x7e003,0xe60071c0,0x7f80000,0x1,0xc0000e00,0x7e0038e,0x1c0000,
  2512. - 0xe0007e00,0x38e00000,0xf98007,0x3800,0x1f800f98,0x1c70000,0x0,0x380001c0,0xfc0071,0xc000e000,0x0,0x0,0x0,0x0,0x3e00000,0x0,
  2513. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2514. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2515. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2516. - 0x0,0x0,0x0,0x7e00000,0x0,0x7e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2517. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0001c,0xe7006,0x7c0071c0,0xe180000,0x0,0xe0001c00,0xe70038e,0xe0001,0xc000e700,0x38e00000,
  2518. - 0x19f0003,0x80007000,0x39c019f0,0x1c70000,0x0,0x1c000380,0x1ce0071,0xc001c000,0x0,0x0,0x0,0x0,0x7f00000,0x0,0x0,0x0,0x0,0x0,
  2519. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2520. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2521. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,
  2522. - 0x0,0x3c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2523. - 0x0,0x0,0x700038,0x1c3806,0x3c0071c0,0xc0c0000,0x0,0x70003800,0x1c38038e,0x70003,0x8001c380,0x38e00000,0x18f0001,0xc000e000,
  2524. - 0x70e018f0,0x1c70000,0x0,0xe000700,0x3870071,0xc0038000,0x0,0x0,0x0,0x0,0xe380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2525. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2526. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2527. - 0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60000000,0x0,0x0,
  2528. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c38,0x0,0x1,0xc3800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x0,
  2529. - 0x0,0x0,0x0,0x0,0x0,0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000003,0x80018000,0x0,0xc180000,
  2530. - 0xe,0x380,0x1800000,0xe00000,0x38001800,0x0,0x38,0xe00,0x6000000,0x0,0x1,0xc0000070,0x300000,0x3800,0x0,0x0,0x0,0x0,0x0,0x0,
  2531. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2532. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0,0x0,0x0,0x0,
  2533. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78c00,0xc30,
  2534. - 0x0,0x0,0xc3000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800000,0x0,0x0,0x0,0xe0,0x1c000f,0xc0000000,0x0,0x0,
  2535. - 0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000007,0x3c003,0xc6000000,0xc180000,0x7,0x700,
  2536. - 0x3c00000,0x700000,0x70003c00,0x0,0xf1801c,0x1c00,0xf000f18,0x0,0x0,0xe00000e0,0x780000,0x7000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2537. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2538. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x3800000,0x700000,0x38,
  2539. - 0x7,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf800e,0x3e0000,0x0,0x0,0x0,0x1e00000,0x0,0x1,
  2540. - 0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7cc00,0x660,0x0,0x0,0x66000000,0x0,0x0,0x0,0x0,0x7,0x1c000000,0x0,0x0,0x0,0x3fe00000,
  2541. - 0x0,0x0,0x7000000,0x0,0x0,0x0,0x3e0,0x7c001f,0xe0000000,0x0,0x0,0x0,0xe1c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2542. - 0x0,0x0,0x0,0x1f80,0x380000e,0x7e007,0xe60071c0,0xc180000,0x3,0x80000e00,0x7e0038e,0x380000,0xe0007e00,0x38e00f00,0x1f9800e,
  2543. - 0x3800,0x1f801f98,0x1c70000,0x0,0x700001c0,0xfc0071,0xc000e007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2544. - 0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61c00600,0x1e00007e,0x70000,0x18003000,0x1800000,0x0,0x0,0x1c01f0,0x7e003f,0xc003f800,
  2545. - 0x1e03ffc,0x7f01ff,0xfc03f000,0x7e000000,0x0,0x0,0xfc0,0x1e,0x7fe000,0x7e03fe00,0x3fff07ff,0xe007e038,0x383ffe0,0xff81c01,
  2546. - 0xe1c000f8,0xf8f00e0,0xfc01ffc,0x3f00ff,0xc000fe07,0xfffc7007,0x1c007700,0x73c01ef,0x78ffff,0xfe0380,0xfe000,0x38000000,0x1800000,
  2547. - 0x700000,0x38,0x1f,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0xfc0000,
  2548. - 0x0,0x7f00000,0x0,0x1,0x98000000,0x7f00000,0x3ffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0xcf81f,0xee3807e0,0x0,0x0,0x7e03c01e,0x1c,
  2549. - 0x0,0x1f800000,0xf0078038,0xfc007,0x1c000000,0xfe00000,0x0,0x0,0x3fe000f0,0xf,0xc001f800,0x6000000,0xffc000,0x0,0x1c0007e0,
  2550. - 0x360,0x6c0010,0x70000700,0xf0001e,0x3c000,0x78000f00,0x7f800ff,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0,
  2551. - 0x7807007,0xe000fc00,0x1f8003f0,0x7e0000,0x1f867,0x70e00e,0x1c01c380,0x38f00787,0x3fe0,0x180000c,0x66006,0x7c0071c0,0xe380000,
  2552. - 0x1,0x80000c00,0x660038e,0x180000,0xc0006600,0x38e0078e,0x19f0006,0x3000,0x198019f0,0x1c70000,0x0,0x30000180,0xcc0071,0xc000c007,
  2553. - 0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61800600,0x7f8001ff,0x70000,
  2554. - 0x38003800,0x1800000,0x0,0x0,0x3807fc,0x1fe00ff,0xf00ffe00,0x3e03ffc,0xff81ff,0xfc07fc01,0xff800000,0x0,0x0,0x3fe0,0xfe001e,
  2555. - 0x7ff801,0xff83ff80,0x3fff07ff,0xe01ff838,0x383ffe0,0xff81c03,0xc1c000f8,0xf8f80e0,0x3ff01fff,0xffc0ff,0xf003ff87,0xfffc7007,
  2556. - 0x1e00f700,0x71c03c7,0x70ffff,0xfe01c0,0xfe000,0x7c000000,0xc00000,0x700000,0x38,0x3f,0xe000001c,0x1c00,0x1c00700,0x7fc0000,
  2557. - 0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0x3fe0000,0x0,0xff00000,0x0,0x3,0xc000000,0x1ffc0000,0xfffe00,
  2558. - 0xffff0,0x0,0x0,0x0,0x0,0x0,0xc781f,0xee3803c0,0x0,0x0,0x3c01c01c,0x1c,0xc000,0x7fc00000,0x70070038,0x3fe007,0x1c000000,0x1ff80000,
  2559. - 0x0,0x0,0x3fe003fc,0x1f,0xe003fc00,0xc000000,0x3ffc000,0x0,0x7c000ff0,0x60,0xc0000,0x30000700,0xf0001e,0x3c000,0x78000f00,
  2560. - 0x3f000ff,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x7c0701f,0xf803ff00,0x7fe00ffc,0x1ff8000,0x7fe67,
  2561. - 0x70e00e,0x1c01c380,0x38700707,0x7ff0,0xc00018,0xc3006,0x3c0071c0,0x7f00000,0x0,0xc0001800,0xc30038e,0xc0001,0x8000c300,0x38e003fc,
  2562. - 0x18f0003,0x6000,0x30c018f0,0x1c70000,0x0,0x18000300,0x1860071,0xc0018007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2563. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe1801fc0,0x618001ff,0x70000,0x30001800,0x21840000,0x0,0x0,0x380ffe,0x1fe00ff,
  2564. - 0xfc0fff00,0x3e03ffc,0x1ff81ff,0xfc0ffe03,0xffc00000,0x0,0x0,0x7ff0,0x3ff803f,0x7ffc03,0xffc3ffc0,0x3fff07ff,0xe03ffc38,0x383ffe0,
  2565. - 0xff81c07,0x81c000f8,0xf8f80e0,0x7ff81fff,0x81ffe0ff,0xf80fff87,0xfffc7007,0xe00e700,0x70e0387,0x80f0ffff,0xe001c0,0xe000,
  2566. - 0xfe000000,0xe00000,0x700000,0x38,0x3c,0x1c,0x1c00,0x1c00700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x78000e,0x3c000,
  2567. - 0x0,0x7ff0000,0x0,0xf100000,0x0,0x7,0xe000000,0x7ffc0000,0x1fffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0x3,0xf780180,0x0,0x0,0x1801e03c,
  2568. - 0x1c,0xc000,0xffc00000,0x780f0038,0x786000,0x7f00,0x18380000,0x0,0xfe00,0x30c,0x10,0x70020e00,0x1c000000,0x7f8c000,0x0,0x6c001c38,
  2569. - 0x60,0xc0000,0x70000700,0x1f8003f,0x7e000,0xfc001f80,0x3f000ff,0xf03ffc1f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc,
  2570. - 0x7c0703f,0xfc07ff80,0xfff01ffe,0x3ffc000,0xffec7,0x70e00e,0x1c01c380,0x38780f07,0xf070,0xe00038,0x1c3800,0x0,0x3e00000,0x0,
  2571. - 0xe0003800,0x1c380000,0xe0003,0x8001c380,0x3e0,0x3,0x8000e000,0x70e00000,0x0,0x0,0x1c000700,0x3870000,0x38007,0x0,0x0,0x0,
  2572. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe3807ff0,0xc0c003c1,0x70000,0x70001c00,
  2573. - 0x718e0000,0x0,0x0,0x700f1e,0x1ce00c0,0x3c0c0f80,0x7e03800,0x3e08000,0x381e0f03,0xc1e00000,0x0,0x0,0x7078,0x783c03f,0x701e07,
  2574. - 0xc1c383e0,0x38000700,0x7c1c38,0x3801c00,0x381c0f,0x1c000fc,0x1f8f80e0,0x78781c07,0x81e1e0e0,0x780f0180,0xe007007,0xe00e380,
  2575. - 0xe0f0783,0x80e0000e,0xe000e0,0xe001,0xef000000,0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,
  2576. - 0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xf830000,0x0,0x1e000000,0x0,0x0,0x10000,0x780c0000,0x3e38000,0xe0,0x0,0x0,0x0,0x0,0x0,0x3,
  2577. - 0xd580000,0x0,0x0,0xe038,0x1c,0xc000,0xf0400000,0x380e0038,0x702000,0x1ffc0,0xc0000,0x0,0x3ff80,0x606,0x0,0x30000600,0x0,
  2578. - 0x7f8c000,0x0,0xc001818,0x60,0xc0003,0xe0000700,0x1f8003f,0x7e000,0xfc001f80,0x73801ee,0x7c1c1c,0x38000,0x70000e00,0xe0001,
  2579. - 0xc0003800,0x700383e,0x7c0703c,0x3c078780,0xf0f01e1e,0x3c3c000,0xf0f87,0x70e00e,0x1c01c380,0x38380e07,0xe038,0x0,0x0,0x0,
  2580. - 0x0,0x0,0x0,0x0,0x0,0x0,0xff0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2581. - 0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xc380fff0,0xc0c00380,0x70000,0x70001c00,0x3dbc0070,0x0,0x0,0x701e0f,0xe0000,0x1e000380,
  2582. - 0x6e03800,0x7800000,0x781c0707,0x80e00000,0x0,0x0,0x4038,0xe00c03f,0x700e07,0x4380f0,0x38000700,0x700438,0x3801c00,0x381c0e,
  2583. - 0x1c000ec,0x1b8fc0e0,0xf03c1c03,0xc3c0f0e0,0x3c1e0000,0xe007007,0xe00e380,0xe070703,0xc1e0001e,0xe000e0,0xe001,0xc7000000,
  2584. - 0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xe010000,0x0,
  2585. - 0x1c000000,0x10,0x20000,0x6c000,0xf0000000,0x3838000,0x1e0,0x0,0xf000f,0xf1e00,0x78f00000,0x0,0x3,0xdd80000,0x0,0x0,0xf078,
  2586. - 0x0,0xc001,0xe0000000,0x1c1c0038,0x700000,0x3c1e0,0xc0000,0x0,0x783c0,0x606,0x0,0x30000e00,0x0,0xff8c000,0x0,0xc00300c,0x60,
  2587. - 0xc0003,0xe0000000,0x1f8003f,0x7e000,0xfc001f80,0x73801ce,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x7e07078,
  2588. - 0x1e0f03c1,0xe0783c0f,0x781e000,0x1c0787,0x70e00e,0x1c01c380,0x383c1e07,0xff00e038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x878,
  2589. - 0x0,0x0,0x0,0x7,0x80000080,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,
  2590. - 0x1c7000,0xc301e630,0xc0c00380,0x70000,0xe0000e00,0xff00070,0x0,0x0,0xe01c07,0xe0000,0xe000380,0xce03800,0x7000000,0x701c0707,
  2591. - 0x600000,0x0,0x4000010,0x38,0x1c00e07f,0x80700e0e,0x38070,0x38000700,0xe00038,0x3801c00,0x381c1c,0x1c000ec,0x1b8ec0e0,0xe01c1c01,
  2592. - 0xc38070e0,0x1c1c0000,0xe007007,0x701c380,0xe078e01,0xc1c0003c,0xe00070,0xe003,0x83800000,0x7f,0x71f000,0x3e003e38,0x3f007ff,
  2593. - 0xe01f1c1c,0x7801fc00,0x3fc00701,0xe01c0077,0x8f071e00,0xf801c7c,0x7c700e,0x3e01fc03,0xfff8380e,0xe007700,0x73c0787,0x387ffc,
  2594. - 0x70000e,0x1c000,0x0,0xe000000,0x0,0x1c000000,0x10,0x20000,0xc2000,0xe0000000,0x3838000,0x3c0,0x0,0xf000f,0x78e00,0x70e00000,
  2595. - 0x0,0x3,0xc980fe0,0x1f0,0xf8000007,0xffc07070,0x0,0x3f801,0xc0000000,0x1e3c0038,0x700000,0x70070,0x7fc0000,0x0,0xe00e0,0x606,
  2596. - 0x1c0000,0x70007c00,0x380e,0xff8c000,0x0,0xc00300c,0x60,0xc0000,0x70000000,0x3fc007f,0x800ff001,0xfe003fc0,0x73801ce,0xe0001c,
  2597. - 0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807,0x7607070,0xe0e01c1,0xc0383807,0x700e000,0x1c0387,0x70e00e,0x1c01c380,0x381c1c07,
  2598. - 0xffc0e0f8,0x3f8007f,0xfe001,0xfc003f80,0x7f007e3,0xe003e001,0xf8003f00,0x7e000fc,0xfe001f,0xc003f800,0x7f00003c,0x38f0007,
  2599. - 0xc000f800,0x1f0003e0,0x7c0007,0x8003f0c3,0x80e0701c,0xe0381c0,0x70700387,0x1f01c00e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2600. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0xc0c00380,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03c07,
  2601. - 0x800e0000,0xe000380,0x1ce03800,0x7000000,0x701c0707,0x7003c0,0x780000,0x3c00001e,0x38,0x18006073,0x80700e0e,0x38070,0x38000700,
  2602. - 0xe00038,0x3801c00,0x381c38,0x1c000ee,0x3b8ee0e1,0xe01e1c01,0xc78078e0,0x1c1c0000,0xe007007,0x701c387,0xe03de00,0xe3800038,
  2603. - 0xe00070,0xe007,0x1c00000,0x1ff,0xc077f801,0xff807fb8,0xff807ff,0xe03fdc1d,0xfc01fc00,0x3fc00703,0xc01c007f,0xdf877f00,0x3fe01dfe,
  2604. - 0xff700e,0xff07ff03,0xfff8380e,0x700f700,0x71e0f03,0x80707ffc,0x70000e,0x1c000,0x0,0x1c000008,0x0,0x1c000000,0x10,0x20000,
  2605. - 0x82000,0xe0000000,0x7038000,0x80000380,0x2000040,0x7000e,0x38700,0xf1e00000,0x0,0x3,0xc183ff8,0x3fd,0xfc008007,0xffc038e0,
  2606. - 0x0,0xffc01,0xc0008008,0xe380038,0x380000,0xe3e38,0x1ffc0040,0x80000000,0x1cfc70,0x606,0x1c0000,0xe0007c00,0x380e,0xff8c000,
  2607. - 0x0,0xc00300c,0x8100060,0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0x73801ce,0xe0001c,0x38000,0x70000e00,0xe0001,
  2608. - 0xc0003800,0x7003807,0x77070f0,0xf1e01e3,0xc03c7807,0x8f00f080,0x83c0787,0x70e00e,0x1c01c380,0x380e3807,0xffe0e1c0,0xffe01ff,
  2609. - 0xc03ff807,0xff00ffe0,0x1ffc0ff7,0xf01ff807,0xfc00ff80,0x1ff003fe,0xfe001f,0xc003f800,0x7f0003fc,0x3bf801f,0xf003fe00,0x7fc00ff8,
  2610. - 0x1ff0007,0x8007fd83,0x80e0701c,0xe0381c0,0x70380707,0x7f80e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2611. - 0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0x618081c0,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03803,0x800e0000,0xe000380,0x18e03800,
  2612. - 0xf000000,0xf01c0707,0x7003c0,0x780000,0xfc00001f,0x80000078,0x301e6073,0x80700e1c,0x38038,0x38000700,0x1c00038,0x3801c00,
  2613. - 0x381c70,0x1c000e6,0x338ee0e1,0xc00e1c01,0xc70038e0,0x1c1c0000,0xe007007,0x701c387,0xe01dc00,0xf7800078,0xe00070,0xe00e,0xe00000,
  2614. - 0x3ff,0xe07ffc03,0xffc0fff8,0x1ffc07ff,0xe07ffc1d,0xfe01fc00,0x3fc00707,0x801c007f,0xdf877f80,0x7ff01fff,0x1fff00e,0xff07ff03,
  2615. - 0xfff8380e,0x700e380,0xe0e0e03,0x80707ffc,0x70000e,0x1c000,0x0,0x7ffc001c,0x0,0x1c000000,0x10,0x20000,0x82000,0xe0000000,
  2616. - 0x7038001,0xc0000780,0x70000e0,0x3800e,0x38700,0xe1c00000,0x0,0x3,0xc183ff8,0x7ff,0xfc01c007,0xffc03de0,0x0,0x1ffc01,0xc001c01c,
  2617. - 0xf780038,0x3c0000,0xcff18,0x380c00c1,0x80000000,0x18fe30,0x30c,0x1c0001,0xc0000e00,0x380e,0xff8c000,0x0,0xc00300c,0xc180060,
  2618. - 0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x877070e0,
  2619. - 0x71c00e3,0x801c7003,0x8e0071c0,0x1c380fc7,0x70e00e,0x1c01c380,0x380f7807,0x1e0e380,0x1fff03ff,0xe07ffc0f,0xff81fff0,0x3ffe0fff,
  2620. - 0xf03ffc0f,0xfe01ffc0,0x3ff807ff,0xfe001f,0xc003f800,0x7f0007fe,0x3bfc03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x800fff83,0x80e0701c,
  2621. - 0xe0381c0,0x70380707,0xffc0e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f,
  2622. - 0xfff1c600,0x7f8381e0,0x70000,0xc0000600,0xff00070,0x0,0x0,0x1c03803,0x800e0000,0xe000f00,0x38e03fe0,0xe000000,0xe00e0e07,
  2623. - 0x7003c0,0x780007,0xf0ffff87,0xf00000f0,0x307fe0f3,0xc0703c1c,0x38038,0x38000700,0x1c00038,0x3801c00,0x381ce0,0x1c000e6,0x338e70e1,
  2624. - 0xc00e1c01,0xc70038e0,0x3c1e0000,0xe007007,0x783c38f,0x8e01fc00,0x770000f0,0xe00038,0xe01c,0x700000,0x381,0xe07c1e07,0xc0c1e0f8,
  2625. - 0x3c1e0038,0xf07c1f,0xe001c00,0x1c0070f,0x1c0079,0xf3c7c380,0xf0781f07,0x83c1f00f,0xc10f0300,0x1c00380e,0x700e380,0xe0f1e03,
  2626. - 0xc0f00078,0x70000e,0x1c000,0x0,0xfff8003e,0x0,0x3c000000,0x10,0x20000,0xc6000,0xf0000000,0x7038003,0xe0000f00,0xf8001f0,
  2627. - 0x3801c,0x18300,0xe1800000,0x0,0x3,0xc187818,0x70f,0x9e03e000,0x7801dc0,0x1c,0x3cc401,0xc000efb8,0x7f7f0038,0x3f0000,0x1ce11c,
  2628. - 0x300c01c3,0x80000000,0x38c638,0x3fc,0x1c0003,0x80000600,0x380e,0xff8c000,0x0,0xc00300c,0xe1c0060,0xc0010,0x70000700,0x79e00f3,
  2629. - 0xc01e7803,0xcf0079e0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003,
  2630. - 0x8e0070e0,0x38381dc7,0x70e00e,0x1c01c380,0x38077007,0xf0e700,0x1c0f0381,0xe0703c0e,0x781c0f0,0x381e083e,0x787c0c1e,0xf03c1e0,
  2631. - 0x783c0f07,0x800e0001,0xc0003800,0x7000fff,0x3e1c078,0x3c0f0781,0xe0f03c1e,0x783c000,0x1e0f03,0x80e0701c,0xe0381c0,0x70380f07,
  2632. - 0xc1e0e03c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1,0x8701c600,0x1e0f01e0,0x1,
  2633. - 0xc0000700,0x3dbc0070,0x0,0x0,0x1c03803,0x800e0000,0x1e01fe00,0x70e03ff8,0xe3e0001,0xe007fc07,0x80f003c0,0x78001f,0xc0ffff81,
  2634. - 0xfc0001e0,0x30e1e0e1,0xc07ff81c,0x38038,0x3ffe07ff,0xc1c0003f,0xff801c00,0x381de0,0x1c000e7,0x738e70e1,0xc00e1c03,0xc70038e0,
  2635. - 0x780f8000,0xe007007,0x383838d,0x8e00f800,0x7f0000e0,0xe00038,0xe000,0x0,0x200,0xf0780e07,0x8041c078,0x380e0038,0xe03c1e,
  2636. - 0xf001c00,0x1c0071e,0x1c0070,0xe1c783c0,0xe0381e03,0x8380f00f,0xe0000,0x1c00380e,0x381c380,0xe07bc01,0xc0e00078,0x70000e,
  2637. - 0x1c000,0x0,0x1c000061,0x0,0x38000000,0x10,0x20000,0x7c000,0x7c000000,0x703fc06,0x10000e00,0x18400308,0x1801c,0x1c381,0xc3800000,
  2638. - 0x0,0x0,0x7000,0xe0f,0xe061000,0x7801fc0,0x1c,0x38c001,0xc0007ff0,0x7fff0038,0x77c000,0x19c00c,0x301c0387,0x0,0x30c618,0xf0,
  2639. - 0x1c0007,0x600,0x380e,0x7f8c007,0x80000000,0xc001818,0x70e03fc,0x387f871f,0xe0e00700,0x70e00e1,0xc01c3803,0x870070e0,0xe1c038f,
  2640. - 0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003,0x8e007070,0x703839c7,0x70e00e,
  2641. - 0x1c01c380,0x3807f007,0x70e700,0x10078200,0xf0401e08,0x3c10078,0x200f001c,0x3878041c,0x70380e0,0x701c0e03,0x800e0001,0xc0003800,
  2642. - 0x7001e0f,0x3c1e070,0x1c0e0381,0xc070380e,0x701c000,0x1c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80e07038,0x0,0x0,0x0,0x0,0x0,
  2643. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600e600,0x7803f0,0x1,0xc0000700,0x718e0070,0x0,0x0,0x38038c3,
  2644. - 0x800e0000,0x3c01f800,0x60e03ffc,0xeff8001,0xc001f003,0xc1f003c0,0x7800fe,0xffff80,0x3f8003c0,0x60c0e0e1,0xc07fe01c,0x38038,
  2645. - 0x3ffe07ff,0xc1c07e3f,0xff801c00,0x381fe0,0x1c000e3,0x638e30e1,0xc00e1c07,0x870038ff,0xf00ff800,0xe007007,0x38381cd,0x9c007000,
  2646. - 0x3e0001e0,0xe0001c,0xe000,0x0,0x0,0x70780f0f,0x3c078,0x70070038,0x1e03c1c,0x7001c00,0x1c0073c,0x1c0070,0xe1c701c1,0xe03c1e03,
  2647. - 0xc780f00f,0xe0000,0x1c00380e,0x381c387,0xe03f801,0xc0e000f0,0x70000e,0x1c007,0xe0100000,0x1c0000cd,0x80000003,0xffc00000,
  2648. - 0x3ff,0x807ff000,0xe0,0x7fc00060,0x703fc0c,0xd8001e00,0x3360066c,0x1c018,0xc181,0x83000000,0x0,0x0,0x7000,0x300e07,0xe0cd800,
  2649. - 0xf000f80,0x1c,0x78c00f,0xff0038e0,0x3e00038,0xe1e000,0x19800c,0x383c070e,0x7fffc00,0x30fc18,0x0,0xffff80e,0x20e00,0x380e,
  2650. - 0x7f8c007,0x80000000,0xc001c38,0x38703ff,0xf87fff0f,0xcfe00f00,0x70e00e1,0xc01c3803,0x870070e0,0x1e1e078f,0xe1c0001f,0xff03ffe0,
  2651. - 0x7ffc0fff,0x800e0001,0xc0003800,0x700ff83,0x871870e0,0x71c00e3,0x801c7003,0x8e007038,0xe03871c7,0x70e00e,0x1c01c380,0x3803e007,
  2652. - 0x70e700,0x38000,0x70000e00,0x1c00038,0x7001c,0x38f00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7001c07,0x380e0f0,0x1e1e03c3,
  2653. - 0xc078780f,0xf01e000,0x3c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80f07038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2654. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600ff00,0x1e00778,0x38000001,0xc0000700,0x21843fff,0xe0000000,0x0,0x38039e3,0x800e0000,
  2655. - 0x7c01fe00,0xe0e0203e,0xeffc001,0xc00ffe03,0xff700000,0x7f0,0x0,0x7f00380,0x618060e1,0xc07ffc1c,0x38038,0x3ffe07ff,0xc1c07e3f,
  2656. - 0xff801c00,0x381ff0,0x1c000e3,0x638e38e1,0xc00e1fff,0x870038ff,0xc003fe00,0xe007007,0x38381cd,0x9c00f800,0x3e0003c0,0xe0001c,
  2657. - 0xe000,0x0,0x0,0x7070070e,0x38038,0x70070038,0x1c01c1c,0x7001c00,0x1c00778,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0xfc000,
  2658. - 0x1c00380e,0x381c3c7,0x1e01f001,0xe1e001e0,0xf0000e,0x1e01f,0xf8300000,0x1c00019c,0xc0000003,0xffc00000,0x10,0x20000,0x700,
  2659. - 0x1ff000c0,0x703fc19,0xcc003c00,0x67300ce6,0xc038,0xc181,0x83000000,0x0,0x0,0x7e00,0x180e07,0xe19cc00,0x1e000f80,0x1c,0x70c00f,
  2660. - 0xff007070,0x3e00038,0xe0f000,0x19800c,0x1fec0e1c,0x7fffc00,0x30f818,0x0,0xffff81f,0xf003fc00,0x380e,0x3f8c007,0x80000000,
  2661. - 0x7f800ff0,0x1c3803f,0xe007fc00,0xff800e00,0x70e00e1,0xc01c3803,0x870070e0,0x1c0e070f,0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001,
  2662. - 0xc0003800,0x700ff83,0x871c70e0,0x71c00e3,0x801c7003,0x8e00701d,0xc038e1c7,0x70e00e,0x1c01c380,0x3803e007,0x70e3c0,0x38000,
  2663. - 0x70000e00,0x1c00038,0x7001c,0x38e00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7003c07,0x8380e0e0,0xe1c01c3,0x80387007,
  2664. - 0xe00e1ff,0xfe381b83,0x80e0701c,0xe0381c0,0x701e1e07,0x707878,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2665. - 0x0,0x0,0x0,0x0,0x1c,0x3,0xe007fe0,0x7800e3c,0x38000001,0xc0000700,0x1803fff,0xe0000000,0x0,0x70039c3,0x800e0000,0xf8000f80,
  2666. - 0xc0e0000e,0xf83c003,0xc01e0f01,0xff700000,0x7c0,0x0,0x1f00780,0x618061c0,0xe0701e1c,0x38038,0x38000700,0x1c07e38,0x3801c00,
  2667. - 0x381e78,0x1c000e3,0xe38e18e1,0xc00e1fff,0x70038ff,0xe0007f80,0xe007007,0x1c701dd,0x9c00f800,0x1c000780,0xe0000e,0xe000,0x0,
  2668. - 0x7f,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x7fc00,0x1c00380e,
  2669. - 0x1c381c7,0x1c01f000,0xe1c001c0,0xfe0000e,0xfe1f,0xfff00000,0x7ff003fc,0xe0000003,0xffc00000,0x10,0x20000,0x3800,0x3fc0180,
  2670. - 0x703803f,0xce007800,0xff381fe7,0x30,0x0,0xc0,0x0,0x0,0x3fe0,0xc0e07,0xfe3fce00,0x1c000700,0x1c,0x70c00f,0xff006030,0x1c00000,
  2671. - 0xe07800,0x19800c,0xfcc1c38,0x7fffc00,0x30d818,0x0,0xffff81f,0xf001f800,0x380e,0xf8c007,0x80000000,0x7f8007e0,0xe1c3fe,0x7fc00f,
  2672. - 0xf8001e00,0xe0701c0,0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700ff83,0x870c70e0,
  2673. - 0x71c00e3,0x801c7003,0x8e00700f,0x8038c1c7,0x70e00e,0x1c01c380,0x3801c007,0xf0e3e0,0x3ff807f,0xf00ffe01,0xffc03ff8,0x7ff03ff,
  2674. - 0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe383383,0x80e0701c,
  2675. - 0xe0381c0,0x700e1c07,0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0xc000ff0,
  2676. - 0x3c1e1c1c,0x38000001,0xc0000700,0x1803fff,0xe0000007,0xf8000000,0x7003803,0x800e0001,0xf0000381,0xc0e00007,0xf01e003,0x801c0700,
  2677. - 0x7c700000,0x7c0,0x0,0x1f00700,0x618061c0,0xe0700e1c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381e38,0x1c000e1,0xc38e1ce1,
  2678. - 0xc00e1ffc,0x70038e0,0xf0000780,0xe007007,0x1c701dd,0xdc01fc00,0x1c000780,0xe0000e,0xe000,0x0,0x1ff,0xf070070e,0x38038,0x7fff0038,
  2679. - 0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3ff00,0x1c00380e,0x1c381cd,0x9c00e000,0xe1c003c0,
  2680. - 0xf80000e,0x3e18,0x3ff00000,0xffe007fd,0xf0000000,0x38000000,0x10,0x20000,0x1c000,0x3c0300,0x703807f,0xdf007801,0xff7c3fef,
  2681. - 0x80000000,0x0,0x3e0,0x7ffe7ff,0xff000000,0x1ff8,0x60e07,0xfe7fdf00,0x3c000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0xf03800,
  2682. - 0x19800c,0x1c38,0x1c07,0xf830cc18,0x0,0x1c0000,0x0,0x380e,0x18c007,0x80000000,0x0,0xe1cfe0,0x1fc003f,0x80003c00,0xe0701c0,
  2683. - 0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003,
  2684. - 0x8e007007,0x3981c7,0x70e00e,0x1c01c380,0x3801c007,0x1e0e0f8,0xfff81ff,0xf03ffe07,0xffc0fff8,0x1fff07ff,0xf8e0003f,0xff87fff0,
  2685. - 0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe386383,0x80e0701c,0xe0381c0,0x700e1c07,
  2686. - 0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x7f,0xffc00678,0x707f9c1e,0x38000001,
  2687. - 0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0003,0xe00001c3,0x80e00007,0xe00e007,0x80380380,0x700000,0x7f0,0x0,0x7f00700,
  2688. - 0x618061ff,0xe070071c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381c3c,0x1c000e1,0xc38e1ce1,0xc00e1c00,0x70038e0,0x700003c0,
  2689. - 0xe007007,0x1c701d8,0xdc03dc00,0x1c000f00,0xe00007,0xe000,0x0,0x3ff,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007fc,
  2690. - 0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3f00,0x1c00380e,0x1c381cd,0x9c01f000,0x73800780,0xfe0000e,0xfe10,0x7c00000,0x1c000ffb,
  2691. - 0xf8000000,0x38000000,0x10,0x20000,0x20000,0x1e0700,0x70380ff,0xbf80f003,0xfefe7fdf,0xc0000000,0x0,0x3f0,0x7ffe7ff,0xff000000,
  2692. - 0x1f8,0x30e07,0xfeffbf80,0x78000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0x783800,0x1ce11c,0xe1c,0x1c07,0xf838ce38,0x0,0x1c0000,
  2693. - 0x0,0x380e,0x18c000,0x0,0x0,0x1c38c00,0x1800030,0x7800,0xfff01ff,0xe03ffc07,0xff80fff0,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00,
  2694. - 0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003,0x8e00700f,0x803b81c7,0x70e00e,0x1c01c380,0x3801c007,0xffe0e03c,
  2695. - 0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0fff,0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,
  2696. - 0x80387007,0xe00e000,0x38c383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2697. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0063c,0x40619c0f,0x30000001,0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0007,0xc00001c3,
  2698. - 0xfffc0007,0xe00e007,0x380380,0xf00000,0xfe,0xffff80,0x3f800700,0x618063ff,0xf070071c,0x38038,0x38000700,0x1c00e38,0x3801c00,
  2699. - 0x381c1e,0x1c000e0,0x38e0ee1,0xc00e1c00,0x70038e0,0x380001c0,0xe007007,0x1ef01d8,0xdc038e00,0x1c001e00,0xe00007,0xe000,0x0,
  2700. - 0x7c0,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0079e,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x780,0x1c00380e,
  2701. - 0xe701cd,0x9c01f000,0x73800f00,0xe0000e,0xe000,0x0,0x1c0007f7,0xf0000000,0x70000000,0x10,0x20000,0x0,0xe0e00,0x703807f,0x7f01e001,
  2702. - 0xfdfc3fbf,0x80000000,0x0,0x7f0,0x0,0x0,0x3c,0x18e07,0x7f7f00,0xf0000700,0x1c,0x70c001,0xc0007070,0x1c00000,0x3e7000,0xcff18,
  2703. - 0x3ffc070e,0x1c07,0xf818c630,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x3870000,0xe000fc00,0x380f000,0x1fff83ff,0xf07ffe0f,
  2704. - 0xffc1fff8,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870770e0,0x71c00e3,0x801c7003,0x8e00701d,
  2705. - 0xc03f01c7,0x70e00e,0x1c01c380,0x3801c007,0xffc0e01c,0x3e0387c0,0x70f80e1f,0x1c3e038,0x7c071e1c,0xe00038,0x70000,0xe0001c00,
  2706. - 0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x398383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0,
  2707. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0061c,0xc0dc07,0xf0000001,0xc0000700,
  2708. - 0x70,0x0,0x0,0x1c003c07,0x800e000f,0x1c3,0xfffc0007,0xe00e007,0x380380,0xe00000,0x1f,0xc0ffff81,0xfc000700,0x618063ff,0xf070070e,
  2709. - 0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0e,0x1c000e0,0x38e0ee1,0xe01e1c00,0x78078e0,0x380001c0,0xe007007,0xee01f8,0xfc078f00,
  2710. - 0x1c001c00,0xe00003,0x8000e000,0x0,0x700,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0070e,0x1c0070,0xe1c701c1,
  2711. - 0xc01c1c01,0xc700700e,0x380,0x1c00380e,0xe700ed,0xb803f800,0x77800f00,0x70000e,0x1c000,0x0,0xe0003f7,0xe0000000,0x70000000,
  2712. - 0x10,0x20000,0x1c0e0,0xe1c00,0x703803f,0x7e01c000,0xfdf81fbf,0x0,0x0,0x3f0,0x0,0x0,0x1c,0x1ce07,0x3f7e00,0xf0000700,0x1c,
  2713. - 0x70c001,0xc00038e0,0x1c00038,0xf7000,0xe3e38,0x3ffc0387,0x1c00,0x1cc770,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x70e0001,
  2714. - 0xe001fe00,0x780e000,0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0ffe,0xe0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807,
  2715. - 0x70770f0,0xf1e01e3,0xc03c7807,0x8f00f038,0xe03e03c7,0x70e00e,0x1c01c380,0x3801c007,0xff00e00e,0x38038700,0x70e00e1c,0x1c38038,
  2716. - 0x70071c1c,0xe00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x3b0383,0x80e0701c,
  2717. - 0xe0381c0,0x70077807,0x701de0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x1c00061c,
  2718. - 0xc0de03,0xe0000001,0xc0000700,0x70,0x0,0x0,0x1c001c07,0xe001e,0x1c3,0xfffc0007,0x600e00e,0x380380,0xe00000,0x7,0xf0ffff87,
  2719. - 0xf0000000,0x60c0e380,0x7070070e,0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0f,0x1c000e0,0x38e06e0,0xe01c1c00,0x38070e0,
  2720. - 0x1c0001c0,0xe007007,0xee00f8,0xf80f0700,0x1c003c00,0xe00003,0x8000e000,0x0,0x700,0x70780f0f,0x3c078,0x70000038,0x1e03c1c,
  2721. - 0x7001c00,0x1c0070f,0x1c0070,0xe1c701c1,0xe03c1e03,0xc780f00e,0x380,0x1c00380e,0xe700f8,0xf807bc00,0x3f001e00,0x70000e,0x1c000,
  2722. - 0x0,0xe0001ff,0xc0000000,0x70000000,0x10,0x20000,0x33110,0xe0e00,0x383801f,0xfc03c000,0x7ff00ffe,0x0,0x0,0x3e0,0x0,0x0,0x1c,
  2723. - 0x38e07,0x1ffc01,0xe0000700,0x1c,0x78c001,0xc0007ff0,0x1c00038,0x7c000,0x70070,0x1c3,0x80001c00,0xe00e0,0x0,0x1c0000,0x0,
  2724. - 0x380e,0x18c000,0x0,0x0,0xe1c0001,0xe0010700,0x780e000,0x1c038380,0x70700e0e,0x1c1c038,0x78070e0e,0xe0001c,0x38000,0x70000e00,
  2725. - 0xe0001,0xc0003800,0x7003807,0x7037070,0xe0e01c1,0xc0383807,0x700e070,0x701c0387,0x70e00e,0x1c01c380,0x3801c007,0xe00e,0x38038700,
  2726. - 0x70e00e1c,0x1c38038,0x70071c1c,0xf00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003c07,0x8380e0f0,0x1e1e03c3,0xc078780f,
  2727. - 0xf01e007,0x803e0783,0x80e0701c,0xe0381c0,0x7003f007,0x80f00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2728. - 0x0,0x0,0x0,0x0,0x0,0x6,0x1800061c,0xc0de01,0xc0000000,0xc0000e00,0x70,0xf0000,0x3c00,0x38001c0f,0xe003c,0x3c0,0xe0000e,0x701e00e,
  2729. - 0x3c0780,0x1e003c0,0x780000,0xfc00001f,0x80000000,0x60e1e780,0x78700f07,0x4380f0,0x38000700,0xf00e38,0x3801c00,0xc0781c07,
  2730. - 0x81c000e0,0x38e07e0,0xe03c1c00,0x380f0e0,0x1e0003c0,0xe00780f,0xee00f0,0x780e0780,0x1c007800,0xe00001,0xc000e000,0x0,0x700,
  2731. - 0xf0780e07,0x8041c078,0x38020038,0xe03c1c,0x7001c00,0x1c00707,0x801c0070,0xe1c701c0,0xe0381e03,0x8380f00e,0x80380,0x1c003c1e,
  2732. - 0x7e00f8,0xf80f1e00,0x3f003c00,0x70000e,0x1c000,0x0,0xf0100f7,0x80078000,0x700078f0,0x10,0x7ff000,0x61208,0x1e0700,0x383800f,
  2733. - 0x78078000,0x3de007bc,0x0,0x0,0x0,0x0,0x0,0x401c,0x70e0f,0xf7803,0xc0000700,0x1c,0x38c001,0xc000efb8,0x1c00038,0x1e000,0x3c1e0,
  2734. - 0xc1,0x80000000,0x783c0,0x0,0x0,0x0,0x3c1e,0x18c000,0x0,0x0,0xc180003,0x60000300,0xd80e010,0x3c03c780,0x78f00f1e,0x1e3c03c,
  2735. - 0x70039c0e,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x703f070,0x1e0e03c1,0xc078380f,0x701e0e0,0x381c0787,
  2736. - 0x80f0f01e,0x1e03c3c0,0x7801c007,0xe00e,0x38078700,0xf0e01e1c,0x3c38078,0x700f1c1c,0x78041c,0x1038020,0x70040e00,0x800e0001,
  2737. - 0xc0003800,0x7001c07,0x380e070,0x1c0e0381,0xc070380e,0x701c007,0x801e0703,0xc1e0783c,0xf0781e0,0xf003f007,0x80e00fc0,0x0,
  2738. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xe,0x1801867c,0xc0cf83,0xe0000000,0xe0000e00,
  2739. - 0x70,0xf0000,0x3c00,0x38000f1e,0xe0070,0x180780,0xe0603e,0x783c01e,0x1e0f01,0x7c003c0,0x780000,0x3c00001e,0x700,0x307fe700,
  2740. - 0x38701e07,0xc1c383e0,0x38000700,0x7c1e38,0x3801c00,0xe0f01c03,0x81c000e0,0x38e03e0,0x78781c00,0x1e1e0e0,0xe180780,0xe003c1e,
  2741. - 0x7c00f0,0x781e03c0,0x1c007000,0xe00001,0xc000e000,0x0,0x783,0xf07c1e07,0xc0c1e0f8,0x3e0e0038,0xf07c1c,0x7001c00,0x1c00703,
  2742. - 0xc01e0070,0xe1c701c0,0xf0781f07,0x83c1f00e,0xe0f80,0x1e003c3e,0x7e00f8,0xf80e0e00,0x3f003800,0x70000e,0x1c000,0x0,0x7830077,
  2743. - 0xf0000,0x700078f0,0x10,0x20000,0x41208,0xc03c0380,0x3c38007,0x70070000,0x1dc003b8,0x0,0x0,0x0,0x0,0x0,0x707c,0x6070f,0x86077003,
  2744. - 0x80000700,0x1c,0x3ec401,0xc001c01c,0x1c00038,0xf000,0x1ffc0,0x40,0x80000000,0x3ff80,0x0,0x0,0x0,0x3e3e,0x18c000,0x0,0x0,
  2745. - 0x8100006,0x60000300,0x1980f070,0x3801c700,0x38e0071c,0xe3801c,0x70039c0e,0x7c1c1c,0x38000,0x70000e00,0xe0001,0xc0003800,
  2746. - 0x700383e,0x701f03c,0x3c078780,0xf0f01e1e,0x3c3c1c0,0x1c3f0f03,0xc1e0783c,0xf0781e0,0xf001c007,0xe81e,0x3c1f8783,0xf0f07e1e,
  2747. - 0xfc3c1f8,0x783f1e3e,0x187c0c1f,0x703e0e0,0x7c1c0f83,0x800e0001,0xc0003800,0x7001e0f,0x380e078,0x3c0f0781,0xe0f03c1e,0x783c007,
  2748. - 0x801e0f03,0xc3e0787c,0xf0f81e1,0xf003f007,0xc1e00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2749. - 0x0,0x0,0x1c,0xe,0x3801fff8,0x6187ff,0xe0000000,0xe0000e00,0x70,0xf0000,0x3c00,0x38000ffe,0x1fff0ff,0xfe1fff80,0xe07ffc,0x3ffc01c,
  2750. - 0x1fff01,0xff8003c0,0x780000,0x4000010,0x700,0x301e6700,0x387ffe03,0xffc3ffc0,0x3fff0700,0x3ffe38,0x383ffe0,0xfff01c03,0xc1fff8e0,
  2751. - 0x38e03e0,0x7ff81c00,0x1ffe0e0,0xf1fff80,0xe003ffe,0x7c00f0,0x781c01c0,0x1c00ffff,0xe00001,0xc000e000,0x0,0x3ff,0x707ffc03,
  2752. - 0xffc0fff8,0x1ffe0038,0x7ffc1c,0x707fff0,0x1c00701,0xc00ff070,0xe1c701c0,0x7ff01fff,0x1fff00e,0xfff00,0xff81fee,0x7e00f0,
  2753. - 0x781e0f00,0x1e007ffc,0x70000e,0x1c000,0x0,0x3ff003e,0xf0000,0xe00070e0,0x60830010,0x20000,0x41208,0xfffc01c0,0x1fffe03,0xe00ffff0,
  2754. - 0xf8001f0,0x0,0x0,0x0,0x0,0x0,0x7ff8,0xc07fd,0xfe03e007,0xffc00700,0x1c,0x1ffc1f,0xffc08008,0x1c00038,0x7000,0x7f00,0x0,0x0,
  2755. - 0xfe00,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0x6,0x60000700,0x19807ff0,0x3801c700,0x38e0071c,0xe3801c,0x70039c0f,0xf03ffc1f,
  2756. - 0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc,0x701f03f,0xfc07ff80,0xfff01ffe,0x3ffc080,0x83fff03,0xffe07ffc,0xfff81ff,
  2757. - 0xf001c007,0xeffc,0x1ffb83ff,0x707fee0f,0xfdc1ffb8,0x3ff70ff7,0xf83ffc0f,0xff01ffe0,0x3ffc07ff,0x83fff87f,0xff0fffe1,0xfffc0ffe,
  2758. - 0x380e03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x803ffe01,0xfee03fdc,0x7fb80ff,0x7001e007,0xffc00780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2759. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x3801fff0,0x7f83fe,0x70000000,0xe0000e00,0x0,0xf0000,0x3c00,0x700007fc,
  2760. - 0x1fff0ff,0xfe1ffe00,0xe07ff8,0x1ff801c,0xffe01,0xff0003c0,0x780000,0x0,0x700,0x38000f00,0x3c7ffc01,0xff83ff80,0x3fff0700,
  2761. - 0x1ffc38,0x383ffe0,0x7fe01c01,0xe1fff8e0,0x38e03e0,0x3ff01c00,0xffc0e0,0x71fff00,0xe001ffc,0x7c00f0,0x783c01e0,0x1c00ffff,
  2762. - 0xe00000,0xe000e000,0x0,0x1ff,0x7077f801,0xff807fb8,0xffc0038,0x3fdc1c,0x707fff0,0x1c00701,0xe007f070,0xe1c701c0,0x3fe01dfe,
  2763. - 0xff700e,0x7fe00,0xff80fee,0x3c0070,0x703c0780,0x1e007ffc,0x70000e,0x1c000,0x0,0x1fe001c,0xe0000,0xe000e1c0,0x71c78010,0x20000,
  2764. - 0x21318,0xfff800c0,0xfffe01,0xc00ffff0,0x70000e0,0x0,0x0,0x0,0x0,0x0,0x3ff0,0x1803fd,0xfe01c007,0xffc00700,0x1c,0xffc1f,0xffc00000,
  2765. - 0x1c00038,0x7000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0xc,0x60000e00,0x31803fe0,0x7801ef00,0x3de007bc,
  2766. - 0xf7801e,0xf003fc0f,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x701f01f,0xf803ff00,0x7fe00ffc,0x1ff8000,
  2767. - 0x67fe01,0xffc03ff8,0x7ff00ff,0xe001c007,0xeff8,0xffb81ff,0x703fee07,0xfdc0ffb8,0x1ff70ff7,0xf81ff807,0xfe00ffc0,0x1ff803ff,
  2768. - 0x3fff87f,0xff0fffe1,0xfffc07fc,0x380e01f,0xf003fe00,0x7fc00ff8,0x1ff0000,0x37fc00,0xfee01fdc,0x3fb807f,0x7001e007,0x7f800780,
  2769. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x30007fc0,0x1e00f8,0x78000000,0x70001c00,
  2770. - 0x0,0xe0000,0x3c00,0x700001f0,0x1fff0ff,0xfe07f800,0xe01fe0,0x7e0038,0x3f800,0xfc0003c0,0x700000,0x0,0x700,0x18000e00,0x1c7ff000,
  2771. - 0x7e03fe00,0x3fff0700,0x7f038,0x383ffe0,0x1f801c00,0xf1fff8e0,0x38e01e0,0xfc01c00,0x3f80e0,0x787fc00,0xe0007f0,0x7c00f0,0x387800f0,
  2772. - 0x1c00ffff,0xe00000,0xe000e000,0x0,0xfc,0x7071f000,0x3f003e38,0x3f00038,0x1f1c1c,0x707fff0,0x1c00700,0xf003f070,0xe1c701c0,
  2773. - 0x1f801c7c,0x7c700e,0x1f800,0x3f8078e,0x3c0070,0x707803c0,0x1c007ffc,0x70000e,0x1c000,0x0,0x7c0008,0x1e0000,0xe000e1c0,0x71c30010,
  2774. - 0x20000,0x1e1f0,0x3fe00020,0x3ffe00,0x800ffff0,0x2000040,0x0,0x0,0x0,0x0,0x0,0xfc0,0x3001f0,0x78008007,0xffc00700,0x1c,0x3f81f,
  2775. - 0xffc00000,0x1c00038,0x407000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x39c7,0x18c000,0x0,0x0,0x18,0x60001c00,0x61801f80,0x7000ee00,
  2776. - 0x1dc003b8,0x77000e,0xe001f80f,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0,0x700f007,0xe000fc00,0x1f8003f0,
  2777. - 0x7e0000,0xe1f800,0x7f000fe0,0x1fc003f,0x8001c007,0xe7f0,0x7e380fc,0x701f8e03,0xf1c07e38,0xfc703c1,0xe003f001,0xf8003f00,
  2778. - 0x7e000fc,0x3fff87f,0xff0fffe1,0xfffc03f8,0x380e00f,0xc001f800,0x3f0007e0,0xfc0000,0x61f800,0x78e00f1c,0x1e3803c,0x7001c007,
  2779. - 0x1f000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x70001c00,0x0,
  2780. - 0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,
  2781. - 0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000,
  2782. - 0x70000e,0x1c000,0x0,0x0,0x1c0000,0xe000c180,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
  2783. - 0x0,0x38,0x70e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x2000,0x0,0x1f,0xf8003800,0x7fe00000,0x0,0x0,0x0,0x0,0x4000,
  2784. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,
  2785. - 0x0,0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x30001800,
  2786. - 0x0,0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e000,
  2787. - 0x0,0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000,
  2788. - 0x70000e,0x1c000,0x0,0x0,0x1c0001,0xe001c380,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
  2789. - 0x0,0x38,0x7fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x3000,0x0,0x1f,0xf8007000,0x7fe00000,0x0,0x0,0x0,0x0,0x6000,
  2790. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2791. - 0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x38003800,
  2792. - 0x0,0x380000,0x1,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x3c18000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf000,
  2793. - 0x0,0x0,0x0,0x0,0x0,0xfe0000,0x380fe000,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x38000000,
  2794. - 0x78000e,0x3c000,0x0,0x0,0x180001,0xc0018300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,
  2795. - 0x38,0x1f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x1800,0x0,0x0,0x6000e000,0x1800000,0x0,0x0,0x0,0x0,0x3000,0x0,
  2796. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2797. - 0x38007,0xe00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x18003000,
  2798. - 0x0,0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,
  2799. - 0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x0,0x0,0x0,0x0,0x607800,0x0,0x3c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x78000000,
  2800. - 0x3f800e,0x3f8000,0x0,0x0,0x300043,0xc0018200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,
  2801. - 0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x11800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x23000,0x0,0x0,
  2802. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78007,
  2803. - 0x1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0,
  2804. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000,
  2805. - 0xfe000,0x0,0x0,0x0,0x0,0x0,0x7ff000,0x0,0x7f800000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf8000000,0x3f800e,0x3f8000,0x0,
  2806. - 0x0,0x10007f,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x38,0x0,0x0,0x0,0x0,
  2807. - 0x0,0x0,0x0,0x0,0x3800,0x0,0x1f800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2808. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f8007,0xfe00,0x0,0x0,0x0,0x0,
  2809. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2810. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x7fe000,0x0,
  2811. - 0x7f000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf0000000,0xf800e,0x3e0000,0x0,0x0,0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2812. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1f000,0x0,0x0,0x0,0x0,0x0,
  2813. - 0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,
  2814. - 0x0,0x0,0x0,0x0,0x0,0x0,0x3f0007,0xfc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2815. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2816. - 0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x1fc000,0x0,0x7e000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xc0000000,0xe,0x0,
  2817. - 0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2818. - 0x0,0x0,0x3800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2819. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0007,0xf000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2820. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2821. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2822. - 0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2823. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2824. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  2825. -
  2826. - // Definition of a 29x57 font
  2827. - const unsigned int font29x57[29*57*256/32] = {
  2828. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2829. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2830. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2831. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2832. - 0x0,0x781e00,0x0,0x0,0x7,0x81e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2833. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0000,0xf8000,0x7e00000,0x0,0x7,
  2834. - 0xc0000000,0x0,0x7c00,0xf80,0x7e000,0x0,0x7c00000,0xf80000,0x7e000000,0x0,0x0,0x1f00,0x3e0,0x1f800,0x0,0x0,0x0,0x3,0xe0000000,
  2835. - 0x7c00003f,0x0,0xf8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2836. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2837. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2838. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2839. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2840. - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c3c00,0x0,0x0,0x3,0xc3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,
  2841. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0000,
  2842. - 0x1f0000,0x7e00000,0xf838001f,0xf80001f,0xf0000000,0x0,0x3e00,0x1f00,0x7e000,0x3e1f000,0x3e00000,0x1f00000,0x7e00003e,0x1f000000,
  2843. - 0x3e0,0xe0000f80,0x7c0,0x1f800,0x3e0e00,0x7c3e000,0x0,0x1,0xf0000000,0xf800003f,0x1f0f,0x800001f0,0x0,0x0,0x0,0x0,0x0,0x0,
  2844. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2845. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2846. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2847. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2848. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e7800,0x0,0x0,
  2849. - 0x1,0xe7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2850. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x1e0000,0xff00001,0xfe38001f,0xf80003f,
  2851. - 0xf8000000,0x0,0x1e00,0x1e00,0xff000,0x3e1f000,0x1e00000,0x1e00000,0xff00003e,0x1f000000,0x7f8,0xe0000780,0x780,0x3fc00,0x7f8e00,
  2852. - 0x7c3e000,0x0,0x0,0xf0000000,0xf000007f,0x80001f0f,0x800001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2853. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2854. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2855. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2856. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2857. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xef000,0x0,0x0,0x0,0xef000000,0x0,0x0,0x0,0x0,0x0,0x0,
  2858. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2859. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000,0x3c0000,0x1e780003,0xfff8001f,0xf80003c,0x78000000,0x0,0xf00,0x3c00,0x1e7800,
  2860. - 0x3e1f000,0xf00000,0x3c00001,0xe780003e,0x1f000000,0xfff,0xe00003c0,0xf00,0x79e00,0xfffe00,0x7c3e000,0x0,0x0,0x78000001,0xe00000f3,
  2861. - 0xc0001f0f,0x800003c0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2862. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2863. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2864. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2865. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2866. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2867. - 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2868. - 0x0,0x78000,0x780000,0x3c3c0003,0x8ff0001f,0xf800078,0x3c000000,0x0,0x780,0x7800,0x3c3c00,0x3e1f000,0x780000,0x7800003,0xc3c0003e,
  2869. - 0x1f000000,0xe3f,0xc00001e0,0x1e00,0xf0f00,0xe3fc00,0x7c3e000,0x0,0x0,0x3c000003,0xc00001e1,0xe0001f0f,0x80000780,0x0,0x0,
  2870. - 0x0,0x0,0x0,0x0,0x1f,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2871. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2872. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2873. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2874. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2875. - 0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,
  2876. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc00,0x7e000,0xfe000,0x0,0x3c000,0xf00000,0x781e0003,
  2877. - 0x83e0001f,0xf800070,0x1c000000,0x0,0x3c0,0xf000,0x781e00,0x3e1f000,0x3c0000,0xf000007,0x81e0003e,0x1f000000,0xe0f,0x800000f0,
  2878. - 0x3c00,0x1e0780,0xe0f800,0x7c3e000,0x0,0x0,0x1e000007,0x800003c0,0xf0001f0f,0x80000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf8000000,
  2879. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2880. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2881. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2882. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2883. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2884. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2885. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ff800,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2886. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2887. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2888. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2889. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2890. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2891. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2892. - 0x0,0x0,0x78,0xf000000,0x0,0x0,0x780f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0,
  2893. - 0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ffc00,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2894. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x3e000,0x3e00000,0x0,0x78,0x3c000000,0x0,0x1f000,0x3e0,
  2895. - 0x3e000,0x0,0x1f000000,0x3e0000,0x3e000000,0x0,0x0,0x7c00,0xf8,0xf800,0x0,0x0,0x0,0xf,0x80000000,0x1f00001f,0x0,0x3e,0x0,
  2896. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2897. - 0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2898. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80000,
  2899. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2900. - 0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x781c0000,0x38,0xe000000,0x0,0x0,0x380e0,0x0,
  2901. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x39c00,0x1ce000,0x303e00,
  2902. - 0x0,0x0,0x0,0x0,0x0,0x78,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,
  2903. - 0x0,0x0,0xf80000,0x7c000,0x3e00000,0xf0380000,0x70,0x1c000000,0x0,0xf800,0x7c0,0x3e000,0x0,0xf800000,0x7c0000,0x3e000000,
  2904. - 0x0,0x3c0,0xe0003e00,0x1f0,0xf800,0x3c0e00,0x0,0x0,0x7,0xc0000000,0x3e00001f,0x0,0x7c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2905. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0xff,0x0,
  2906. - 0xf8,0xf8000,0x1c000,0x0,0x0,0x0,0x0,0x1f,0xc0000000,0x1ff8,0xff00,0x0,0x0,0x3fe000,0x0,0x1fc00001,0xfe000000,0x0,0x0,0x0,
  2907. - 0x0,0x7f800,0x0,0x0,0x0,0xff00000,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf8000000,0xfe,0x0,0x7f80,0x0,0x0,0x0,0x0,0x0,
  2908. - 0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x780000,0x1,0xe0000000,0x0,0x780000,0x3,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,
  2909. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x3fc00,0x0,0x0,0x1fc000,0x0,0x0,0x0,0x1fc0,
  2910. - 0x0,0xff000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe1c0000,0x1c,0x1c000000,0x0,0x0,0x1c1c0,0x0,0x0,0x0,0x0,0x1fe0000,
  2911. - 0x0,0x0,0x1ff,0x1f0f8,0x0,0xff000,0x0,0x0,0x0,0x3f,0xff00000f,0x80000000,0xfe0,0x3f80,0xf00,0x0,0x0,0x0,0x1,0xf8000003,0xe0000000,
  2912. - 0x1c00,0xe000,0xe00,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000,
  2913. - 0x7f0000,0x0,0x1fc07000,0x0,0x0,0x0,0x0,0x0,0x3f800,0x780000,0x78000,0x7f00001,0xfc38001f,0xf800070,0x1c000000,0x0,0x7800,
  2914. - 0x780,0x7f000,0x3e1f000,0x7800000,0x780000,0x7f00003e,0x1f0003f0,0x7f0,0xe0001e00,0x1e0,0x1fc00,0x7f0e00,0x7c3e000,0x0,0x3,
  2915. - 0xc0000000,0x3c00003f,0x80001f0f,0x80000078,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2916. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x1e078000,0x30000000,0x3ff,0xc00001e0,0xf0,
  2917. - 0x78000,0x1c000,0x0,0x0,0x0,0x0,0x1e0007f,0xf000007e,0x1ffff,0x7ffe0,0x1f80,0x3ffff80,0xfff803,0xfffff800,0xfff80007,0xff800000,
  2918. - 0x0,0x0,0x0,0x0,0x1ffe00,0x0,0xfe0003,0xfff80000,0x3ffe01ff,0xe00003ff,0xffe01fff,0xff0003ff,0xe01e0007,0x803ffff0,0xfff80,
  2919. - 0x3c000fc0,0x7800001f,0x8003f07e,0x1e000f,0xfe0007ff,0xf00003ff,0x8007ffe0,0x1fff8,0x7fffffe,0xf0003c1,0xe000079e,0xf1f,0x1f3e0,
  2920. - 0x1f01ff,0xfff8003f,0xf003c000,0x7fe0,0x3f00,0x0,0x3c0000,0x1,0xe0000000,0x0,0x780000,0xf,0xfe000000,0x78000,0x3c00,0xf000,
  2921. - 0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xfc0000f0,0x3fe00,0x0,0x0,0xfff00,0x0,0x0,0x3fe000,
  2922. - 0x0,0x0,0x0,0x1dc0,0x0,0x3fff00,0x0,0x3ffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff1c07ff,0x3c0f001e,0x3c000000,
  2923. - 0x0,0x0,0x1e3c0,0xf80007c,0x0,0x780000,0x0,0xfff8000,0x3e00,0x1f00000,0x7ff,0xc001f0f8,0x0,0x3ffc00,0x0,0x0,0x0,0x3f,0xff00003f,
  2924. - 0xe0000000,0x3ff8,0xffe0,0x1e00,0x0,0xfffc00,0x0,0x7,0xf800000f,0xf8000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000,
  2925. - 0x3f800001,0xfc00003f,0xf80000ff,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc,
  2926. - 0xfc00,0x3c001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x0,0x7ff8f0f0,0x3c0780,0x1e03c00,0xf01e000,0x783e0001,0xf01e0000,0xffe00,
  2927. - 0x3c0000,0xf0000,0x7700001,0xfe38001f,0xf800070,0x1c000000,0x0,0x3c00,0xf00,0x77000,0x3e1f000,0x3c00000,0xf00000,0x7700003e,
  2928. - 0x1f0000f8,0xc0007f8,0xe0000f00,0x3c0,0x1dc00,0x7f8e00,0x7c3e000,0x0,0x1,0xe0000000,0x7800003b,0x80001f0f,0x800000f0,0x1e0000,
  2929. - 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2930. - 0x0,0x0,0x780000,0x3c1e0000,0x1e070000,0x300001f0,0x7ff,0xc00001e0,0x1e0,0x7c000,0x1c000,0x0,0x0,0x0,0x0,0x3c000ff,0xf80007fe,
  2931. - 0x3ffff,0x801ffff8,0x1f80,0x3ffff80,0x3fff803,0xfffff801,0xfffc000f,0xffc00000,0x0,0x0,0x0,0x0,0x7fff80,0x0,0xfe0003,0xffff0000,
  2932. - 0xffff01ff,0xfc0003ff,0xffe01fff,0xff000fff,0xf01e0007,0x803ffff0,0xfff80,0x3c001f80,0x7800001f,0xc007f07e,0x1e001f,0xff0007ff,
  2933. - 0xfc0007ff,0xc007fffc,0x3fffc,0x7fffffe,0xf0003c1,0xf0000f9e,0xf0f,0x8003e1e0,0x1e01ff,0xfff8003f,0xf001e000,0x7fe0,0x3f00,
  2934. - 0x0,0x1e0000,0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,
  2935. - 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x1fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x3de0,0x0,0x7fff80,0x0,0xfffff80,
  2936. - 0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe7bc07ff,0x3e1f000f,0x78000000,0x0,0x0,0xf780,0x7800078,0x0,0x780000,0x180000,
  2937. - 0x1fff8000,0x1e00,0x1e0003c,0xfff,0xc001f0f8,0x0,0x7ffe00,0x0,0x0,0x0,0x3f,0xff00007f,0xf0000000,0x3ffc,0xfff0,0x3c00,0x0,
  2938. - 0x7fffc00,0x0,0x7,0xf800003f,0xfe000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xe00001ff,
  2939. - 0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000fc00,0x3c003ffe,0x1fff0,
  2940. - 0xfff80,0x7ffc00,0x3ffe000,0x0,0xfffce0f0,0x3c0780,0x1e03c00,0xf01e000,0x781e0001,0xe01e0000,0x3fff00,0x1e0000,0x1e0000,0xf780003,
  2941. - 0xcf78001f,0xf800078,0x3c000000,0x0,0x1e00,0x1e00,0xf7800,0x3e1f000,0x1e00000,0x1e00000,0xf780003e,0x1f0000fc,0x7c000f3d,
  2942. - 0xe0000780,0x780,0x3de00,0xf3de00,0x7c3e000,0x0,0x0,0xf0000000,0xf000007b,0xc0001f0f,0x800001e0,0x1e0000,0x3e1f00,0x0,0x0,
  2943. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
  2944. - 0x3c1e0000,0x1e0f0000,0x300007fc,0xfff,0xc00001e0,0x1e0,0x3c000,0x1c000,0x0,0x0,0x0,0x0,0x3c001ff,0xfc001ffe,0x3ffff,0xc01ffffc,
  2945. - 0x3f80,0x3ffff80,0x7fff803,0xfffff803,0xfffe001f,0xffe00000,0x0,0x0,0x0,0x0,0xffff80,0x7f800,0xfe0003,0xffff8001,0xffff01ff,
  2946. - 0xff0003ff,0xffe01fff,0xff001fff,0xf01e0007,0x803ffff0,0xfff80,0x3c003f00,0x7800001f,0xc007f07f,0x1e003f,0xff8007ff,0xff000fff,
  2947. - 0xe007ffff,0x7fffc,0x7fffffe,0xf0003c0,0xf0000f1e,0xf07,0x8003c1f0,0x3e01ff,0xfff8003f,0xf001e000,0x7fe0,0x7f80,0x0,0xe0000,
  2948. - 0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,
  2949. - 0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x3fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x78f0,0x0,0xffff80,0x0,0x3fffff80,0x1f,
  2950. - 0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc7f80070,0x3e1f0007,0x70000000,0x0,0x0,0x7700,0x7c000f8,0x0,0x780000,0x180000,
  2951. - 0x3fff8000,0x1f00,0x3e0003c,0x1f03,0xc001f0f8,0x0,0x703f00,0x0,0x0,0x0,0x3f,0xff0000f0,0xf8000000,0x303e,0xc0f8,0x7800,0x0,
  2952. - 0xffffc00,0x0,0x7,0x3800003e,0x3e000000,0x1c00,0xe000,0x3c00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00000f,0xe00001ff,
  2953. - 0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000fe00,0x3c007fff,0x3fff8,
  2954. - 0x1fffc0,0xfffe00,0x7fff000,0x1,0xffffc0f0,0x3c0780,0x1e03c00,0xf01e000,0x781f0003,0xe01e0000,0x3fff80,0xe0000,0x3c0000,0x1e3c0003,
  2955. - 0x8ff0001f,0xf80003c,0x78000000,0x0,0xe00,0x3c00,0x1e3c00,0x3e1f000,0xe00000,0x3c00001,0xe3c0003e,0x1f00007f,0xf8000e3f,0xc0000380,
  2956. - 0xf00,0x78f00,0xe3fc00,0x7c3e000,0x0,0x0,0x70000001,0xe00000f1,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,
  2957. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0000,
  2958. - 0x30000ffe,0xf80,0xc00001e0,0x3c0,0x1e000,0x101c040,0x0,0x0,0x0,0x0,0x78003f0,0x7e001ffe,0x3f807,0xe01f00fe,0x3f80,0x3ffff80,
  2959. - 0x7e01803,0xfffff007,0xe03f003f,0x3f00000,0x0,0x0,0x0,0x0,0xfc0fc0,0x3ffe00,0xfe0003,0xffffc003,0xf81f01ff,0xff8003ff,0xffe01fff,
  2960. - 0xff003f01,0xf01e0007,0x803ffff0,0xfff80,0x3c007e00,0x7800001f,0xc007f07f,0x1e007e,0xfc007ff,0xff801f83,0xf007ffff,0x800fc07c,
  2961. - 0x7fffffe,0xf0003c0,0xf0000f0f,0x1e07,0xc007c0f8,0x7c01ff,0xfff8003c,0xf000,0x1e0,0xffc0,0x0,0xf0000,0x1,0xe0000000,0x0,0x780000,
  2962. - 0x3e,0x0,0x78000,0x3c00,0xf000,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0x800000f0,0x1f80,
  2963. - 0x0,0x0,0x7e0780,0x0,0x0,0x1f82000,0x0,0x0,0x0,0x7070,0x0,0x1f80f80,0x0,0x7fffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,
  2964. - 0x0,0x1,0xc3f80070,0x3f3f0007,0xf0000000,0x0,0x0,0x7f00,0x3e001f0,0x0,0x780000,0x180000,0x7f018000,0xf80,0x7c0003c,0x3e00,
  2965. - 0x4001f0f8,0xfe00,0x400f00,0x0,0x0,0x0,0x7f000000,0xe0,0x38000000,0x1e,0x38,0x7800,0x0,0x1ffe1c00,0x0,0x0,0x38000078,0xf000000,
  2966. - 0x1c00,0xe000,0x7f800,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xf00001ff,0xffc03f81,0xf007ffff,0xc03ffffe,
  2967. - 0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf800fe00,0x3c00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800,
  2968. - 0x3,0xf07fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x780f8007,0xc01e0000,0x7e0fc0,0xf0000,0x3c0000,0x1c1c0003,0x87f0001f,0xf80003f,
  2969. - 0xf8000000,0x0,0xf00,0x3c00,0x1c1c00,0x3e1f000,0xf00000,0x3c00001,0xc1c0003e,0x1f00003f,0xc0000e1f,0xc00003c0,0xf00,0x70700,
  2970. - 0xe1fc00,0x7c3e000,0x0,0x0,0x78000001,0xe00000e0,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2971. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0001,0xff801e0f,
  2972. - 0x1f00,0x1e0,0x3c0,0x1e000,0x3c1c1e0,0x0,0x0,0x0,0x0,0x78007c0,0x1f001f9e,0x3c001,0xf010003e,0x7780,0x3c00000,0xf800000,0xf007,
  2973. - 0xc01f007c,0x1f80000,0x0,0x0,0x0,0x0,0xe003e0,0x7fff00,0x1ef0003,0xc007e007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x301e0007,
  2974. - 0x80007800,0x780,0x3c00fc00,0x7800001f,0xe00ff07f,0x1e00f8,0x3e00780,0x1fc03e00,0xf807801f,0xc01f001c,0xf000,0xf0003c0,0xf0000f0f,
  2975. - 0x1e03,0xc00f8078,0x780000,0xf0003c,0xf000,0x1e0,0x1f3e0,0x0,0x78000,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,
  2976. - 0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0xf0,0xf80,0x0,0x0,0xf80180,0x0,0x0,0x1e00000,
  2977. - 0x0,0x0,0x0,0xe038,0x0,0x3e00380,0x0,0xfe0f0000,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc0f00070,0x3b370003,0xe0000000,
  2978. - 0x0,0x0,0x3e00,0x1e001e0,0x0,0x780000,0x180000,0x7c000000,0x780,0x780003c,0x3c00,0x0,0x7ffc0,0x780,0x0,0x0,0x3,0xffe00000,
  2979. - 0x1c0,0x3c000000,0xe,0x38,0xf000,0x0,0x3ffe1c00,0x0,0x0,0x38000078,0xf000000,0x1c00,0xe000,0x7f000,0xf000,0x3de000,0x1ef0000,
  2980. - 0xf780000,0x7bc00003,0xde00001e,0xf00003e7,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
  2981. - 0xe0001e03,0xfc00fe00,0x3c01f007,0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x7,0xc01f80f0,0x3c0780,0x1e03c00,0xf01e000,0x78078007,
  2982. - 0x801e0000,0x7803c0,0x78000,0x780000,0x380e0003,0x81e00000,0x1f,0xf0000000,0x0,0x780,0x7800,0x380e00,0x0,0x780000,0x7800003,
  2983. - 0x80e00000,0x1ff,0x80000e07,0x800001e0,0x1e00,0xe0380,0xe07800,0x0,0x0,0x0,0x3c000003,0xc00001c0,0x70000000,0x780,0x1e0000,
  2984. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2985. - 0x780000,0x3c1e0000,0x3c0e0007,0xfff01c07,0x1e00,0x1e0,0x780,0xf000,0x3e1c3e0,0x0,0x0,0x0,0x0,0xf0007c0,0x1f00181e,0x20000,
  2986. - 0xf000001f,0xf780,0x3c00000,0x1f000000,0x1f00f,0x800f8078,0xf80000,0x0,0x0,0x0,0x0,0x8003e0,0x1fc0f80,0x1ef0003,0xc001e007,
  2987. - 0x800101e0,0x7e003c0,0x1e00,0x7800,0x101e0007,0x80007800,0x780,0x3c00f800,0x7800001e,0xe00ef07f,0x801e00f0,0x1e00780,0x7c03c00,
  2988. - 0x78078007,0xc01e0004,0xf000,0xf0003c0,0x78001e0f,0x1e03,0xe00f807c,0xf80000,0x1f0003c,0x7800,0x1e0,0x3e1f0,0x0,0x3c000,0x1,
  2989. - 0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,
  2990. - 0x1e,0xf0,0x780,0x0,0x0,0x1f00080,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x1e03c,0x0,0x3c00080,0x0,0xf80f0000,0x0,0x1f0000,0x0,0x0,
  2991. - 0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x3bf70003,0xe0000000,0x0,0x0,0x3e00,0x1f003e0,0x0,0x780000,0x180000,0x78000000,0x7c0,0xf80003c,
  2992. - 0x3c00,0x0,0x1f01f0,0x780,0x0,0x0,0xf,0x80f80000,0x1c0,0x1c000000,0xe,0x38,0x1e000,0x0,0x7ffe1c00,0x0,0x0,0x380000f0,0x7800000,
  2993. - 0x1c00,0xe000,0x7fc00,0xf000,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x80007800,0x10078000,0x3c0000,
  2994. - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00ff00,0x3c01e003,0xc00f001e,0x7800f0,0x3c00780,0x1e003c00,
  2995. - 0x7,0x800f00f0,0x3c0780,0x1e03c00,0xf01e000,0x7807c00f,0x801e0000,0xf803c0,0x3c000,0xf00000,0x780f0000,0x0,0x7,0xc0000000,
  2996. - 0x0,0x3c0,0xf000,0x780f00,0x0,0x3c0000,0xf000007,0x80f00000,0x7ff,0xc0000000,0xf0,0x3c00,0x1e03c0,0x0,0x0,0x0,0x0,0x1e000007,
  2997. - 0x800003c0,0x78000000,0xf00,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  2998. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c1e001f,0xfff03803,0x80001e00,0x1e0,0x780,0xf000,0xf9cf80,
  2999. - 0x0,0x0,0x0,0x0,0xf000780,0xf00001e,0x0,0xf800000f,0xe780,0x3c00000,0x1e000000,0x1e00f,0x78078,0x7c0000,0x0,0x0,0x0,0x0,0x1e0,
  3000. - 0x3f003c0,0x1ef0003,0xc000f00f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780,0x3c01f000,0x7800001e,0xe00ef07f,
  3001. - 0x801e01f0,0x1e00780,0x3c07c00,0x78078003,0xc03e0000,0xf000,0xf0003c0,0x78001e0f,0x1e01,0xf01f003c,0xf00000,0x3e0003c,0x7800,
  3002. - 0x1e0,0x7c0f8,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,
  3003. - 0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x8,0x40,0x0,0x7e0000,0x7c00000,0x1,0xf00f0000,
  3004. - 0x0,0x3e0000,0x0,0x3f,0xfc0,0xfc3f0,0xfc3f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0,0xf003c0,0x0,0x0,0x180000,0xf8000000,
  3005. - 0x3c0,0xf00003c,0x3c00,0x0,0x3c0078,0x7ff80,0x0,0x0,0x1e,0x3c0000,0x1c0,0x1c000000,0xe,0xf0,0x0,0x0,0x7ffe1c00,0x0,0x0,0x380000f0,
  3006. - 0x7800000,0x1c00,0xe000,0x3c00,0x0,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x8000f800,0x78000,0x3c0000,
  3007. - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00ff00,0x3c03e003,0xc01f001e,0xf800f0,0x7c00780,0x3e003c00,
  3008. - 0xf,0x800f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803c00f,0x1fffc0,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3009. - 0x0,0x0,0x307,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3010. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x781e003f,0xfff03803,
  3011. - 0x80001e00,0x1e0,0xf80,0xf000,0x3dde00,0x0,0x0,0x0,0x0,0xf000f00,0x780001e,0x0,0x7800000f,0x1e780,0x3c00000,0x3e000000,0x3e00f,
  3012. - 0x780f0,0x7c0000,0x0,0x0,0x0,0x0,0x1e0,0x7c001e0,0x3ef8003,0xc000f00f,0x1e0,0xf003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780,
  3013. - 0x3c03e000,0x7800001e,0xf01ef07b,0xc01e01e0,0xf00780,0x3e07800,0x3c078003,0xe03c0000,0xf000,0xf0003c0,0x78001e0f,0x1e00,0xf01e003e,
  3014. - 0x1f00000,0x3c0003c,0x7800,0x1e0,0x78078,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,
  3015. - 0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0,
  3016. - 0xe70000,0x7800000,0x1,0xe00f0000,0x0,0x3c0000,0x0,0x3f,0xfc0,0xfc1f0,0x1f83f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0,
  3017. - 0xf807c0,0x0,0x0,0x180000,0xf0000000,0x3e0,0x1f00003c,0x3e00,0x0,0x70001c,0x3fff80,0x0,0x0,0x38,0xe0000,0x1c0,0x1c000078,
  3018. - 0x1c,0x1fe0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x7df000,0x3ef8000,0x1f7c0000,0xfbe00007,
  3019. - 0xdf00003c,0x780003c7,0x8000f000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f780,
  3020. - 0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0xf80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803e01f,0x1ffff8,0xf001e0,
  3021. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x0,0x0,0x1e0000,
  3022. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3023. - 0x780000,0x3c1e0000,0x781e003e,0x30703803,0x80001e00,0x1e0,0xf00,0x7800,0xff800,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e,
  3024. - 0x0,0x7800000f,0x3c780,0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x2000000,0x800000,0x1e0,0x78000e0,0x3c78003,
  3025. - 0xc000f01e,0x1e0,0xf803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x701cf07b,0xc01e01e0,0xf00780,0x1e07800,
  3026. - 0x3c078001,0xe03c0000,0xf000,0xf0003c0,0x7c003e0f,0x1e00,0xf83e001e,0x1e00000,0x7c0003c,0x3c00,0x1e0,0xf807c,0x0,0x0,0x1fe0001,
  3027. - 0xe1fc0000,0x7f00003,0xf8780007,0xf000003c,0x7f0,0x783f0,0x0,0x0,0x7800000,0x1e00000,0x3e0f8000,0xfc00007,0xf8000007,0xf00001fc,
  3028. - 0xf,0xc0003fc0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x3c00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0,0x1818000,
  3029. - 0x7800000,0x1,0xe00f0000,0x0,0x7c0000,0x0,0x1f,0x80001f80,0x7c1f8,0x1f83e0,0x0,0x0,0x0,0x70,0x38c70007,0xf8000000,0x7f03,
  3030. - 0xf0000000,0x0,0x780780,0x0,0x0,0xfe0000,0xf0000000,0x1e0,0x1e00003c,0x3f00,0x0,0xe07f0e,0x7fff80,0x0,0x0,0x70,0x70000,0x1c0,
  3031. - 0x1c000078,0x3c,0x1fc0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x78f000,0x3c78000,0x1e3c0000,
  3032. - 0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,
  3033. - 0xf80f780,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0x1f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801e01e,0x1ffffc,
  3034. - 0xf007e0,0x3fc000,0x1fe0000,0xff00000,0x7f800003,0xfc00001f,0xe0000fc0,0xfc00007f,0xfe0,0x7f00,0x3f800,0x1fc000,0x0,0x0,0x0,
  3035. - 0x1,0xf000001f,0x80000ff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x1f80000,0x1fc1e000,0x0,0x0,0x0,0x0,0x1e1fc0,0x0,0x0,0x0,0x0,
  3036. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,
  3037. - 0x781c007c,0x30003803,0x80001f00,0x1e0,0xf00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e,0x0,0x7800000f,0x3c780,
  3038. - 0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x1e000000,0xf00000,0x3e0,0xf0000e0,0x3c78003,0xc000f01e,0x1e0,0x7803c0,
  3039. - 0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c0f8000,0x7800001e,0x701cf079,0xe01e01e0,0xf00780,0x1e07800,0x3c078001,0xe03c0000,
  3040. - 0xf000,0xf0003c0,0x3c003c0f,0x3e00,0x787c001f,0x3e00000,0xf80003c,0x3c00,0x1e0,0x1f003e,0x0,0x0,0x1fffc001,0xe7ff0000,0x3ffe000f,
  3041. - 0xfe78003f,0xfc001fff,0xfe001ffc,0xf0078ffc,0x1ffc00,0x7ff000,0x7800f80,0x1e0000f,0x7f1fc01e,0x3ff0001f,0xfe00079f,0xfc0007ff,
  3042. - 0x3c003c7f,0xf001fff8,0x1fffff0,0x3c003c0,0xf0000f1e,0xf1f,0x7c1f0,0x1f00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3c00000,0x100000,
  3043. - 0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7800000,0x1,0xe00f0000,0x1000000,0xf80000,0x40000002,0xf,0x80001f00,0x7e0f8,0x1f07c0,
  3044. - 0x0,0x0,0x0,0x70,0x38c7003f,0xff000000,0xff8f,0xf8000100,0xffffe,0x7c0f80,0x0,0x0,0x3ffc000,0xf0000020,0x1001f0,0x3c00003c,
  3045. - 0x1f80,0x0,0x1c3ffc7,0x7c0780,0x0,0x0,0xe3,0xff038000,0xe0,0x38000078,0x78,0x1ff0,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0,
  3046. - 0x7800000,0x1c00,0xe000,0xe00,0xf000,0x78f000,0x3c78000,0x1e3c0000,0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000,
  3047. - 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,
  3048. - 0x4000200f,0x3f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801f03e,0x1ffffe,0xf01fe0,0x3fff800,0x1fffc000,0xfffe0007,0xfff0003f,
  3049. - 0xff8001ff,0xfc003ff3,0xfe0003ff,0xe0007ff8,0x3ffc0,0x1ffe00,0xfff000,0x3ff80001,0xffc0000f,0xfe00007f,0xf000003f,0xf8003c7f,
  3050. - 0xe0003ffc,0x1ffe0,0xfff00,0x7ff800,0x3ffc000,0x1f80000,0xfff1c03c,0x3c01e0,0x1e00f00,0xf007800,0x781f0001,0xf01e7ff0,0x7c0007c,
  3051. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
  3052. - 0x3c1e003f,0xfffff078,0x30003803,0x80000f00,0x1e0,0x1f00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x3c000f00,0x780001e,0x0,0x7800000f,
  3053. - 0x78780,0x3c00000,0x3c000000,0x7c00f,0x780f0,0x3c0007,0xe000003f,0x0,0xfe000000,0xfe0000,0x3c0,0x1f000070,0x7c7c003,0xc000f01e,
  3054. - 0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c1f0000,0x7800001e,0x783cf079,0xe01e03c0,0xf00780,0x1e0f000,0x3c078001,
  3055. - 0xe03c0000,0xf000,0xf0003c0,0x3c003c07,0x81f03c00,0x7c7c000f,0x87c00000,0xf00003c,0x1e00,0x1e0,0x3e001f,0x0,0x0,0x3fffe001,
  3056. - 0xefff8000,0x7fff001f,0xff78007f,0xfe001fff,0xfe003ffe,0xf0079ffe,0x1ffc00,0x7ff000,0x7801f00,0x1e0000f,0xffbfe01e,0x7ff8003f,
  3057. - 0xff0007bf,0xfe000fff,0xbc003cff,0xf803fffc,0x1fffff0,0x3c003c0,0x78001e1e,0xf0f,0x800f80f0,0x1e00ff,0xffe0001e,0xf0,0x780,
  3058. - 0x0,0x0,0x3c00000,0x380000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1008000,0x7800000,0x3,0xe00f0000,0x3800000,0xf00000,0xe0000007,
  3059. - 0xf,0x80001f00,0x3e0f8,0x1e07c0,0x0,0x0,0x0,0x70,0x3807007f,0xff800000,0x1ffdf,0xfc000380,0xffffe,0x3e1f00,0x0,0x0,0xfffe000,
  3060. - 0xf0000030,0x3800f8,0x7c00003c,0xfc0,0x0,0x18780c3,0xf00780,0x80100,0x0,0xc3,0xffc18000,0xf0,0x78000078,0xf0,0xf0,0x0,0x3c003c0,
  3061. - 0xfffe1c00,0x0,0x0,0x380000f0,0x7800801,0x1c00,0xe000,0x1e00,0xf000,0xf8f800,0x7c7c000,0x3e3e0001,0xf1f0000f,0x8f80007c,0x7c000787,
  3062. - 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078001,0xe03c000f,
  3063. - 0x1e00078,0xf0003c0,0x78001e00,0xe000701f,0x3fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x7800f87c,0x1e007f,0xf07e00,0x7fffc00,0x3fffe001,
  3064. - 0xffff000f,0xfff8007f,0xffc003ff,0xfe007ff7,0xff0007ff,0xf000fffc,0x7ffe0,0x3fff00,0x1fff800,0x3ff80001,0xffc0000f,0xfe00007f,
  3065. - 0xf00000ff,0xf8003cff,0xf0007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x1f80001,0xfffb803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001,
  3066. - 0xe01efff8,0x3c00078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3067. - 0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e003f,0xfffff078,0x30001c07,0xf80,0x1e0,0x1e00,0x3c00,0xff800,0x1e0000,0x0,0x0,0x0,0x3c001e00,
  3068. - 0x3c0001e,0x0,0x7800001e,0x70780,0x3c00000,0x78000000,0x78007,0x800f00f0,0x3e0007,0xe000003f,0x3,0xfe000000,0xff8000,0x7c0,
  3069. - 0x1e000070,0x783c003,0xc001f01e,0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c3e0000,0x7800001e,0x3838f079,
  3070. - 0xe01e03c0,0x780780,0x1e0f000,0x1e078001,0xe03c0000,0xf000,0xf0003c0,0x3c007c07,0x81f03c00,0x3ef80007,0x87800000,0x1f00003c,
  3071. - 0x1e00,0x1e0,0x7c000f,0x80000000,0x0,0x3ffff001,0xffffc000,0xffff003f,0xff7800ff,0xff001fff,0xfe007ffe,0xf007bffe,0x1ffc00,
  3072. - 0x7ff000,0x7803e00,0x1e0000f,0xffffe01e,0xfff8007f,0xff8007ff,0xff001fff,0xbc003dff,0xf807fffc,0x1fffff0,0x3c003c0,0x78001e0f,
  3073. - 0x1e07,0xc01f00f0,0x1e00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7c00000,0x7c0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1018000,0x7800000,
  3074. - 0x3,0xc00f0000,0x7c00000,0x1f00001,0xf000000f,0x80000007,0xc0003e00,0x1e07c,0x3e0780,0x0,0x0,0x0,0x70,0x380700ff,0xff800000,
  3075. - 0x3ffff,0xfe0007c0,0xffffe,0x1e1e00,0x0,0x780000,0x1fffe000,0xf0000078,0x7c0078,0x7800003c,0xff0,0x0,0x38e0003,0x80f00780,
  3076. - 0x180300,0x0,0x1c3,0x81e1c000,0x7f,0xf0000078,0x1e0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800c01,0x80001c00,
  3077. - 0xe000,0x603e00,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x7800078,0x3c000f87,0x8001e000,0x78000,0x3c0000,0x1e00000,
  3078. - 0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f01,0xf000f81e,
  3079. - 0x7bc0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007878,0x1e001f,0xf0f800,0x7fffe00,0x3ffff001,0xffff800f,0xfffc007f,0xffe003ff,
  3080. - 0xff007fff,0xff800fff,0xf001fffe,0xffff0,0x7fff80,0x3fffc00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00001ff,0xfc003dff,0xf000ffff,
  3081. - 0x7fff8,0x3fffc0,0x1fffe00,0xffff000,0x1f80003,0xffff803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001,0xe01ffffc,0x3c00078,0x0,
  3082. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,
  3083. - 0x3c1e003f,0xfffff078,0x30001e0f,0x300780,0x1e0,0x1e00,0x3c00,0x3dde00,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf800003e,
  3084. - 0xf0780,0x3dfc000,0x783f8000,0xf8007,0xc01f00f0,0x3e0007,0xe000003f,0x1f,0xfc000000,0x7ff000,0xf80,0x3e007c70,0x783c003,0xc001e03c,
  3085. - 0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007,0x80007800,0x780,0x3c7c0000,0x7800001e,0x3878f078,0xf01e03c0,0x780780,0x1e0f000,0x1e078001,
  3086. - 0xe03e0000,0xf000,0xf0003c0,0x1e007807,0x83f03c00,0x3ef00007,0xcf800000,0x3e00003c,0xf00,0x1e0,0xf80007,0xc0000000,0x0,0x3e01f801,
  3087. - 0xfe07e001,0xf80f007e,0x7f801f8,0x1f801fff,0xfe00fc0f,0xf007f83f,0x1ffc00,0x7ff000,0x7807c00,0x1e0000f,0x87e1e01f,0xe0fc00fc,
  3088. - 0xfc007f8,0x1f803f03,0xfc003df0,0x3807e03c,0x1fffff0,0x3c003c0,0x78003e0f,0x1e03,0xe03e00f8,0x3e00ff,0xffe0001e,0xf0,0x780,
  3089. - 0x0,0x0,0x7800000,0xfe0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7c00000,0x3,0xc00f0000,0xfe00000,0x3e00003,0xf800001f,
  3090. - 0xc0000007,0xc0003e00,0x1e03c,0x3c0f80,0x0,0x0,0x0,0x70,0x380700fc,0x7800000,0x7c1fe,0x3e000fe0,0xffffe,0x1f3e00,0x0,0x780000,
  3091. - 0x3f98e000,0xf000003c,0xfcf8007c,0xf800003c,0x3ffc,0x0,0x31c0001,0x80f00f80,0x380700,0x0,0x183,0x80e0c000,0x3f,0xe0000078,
  3092. - 0x3c0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x38000078,0xf000e01,0xc003ffe0,0x1fff00,0x7ffc00,0xf000,0xf07800,0x783c000,0x3c1e0001,
  3093. - 0xe0f0000f,0x7800078,0x3c000f07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,
  3094. - 0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf801f01e,0xf3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007cf8,
  3095. - 0x1e000f,0x80f0f000,0x7c03f00,0x3e01f801,0xf00fc00f,0x807e007c,0x3f003e0,0x1f80707f,0x8f801f80,0xf003f03f,0x1f81f8,0xfc0fc0,
  3096. - 0x7e07e00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00003ff,0xfc003fc1,0xf801f81f,0x800fc0fc,0x7e07e0,0x3f03f00,0x1f81f800,0x1f80007,
  3097. - 0xe07f003c,0x3c01e0,0x1e00f00,0xf007800,0x780f8003,0xe01fe07e,0x3e000f8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3098. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3f,0xfffff078,0x30000ffe,0x1f007c0,0x0,0x1e00,
  3099. - 0x3c00,0xf9cf80,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf00000fc,0x1e0780,0x3fff800,0x78ffe000,0xf0003,0xe03e00f0,
  3100. - 0x3e0007,0xe000003f,0x7f,0xe01fffff,0xf00ffc00,0x1f80,0x3c01ff70,0x783c003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007,
  3101. - 0x80007800,0x780,0x3cfc0000,0x7800001e,0x3c78f078,0xf01e03c0,0x780780,0x3e0f000,0x1e078003,0xc01f0000,0xf000,0xf0003c0,0x1e007807,
  3102. - 0x83f83c00,0x1ff00003,0xcf000000,0x3e00003c,0xf00,0x1e0,0x0,0x0,0x0,0x20007801,0xfc03e003,0xe003007c,0x3f803e0,0x7c0003c,
  3103. - 0xf807,0xf007e00f,0x3c00,0xf000,0x780f800,0x1e0000f,0x87e1f01f,0x803c00f8,0x7c007f0,0xf803e01,0xfc003f80,0x80f8004,0x3c000,
  3104. - 0x3c003c0,0x3c003c0f,0x1e03,0xe03e0078,0x3c0000,0x7c0001e,0xf0,0x780,0x0,0x0,0x3ffff800,0x1ff0000,0x0,0x7800000,0x0,0x18,
  3105. - 0xc0,0x0,0x1818000,0x3e00000,0x3,0xc00f0000,0x1ff00000,0x3e00007,0xfc00003f,0xe0000003,0xc0003c00,0xf03c,0x3c0f00,0x0,0x0,
  3106. - 0x0,0x70,0x380701f0,0x800000,0x780fc,0x1e001ff0,0x7c,0xf3c00,0x0,0x780000,0x7e182000,0xf000001f,0xfff00ffc,0xffc0003c,0x3cfe,
  3107. - 0x0,0x31c0001,0x80f01f80,0x780f00,0x0,0x183,0x80e0c000,0xf,0x80000078,0x780,0x38,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x38000078,
  3108. - 0xf000f01,0xe003ffe0,0x1fff00,0x7ff800,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x78000f8,0x3e000f07,0x8003c000,0x78000,
  3109. - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,
  3110. - 0x78000f00,0x7c03e01e,0x1e3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78003cf0,0x1e0007,0x80f1e000,0x4000f00,0x20007801,0x3c008,
  3111. - 0x1e0040,0xf00200,0x780403f,0x7803e00,0x3007c00f,0x803e007c,0x1f003e0,0xf801f00,0x780000,0x3c00000,0x1e000000,0xf00007f0,
  3112. - 0x3e003f00,0x7801f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e003c,0x3c01e0,0x1e00f00,0xf007800,0x78078003,
  3113. - 0xc01fc03e,0x1e000f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3114. - 0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xf078007c,0x300007fc,0x7e00fe0,0x0,0x1e00,0x3c00,0x3e1c3e0,0x1e0000,0x0,0x0,0x0,0xf0001e00,
  3115. - 0x3c0001e,0x1,0xf000fff8,0x1e0780,0x3fffe00,0x79fff000,0x1f0001,0xfffc00f0,0x7e0007,0xe000003f,0x3ff,0x801fffff,0xf003ff80,
  3116. - 0x3f00,0x3c03fff0,0xf01e003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3df80000,0x7800001e,
  3117. - 0x1c70f078,0x781e03c0,0x780780,0x3c0f000,0x1e078007,0xc01f8000,0xf000,0xf0003c0,0x1e007807,0x83f83c00,0xfe00003,0xff000000,
  3118. - 0x7c00003c,0x780,0x1e0,0x0,0x0,0x0,0x7c01,0xf801f007,0xc00100f8,0x1f803c0,0x3c0003c,0x1f003,0xf007c00f,0x80003c00,0xf000,
  3119. - 0x783f000,0x1e0000f,0x3c0f01f,0x3e01f0,0x3e007e0,0x7c07c00,0xfc003f00,0xf0000,0x3c000,0x3c003c0,0x3c003c0f,0x1e01,0xf07c007c,
  3120. - 0x7c0000,0xfc0001e,0xf0,0x780,0x0,0x0,0x3ffff000,0x3838000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0xff0000,0x3f00000,0x3,0xc00fff00,
  3121. - 0x38380000,0x7c0000e,0xe000070,0x70000001,0xe0003c00,0xf01e,0x780e00,0x0,0x0,0x0,0x0,0x1e0,0x0,0x780f8,0xf003838,0xfc,0xffc00,
  3122. - 0x0,0x780000,0x7c180000,0xf000000f,0xffe00fff,0xffc0003c,0x783f,0x80000000,0x6380000,0xc0f83f80,0xf81f00,0x0,0x303,0x80e06000,
  3123. - 0x0,0x78,0xf00,0x78,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x3800003c,0x3e000f81,0xf003ffe0,0x1fff00,0x1fc000,0xf000,0x1e03c00,
  3124. - 0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e000f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,
  3125. - 0x3c000001,0xe0001e00,0x3c0f0f0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3e07c01e,0x1e3c0f0,0x3c0780,0x1e03c00,
  3126. - 0xf01e000,0x78003ff0,0x1e0007,0x80f1e000,0xf80,0x7c00,0x3e000,0x1f0000,0xf80000,0x7c0001e,0x3c07c00,0x10078007,0x803c003c,
  3127. - 0x1e001e0,0xf000f00,0x780000,0x3c00000,0x1e000000,0xf00007c0,0x1e003e00,0x7c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00,
  3128. - 0xf,0x801f003c,0x3c01e0,0x1e00f00,0xf007800,0x7807c007,0xc01f801f,0x1f001f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3129. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xe078003c,0x300001f0,0x3f801ff0,0x0,
  3130. - 0x3c00,0x1e00,0x3c1c1e0,0x1e0000,0x0,0x0,0x0,0xf0001e0f,0x3c0001e,0x3,0xe000fff0,0x3c0780,0x3ffff00,0x7bfff800,0x1e0000,0x7ff00078,
  3131. - 0x7e0007,0xe000003f,0x1ffc,0x1fffff,0xf0007ff0,0x7e00,0x3c07c3f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,
  3132. - 0x1fffff,0x80007800,0x780,0x3ffc0000,0x7800001e,0x1ef0f078,0x781e03c0,0x780780,0x7c0f000,0x1e07801f,0x800ff000,0xf000,0xf0003c0,
  3133. - 0xf00f807,0x83b83c00,0xfc00001,0xfe000000,0xf800003c,0x780,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0xc00000f0,0xf80780,0x3c0003c,
  3134. - 0x1e001,0xf007c007,0x80003c00,0xf000,0x787e000,0x1e0000f,0x3c0f01f,0x1e01e0,0x1e007c0,0x3c07800,0x7c003f00,0xf0000,0x3c000,
  3135. - 0x3c003c0,0x3e007c07,0x80003c00,0xf8f8003c,0x780000,0xf80001e,0xf0,0x780,0x0,0x0,0x7ffff000,0x601c000,0x3,0xffff0000,0x0,
  3136. - 0xfff,0xf8007fff,0xc0000000,0x7e003c,0x1fe0000,0xc0003,0xc00fff00,0x601c0000,0xf800018,0x70000c0,0x38000001,0xe0007800,0x701e,
  3137. - 0x701e00,0x0,0x0,0x0,0x0,0x1e0,0x6,0x700f8,0xf00601c,0xf8,0x7f800,0x0,0x780000,0xf8180000,0xf000000f,0x87c00fff,0xffc0003c,
  3138. - 0xf01f,0xc0000000,0x6380000,0xc07ff780,0x1f03e03,0xfffffe00,0x303,0x81c06000,0x0,0x1ffff,0xfe001e00,0x180f8,0x0,0x3c003c0,
  3139. - 0x3ffe1c00,0x3f00000,0x0,0x3800003f,0xfe0007c0,0xf8000000,0x18000000,0xc0000006,0x1f000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e,
  3140. - 0x3c000f0,0x1e001f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f0f0,
  3141. - 0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f0f801e,0x3c3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007,
  3142. - 0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07c00,0xf0007,0x8078003c,0x3c001e0,0x1e000f00,0x780000,0x3c00000,
  3143. - 0x1e000000,0xf0000f80,0x1f003e00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0xf,0x3f003c,0x3c01e0,0x1e00f00,0xf007800,
  3144. - 0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3145. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe078003f,0xb0000000,0xfc003cf0,0x0,0x3c00,0x1e00,0x101c040,0x1e0000,0x0,0x0,0x1,
  3146. - 0xe0001e1f,0x83c0001e,0x7,0xe000fff0,0x3c0780,0x3c03f80,0x7fc0fc00,0x1e0000,0xfff80078,0xfe0007,0xe000003f,0x7fe0,0x1fffff,
  3147. - 0xf0000ffc,0xfc00,0x780f81f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3ffc0000,
  3148. - 0x7800001e,0x1ef0f078,0x3c1e03c0,0x780780,0x1fc0f000,0x1e07ffff,0x7ff00,0xf000,0xf0003c0,0xf00f007,0xc3b87c00,0x7c00001,0xfe000000,
  3149. - 0xf800003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0x800000f0,0xf80780,0x1e0003c,0x1e001,0xf0078007,0x80003c00,0xf000,0x78fc000,
  3150. - 0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,0x3c07800,0x7c003e00,0xf0000,0x3c000,0x3c003c0,0x1e007807,0x80003c00,0x7df0003c,0x780000,
  3151. - 0x1f00001e,0xf0,0x780,0x0,0x0,0x7800000,0xe7ce000,0x3,0xffff0000,0x0,0xfff,0xf8007fff,0xc0000000,0x1f0,0xffe000,0x1c0003,
  3152. - 0xc00fff00,0xe7ce0000,0xf800039,0xf38001cf,0x9c000000,0xe0007800,0x780e,0x701c00,0x0,0x0,0x0,0x0,0x1e0,0x7,0xf0078,0xf00e7ce,
  3153. - 0x1f0,0x7f800,0x0,0x780000,0xf0180000,0xf000000e,0x1c0001f,0xe000003c,0xf007,0xe0000000,0x6380000,0xc03fe780,0x3e07c03,0xfffffe00,
  3154. - 0x303,0xffc06000,0x0,0x1ffff,0xfe003ffe,0x1fff0,0x0,0x3c003c0,0x1ffe1c00,0x3f00000,0x7,0xffc0001f,0xfc0003e0,0x7c000001,0xfc00000f,
  3155. - 0xe000007f,0x1e000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,
  3156. - 0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e,
  3157. - 0x783c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007,0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07800,
  3158. - 0xf0003,0xc078001e,0x3c000f0,0x1e000780,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c03c003,0xc01e001e,0xf000f0,
  3159. - 0x7800780,0x3c003c00,0xf,0x7f003c,0x3c01e0,0x1e00f00,0xf007800,0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3160. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe070001f,0xf8000007,
  3161. - 0xf0007cf8,0x7800000,0x3c00,0x1e00,0x1c000,0x1e0000,0x0,0x0,0x1,0xe0001e1f,0x83c0001e,0xf,0xc000fff8,0x780780,0x2000f80,0x7f803e00,
  3162. - 0x3e0003,0xfffe007c,0x1fe0000,0x0,0x3ff00,0x0,0x1ff,0x8001f000,0x780f00f0,0x1f00f003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff,
  3163. - 0xfe03c00f,0xf81fffff,0x80007800,0x780,0x3ffe0000,0x7800001e,0xee0f078,0x3c1e03c0,0x7807ff,0xff80f000,0x1e07fffe,0x3ffe0,
  3164. - 0xf000,0xf0003c0,0xf00f003,0xc7bc7800,0xfc00000,0xfc000001,0xf000003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xe000f80f,0x800001e0,
  3165. - 0xf80f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x79f8000,0x1e0000f,0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003e00,
  3166. - 0xf0000,0x3c000,0x3c003c0,0x1e007807,0x81e03c00,0x7df0003e,0xf80000,0x3e00003e,0xf0,0x7c0,0xfc000,0x80000000,0x7800000,0x1e7cf000,
  3167. - 0x3,0xffff0000,0x0,0x18,0xc0,0x0,0xf80,0x7ffc00,0x380003,0xc00fff01,0xe7cf0000,0x1f000079,0xf3c003cf,0x9e000000,0xe0007000,
  3168. - 0x380e,0xe01c00,0x0,0x0,0x0,0x0,0x1e0,0x3,0x800f0078,0xf01e7cf,0x3e0,0x3f000,0x0,0x780000,0xf018001f,0xfff8001e,0x1e0000f,
  3169. - 0xc000003c,0xf003,0xe0000000,0x6380000,0xc00fc780,0x7c0f803,0xfffffe00,0x303,0xfe006000,0x0,0x1ffff,0xfe003ffe,0x1ffe0,0x0,
  3170. - 0x3c003c0,0xffe1c00,0x3f00000,0x7,0xffc00007,0xf00001f0,0x3e00001f,0xfc0000ff,0xe00007ff,0x3e000,0x3e01e00,0x1f00f000,0xf8078007,
  3171. - 0xc03c003e,0x1e001e0,0xf001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,
  3172. - 0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000fc0,
  3173. - 0x1e0007,0x80f1f000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c0f800,0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000,
  3174. - 0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1e,0xf7803c,0x3c01e0,0x1e00f00,
  3175. - 0xf007800,0x7803e00f,0x801e000f,0x80f803e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3176. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe0f0000f,0xff00001f,0x8000f87c,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,
  3177. - 0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x1f,0x800000fe,0xf00780,0x7c0,0x7f001e00,0x3c0007,0xe03f003f,0x3fe0000,0x0,0x3fc00,0x0,
  3178. - 0x7f,0x8001e000,0x781f00f0,0x1e00f003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3f9f0000,0x7800001e,
  3179. - 0xfe0f078,0x3c1e03c0,0x7807ff,0xff00f000,0x1e07fff8,0xfff8,0xf000,0xf0003c0,0xf81f003,0xc7bc7800,0xfe00000,0x78000003,0xe000003c,
  3180. - 0x1e0,0x1e0,0x0,0x0,0x0,0x1fffc01,0xe000780f,0x1e0,0x780f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7bf0000,0x1e0000f,
  3181. - 0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xf8000,0x3c000,0x3c003c0,0x1f00f807,0x81f03c00,0x3fe0001e,0xf00000,0x7c00007c,
  3182. - 0xf0,0x3e0,0x3ff801,0x80000000,0x7800000,0x3cfcf800,0x3,0xffff0000,0x0,0x18,0xc0,0x0,0x7c00,0x1fff00,0x700003,0xc00f0003,
  3183. - 0xcfcf8000,0x3e0000f3,0xf3e0079f,0x9f000000,0xf000,0x1000,0x0,0x0,0x0,0x0,0x0,0x1f0,0x1,0xc00f0078,0xf03cfcf,0x800007c0,0x1e000,
  3184. - 0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x8000003c,0xf001,0xf0000000,0x6380000,0xc0000000,0xf81f003,0xfffffe00,0x303,
  3185. - 0x87006000,0x0,0x1ffff,0xfe003ffe,0x7f00,0x0,0x3c003c0,0x3fe1c00,0x3f00000,0x7,0xffc00000,0xf8,0x1f0001ff,0xf0000fff,0x80007ffc,
  3186. - 0xfc000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf001e07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,
  3187. - 0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3fc001e,0x1e03c0f0,0x3c0780,
  3188. - 0x1e03c00,0xf01e000,0x78000780,0x1e0007,0x80f0fc00,0x3fff80,0x1fffc00,0xfffe000,0x7fff0003,0xfff8001f,0xffc0001e,0x3c0f000,
  3189. - 0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000,0x3c00000,0x1e000000,0xf0001e00,0xf803c00,0x3c078001,0xe03c000f,0x1e00078,
  3190. - 0xf0003c0,0x78001e07,0xfffffe1e,0x1e7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801e00f,0x1e0007,0x807803c0,0x0,0x0,0x0,0x0,0x0,
  3191. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00007,
  3192. - 0xffc0007e,0xf03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x3f,0x3e,0xf00780,0x3c0,0x7e001e00,
  3193. - 0x7c000f,0x800f001f,0xffde0000,0x0,0x3e000,0x0,0xf,0x8003e000,0x781e0070,0x1e00f003,0xc001f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,
  3194. - 0xf81e0007,0x80007800,0x780,0x3f1f0000,0x7800001e,0x7c0f078,0x1e1e03c0,0x7807ff,0xfc00f000,0x1e07fffe,0xffc,0xf000,0xf0003c0,
  3195. - 0x781e003,0xc71c7800,0x1ff00000,0x78000003,0xe000003c,0x1e0,0x1e0,0x0,0x0,0x0,0xffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,
  3196. - 0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7f000,0x3c000,
  3197. - 0x3c003c0,0xf00f007,0xc1f07c00,0x1fc0001f,0x1f00000,0xfc000ff8,0xf0,0x1ff,0xfffe07,0x80000000,0x7800000,0x7ffcfc00,0x0,0xf000000,
  3198. - 0x0,0x18,0xc0,0x0,0x3e000,0x1ff80,0xe00003,0xc00f0007,0xffcfc000,0x3e0001ff,0xf3f00fff,0x9f800000,0x6000,0x0,0x0,0x7c000,
  3199. - 0x0,0x0,0x0,0xfe,0x0,0xe00f007f,0xff07ffcf,0xc0000fc0,0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x80000000,0xf800,
  3200. - 0xf0000000,0x6380000,0xc0000000,0x1f03c000,0x1e00,0x303,0x83806000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xfe1c00,0x3f00000,0x0,
  3201. - 0x0,0x3c,0xf801fff,0xfff8,0x7ffc0,0x1f8000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf003c07,0x8003c000,0x78000,
  3202. - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,
  3203. - 0x78000f00,0x1f8001e,0x1e03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e000f,0x80f0ff00,0x1ffff80,0xffffc00,0x7fffe003,
  3204. - 0xffff001f,0xfff800ff,0xffc007ff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,
  3205. - 0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x3c7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801f01f,
  3206. - 0x1e0007,0x807c07c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3207. - 0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00000,0xfff003f0,0x1f00f03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x7ff80000,0x3,
  3208. - 0xc0001e0f,0x3c0001e,0x7e,0x1f,0x1e00780,0x3e0,0x7e000f00,0x78000f,0x7800f,0xff9e0000,0x0,0x3fc00,0x0,0x7f,0x8003c000,0x781e0070,
  3209. - 0x3e00f803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3e0f8000,0x7800001e,0x7c0f078,0x1e1e03c0,
  3210. - 0x7807ff,0xf000f000,0x1e07807f,0xfe,0xf000,0xf0003c0,0x781e003,0xc71c7800,0x3ef00000,0x78000007,0xc000003c,0x1e0,0x1e0,0x0,
  3211. - 0x0,0x0,0x1ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e,
  3212. - 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7ff80,0x3c000,0x3c003c0,0xf00f003,0xc1f07800,0x1fc0000f,0x1e00000,0xf8000ff0,0xf0,
  3213. - 0xff,0xffffff,0x80000000,0x3fffc000,0xfff9fe00,0x0,0xf000000,0x0,0x18,0xc0,0x0,0x1f0000,0x1fc0,0x1c00003,0xc00f000f,0xff9fe000,
  3214. - 0x7c0003ff,0xe7f81fff,0x3fc00000,0x0,0x0,0x0,0xfe000,0x1ffffc0f,0xfffffc00,0x0,0xff,0xf0000000,0x700f007f,0xff0fff9f,0xe0000f80,
  3215. - 0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00fff,0xffc00000,0xf800,0xf0000000,0x6380000,0xc0ffff80,0x3e078000,0x1e00,0x7ff80303,
  3216. - 0x83c06000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000,0x0,0x7f,0xff00001e,0x7c1fff0,0xfff80,0x7ffc00,0x3f0000,0x7c01f00,
  3217. - 0x3e00f801,0xf007c00f,0x803e007c,0x1f003e0,0xf803c07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
  3218. - 0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f8001e,0x3c03c0f0,0x3c0780,0x1e03c00,0xf01e000,
  3219. - 0x78000780,0x1e001f,0xf07f80,0x3ffff80,0x1ffffc00,0xffffe007,0xffff003f,0xfff801ff,0xffc03fff,0xffc0f000,0x1fffff,0xc0fffffe,
  3220. - 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,
  3221. - 0xfffffe1e,0x787803c,0x3c01e0,0x1e00f00,0xf007800,0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3222. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x3ff80fc0,0x7fc1e01f,
  3223. - 0x7800000,0x3c00,0x1e00,0x0,0x7fffff80,0x0,0x7ff80000,0x7,0x80001e00,0x3c0001e,0xfc,0xf,0x1e00780,0x1e0,0x7c000f00,0x78000f,
  3224. - 0x78007,0xff1e0000,0x0,0x3ff00,0x0,0x1ff,0x8003c000,0x781e0070,0x3c007803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007,
  3225. - 0x80007800,0x780,0x3c07c000,0x7800001e,0x7c0f078,0xf1e03c0,0x780780,0xf000,0x1e07801f,0x3e,0xf000,0xf0003c0,0x781e003,0xcf1c7800,
  3226. - 0x3cf80000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0,0x0,0x0,0x3ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,
  3227. - 0x80003c00,0xf000,0x7ff8000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3fff0,0x3c000,0x3c003c0,0xf81f003,
  3228. - 0xc3b87800,0xf80000f,0x1e00001,0xf0000ff0,0xf0,0xff,0xf03fff,0x80000000,0x3fff8001,0xfff1ff00,0x0,0xf000000,0x0,0x18,0xc0,
  3229. - 0x0,0x380000,0x7c0,0x3c00003,0xc00f001f,0xff1ff000,0xf80007ff,0xc7fc3ffe,0x3fe00000,0x0,0x0,0x0,0x1ff000,0x7ffffe1f,0xffffff00,
  3230. - 0x0,0x7f,0xfe000000,0x780f007f,0xff1fff1f,0xf0001f00,0x1e000,0x0,0x780001,0xe0180000,0xf000001c,0xe00fff,0xffc00000,0x7c00,
  3231. - 0xf0000000,0x31c0001,0x80ffff80,0x3e078000,0x1e00,0x7ff80183,0x81c0c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000,
  3232. - 0x0,0x7f,0xff00001e,0x7c7ff03,0xc03ff8fe,0x1ffc0f0,0x7e0000,0x7800f00,0x3c007801,0xe003c00f,0x1e0078,0xf003c0,0x7803c07,0x8003c000,
  3233. - 0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c,
  3234. - 0xf0001e0,0x78000f00,0x3fc001e,0x7803c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e007f,0xf03fe0,0x7ffff80,0x3ffffc01,
  3235. - 0xffffe00f,0xffff007f,0xfff803ff,0xffc07fff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,
  3236. - 0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x707803c,0x3c01e0,0x1e00f00,0xf007800,
  3237. - 0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3238. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x30f81f00,0xffe1e00f,0x87800000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000,
  3239. - 0x7,0x80001e00,0x3c0001e,0x1f8,0x7,0x83c00780,0x1e0,0x7c000f00,0xf8001e,0x3c001,0xfc1e0000,0x0,0x7fe0,0x0,0xffc,0x3c000,0x781e0070,
  3240. - 0x3ffff803,0xc000783c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x380f078,0xf1e03c0,
  3241. - 0x780780,0xf000,0x1e07800f,0x8000001e,0xf000,0xf0003c0,0x3c3c003,0xcf1e7800,0x7c780000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0,
  3242. - 0x0,0x0,0x7f003c01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7f7c000,0x1e0000f,0x3c0f01e,
  3243. - 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfff8,0x3c000,0x3c003c0,0x781e003,0xc3b87800,0x1fc00007,0x83e00003,0xe0000ff8,0xf0,
  3244. - 0x1ff,0xc007fe,0x0,0x7fff8001,0xffe3ff00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x3c0,0x7800003,0xc00f001f,0xfe3ff000,0xf80007ff,
  3245. - 0x8ffc3ffc,0x7fe00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x1f,0xff000000,0x3c0f007f,0xff1ffe3f,0xf0003e00,0x1e000,0x0,0x780001,
  3246. - 0xe0180000,0xf000001e,0x1e00fff,0xffc00000,0x3f00,0xf0000000,0x31c0001,0x80ffff80,0x1f03c000,0x1e00,0x7ff80183,0x81c0c000,
  3247. - 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x7f,0xff00003c,0xf87f007,0xc03f83ff,0x81fc01f0,0x7c0000,0x7ffff00,0x3ffff801,
  3248. - 0xffffc00f,0xfffe007f,0xfff003ff,0xff807fff,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
  3249. - 0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf003c0f0,0x3c0780,0x1e03c00,0xf01e000,
  3250. - 0x78000780,0x1ffffe,0xf00ff0,0xfe00780,0x7f003c03,0xf801e01f,0xc00f00fe,0x7807f0,0x3c0ffff,0xffc0f000,0x1fffff,0xc0fffffe,
  3251. - 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,
  3252. - 0x1e,0xf07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783e,0x1e0007,0x801e0f80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3253. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x307c0801,0xe1f1e00f,0x87000000,
  3254. - 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000,0xf,0x1e00,0x3c0001e,0x3f0,0x7,0x83fffffc,0x1e0,0x7c000f00,0xf0001e,0x3c000,0x3e0000,
  3255. - 0x0,0x1ffc,0x1fffff,0xf0007ff0,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x3c000,0x781e0007,0x80007800,
  3256. - 0x780,0x3c03e000,0x7800001e,0xf078,0x79e03c0,0x780780,0xf000,0x1e078007,0x8000000f,0xf000,0xf0003c0,0x3c3c001,0xee0ef000,
  3257. - 0xf87c0000,0x7800001f,0x3c,0x78,0x1e0,0x0,0x0,0x0,0x7c003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00,
  3258. - 0xf000,0x7e3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x1ffc,0x3c000,0x3c003c0,0x781e003,0xe3b8f800,
  3259. - 0x1fc00007,0x83c00007,0xc00000fc,0xf0,0x3e0,0x8001f8,0x0,0x7800000,0xffc7fe00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0,
  3260. - 0xf000003,0xc00f000f,0xfc7fe001,0xf00003ff,0x1ff81ff8,0xffc00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x3,0xff800000,0x1e0f0078,
  3261. - 0xffc7f,0xe0007c00,0x1e000,0x0,0x780001,0xe0180000,0xf000000e,0x1c00007,0x80000000,0x1f81,0xe0000000,0x38e0003,0x80000000,
  3262. - 0xf81f000,0x1e00,0x7ff801c3,0x80e1c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf8,0x1f070007,0xc03803ff,0xc1c001f0,
  3263. - 0xf80000,0xfffff00,0x7ffff803,0xffffc01f,0xfffe00ff,0xfff007ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,
  3264. - 0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f00f,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e,0xf003c0f0,
  3265. - 0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1ffffc,0xf003f8,0xf800780,0x7c003c03,0xe001e01f,0xf00f8,0x7807c0,0x3c0fc1e,0xf000,
  3266. - 0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,
  3267. - 0xf0003c0,0x78001e00,0x1e,0x1e07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783c,0x1e0007,0x801e0f00,0x0,0x0,0x0,0x0,0x0,0x0,
  3268. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xffff8000,0x303c0001,
  3269. - 0xc071e007,0xcf000000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0xf,0xf00,0x780001e,0x7e0,0x7,0x83fffffc,0x1e0,0x7c000f00,0x1f0001e,
  3270. - 0x3c000,0x3c0000,0x0,0x3ff,0x801fffff,0xf003ff80,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007,
  3271. - 0x80007800,0x780,0x3c01f000,0x7800001e,0xf078,0x79e03c0,0xf00780,0xf000,0x3e078007,0xc000000f,0xf000,0xf0003c0,0x3c3c001,
  3272. - 0xee0ef000,0xf03e0000,0x7800003e,0x3c,0x78,0x1e0,0x0,0x0,0x0,0xf8003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,
  3273. - 0x80003c00,0xf000,0x7c3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfc,0x3c000,0x3c003c0,0x3c3e001,0xe7b8f000,
  3274. - 0x3fe00007,0xc7c0000f,0xc000003e,0xf0,0x7c0,0x0,0x0,0x7c00000,0x7fcffc00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0,0x1e000003,
  3275. - 0xc00f0007,0xfcffc003,0xe00001ff,0x3ff00ff9,0xff800000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x1f800000,0xf0f0078,0x7fcff,
  3276. - 0xc000fc00,0x1e000,0x0,0x780001,0xe0180000,0xf000000f,0x87c00007,0x80000000,0xfe3,0xe0000000,0x18780c3,0x0,0x7c0f800,0x1e00,
  3277. - 0xc3,0x80e18000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x1f0,0x3e00000f,0xc0000303,0xe00003f0,0xf00000,0xfffff80,
  3278. - 0x7ffffc03,0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,
  3279. - 0x3c000001,0xe0001e00,0x780f00f,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1f0f801f,0xe00780f0,0x3c0780,0x1e03c00,
  3280. - 0xf01e000,0x78000780,0x1ffff8,0xf000f8,0x1f000780,0xf8003c07,0xc001e03e,0xf01f0,0x780f80,0x3c1f01e,0xf000,0x1e0000,0xf00000,
  3281. - 0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,
  3282. - 0x1e,0x3c07803c,0x3c01e0,0x1e00f00,0xf007800,0x78007c7c,0x1e0007,0x801f1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3283. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c00000,0x303c0003,0x8039e003,0xef000000,
  3284. - 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0xfc0,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000,
  3285. - 0x0,0x7f,0xe01fffff,0xf00ffc00,0x3c000,0x781f00f0,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007,0x80007800,
  3286. - 0x780,0x3c01f000,0x7800001e,0xf078,0x7de01e0,0xf00780,0x7800,0x3c078003,0xc000000f,0xf000,0xf0003c0,0x3e7c001,0xee0ef001,
  3287. - 0xf01e0000,0x7800003e,0x3c,0x3c,0x1e0,0x0,0x0,0x0,0xf0003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00,
  3288. - 0xf000,0x781f000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0x7df00003,
  3289. - 0xc780000f,0x8000003e,0xf0,0x780,0x0,0x0,0x3c00000,0x3fcff800,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x1f00fc,0x1e0,0x1e000001,
  3290. - 0xe00f0003,0xfcff8003,0xe00000ff,0x3fe007f9,0xff000000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x7c00000,0xf0f0078,0x3fcff,0x8000f800,
  3291. - 0x1e000,0x0,0x780001,0xe0180000,0xf000001f,0xffe00007,0x8000003c,0x7ff,0xc0000000,0x1c3ffc7,0x0,0x3e07c00,0x1e00,0xe3,0x80738000,
  3292. - 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x3e0,0x7c00001d,0xc0000001,0xe0000770,0x1f00000,0xfffff80,0x7ffffc03,
  3293. - 0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,
  3294. - 0xe0001e00,0x780f00f,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0x3e07c01f,0xc00780f0,0x3c0780,0x1e03c00,0xf01e000,
  3295. - 0x78000780,0x1fffc0,0xf0007c,0x1e000780,0xf0003c07,0x8001e03c,0xf01e0,0x780f00,0x3c1e01e,0xf000,0x1e0000,0xf00000,0x7800000,
  3296. - 0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1e,0x7807803c,
  3297. - 0x3c01e0,0x1e00f00,0xf007800,0x78003c78,0x1e0007,0x800f1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3298. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x83c00000,0x303c0003,0x8039e001,0xee000000,0x1e00,0x3c00,
  3299. - 0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0x1f80,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000,0x0,0x1f,0xfc1fffff,
  3300. - 0xf07ff000,0x0,0x780f00f0,0x78003c03,0xc000781e,0x1e0,0xf803c0,0x1e00,0x1e000,0x781e0007,0x80007800,0x780,0x3c00f800,0x7800001e,
  3301. - 0xf078,0x3de01e0,0xf00780,0x7800,0x3c078003,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfe0ff003,0xe01f0000,0x7800007c,0x3c,0x3c,
  3302. - 0x1e0,0x0,0x0,0x0,0xf0007c01,0xe000f80f,0x800001e0,0xf80f00,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x780f800,0x1e0000f,
  3303. - 0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003c00,0x1e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0xf8f80003,0xe780001f,0x1e,
  3304. - 0xf0,0x780,0x0,0x0,0x3c00000,0x1ffff000,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x3bc1de,0x1e0,0xf000001,0xe00f0001,0xffff0007,0xc000007f,
  3305. - 0xffc003ff,0xfe000000,0x0,0x0,0x0,0xfe000,0x0,0x0,0x0,0x0,0x3c00000,0x1e0f0078,0x1ffff,0x1f000,0x1e000,0x0,0x780000,0xf0180000,
  3306. - 0xf000001f,0xfff00007,0x8000003c,0x1ff,0x80000000,0xe0ff0e,0x0,0x1f03e00,0x1e00,0x70,0x70000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,
  3307. - 0xe1c00,0x0,0x0,0x0,0x7c0,0xf8000019,0xc0000000,0xe0000670,0x1e00000,0xf000780,0x78003c03,0xc001e01e,0xf00f0,0x780780,0x3c0f807,
  3308. - 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf80f007,0xbc03c001,0xe01e000f,
  3309. - 0xf00078,0x78003c0,0x3c001e00,0x7c03e00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,
  3310. - 0xf0007c07,0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0xf800,0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,
  3311. - 0xf0001e00,0x7803c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1f8001f,0xf00f803c,0x3c01e0,0x1e00f00,0xf007800,
  3312. - 0x78003e78,0x1e000f,0x800f9e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3313. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x3c00000,0x303c0003,0x8039f001,0xfe000000,0x1e00,0x3c00,0x0,0x1e0000,0x0,0x0,0x3c,0xf00,
  3314. - 0x780001e,0x3f00,0x7,0x80000780,0x3e0,0x3e000f00,0x3c0001e,0x3c000,0x7c0000,0x0,0x3,0xfe000000,0xff8000,0x0,0x3c0f81f0,0xf0001e03,
  3315. - 0xc000780f,0x1e0,0xf003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x780,0x3c007c00,0x7800001e,0xf078,0x3de01e0,0xf00780,0x7800,
  3316. - 0x3c078001,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfc07f003,0xe00f0000,0x78000078,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01,
  3317. - 0xf000f007,0x800000f0,0xf80780,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,
  3318. - 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78001,0xe71df000,0xf8f80001,0xef80003e,0x1e,0xf0,0x780,0x0,0x0,0x3c00000,
  3319. - 0xfffe000,0x0,0x3e000000,0x0,0x18,0x7fff,0xc0000000,0x60c306,0x1e0,0x7800001,0xe00f0000,0xfffe0007,0x8000003f,0xff8001ff,
  3320. - 0xfc000000,0x0,0x0,0x0,0x7c000,0x0,0x0,0x0,0x0,0x3c00000,0x3c0f0078,0xfffe,0x3e000,0x1e000,0x0,0x780000,0xf0180000,0xf000003c,
  3321. - 0xfcf80007,0x8000003c,0x7f,0x0,0x70001c,0x0,0xf81f00,0x0,0x38,0xe0000,0x0,0x0,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf81,
  3322. - 0xf0000039,0xc0000000,0xe0000e70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,0x8000f000,0x78000,
  3323. - 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f007,0xbc03c001,0xe01e000f,0xf00078,0x78003c0,
  3324. - 0x3c001e00,0xf801f00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07,0x8003e03c,
  3325. - 0x1f01e0,0xf80f00,0x7c1e01e,0x7800,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00,
  3326. - 0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xe00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef8,0x1f000f,
  3327. - 0x7be00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3328. - 0x0,0x0,0xf,0x3c00000,0x307c0003,0x8038f000,0xfc000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e00003c,0x780,0xf00001e,
  3329. - 0x7e00,0xf,0x80000780,0x3c0,0x3e001e00,0x3c0001f,0x7c000,0x780007,0xe000003f,0x0,0xfe000000,0xfe0000,0x0,0x3c07c3f0,0xf0001e03,
  3330. - 0xc000f80f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x4000f80,0x3c003c00,0x7800001e,0xf078,0x1fe01f0,0x1f00780,
  3331. - 0x7c00,0x7c078001,0xf000001f,0xf000,0xf0003c0,0x1e78001,0xfc07f007,0xc00f8000,0x780000f8,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01,
  3332. - 0xf000f007,0xc00000f0,0xf80780,0x3c,0x1f003,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,
  3333. - 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78000,0xfe0fe001,0xf07c0001,0xef00007c,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,
  3334. - 0x7cfc000,0xfc00000,0x3c00000f,0xc3f00000,0x18,0x7fff,0xc0000000,0x406303,0x3e0,0x3c00001,0xf00f0000,0x7cfc000f,0x8000001f,
  3335. - 0x3f0000f9,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x780700f8,0x7cfc,0x7c000,0x1e000,0x0,0x780000,0xf8180000,
  3336. - 0xf0000070,0x3c0007,0x8000003c,0x3f,0x80000000,0x3c0078,0x0,0x780f00,0x0,0x1e,0x3c0000,0x0,0x0,0x0,0x0,0x0,0x3e007c0,0xe1c00,
  3337. - 0x0,0x0,0x0,0xf01,0xe0000071,0xc0000000,0xe0001c70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,
  3338. - 0x8000f800,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00f003,0xfc03e003,0xe01f001f,
  3339. - 0xf800f8,0x7c007c0,0x3e003e01,0xf000f80f,0xf00f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07,
  3340. - 0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0x7c00,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00,
  3341. - 0xf003c00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xc00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef0,
  3342. - 0x1f000f,0x7bc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3343. - 0x0,0x0,0x0,0x0,0x780000,0xf,0x3800040,0x30780003,0x8038f800,0x78000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078,
  3344. - 0x780,0x1f00001e,0xfc00,0x20001f,0x780,0x80007c0,0x1f001e00,0x7c0000f,0x78000,0xf80007,0xe000003f,0x0,0x1e000000,0xf00000,
  3345. - 0x3c000,0x3c03fff0,0xf0001e03,0xc001f007,0x800101e0,0x7e003c0,0x1e00,0x7800,0x781e0007,0x80007800,0x6000f00,0x3c003e00,0x7800001e,
  3346. - 0xf078,0x1fe00f0,0x1e00780,0x3c00,0x78078000,0xf020001e,0xf000,0x7800780,0xff0001,0xfc07f00f,0x8007c000,0x780001f0,0x3c,0xf,
  3347. - 0x1e0,0x0,0x0,0x0,0xf800fc01,0xf801f007,0xc00100f8,0x1f807c0,0x40003c,0xf807,0xf0078007,0x80003c00,0xf000,0x7803e00,0x1f0000f,
  3348. - 0x3c0f01e,0x1e01f0,0x3e007e0,0x7c07c00,0xfc003c00,0x1e,0x3e000,0x3e007c0,0x1ff8000,0xfe0fe003,0xe03e0001,0xff0000fc,0x1e,
  3349. - 0xf0,0x780,0x0,0x0,0x1f00080,0x3cf8000,0xfc00000,0x3c00001f,0x83f00000,0x18,0xc0,0x0,0xc06203,0x40003c0,0x1c00000,0xf80f0000,
  3350. - 0x3cf8001f,0xf,0x3e000079,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x700780fc,0x3cf8,0xfc000,0x1e000,0x0,0x780000,
  3351. - 0x7c180000,0xf0000020,0x100007,0x8000003c,0xf,0x80000000,0x1f01f0,0x0,0x380700,0x0,0xf,0x80f80000,0x0,0x0,0x0,0x0,0x0,0x3e007c0,
  3352. - 0xe1c00,0x0,0x0,0x0,0xe01,0xc0000071,0xc0000001,0xc0001c70,0x1e00040,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,
  3353. - 0x80007800,0x10078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00f003,0xfc01e003,0xc00f001e,
  3354. - 0x7800f0,0x3c00780,0x1e003c00,0xe000700f,0x800f0078,0x7803c0,0x3c01e00,0x1e00f000,0xf0000780,0x1e0000,0xf0003c,0x1f001f80,
  3355. - 0xf800fc07,0xc007e03e,0x3f01f0,0x1f80f80,0xfc1e01f,0x7c00,0x100f8000,0x807c0004,0x3e00020,0x1f000100,0x780000,0x3c00000,0x1e000000,
  3356. - 0xf0000f80,0x1f003c00,0x3c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00,0x1f8000f,0x801f003e,0x7c01f0,0x3e00f80,0x1f007c00,
  3357. - 0xf8001ff0,0x1f801f,0x7fc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3358. - 0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0xf,0x7800078,0x31f80001,0xc070fc00,0xfc000000,0x1e00,0x7c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078,
  3359. - 0x7c0,0x1f00001e,0x1f000,0x38003f,0x780,0xe000f80,0x1f803e00,0x780000f,0x800f8000,0x1f00007,0xe000003f,0x0,0x2000000,0x800000,
  3360. - 0x3c000,0x3e01ff71,0xf0001f03,0xc007f007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x781e0007,0x80007800,0x7801f00,0x3c001f00,0x7800001e,
  3361. - 0xf078,0xfe00f8,0x3e00780,0x3e00,0xf8078000,0xf838003e,0xf000,0x7c00f80,0xff0000,0xfc07e00f,0x8003c000,0x780001e0,0x3c,0xf,
  3362. - 0x1e0,0x0,0x0,0x0,0xf801fc01,0xfc03e003,0xe003007c,0x3f803e0,0x1c0003c,0xfc0f,0xf0078007,0x80003c00,0xf000,0x7801f00,0xf8000f,
  3363. - 0x3c0f01e,0x1e00f8,0x7c007f0,0xf803e01,0xfc003c00,0x8003e,0x1f000,0x1e00fc0,0xff0000,0xfe0fe007,0xc01f0000,0xfe0000f8,0x1e,
  3364. - 0xf0,0x780,0x0,0x0,0xf80180,0x1cf0000,0x1f800000,0x3c00001f,0x83e00000,0x18,0xc0,0x0,0xc06203,0x70007c0,0xe00000,0x7e0f0000,
  3365. - 0x1cf0001e,0x7,0x3c000039,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x7c00000,0xe00780fc,0x2001cf0,0xf8000,0x1e000,0x0,
  3366. - 0x780000,0x7e182000,0xf0000000,0x7,0x8000003c,0x7,0xc0000000,0x7ffc0,0x0,0x180300,0x0,0x3,0xffe00000,0x0,0x0,0x0,0x0,0x0,
  3367. - 0x3f00fc0,0xe1c00,0x0,0x0,0x0,0xc01,0x800000e1,0xc0000003,0xc0003870,0x1f001c0,0x3e0003e1,0xf0001f0f,0x8000f87c,0x7c3e0,0x3e1f00,
  3368. - 0x1f1e007,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e03,0xfc00f001,0xfc01f007,
  3369. - 0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x4000201f,0xc01f007c,0xf803e0,0x7c01f00,0x3e00f801,0xf0000780,0x1e0000,0xf0007c,
  3370. - 0x1f003f80,0xf801fc07,0xc00fe03e,0x7f01f0,0x3f80f80,0x1fc1f03f,0x803e00,0x3007c003,0x803e001c,0x1f000e0,0xf800700,0x780000,
  3371. - 0x3c00000,0x1e000000,0xf00007c0,0x3e003c00,0x3c01f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e001e,0xfc00f0,
  3372. - 0x7e00780,0x3f003c01,0xf8000fe0,0x1fc03e,0x3f800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3373. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f,0xfff00001,0xe0f07f03,0xfe000000,0xf00,0x7800,0x0,
  3374. - 0x1e0000,0xfc0000,0x0,0x7e0000f0,0x3f0,0x7e000fff,0xfc03ffff,0xf83f00fe,0x780,0xfc03f80,0xfc0fc00,0xf800007,0xe03f0018,0x7e00007,
  3375. - 0xe000003f,0x0,0x0,0x0,0x3c000,0x1e007c71,0xe0000f03,0xffffe003,0xf01f01ff,0xff8003ff,0xffe01e00,0x3f01,0xf81e0007,0x803ffff0,
  3376. - 0x7e03f00,0x3c000f00,0x7ffffe1e,0xf078,0xfe007e,0xfc00780,0x1f83,0xf0078000,0x783f00fe,0xf000,0x3f03f00,0xff0000,0xfc07e01f,
  3377. - 0x3e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7e07fc01,0xfe07e001,0xf80f007e,0x7f801f8,0xfc0003c,0x7ffe,0xf0078007,
  3378. - 0x807ffffe,0xf000,0x7801f00,0xfff00f,0x3c0f01e,0x1e00fc,0xfc007f8,0x1f803f03,0xfc003c00,0xf80fc,0x1fff0,0x1f83fc0,0xff0000,
  3379. - 0xfc07e007,0xc01f0000,0xfe0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfe0780,0xfe0000,0x1f000000,0x3c00001f,0x7c00e03,0x81c00018,
  3380. - 0xc0,0x0,0x406203,0x7e01fc0,0x700000,0x7fffff80,0xfe0003f,0xffffc003,0xf800001f,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f0,
  3381. - 0x1f800001,0xc007c1fe,0x6000fe0,0x1ffffe,0x1e000,0x0,0x780000,0x3f98e03f,0xffff8000,0x7,0x8000003c,0x7,0xc0000000,0xfe00,
  3382. - 0x0,0x80100,0x0,0x0,0x7f000000,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3f83fe8,0xe1c00,0x0,0x0,0x0,0x801,0xc1,0xc0000007,0x80003070,
  3383. - 0xfc0fc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc03f01,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,
  3384. - 0xffff001f,0xfff800ff,0xffc01fff,0xf800f001,0xfc00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800,0x1f,0xf07e003f,0x3f001f8,
  3385. - 0x1f800fc0,0xfc007e07,0xe0000780,0x1e0000,0xf301f8,0xfc0ff80,0x7e07fc03,0xf03fe01f,0x81ff00fc,0xff807e0,0x7fc0f87f,0x81801f80,
  3386. - 0xf003f01f,0x801f80fc,0xfc07e0,0x7e03f00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff807e0,0x7e003c00,0x3c01f81f,0x800fc0fc,0x7e07e0,
  3387. - 0x3f03f00,0x1f81f800,0x1f8000f,0xe07e001f,0x83fc00fc,0x1fe007e0,0xff003f07,0xf8000fe0,0x1fe07e,0x3f800,0x0,0x0,0x0,0x0,0x0,
  3388. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f,
  3389. - 0xffe00000,0xffe03fff,0xdf000000,0xf00,0x7800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0x1ff,0xfc000fff,0xfc03ffff,0xf83ffffc,0x780,
  3390. - 0xfffff00,0x7fff800,0xf000007,0xffff001f,0xffe00007,0xe000003f,0x0,0x0,0x0,0x3c000,0x1e000001,0xe0000f03,0xffffc001,0xffff01ff,
  3391. - 0xff0003ff,0xffe01e00,0x1fff,0xf81e0007,0x803ffff0,0x7fffe00,0x3c000f80,0x7ffffe1e,0xf078,0xfe003f,0xff800780,0xfff,0xf0078000,
  3392. - 0x7c3ffffc,0xf000,0x3ffff00,0xff0000,0xf803e01e,0x1e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7fffbc01,0xffffc000,
  3393. - 0xffff003f,0xfff800ff,0xffc0003c,0x3ffe,0xf0078007,0x807ffffe,0xf000,0x7800f80,0x7ff00f,0x3c0f01e,0x1e007f,0xff8007ff,0xff001fff,
  3394. - 0xbc003c00,0xffffc,0x1fff0,0x1fffbc0,0xff0000,0x7c07c00f,0x800f8000,0x7e0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7fff80,0x7c0000,
  3395. - 0x1f000000,0x3c00001e,0x7c00f07,0xc1e00018,0xc0,0x0,0x60e303,0x7ffff80,0x380000,0x3fffff80,0x7c0003f,0xffffc001,0xf000000f,
  3396. - 0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff800003,0x8003ffff,0xfe0007c0,0x1ffffe,0x1e000,0x0,0x780000,0x1fffe03f,0xffff8000,
  3397. - 0x7,0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3fffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x1c1,
  3398. - 0xc000000f,0x7070,0x7fffc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0,
  3399. - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000f001,0xfc007fff,0x3fff8,0x1fffc0,0xfffe00,0x7fff000,0x3b,0xfffc003f,
  3400. - 0xfff001ff,0xff800fff,0xfc007fff,0xe0000780,0x1e0000,0xf3fff8,0xffff780,0x7fffbc03,0xfffde01f,0xffef00ff,0xff7807ff,0xfbc0ffff,
  3401. - 0xff800fff,0xf001ffff,0x800ffffc,0x7fffe0,0x3ffff00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff803ff,0xfc003c00,0x3c00ffff,0x7fff8,
  3402. - 0x3fffc0,0x1fffe00,0xffff000,0x1f,0xfffc001f,0xffbc00ff,0xfde007ff,0xef003fff,0x780007e0,0x1ffffc,0x1f800,0x0,0x0,0x0,0x0,
  3403. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x700003f,
  3404. - 0xffc00000,0x7fc01fff,0x9f800000,0xf80,0xf800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0xff,0xf8000fff,0xfc03ffff,0xf83ffff8,0x780,
  3405. - 0xffffe00,0x7fff000,0xf000003,0xfffe001f,0xffc00007,0xe000003f,0x0,0x0,0x0,0x3c000,0xf000003,0xe0000f83,0xffff0000,0xffff01ff,
  3406. - 0xfc0003ff,0xffe01e00,0xfff,0xf01e0007,0x803ffff0,0x7fffc00,0x3c0007c0,0x7ffffe1e,0xf078,0x7e003f,0xff000780,0x7ff,0xe0078000,
  3407. - 0x3c3ffff8,0xf000,0x1fffe00,0x7e0000,0xf803e03e,0x1f000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x3fff3c01,0xefff8000,
  3408. - 0x7ffe001f,0xff78007f,0xff80003c,0x1ffc,0xf0078007,0x807ffffe,0xf000,0x78007c0,0x3ff00f,0x3c0f01e,0x1e003f,0xff0007bf,0xfe000fff,
  3409. - 0xbc003c00,0xffff8,0xfff0,0xfff3c0,0x7e0000,0x7c07c01f,0x7c000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3fff80,0x380000,
  3410. - 0x3e000000,0x7c00003e,0x7801f07,0xc1e00018,0xc0,0x0,0x39c1ce,0x7ffff00,0x1c0000,0xfffff80,0x380003f,0xffffc000,0xe0000007,
  3411. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff000007,0x1ffcf,0xfe000380,0x1ffffe,0x1e000,0x0,0x780000,0xfffe03f,0xffff8000,0x7,
  3412. - 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x381,
  3413. - 0xc000001e,0xe070,0x7fff80,0x7c0001f3,0xe0000f9f,0x7cf8,0x3e7c0,0x1f3e00,0xfbe007,0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0,
  3414. - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000f000,0xfc007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x79,0xfff8001f,
  3415. - 0xffe000ff,0xff0007ff,0xf8003fff,0xc0000780,0x1e0000,0xf3fff0,0x7ffe780,0x3fff3c01,0xfff9e00f,0xffcf007f,0xfe7803ff,0xf3c07ff3,
  3416. - 0xff8007ff,0xe000ffff,0x7fff8,0x3fffc0,0x1fffe00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff801ff,0xf8003c00,0x3c007ffe,0x3fff0,
  3417. - 0x1fff80,0xfffc00,0x7ffe000,0x1d,0xfff8000f,0xff3c007f,0xf9e003ff,0xcf001ffe,0x780007c0,0x1efff8,0x1f000,0x0,0x0,0x0,0x0,
  3418. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0xf000003,
  3419. - 0xfe000000,0x1f000fff,0xfc00000,0x780,0xf000,0x0,0x0,0xf80000,0x0,0x7e0001e0,0x7f,0xf0000fff,0xfc03ffff,0xf81ffff0,0x780,
  3420. - 0x7fff800,0x1ffe000,0x1f000000,0xfff8001f,0xff000007,0xe000003e,0x0,0x0,0x0,0x3c000,0xf800003,0xc0000783,0xfff80000,0x3ffe01ff,
  3421. - 0xe00003ff,0xffe01e00,0x7ff,0xc01e0007,0x803ffff0,0x3fff800,0x3c0003c0,0x7ffffe1e,0xf078,0x7e000f,0xfe000780,0x3ff,0xc0078000,
  3422. - 0x3e1fffe0,0xf000,0x7ff800,0x7e0000,0xf803e07c,0xf800,0x780003ff,0xfffc003c,0x3,0xc00001e0,0x0,0x0,0x0,0xffe3c01,0xe7ff0000,
  3423. - 0x3ffc000f,0xfe78003f,0xfe00003c,0x7f0,0xf0078007,0x807ffffe,0xf000,0x78003e0,0xff00f,0x3c0f01e,0x1e001f,0xfe00079f,0xfc0007ff,
  3424. - 0x3c003c00,0x7ffe0,0x1ff0,0x7fe3c0,0x7e0000,0x7c07c03e,0x3e000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfff00,0x100000,
  3425. - 0x3e000000,0x7800003c,0xf800f07,0xc1e00018,0xc0,0x0,0x1f80fc,0x3fffc00,0xc0000,0x3ffff80,0x100003f,0xffffc000,0x40000002,
  3426. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xfc000006,0xff87,0xfc000100,0x1ffffe,0x1e000,0x0,0x780000,0x3ffc03f,0xffff8000,0x7,
  3427. - 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dff9f8,0xe1c00,0x0,0x0,0x0,0x0,0x3ff,
  3428. - 0xf800003c,0xfffe,0x1ffe00,0x780000f3,0xc000079e,0x3cf0,0x1e780,0xf3c00,0x7bc007,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0,
  3429. - 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc,0xf000,0xfc001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x70,0xfff00007,
  3430. - 0xff80003f,0xfc0001ff,0xe0000fff,0x780,0x1e0000,0xf3ffe0,0x1ffc780,0xffe3c00,0x7ff1e003,0xff8f001f,0xfc7800ff,0xe3c03fe1,
  3431. - 0xff0003ff,0xc0007ffc,0x3ffe0,0x1fff00,0xfff800,0xfffffc07,0xffffe03f,0xffff01ff,0xfff800ff,0xf0003c00,0x3c003ffc,0x1ffe0,
  3432. - 0xfff00,0x7ff800,0x3ffc000,0x38,0xfff00007,0xfe3c003f,0xf1e001ff,0x8f000ffc,0x780007c0,0x1e7ff0,0x1f000,0x0,0x0,0x0,0x0,0x0,
  3433. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,
  3434. - 0x1fc,0x0,0x780,0xf000,0x0,0x0,0x1f80000,0x0,0x1e0,0x1f,0xc0000000,0x0,0x1ff80,0x0,0xffc000,0x7f8000,0x0,0x3fe00007,0xfc000000,
  3435. - 0x7e,0x0,0x0,0x0,0x0,0x7c00000,0x0,0x0,0xff00000,0x0,0x0,0xfe,0x0,0x0,0x3fc000,0x0,0x0,0x0,0x3,0xf8000000,0xff,0xc0000000,
  3436. - 0x1ff00,0x0,0x1fe000,0x0,0x0,0x0,0x0,0x3c,0x3,0xc00001e0,0x0,0x0,0x0,0x3f80000,0x1fc0000,0x7f00003,0xf8000007,0xf0000000,
  3437. - 0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x7,0xf8000787,0xf00001fc,0x3c000000,0x7f80,0x0,0x1f8000,0x0,0x0,0x0,0x7c000000,0x1e,
  3438. - 0xf0,0x780,0x0,0x0,0x3fc00,0x0,0x3c000000,0x7800003c,0xf000601,0xc00018,0xc0,0x0,0x0,0x3fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3439. - 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xf0000000,0x7e03,0xf0000000,0x0,0x0,0x0,0x0,0xfe0000,0x0,0x0,0x3c,0x2007,0x80000000,0x0,0x0,
  3440. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c7e0f0,0xe1c00,0x0,0x3800000,0x0,0x0,0x3ff,0xf8000078,0xfffe,0x7f800,0x0,0x0,0x0,0x0,
  3441. - 0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000,0x7f0000,0x70,0x3fc00001,0xfe00000f,0xf000007f,
  3442. - 0x800003fc,0x0,0x0,0xff00,0x7f0000,0x3f80000,0x1fc00000,0xfe000007,0xf000003f,0x80001f80,0xfc00007f,0xfe0,0x7f00,0x3f800,
  3443. - 0x1fc000,0x0,0x0,0x0,0x3f,0xc0000000,0xff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x78,0x3fc00001,0xf800000f,0xc000007e,0x3f0,0x7c0,
  3444. - 0x1e1fc0,0x1f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3445. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3446. - 0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xe0000000,0x0,0x0,0x0,
  3447. - 0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,
  3448. - 0x0,0x0,0x0,0x0,0x0,0x0,0x78000000,0x1e,0xf0,0x780,0x0,0x0,0x0,0x0,0x3c000000,0x78000078,0xf000000,0x18,0xc0,0x0,0x0,0x0,
  3449. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3c0f,0x80000000,
  3450. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0x1800000,0x0,0x0,0x3ff,0xf80000f0,0xfffe,0x0,0x0,0x0,0x0,
  3451. - 0x0,0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3452. - 0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x780,0x1e0000,0x1e000,0x0,0x0,0x0,
  3453. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,
  3454. - 0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x1f80000,
  3455. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0,
  3456. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf8000000,
  3457. - 0x1f,0xf0,0xf80,0x0,0x0,0x0,0x0,0x78000000,0xf8000078,0x1e000000,0x8,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3458. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3459. - 0x0,0x3c00000,0xe1c00,0x0,0x1c00000,0x0,0x0,0x1,0xc00001e0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3460. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3461. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x1e0000,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3462. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x3c000,0x0,0x0,0x1f00000,
  3463. - 0x0,0x780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0xfe0100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3464. - 0x0,0x0,0x0,0x0,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0xf0007fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000,
  3465. - 0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x1f,0x800000f0,0x1f80,0x0,0x0,0x0,0x0,
  3466. - 0x78000000,0xf0000070,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3467. - 0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000,
  3468. - 0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3469. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3470. - 0x0,0x0,0x0,0xf00,0x1e0000,0x3c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3471. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x7c000,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3472. - 0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78000000,
  3473. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4003,0xe0000000,0x0,0x1f000,0x0,0x0,
  3474. - 0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x1,0xf0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0x70000001,0xf00000e0,
  3475. - 0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,
  3476. - 0x0,0x0,0x3c,0xff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000,0x0,0x0,0x1,0xc00003ff,
  3477. - 0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3478. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00,0x1e0000,
  3479. - 0x7c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3480. - 0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0xf0,0x78000,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8,0x0,
  3481. - 0x0,0x0,0x0,0x1fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,
  3482. - 0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780f,0xc0000000,0x0,0x3e000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,
  3483. - 0x0,0x0,0x0,0x0,0x3,0xe0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0xf0000103,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3484. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,
  3485. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x21e00000,0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f,
  3486. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f,0x0,
  3487. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e00,0x1e0000,0xf8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3488. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,
  3489. - 0xf8,0xf8000,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x1fe00,0x0,0x0,0x0,0x0,
  3490. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,
  3491. - 0x0,0x0,0x7fff,0xc0000000,0x0,0x3ffe000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0xe0000000,0x7,0xfc0000f0,
  3492. - 0x3fe00,0x0,0x0,0x0,0x0,0x600001ff,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3493. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,
  3494. - 0x3fe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3495. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3496. - 0x0,0x0,0x0,0x0,0x7fe00,0x1e0000,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3497. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3498. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3499. - 0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff,0x80000000,0x0,0x3ffc000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,
  3500. - 0x0,0x0,0x0,0x0,0x7f,0xc0000000,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x0,0x0,0x1ff,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3501. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3502. - 0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3fc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0,
  3503. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0,0x0,
  3504. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fc00,0x1e0000,0x1ff0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3505. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3506. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3507. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x3ffe,0x0,0x0,0x3ff8000,0x0,0x0,0x0,
  3508. - 0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0x80000000,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x80000000,0x0,0x0,0x0,0x0,
  3509. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3510. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0,
  3511. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0,0x0,
  3512. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f800,0x1e0000,0x1fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3513. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3514. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3515. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8,0x0,0x0,0x3fe0000,
  3516. - 0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,
  3517. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3518. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3519. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3520. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x1e0000,0x1f80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3521. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3522. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3523. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3524. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3525. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3526. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3527. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3528. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3529. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3530. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3531. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,
  3532. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3533. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3534. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
  3535. - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 };
  3536. -
  3537. - // Definition of a 40x38 'danger' color logo
  3538. - const unsigned char logo40x38[4576] = {
  3539. - 177,200,200,200,3,123,123,0,36,200,200,200,1,123,123,0,2,255,255,0,1,189,189,189,1,0,0,0,34,200,200,200,
  3540. - 1,123,123,0,4,255,255,0,1,189,189,189,1,0,0,0,1,123,123,123,32,200,200,200,1,123,123,0,5,255,255,0,1,0,0,
  3541. - 0,2,123,123,123,30,200,200,200,1,123,123,0,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,29,200,200,200,
  3542. - 1,123,123,0,7,255,255,0,1,0,0,0,2,123,123,123,28,200,200,200,1,123,123,0,8,255,255,0,1,189,189,189,1,0,0,0,
  3543. - 2,123,123,123,27,200,200,200,1,123,123,0,9,255,255,0,1,0,0,0,2,123,123,123,26,200,200,200,1,123,123,0,10,255,
  3544. - 255,0,1,189,189,189,1,0,0,0,2,123,123,123,25,200,200,200,1,123,123,0,3,255,255,0,1,189,189,189,3,0,0,0,1,189,
  3545. - 189,189,3,255,255,0,1,0,0,0,2,123,123,123,24,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,3,255,255,0,1,189,
  3546. - 189,189,1,0,0,0,2,123,123,123,23,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,4,255,255,0,1,0,0,0,2,123,123,123,
  3547. - 22,200,200,200,1,123,123,0,5,255,255,0,5,0,0,0,4,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,21,200,200,200,
  3548. - 1,123,123,0,5,255,255,0,5,0,0,0,5,255,255,0,1,0,0,0,2,123,123,123,20,200,200,200,1,123,123,0,6,255,255,0,5,0,0,
  3549. - 0,5,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,19,200,200,200,1,123,123,0,6,255,255,0,1,123,123,0,3,0,0,0,1,
  3550. - 123,123,0,6,255,255,0,1,0,0,0,2,123,123,123,18,200,200,200,1,123,123,0,7,255,255,0,1,189,189,189,3,0,0,0,1,189,
  3551. - 189,189,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,17,200,200,200,1,123,123,0,8,255,255,0,3,0,0,0,8,255,255,
  3552. - 0,1,0,0,0,2,123,123,123,16,200,200,200,1,123,123,0,9,255,255,0,1,123,123,0,1,0,0,0,1,123,123,0,8,255,255,0,1,189,
  3553. - 189,189,1,0,0,0,2,123,123,123,15,200,200,200,1,123,123,0,9,255,255,0,1,189,189,189,1,0,0,0,1,189,189,189,9,255,255,
  3554. - 0,1,0,0,0,2,123,123,123,14,200,200,200,1,123,123,0,11,255,255,0,1,0,0,0,10,255,255,0,1,189,189,189,1,0,0,0,2,123,
  3555. - 123,123,13,200,200,200,1,123,123,0,23,255,255,0,1,0,0,0,2,123,123,123,12,200,200,200,1,123,123,0,11,255,255,0,1,189,
  3556. - 189,189,2,0,0,0,1,189,189,189,9,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,11,200,200,200,1,123,123,0,11,255,255,
  3557. - 0,4,0,0,0,10,255,255,0,1,0,0,0,2,123,123,123,10,200,200,200,1,123,123,0,12,255,255,0,4,0,0,0,10,255,255,0,1,189,189,
  3558. - 189,1,0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,12,255,255,0,1,189,189,189,2,0,0,0,1,189,189,189,11,255,255,0,1,
  3559. - 0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,27,255,255,0,1,0,0,0,3,123,123,123,8,200,200,200,1,123,123,0,26,255,
  3560. - 255,0,1,189,189,189,1,0,0,0,3,123,123,123,9,200,200,200,1,123,123,0,24,255,255,0,1,189,189,189,1,0,0,0,4,123,123,
  3561. - 123,10,200,200,200,1,123,123,0,24,0,0,0,5,123,123,123,12,200,200,200,27,123,123,123,14,200,200,200,25,123,123,123,86,
  3562. - 200,200,200,91,49,124,118,124,71,32,124,95,49,56,114,52,82,121,0};
  3563. -
  3564. - // Display a warning message if parameter 'cond' is true.
  3565. - inline void warn(const bool cond, const char *format,...) {
  3566. - if (cimg::exception_mode()>=1 && cond) {
  3567. - std::va_list ap;
  3568. - va_start(ap,format);
  3569. - std::fprintf(stderr,"\n<CImg Warning> ");
  3570. - std::vfprintf(stderr,format,ap);
  3571. - std::fputc('\n',stderr);
  3572. - va_end(ap);
  3573. - }
  3574. - }
  3575. -
  3576. - inline int xln(const int x) {
  3577. - return x>0?(int)(1+std::log10((double)x)):1;
  3578. - }
  3579. -
  3580. - inline char uncase(const char x) {
  3581. - return (char)((x<'A'||x>'Z')?x:x-'A'+'a');
  3582. - }
  3583. -
  3584. - inline float atof(const char *str) {
  3585. - float x=0,y=1;
  3586. - if (!str) return 0; else { std::sscanf(str,"%g/%g",&x,&y); return x/y; }
  3587. - }
  3588. -
  3589. - inline int strlen(const char *s) {
  3590. - if (s) { int k; for (k=0; s[k]; k++) ; return k; }
  3591. - return -1;
  3592. - }
  3593. -
  3594. - inline int strncmp(const char *s1,const char *s2,const int l) {
  3595. - if (s1 && s2) { int n=0; for (int k=0; k<l; k++) n+=std::abs(s1[k] - s2[k]); return n; }
  3596. - return 0;
  3597. - }
  3598. -
  3599. - inline int strncasecmp(const char *s1,const char *s2,const int l) {
  3600. - if (s1 && s2) { int n=0; for (int k=0; k<l; k++) n+=std::abs(uncase(s1[k])-uncase(s2[k])); return n; }
  3601. - return 0;
  3602. - }
  3603. -
  3604. - inline int strcmp(const char *s1,const char *s2) {
  3605. - const int l1 = cimg::strlen(s1), l2 = cimg::strlen(s2);
  3606. - return cimg::strncmp(s1,s2,1+(l1<l2?l1:l2));
  3607. - }
  3608. -
  3609. - inline int strcasecmp(const char *s1,const char *s2) {
  3610. - const int l1 = cimg::strlen(s1), l2 = cimg::strlen(s2);
  3611. - return cimg::strncasecmp(s1,s2,1+(l1<l2?l1:l2));
  3612. - }
  3613. -
  3614. - inline int strfind(const char *s,const char c) {
  3615. - if (s) {
  3616. - int l; for (l=cimg::strlen(s); l>=0 && s[l]!=c; l--) ;
  3617. - return l;
  3618. - }
  3619. - return -1;
  3620. - }
  3621. -
  3622. - inline const char* basename(const char *s) {
  3623. - return (cimg_OS!=2)?(s?s+1+cimg::strfind(s,'/'):0):(s?s+1+cimg::strfind(s,'\\'):0);
  3624. - }
  3625. -
  3626. - inline void system(const char *command, const char *module_name=0) {
  3627. -#if cimg_OS==2
  3628. - PROCESS_INFORMATION pi;
  3629. - STARTUPINFO si;
  3630. - std::memset(&pi, 0, sizeof(PROCESS_INFORMATION));
  3631. - std::memset(&si, 0, sizeof(STARTUPINFO));
  3632. - GetStartupInfo(&si);
  3633. - si.cb = sizeof(si);
  3634. - si.wShowWindow = SW_HIDE;
  3635. - si.dwFlags |= SW_HIDE;
  3636. - const BOOL res = CreateProcess((LPCTSTR)module_name,(LPTSTR)command,0,0,FALSE,0,0,0,&si,&pi);
  3637. - if (res) {
  3638. - WaitForSingleObject(pi.hProcess, INFINITE);
  3639. - CloseHandle(pi.hThread);
  3640. - CloseHandle(pi.hProcess);
  3641. - } else
  3642. -#endif
  3643. - std::system(command);
  3644. - command=module_name=0;
  3645. - }
  3646. -
  3647. - //! Return path of the ImageMagick's \c convert tool.
  3648. - /**
  3649. - If you have installed the <a href="http://www.imagemagick.org">ImageMagick package</a>
  3650. - in a standard directory, this function should return the correct path of the \c convert tool
  3651. - used by the %CImg Library to load and save compressed image formats.
  3652. - Conversely, if the \c convert executable is not auto-detected by the function,
  3653. - you can define the macro \c cimg_imagemagick_path with the correct path
  3654. - of the \c convert executable, before including <tt>CImg.h</tt> in your program :
  3655. - \code
  3656. - #define cimg_imagemagick_path "/users/thatsme/local/bin/convert"
  3657. - #include "CImg.h"
  3658. -
  3659. - int main() {
  3660. - CImg<> img("my_image.jpg"); // Read a JPEG image file.
  3661. - return 0;
  3662. - }
  3663. - \endcode
  3664. -
  3665. - Note that non compressed image formats can be read without installing ImageMagick.
  3666. -
  3667. - \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick().
  3668. - **/
  3669. - inline const char* imagemagick_path() {
  3670. - static char *st_imagemagick_path = 0;
  3671. - if (!st_imagemagick_path) {
  3672. - st_imagemagick_path = new char[1024];
  3673. - bool path_found = false;
  3674. - std::FILE *file = 0;
  3675. -#ifdef cimg_imagemagick_path
  3676. - std::strcpy(st_imagemagick_path,cimg_imagemagick_path);
  3677. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3678. -#endif
  3679. -#if cimg_OS==2
  3680. - if (!path_found) {
  3681. - std::sprintf(st_imagemagick_path,".\\convert.exe");
  3682. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3683. - }
  3684. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3685. - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\convert.exe",k);
  3686. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3687. - }}
  3688. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3689. - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\convert.exe",k);
  3690. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3691. - }}
  3692. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3693. - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
  3694. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3695. - }}
  3696. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3697. - std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
  3698. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3699. - }}
  3700. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3701. - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k);
  3702. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3703. - }}
  3704. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3705. - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k);
  3706. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3707. - }}
  3708. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3709. - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
  3710. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3711. - }}
  3712. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3713. - std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
  3714. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3715. - }}
  3716. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3717. - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\convert.exe",k);
  3718. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3719. - }}
  3720. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3721. - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\convert.exe",k);
  3722. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3723. - }}
  3724. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3725. - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
  3726. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3727. - }}
  3728. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3729. - std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
  3730. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3731. - }}
  3732. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3733. - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k);
  3734. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3735. - }}
  3736. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3737. - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k);
  3738. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3739. - }}
  3740. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3741. - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k);
  3742. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3743. - }}
  3744. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3745. - std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k);
  3746. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3747. - }}
  3748. - if (!path_found) std::strcpy(st_imagemagick_path,"convert.exe");
  3749. -#else
  3750. - if (!path_found) {
  3751. - std::sprintf(st_imagemagick_path,"./convert");
  3752. - if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3753. - }
  3754. - if (!path_found) std::strcpy(st_imagemagick_path,"convert");
  3755. -#endif
  3756. - }
  3757. - return st_imagemagick_path;
  3758. - }
  3759. -
  3760. - //! Return path of the GraphicsMagick's \c gm tool.
  3761. - /**
  3762. - If you have installed the <a href="http://www.graphicsmagick.org">GraphicsMagick package</a>
  3763. - in a standard directory, this function should return the correct path of the \c gm tool
  3764. - used by the %CImg Library to load and save compressed image formats.
  3765. - Conversely, if the \c gm executable is not auto-detected by the function,
  3766. - you can define the macro \c cimg_graphicsmagick_path with the correct path
  3767. - of the \c gm executable, before including <tt>CImg.h</tt> in your program :
  3768. - \code
  3769. - #define cimg_graphicsmagick_path "/users/thatsme/local/bin/gm"
  3770. - #include "CImg.h"
  3771. -
  3772. - int main() {
  3773. - CImg<> img("my_image.jpg"); // Read a JPEG image file.
  3774. - return 0;
  3775. - }
  3776. - \endcode
  3777. -
  3778. - Note that non compressed image formats can be read without installing ImageMagick.
  3779. -
  3780. - \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick().
  3781. - **/
  3782. - inline const char* graphicsmagick_path() {
  3783. - static char *st_graphicsmagick_path = 0;
  3784. - if (!st_graphicsmagick_path) {
  3785. - st_graphicsmagick_path = new char[1024];
  3786. - bool path_found = false;
  3787. - std::FILE *file = 0;
  3788. -#ifdef cimg_graphicsmagick_path
  3789. - std::strcpy(st_graphicsmagick_path,cimg_graphicsmagick_path);
  3790. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3791. -#endif
  3792. -#if cimg_OS==2
  3793. - if (!path_found) {
  3794. - std::sprintf(st_graphicsmagick_path,".\\gm.exe");
  3795. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3796. - }
  3797. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3798. - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\gm.exe",k);
  3799. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3800. - }}
  3801. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3802. - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\gm.exe",k);
  3803. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3804. - }}
  3805. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3806. - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
  3807. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3808. - }}
  3809. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3810. - std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
  3811. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3812. - }}
  3813. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3814. - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k);
  3815. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3816. - }}
  3817. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3818. - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k);
  3819. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3820. - }}
  3821. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3822. - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
  3823. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3824. - }}
  3825. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3826. - std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
  3827. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3828. - }}
  3829. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3830. - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\gm.exe",k);
  3831. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3832. - }}
  3833. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3834. - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\gm.exe",k);
  3835. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3836. - }}
  3837. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3838. - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
  3839. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3840. - }}
  3841. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3842. - std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
  3843. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3844. - }}
  3845. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3846. - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k);
  3847. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3848. - }}
  3849. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3850. - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k);
  3851. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3852. - }}
  3853. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3854. - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k);
  3855. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3856. - }}
  3857. - { for (unsigned int k=0; k<=9 && !path_found; k++) {
  3858. - std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k);
  3859. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3860. - }}
  3861. - if (!path_found) std::strcpy(st_graphicsmagick_path,"gm.exe");
  3862. -#else
  3863. - if (!path_found) {
  3864. - std::sprintf(st_graphicsmagick_path,"./gm");
  3865. - if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3866. - }
  3867. - if (!path_found) std::strcpy(st_graphicsmagick_path,"gm");
  3868. -#endif
  3869. - }
  3870. - return st_graphicsmagick_path;
  3871. - }
  3872. -
  3873. - //! Return path of the \c XMedcon tool.
  3874. - /**
  3875. - If you have installed the <a href="http://xmedcon.sourceforge.net/">XMedcon package</a>
  3876. - in a standard directory, this function should return the correct path of the \c medcon tool
  3877. - used by the %CIg Library to load DICOM image formats.
  3878. - Conversely, if the \c medcon executable is not auto-detected by the function,
  3879. - you can define the macro \c cimg_medcon_path with the correct path
  3880. - of the \c medcon executable, before including <tt>CImg.h</tt> in your program :
  3881. - \code
  3882. - #define cimg_medcon_path "/users/thatsme/local/bin/medcon"
  3883. - #include "CImg.h"
  3884. -
  3885. - int main() {
  3886. - CImg<> img("my_image.dcm"); // Read a DICOM image file.
  3887. - return 0;
  3888. - }
  3889. - \endcode
  3890. -
  3891. - Note that \c medcon is only needed if you want to read DICOM image formats.
  3892. -
  3893. - \sa temporary_path(), get_load_dicom(), load_dicom().
  3894. - **/
  3895. - inline const char* medcon_path() {
  3896. - static char *st_medcon_path = 0;
  3897. - if (!st_medcon_path) {
  3898. - st_medcon_path = new char[1024];
  3899. - bool path_found = false;
  3900. - std::FILE *file = 0;
  3901. -#ifdef cimg_medcon_path
  3902. - std::strcpy(st_medcon_path,cimg_medcon_path);
  3903. - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3904. -#endif
  3905. -#if cimg_OS==2
  3906. - if (!path_found) {
  3907. - std::sprintf(st_medcon_path,".\\medcon.bat");
  3908. - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3909. - }
  3910. - if (!path_found) {
  3911. - std::sprintf(st_medcon_path,"C:\\PROGRA~1\\XMedCon\\bin\\medcon.bat");
  3912. - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3913. - }
  3914. - if (!path_found) {
  3915. - std::sprintf(st_medcon_path,"D:\\PROGRA~1\\XMedCon\\bin\\medcon.bat");
  3916. - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3917. - }
  3918. - if (!path_found) std::strcpy(st_medcon_path,"medcon.bat");
  3919. -#else
  3920. - if (!path_found) {
  3921. - std::sprintf(st_medcon_path,"./medcon");
  3922. - if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; }
  3923. - }
  3924. - if (!path_found) std::strcpy(st_medcon_path,"medcon");
  3925. -#endif
  3926. - }
  3927. - return st_medcon_path;
  3928. - }
  3929. -
  3930. - //! Return path to store temporary files.
  3931. - /**
  3932. - If you are running on a standard Unix or Windows system, this function should return a correct path
  3933. - where temporary files can be stored. If such a path is not auto-detected by this function,
  3934. - you can define the macro \c cimg_temporary_path with a correct path, before including <tt>CImg.h</tt>
  3935. - in your program :
  3936. - \code
  3937. - #define cimg_temporary_path "/users/thatsme/tmp"
  3938. - #include "CImg.h"
  3939. -
  3940. - int main() {
  3941. - CImg<> img("my_image.jpg"); // Read a JPEG image file (using the defined temporay path).
  3942. - return 0;
  3943. - }
  3944. - \endcode
  3945. -
  3946. - A temporary path is necessary to load and save compressed image formats, using \c convert
  3947. - or \c medcon.
  3948. -
  3949. - \sa imagemagick_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick(), get_load_dicom(), load_dicom().
  3950. - **/
  3951. - inline const char* temporary_path() {
  3952. -
  3953. -#define cimg_test_temporary_path(p) \
  3954. - if (!path_found) { \
  3955. - std::sprintf(st_temporary_path,p); \
  3956. - std::sprintf(tmp,"%s%s%s",st_temporary_path,cimg_OS==2?"\\":"/",filetmp); \
  3957. - if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; } \
  3958. - }
  3959. -
  3960. - static char *st_temporary_path = 0;
  3961. - if (!st_temporary_path) {
  3962. - st_temporary_path = new char[1024];
  3963. - bool path_found = false;
  3964. - char tmp[1024], filetmp[512];
  3965. - std::FILE *file = 0;
  3966. - std::sprintf(filetmp,"CImg%.4d.tmp",std::rand()%10000);
  3967. -#ifdef cimg_temporary_path
  3968. - cimg_test_temporary_path(cimg_temporary_path);
  3969. -#endif
  3970. -#if cimg_OS==2
  3971. - cimg_test_temporary_path("C:\\WINNT\\Temp");
  3972. - cimg_test_temporary_path("C:\\WINDOWS\\Temp");
  3973. - cimg_test_temporary_path("C:\\Temp");
  3974. - cimg_test_temporary_path("C:");
  3975. - cimg_test_temporary_path("D:\\WINNT\\Temp");
  3976. - cimg_test_temporary_path("D:\\WINDOWS\\Temp");
  3977. - cimg_test_temporary_path("D:\\Temp");
  3978. - cimg_test_temporary_path("D:");
  3979. -#else
  3980. - cimg_test_temporary_path("/tmp");
  3981. - cimg_test_temporary_path("/var/tmp");
  3982. -#endif
  3983. - if (!path_found) {
  3984. - st_temporary_path[0]='\0';
  3985. - std::strcpy(tmp,filetmp);
  3986. - if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; }
  3987. - }
  3988. - if (!path_found)
  3989. - throw CImgIOException("cimg::temporary_path() : Unable to find a temporary path accessible for writing\n"
  3990. - "you have to set the macro 'cimg_temporary_path' to a valid path where you have writing access :\n"
  3991. - "#define cimg_temporary_path \"path\" (before including 'CImg.h')");
  3992. - }
  3993. - return st_temporary_path;
  3994. - }
  3995. -
  3996. - inline const char *filename_split(const char *const filename, char *const body=0) {
  3997. - if (!filename) { if (body) body[0]='\0'; return 0; }
  3998. - int l = cimg::strfind(filename,'.');
  3999. - if (l>=0) { if (body) { std::strncpy(body,filename,l); body[l]='\0'; }}
  4000. - else { if (body) std::strcpy(body,filename); l=(int)std::strlen(filename)-1; }
  4001. - return filename+l+1;
  4002. - }
  4003. -
  4004. - inline char* filename_number(const char *const filename, const int number, const unsigned int n, char *const string) {
  4005. - if (!filename) { if (string) string[0]='\0'; return 0; }
  4006. - char format[1024],body[1024];
  4007. - const char *ext = cimg::filename_split(filename,body);
  4008. - if (n>0) std::sprintf(format,"%s_%%.%ud.%s",body,n,ext);
  4009. - else std::sprintf(format,"%s_%%d.%s",body,ext);
  4010. - std::sprintf(string,format,number);
  4011. - return string;
  4012. - }
  4013. -
  4014. - inline std::FILE *fopen(const char *const path,const char *const mode) {
  4015. - if(!path || !mode)
  4016. - throw CImgArgumentException("cimg::fopen() : File '%s' cannot be opened with mode '%s'.",
  4017. - path?path:"(null)",mode?mode:"(null)");
  4018. - if (path[0]=='-') return (mode[0]=='r')?stdin:stdout;
  4019. - std::FILE *dest = std::fopen(path,mode);
  4020. - if (!dest)
  4021. - throw CImgIOException("cimg::fopen() : File '%s' cannot be opened%s",
  4022. - path,mode[0]=='r'?" for reading.":(mode[0]=='w'?" for writing.":"."),path);
  4023. - return dest;
  4024. - }
  4025. -
  4026. - inline int fclose(std::FILE *file) {
  4027. - warn(!file,"cimg::fclose() : Can't close (null) file");
  4028. - if (!file || file==stdin || file==stdout) return 0;
  4029. - const int errn=std::fclose(file);
  4030. - warn(errn!=0,"cimg::fclose() : Error %d during file closing",errn);
  4031. - return errn;
  4032. - }
  4033. -
  4034. - template<typename T> inline int fread(T *const ptr, const unsigned int nmemb, std::FILE *stream) {
  4035. - if (!ptr || nmemb<=0 || !stream)
  4036. - throw CImgArgumentException("cimg::fread() : Can't read %u x %u bytes of file pointer '%p' in buffer '%p'",
  4037. - nmemb,sizeof(T),stream,ptr);
  4038. - const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T);
  4039. - unsigned int toread=nmemb, alread=0, ltoread=0, lalread=0;
  4040. - do {
  4041. - ltoread = (toread*sizeof(T))<wlimitT?toread:wlimit;
  4042. - lalread = (unsigned int)std::fread((void*)(ptr+alread),sizeof(T),ltoread,stream);
  4043. - alread+=lalread;
  4044. - toread-=lalread;
  4045. - } while (ltoread==lalread && toread>0);
  4046. - cimg::warn(toread>0,"cimg::fread() : File reading problems, only %u/%u elements read",alread,nmemb);
  4047. - return alread;
  4048. - }
  4049. -
  4050. - template<typename T> inline int fwrite(const T *ptr, const unsigned int nmemb, std::FILE *stream) {
  4051. - if (!ptr || !stream)
  4052. - throw CImgArgumentException("cimg::fwrite() : Can't write %u x %u bytes of file pointer '%p' from buffer '%p'",
  4053. - nmemb,sizeof(T),stream,ptr);
  4054. - if (nmemb<=0) return 0;
  4055. - const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T);
  4056. - unsigned int towrite=nmemb, alwrite=0, ltowrite=0, lalwrite=0;
  4057. - do {
  4058. - ltowrite = (towrite*sizeof(T))<wlimitT?towrite:wlimit;
  4059. - lalwrite = (unsigned int)std::fwrite((void*)(ptr+alwrite),sizeof(T),ltowrite,stream);
  4060. - alwrite+=lalwrite;
  4061. - towrite-=lalwrite;
  4062. - } while (ltowrite==lalwrite && towrite>0);
  4063. - cimg::warn(towrite>0,"cimg::fwrite() : File writing problems, only %u/%u elements written",alwrite,nmemb);
  4064. - return alwrite;
  4065. - }
  4066. -
  4067. - // Exchange the values of variables \p a and \p b
  4068. - template<typename T> inline void swap(T& a,T& b) { T t=a; a=b; b=t; }
  4069. - template<typename T1,typename T2> inline void swap(T1& a1,T1& b1,T2& a2,T2& b2) {
  4070. - cimg::swap(a1,b1); cimg::swap(a2,b2);
  4071. - }
  4072. - template<typename T1,typename T2,typename T3> inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3) {
  4073. - cimg::swap(a1,b1,a2,b2); cimg::swap(a3,b3);
  4074. - }
  4075. - template<typename T1,typename T2,typename T3,typename T4>
  4076. - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4) {
  4077. - cimg::swap(a1,b1,a2,b2,a3,b3); cimg::swap(a4,b4);
  4078. - }
  4079. - template<typename T1,typename T2,typename T3,typename T4,typename T5>
  4080. - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5) {
  4081. - cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4); cimg::swap(a5,b5);
  4082. - }
  4083. - template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
  4084. - inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5,T6& a6,T6& b6) {
  4085. - cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5); cimg::swap(a6,b6);
  4086. - }
  4087. -
  4088. - template<typename T> inline void endian_swap(T* const buffer, const unsigned int size) {
  4089. - switch (sizeof(T)) {
  4090. - case 1: break;
  4091. - case 2: {
  4092. - for (unsigned short *ptr = (unsigned short*)buffer+size; ptr>(unsigned short*)buffer;) {
  4093. - const unsigned short val = *(--ptr);
  4094. - *ptr = (val>>8)|((val<<8));
  4095. - }
  4096. - } break;
  4097. - case 4: {
  4098. - for (unsigned int *ptr = (unsigned int*)buffer+size; ptr>(unsigned int*)buffer;) {
  4099. - const unsigned int val = *(--ptr);
  4100. - *ptr = (val>>24)|((val>>8)&0xff00)|((val<<8)&0xff0000)|(val<<24);
  4101. - }
  4102. - } break;
  4103. - default: {
  4104. - for (T* ptr = buffer+size; ptr>buffer; --ptr) {
  4105. - unsigned char *pb=(unsigned char*)(--ptr), *pe=pb+sizeof(T);
  4106. - for (int i=0; i<(int)sizeof(T)/2; i++) cimg::swap(*(pb++),*(--pe));
  4107. - } break;
  4108. - }
  4109. - }
  4110. - }
  4111. - template<typename T> inline T& endian_swap(T& a) { endian_swap(&a,1); return a; }
  4112. -
  4113. - inline const char* option(const char *const name, const int argc, char **argv,
  4114. - const char *defaut, const char *const usage=0) {
  4115. - static bool first=true, visu=false;
  4116. - const char *res = 0;
  4117. - if (first) {
  4118. - first=false;
  4119. - visu = (cimg::option("-h",argc,argv,(char*)0)!=0);
  4120. - visu |= (cimg::option("-help",argc,argv,(char*)0)!=0);
  4121. - visu |= (cimg::option("--help",argc,argv,(char*)0)!=0);
  4122. - }
  4123. - if (!name && visu) {
  4124. - if (usage) {
  4125. - std::fprintf(stderr,"\n %s%s%s",cimg::t_red,cimg::basename(argv[0]),cimg::t_normal);
  4126. - std::fprintf(stderr," : %s",usage);
  4127. - std::fprintf(stderr," (%s, %s)\n\n",__DATE__,__TIME__);
  4128. - }
  4129. - if (defaut) std::fprintf(stderr,"%s\n",defaut);
  4130. - }
  4131. - if (name) {
  4132. - if (argc>0) {
  4133. - int k=0;
  4134. - while (k<argc && cimg::strcmp(argv[k],name)) k++;
  4135. - res=(k++==argc?defaut:(k==argc?argv[--k]:argv[k]));
  4136. - } else res = defaut;
  4137. - if (visu && usage) std::fprintf(stderr," %s%-8s%s = %-12s : %s%s%s\n",
  4138. - cimg::t_bold,name,cimg::t_normal,res?res:"0",cimg::t_purple,usage,cimg::t_normal);
  4139. - }
  4140. - return res;
  4141. - }
  4142. -
  4143. - inline bool option(const char *const name, const int argc, char **argv,
  4144. - const bool defaut, const char *const usage=0) {
  4145. - const char *s = cimg::option(name,argc,argv,(char*)0);
  4146. - const bool res = s?(cimg::strcasecmp(s,"false") && cimg::strcasecmp(s,"off") && cimg::strcasecmp(s,"0")):defaut;
  4147. - cimg::option(name,0,0,res?"true":"false",usage);
  4148. - return res;
  4149. - }
  4150. -
  4151. - inline int option(const char *const name, const int argc, char **argv,
  4152. - const int defaut, const char *const usage=0) {
  4153. - const char *s = cimg::option(name,argc,argv,(char*)0);
  4154. - const int res = s?std::atoi(s):defaut;
  4155. - char tmp[256];
  4156. - std::sprintf(tmp,"%d",res);
  4157. - cimg::option(name,0,0,tmp,usage);
  4158. - return res;
  4159. - }
  4160. -
  4161. - inline char option(const char *const name, const int argc, char **argv,
  4162. - const char defaut, const char *const usage=0) {
  4163. - const char *s = cimg::option(name,argc,argv,(char*)0);
  4164. - const char res = s?s[0]:defaut;
  4165. - char tmp[8];
  4166. - tmp[0] = res;
  4167. - tmp[1] ='\0';
  4168. - cimg::option(name,0,0,tmp,usage);
  4169. - return res;
  4170. - }
  4171. -
  4172. - inline float option(const char *const name, const int argc, char **argv,
  4173. - const float defaut, const char *const usage=0) {
  4174. - const char *s = cimg::option(name,argc,argv,(char*)0);
  4175. - const float res = s?cimg::atof(s):defaut;
  4176. - char tmp[256];
  4177. - std::sprintf(tmp,"%g",res);
  4178. - cimg::option(name,0,0,tmp,usage);
  4179. - return res;
  4180. - }
  4181. -
  4182. - inline double option(const char *const name, const int argc, char **argv,
  4183. - const double defaut, const char *const usage=0) {
  4184. - const char *s = cimg::option(name,argc,argv,(char*)0);
  4185. - const double res = s?cimg::atof(s):defaut;
  4186. - char tmp[256];
  4187. - std::sprintf(tmp,"%g",res);
  4188. - cimg::option(name,0,0,tmp,usage);
  4189. - return res;
  4190. - }
  4191. -
  4192. - //! Return \c false for little endian CPUs (Intel), \c true for big endian CPUs (Motorola).
  4193. - inline bool endian() {
  4194. - const int x=1;
  4195. - return ((unsigned char*)&x)[0]?false:true;
  4196. - }
  4197. -
  4198. - //! Print informations about %CImg environement variables.
  4199. - /**
  4200. - Printing is done on the standart error output.
  4201. - **/
  4202. - inline void info() {
  4203. - char tmp[1024] = {0};
  4204. - std::fprintf(stderr,"\n %sCImg Library %g%s, compiled %s ( %s ) with the following flags :\n\n",
  4205. - cimg::t_red,cimg_version,cimg::t_normal,__DATE__,__TIME__);
  4206. -
  4207. - std::fprintf(stderr," > CPU endianness : %s%s Endian%s\n",
  4208. - cimg::t_bold,
  4209. - cimg::endian()?"Big":"Little",
  4210. - cimg::t_normal);
  4211. -
  4212. - std::fprintf(stderr," > Operating System : %s%-13s%s %s('cimg_OS'=%d)%s\n",
  4213. - cimg::t_bold,
  4214. - cimg_OS==1?"Unix":(cimg_OS==2?"Windows":"Unknow"),
  4215. - cimg::t_normal,cimg::t_purple,
  4216. - cimg_OS,
  4217. - cimg::t_normal);
  4218. -
  4219. -#ifdef cimg_use_visualcpp6
  4220. - std::fprintf(stderr," > Using Visual C++ 6.0 : %s%-13s%s %s('cimg_use_visual_cpp6' defined)%s\n",
  4221. - cimg::t_bold,"Yes",cimg::t_normal,cimg::t_purple,cimg::t_normal);
  4222. -#endif
  4223. -
  4224. - std::fprintf(stderr," > Display type : %s%-13s%s %s('cimg_display_type'=%d)%s\n",
  4225. - cimg::t_bold,
  4226. - cimg_display_type==0?"No display":(cimg_display_type==1?"X11":(cimg_display_type==2?"Windows GDI":"Unknow")),
  4227. - cimg::t_normal,cimg::t_purple,
  4228. - cimg_display_type,
  4229. - cimg::t_normal);
  4230. -
  4231. - std::fprintf(stderr," > Color terminal : %s%-13s%s %s('cimg_color_terminal' %s)%s\n",
  4232. - cimg::t_bold,
  4233. -#ifdef cimg_color_terminal
  4234. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4235. -#else
  4236. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4237. -#endif
  4238. - cimg::t_normal);
  4239. -
  4240. - std::fprintf(stderr," > Debug messages : %s%-13s%s %s('cimg_debug'=%d)%s\n",
  4241. - cimg::t_bold,
  4242. - cimg_debug==0?"No":(cimg_debug==1 || cimg_debug==2?"Yes":(cimg_debug==3?"Yes+":"Unknown")),
  4243. - cimg::t_normal,cimg::t_purple,
  4244. - cimg_debug,
  4245. - cimg::t_normal);
  4246. -
  4247. -#if cimg_display_type==1
  4248. - std::fprintf(stderr," > Using XShm for X11 : %s%-13s%s %s('cimg_use_xshm' %s)%s\n",
  4249. - cimg::t_bold,
  4250. -#ifdef cimg_use_xshm
  4251. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4252. -#else
  4253. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4254. -#endif
  4255. - cimg::t_normal);
  4256. -
  4257. - std::fprintf(stderr," > Using XRand for X11 : %s%-13s%s %s('cimg_use_xrandr' %s)%s\n",
  4258. - cimg::t_bold,
  4259. -#ifdef cimg_use_xrandr
  4260. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4261. -#else
  4262. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4263. -#endif
  4264. - cimg::t_normal);
  4265. -#endif
  4266. -
  4267. - std::fprintf(stderr," > Using PNG library : %s%-13s%s %s('cimg_use_png' %s)%s\n",
  4268. - cimg::t_bold,
  4269. -#ifdef cimg_use_png
  4270. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4271. -#else
  4272. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4273. -#endif
  4274. - cimg::t_normal);
  4275. - std::fprintf(stderr," > Using JPEG library : %s%-13s%s %s('cimg_use_jpeg' %s)%s\n",
  4276. - cimg::t_bold,
  4277. -#ifdef cimg_use_jpeg
  4278. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4279. -#else
  4280. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4281. -#endif
  4282. - cimg::t_normal);
  4283. -
  4284. - std::fprintf(stderr," > Using TIFF library : %s%-13s%s %s('cimg_use_tiff' %s)%s\n",
  4285. - cimg::t_bold,
  4286. -#ifdef cimg_use_tiff
  4287. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4288. -#else
  4289. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4290. -#endif
  4291. - cimg::t_normal);
  4292. -
  4293. - std::fprintf(stderr," > Using Magick++ library : %s%-13s%s %s('cimg_use_magick' %s)%s\n",
  4294. - cimg::t_bold,
  4295. -#ifdef cimg_use_magick
  4296. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4297. -#else
  4298. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4299. -#endif
  4300. - cimg::t_normal);
  4301. -
  4302. - std::fprintf(stderr," > Using FFTW3 library : %s%-13s%s %s('cimg_use_fftw3' %s)%s\n",
  4303. - cimg::t_bold,
  4304. -#ifdef cimg_use_fftw3
  4305. - "Yes",cimg::t_normal,cimg::t_purple,"defined",
  4306. -#else
  4307. - "No",cimg::t_normal,cimg::t_purple,"undefined",
  4308. -#endif
  4309. - cimg::t_normal);
  4310. -
  4311. - std::sprintf(tmp,"\"%.1020s\"",cimg::imagemagick_path());
  4312. - std::fprintf(stderr," > Path of ImageMagick : %s%-13s%s %s('cimg_imagemagick_path'%s)%s\n",
  4313. - cimg::t_bold,
  4314. - tmp,
  4315. - cimg::t_normal,
  4316. -#ifdef cimg_imagemagick_path
  4317. - cimg::t_purple,"=\""cimg_imagemagick_path"\"",
  4318. -#else
  4319. - cimg::t_purple," undefined",
  4320. -#endif
  4321. - cimg::t_normal);
  4322. -
  4323. - std::sprintf(tmp,"\"%.1020s\"",cimg::graphicsmagick_path());
  4324. - std::fprintf(stderr," > Path of GraphicsMagick : %s%-13s%s %s('cimg_graphicsmagick_path'%s)%s\n",
  4325. - cimg::t_bold,
  4326. - tmp,
  4327. - cimg::t_normal,
  4328. -#ifdef cimg_graphicsmagick_path
  4329. - cimg::t_purple,"=\""cimg_graphicsmagick_path"\"",
  4330. -#else
  4331. - cimg::t_purple," undefined",
  4332. -#endif
  4333. - cimg::t_normal);
  4334. -
  4335. - std::sprintf(tmp,"\"%.1020s\"",cimg::medcon_path());
  4336. - std::fprintf(stderr," > Path of 'medcon' : %s%-13s%s %s('cimg_medcon_path'%s)%s\n",
  4337. - cimg::t_bold,
  4338. - tmp,
  4339. - cimg::t_normal,
  4340. -#ifdef cimg_medcon_path
  4341. - cimg::t_purple,"=\""cimg_medcon_path"\"",
  4342. -#else
  4343. - cimg::t_purple," undefined",
  4344. -#endif
  4345. - cimg::t_normal);
  4346. -
  4347. - std::sprintf(tmp,"\"%.1020s\"",cimg::temporary_path());
  4348. - std::fprintf(stderr," > Temporary path : %s%-13s%s %s('cimg_temporary_path'%s)%s\n",
  4349. - cimg::t_bold,
  4350. - tmp,
  4351. - cimg::t_normal,
  4352. -#ifdef cimg_temporary_path
  4353. - cimg::t_purple,"=\""cimg_temporary_path"\"",
  4354. -#else
  4355. - cimg::t_purple," undefined",
  4356. -#endif
  4357. - cimg::t_normal);
  4358. -
  4359. - std::fprintf(stderr,"\n");
  4360. - }
  4361. -
  4362. - //! Get the value of a system timer with a millisecond precision.
  4363. - inline unsigned long time() {
  4364. -#if cimg_OS==1
  4365. - struct timeval st_time;
  4366. - gettimeofday(&st_time,0);
  4367. - return (unsigned long)(st_time.tv_usec/1000 + st_time.tv_sec*1000);
  4368. -#elif cimg_OS==2
  4369. - static SYSTEMTIME st_time;
  4370. - GetSystemTime(&st_time);
  4371. - return (unsigned long)(st_time.wMilliseconds + 1000*(st_time.wSecond + 60*(st_time.wMinute + 60*st_time.wHour)));
  4372. -#else
  4373. - return 0;
  4374. -#endif
  4375. - }
  4376. -
  4377. - //! Sleep for a certain numbers of milliseconds.
  4378. - /**
  4379. - This function frees the CPU ressources during the sleeping time.
  4380. - It may be used to temporize your program properly, without wasting CPU time.
  4381. - \sa wait(), time().
  4382. - **/
  4383. - inline void sleep(const unsigned int milliseconds) {
  4384. -#if cimg_OS==1
  4385. - struct timespec tv;
  4386. - tv.tv_sec = milliseconds/1000;
  4387. - tv.tv_nsec = (milliseconds%1000)*1000000;
  4388. - nanosleep(&tv,0);
  4389. -#elif cimg_OS==2
  4390. - Sleep(milliseconds);
  4391. -#endif
  4392. - }
  4393. -
  4394. - inline unsigned int wait(const unsigned int milliseconds, unsigned long& timer) {
  4395. - if (!timer) timer = cimg::time();
  4396. - const unsigned long current_time = cimg::time();
  4397. - if (current_time>=timer+milliseconds) { timer = current_time; return 0; }
  4398. - const unsigned long time_diff = timer + milliseconds - current_time;
  4399. - timer = current_time + time_diff;
  4400. - cimg::sleep(time_diff);
  4401. - return (unsigned int)time_diff;
  4402. - }
  4403. -
  4404. - //! Wait for a certain number of milliseconds since the last call.
  4405. - /**
  4406. - This function is equivalent to sleep() but the waiting time is computed with regard to the last call
  4407. - of wait(). It may be used to temporize your program properly.
  4408. - \sa sleep(), time().
  4409. - **/
  4410. - inline unsigned int wait(const unsigned int milliseconds) {
  4411. - static unsigned long timer = 0;
  4412. - if (!timer) timer = cimg::time();
  4413. - return wait(milliseconds,timer);
  4414. - }
  4415. -
  4416. - template<typename T> inline const T rol(const T& a, const unsigned int n=1) {
  4417. - return (T)((a<<n)|(a>>((sizeof(T)<<3)-n)));
  4418. - }
  4419. -
  4420. - template<typename T> inline const T ror(const T& a, const unsigned int n=1) {
  4421. - return (T)((a>>n)|(a<<((sizeof(T)<<3)-n)));
  4422. - }
  4423. -
  4424. - //! Return the absolute value of \p a
  4425. - template<typename T> inline T abs(const T a) { return a>=0?a:-a; }
  4426. - inline bool abs(const bool a) { return a; }
  4427. - inline unsigned char abs(const unsigned char a) { return a; }
  4428. - inline unsigned short abs(const unsigned short a) { return a; }
  4429. - inline unsigned int abs(const unsigned int a) { return a; }
  4430. - inline unsigned long abs(const unsigned long a) { return a; }
  4431. - inline double abs(const double a) { return std::fabs(a); }
  4432. - inline float abs(const float a) { return (float)std::fabs((double)a); }
  4433. - inline int abs(const int a) { return std::abs(a); }
  4434. -
  4435. - //! Return the minimum between \p a and \p b.
  4436. - template<typename T> inline const T min(const T a,const T b) { return a<=b?a:b; }
  4437. -
  4438. - //! Return the minimum between \p a,\p b and \a c.
  4439. - template<typename T> inline const T min(const T a,const T b,const T c) { return cimg::min(cimg::min(a,b),c); }
  4440. -
  4441. - //! Return the minimum between \p a,\p b,\p c and \p d.
  4442. - template<typename T> inline const T min(const T a,const T b,const T c,const T d) { return cimg::min(cimg::min(a,b,c),d); }
  4443. -
  4444. - //! Return the maximum between \p a and \p b.
  4445. - template<typename T> inline const T max(const T a,const T b) { return a>=b?a:b; }
  4446. -
  4447. - //! Return the maximum between \p a,\p b and \p c.
  4448. - template<typename T> inline const T max(const T a,const T b,const T c) { return cimg::max(cimg::max(a,b),c); }
  4449. -
  4450. - //! Return the maximum between \p a,\p b,\p c and \p d.
  4451. - template<typename T> inline const T max(const T a,const T b,const T c,const T d) { return cimg::max(cimg::max(a,b,c),d); }
  4452. -
  4453. - //! Return the sign of \p x.
  4454. - template<typename T> inline T sign(const T x) { return (x<0)?(T)(-1):(x==0?(T)0:(T)1); }
  4455. -
  4456. - //! Return the nearest power of 2 higher than \p x.
  4457. - template<typename T> inline unsigned long nearest_pow2(const T& x) {
  4458. - unsigned long i=1;
  4459. - while (x>i) i<<=1;
  4460. - return i;
  4461. - }
  4462. -
  4463. - //! Return \p x modulo \p m (generic modulo).
  4464. - /**
  4465. - This modulo function accepts negative and floating-points modulo numbers \p m.
  4466. - **/
  4467. - inline double mod(const double x, const double m) { return x-m*std::floor(x/m); }
  4468. - inline float mod(const float x, const float m) { return (float)(x-m*std::floor((double)x/m)); }
  4469. - inline int mod(const int x, const int m) { return x>=0?x%m:(x%m?m+x%m:0); }
  4470. -
  4471. - //! Return minmod(\p a,\p b).
  4472. - /**
  4473. - The operator minmod(\p a,\p b) is defined to be :
  4474. - - minmod(\p a,\p b) = min(\p a,\p b), if (\p a * \p b)>0.
  4475. - - minmod(\p a,\p b) = 0, if (\p a * \p b)<=0
  4476. - **/
  4477. - template<typename T> inline T minmod(const T& a,const T& b) { return a*b<=0?0:(a>0?(a<b?a:b):(a<b?b:a)); }
  4478. -
  4479. - //! Return a random variable between [0,1], followin a uniform distribution.
  4480. - inline double rand() { return (double)std::rand()/RAND_MAX; }
  4481. -
  4482. - //! Return a random variable between [-1,1], following a uniform distribution.
  4483. - inline double crand() { return 1-2*cimg::rand(); }
  4484. -
  4485. - //! Return a random variable following a gaussian distribution and a standard deviation of 1.
  4486. - inline double grand() {
  4487. - return std::sqrt(-2*std::log((double)(1e-10 + (1-2e-10)*cimg::rand())))*std::cos((double)(2*PI*cimg::rand()));
  4488. - }
  4489. -
  4490. - inline double pythagore(double a, double b) {
  4491. - const double absa = cimg::abs(a), absb = cimg::abs(b);
  4492. - if (absa>absb) { const double tmp = absb/absa; return absa*std::sqrt(1.0+tmp*tmp); }
  4493. - else { const double tmp = absa/absb; return (absb==0?0:absb*std::sqrt(1.0+tmp*tmp)); }
  4494. - }
  4495. -
  4496. - // End of the 'cimg' namespace
  4497. - }
  4498. -
  4499. - /*
  4500. - #----------------------------------------
  4501. - #
  4502. - #
  4503. - #
  4504. - # Definition of the CImgStats structure
  4505. - #
  4506. - #
  4507. - #
  4508. - #----------------------------------------
  4509. - */
  4510. - //! Class used to compute basic statistics on pixel values of a \ref CImg image.
  4511. - /**
  4512. - Constructing a CImgStats instance from an image CImg<T> or a list CImgList<T>
  4513. - will compute the minimum, maximum and average pixel values of the input object.
  4514. - Optionally, the variance of the pixel values can be computed.
  4515. - Coordinates of the pixels whose values are minimum and maximum are also stored.
  4516. - The example below shows how to use CImgStats objects to retrieve simple statistics of an image :
  4517. - \code
  4518. - const CImg<float> img("my_image.jpg"); // Read JPEG image file.
  4519. - const CImgStats stats(img); // Compute basic statistics on the image.
  4520. - stats.print("My statistics"); // Display statistics.
  4521. - std::printf("Max-Min = %lf",stats.max-stats.min); // Compute the difference between extremum values.
  4522. - \endcode
  4523. -
  4524. - Note that statistics are computed by considering the set of \a scalar values of the image pixels.
  4525. - No vector-valued statistics are computed.
  4526. - **/
  4527. - struct CImgStats {
  4528. - double min; //!< Minimum of the pixel values.
  4529. - double max; //!< Maximum of the pixel values.
  4530. - double mean; //!< Mean of the pixel values.
  4531. - double variance; //!< Variance of the pixel values.
  4532. - int xmin; //!< X-coordinate of the pixel with minimum value.
  4533. - int ymin; //!< Y-coordinate of the pixel with minimum value.
  4534. - int zmin; //!< Z-coordinate of the pixel with minimum value.
  4535. - int vmin; //!< V-coordinate of the pixel with minimum value.
  4536. - int lmin; //!< Image number (for a list) containing the minimum pixel.
  4537. - int xmax; //!< X-coordinate of the pixel with maximum value.
  4538. - int ymax; //!< Y-coordinate of the pixel with maximum value.
  4539. - int zmax; //!< Z-coordinate of the pixel with maximum value.
  4540. - int vmax; //!< V-coordinate of the pixel with maximum value.
  4541. - int lmax; //!< Image number (for a list) containing the maximum pixel.
  4542. -
  4543. -#ifdef cimgstats_plugin
  4544. -#include cimgstats_plugin
  4545. -#endif
  4546. -
  4547. - //! Default constructor.
  4548. - CImgStats():min(0),max(0),mean(0),variance(0),xmin(-1),ymin(-1),zmin(-1),vmin(-1),lmin(-1),
  4549. - xmax(-1),ymax(-1),zmax(-1),vmax(-1),lmax(-1) {}
  4550. -
  4551. - //! In-place version of the default constructor
  4552. - CImgStats& assign() {
  4553. - min = max = mean = variance = 0;
  4554. - xmin = ymin = zmin = vmin = lmin = xmax = ymax = zmax = vmax = lmax = -1;
  4555. - return *this;
  4556. - }
  4557. -
  4558. - //! Copy constructor.
  4559. - CImgStats(const CImgStats& stats) {
  4560. - assign(stats);
  4561. - };
  4562. -
  4563. - //! In-place version of the copy constructor.
  4564. - CImgStats& assign(const CImgStats& stats) {
  4565. - min = stats.min;
  4566. - max = stats.max;
  4567. - mean = stats.mean;
  4568. - variance = stats.variance;
  4569. - xmin = stats.xmin; ymin = stats.ymin; zmin = stats.zmin; vmin = stats.vmin; lmin = stats.lmin;
  4570. - xmax = stats.xmax; ymax = stats.ymax; zmax = stats.zmax; vmax = stats.vmax; lmax = stats.lmax;
  4571. - return *this;
  4572. - }
  4573. -
  4574. - //! Constructor that computes statistics of an input image \p img.
  4575. - /**
  4576. - \param img The input image.
  4577. - \param compute_variance If true, the \c variance field is computed, else it is set to 0.
  4578. - **/
  4579. - template<typename T> CImgStats(const CImg<T>& img, const bool compute_variance=true) {
  4580. - assign(img,compute_variance);
  4581. - }
  4582. -
  4583. - //! In-place version of the previous constructor.
  4584. - template<typename T> CImgStats& assign(const CImg<T>& img, const bool compute_variance=true) {
  4585. - if (img.is_empty())
  4586. - throw CImgArgumentException("CImgStats::CImgStats() : Specified input image (%u,%u,%u,%u,%p) is empty.",
  4587. - img.width,img.height,img.depth,img.dim,img.data);
  4588. - mean = variance = 0;
  4589. - lmin = lmax = -1;
  4590. - T pmin=img[0], pmax=pmin, *ptrmin=img.data, *ptrmax=ptrmin;
  4591. - cimg_for(img,ptr,T) {
  4592. - const T& a=*ptr;
  4593. - mean+=(double)a;
  4594. - if (a<pmin) { pmin=a; ptrmin = ptr; }
  4595. - if (a>pmax) { pmax=a; ptrmax = ptr; }
  4596. - }
  4597. - mean/=img.size();
  4598. - min=(double)pmin;
  4599. - max=(double)pmax;
  4600. - unsigned long offmin = (unsigned long)(ptrmin-img.data), offmax = (unsigned long)(ptrmax-img.data);
  4601. - const unsigned long whz = img.width*img.height*img.depth, wh = img.width*img.height;
  4602. - vmin = offmin/whz; offmin%=whz; zmin = offmin/wh; offmin%=wh; ymin = offmin/img.width; xmin = offmin%img.width;
  4603. - vmax = offmax/whz; offmax%=whz; zmax = offmax/wh; offmax%=wh; ymax = offmax/img.width; xmax = offmax%img.width;
  4604. - if (compute_variance) {
  4605. - cimg_for(img,ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; }
  4606. - const unsigned int siz = img.size();
  4607. - if (siz>1) variance/=(siz-1); else variance=0;
  4608. - }
  4609. - return *this;
  4610. - }
  4611. -
  4612. - //! Constructor that computes statistics of an input image list \p list.
  4613. - /**
  4614. - \param list The input list of images.
  4615. - \param compute_variance If true, the \c variance field is computed, else it is set to 0.
  4616. - **/
  4617. - template<typename T> CImgStats(const CImgList<T>& list, const bool compute_variance=true) {
  4618. - assign(list,compute_variance);
  4619. - }
  4620. -
  4621. - //! In-place version of the previous constructor.
  4622. - template<typename T> CImgStats& assign(const CImgList<T>& list,const bool compute_variance=true) {
  4623. - if (list.is_empty())
  4624. - throw CImgArgumentException("CImgStats::CImgStats() : Specified input list (%u,%p) is empty.",
  4625. - list.size,list.data);
  4626. - mean = variance = lmin = lmax = 0;
  4627. - T pmin = list[0][0], pmax = pmin, *ptrmin = list[0].data, *ptrmax = ptrmin;
  4628. - int psize = 0;
  4629. - cimglist_for(list,l) {
  4630. - cimg_for(list[l],ptr,T) {
  4631. - const T& a=*ptr;
  4632. - mean+=(double)a;
  4633. - if (a<pmin) { pmin=a; ptrmin = ptr; lmin = l; }
  4634. - if (a>pmax) { pmax=a; ptrmax = ptr; lmax = l; }
  4635. - }
  4636. - psize+=list[l].size();
  4637. - }
  4638. - mean/=psize;
  4639. - min=(double)pmin;
  4640. - max=(double)pmax;
  4641. - const CImg<T> &imin = list[lmin], &imax = list[lmax];
  4642. - unsigned long offmin = (ptrmin-imin.data), offmax = (ptrmax-imax.data);
  4643. - const unsigned long whz1 = imin.width*imin.height*imin.depth, wh1 = imin.width*imin.height;
  4644. - vmin = offmin/whz1; offmin%=whz1; zmin = offmin/wh1; offmin%=wh1; ymin = offmin/imin.width; xmin = offmin%imin.width;
  4645. - const unsigned long whz2 = imax.width*imax.height*imax.depth, wh2 = imax.width*imax.height;
  4646. - vmax = offmax/whz2; offmax%=whz2; zmax = offmax/wh2; offmax%=wh2; ymax = offmax/imax.width; xmax = offmax%imax.width;
  4647. - if (compute_variance) {
  4648. - cimglist_for(list,l) cimg_for(list[l],ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; }
  4649. - if (psize>1) variance/=(psize-1); else variance=0;
  4650. - }
  4651. - return *this;
  4652. - }
  4653. -
  4654. - //! Assignement operator.
  4655. - CImgStats& operator=(const CImgStats& stats) {
  4656. - return assign(stats);
  4657. - }
  4658. -
  4659. - //! Return true if the current instance contains valid statistics
  4660. - bool is_empty() const {
  4661. - return (xmin>=0 && ymin>=0 && zmin>=0 && vmin>=0 && xmax>=0 && ymax>=0 && zmax>=0 && vmax>=0);
  4662. - }
  4663. -
  4664. - //! Print the current statistics.
  4665. - /**
  4666. - Printing is done on the standart error output.
  4667. - **/
  4668. - const CImgStats& print(const char* title=0) const {
  4669. - if (lmin>=0 && lmax>=0)
  4670. - std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, "
  4671. - "pmin=[%d](%d,%d,%d,%d), pmax=[%d](%d,%d,%d,%d) }\n",
  4672. - title?title:"CImgStats",(void*)this,min,mean,variance,max,
  4673. - lmin,xmin,ymin,zmin,vmin,lmax,xmax,ymax,zmax,vmax);
  4674. - else
  4675. - std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, "
  4676. - "pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d) }\n",
  4677. - title?title:"CImgStats",(void*)this,min,mean,variance,max,
  4678. - xmin,ymin,zmin,vmin,xmax,ymax,zmax,vmax);
  4679. - return *this;
  4680. - }
  4681. -
  4682. - };
  4683. -
  4684. - /*
  4685. - #-------------------------------------------
  4686. - #
  4687. - #
  4688. - #
  4689. - # Definition of the CImgDisplay structure
  4690. - #
  4691. - #
  4692. - #
  4693. - #-------------------------------------------
  4694. - */
  4695. -
  4696. - //! This class represents a window which can display \ref CImg images and handles mouse and keyboard events.
  4697. - /**
  4698. - Creating a \c CImgDisplay instance opens a window that can be used to display a \c CImg<T> image
  4699. - of a \c CImgList<T> image list inside. When a display is created, associated window events
  4700. - (such as mouse motion, keyboard and window size changes) are handled and can be easily
  4701. - detected by testing specific \c CImgDisplay data fields.
  4702. - See \ref cimg_displays for a complete tutorial on using the \c CImgDisplay class.
  4703. - **/
  4704. -
  4705. - struct CImgDisplay {
  4706. -
  4707. - //! Width of the display
  4708. - unsigned int width;
  4709. -
  4710. - //! Height of the display
  4711. - unsigned int height;
  4712. -
  4713. - //! Normalization type used for the display
  4714. - unsigned int normalization;
  4715. -
  4716. - //! Range of events detected by the display
  4717. - unsigned int events;
  4718. -
  4719. - //! Fullscreen state of the display
  4720. - bool is_fullscreen;
  4721. -
  4722. - //! Display title
  4723. - char* title;
  4724. -
  4725. - //! X-pos of the display on the screen
  4726. - volatile int window_x;
  4727. -
  4728. - //! Y-pos of the display on the screen
  4729. - volatile int window_y;
  4730. -
  4731. - //! Width of the underlying window
  4732. - volatile unsigned int window_width;
  4733. -
  4734. - //! Height of the underlying window
  4735. - volatile unsigned int window_height;
  4736. -
  4737. - //! X-coordinate of the mouse pointer on the display
  4738. - volatile int mouse_x;
  4739. -
  4740. - //! Y-coordinate of the mouse pointer on the display
  4741. - volatile int mouse_y;
  4742. -
  4743. - //! Button state of the mouse
  4744. - volatile unsigned int buttons[256];
  4745. - volatile unsigned int& button;
  4746. -
  4747. - //! Wheel state of the mouse
  4748. - volatile int wheel;
  4749. -
  4750. - //! Key value if pressed
  4751. - volatile unsigned int& key;
  4752. - volatile unsigned int keys[256];
  4753. -
  4754. - //! Key value if released
  4755. - volatile unsigned int& released_key;
  4756. - volatile unsigned int released_keys[256];
  4757. -
  4758. - //! Closed state of the window
  4759. - volatile bool is_closed;
  4760. -
  4761. - //! Resized state of the window
  4762. - volatile bool is_resized;
  4763. -
  4764. - //! Moved state of the window
  4765. - volatile bool is_moved;
  4766. -
  4767. - //! Event state of the window
  4768. - volatile bool is_event;
  4769. -
  4770. - float fps_fps, min, max;
  4771. - unsigned long timer, fps_frames, fps_timer;
  4772. -
  4773. -#ifdef cimgdisplay_plugin
  4774. -#include cimgdisplay_plugin
  4775. -#endif
  4776. -
  4777. - //! Create a display window with a specified size \p pwidth x \p height.
  4778. - /** \param dimw : Width of the display window.
  4779. - \param dimh : Height of the display window.
  4780. - \param title : Title of the display window.
  4781. - \param normalization_type : Normalization type of the display window (see CImgDisplay::normalize).
  4782. - \param events_type : Type of events handled by the display window.
  4783. - \param fullscreen_flag : Fullscreen mode.
  4784. - \param closed_flag : Initially visible mode.
  4785. - A black image will be initially displayed in the display window.
  4786. - **/
  4787. - CImgDisplay(const unsigned int dimw, const unsigned int dimh, const char *title=0,
  4788. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  4789. - const bool fullscreen_flag=false, const bool closed_flag=false):
  4790. - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
  4791. - window_x(0),window_y(0),window_width(0),window_height(0),
  4792. - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
  4793. - is_closed(true),is_resized(false),is_moved(false),is_event(false),
  4794. - min(0),max(0) {
  4795. - assign(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  4796. - }
  4797. -
  4798. - //! Create a display window from an image.
  4799. - /** \param img : Image that will be used to create the display window.
  4800. - \param title : Title of the display window
  4801. - \param normalization_type : Normalization type of the display window.
  4802. - \param events_type : Type of events handled by the display window.
  4803. - \param fullscreen_flag : Fullscreen mode.
  4804. - \param closed_flag : Initially visible mode.
  4805. - **/
  4806. - template<typename T>
  4807. - CImgDisplay(const CImg<T>& img, const char *title=0,
  4808. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  4809. - const bool fullscreen_flag=false, const bool closed_flag=false):
  4810. - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
  4811. - window_x(0),window_y(0),window_width(0),window_height(0),
  4812. - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
  4813. - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
  4814. - assign(img,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  4815. - }
  4816. -
  4817. - //! Create a display window from an image list.
  4818. - /** \param list : The list of images to display.
  4819. - \param title : Title of the display window
  4820. - \param normalization_type : Normalization type of the display window.
  4821. - \param events_type : Type of events handled by the display window.
  4822. - \param fullscreen_flag : Fullscreen mode.
  4823. - \param closed_flag : Initially visible mode.
  4824. - **/
  4825. - template<typename T>
  4826. - CImgDisplay(const CImgList<T>& list,const char *title=0,
  4827. - const unsigned int normalization_type=3,const unsigned int events_type=3,
  4828. - const bool fullscreen_flag=false,const bool closed_flag=false):
  4829. - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
  4830. - window_x(0),window_y(0),window_width(0),window_height(0),
  4831. - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
  4832. - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
  4833. - assign(list,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  4834. - }
  4835. -
  4836. - //! Create a display window by copying another one.
  4837. - /** \param win : Display window to copy.
  4838. - \param title : Title of the new display window.
  4839. - **/
  4840. - CImgDisplay(const CImgDisplay& disp):
  4841. - width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0),
  4842. - window_x(0),window_y(0),window_width(0),window_height(0),
  4843. - mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys),
  4844. - is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) {
  4845. - assign(disp);
  4846. - }
  4847. -
  4848. - //! Destructor
  4849. - ~CImgDisplay() {
  4850. - _assign();
  4851. - }
  4852. -
  4853. - //! Assignement operator
  4854. - CImgDisplay& operator=(const CImgDisplay& disp) {
  4855. - return assign(disp);
  4856. - }
  4857. -
  4858. - //! Return display width
  4859. - int dimx() const {
  4860. - return (int)width;
  4861. - }
  4862. -
  4863. - //! Return display height
  4864. - int dimy() const {
  4865. - return (int)height;
  4866. - }
  4867. -
  4868. - //! Return display window width
  4869. - int window_dimx() const {
  4870. - return (int)window_width;
  4871. - }
  4872. -
  4873. - //! Return display window height
  4874. - int window_dimy() const {
  4875. - return (int)window_height;
  4876. - }
  4877. -
  4878. - //! Return X-coordinate of the window
  4879. - int window_posx() const {
  4880. - return window_x;
  4881. - }
  4882. -
  4883. - //! Return Y-coordinate of the window
  4884. - int window_posy() const {
  4885. - return window_y;
  4886. - }
  4887. -
  4888. - //! Synchronized waiting function. Same as cimg::wait().
  4889. - /** \see cimg::wait()
  4890. - **/
  4891. - CImgDisplay& wait(const unsigned int milliseconds) {
  4892. - cimg::wait(milliseconds, timer);
  4893. - return *this;
  4894. - }
  4895. -
  4896. - //! Wait for an event occuring on the current display
  4897. - CImgDisplay& wait() {
  4898. - wait(*this);
  4899. - return *this;
  4900. - }
  4901. -
  4902. - //! Wait for any event occuring on the display \c disp1
  4903. - static void wait(CImgDisplay& disp1) {
  4904. - disp1.is_event = 0;
  4905. - while (!disp1.is_event) wait_all();
  4906. - }
  4907. -
  4908. - //! Wait for any event occuring either on the display \c disp1 or \c disp2
  4909. - static void wait(CImgDisplay& disp1, CImgDisplay& disp2) {
  4910. - disp1.is_event = disp2.is_event = 0;
  4911. - while (!disp1.is_event && !disp2.is_event) wait_all();
  4912. - }
  4913. -
  4914. - //! Wait for any event occuring either on the display \c disp1, \c disp2 or \c disp3
  4915. - static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3) {
  4916. - disp1.is_event = disp2.is_event = disp3.is_event = 0;
  4917. - while (!disp1.is_event && !disp2.is_event && !disp3.is_event) wait_all();
  4918. - }
  4919. -
  4920. - //! Wait for any event occuring either on the display \c disp1, \c disp2, \c disp3 or \c disp4
  4921. - static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3, CImgDisplay& disp4) {
  4922. - disp1.is_event = disp2.is_event = disp3.is_event = disp4.is_event = 0;
  4923. - while (!disp1.is_event && !disp2.is_event && !disp3.is_event && !disp4.is_event) wait_all();
  4924. - }
  4925. -
  4926. - //! Return the frame per second rate
  4927. - float frames_per_second() {
  4928. - if (!fps_timer) fps_timer = cimg::time();
  4929. - const float delta = (cimg::time()-fps_timer)/1000.0f;
  4930. - fps_frames++;
  4931. - if (delta>=1.0f) {
  4932. - fps_fps = fps_frames/delta;
  4933. - fps_frames = 0;
  4934. - fps_timer = cimg::time();
  4935. - }
  4936. - return fps_fps;
  4937. - }
  4938. -
  4939. - //! Display an image list CImgList<T> into a display window.
  4940. - /** First, all images of the list are appended into a single image used for visualization,
  4941. - then this image is displayed in the current display window.
  4942. - \param list : The list of images to display.
  4943. - \param axe : The axe used to append the image for visualization. Can be 'x' (default),'y','z' or 'v'.
  4944. - \param align : Defines the relative alignment of images when displaying images of different sizes.
  4945. - Can be '\p c' (centered, which is the default), '\p p' (top alignment) and '\p n' (bottom aligment).
  4946. -
  4947. - \see CImg::get_append()
  4948. - **/
  4949. - template<typename T> CImgDisplay& display(const CImgList<T>& list,const char axe='x',const char align='c') {
  4950. - return display(list.get_append(axe,align));
  4951. - }
  4952. -
  4953. - //! Display an image CImg<T> into a display window.
  4954. - template<typename T> CImgDisplay& operator<<(const CImg<T>& img) {
  4955. - return display(img);
  4956. - }
  4957. -
  4958. - //! Display an image CImg<T> into a display window.
  4959. - template<typename T> CImgDisplay& operator<<(const CImgList<T>& list) {
  4960. - return display(list);
  4961. - }
  4962. -
  4963. - //! Resize a display window with the size of an image.
  4964. - /** \param img : Input image. \p image.width and \p image.height give the new dimensions of the display window.
  4965. - \param redraw : If \p true (default), the current displayed image in the display window will
  4966. - be bloc-interpolated to fit the new dimensions. If \p false, a black image will be drawn in the resized window.
  4967. - \see CImgDisplay::is_resized, CImgDisplay::resizedimx(), CImgDisplay::resizedimy()
  4968. - **/
  4969. - template<typename T> CImgDisplay& resize(const CImg<T>& img, const bool redraw=true) {
  4970. - return resize(img.width,img.height,redraw);
  4971. - }
  4972. -
  4973. - //! Resize a display window using the size of the given display \p disp
  4974. - CImgDisplay& resize(const CImgDisplay& disp, const bool redraw=true) {
  4975. - return resize(disp.width,disp.height,redraw);
  4976. - }
  4977. -
  4978. - //! Resize a display window in its current size.
  4979. - CImgDisplay& resize(const bool redraw=true) {
  4980. - resize(window_width,window_height,redraw);
  4981. - return *this;
  4982. - }
  4983. -
  4984. - //! Display a 3d object
  4985. - template<typename tp, typename tf, typename T, typename to>
  4986. - CImgDisplay& display_object3d(const tp& points, const CImgList<tf>& primitives,
  4987. - const CImgList<T>& colors, const to& opacities,
  4988. - const bool centering=true,
  4989. - const int render_static=4, const int render_motion=1,
  4990. - const bool double_sided=false,
  4991. - const float focale=500.0f, const float ambiant_light=0.05f,
  4992. - const bool display_axes = true, float *const pose_matrix=0) {
  4993. - CImg<T>(width,height,1,3,0).display_object3d(points,primitives,colors,opacities,*this,
  4994. - centering,render_static,render_motion,
  4995. - double_sided,focale,ambiant_light,display_axes,pose_matrix);
  4996. - return *this;
  4997. - }
  4998. -
  4999. - //! Display a 3D object.
  5000. - template<typename tp, typename tf, typename T>
  5001. - CImgDisplay& display_object3d(const tp& points, const CImgList<tf>& primitives,
  5002. - const CImgList<T>& colors,
  5003. - const bool centering=true,
  5004. - const int render_static=4, const int render_motion=1,
  5005. - const bool double_sided=false,
  5006. - const float focale=500.0f, const float ambiant_light=0.05f,
  5007. - const float opacity=1.0f, const bool display_axes = true, float *const pose_matrix=0) {
  5008. - typedef typename cimg::largest<tp,float>::type to;
  5009. - CImg<T>(width,height,1,3,0).display_object3d(points,primitives,colors,
  5010. - CImg<to>(primitives.size)=(to)opacity,*this,
  5011. - centering,render_static,render_motion,
  5012. - double_sided,focale,ambiant_light,display_axes,pose_matrix);
  5013. - return *this;
  5014. - }
  5015. -
  5016. - //! Toggle fullscreen mode
  5017. - CImgDisplay& toggle_fullscreen() {
  5018. - return assign(width,height,title,normalization,events,!is_fullscreen,is_closed);
  5019. - }
  5020. -
  5021. - // Inner routine used for fast resizing of buffer to display size.
  5022. - template<typename t, typename T> static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
  5023. - t *ptrd, const unsigned int wd, const unsigned int hd) {
  5024. - unsigned int *const offx = new unsigned int[wd], *const offy = new unsigned int[hd+1], *poffx, *poffy;
  5025. - float s, curr, old;
  5026. - s = (float)ws/wd;
  5027. - poffx = offx; curr=0; for (unsigned int x=0; x<wd; x++) { old=curr; curr+=s; *(poffx++) = (unsigned int)curr-(unsigned int)old; }
  5028. - s = (float)hs/hd;
  5029. - poffy = offy; curr=0; for (unsigned int y=0; y<hd; y++) { old=curr; curr+=s; *(poffy++) = ws*((unsigned int)curr-(unsigned int)old); }
  5030. - *poffy=0;
  5031. - poffy = offy;
  5032. - {for (unsigned int y=0; y<hd; ) {
  5033. - const T *ptr = ptrs;
  5034. - poffx = offx;
  5035. - for (unsigned int x=0; x<wd; x++) { *(ptrd++)=*ptr; ptr+=*(poffx++); }
  5036. - y++;
  5037. - unsigned int dy=*(poffy++);
  5038. - for (;!dy && y<hd; std::memcpy(ptrd, ptrd-wd, sizeof(t)*wd), y++, ptrd+=wd, dy=*(poffy++));
  5039. - ptrs+=dy;
  5040. - }}
  5041. - delete[] offx; delete[] offy;
  5042. - }
  5043. -
  5044. - //! Test if a specific key is pressed
  5045. - bool is_pressed(const unsigned int key1) const {
  5046. - bool pressed = false;
  5047. - for (unsigned int i=0; i<256; ++i) {
  5048. - if (released_keys[i]==key1) { pressed = false; break; }
  5049. - if (keys[i]==key1) { pressed = true; break; }
  5050. - }
  5051. - return pressed;
  5052. - }
  5053. -
  5054. - //! Test if a key sequence has been typed
  5055. - bool is_typed(const unsigned int *const keyseq, const unsigned int N, const bool remove=true) {
  5056. - if (keyseq && N) {
  5057. - const unsigned int *const ps_end = keyseq+N-1, k = *ps_end, *const pk_end = (unsigned int*)keys+257-N;
  5058. - for (unsigned int *pk = (unsigned int*)keys; pk<pk_end; ) {
  5059. - if (*(pk++)==k) {
  5060. - bool res = true;
  5061. - const unsigned int *ps = ps_end, *pk2 = pk;
  5062. - for (unsigned int i=1; i<N; ++i) res = (*(--ps)==*(pk2++));
  5063. - if (res) {
  5064. - if (remove) std::memset((void*)(pk-1),0,sizeof(unsigned int)*N);
  5065. - return true;
  5066. - }
  5067. - }
  5068. - }
  5069. - }
  5070. - return false;
  5071. - }
  5072. -
  5073. - //! Test if a key combination has been typed
  5074. - bool is_typed(const unsigned int key1, const bool remove=true) {
  5075. - return is_typed(&key1,1,remove);
  5076. - }
  5077. -
  5078. - //! Test if a key combination has been typed
  5079. - bool is_typed(const unsigned int key1, const unsigned int key2, const bool remove=true) {
  5080. - const unsigned int seq[2] = { key1, key2 };
  5081. - return is_typed(seq,2,remove);
  5082. - }
  5083. -
  5084. - //! Test if a key combination has been typed
  5085. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3, const bool remove=true) {
  5086. - const unsigned int seq[3] = { key1, key2, key3 };
  5087. - return is_typed(seq,3,remove);
  5088. - }
  5089. -
  5090. - //! Test if a key combination has been typed
  5091. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5092. - const unsigned int key4, const bool remove=true) {
  5093. - const unsigned int seq[4] = { key1, key2, key3, key4 };
  5094. - return is_typed(seq,4,remove);
  5095. - }
  5096. -
  5097. - //! Test if a key combination has been typed
  5098. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5099. - const unsigned int key4, const unsigned int key5, const bool remove=true) {
  5100. - const unsigned int seq[5] = { key1, key2, key3, key4,key5 };
  5101. - return is_typed(seq,5,remove);
  5102. - }
  5103. -
  5104. - //! Test if a key combination has been typed
  5105. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5106. - const unsigned int key4, const unsigned int key5, const unsigned int key6, const bool remove=true) {
  5107. - const unsigned int seq[6] = { key1, key2, key3, key4,key5,key6 };
  5108. - return is_typed(seq,6,remove);
  5109. - }
  5110. -
  5111. - //! Test if a key combination has been typed
  5112. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5113. - const unsigned int key4, const unsigned int key5, const unsigned int key6,
  5114. - const unsigned int key7, const bool remove=true) {
  5115. - const unsigned int seq[7] = { key1, key2, key3, key4,key5,key6,key7 };
  5116. - return is_typed(seq,7,remove);
  5117. - }
  5118. -
  5119. - //! Test if a key combination has been typed
  5120. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5121. - const unsigned int key4, const unsigned int key5, const unsigned int key6,
  5122. - const unsigned int key7, const unsigned int key8, const bool remove=true) {
  5123. - const unsigned int seq[8] = { key1, key2, key3, key4,key5,key6,key7,key8 };
  5124. - return is_typed(seq,8,remove);
  5125. - }
  5126. -
  5127. - //! Test if a key combination has been typed
  5128. - bool is_typed(const unsigned int key1, const unsigned int key2, const unsigned int key3,
  5129. - const unsigned int key4, const unsigned int key5, const unsigned int key6,
  5130. - const unsigned int key7, const unsigned int key8, const unsigned int key9, const bool remove=true) {
  5131. - const unsigned int seq[9] = { key1, key2, key3, key4,key5,key6,key7,key8,key9 };
  5132. - return is_typed(seq,9,remove);
  5133. - }
  5134. -
  5135. - // When no display available
  5136. - //---------------------------
  5137. -#if cimg_display_type==0
  5138. -
  5139. - //! Return the width of the screen resolution.
  5140. - static int screen_dimx() {
  5141. - return 0;
  5142. - }
  5143. -
  5144. - //! Return the height of the screen resolution.
  5145. - static int screen_dimy() {
  5146. - return 0;
  5147. - }
  5148. -
  5149. - //! In-place version of the previous constructor
  5150. - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
  5151. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5152. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5153. - throw CImgDisplayException("CImgDisplay() : Display has been required but is not available (cimg_display_type=0)");
  5154. - fps_timer = 0*(unsigned long)(dimw + dimh + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
  5155. - return *this;
  5156. - }
  5157. -
  5158. - //! In-place version of the previous constructor
  5159. - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
  5160. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5161. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5162. - fps_timer = 0*(unsigned long)(img.width + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
  5163. - return assign(0,0);
  5164. - }
  5165. -
  5166. - //! In-place version of the previous constructor
  5167. - template<typename T> CImgDisplay& assign(const CImgList<T>& list, const char *title=0,
  5168. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5169. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5170. - fps_timer = 0*(unsigned long)(list.size + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag);
  5171. - return assign(0,0);
  5172. - }
  5173. -
  5174. - //! In-place version of the previous constructor
  5175. - CImgDisplay& assign(const CImgDisplay &disp) {
  5176. - return assign(disp.width,disp.height);
  5177. - }
  5178. -
  5179. - // In-place version of the destructor (should not be used by the user).
  5180. - CImgDisplay& _assign() {
  5181. - return *this;
  5182. - }
  5183. -
  5184. - //! Display an image in a window.
  5185. - template<typename T> CImgDisplay& display(const CImg<T>& img) {
  5186. - fps_timer = 0*img.width;
  5187. - return *this;
  5188. - }
  5189. -
  5190. - //! Resize window
  5191. - CImgDisplay& resize(const int width, const int height, const bool redraw=true) {
  5192. - fps_timer = 0*width*height*(int)redraw;
  5193. - return *this;
  5194. - }
  5195. -
  5196. - //! Move window
  5197. - CImgDisplay& move(const int posx, const int posy) {
  5198. - fps_timer = 0*posx*posy;
  5199. - return *this;
  5200. - }
  5201. -
  5202. - //! Move mouse pointer to a specific location
  5203. - CImgDisplay& set_mouse(const int posx, const int posy) {
  5204. - fps_timer = 0*posx*posy;
  5205. - return *this;
  5206. - }
  5207. -
  5208. - //! Hide mouse pointer
  5209. - CImgDisplay& hide_mouse() {
  5210. - return *this;
  5211. - }
  5212. -
  5213. - //! Show mouse pointer
  5214. - CImgDisplay& show_mouse() {
  5215. - return *this;
  5216. - }
  5217. -
  5218. - //! Wait for a window event in any CImg window
  5219. - static void wait_all() {}
  5220. -
  5221. - //! Show a closed display
  5222. - CImgDisplay& show() {
  5223. - return *this;
  5224. - }
  5225. -
  5226. - //! Close a visible display
  5227. - CImgDisplay& close() {
  5228. - return *this;
  5229. - }
  5230. -
  5231. - //! Set the window title
  5232. - CImgDisplay& set_title(const char *format,...) {
  5233. - fps_timer = 0*(unsigned long)format;
  5234. - return *this;
  5235. - }
  5236. -
  5237. - //! Re-paint image content in window
  5238. - CImgDisplay& paint() {
  5239. - return *this;
  5240. - }
  5241. -
  5242. - //! Render image buffer into GDI native image format
  5243. - template<typename T> CImgDisplay& render(const CImg<T>& img) {
  5244. - fps_timer = 0*img.width;
  5245. - return *this;
  5246. - }
  5247. -
  5248. - // X11-based display
  5249. - //-------------------
  5250. -#elif cimg_display_type==1
  5251. - void *data;
  5252. - Window window;
  5253. - Window background_window;
  5254. - XImage *image;
  5255. - Colormap colormap;
  5256. - Atom wm_delete_window, wm_delete_protocol;
  5257. -#ifdef cimg_use_xshm
  5258. - XShmSegmentInfo *shminfo;
  5259. -#endif
  5260. -
  5261. - static int screen_dimx() {
  5262. - int res = 0;
  5263. - if (!cimg::X11attr().display) {
  5264. - Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
  5265. - if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimx() : Can't open X11 display");
  5266. - res = DisplayWidth(disp,DefaultScreen(disp));
  5267. - XCloseDisplay(disp);
  5268. - } else {
  5269. -#ifdef cimg_use_xrandr
  5270. - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution)
  5271. - res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width;
  5272. - else
  5273. -#endif
  5274. - res = DisplayWidth(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
  5275. - }
  5276. - return res;
  5277. - }
  5278. -
  5279. - static int screen_dimy() {
  5280. - int res = 0;
  5281. - if (!cimg::X11attr().display) {
  5282. - Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
  5283. - if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimy() : Can't open X11 display");
  5284. - res = DisplayHeight(disp,DefaultScreen(disp));
  5285. - XCloseDisplay(disp);
  5286. - } else {
  5287. -#ifdef cimg_use_xrandr
  5288. - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution)
  5289. - res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height; else
  5290. -#endif
  5291. - res = DisplayHeight(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
  5292. - }
  5293. - return res;
  5294. - }
  5295. -
  5296. - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
  5297. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5298. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5299. - if (!dimw || !dimh)
  5300. - throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh);
  5301. - assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  5302. - min = max = 0;
  5303. - std::memset(data,0,(cimg::X11attr().nb_bits==8?sizeof(unsigned char):
  5304. - (cimg::X11attr().nb_bits==16?sizeof(unsigned short):sizeof(unsigned int)))*width*height);
  5305. - return paint();
  5306. - }
  5307. -
  5308. - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
  5309. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5310. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5311. - if (img.is_empty())
  5312. - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.",
  5313. - img.width,img.height,img.depth,img.dim,img.data);
  5314. - CImg<T> tmp;
  5315. - const CImg<T>& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  5316. - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  5317. - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
  5318. - return render(nimg).paint();
  5319. - }
  5320. -
  5321. - template<typename T> CImgDisplay& assign(const CImgList<T>& list, const char *title=0,
  5322. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5323. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5324. - if (list.is_empty())
  5325. - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.",
  5326. - list.size,list.data);
  5327. - CImg<T> tmp;
  5328. - const CImg<T> img = list.get_append('x'),
  5329. - &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  5330. - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  5331. - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
  5332. - return render(nimg).paint();
  5333. - }
  5334. -
  5335. - CImgDisplay& assign(const CImgDisplay& win) {
  5336. - assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed);
  5337. - std::memcpy(data,win.data,(cimg::X11attr().nb_bits==8?sizeof(unsigned char):
  5338. - cimg::X11attr().nb_bits==16?sizeof(unsigned short):
  5339. - sizeof(unsigned int))*width*height);
  5340. - return paint();
  5341. - }
  5342. -
  5343. - CImgDisplay& _assign() {
  5344. - if (width && height) {
  5345. - pthread_mutex_lock(cimg::X11attr().mutex);
  5346. -
  5347. - // Remove display window from event thread list
  5348. - unsigned int i;
  5349. - for (i=0; i<cimg::X11attr().nb_wins && cimg::X11attr().wins[i]!=this; i++);
  5350. - for (; i<cimg::X11attr().nb_wins-1; i++) cimg::X11attr().wins[i]=cimg::X11attr().wins[i+1];
  5351. - cimg::X11attr().nb_wins--;
  5352. -
  5353. - // Destroy window, image, colormap and title
  5354. - if (is_fullscreen) _desinit_fullscreen();
  5355. - XDestroyWindow(cimg::X11attr().display,window);
  5356. - window = 0;
  5357. -#ifdef cimg_use_xshm
  5358. - if (shminfo) {
  5359. - XShmDetach(cimg::X11attr().display, shminfo);
  5360. - XDestroyImage(image);
  5361. - shmdt(shminfo->shmaddr);
  5362. - shmctl(shminfo->shmid,IPC_RMID,0);
  5363. - delete shminfo;
  5364. - shminfo = 0;
  5365. - } else
  5366. -#endif
  5367. - XDestroyImage(image);
  5368. - data = 0;
  5369. - image = 0;
  5370. - if (cimg::X11attr().nb_bits==8) XFreeColormap(cimg::X11attr().display,colormap);
  5371. - colormap = 0;
  5372. - XSync(cimg::X11attr().display, False);
  5373. -
  5374. - // Reset display variables
  5375. - if (title) delete[] title;
  5376. - width = height = normalization = events = 0;
  5377. - is_fullscreen = is_resized = is_moved = is_event = false;
  5378. - is_closed = true;
  5379. - title = 0;
  5380. - window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0;
  5381. - std::memset((void*)buttons,0,256*sizeof(unsigned int));
  5382. - std::memset((void*)keys,0,256*sizeof(unsigned int));
  5383. - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
  5384. - min = max = 0;
  5385. -
  5386. - // End event thread and close display if necessary
  5387. - if (!cimg::X11attr().nb_wins) {
  5388. -
  5389. - // Kill event thread
  5390. - pthread_cancel(*cimg::X11attr().event_thread);
  5391. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5392. - pthread_join(*cimg::X11attr().event_thread,0);
  5393. - delete cimg::X11attr().event_thread;
  5394. - cimg::X11attr().event_thread = 0;
  5395. - pthread_mutex_destroy(cimg::X11attr().mutex);
  5396. - delete cimg::X11attr().mutex;
  5397. - cimg::X11attr().mutex = 0;
  5398. - XSync(cimg::X11attr().display, False);
  5399. - XCloseDisplay(cimg::X11attr().display);
  5400. - cimg::X11attr().display=0;
  5401. - delete cimg::X11attr().gc;
  5402. - cimg::X11attr().gc = 0;
  5403. - } else pthread_mutex_unlock(cimg::X11attr().mutex);
  5404. - }
  5405. - return *this;
  5406. - }
  5407. -
  5408. - template<typename T> CImgDisplay& display(const CImg<T>& img) {
  5409. - return render(img).paint(false);
  5410. - }
  5411. -
  5412. - CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) {
  5413. - if (!(nwidth && nheight))
  5414. - throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.",
  5415. - nwidth,nheight);
  5416. - const unsigned int
  5417. - tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100),
  5418. - tmpdimy=(nheight>0)?nheight:(-nheight*height/100),
  5419. - dimx = tmpdimx?tmpdimx:1,
  5420. - dimy = tmpdimy?tmpdimy:1;
  5421. - const bool
  5422. - is_disp_different = (width!=dimx || height!=dimy),
  5423. - is_win_different = (window_width!=dimx || window_height!=dimy);
  5424. - if (is_disp_different || is_win_different) {
  5425. - pthread_mutex_lock(cimg::X11attr().mutex);
  5426. - XResizeWindow(cimg::X11attr().display,window,dimx,dimy);
  5427. - window_width = dimx;
  5428. - window_height = dimy;
  5429. - is_resized = false;
  5430. - if (is_disp_different) {
  5431. - switch (cimg::X11attr().nb_bits) {
  5432. - case 8: { unsigned char foo=0; _resize(foo,dimx,dimy,redraw); } break;
  5433. - case 16: { unsigned short foo=0; _resize(foo,dimx,dimy,redraw); } break;
  5434. - default: { unsigned int foo=0; _resize(foo,dimx,dimy,redraw); } break;
  5435. - }
  5436. - width = dimx;
  5437. - height = dimy;
  5438. - }
  5439. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5440. - if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2);
  5441. - if (redraw) return paint();
  5442. - }
  5443. - return *this;
  5444. - }
  5445. -
  5446. - CImgDisplay& move(const int posx, const int posy) {
  5447. - show();
  5448. - pthread_mutex_lock(cimg::X11attr().mutex);
  5449. - XMoveWindow(cimg::X11attr().display,window,posx,posy);
  5450. - is_moved = false;
  5451. - window_x = posx;
  5452. - window_y = posy;
  5453. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5454. - return paint();
  5455. - }
  5456. -
  5457. - CImgDisplay& set_mouse(const int posx, const int posy) {
  5458. - if (!is_closed && posx>=0 && posy>=0) {
  5459. - pthread_mutex_lock(cimg::X11attr().mutex);
  5460. - XWarpPointer(cimg::X11attr().display,None,window,0,0,0,0,posx,posy);
  5461. - is_moved = false;
  5462. - mouse_x = posx;
  5463. - mouse_y = posy;
  5464. - XSync(cimg::X11attr().display, False);
  5465. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5466. - }
  5467. - return *this;
  5468. - }
  5469. -
  5470. - CImgDisplay& hide_mouse() {
  5471. - pthread_mutex_lock(cimg::X11attr().mutex);
  5472. - const char pix_data[8] = { 0 };
  5473. - XColor col;
  5474. - col.red = col.green = col.blue = 0;
  5475. - Pixmap pix = XCreateBitmapFromData(cimg::X11attr().display,window,pix_data,8,8);
  5476. - Cursor cur = XCreatePixmapCursor(cimg::X11attr().display,pix,pix,&col,&col,0,0);
  5477. - XFreePixmap(cimg::X11attr().display,pix);
  5478. - XDefineCursor(cimg::X11attr().display,window,cur);
  5479. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5480. - return *this;
  5481. - }
  5482. -
  5483. - CImgDisplay& show_mouse() {
  5484. - pthread_mutex_lock(cimg::X11attr().mutex);
  5485. - XDefineCursor(cimg::X11attr().display,window,None);
  5486. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5487. - return *this;
  5488. - }
  5489. -
  5490. - static void wait_all() {
  5491. - pthread_mutex_lock(cimg::X11attr().mutex);
  5492. - bool flag = true;
  5493. - XEvent event;
  5494. - while (flag) {
  5495. - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++) {
  5496. - cimg::X11attr().wins[i]->is_event = false;
  5497. - const unsigned int xevent_type = (cimg::X11attr().wins[i]->events)&3;
  5498. - const unsigned int emask =
  5499. - ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)|
  5500. - ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)|
  5501. - ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0);
  5502. - XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask);
  5503. - }
  5504. - XNextEvent(cimg::X11attr().display, &event);
  5505. - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++)
  5506. - if (!cimg::X11attr().wins[i]->is_closed && event.xany.window==cimg::X11attr().wins[i]->window) {
  5507. - cimg::X11attr().wins[i]->_handle_events(&event);
  5508. - if (cimg::X11attr().wins[i]->is_event) flag = false;
  5509. - }
  5510. - }
  5511. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5512. - }
  5513. -
  5514. - CImgDisplay& show() {
  5515. - if (is_closed) {
  5516. - pthread_mutex_lock(cimg::X11attr().mutex);
  5517. - if (is_fullscreen) _init_fullscreen();
  5518. - _map_window();
  5519. - is_closed = false;
  5520. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5521. - }
  5522. - return paint();
  5523. - }
  5524. -
  5525. - CImgDisplay& close() {
  5526. - if (!is_closed) {
  5527. - pthread_mutex_lock(cimg::X11attr().mutex);
  5528. - if (is_fullscreen) _desinit_fullscreen();
  5529. - XUnmapWindow(cimg::X11attr().display,window);
  5530. - window_x = window_y = -1;
  5531. - is_closed = true;
  5532. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5533. - }
  5534. - return *this;
  5535. - }
  5536. -
  5537. - CImgDisplay& set_title(const char *format,...) {
  5538. - char tmp[1024]={0};
  5539. - va_list ap;
  5540. - va_start(ap, format);
  5541. - std::vsprintf(tmp,format,ap);
  5542. - va_end(ap);
  5543. - if (title) delete[] title;
  5544. - const int s = cimg::strlen(tmp)+1;
  5545. - title = new char[s];
  5546. - std::memcpy(title,tmp,s*sizeof(char));
  5547. - pthread_mutex_lock(cimg::X11attr().mutex);
  5548. - XStoreName(cimg::X11attr().display,window,tmp);
  5549. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5550. - return *this;
  5551. - }
  5552. -
  5553. - CImgDisplay& paint(const bool wait_expose=true) {
  5554. - pthread_mutex_lock(cimg::X11attr().mutex);
  5555. - _paint(wait_expose);
  5556. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5557. - return *this;
  5558. - }
  5559. -
  5560. - template<typename T> CImgDisplay& render(const CImg<T>& img, const bool flag8=false) {
  5561. - if (img.is_empty())
  5562. - throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.",
  5563. - img.width,img.height,img.depth,img.dim,img.data);
  5564. - if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  5565. - if (cimg::X11attr().nb_bits==8 && (img.width!=width || img.height!=height)) return render(img.get_resize(width,height,1,-100,1));
  5566. - if (cimg::X11attr().nb_bits==8 && !flag8 && img.dim==3) return render(img.get_RGBtoLUT(true),true);
  5567. -
  5568. - const unsigned int xymax = img.width*img.height;
  5569. - const T
  5570. - *data1 = img.ptr(),
  5571. - *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1,
  5572. - *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1;
  5573. - if (cimg::X11attr().blue_first) cimg::swap(data1,data3);
  5574. - pthread_mutex_lock(cimg::X11attr().mutex);
  5575. -
  5576. - if (!normalization || (normalization==3 && cimg::type<T>::id()==cimg::type<unsigned char>::id())) {
  5577. - min = max = 0;
  5578. - switch (cimg::X11attr().nb_bits) {
  5579. - case 8: {
  5580. - _set_colormap(colormap,img.dim);
  5581. - unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height];
  5582. - unsigned char *ptrd = (unsigned char*)ndata;
  5583. - switch (img.dim) {
  5584. - case 1: for (unsigned int xy=0; xy<xymax; xy++) (*ptrd++) = (unsigned char)*(data1++);
  5585. - break;
  5586. - case 2: for (unsigned int xy=0; xy<xymax; xy++) {
  5587. - const unsigned char R = (unsigned char)*(data1++), G = (unsigned char)*(data2++);
  5588. - (*ptrd++) = (R&0xf0)|(G>>4);
  5589. - } break;
  5590. - default: for (unsigned int xy=0; xy<xymax; xy++) {
  5591. - const unsigned char R = (unsigned char)*(data1++), G = (unsigned char)*(data2++), B = (unsigned char)*(data3++);
  5592. - (*ptrd++) = (R&0xe0) | ((G>>5)<<2) | (B>>6);
  5593. - } break;
  5594. - }
  5595. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; }
  5596. - } break;
  5597. - case 16: {
  5598. - unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height];
  5599. - unsigned char *ptrd = (unsigned char*)ndata;
  5600. - const unsigned int M = 248;
  5601. - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
  5602. - const unsigned char G = (unsigned char)*(data2++)>>2;
  5603. - *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3);
  5604. - *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3);
  5605. - } else for (unsigned int xy=0; xy<xymax; xy++) {
  5606. - const unsigned char G = (unsigned char)*(data2++)>>2;
  5607. - *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3);
  5608. - *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3);
  5609. - }
  5610. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; }
  5611. - } break;
  5612. - default: {
  5613. - unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height];
  5614. - unsigned char *ptrd = (unsigned char*)ndata;
  5615. - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
  5616. - *(ptrd++) = 0;
  5617. - *(ptrd++) = (unsigned char)*(data1++);
  5618. - *(ptrd++) = (unsigned char)*(data2++);
  5619. - *(ptrd++) = (unsigned char)*(data3++);
  5620. - } else for (unsigned int xy=0; xy<xymax; xy++) {
  5621. - *(ptrd++) = (unsigned char)*(data3++);
  5622. - *(ptrd++) = (unsigned char)*(data2++);
  5623. - *(ptrd++) = (unsigned char)*(data1++);
  5624. - *(ptrd++) = 0;
  5625. - }
  5626. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned int*)data,width,height); delete[] ndata; }
  5627. - } break;
  5628. - };
  5629. - } else {
  5630. - if (normalization==3) {
  5631. - if (cimg::type<T>::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
  5632. - else { min = (float)cimg::type<T>::min(); max = (float)cimg::type<T>::max(); }
  5633. - } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
  5634. - const float delta = max-min, mm = delta?delta:1.0f;
  5635. - switch (cimg::X11attr().nb_bits) {
  5636. - case 8: {
  5637. - _set_colormap(colormap,img.dim);
  5638. - unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height];
  5639. - unsigned char *ptrd = (unsigned char*)ndata;
  5640. - switch (img.dim) {
  5641. - case 1: for (unsigned int xy=0; xy<xymax; xy++) {
  5642. - const unsigned char R = (unsigned char)(255*(*(data1++)-min)/mm);
  5643. - *(ptrd++) = R;
  5644. - } break;
  5645. - case 2: for (unsigned int xy=0; xy<xymax; xy++) {
  5646. - const unsigned char
  5647. - R = (unsigned char)(255*(*(data1++)-min)/mm),
  5648. - G = (unsigned char)(255*(*(data2++)-min)/mm);
  5649. - (*ptrd++) = (R&0xf0) | (G>>4);
  5650. - } break;
  5651. - default:
  5652. - for (unsigned int xy=0; xy<xymax; xy++) {
  5653. - const unsigned char
  5654. - R = (unsigned char)(255*(*(data1++)-min)/mm),
  5655. - G = (unsigned char)(255*(*(data2++)-min)/mm),
  5656. - B = (unsigned char)(255*(*(data3++)-min)/mm);
  5657. - *(ptrd++) = (R&0xe0) | ((G>>5)<<2) | (B>>6);
  5658. - } break;
  5659. - }
  5660. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; }
  5661. - } break;
  5662. - case 16: {
  5663. - unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height];
  5664. - unsigned char *ptrd = (unsigned char*)ndata;
  5665. - const unsigned int M = 248;
  5666. - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
  5667. - const unsigned char G = (unsigned char)(255*(*(data2++)-min)/mm)>>2;
  5668. - *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3);
  5669. - *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3);
  5670. - } else for (unsigned int xy=0; xy<xymax; xy++) {
  5671. - const unsigned char G = (unsigned char)(255*(*(data2++)-min)/mm)>>2;
  5672. - *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3);
  5673. - *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3);
  5674. - }
  5675. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; }
  5676. - } break;
  5677. - default: {
  5678. - unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height];
  5679. - unsigned char *ptrd = (unsigned char*)ndata;
  5680. - if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy<xymax; xy++) {
  5681. - (*ptrd++) = 0;
  5682. - (*ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm);
  5683. - (*ptrd++) = (unsigned char)(255*(*(data2++)-min)/mm);
  5684. - (*ptrd++) = (unsigned char)(255*(*(data3++)-min)/mm);
  5685. - } else for (unsigned int xy=0; xy<xymax; xy++) {
  5686. - (*ptrd++) = (unsigned char)(255*(*(data3++)-min)/mm);
  5687. - (*ptrd++) = (unsigned char)(255*(*(data2++)-min)/mm);
  5688. - (*ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm);
  5689. - (*ptrd++) = 0;
  5690. - }
  5691. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned int*)data,width,height); delete[] ndata; }
  5692. - } break;
  5693. - }
  5694. - }
  5695. -
  5696. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5697. - return *this;
  5698. - }
  5699. -
  5700. - static int _assign_lowlevel_xshm(Display *dpy, XErrorEvent *error) {
  5701. - dpy = 0; error = 0;
  5702. - cimg::X11attr().shm_enabled = false;
  5703. - return 0;
  5704. - }
  5705. -
  5706. - void assign_lowlevel(const unsigned int dimw, const unsigned int dimh, const char *ptitle=0,
  5707. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  5708. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  5709. -
  5710. - // Allocate space for window title
  5711. - const int s = cimg::strlen(ptitle)+1;
  5712. - char *tmp_title = s?new char[s]:0;
  5713. - if (s) std::memcpy(tmp_title,ptitle,s*sizeof(char));
  5714. -
  5715. - // Destroy previous display window if existing
  5716. - if (width && height) _assign();
  5717. -
  5718. - // Open X11 display if necessary.
  5719. - if (!cimg::X11attr().display) {
  5720. - cimg::X11attr().nb_wins = 0;
  5721. - cimg::X11attr().mutex = new pthread_mutex_t;
  5722. - pthread_mutex_init(cimg::X11attr().mutex,0);
  5723. -
  5724. - cimg::X11attr().display = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0"));
  5725. - if (!cimg::X11attr().display)
  5726. - throw CImgDisplayException("CImgDisplay::_create_window() : Can't open X11 display");
  5727. - cimg::X11attr().nb_bits = DefaultDepth(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display));
  5728. - if (cimg::X11attr().nb_bits!=8 && cimg::X11attr().nb_bits!=16 && cimg::X11attr().nb_bits!=24 && cimg::X11attr().nb_bits!=32)
  5729. - throw CImgDisplayException("CImgDisplay::_create_window() : %u bits mode is not supported "
  5730. - "(only 8, 16, 24 and 32 bits modes are supported)",cimg::X11attr().nb_bits);
  5731. - cimg::X11attr().gc = new GC;
  5732. - *cimg::X11attr().gc = DefaultGC(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
  5733. - Visual *visual = DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display));
  5734. - XVisualInfo vtemplate;
  5735. - vtemplate.visualid = XVisualIDFromVisual(visual);
  5736. - int nb_visuals;
  5737. - XVisualInfo *vinfo = XGetVisualInfo(cimg::X11attr().display,VisualIDMask,&vtemplate,&nb_visuals);
  5738. - if (vinfo && vinfo->red_mask<vinfo->blue_mask) cimg::X11attr().blue_first = true;
  5739. - cimg::X11attr().byte_order = ImageByteOrder(cimg::X11attr().display);
  5740. -
  5741. - pthread_mutex_lock(cimg::X11attr().mutex);
  5742. - cimg::X11attr().event_thread = new pthread_t;
  5743. - pthread_create(cimg::X11attr().event_thread,0,_events_thread,0);
  5744. - } else pthread_mutex_lock(cimg::X11attr().mutex);
  5745. -
  5746. - // Set display variables
  5747. - width = dimw;
  5748. - height = dimh;
  5749. - normalization = normalization_type%4;
  5750. - events = events_type%4;
  5751. - is_fullscreen = fullscreen_flag;
  5752. - title = tmp_title;
  5753. - window_x = window_y = wheel = 0;
  5754. - mouse_x = mouse_y = -1;
  5755. - std::memset((void*)buttons,0,256*sizeof(unsigned int));
  5756. - std::memset((void*)keys,0,256*sizeof(unsigned int));
  5757. - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
  5758. - is_resized = is_moved = is_event = false;
  5759. - is_closed = closed_flag;
  5760. - fps_timer = fps_frames = timer = 0;
  5761. - fps_fps = 0;
  5762. -
  5763. - // Create X11 window and palette (if 8bits display)
  5764. - if (is_fullscreen) {
  5765. - _init_fullscreen();
  5766. - const unsigned int sx = screen_dimx(), sy = screen_dimy();
  5767. - XSetWindowAttributes winattr;
  5768. - winattr.override_redirect = True;
  5769. - window = XCreateWindow(cimg::X11attr().display,
  5770. - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5771. - (sx-width)/2,(sy-height)/2,
  5772. - width,height,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr);
  5773. - } else
  5774. - window = XCreateSimpleWindow(cimg::X11attr().display,
  5775. - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5776. - 0,0,width,height,2,0,0x0L);
  5777. - XStoreName(cimg::X11attr().display,window,title?title:" ");
  5778. - if (cimg::X11attr().nb_bits==8) {
  5779. - colormap = XCreateColormap(cimg::X11attr().display,window,DefaultVisual(cimg::X11attr().display,
  5780. - DefaultScreen(cimg::X11attr().display)),AllocAll);
  5781. - _set_colormap(colormap,3);
  5782. - XSetWindowColormap(cimg::X11attr().display,window,colormap);
  5783. - }
  5784. - window_width = width;
  5785. - window_height = height;
  5786. -
  5787. - // Create XImage
  5788. - const unsigned int bufsize = width*height*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4));
  5789. -#ifdef cimg_use_xshm
  5790. - shminfo = 0;
  5791. - if (XShmQueryExtension(cimg::X11attr().display)) {
  5792. - shminfo = new XShmSegmentInfo;
  5793. - image = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5794. - cimg::X11attr().nb_bits,ZPixmap,0,shminfo,width,height);
  5795. - if (!image) { delete shminfo; shminfo = 0; }
  5796. - else {
  5797. - shminfo->shmid = shmget(IPC_PRIVATE, bufsize, IPC_CREAT | 0777);
  5798. - if (shminfo->shmid==-1) { XDestroyImage(image); delete shminfo; shminfo = 0; }
  5799. - else {
  5800. - shminfo->shmaddr = image->data = (char*)(data = shmat(shminfo->shmid,0,0));
  5801. - if (shminfo->shmaddr==(char*)-1) { XDestroyImage(image); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = 0; }
  5802. - shminfo->readOnly = False;
  5803. - cimg::X11attr().shm_enabled = true;
  5804. - XErrorHandler oldXErrorHandler = XSetErrorHandler(_assign_lowlevel_xshm);
  5805. - XShmAttach(cimg::X11attr().display, shminfo);
  5806. - XSync(cimg::X11attr().display, False);
  5807. - XSetErrorHandler(oldXErrorHandler);
  5808. - if (!cimg::X11attr().shm_enabled) {
  5809. - XDestroyImage(image);
  5810. - shmdt(shminfo->shmaddr);
  5811. - shmctl(shminfo->shmid,IPC_RMID,0);
  5812. - delete shminfo; shminfo = 0;
  5813. - }
  5814. - }
  5815. - }
  5816. - }
  5817. - if (!shminfo)
  5818. -#endif
  5819. - {
  5820. - data = std::malloc(bufsize);
  5821. - image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5822. - cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,width,height,8,0);
  5823. - }
  5824. -
  5825. - if (!is_closed) _map_window(); else { window_x = window_y = cimg::type<int>::min(); }
  5826. -
  5827. - if (events) {
  5828. - wm_delete_window = XInternAtom(cimg::X11attr().display, "WM_DELETE_WINDOW", False);
  5829. - wm_delete_protocol = XInternAtom(cimg::X11attr().display, "WM_PROTOCOLS", False);
  5830. - XSetWMProtocols(cimg::X11attr().display, window, &wm_delete_window, 1);
  5831. - if (is_fullscreen) XGrabKeyboard(cimg::X11attr().display, window, True, GrabModeAsync, GrabModeAsync, CurrentTime);
  5832. - }
  5833. - cimg::X11attr().wins[cimg::X11attr().nb_wins++]=this;
  5834. - pthread_mutex_unlock(cimg::X11attr().mutex);
  5835. - }
  5836. -
  5837. - void _map_window() {
  5838. - XWindowAttributes attr;
  5839. - XEvent event;
  5840. - XSelectInput(cimg::X11attr().display,window,ExposureMask | StructureNotifyMask);
  5841. - bool exposed = false, mapped = false;
  5842. - XMapRaised(cimg::X11attr().display,window);
  5843. - XSync(cimg::X11attr().display,False);
  5844. - do {
  5845. - XWindowEvent(cimg::X11attr().display,window,StructureNotifyMask | ExposureMask,&event);
  5846. - switch (event.type) {
  5847. - case MapNotify: mapped = true; break;
  5848. - case Expose: exposed = true; break;
  5849. - default: XSync(cimg::X11attr().display, False); cimg::sleep(10);
  5850. - }
  5851. - } while (!(exposed && mapped));
  5852. - do {
  5853. - XGetWindowAttributes(cimg::X11attr().display, window, &attr);
  5854. - if (attr.map_state!=IsViewable) { XSync(cimg::X11attr().display,False); cimg::sleep(10); }
  5855. - } while (attr.map_state != IsViewable);
  5856. - window_x = attr.x;
  5857. - window_y = attr.y;
  5858. - }
  5859. -
  5860. - void _set_colormap(Colormap& colormap, const unsigned int dim) {
  5861. - XColor palette[256];
  5862. - switch (dim) {
  5863. - case 1: // palette for greyscale images
  5864. - for (unsigned int index=0; index<256; index++) {
  5865. - palette[index].pixel = index;
  5866. - palette[index].red = palette[index].green = palette[index].blue = index<<8;
  5867. - palette[index].flags = DoRed | DoGreen | DoBlue;
  5868. - }
  5869. - break;
  5870. - case 2: // palette for RG images
  5871. - for (unsigned int index=0, r=8; r<256; r+=16)
  5872. - for (unsigned int g=8; g<256; g+=16) {
  5873. - palette[index].pixel = index;
  5874. - palette[index].red = palette[index].blue = r<<8;
  5875. - palette[index].green = g<<8;
  5876. - palette[index++].flags = DoRed | DoGreen | DoBlue;
  5877. - }
  5878. - break;
  5879. - default: // palette for RGB images
  5880. - for (unsigned int index=0, r=16; r<256; r+=32)
  5881. - for (unsigned int g=16; g<256; g+=32)
  5882. - for (unsigned int b=32; b<256; b+=64) {
  5883. - palette[index].pixel = index;
  5884. - palette[index].red = r<<8;
  5885. - palette[index].green = g<<8;
  5886. - palette[index].blue = b<<8;
  5887. - palette[index++].flags = DoRed | DoGreen | DoBlue;
  5888. - }
  5889. - break;
  5890. - }
  5891. - XStoreColors(cimg::X11attr().display,colormap,palette,256);
  5892. - }
  5893. -
  5894. - void _paint(const bool wait_expose=true) {
  5895. - if (!is_closed) {
  5896. - if (wait_expose) {
  5897. - static XEvent event;
  5898. - event.xexpose.type = Expose;
  5899. - event.xexpose.serial = 0;
  5900. - event.xexpose.send_event = True;
  5901. - event.xexpose.display = cimg::X11attr().display;
  5902. - event.xexpose.window = window;
  5903. - event.xexpose.x = 0;
  5904. - event.xexpose.y = 0;
  5905. - event.xexpose.width = (int)width;
  5906. - event.xexpose.height = (int)height;
  5907. - event.xexpose.count = 0;
  5908. - XSendEvent(cimg::X11attr().display, window, False, 0, &event);
  5909. - } else {
  5910. -#if cimg_use_xshm
  5911. - if (shminfo) XShmPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height,False);
  5912. - else
  5913. -#endif
  5914. - XPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height);
  5915. - XSync(cimg::X11attr().display, False);
  5916. - }
  5917. - }
  5918. - }
  5919. -
  5920. - template<typename T> void _resize(T foo, const unsigned int ndimx, const unsigned int ndimy, const bool redraw) {
  5921. - foo = 0;
  5922. -#ifdef cimg_use_xshm
  5923. - if (shminfo) {
  5924. - XShmSegmentInfo *nshminfo = new XShmSegmentInfo;
  5925. - XImage *nimage = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5926. - cimg::X11attr().nb_bits,ZPixmap,0,nshminfo,ndimx,ndimy);
  5927. - nshminfo->shmid = shmget(IPC_PRIVATE, ndimx*ndimy*sizeof(T), IPC_CREAT | 0777);
  5928. - nshminfo->shmaddr = nimage->data = (char*)shmat(nshminfo->shmid,0,0);
  5929. - nshminfo->readOnly = False;
  5930. - XShmAttach(cimg::X11attr().display, nshminfo);
  5931. - XSync(cimg::X11attr().display, False);
  5932. - T *const ndata = (T*)nimage->data;
  5933. - if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy);
  5934. - else std::memset(ndata,0,sizeof(T)*ndimx*ndimy);
  5935. - XShmDetach(cimg::X11attr().display, shminfo);
  5936. - XDestroyImage(image);
  5937. - shmdt(shminfo->shmaddr);
  5938. - shmctl(shminfo->shmid,IPC_RMID,0);
  5939. - delete shminfo;
  5940. - shminfo = nshminfo;
  5941. - image = nimage;
  5942. - data = (void*)ndata;
  5943. - } else
  5944. -#endif
  5945. - {
  5946. - T *ndata = (T*)std::malloc(ndimx*ndimy*sizeof(T));
  5947. - if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy);
  5948. - else std::memset(ndata,0,sizeof(T)*ndimx*ndimy);
  5949. - data = (void*)ndata;
  5950. - XDestroyImage(image);
  5951. - image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  5952. - cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,ndimx,ndimy,8,0);
  5953. - }
  5954. - }
  5955. -
  5956. - void _init_fullscreen() {
  5957. - background_window = 0;
  5958. - if (is_fullscreen && !is_closed) {
  5959. -#ifdef cimg_use_xrandr
  5960. - int foo;
  5961. - if (XRRQueryExtension(cimg::X11attr().display,&foo,&foo)) {
  5962. - XRRRotations(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display), &cimg::X11attr().curr_rotation);
  5963. - if (!cimg::X11attr().resolutions) {
  5964. - cimg::X11attr().resolutions = XRRSizes(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display),&foo);
  5965. - cimg::X11attr().nb_resolutions = (unsigned int)foo;
  5966. - }
  5967. - if (cimg::X11attr().resolutions) {
  5968. - cimg::X11attr().curr_resolution = 0;
  5969. - for (unsigned int i=0; i<cimg::X11attr().nb_resolutions; i++) {
  5970. - const unsigned int
  5971. - nw = (unsigned int)(cimg::X11attr().resolutions[i].width),
  5972. - nh = (unsigned int)(cimg::X11attr().resolutions[i].height);
  5973. - if (nw>=width && nh>=height &&
  5974. - nw<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width) &&
  5975. - nh<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height))
  5976. - cimg::X11attr().curr_resolution = i;
  5977. - }
  5978. - if (cimg::X11attr().curr_resolution>0) {
  5979. - XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display));
  5980. - XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display),
  5981. - cimg::X11attr().curr_resolution, cimg::X11attr().curr_rotation, CurrentTime);
  5982. - XRRFreeScreenConfigInfo(config);
  5983. - XSync(cimg::X11attr().display, False);
  5984. - }
  5985. - }
  5986. - }
  5987. - cimg::warn(!cimg::X11attr().resolutions,"CImgDisplay::_create_window() : Xrandr extension is not supported by the X server.");
  5988. -#endif
  5989. - const unsigned int sx = screen_dimx(), sy = screen_dimy();
  5990. - XSetWindowAttributes winattr;
  5991. - winattr.override_redirect = True;
  5992. - if (sx!=width || sy!=height) {
  5993. - background_window = XCreateWindow(cimg::X11attr().display,
  5994. - RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),0,0,
  5995. - sx,sy,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr);
  5996. - const unsigned int bufsize = sx*sy*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4));
  5997. - void *background_data = std::malloc(bufsize);
  5998. - std::memset(background_data,0,bufsize);
  5999. - XImage *background_image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),
  6000. - cimg::X11attr().nb_bits,ZPixmap,0,(char*)background_data,sx,sy,8,0);
  6001. - XEvent event;
  6002. - XSelectInput(cimg::X11attr().display,background_window,StructureNotifyMask);
  6003. - XMapRaised(cimg::X11attr().display,background_window);
  6004. - do XWindowEvent(cimg::X11attr().display,background_window,StructureNotifyMask,&event);
  6005. - while (event.type!=MapNotify);
  6006. - XPutImage(cimg::X11attr().display,background_window,*cimg::X11attr().gc,background_image,0,0,0,0,sx,sy);
  6007. - XWindowAttributes attr;
  6008. - XGetWindowAttributes(cimg::X11attr().display, background_window, &attr);
  6009. - while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False);
  6010. - XDestroyImage(background_image);
  6011. - }
  6012. - }
  6013. - }
  6014. -
  6015. - void _desinit_fullscreen() {
  6016. - if (is_fullscreen) {
  6017. - XUngrabKeyboard(cimg::X11attr().display,CurrentTime);
  6018. -#if cimg_use_xrandr
  6019. - if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution) {
  6020. - XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display));
  6021. - XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display),
  6022. - 0, cimg::X11attr().curr_rotation, CurrentTime);
  6023. - XRRFreeScreenConfigInfo(config);
  6024. - XSync(cimg::X11attr().display, False);
  6025. - cimg::X11attr().curr_resolution = 0;
  6026. - }
  6027. -#endif
  6028. - if (background_window) XDestroyWindow(cimg::X11attr().display,background_window);
  6029. - background_window = 0;
  6030. - is_fullscreen = false;
  6031. - }
  6032. - }
  6033. -
  6034. - void _handle_events(const XEvent *const pevent) {
  6035. - XEvent event=*pevent;
  6036. - switch (event.type) {
  6037. - case ClientMessage:
  6038. - if ((int)event.xclient.message_type==(int)wm_delete_protocol &&
  6039. - (int)event.xclient.data.l[0]==(int)wm_delete_window) {
  6040. - XUnmapWindow(cimg::X11attr().display,window);
  6041. - mouse_x = mouse_y = -1;
  6042. - std::memmove((void*)(buttons+1),(void*)buttons,255);
  6043. - std::memmove((void*)(keys+1),(void*)keys,255);
  6044. - if (key) { std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = key; }
  6045. - key = button = 0;
  6046. - is_closed = is_event = true;
  6047. - }
  6048. - break;
  6049. - case ConfigureNotify: {
  6050. - while (XCheckWindowEvent(cimg::X11attr().display,window,StructureNotifyMask,&event));
  6051. - const unsigned int
  6052. - nw = event.xconfigure.width,
  6053. - nh = event.xconfigure.height;
  6054. - const int
  6055. - nx = event.xconfigure.x,
  6056. - ny = event.xconfigure.y;
  6057. - if (nw && nh && (nw!=window_width || nh!=window_height)) {
  6058. - window_width = nw;
  6059. - window_height = nh;
  6060. - mouse_x = mouse_y = -1;
  6061. - XResizeWindow(cimg::X11attr().display,window,window_width,window_height);
  6062. - is_resized = is_event = true;
  6063. - }
  6064. - if (nx!=window_x || ny!=window_y) {
  6065. - window_x = nx;
  6066. - window_y = ny;
  6067. - is_moved = is_event = true;
  6068. - }
  6069. - } break;
  6070. - case Expose: {
  6071. - while (XCheckWindowEvent(cimg::X11attr().display,window,ExposureMask,&event));
  6072. - _paint(false);
  6073. - if (is_fullscreen) {
  6074. - XWindowAttributes attr;
  6075. - XGetWindowAttributes(cimg::X11attr().display, window, &attr);
  6076. - while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False);
  6077. - XSetInputFocus(cimg::X11attr().display, window, RevertToParent, CurrentTime);
  6078. - }
  6079. - } break;
  6080. - case ButtonPress: {
  6081. - do {
  6082. - switch (event.xbutton.button) {
  6083. - case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=1; is_event = true; break;
  6084. - case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=4; is_event = true; break;
  6085. - case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=2; is_event = true; break;
  6086. - default: break;
  6087. - }
  6088. - } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonPressMask,&event));
  6089. - } break;
  6090. - case ButtonRelease: {
  6091. - do {
  6092. - switch (event.xbutton.button) {
  6093. - case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~1U; is_event = true; break;
  6094. - case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~4U; is_event = true; break;
  6095. - case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~2U; is_event = true; break;
  6096. - case 4: wheel++; is_event = true; break;
  6097. - case 5: wheel--; is_event = true; break;
  6098. - default: break;
  6099. - }
  6100. - } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonReleaseMask,&event));
  6101. - } break;
  6102. - case KeyPress: {
  6103. - char tmp;
  6104. - KeySym ksym;
  6105. - XLookupString(&event.xkey,&tmp,1,&ksym,0);
  6106. - std::memmove((void*)(keys+1),(void*)keys,255); key = (unsigned int)ksym;
  6107. - std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = 0;
  6108. - is_event = true;
  6109. - } break;
  6110. - case KeyRelease: {
  6111. - char tmp;
  6112. - KeySym ksym;
  6113. - XLookupString(&event.xkey,&tmp,1,&ksym,0);
  6114. - std::memmove((void*)(keys+1),(void*)keys,255); key = 0;
  6115. - std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = (unsigned int)ksym;
  6116. - is_event = true;
  6117. - } break;
  6118. - case LeaveNotify:
  6119. - while (XCheckWindowEvent(cimg::X11attr().display,window,LeaveWindowMask,&event));
  6120. - mouse_x = mouse_y =-1;
  6121. - is_event = true;
  6122. - break;
  6123. - case MotionNotify:
  6124. - while (XCheckWindowEvent(cimg::X11attr().display,window,PointerMotionMask,&event));
  6125. - mouse_x = event.xmotion.x;
  6126. - mouse_y = event.xmotion.y;
  6127. - if (mouse_x<0 || mouse_y<0 || mouse_x>=dimx() || mouse_y>=dimy()) mouse_x = mouse_y = -1;
  6128. - is_event = true;
  6129. - break;
  6130. - }
  6131. - }
  6132. -
  6133. - static void* _events_thread(void *arg) {
  6134. - arg = 0;
  6135. - XEvent event;
  6136. - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0);
  6137. - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
  6138. - for (;;) {
  6139. - pthread_mutex_lock(cimg::X11attr().mutex);
  6140. - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++) {
  6141. - const unsigned int xevent_type = (cimg::X11attr().wins[i]->events)&3;
  6142. - const unsigned int emask =
  6143. - ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)|
  6144. - ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)|
  6145. - ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0);
  6146. - XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask);
  6147. - }
  6148. - bool event_flag = XCheckTypedEvent(cimg::X11attr().display, ClientMessage, &event);
  6149. - if (!event_flag) event_flag = XCheckMaskEvent(cimg::X11attr().display,
  6150. - ExposureMask|StructureNotifyMask|ButtonPressMask|
  6151. - KeyPressMask|PointerMotionMask|LeaveWindowMask|ButtonReleaseMask|
  6152. - KeyReleaseMask,&event);
  6153. - if (event_flag) {
  6154. - for (unsigned int i=0; i<cimg::X11attr().nb_wins; i++)
  6155. - if (!cimg::X11attr().wins[i]->is_closed && event.xany.window==cimg::X11attr().wins[i]->window)
  6156. - cimg::X11attr().wins[i]->_handle_events(&event);
  6157. - }
  6158. - pthread_mutex_unlock(cimg::X11attr().mutex);
  6159. - pthread_testcancel();
  6160. - cimg::sleep(7);
  6161. - }
  6162. - return 0;
  6163. - }
  6164. -
  6165. - // Windows-based display
  6166. - //-----------------------
  6167. -#elif cimg_display_type==2
  6168. - CLIENTCREATESTRUCT ccs;
  6169. - BITMAPINFO bmi;
  6170. - unsigned int *data;
  6171. - DEVMODE curr_mode;
  6172. - HWND window;
  6173. - HWND background_window;
  6174. - HDC hdc;
  6175. - HANDLE thread;
  6176. - HANDLE created;
  6177. - HANDLE mutex;
  6178. - bool visible_cursor;
  6179. -
  6180. - static int screen_dimx() {
  6181. - DEVMODE mode;
  6182. - mode.dmSize = sizeof(DEVMODE);
  6183. - mode.dmDriverExtra = 0;
  6184. - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode);
  6185. - return mode.dmPelsWidth;
  6186. - }
  6187. -
  6188. - static int screen_dimy() {
  6189. - DEVMODE mode;
  6190. - mode.dmSize = sizeof(DEVMODE);
  6191. - mode.dmDriverExtra = 0;
  6192. - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode);
  6193. - return mode.dmPelsHeight;
  6194. - }
  6195. -
  6196. - CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0,
  6197. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  6198. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  6199. - if (!dimw || !dimh)
  6200. - throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh);
  6201. - assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  6202. - min = max = 0;
  6203. - std::memset(data,0,sizeof(unsigned int)*width*height);
  6204. - return paint();
  6205. - }
  6206. -
  6207. - template<typename T> CImgDisplay& assign(const CImg<T>& img, const char *title=0,
  6208. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  6209. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  6210. - if (img.is_empty())
  6211. - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.",
  6212. - img.width,img.height,img.depth,img.dim,img.data);
  6213. - CImg<T> tmp;
  6214. - const CImg<T>& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  6215. - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  6216. - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
  6217. - return display(nimg);
  6218. - }
  6219. -
  6220. - template<typename T> CImgDisplay& assign(const CImgList<T>& list,const char *title=0,
  6221. - const unsigned int normalization_type=3, const unsigned int events_type=3,
  6222. - const bool fullscreen_flag=false, const bool closed_flag=false) {
  6223. - if (list.is_empty())
  6224. - throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.",
  6225. - list.size,list.data);
  6226. - CImg<T> tmp;
  6227. - const CImg<T> img = list.get_append('x'),
  6228. - &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  6229. - assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag);
  6230. - if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; }
  6231. - return display(nimg);
  6232. - }
  6233. -
  6234. - CImgDisplay& assign(const CImgDisplay& win) {
  6235. - assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed);
  6236. - std::memcpy(data,win.data,sizeof(unsigned int)*width*height);
  6237. - return paint();
  6238. - }
  6239. -
  6240. - CImgDisplay& _assign() {
  6241. - DestroyWindow(window);
  6242. - if (events) TerminateThread(thread,0);
  6243. - if (data) delete[] data;
  6244. - if (title) delete[] title;
  6245. - if (is_fullscreen) _desinit_fullscreen();
  6246. - width = height = normalization = events = 0;
  6247. - is_fullscreen = is_resized = is_moved = is_event = false;
  6248. - is_closed = true;
  6249. - title = 0;
  6250. - window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0;
  6251. - std::memset((void*)buttons,0,256*sizeof(unsigned int));
  6252. - std::memset((void*)keys,0,256*sizeof(unsigned int));
  6253. - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
  6254. - min = max = 0;
  6255. - return *this;
  6256. - }
  6257. -
  6258. - template<typename T> CImgDisplay& display(const CImg<T>& img) {
  6259. - return render(img).paint();
  6260. - }
  6261. -
  6262. - CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) {
  6263. - if (!(nwidth && nheight))
  6264. - throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.",
  6265. - nwidth,nheight);
  6266. - const unsigned int
  6267. - tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100),
  6268. - tmpdimy=(nheight>0)?nheight:(-nheight*height/100),
  6269. - dimx = tmpdimx?tmpdimx:1,
  6270. - dimy = tmpdimy?tmpdimy:1;
  6271. - const bool
  6272. - is_disp_different = (width!=dimx || height!=dimy),
  6273. - is_win_different = (window_width!=dimx || window_height!=dimy);
  6274. -
  6275. - if (is_disp_different || is_win_different) {
  6276. - RECT rect; rect.left=rect.top=0; rect.right = dimx-1; rect.bottom = dimy-1;
  6277. - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
  6278. - const int cwidth = rect.right-rect.left+1, cheight = rect.bottom-rect.top+1;
  6279. - SetWindowPos(window,0,0,0,cwidth,cheight,SWP_NOMOVE | SWP_NOZORDER | SWP_NOCOPYBITS);
  6280. - window_width = dimx;
  6281. - window_height = dimy;
  6282. - is_resized = false;
  6283. - if (is_disp_different) {
  6284. - unsigned int *ndata = new unsigned int[dimx*dimy];
  6285. - if (redraw) _render_resize(data,width,height,ndata,dimx,dimy);
  6286. - else std::memset(ndata,0x80,sizeof(unsigned int)*dimx*dimy);
  6287. - delete[] data;
  6288. - data = ndata;
  6289. - bmi.bmiHeader.biWidth = dimx;
  6290. - bmi.bmiHeader.biHeight = -(int)dimy;
  6291. - width = dimx;
  6292. - height = dimy;
  6293. - }
  6294. - if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2);
  6295. - if (redraw) return paint();
  6296. - }
  6297. - return *this;
  6298. - }
  6299. -
  6300. - CImgDisplay& move(const int posx,const int posy) {
  6301. - if (!is_fullscreen) {
  6302. - RECT rect; rect.left=rect.top=0; rect.right=window_width-1; rect.bottom=window_height-1;
  6303. - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
  6304. - const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1;
  6305. - SetWindowPos(window,0,posx-border1,posy-border2,0,0,SWP_NOSIZE | SWP_NOZORDER);
  6306. - } else SetWindowPos(window,0,posx,posy,0,0,SWP_NOSIZE | SWP_NOZORDER);
  6307. - window_x = posx;
  6308. - window_y = posy;
  6309. - is_moved = false;
  6310. - return show();
  6311. - }
  6312. -
  6313. - // Internal routine to retrieve the position of the current window.
  6314. - CImgDisplay& _update_window_pos() {
  6315. - if (!is_closed) {
  6316. - RECT rect;
  6317. - rect.left = rect.top = 0; rect.right = width-1; rect.bottom = height-1;
  6318. - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
  6319. - const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1;
  6320. - GetWindowRect(window,&rect);
  6321. - window_x = rect.left + border1;
  6322. - window_y = rect.top + border2;
  6323. - } else window_x = window_y = -1;
  6324. - return *this;
  6325. - }
  6326. -
  6327. - CImgDisplay& set_mouse(const int posx, const int posy) {
  6328. - if (!is_closed && posx>=0 && posy>=0) {
  6329. - _update_window_pos();
  6330. - SetCursorPos(window_x+posx,window_y+posy);
  6331. - mouse_x = posx;
  6332. - mouse_y = posy;
  6333. - }
  6334. - return *this;
  6335. - }
  6336. -
  6337. - CImgDisplay& hide_mouse() {
  6338. - visible_cursor = false;
  6339. - ShowCursor(FALSE);
  6340. - SendMessage(window,WM_SETCURSOR,0,0);
  6341. - return *this;
  6342. - }
  6343. -
  6344. - CImgDisplay& show_mouse() {
  6345. - visible_cursor = true;
  6346. - ShowCursor(TRUE);
  6347. - SendMessage(window,WM_SETCURSOR,0,0);
  6348. - return *this;
  6349. - }
  6350. -
  6351. - static void wait_all() {
  6352. - WaitForSingleObject(cimg::Win32attr().wait_event,INFINITE);
  6353. - }
  6354. -
  6355. - CImgDisplay& show() {
  6356. - if (is_closed) {
  6357. - is_closed = false;
  6358. - if (is_fullscreen) _init_fullscreen();
  6359. - ShowWindow(window,SW_SHOW);
  6360. - _update_window_pos();
  6361. - }
  6362. - return paint();
  6363. - }
  6364. -
  6365. - CImgDisplay& close() {
  6366. - if (!is_closed && !is_fullscreen) {
  6367. - if (is_fullscreen) _desinit_fullscreen();
  6368. - ShowWindow(window,SW_HIDE);
  6369. - is_closed = true;
  6370. - window_x = window_y = 0;
  6371. - }
  6372. - return *this;
  6373. - }
  6374. -
  6375. - CImgDisplay& set_title(const char *format,...) {
  6376. - char tmp[1024]={0};
  6377. - va_list ap;
  6378. - va_start(ap, format);
  6379. - std::vsprintf(tmp,format,ap);
  6380. - va_end(ap);
  6381. - if (title) delete[] title;
  6382. - const int s = cimg::strlen(tmp)+1;
  6383. - title = new char[s];
  6384. - std::memcpy(title,tmp,s*sizeof(char));
  6385. - SetWindowTextA(window, tmp);
  6386. - return *this;
  6387. - }
  6388. -
  6389. - CImgDisplay& paint() {
  6390. - if (!is_closed) {
  6391. - WaitForSingleObject(mutex,INFINITE);
  6392. - SetDIBitsToDevice(hdc,0,0,width,height,0,0,0,height,data,&bmi,DIB_RGB_COLORS);
  6393. - ReleaseMutex(mutex);
  6394. - }
  6395. - return *this;
  6396. - }
  6397. -
  6398. - template<typename T> CImgDisplay& render(const CImg<T>& img) {
  6399. - if (img.is_empty())
  6400. - throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.",
  6401. - img.width,img.height,img.depth,img.dim,img.data);
  6402. - if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2));
  6403. -
  6404. - const T
  6405. - *data1 = img.ptr(),
  6406. - *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1,
  6407. - *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1;
  6408. -
  6409. - WaitForSingleObject(mutex,INFINITE);
  6410. - unsigned int
  6411. - *const ndata = (img.width==width && img.height==height)?data:new unsigned int[img.width*img.height],
  6412. - *ptrd = ndata;
  6413. -
  6414. - if (!normalization || (normalization==3 && cimg::type<T>::id()==cimg::type<unsigned char>::id())) {
  6415. - min = max = 0;
  6416. - for (unsigned int xy = img.width*img.height; xy>0; xy--)
  6417. - *(ptrd++) = ((unsigned char)*(data1++)<<16) | ((unsigned char)*(data2++)<<8) | (unsigned char)*(data3++);
  6418. - } else {
  6419. - if (normalization==3) {
  6420. - if (cimg::type<T>::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
  6421. - else { min = (float)cimg::type<T>::min(); max = (float)cimg::type<T>::max(); }
  6422. - } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; }
  6423. - const float delta = max-min, mm = delta?delta:1.0f;
  6424. - for (unsigned int xy = img.width*img.height; xy>0; xy--) {
  6425. - const unsigned char
  6426. - R = (unsigned char)(255*(*(data1++)-min)/mm),
  6427. - G = (unsigned char)(255*(*(data2++)-min)/mm),
  6428. - B = (unsigned char)(255*(*(data3++)-min)/mm);
  6429. - *(ptrd++) = (R<<16) | (G<<8) | (B);
  6430. - }
  6431. - }
  6432. - if (ndata!=data) { _render_resize(ndata,img.width,img.height,data,width,height); delete[] ndata; }
  6433. - ReleaseMutex(mutex);
  6434. - return *this;
  6435. - }
  6436. -
  6437. - CImgDisplay& assign_lowlevel(const unsigned int dimw,const unsigned int dimh,const char *ptitle=0,
  6438. - const unsigned int normalization_type=3,const unsigned int events_type=3,
  6439. - const bool fullscreen_flag=false,const bool closed_flag=false) {
  6440. -
  6441. -
  6442. - // Allocate space for window title
  6443. - const int s = cimg::strlen(ptitle)+1;
  6444. - char *tmp_title = s?new char[s]:0;
  6445. - if (s) std::memcpy(tmp_title,ptitle,s*sizeof(char));
  6446. -
  6447. - // Destroy previous window if existing
  6448. - if (width && height) _assign();
  6449. -
  6450. - // Set display variables
  6451. - width = dimw;
  6452. - height = dimh;
  6453. - normalization = normalization_type%4;
  6454. - events = events_type%4;
  6455. - is_fullscreen = fullscreen_flag;
  6456. - title = tmp_title;
  6457. - window_x = window_y = wheel = 0;
  6458. - mouse_x = mouse_y = -1;
  6459. - std::memset((void*)buttons,0,256*sizeof(unsigned int));
  6460. - std::memset((void*)keys,0,256*sizeof(unsigned int));
  6461. - std::memset((void*)released_keys,0,256*sizeof(unsigned int));
  6462. - is_resized = is_moved = is_event = false;
  6463. - is_closed = closed_flag;
  6464. - fps_timer = fps_frames = timer = 0;
  6465. - fps_fps = 0;
  6466. - visible_cursor = true;
  6467. -
  6468. - if (is_fullscreen) _init_fullscreen();
  6469. -
  6470. - // Create event thread
  6471. - void *arg = (void*)(new void*[2]);
  6472. - ((void**)arg)[0]=(void*)this;
  6473. - ((void**)arg)[1]=(void*)title;
  6474. - if (events) {
  6475. - unsigned long ThreadID = 0;
  6476. - mutex = CreateMutex(0,FALSE,0);
  6477. - created = CreateEvent(0,FALSE,FALSE,0);
  6478. - thread = CreateThread(0,0,_events_thread,arg,0,&ThreadID);
  6479. - WaitForSingleObject(created,INFINITE);
  6480. - } else _events_thread(arg);
  6481. -
  6482. - return *this;
  6483. - }
  6484. -
  6485. - static LRESULT APIENTRY _handle_events(HWND window,UINT msg,WPARAM wParam,LPARAM lParam) {
  6486. -#ifdef _WIN64
  6487. - CImgDisplay* disp = (CImgDisplay*)GetWindowLongPtr(window,GWLP_USERDATA);
  6488. -#else
  6489. - CImgDisplay* disp = (CImgDisplay*)GetWindowLong(window,GWL_USERDATA);
  6490. -#endif
  6491. - MSG st_msg;
  6492. -
  6493. - switch(msg) {
  6494. - case WM_CLOSE:
  6495. - disp->mouse_x = disp->mouse_y = -1;
  6496. - disp->window_x = disp->window_y = 0;
  6497. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6498. - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255);
  6499. - if (disp->key) {
  6500. - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255);
  6501. - disp->released_key = disp->key;
  6502. - }
  6503. - disp->key = disp->button = 0;
  6504. - disp->is_closed=true;
  6505. - ReleaseMutex(disp->mutex);
  6506. - ShowWindow(disp->window,SW_HIDE);
  6507. - disp->is_event = true;
  6508. - SetEvent(cimg::Win32attr().wait_event);
  6509. - return 0;
  6510. - case WM_SIZE: {
  6511. - while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE));
  6512. - WaitForSingleObject(disp->mutex,INFINITE);
  6513. - const unsigned int nw = LOWORD(lParam),nh = HIWORD(lParam);
  6514. - if (nw && nh && (nw!=disp->width || nh!=disp->height)) {
  6515. - disp->window_width = nw;
  6516. - disp->window_height = nh;
  6517. - disp->mouse_x = disp->mouse_y = -1;
  6518. - disp->is_resized = disp->is_event = true;
  6519. - SetEvent(cimg::Win32attr().wait_event);
  6520. - }
  6521. - ReleaseMutex(disp->mutex);
  6522. - } break;
  6523. - case WM_MOVE: {
  6524. - while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE));
  6525. - WaitForSingleObject(disp->mutex,INFINITE);
  6526. - const int nx = (int)(short)(LOWORD(lParam)), ny = (int)(short)(HIWORD(lParam));
  6527. - if (nx!=disp->window_x || ny!=disp->window_y) {
  6528. - disp->window_x = nx;
  6529. - disp->window_y = ny;
  6530. - disp->is_moved = disp->is_event = true;
  6531. - SetEvent(cimg::Win32attr().wait_event);
  6532. - }
  6533. - ReleaseMutex(disp->mutex);
  6534. - } break;
  6535. - case WM_PAINT:
  6536. - disp->paint();
  6537. - break;
  6538. - }
  6539. - if (disp->events>=2) switch(msg) {
  6540. - case WM_KEYDOWN:
  6541. - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = (int)wParam;
  6542. - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = 0;
  6543. - disp->is_event = true;
  6544. - SetEvent(cimg::Win32attr().wait_event);
  6545. - break;
  6546. - case WM_MOUSEMOVE: {
  6547. - while (PeekMessage(&st_msg,window,WM_MOUSEMOVE,WM_MOUSEMOVE,PM_REMOVE));
  6548. - disp->mouse_x = LOWORD(lParam);
  6549. - disp->mouse_y = HIWORD(lParam);
  6550. - if (disp->mouse_x<0 || disp->mouse_y<0 || disp->mouse_x>=disp->dimx() || disp->mouse_y>=disp->dimy())
  6551. - disp->mouse_x=disp->mouse_y=-1;
  6552. - disp->is_event = true;
  6553. - SetEvent(cimg::Win32attr().wait_event);
  6554. - } break;
  6555. - case WM_LBUTTONDOWN:
  6556. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6557. - disp->button|=1U;
  6558. - disp->is_event = true;
  6559. - SetEvent(cimg::Win32attr().wait_event);
  6560. - break;
  6561. - case WM_RBUTTONDOWN:
  6562. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6563. - disp->button|=2U;
  6564. - disp->is_event = true;
  6565. - SetEvent(cimg::Win32attr().wait_event);
  6566. - break;
  6567. - case WM_MBUTTONDOWN:
  6568. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6569. - disp->button|=4U;
  6570. - disp->is_event = true;
  6571. - SetEvent(cimg::Win32attr().wait_event);
  6572. - break;
  6573. - case 0x020A: // WM_MOUSEWHEEL:
  6574. - disp->wheel+=(int)((short)HIWORD(wParam))/120;
  6575. - disp->is_event = true;
  6576. - SetEvent(cimg::Win32attr().wait_event);
  6577. - }
  6578. - if (disp->events>=3) switch(msg) {
  6579. - case WM_KEYUP:
  6580. - std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = 0;
  6581. - std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = (int)wParam;
  6582. - disp->is_event = true;
  6583. - SetEvent(cimg::Win32attr().wait_event);
  6584. - break;
  6585. - case WM_LBUTTONUP:
  6586. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6587. - disp->button&=~1U;
  6588. - disp->is_event = true;
  6589. - SetEvent(cimg::Win32attr().wait_event);
  6590. - break;
  6591. - case WM_RBUTTONUP:
  6592. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6593. - disp->button&=~2U;
  6594. - disp->is_event = true;
  6595. - SetEvent(cimg::Win32attr().wait_event);
  6596. - break;
  6597. - case WM_MBUTTONUP:
  6598. - std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255);
  6599. - disp->button&=~4U;
  6600. - disp->is_event = true;
  6601. - SetEvent(cimg::Win32attr().wait_event);
  6602. - break;
  6603. - case WM_SETCURSOR:
  6604. - if (disp->visible_cursor) ShowCursor(TRUE);
  6605. - else ShowCursor(FALSE);
  6606. - break;
  6607. - }
  6608. - return DefWindowProc(window,msg,wParam,lParam);
  6609. - }
  6610. -
  6611. - static DWORD WINAPI _events_thread(void* arg) {
  6612. - CImgDisplay *disp = (CImgDisplay*)(((void**)arg)[0]);
  6613. - const char *title = (const char*)(((void**)arg)[1]);
  6614. - MSG msg;
  6615. - delete[] (void**)arg;
  6616. - disp->bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
  6617. - disp->bmi.bmiHeader.biWidth=disp->width;
  6618. - disp->bmi.bmiHeader.biHeight=-(int)disp->height;
  6619. - disp->bmi.bmiHeader.biPlanes=1;
  6620. - disp->bmi.bmiHeader.biBitCount=32;
  6621. - disp->bmi.bmiHeader.biCompression=BI_RGB;
  6622. - disp->bmi.bmiHeader.biSizeImage=0;
  6623. - disp->bmi.bmiHeader.biXPelsPerMeter=1;
  6624. - disp->bmi.bmiHeader.biYPelsPerMeter=1;
  6625. - disp->bmi.bmiHeader.biClrUsed=0;
  6626. - disp->bmi.bmiHeader.biClrImportant=0;
  6627. - disp->data = new unsigned int[disp->width*disp->height];
  6628. - if (!disp->is_fullscreen) { // Normal window
  6629. - RECT rect;
  6630. - rect.left=rect.top=0; rect.right=disp->width-1; rect.bottom=disp->height-1;
  6631. - AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false);
  6632. - const int border1 = (rect.right-rect.left+1-disp->width)/2, border2 = rect.bottom-rect.top+1-disp->height-border1;
  6633. - disp->window = CreateWindowA("MDICLIENT",title?title:" ",
  6634. - WS_OVERLAPPEDWINDOW | (disp->is_closed?0:WS_VISIBLE), CW_USEDEFAULT,CW_USEDEFAULT,
  6635. - disp->width + 2*border1, disp->height + border1 + border2,
  6636. - 0,0,0,&(disp->ccs));
  6637. - if (!disp->is_closed) {
  6638. - GetWindowRect(disp->window,&rect);
  6639. - disp->window_x = rect.left + border1;
  6640. - disp->window_y = rect.top + border2;
  6641. - } else disp->window_x = disp->window_y = 0;
  6642. - } else { // Fullscreen window
  6643. - const unsigned int sx = screen_dimx(), sy = screen_dimy();
  6644. - disp->window = CreateWindowA("MDICLIENT",title?title:" ",
  6645. - WS_POPUP | (disp->is_closed?0:WS_VISIBLE), (sx-disp->width)/2, (sy-disp->height)/2,
  6646. - disp->width,disp->height,0,0,0,&(disp->ccs));
  6647. - disp->window_x = disp->window_y = 0;
  6648. - }
  6649. - SetForegroundWindow(disp->window);
  6650. - disp->hdc = GetDC(disp->window);
  6651. - disp->window_width = disp->width;
  6652. - disp->window_height = disp->height;
  6653. - disp->mouse_x = disp->mouse_y = -1;
  6654. - disp->wheel = 0;
  6655. - std::memset((void*)disp->buttons,0,256*sizeof(unsigned int));
  6656. - std::memset((void*)disp->keys,0,256*sizeof(unsigned int));
  6657. - std::memset((void*)disp->released_keys,0,256*sizeof(unsigned int));
  6658. - disp->is_resized = disp->is_moved = disp->is_event = false;
  6659. - if (disp->events) {
  6660. -#ifdef _WIN64
  6661. - SetWindowLongPtr(disp->window,GWLP_USERDATA,(LONG_PTR)disp);
  6662. - SetWindowLongPtr(disp->window,GWLP_WNDPROC,(LONG_PTR)_handle_events);
  6663. -#else
  6664. - SetWindowLong(disp->window,GWL_USERDATA,(LONG)disp);
  6665. - SetWindowLong(disp->window,GWL_WNDPROC,(LONG)_handle_events);
  6666. -#endif
  6667. - SetEvent(disp->created);
  6668. - while( GetMessage(&msg,0,0,0) ) DispatchMessage( &msg );
  6669. - }
  6670. - return 0;
  6671. - }
  6672. -
  6673. - void _init_fullscreen() {
  6674. - background_window = 0;
  6675. - if (is_fullscreen && !is_closed) {
  6676. - DEVMODE mode;
  6677. - unsigned int imode=0, ibest=0, bestbpp=0, bw=~0U, bh=~0U;
  6678. - for (mode.dmSize = sizeof(DEVMODE), mode.dmDriverExtra = 0; EnumDisplaySettings(0,imode,&mode); imode++) {
  6679. - const unsigned int nw = mode.dmPelsWidth, nh = mode.dmPelsHeight;
  6680. - if (nw>=width && nh>=height && mode.dmBitsPerPel>=bestbpp && nw<=bw && nh<=bh) {
  6681. - bestbpp = mode.dmBitsPerPel;
  6682. - ibest = imode;
  6683. - bw = nw; bh = nh;
  6684. - }
  6685. - }
  6686. - if (bestbpp) {
  6687. - curr_mode.dmSize = sizeof(DEVMODE); curr_mode.dmDriverExtra = 0;
  6688. - EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&curr_mode);
  6689. - EnumDisplaySettings(0,ibest,&mode);
  6690. - ChangeDisplaySettings(&mode,0);
  6691. - } else curr_mode.dmSize = 0;
  6692. -
  6693. - const unsigned int sx = screen_dimx(), sy = screen_dimy();
  6694. - if (sx!=width || sy!=height) {
  6695. - CLIENTCREATESTRUCT background_ccs;
  6696. - background_window = CreateWindowA("MDICLIENT"," ",WS_POPUP | WS_VISIBLE, 0,0,sx,sy,0,0,0,&background_ccs);
  6697. - SetForegroundWindow(background_window);
  6698. - }
  6699. - } else curr_mode.dmSize = 0;
  6700. - }
  6701. -
  6702. - void _desinit_fullscreen() {
  6703. - if (is_fullscreen) {
  6704. - if (background_window) DestroyWindow(background_window);
  6705. - background_window = 0;
  6706. - if (curr_mode.dmSize) ChangeDisplaySettings(&curr_mode,0);
  6707. - is_fullscreen = false;
  6708. - }
  6709. - }
  6710. -
  6711. -#endif
  6712. -
  6713. - };
  6714. -
  6715. - /*
  6716. - #--------------------------------------
  6717. - #
  6718. - #
  6719. - #
  6720. - # Definition of the CImg<T> structure
  6721. - #
  6722. - #
  6723. - #
  6724. - #--------------------------------------
  6725. - */
  6726. -
  6727. - //! Class representing an image (up to 4 dimensions wide), each pixel being of type \c T.
  6728. - /**
  6729. - This is the main class of the %CImg Library. It declares and constructs
  6730. - an image, allows access to its pixel values, and is able to perform various image operations.
  6731. -
  6732. - \par Image representation
  6733. -
  6734. - A %CImg image is defined as an instance of the container \ref CImg<T>, which contains a regular grid of pixels,
  6735. - each pixel value being of type \c T. The image grid can have up to 4 dimensions : width, height, depth
  6736. - and number of channels.
  6737. - Usually, the three first dimensions are used to describe spatial coordinates <tt>(x,y,z)</tt>, while the number of channels
  6738. - is rather used as a vector-valued dimension (it may describe the R,G,B color channels for instance).
  6739. - If you need a fifth dimension, you can use image lists \ref CImgList<T> rather than simple images \ref CImg<T>.
  6740. -
  6741. - Thus, the \ref CImg<T> class is able to represent volumetric images of vector-valued pixels,
  6742. - as well as images with less dimensions (1D scalar signal, 2D color images, ...).
  6743. - Most member functions of the class CImg<T> are designed to handle this maximum case of (3+1) dimensions.
  6744. -
  6745. - Concerning the pixel value type \c T :
  6746. - fully supported template types are the basic C++ types : <tt>unsigned char, char, short, unsigned int, int,
  6747. - unsigned long, long, float, double, ... </tt>.
  6748. - Typically, fast image display can be done using <tt>CImg<unsigned char></tt> images,
  6749. - while complex image processing algorithms may be rather coded using <tt>CImg<float></tt> or <tt>CImg<double></tt>
  6750. - images that have floating-point pixel values. The default value for the template T is \c float.
  6751. - Using your own template types may be possible. However, you will certainly have to define the complete set
  6752. - of arithmetic and logical operators for your class.
  6753. -
  6754. - \par Image structure
  6755. -
  6756. - The \ref CImg<\c T> structure contains \a five fields :
  6757. - - \ref width defines the number of \a columns of the image (size along the X-axis).
  6758. - - \ref height defines the number of \a rows of the image (size along the Y-axis).
  6759. - - \ref depth defines the number of \a slices of the image (size along the Z-axis).
  6760. - - \ref dim defines the number of \a channels of the image (size along the V-axis).
  6761. - - \ref data defines a \a pointer to the \a pixel \a data (of type \c T).
  6762. -
  6763. - You can access these fields publicly although it is recommended to use the dedicated functions
  6764. - dimx(), dimy(), dimz(), dimv() and ptr() to do so.
  6765. - Image dimensions are not limited to a specific range (as long as you got enough available memory).
  6766. - A value of \e 1 usually means that the corresponding dimension is \a flat.
  6767. - If one of the dimensions is \e 0, or if the data pointer is null, the image is considered as \e empty.
  6768. - Empty images should not contain any pixel data and thus, will not be processed by CImg member functions
  6769. - (a CImgInstanceException will be thrown instead).
  6770. - Pixel data are stored in memory, in a non interlaced mode (See \ref cimg_storage).
  6771. -
  6772. - \par Image declaration and construction
  6773. -
  6774. - Declaring an image can be done by using one of the several available constructors.
  6775. - Here is a list of the most used :
  6776. -
  6777. - - Construct images from arbitrary dimensions :
  6778. - - <tt>CImg<char> img;</tt> declares an empty image.
  6779. - - <tt>CImg<unsigned char> img(128,128);</tt> declares a 128x128 greyscale image with
  6780. - \c unsigned \c char pixel values.
  6781. - - <tt>CImg<double> img(3,3);</tt> declares a 3x3 matrix with \c double coefficients.
  6782. - - <tt>CImg<unsigned char> img(256,256,1,3);</tt> declares a 256x256x1x3 (color) image
  6783. - (colors are stored as an image with three channels).
  6784. - - <tt>CImg<double> img(128,128,128);</tt> declares a 128x128x128 volumetric and greyscale image
  6785. - (with \c double pixel values).
  6786. - - <tt>CImg<> img(128,128,128,3);</tt> declares a 128x128x128 volumetric color image
  6787. - (with \c float pixels, which is the default value of the template parameter \c T).
  6788. - - \b Note : images pixels are <b>not automatically initialized to 0</b>. You may use the function \ref fill() to
  6789. - do it, or use the specific constructor taking 5 parameters like this :
  6790. - <tt>CImg<> img(128,128,128,3,0);</tt> declares a 128x128x128 volumetric color image with all pixel values to 0.
  6791. -
  6792. - - Construct images from filenames :
  6793. - - <tt>CImg<unsigned char> img("image.jpg");</tt> reads a JPEG color image from the file "image.jpg".
  6794. - - <tt>CImg<float> img("analyze.hdr");</tt> reads a volumetric image (ANALYZE7.5 format) from the file "analyze.hdr".
  6795. - - \b Note : You need to install <a href="http://www.imagemagick.org">ImageMagick</a>
  6796. - to be able to read common compressed image formats (JPG,PNG,...) (See \ref cimg_files_io).
  6797. -
  6798. - - Construct images from C-style arrays :
  6799. - - <tt>CImg<int> img(data_buffer,256,256);</tt> constructs a 256x256 greyscale image from a \c int* buffer
  6800. - \c data_buffer (of size 256x256=65536).
  6801. - - <tt>CImg<unsigned char> img(data_buffer,256,256,1,3,false);</tt> constructs a 256x256 color image
  6802. - from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels follow each others).
  6803. - - <tt>CImg<unsigned char> img(data_buffer,256,256,1,3,true);</tt> constructs a 256x256 color image
  6804. - from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels are multiplexed).
  6805. -
  6806. - The complete list of constructors can be found <a href="#constructors">here</a>.
  6807. -
  6808. - \par Most useful functions
  6809. -
  6810. - The \ref CImg<T> class contains a lot of functions that operates on images.
  6811. - Some of the most useful are :
  6812. -
  6813. - - operator()(), operator[]() : allows to access or write pixel values.
  6814. - - display() : displays the image in a new window.
  6815. -
  6816. - \sa CImgList, CImgStats, CImgDisplay, CImgException.
  6817. -
  6818. - **/
  6819. - template<typename T> struct CImg {
  6820. -
  6821. - //! Variable representing the width of the instance image (i.e. dimensions along the X-axis).
  6822. - /**
  6823. - \remark
  6824. - - Prefer using the function CImg<T>::dimx() to get information about the width of an image.
  6825. - - Use function CImg<T>::resize() to set a new width for an image. Setting directly the variable \c width would probably
  6826. - result in a library crash.
  6827. - - Empty images have \c width defined to \c 0.
  6828. - **/
  6829. - unsigned int width;
  6830. -
  6831. - //! Variable representing the height of the instance image (i.e. dimensions along the Y-axis).
  6832. - /**
  6833. - \remark
  6834. - - Prefer using the function CImg<T>::dimy() to get information about the height of an image.
  6835. - - Use function CImg<T>::resize() to set a new height for an image. Setting directly the variable \c height would probably
  6836. - result in a library crash.
  6837. - - 1D signals have \c height defined to \c 1.
  6838. - - Empty images have \c height defined to \c 0.
  6839. - **/
  6840. - unsigned int height;
  6841. -
  6842. - //! Variable representing the depth of the instance image (i.e. dimensions along the Z-axis).
  6843. - /**
  6844. - \remark
  6845. - - Prefer using the function CImg<T>::dimz() to get information about the depth of an image.
  6846. - - Use function CImg<T>::resize() to set a new depth for an image. Setting directly the variable \c depth would probably
  6847. - result in a library crash.
  6848. - - Classical 2D images have \c depth defined to \c 1.
  6849. - - Empty images have \c depth defined to \c 0.
  6850. - **/
  6851. - unsigned int depth;
  6852. -
  6853. - //! Variable representing the number of channels of the instance image (i.e. dimensions along the V-axis).
  6854. - /**
  6855. - \remark
  6856. - - Prefer using the function CImg<T>::dimv() to get information about the depth of an image.
  6857. - - Use function CImg<T>::resize() to set a new vector dimension for an image. Setting directly the variable \c dim would probably
  6858. - result in a library crash.
  6859. - - Scalar-valued images (one value per pixel) have \c dim defined to \c 1.
  6860. - - Empty images have \c depth defined to \c 0.
  6861. - **/
  6862. - unsigned int dim;
  6863. -
  6864. - //! Variable telling if pixel buffer of the instance image is shared with another one.
  6865. - bool is_shared;
  6866. -
  6867. - //! Pointer to the first pixel of the pixel buffer.
  6868. - T *data;
  6869. -
  6870. - //! Iterator type for CImg<T>.
  6871. - /**
  6872. - \remark
  6873. - - An \p iterator is a <tt>T*</tt> pointer (address of a pixel value in the pixel buffer).
  6874. - - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL.
  6875. - **/
  6876. - typedef T* iterator;
  6877. -
  6878. - //! Const iterator type for CImg<T>.
  6879. - /**
  6880. - \remark
  6881. - - A \p const_iterator is a <tt>const T*</tt> pointer (address of a pixel value in the pixel buffer).
  6882. - - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL.
  6883. - **/
  6884. - typedef const T* const_iterator;
  6885. -
  6886. - //! Get value type
  6887. - typedef T value_type;
  6888. -
  6889. - //@}
  6890. - //---------------------------
  6891. - //
  6892. - //! \name Plugins
  6893. - //@{
  6894. - //---------------------------
  6895. -#ifdef cimg_plugin
  6896. -#include cimg_plugin
  6897. -#endif
  6898. - //@}
  6899. -
  6900. - //--------------------------------------
  6901. - //
  6902. - //! \name Constructors-Destructor-Copy
  6903. - //@{
  6904. - //--------------------------------------
  6905. -
  6906. - //! Default constructor.
  6907. - /**
  6908. - The default constructor creates an empty instance image.
  6909. - \remark
  6910. - - An empty image does not contain any data and has all of its dimensions \ref width, \ref height, \ref depth, \ref dim
  6911. - set to 0 as well as its pointer to the pixel buffer \ref data.
  6912. - - An empty image is non-shared.
  6913. - \see ~CImg(), assign(), is_empty().
  6914. - **/
  6915. - CImg():
  6916. - width(0),height(0),depth(0),dim(0),is_shared(false),data(0) {}
  6917. -
  6918. - //! Destructor.
  6919. - /**
  6920. - The destructor destroys the instance image.
  6921. - \remark
  6922. - - Destructing an empty or shared image does nothing.
  6923. - - Otherwise, all memory used to store the pixel data of the instance image is freed.
  6924. - - When destroying a non-shared image, be sure that every shared instances of the same image are
  6925. - also destroyed to avoid further access to desallocated memory buffers.
  6926. - \see CImg(), assign(), is_empty().
  6927. - **/
  6928. - ~CImg() {
  6929. - if (data && !is_shared) delete[] data;
  6930. - }
  6931. -
  6932. - //! In-place version of the default constructor.
  6933. - /**
  6934. - This function replaces the instance image by an empty image.
  6935. - \remark
  6936. - - Memory used by the previous content of the instance image is freed if necessary.
  6937. - - If the instance image was initially shared, it is replaced by a (non-shared) empty image.
  6938. - - This function is useful to free memory used by an image that is not of use, but which
  6939. - has been created in the current code scope (i.e. not destroyed yet).
  6940. - \see ~CImg(), assign(), is_empty().
  6941. - **/
  6942. - CImg& assign() {
  6943. - if (data && !is_shared) delete[] data;
  6944. - width = height = depth = dim = 0; is_shared = false; data = 0;
  6945. - return *this;
  6946. - }
  6947. -
  6948. - //! In-place version of the default constructor.
  6949. - /**
  6950. - This function is strictly equivalent to \ref assign() and has been
  6951. - introduced for having a STL-compliant function name.
  6952. - \see assign().
  6953. - **/
  6954. - CImg& clear() {
  6955. - return assign();
  6956. - }
  6957. -
  6958. - //! Default copy constructor.
  6959. - /**
  6960. - The default copy constructor creates a new instance image having same dimensions
  6961. - (\ref width, \ref height, \ref depth, \ref dim) and same pixel values as the input image \p img.
  6962. - \param img The input image to copy.
  6963. - \remark
  6964. - - If the input image \p img is non-shared or have a different template type \p t != \p T,
  6965. - the default copy constructor allocates a new pixel buffer and copy the pixel data
  6966. - of \p img into it. In this case, the pointers \ref data to the pixel buffers of the two images are different
  6967. - and the resulting instance image is non-shared.
  6968. - - If the input image \p img is shared and has the same template type \p t == \p T,
  6969. - the default copy constructor does not allocate a new pixel buffer and the resulting instance image
  6970. - shares its pixel buffer with the input image \p img, which means that modifying pixels of \p img also modifies
  6971. - the created instance image.
  6972. - - Copying an image having a different template type \p t != \p T performs a crude static cast conversion of each pixel value from
  6973. - type \p t to type \p T.
  6974. - - Copying an image having the same template type \p t == \p T is significantly faster.
  6975. - \see assign(const CImg< t >&), CImg(const CImg< t >&,const bool).
  6976. - **/
  6977. - template<typename t> CImg(const CImg<t>& img):is_shared(false) {
  6978. - const unsigned int siz = img.size();
  6979. - if (img.data && siz) {
  6980. - width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz];
  6981. - const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
  6982. - } else { width = height = depth = dim = 0; data = 0; }
  6983. - }
  6984. -
  6985. - CImg(const CImg& img) {
  6986. - const unsigned int siz = img.size();
  6987. - if (img.data && siz) {
  6988. - width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = img.is_shared;
  6989. - if (is_shared) data = const_cast<T*>(img.data);
  6990. - else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); }
  6991. - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  6992. - }
  6993. -
  6994. - //! In-place version of the default copy constructor.
  6995. - /**
  6996. - This function assigns a copy of the input image \p img to the current instance image.
  6997. - \param img The input image to copy.
  6998. - \remark
  6999. - - If the instance image is not shared, the content of the input image \p img is copied into a new buffer
  7000. - becoming the new pixel buffer of the instance image, while the old pixel buffer is freed if necessary.
  7001. - - If the instance image is shared, the content of the input image \p img is copied into the current (shared) pixel buffer
  7002. - of the instance image, modifying then the image referenced by the shared instance image. The instance image still remains shared.
  7003. - \see CImg(const CImg< t >&), operator=(const CImg< t >&).
  7004. - **/
  7005. - template<typename t> CImg& assign(const CImg<t>& img) {
  7006. - return assign(img.data,img.width,img.height,img.depth,img.dim);
  7007. - }
  7008. -
  7009. - //! Advanced copy constructor.
  7010. - /**
  7011. - The advanced copy constructor - as the default constructor CImg(const CImg< t >&) - creates a new instance image having same dimensions
  7012. - \ref width, \ref height, \ref depth, \ref dim and same pixel values as the input image \p img.
  7013. - But it also decides if the created instance image shares its memory with the input image \p img (if the input parameter
  7014. - \p shared is set to \p true) or not (if the input parameter \p shared is set to \p false).
  7015. - \param img The input image to copy.
  7016. - \param shared Boolean flag that decides if the copy is shared on non-shared.
  7017. - \remark
  7018. - - It is not possible to create a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T.
  7019. - - If a non-shared copy of the input image \p img is created, a new memory buffer is allocated for pixel data.
  7020. - - If a shared copy of the input image \p img is created, no extra memory is allocated and the pixel buffer of the instance
  7021. - image is the same as the one used by the input image \p img.
  7022. - \see CImg(const CImg< t >&), assign(const CImg< t >&,const bool).
  7023. - **/
  7024. - template<typename t> CImg(const CImg<t>& img, const bool shared):is_shared(false) {
  7025. - if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a CImg<%s> image "
  7026. - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
  7027. - const unsigned int siz = img.size();
  7028. - if (img.data && siz) {
  7029. - width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz];
  7030. - const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
  7031. - } else { width = height = depth = dim = 0; data = 0; }
  7032. - }
  7033. -
  7034. - CImg(const CImg& img, const bool shared) {
  7035. - const unsigned int siz = img.size();
  7036. - if (img.data && siz) {
  7037. - width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = shared;
  7038. - if (is_shared) data = const_cast<T*>(img.data);
  7039. - else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); }
  7040. - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  7041. - }
  7042. -
  7043. - //! In-place version of the advanced constructor.
  7044. - /**
  7045. - This function - as the simpler function assign(const CImg< t >&) - assigns a copy of the input image \p img to the
  7046. - current instance image. But it also decides if the copy is shared (if the input parameter \p shared is set to \true) or non-shared
  7047. - (if the input parameter \p shared is set to false).
  7048. - \param img The input image to copy.
  7049. - \param shared Boolean flag that decides if the copy is shared or non-shared.
  7050. - \remark
  7051. - - It is not possible to assign a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T.
  7052. - - If a non-shared copy of the input image \p img is assigned, a new memory buffer is allocated for pixel data.
  7053. - - If a shared copy of the input image \p img is assigned, no extra memory is allocated and the pixel buffer of the instance
  7054. - image is the same as the one used by the input image \p img.
  7055. - \see CImg(const CImg< t >&,const bool), assign(const CImg< t >&).
  7056. - **/
  7057. - template<typename t> CImg& assign(const CImg<t>& img, const bool shared) {
  7058. - return assign(img.data,img.width,img.height,img.depth,img.dim,shared);
  7059. - }
  7060. -
  7061. - //! Constructs a new image with given size (\p dx,\p dy,\p dz,\p dv).
  7062. - /**
  7063. - This constructors create an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T.
  7064. - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
  7065. - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
  7066. - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
  7067. - \param dv Desired size along the V-axis, i.e. the number of image channels \ref dim.
  7068. - \remark
  7069. - - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the created image is empty
  7070. - and all has its dimensions set to 0. No memory for pixel data is then allocated.
  7071. - - This constructor creates only non-shared images.
  7072. - - Image pixels allocated by this constructor are \b not \b initialized.
  7073. - Use the constructor CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&)
  7074. - to get an image of desired size with pixels set to a particular value.
  7075. - \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int),
  7076. - CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&).
  7077. - **/
  7078. - explicit CImg(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1):
  7079. - is_shared(false) {
  7080. - const unsigned int siz = dx*dy*dz*dv;
  7081. - if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; }
  7082. - else { width = height = depth = dim = 0; data = 0; }
  7083. - }
  7084. -
  7085. - //! In-place version of the previous constructor.
  7086. - /**
  7087. - This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T.
  7088. - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
  7089. - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
  7090. - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
  7091. - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
  7092. - - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the instance image becomes empty
  7093. - and all has its dimensions set to 0. No memory for pixel data is then allocated.
  7094. - - Memory buffer used to store previous pixel values is freed if necessary.
  7095. - - If the instance image is shared, this constructor actually does nothing more than verifying
  7096. - that new and old image dimensions fit.
  7097. - - Image pixels allocated by this function are \b not \b initialized.
  7098. - Use the function assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&)
  7099. - to assign an image of desired size with pixels set to a particular value.
  7100. - \see CImg(), assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
  7101. - **/
  7102. - CImg& assign(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1) {
  7103. - const unsigned long siz = dx*dy*dz*dv, curr_siz = size();
  7104. - if (is_shared) {
  7105. - if (siz!=curr_siz)
  7106. - throw CImgArgumentException("CImg<%s>::assign() : Cannot assign image (%u,%u,%u,%u) to shared instance image (%u,%u,%u,%u,%p).",
  7107. - pixel_type(),dx,dy,dz,dv,width,height,depth,dim,data);
  7108. - } else {
  7109. - if (siz) {
  7110. - if (siz!=curr_siz) { if (data) delete[] data; data = new T[siz]; }
  7111. - width = dx; height = dy; depth = dz; dim = dv;
  7112. - } else {
  7113. - if (data) delete[] data;
  7114. - width = height = depth = dim = 0; data = 0;
  7115. - }
  7116. - }
  7117. - return *this;
  7118. - }
  7119. -
  7120. - //! Construct an image with given size (\p dx,\p dy,\p dz,\p dv) and with pixel having a default value \p val.
  7121. - /**
  7122. - This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T and sets all pixel
  7123. - values of the created instance image to \p val.
  7124. - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
  7125. - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
  7126. - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
  7127. - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
  7128. - \param val Default value for image pixels.
  7129. - \remark
  7130. - - This constructor has the same properties as CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
  7131. - \see CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
  7132. - **/
  7133. - CImg(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val):
  7134. - is_shared(false) {
  7135. - const unsigned int siz = dx*dy*dz*dv;
  7136. - if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; fill(val); }
  7137. - else { width = height = depth = dim = 0; data = 0; }
  7138. - }
  7139. -
  7140. - //! In-place version of the previous constructor.
  7141. - /**
  7142. - This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T
  7143. - and sets all pixel values of the instance image to \p val.
  7144. - \param dx Desired size along the X-axis, i.e. the \ref width of the image.
  7145. - \param dy Desired size along the Y-axis, i.e. the \ref height of the image.
  7146. - \param dz Desired size along the Z-axis, i.e. the \ref depth of the image.
  7147. - \param dv Desired size along the V-axis, i.e. the number of image channels \p dim.
  7148. - \param val Default value for image pixels.
  7149. - \remark
  7150. - - This function has the same properties as assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
  7151. - \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int).
  7152. - **/
  7153. - CImg& assign(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val) {
  7154. - return assign(dx,dy,dz,dv).fill(val);
  7155. - }
  7156. -
  7157. - //! Construct an image from an image file.
  7158. - /**
  7159. - This constructor creates an instance image by reading it from a file.
  7160. - \param filename Filename of the image file.
  7161. - \remark
  7162. - - The image format is deduced from the filename only by looking for the filename extension i.e. without
  7163. - analyzing the file itself.
  7164. - - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with.
  7165. - More informations on this topic can be found in cimg_files_io.
  7166. - - If the filename is not found, a CImgIOException is thrown by this constructor.
  7167. - \see assign(const char *const), load(const char *const)
  7168. - **/
  7169. - CImg(const char *const filename):width(0),height(0),depth(0),dim(0),is_shared(false),data(0) {
  7170. - assign(filename);
  7171. - }
  7172. -
  7173. - //! In-place version of the previous constructor.
  7174. - /**
  7175. - This function replaces the instance image by the one that have been read from the given file.
  7176. - \param filename Filename of the image file.
  7177. - - The image format is deduced from the filename only by looking for the filename extension i.e. without
  7178. - analyzing the file itself.
  7179. - - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with.
  7180. - More informations on this topic can be found in cimg_files_io.
  7181. - - If the filename is not found, a CImgIOException is thrown by this constructor.
  7182. - **/
  7183. - CImg& assign(const char *const filename) {
  7184. - return load(filename);
  7185. - }
  7186. -
  7187. - //! Construct an image from raw memory buffer.
  7188. - /**
  7189. - This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) and fill its pixel buffer by
  7190. - copying data values from the input raw pixel buffer \p data_buffer.
  7191. - **/
  7192. - template<typename t> CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1,
  7193. - const unsigned int dz=1, const unsigned int dv=1, const bool shared=false):is_shared(false) {
  7194. - if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a (%s*) buffer "
  7195. - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
  7196. - const unsigned int siz = dx*dy*dz*dv;
  7197. - if (data_buffer && siz) {
  7198. - width = dx; height = dy; depth = dz; dim = dv; data = new T[siz];
  7199. - const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
  7200. - } else { width = height = depth = dim = 0; data = 0; }
  7201. - }
  7202. -
  7203. -#ifdef cimg_use_visualcpp6
  7204. - CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy,
  7205. - const unsigned int dz, const unsigned int dv, const bool shared) {
  7206. -#else
  7207. - CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1,
  7208. - const unsigned int dz=1, const unsigned int dv=1, const bool shared=false) {
  7209. -#endif
  7210. - const unsigned int siz = dx*dy*dz*dv;
  7211. - if (data_buffer && siz) {
  7212. - width = dx; height = dy; depth = dz; dim = dv; is_shared = shared;
  7213. - if (is_shared) data = const_cast<T*>(data_buffer);
  7214. - else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); }
  7215. - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  7216. - }
  7217. -
  7218. - template<typename t> CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1) {
  7219. -
  7220. - }
  7221. -
  7222. - //! In-place version of the previous constructor.
  7223. -#ifdef cimg_use_visualcpp6
  7224. - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy,
  7225. - const unsigned int dz, const unsigned int dv) {
  7226. -#else
  7227. - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1,
  7228. - const unsigned int dz=1, const unsigned int dv=1) {
  7229. -#endif
  7230. - assign(dx,dy,dz,dv);
  7231. - const unsigned int siz = dx*dy*dz*dv;
  7232. - if (data_buffer && siz) { const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); }
  7233. - else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  7234. - return *this;
  7235. - }
  7236. -
  7237. - CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1,
  7238. - const unsigned int dz=1, const unsigned int dv=1) {
  7239. - assign(dx,dy,dz,dv);
  7240. - const unsigned int siz = dx*dy*dz*dv;
  7241. - if (data_buffer && siz) std::memcpy(data,data_buffer,siz*sizeof(T));
  7242. - else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  7243. - return *this;
  7244. - }
  7245. -
  7246. - //! In-place version of the previous constructor, allowing to force the shared state of the instance image.
  7247. - template<typename t> CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy,
  7248. - const unsigned int dz, const unsigned int dv, const bool shared) {
  7249. - if (shared) throw CImgArgumentException("CImg<%s>::assign() : Cannot define a shared copy from a CImg<%s> image "
  7250. - "(different pixel types).",pixel_type(),CImg<t>::pixel_type());
  7251. - if (data && !is_shared) delete[] data;
  7252. - is_shared = false;
  7253. - const unsigned int siz = dx*dy*dz*dv;
  7254. - if (data_buffer && siz) {
  7255. - width = dx; height = dy; depth = dz; dim = dv; data = new T[siz];
  7256. - const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs);
  7257. - } else { width = height = depth = dim = 0; data = 0; }
  7258. - return *this;
  7259. - }
  7260. -
  7261. - CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy,
  7262. - const unsigned int dz, const unsigned int dv, const bool shared) {
  7263. - if (data && !is_shared) delete[] data;
  7264. - const unsigned int siz = dx*dy*dz*dv;
  7265. - if (data_buffer && siz) {
  7266. - width = dx; height = dy; depth = dz; dim = dv; is_shared = shared;
  7267. - if (is_shared) data = const_cast<T*>(data_buffer);
  7268. - else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); }
  7269. - } else { width = height = depth = dim = 0; is_shared = false; data = 0; }
  7270. - return *this;
  7271. - }
  7272. -
  7273. - // INNER ROUTINE : Swap fields of an image (use it carefully!)
  7274. - // If one of the image is shared, its content is replaced by the non-shared image (which remains unchanged).
  7275. - CImg& swap(CImg& img) {
  7276. - if (img.is_shared==is_shared) {
  7277. - cimg::swap(width,img.width);
  7278. - cimg::swap(height,img.height);
  7279. - cimg::swap(depth,img.depth);
  7280. - cimg::swap(dim,img.dim);
  7281. - cimg::swap(data,img.data);
  7282. - } else {
  7283. - if (img.is_shared) img.assign(*this);
  7284. - else assign(img);
  7285. - }
  7286. - return img;
  7287. - }
  7288. -
  7289. - //@}
  7290. - //-------------------------------------
  7291. - //
  7292. - //! \name Image Informations
  7293. - //@{
  7294. - //-------------------------------------
  7295. -
  7296. - //! Return the type of the pixel values.
  7297. - /**
  7298. - \return a string describing the type of the image pixels (template parameter \p T).
  7299. - - The string returned may contains spaces (<tt>"unsigned char"</tt>).
  7300. - - If the template parameter T does not correspond to a registered type, the string <tt>"unknown"</tt> is returned.
  7301. - **/
  7302. - static const char* pixel_type() {
  7303. - return cimg::type<T>::id();
  7304. - }
  7305. -
  7306. - //! Return the total number of pixel values in an image.
  7307. - /**
  7308. - - Equivalent to : dimx() * dimy() * dimz() * dimv().
  7309. -
  7310. - \par example:
  7311. - \code
  7312. - CImg<> img(100,100,1,3);
  7313. - if (img.size()==100*100*3) std::fprintf(stderr,"This statement is true");
  7314. - \endcode
  7315. - \sa dimx(), dimy(), dimz(), dimv()
  7316. - **/
  7317. - unsigned long size() const {
  7318. - return width*height*depth*dim;
  7319. - }
  7320. -
  7321. - //! Return the number of columns of the instance image (size along the X-axis, i.e image width).
  7322. - /**
  7323. - \sa width, dimy(), dimz(), dimv(), size().
  7324. - **/
  7325. - int dimx() const {
  7326. - return (int)width;
  7327. - }
  7328. -
  7329. - //! Return the number of rows of the instance image (size along the Y-axis, i.e image height).
  7330. - /**
  7331. - \sa height, dimx(), dimz(), dimv(), size().
  7332. - **/
  7333. - int dimy() const {
  7334. - return (int)height;
  7335. - }
  7336. -
  7337. - //! Return the number of slices of the instance image (size along the Z-axis).
  7338. - /**
  7339. - \sa depth, dimx(), dimy(), dimv(), size().
  7340. - **/
  7341. - int dimz() const {
  7342. - return (int)depth;
  7343. - }
  7344. -
  7345. - //! Return the number of vector channels of the instance image (size along the V-axis).
  7346. - /**
  7347. - \sa dim, dimx(), dimy(), dimz(), size().
  7348. - **/
  7349. - int dimv() const {
  7350. - return (int)dim;
  7351. - }
  7352. -
  7353. - //! Return \c true if images \c (*this) and \c img have same width.
  7354. - template<typename t> bool is_sameX(const CImg<t>& img) const {
  7355. - return (width==img.width);
  7356. - }
  7357. -
  7358. - //! Return \c true if images \c (*this) and the display \c disp have same width.
  7359. - bool is_sameX(const CImgDisplay& disp) const {
  7360. - return (width==disp.width);
  7361. - }
  7362. -
  7363. - //! Return \c true if images \c (*this) and \c img have same height.
  7364. - template<typename t> bool is_sameY(const CImg<t>& img) const {
  7365. - return (height==img.height);
  7366. - }
  7367. -
  7368. - //! Return \c true if images \c (*this) and the display \c disp have same height.
  7369. - bool is_sameY(const CImgDisplay& disp) const {
  7370. - return (height==disp.height);
  7371. - }
  7372. -
  7373. - //! Return \c true if images \c (*this) and \c img have same depth.
  7374. - template<typename t> bool is_sameZ(const CImg<t>& img) const {
  7375. - return (depth==img.depth);
  7376. - }
  7377. -
  7378. - //! Return \c true if images \c (*this) and \c img have same dim.
  7379. - template<typename t> bool is_sameV(const CImg<t>& img) const {
  7380. - return (dim==img.dim);
  7381. - }
  7382. -
  7383. - //! Return \c true if images have same width and same height.
  7384. - template<typename t> bool is_sameXY(const CImg<t>& img) const {
  7385. - return (is_sameX(img) && is_sameY(img));
  7386. - }
  7387. -
  7388. - //! Return \c true if image \c (*this) and the display \c disp have same width and same height.
  7389. - bool is_sameXY(const CImgDisplay& disp) const {
  7390. - return (is_sameX(disp) && is_sameY(disp));
  7391. - }
  7392. -
  7393. - //! Return \c true if images have same width, same height and same depth.
  7394. - template<typename t> bool is_sameXYZ(const CImg<t>& img) const {
  7395. - return (is_sameXY(img) && is_sameZ(img));
  7396. - }
  7397. -
  7398. - //! Return \c true if images \c (*this) and \c img have same width, same height, same depth and same number of channels.
  7399. - template<typename t> bool is_sameXYZV(const CImg<t>& img) const {
  7400. - return (is_sameXYZ(img) && is_sameV(img));
  7401. - }
  7402. -
  7403. - //! Return \c true if pixel (x,y,z,v) is inside the image boundaries.
  7404. - bool contains(const int x, const int y=0, const int z=0, const int v=0) const {
  7405. - return data && x>=0 && x<(int)width && y>=0 && y<(int)height && z>=0 && z<(int)depth && v>=0 && v<(int)dim;
  7406. - }
  7407. -
  7408. - //! Return \c true if current image is empty.
  7409. - bool is_empty() const {
  7410. - return !(data && width && height && depth && dim);
  7411. - }
  7412. -
  7413. - //! Return the offset of the pixel coordinates (\p x,\p y,\p z,\p v) with respect to the data pointer \c data.
  7414. - /**
  7415. - \param x X-coordinate of the pixel.
  7416. - \param y Y-coordinate of the pixel.
  7417. - \param z Z-coordinate of the pixel.
  7418. - \param v V-coordinate of the pixel.
  7419. -
  7420. - - No checking is done on the validity of the given coordinates.
  7421. -
  7422. - \par example:
  7423. - \code
  7424. - CImg<float> img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels.
  7425. - long off = img.offset(10,10,0,2); // Get the offset of the blue value of the pixel located at (10,10).
  7426. - float val = img[off]; // Get the blue value of the pixel.
  7427. - \endcode
  7428. - \sa ptr(), operator()(), operator[](), cimg_storage.
  7429. - **/
  7430. - long offset(const int x=0, const int y=0, const int z=0, const int v=0) const {
  7431. - return x + y*width + z*width*height + v*width*height*depth;
  7432. - }
  7433. -
  7434. - //! Return a pointer to the pixel value located at (\p x,\p y,\p z,\p v).
  7435. - /**
  7436. - \param x X-coordinate of the pixel.
  7437. - \param y Y-coordinate of the pixel.
  7438. - \param z Z-coordinate of the pixel.
  7439. - \param v V-coordinate of the pixel.
  7440. -
  7441. - - When called without parameters, ptr() returns a pointer to the begining of the pixel buffer.
  7442. - - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear if
  7443. - given coordinates are outside the image range (but function performances decrease).
  7444. -
  7445. - \par example:
  7446. - \code
  7447. - CImg<float> img(100,100,1,1,0); // Define a 100x100 greyscale image with float-valued pixels.
  7448. - float *ptr = ptr(10,10); // Get a pointer to the pixel located at (10,10).
  7449. - float val = *ptr; // Get the pixel value.
  7450. - \endcode
  7451. - \sa data, offset(), operator()(), operator[](), cimg_storage, cimg_environment.
  7452. - **/
  7453. - T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
  7454. - const long off = offset(x,y,z,v);
  7455. -#if cimg_debug>=3
  7456. - if (off<0 || off>=(long)size()) {
  7457. - cimg::warn(true,"CImg<%s>::ptr() : Asked for a pointer at coordinates (%u,%u,%u,%u) (offset=%u), "
  7458. - "outside image range (%u,%u,%u,%u) (size=%u)",
  7459. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7460. - return data;
  7461. - }
  7462. -#endif
  7463. - return data+off;
  7464. - }
  7465. -
  7466. - const T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
  7467. - const long off = offset(x,y,z,v);
  7468. -#if cimg_debug>=3
  7469. - if (off<0 || off>=(long)size()) {
  7470. - cimg::warn(true,"CImg<%s>::ptr() : Trying to get a pointer at (%u,%u,%u,%u) (offset=%d) which is"
  7471. - "outside the data of the image (%u,%u,%u,%u) (size=%u)",
  7472. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7473. - return data;
  7474. - }
  7475. -#endif
  7476. - return data+off;
  7477. - }
  7478. -
  7479. - //! Return an iterator to the first image pixel
  7480. - iterator begin() {
  7481. - return data;
  7482. - }
  7483. -
  7484. - const_iterator begin() const {
  7485. - return data;
  7486. - }
  7487. -
  7488. - //! Return an iterator to the last image pixel
  7489. - iterator end() {
  7490. - return data + size();
  7491. - }
  7492. -
  7493. - const_iterator end() const {
  7494. - return data + size();
  7495. - }
  7496. -
  7497. - //! Fast access to pixel value for reading or writing.
  7498. - /**
  7499. - \param x X-coordinate of the pixel.
  7500. - \param y Y-coordinate of the pixel.
  7501. - \param z Z-coordinate of the pixel.
  7502. - \param v V-coordinate of the pixel.
  7503. -
  7504. - - If one image dimension is equal to 1, it can be omitted in the coordinate list (see example below).
  7505. - - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear
  7506. - (but function performances decrease).
  7507. -
  7508. - \par example:
  7509. - \code
  7510. - CImg<float> img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels.
  7511. - const float valR = img(10,10,0,0); // Read the red component at coordinates (10,10).
  7512. - const float valG = img(10,10,0,1); // Read the green component at coordinates (10,10)
  7513. - const float valB = img(10,10,2); // Read the blue component at coordinates (10,10) (Z-coordinate omitted here).
  7514. - const float avg = (valR + valG + valB)/3; // Compute average pixel value.
  7515. - img(10,10,0) = img(10,10,1) = img(10,10,2) = avg; // Replace the pixel (10,10) by the average grey value.
  7516. - \endcode
  7517. -
  7518. - \sa operator[](), ptr(), offset(), cimg_storage, cimg_environment.
  7519. - **/
  7520. - T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
  7521. - const long off = offset(x,y,z,v);
  7522. -#if cimg_debug>=3
  7523. - if (!data || off>=(long)size()) {
  7524. - cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
  7525. - "outside the image range (%u,%u,%u,%u) (size=%u)",
  7526. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7527. - return *data;
  7528. - }
  7529. -#endif
  7530. - return data[off];
  7531. - }
  7532. -
  7533. - const T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
  7534. - const long off = offset(x,y,z,v);
  7535. -#if cimg_debug>=3
  7536. - if (!data || off>=(long)size()) {
  7537. - cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
  7538. - "outside the image range (%u,%u,%u,%u) (size=%u)",
  7539. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7540. - return *data;
  7541. - }
  7542. -#endif
  7543. - return data[off];
  7544. - }
  7545. -
  7546. - //! Return pixel value at a given position. Equivalent to operator().
  7547. - T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) {
  7548. - const long off = offset(x,y,z,v);
  7549. - if (!data || off>=(long)size())
  7550. - throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
  7551. - "outside the image range (%u,%u,%u,%u) (size=%u)",
  7552. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7553. - return data[off];
  7554. - }
  7555. -
  7556. - const T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const {
  7557. - const long off = offset(x,y,z,v);
  7558. - if (!data || off>=(long)size())
  7559. - throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) "
  7560. - "outside the image range (%u,%u,%u,%u) (size=%u)",
  7561. - pixel_type(),x,y,z,v,off,width,height,depth,dim,size());
  7562. - return data[off];
  7563. - }
  7564. -
  7565. - //! Fast access to pixel value for reading or writing, using an offset to the image pixel.
  7566. - /**
  7567. - \param off Offset of the pixel according to the begining of the pixel buffer, given by ptr().
  7568. -
  7569. - - If the macro \c cimg_debug==3, boundary checking is performed and warning messages may appear
  7570. - (but function performances decrease).
  7571. - - As pixel values are aligned in memory, this operator can sometime useful to access values easier than
  7572. - with operator()() (see example below).
  7573. -
  7574. - \par example:
  7575. - \code
  7576. - CImg<float> vec(1,10); // Define a vector of float values (10 lines, 1 row).
  7577. - const float val1 = vec(0,4); // Get the fifth element using operator()().
  7578. - const float val2 = vec[4]; // Get the fifth element using operator[]. Here, val2==val1.
  7579. - \endcode
  7580. -
  7581. - \sa operator()(), ptr(), offset(), cimg_storage, cimg_environment.
  7582. - **/
  7583. - T& operator[](const unsigned long off) {
  7584. - return operator()(off);
  7585. - }
  7586. -
  7587. - const T& operator[](const unsigned long off) const {
  7588. - return operator()(off);
  7589. - }
  7590. -
  7591. - //! Return a reference to the last image value
  7592. - T& back() {
  7593. - return operator()(size()-1);
  7594. - }
  7595. -
  7596. - const T& back() const {
  7597. - return operator()(size()-1);
  7598. - }
  7599. -
  7600. - //! Return a reference to the first image value
  7601. - T& front() {
  7602. - return *data;
  7603. - }
  7604. -
  7605. - const T& front() const {
  7606. - return *data;
  7607. - }
  7608. -
  7609. - //! Read a pixel value with Dirichlet or Neumann boundary conditions.
  7610. - /**
  7611. - \param x X-coordinate of the pixel.
  7612. - \param y Y-coordinate of the pixel.
  7613. - \param z Z-coordinate of the pixel.
  7614. - \param v V-coordinate of the pixel.
  7615. - \param out_val Desired value if pixel coordinates are outside the image range (optional parameter).
  7616. -
  7617. - - This function allows to read pixel values with boundary checking on all coordinates.
  7618. - - If given coordinates are outside the image range and the parameter out_val is specified, the value \c out_val is returned.
  7619. - - If given coordinates are outside the image range and the parameter out_val is not specified, the closest pixel value
  7620. - is returned.
  7621. -
  7622. - \par example:
  7623. - \code
  7624. - CImg<float> img(100,100,1,1,128); // Define a 100x100 images with all pixel values equal to 128.
  7625. - const float val1 = img.pix4d(10,10,0,0,0); // Equivalent to val1=img(10,10) (but slower).
  7626. - const float val2 = img.pix4d(-4,5,0,0,0); // Return 0, since coordinates are outside the image range.
  7627. - const float val3 = img.pix4d(10,10,5,0,64); // Return 64, since coordinates are outside the image range.
  7628. - \endcode
  7629. -
  7630. - \sa operator()(), linear_pix4d(), cubic_pix2d().
  7631. - **/
  7632. - T pix4d(const int x, const int y, const int z, const int v, const T& out_val) const {
  7633. - return (x<0 || y<0 || z<0 || v<0 || x>=dimx() || y>=dimy() || z>=dimz() || v>=dimv())?out_val:(*this)(x,y,z,v);
  7634. - }
  7635. -
  7636. - T pix4d(const int x, const int y, const int z, const int v) const {
  7637. - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),
  7638. - z<0?0:(z>=dimz()?dimz()-1:z), v<0?0:(v>=dimv()?dimv()-1:v));
  7639. - }
  7640. -
  7641. - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the three first coordinates (\c x,\c y,\c z).
  7642. - T pix3d(const int x, const int y, const int z, const int v, const T& out_val) const {
  7643. - return (x<0 || y<0 || z<0 || x>=dimx() || y>=dimy() || z>=dimz())?out_val:(*this)(x,y,z,v);
  7644. - }
  7645. -
  7646. - const T& pix3d(const int x, const int y, const int z, const int v=0) const {
  7647. - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),
  7648. - z<0?0:(z>=dimz()?dimz()-1:z),v);
  7649. - }
  7650. -
  7651. - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the two first coordinates (\c x,\c y).
  7652. - T pix2d(const int x, const int y, const int z, const int v, const T& out_val) const {
  7653. - return (x<0 || y<0 || x>=dimx() || y>=dimy())?out_val:(*this)(x,y,z,v);
  7654. - }
  7655. -
  7656. - const T& pix2d(const int x,const int y,const int z=0,const int v=0) const {
  7657. - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),z,v);
  7658. - }
  7659. -
  7660. - //! Read a pixel value with Dirichlet or Neumann boundary conditions for the first coordinate \c x.
  7661. - T pix1d(const int x, const int y, const int z, const int v, const T& out_val) const {
  7662. - return (x<0 || x>=dimx())?out_val:(*this)(x,y,z,v);
  7663. - }
  7664. -
  7665. - const T& pix1d(const int x, const int y=0, const int z=0, const int v=0) const {
  7666. - return (*this)(x<0?0:(x>=dimx()?dimx()-1:x),y,z,v);
  7667. - }
  7668. -
  7669. - //! Read a pixel value using linear interpolation.
  7670. - /**
  7671. - \param ffx X-coordinate of the pixel (float-valued).
  7672. - \param ffy Y-coordinate of the pixel (float-valued).
  7673. - \param ffz Z-coordinate of the pixel (float-valued).
  7674. - \param ffv V-coordinate of the pixel (float-valued).
  7675. - \param out_val Out-of-border pixel value
  7676. -
  7677. - - This function allows to read pixel values with boundary checking on all coordinates.
  7678. - - If given coordinates are outside the image range, the value of the nearest pixel inside the image is returned
  7679. - (Neumann boundary conditions).
  7680. - - If given coordinates are float-valued, a linear interpolation is performed in order to compute the returned value.
  7681. -
  7682. - \par example:
  7683. - \code
  7684. - CImg<float> img(2,2); // Define a greyscale 2x2 image.
  7685. - img(0,0) = 0; // Fill image with specified pixel values.
  7686. - img(1,0) = 1;
  7687. - img(0,1) = 2;
  7688. - img(1,1) = 3;
  7689. - const double val = img.linear_pix4d(0.5,0.5); // Return val=1.5, which is the average intensity of the four pixels values.
  7690. - \endcode
  7691. -
  7692. - \sa operator()(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix2d().
  7693. - **/
  7694. - typename cimg::largest<T,float>::type linear_pix4d(const float fx,const float fy,const float fz,const float fv,
  7695. - const T& out_val) const {
  7696. - const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), v = (int)fv-(fv>=0?0:1),
  7697. - nx = x+1, ny = y+1, nz = z+1, nv = v+1;
  7698. - const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v;
  7699. - const T
  7700. - Icccc = pix4d(x,y,z,v,out_val), Inccc = pix4d(nx,y,z,v,out_val),
  7701. - Icncc = pix4d(x,ny,z,v,out_val), Inncc = pix4d(nx,ny,z,v,out_val),
  7702. - Iccnc = pix4d(x,y,nz,v,out_val), Incnc = pix4d(nx,y,nz,v,out_val),
  7703. - Icnnc = pix4d(x,ny,nz,v,out_val), Innnc = pix4d(nx,ny,nz,v,out_val),
  7704. - Icccn = pix4d(x,y,z,nv,out_val), Inccn = pix4d(nx,y,z,nv,out_val),
  7705. - Icncn = pix4d(x,ny,z,nv,out_val), Inncn = pix4d(nx,ny,z,nv,out_val),
  7706. - Iccnn = pix4d(x,y,nz,nv,out_val), Incnn = pix4d(nx,y,nz,nv,out_val),
  7707. - Icnnn = pix4d(x,ny,nz,nv,out_val), Innnn = pix4d(nx,ny,nz,nv,out_val);
  7708. - return Icccc +
  7709. - dx*(Inccc-Icccc +
  7710. - dy*(Icccc+Inncc-Icncc-Inccc +
  7711. - dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc +
  7712. - dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) +
  7713. - dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) +
  7714. - dz*(Icccc+Incnc-Iccnc-Inccc +
  7715. - dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) +
  7716. - dv*(Icccc+Inccn-Inccc-Icccn)) +
  7717. - dy*(Icncc-Icccc +
  7718. - dz*(Icccc+Icnnc-Iccnc-Icncc +
  7719. - dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) +
  7720. - dv*(Icccc+Icncn-Icncc-Icccn)) +
  7721. - dz*(Iccnc-Icccc +
  7722. - dv*(Icccc+Iccnn-Iccnc-Icccn)) +
  7723. - dv*(Icccn-Icccc);
  7724. - }
  7725. -
  7726. - typename cimg::largest<T,float>::type linear_pix4d(const float ffx,const float ffy=0,const float ffz=0,const float ffv=0) const {
  7727. - const float
  7728. - fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy),
  7729. - fz = ffz<0?0:(ffz>depth-1?depth-1:ffz), fv = ffv<0?0:(ffv>dim-1?dim-1:ffv);
  7730. - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz, v = (unsigned int)fv;
  7731. - const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v;
  7732. - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z, nv = dv>0?v+1:v;
  7733. - const T
  7734. - &Icccc = (*this)(x,y,z,v), &Inccc = (*this)(nx,y,z,v), &Icncc = (*this)(x,ny,z,v), &Inncc = (*this)(nx,ny,z,v),
  7735. - &Iccnc = (*this)(x,y,nz,v), &Incnc = (*this)(nx,y,nz,v), &Icnnc = (*this)(x,ny,nz,v), &Innnc = (*this)(nx,ny,nz,v),
  7736. - &Icccn = (*this)(x,y,z,nv), &Inccn = (*this)(nx,y,z,nv), &Icncn = (*this)(x,ny,z,nv), &Inncn = (*this)(nx,ny,z,nv),
  7737. - &Iccnn = (*this)(x,y,nz,nv), &Incnn = (*this)(nx,y,nz,nv), &Icnnn = (*this)(x,ny,nz,nv), &Innnn = (*this)(nx,ny,nz,nv);
  7738. - return Icccc +
  7739. - dx*(Inccc-Icccc +
  7740. - dy*(Icccc+Inncc-Icncc-Inccc +
  7741. - dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc +
  7742. - dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) +
  7743. - dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) +
  7744. - dz*(Icccc+Incnc-Iccnc-Inccc +
  7745. - dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) +
  7746. - dv*(Icccc+Inccn-Inccc-Icccn)) +
  7747. - dy*(Icncc-Icccc +
  7748. - dz*(Icccc+Icnnc-Iccnc-Icncc +
  7749. - dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) +
  7750. - dv*(Icccc+Icncn-Icncc-Icccn)) +
  7751. - dz*(Iccnc-Icccc +
  7752. - dv*(Icccc+Iccnn-Iccnc-Icccn)) +
  7753. - dv*(Icccn-Icccc);
  7754. - }
  7755. -
  7756. - //! Read a pixel value using linear interpolation for the three first coordinates (\c cx,\c cy,\c cz).
  7757. - /**
  7758. - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the three first coordinates.
  7759. -
  7760. - \sa operator()(), linear_pix4d(), linear_pix2d(), linear_pix1d(), linear_pix3d(), cubic_pix2d().
  7761. - **/
  7762. - typename cimg::largest<T,float>::type linear_pix3d(const float fx,const float fy,const float fz,const int v,
  7763. - const T& out_val) const {
  7764. - const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), nx = x+1, ny = y+1, nz = z+1;
  7765. - const float dx = fx-x, dy = fy-y, dz = fz-z;
  7766. - const T
  7767. - Iccc = pix3d(x,y,z,v,out_val), Incc = pix3d(nx,y,z,v,out_val), Icnc = pix3d(x,ny,z,v,out_val), Innc = pix3d(nx,ny,z,v,out_val),
  7768. - Iccn = pix3d(x,y,nz,v,out_val), Incn = pix3d(nx,y,nz,v,out_val), Icnn = pix3d(x,ny,nz,v,out_val), Innn = pix3d(nx,ny,nz,v,out_val);
  7769. - return Iccc +
  7770. - dx*(Incc-Iccc +
  7771. - dy*(Iccc+Innc-Icnc-Incc +
  7772. - dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) +
  7773. - dz*(Iccc+Incn-Iccn-Incc)) +
  7774. - dy*(Icnc-Iccc +
  7775. - dz*(Iccc+Icnn-Iccn-Icnc)) +
  7776. - dz*(Iccn-Iccc);
  7777. - }
  7778. -
  7779. - typename cimg::largest<T,float>::type linear_pix3d(const float ffx,const float ffy=0,const float ffz=0,const int v=0) const {
  7780. - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy), fz = ffz<0?0:(ffz>depth-1?depth-1:ffz);
  7781. - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz;
  7782. - const float dx = fx-x, dy = fy-y, dz = fz-z;
  7783. - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z;
  7784. - const T
  7785. - &Iccc = (*this)(x,y,z,v), &Incc = (*this)(nx,y,z,v), &Icnc = (*this)(x,ny,z,v), &Innc = (*this)(nx,ny,z,v),
  7786. - &Iccn = (*this)(x,y,nz,v), &Incn = (*this)(nx,y,nz,v), &Icnn = (*this)(x,ny,nz,v), &Innn = (*this)(nx,ny,nz,v);
  7787. - return Iccc +
  7788. - dx*(Incc-Iccc +
  7789. - dy*(Iccc+Innc-Icnc-Incc +
  7790. - dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) +
  7791. - dz*(Iccc+Incn-Iccn-Incc)) +
  7792. - dy*(Icnc-Iccc +
  7793. - dz*(Iccc+Icnn-Iccn-Icnc)) +
  7794. - dz*(Iccn-Iccc);
  7795. - }
  7796. -
  7797. - //! Read a pixel value using linear interpolation for the two first coordinates (\c cx,\c cy).
  7798. - /**
  7799. - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the two first coordinates.
  7800. -
  7801. - \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix1d(), linear_pix2d(), cubic_pix2d().
  7802. - **/
  7803. - typename cimg::largest<T,float>::type linear_pix2d(const float fx, const float fy, const int z, const int v,
  7804. - const T& out_val) const {
  7805. - const int x = (int)fx-(fx>0?0:1), y = (int)fy-(fy>0?0:1), nx = x+1, ny = y+1;
  7806. - const float dx = fx-x, dy = fy-y;
  7807. - const T
  7808. - Icc = pix2d(x,y,z,v,out_val), Inc = pix2d(nx,y,z,v,out_val),
  7809. - Icn = pix2d(x,ny,z,v,out_val), Inn = pix2d(nx,ny,z,v,out_val);
  7810. - return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc);
  7811. - }
  7812. -
  7813. - typename cimg::largest<T,float>::type linear_pix2d(const float ffx, const float ffy=0, const int z=0, const int v=0) const {
  7814. - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy);
  7815. - const unsigned int x = (unsigned int)fx, y = (unsigned int)fy;
  7816. - const float dx = fx-x, dy = fy-y;
  7817. - const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y;
  7818. - const T &Icc = (*this)(x,y,z,v), &Inc = (*this)(nx,y,z,v), &Icn = (*this)(x,ny,z,v), &Inn = (*this)(nx,ny,z,v);
  7819. - return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc);
  7820. - }
  7821. -
  7822. - //! Read a pixel value using linear interpolation for the first coordinate \c cx.
  7823. - /**
  7824. - - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the first coordinate.
  7825. -
  7826. - \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix1d().
  7827. - **/
  7828. - typename cimg::largest<T,float>::type linear_pix1d(const float fx,const int y,const int z,const int v,
  7829. - const T& out_val) const {
  7830. - const int x = (int)fx-(fx>0?0:1), nx = x+1;
  7831. - const float dx = fx-x;
  7832. - const T Ic = pix1d(x,y,z,v,out_val), In = pix2d(nx,y,z,v,out_val);
  7833. - return Ic + dx*(In-Ic);
  7834. - }
  7835. -
  7836. - typename cimg::largest<T,float>::type linear_pix1d(const float ffx,const int y=0,const int z=0,const int v=0) const {
  7837. - const float fx = ffx<0?0:(ffx>width-1?width-1:ffx);
  7838. - const unsigned int x = (unsigned int)fx;
  7839. - const float dx = fx-x;
  7840. - const unsigned int nx = dx>0?x+1:x;
  7841. - const T &Ic = (*this)(x,y,z,v), &In = (*this)(nx,y,z,v);
  7842. - return Ic + dx*(In-Ic);
  7843. - }
  7844. -
  7845. - // This function is used as a subroutine for cubic interpolation
  7846. - static float _cubic_R(const float x) {
  7847. - const float xp2 = x+2, xp1 = x+1, xm1 = x-1,
  7848. - nxp2 = xp2>0?xp2:0, nxp1 = xp1>0?xp1:0, nx = x>0?x:0, nxm1 = xm1>0?xm1:0;
  7849. - return (nxp2*nxp2*nxp2 - 4*nxp1*nxp1*nxp1 + 6*nx*nx*nx - 4*nxm1*nxm1*nxm1)/6.0f;
  7850. - }
  7851. -
  7852. - //! Read a pixel value using cubic interpolation for the first coordinate \c cx.
  7853. - /**
  7854. - - Same as cubic_pix2d(), except that cubic interpolation and boundary checking is performed only on the first coordinate.
  7855. -
  7856. - \sa operator()(), cubic_pix2d(), linear_pix1d().
  7857. - **/
  7858. - typename cimg::largest<T,float>::type cubic_pix1d(const float fx, const int y, const int z, const int v,
  7859. - const T& out_val) const {
  7860. - const int x = (int)fx-(fx>=0?0:1), px = x-1, nx = x+1, ax = nx+1;
  7861. - const float dx = fx-x;
  7862. - const T a = pix2d(px,y,z,v,out_val), b = pix2d(x,y,z,v,out_val), c = pix2d(nx,y,z,v,out_val), d = pix2d(ax,y,z,v,out_val);
  7863. - const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx);
  7864. - return Rxp*a + Rxc*b + Rxn*c + Rxa*d;
  7865. - }
  7866. -
  7867. - typename cimg::largest<T,float>::type cubic_pix1d(const float pfx, const int y=0, const int z=0, const int v=0) const {
  7868. - const float fx = pfx<0?0:(pfx>width-1?width-1:pfx);
  7869. - const unsigned int x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1<width?x+1:width-1, ax = nx+1<width?nx+1:width-1;
  7870. - const float dx = fx-x;
  7871. - const T& a = (*this)(px,y,z,v), b = (*this)(x,y,z,v), c = (*this)(nx,y,z,v), d = (*this)(ax,y,z,v);
  7872. - const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx);
  7873. - return Rxp*a + Rxc*b + Rxn*c + Rxa*d;
  7874. - }
  7875. -
  7876. - //! Read a pixel value using bicubic interpolation.
  7877. - /**
  7878. - \param pfx X-coordinate of the pixel (float-valued).
  7879. - \param pfy Y-coordinate of the pixel (float-valued).
  7880. - \param z Z-coordinate of the pixel.
  7881. - \param v V-coordinate of the pixel.
  7882. -
  7883. - - This function allows to read pixel values with boundary checking on the two first coordinates.
  7884. - - If given coordinates are outside the image range, the value of the nearest pixel inside the image is returned
  7885. - (Neumann boundary conditions).
  7886. - - If given coordinates are float-valued, a cubic interpolation is performed in order to compute the returned value.
  7887. -
  7888. - \sa operator()(), cubic_pix1d(), linear_pix2d().
  7889. - **/
  7890. - typename cimg::largest<T,float>::type cubic_pix2d(const float fx, const float fy, const int z, const int v,
  7891. - const T& out_val) const {
  7892. - const int
  7893. - x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1),
  7894. - px = x-1, nx = x+1, ax = nx+1, py = y-1, ny = y+1, ay = ny+1;
  7895. - const float dx = fx-x, dy = fy-y;
  7896. - const T
  7897. - a = pix2d(px,py,z,v,out_val), b = pix2d(x,py,z,v,out_val), c = pix2d(nx,py,z,v,out_val), d = pix2d(ax,py,z,v,out_val),
  7898. - e = pix2d(px, y,z,v,out_val), f = pix2d(x, y,z,v,out_val), g = pix2d(nx, y,z,v,out_val), h = pix2d(ax, y,z,v,out_val),
  7899. - i = pix2d(px,ny,z,v,out_val), j = pix2d(x,ny,z,v,out_val), k = pix2d(nx,ny,z,v,out_val), l = pix2d(ax,ny,z,v,out_val),
  7900. - m = pix2d(px,ay,z,v,out_val), n = pix2d(x,ay,z,v,out_val), o = pix2d(nx,ay,z,v,out_val), p = pix2d(ax,ay,z,v,out_val);
  7901. - const float
  7902. - Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx),
  7903. - Ryp = _cubic_R(dy+1), Ryc = _cubic_R(dy), Ryn = _cubic_R(dy-1), Rya = _cubic_R(dy-2);
  7904. - return
  7905. - Rxp*Ryp*a + Rxc*Ryp*b + Rxn*Ryp*c + Rxa*Ryp*d +
  7906. - Rxp*Ryc*e + Rxc*Ryc*f + Rxn*Ryc*g + Rxa*Ryc*h +
  7907. - Rxp*Ryn*i + Rxc*Ryn*j + Rxn*Ryn*k + Rxa*Ryn*l +
  7908. - Rxp*Rya*m + Rxc*Rya*n + Rxn*Rya*o + Rxa*Rya*p;
  7909. - }
  7910. -
  7911. - typename cimg::largest<T,float>::type cubic_pix2d(const float pfx, const float pfy=0, const int z=0, const int v=0) const {
  7912. - const float fx = pfx<0?0:(pfx>width-1?width-1:pfx), fy = pfy<0?0:(pfy>height-1?height-1:pfy);
  7913. - const unsigned int
  7914. - x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1<width?x+1:width-1, ax = nx+1<width?nx+1:width-1,
  7915. - y = (unsigned int)fy, py = (int)y-1>=0?y-1:0, ny = y+1<height?y+1:height-1, ay = ny+1<height?ny+1:height-1;
  7916. - const float dx = fx-x, dy = fy-y;
  7917. - const T&
  7918. - a = (*this)(px,py,z,v), b = (*this)(x,py,z,v), c = (*this)(nx,py,z,v), d = (*this)(ax,py,z,v),
  7919. - e = (*this)(px, y,z,v), f = (*this)(x, y,z,v), g = (*this)(nx, y,z,v), h = (*this)(ax, y,z,v),
  7920. - i = (*this)(px,ny,z,v), j = (*this)(x,ny,z,v), k = (*this)(nx,ny,z,v), l = (*this)(ax,ny,z,v),
  7921. - m = (*this)(px,ay,z,v), n = (*this)(x,ay,z,v), o = (*this)(nx,ay,z,v), p = (*this)(ax,ay,z,v);
  7922. - const float
  7923. - Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx),
  7924. - Ryp = _cubic_R(dy+1), Ryc = _cubic_R(dy), Ryn = _cubic_R(dy-1), Rya = _cubic_R(dy-2);
  7925. - return
  7926. - Rxp*Ryp*a + Rxc*Ryp*b + Rxn*Ryp*c + Rxa*Ryp*d +
  7927. - Rxp*Ryc*e + Rxc*Ryc*f + Rxn*Ryc*g + Rxa*Ryc*h +
  7928. - Rxp*Ryn*i + Rxc*Ryn*j + Rxn*Ryn*k + Rxa*Ryn*l +
  7929. - Rxp*Rya*m + Rxc*Rya*n + Rxn*Rya*o + Rxa*Rya*p;
  7930. - }
  7931. -
  7932. - //! Display informations about the image on the standard error output.
  7933. - /**
  7934. - \param title Name for the considered image (optional).
  7935. - \param print_flag Level of informations to be printed.
  7936. -
  7937. - - The possible values for \c print_flag are :
  7938. - - 0 : print only informations about image size and pixel buffer.
  7939. - - 1 : print also statistics on the image pixels.
  7940. - - 2 : print also the content of the pixel buffer, in a matlab-style.
  7941. -
  7942. - \par example:
  7943. - \code
  7944. - CImg<float> img("foo.jpg"); // Load image from a JPEG file.
  7945. - img.print("Image : foo.jpg",1); // Print image informations and statistics.
  7946. - \endcode
  7947. -
  7948. - \sa CImgStats
  7949. - **/
  7950. - const CImg& print(const char *title=0, const unsigned int print_flag=1) const {
  7951. - std::fprintf(stderr,"%-8s(this=%p): { size=(%u,%u,%u,%u), data=(%s*)%p (%s)",
  7952. - title?title:"CImg",(void*)this,
  7953. - width,height,depth,dim,pixel_type(),(void*)data,
  7954. - is_shared?"shared":"not shared");
  7955. - if (is_empty()) { std::fprintf(stderr,", [Undefined pixel data] }\n"); return *this; }
  7956. - if (print_flag>=1) {
  7957. - const CImgStats st(*this);
  7958. - std::fprintf(stderr,", min=%g, mean=%g [var=%g], max=%g, pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d)",
  7959. - st.min,st.mean,st.variance,st.max,st.xmin,st.ymin,st.zmin,st.vmin,st.xmax,st.ymax,st.zmax,st.vmax);
  7960. - }
  7961. - if (print_flag>=2 || size()<=16) {
  7962. - std::fprintf(stderr," }\n%s = [ ",title?title:"data");
  7963. - cimg_forXYZV(*this,x,y,z,k)
  7964. - std::fprintf(stderr,"%g%s",(double)(*this)(x,y,z,k),
  7965. - ((x+1)*(y+1)*(z+1)*(k+1)==(int)size()?" ]\n":(((x+1)%width==0)?" ; ":" ")));
  7966. - } else std::fprintf(stderr," }\n");
  7967. - return *this;
  7968. - }
  7969. -
  7970. - //! Display informations about the image on the standart output.
  7971. - const CImg& print(const unsigned int print_flag) const {
  7972. - return print(0,print_flag);
  7973. - }
  7974. -
  7975. - //@}
  7976. - //------------------------------------------
  7977. - //
  7978. - //! \name Arithmetic and Boolean Operators
  7979. - //@{
  7980. - //------------------------------------------
  7981. -
  7982. - //! Assignement operator.
  7983. - /**
  7984. - This operator assigns a copy of the input image \p img to the current instance image.
  7985. - \param img The input image to copy.
  7986. - \remark
  7987. - - This operator is strictly equivalent to the function assign(const CImg< t >&) and has exactly the same properties.
  7988. - \see assign(const CImg< t >&).
  7989. - **/
  7990. - template<typename t> CImg<T>& operator=(const CImg<t>& img) {
  7991. - return assign(img);
  7992. - }
  7993. -
  7994. - CImg& operator=(const CImg& img) {
  7995. - return assign(img);
  7996. - }
  7997. -
  7998. - //! Assign values of a C-array to the instance image.
  7999. - /**
  8000. - \param buf Pointer to a C-style array having a size of (at least) <tt>this->size()</tt>.
  8001. -
  8002. - - Replace pixel values by the content of the array \c buf.
  8003. - - Warning : the value types in the array and in the image must be the same.
  8004. -
  8005. - \par example:
  8006. - \code
  8007. - float tab[4*4] = { 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16 }; // Define a 4x4 matrix in C-style.
  8008. - CImg<float> matrice(4,4); // Define a 4x4 greyscale image.
  8009. - matrice = tab; // Fill the image by the values in tab.
  8010. - \endcode
  8011. - **/
  8012. - CImg& operator=(const T *buf) {
  8013. - if (buf) std::memcpy(data,buf,size()*sizeof(T));
  8014. - else assign();
  8015. - return *this;
  8016. - }
  8017. -
  8018. - //! Assign a value to each image pixel of the instance image.
  8019. - CImg& operator=(const T& val) {
  8020. - return fill(val);
  8021. - }
  8022. -
  8023. - //! Operator+
  8024. - /**
  8025. - \remark
  8026. - - This operator can be used to get a non-shared copy of an image.
  8027. - **/
  8028. - CImg operator+() const {
  8029. - return CImg<T>(*this,false);
  8030. - }
  8031. -
  8032. - //! Operator+=;
  8033. -#ifdef cimg_use_visualcpp6
  8034. - CImg& operator+=(const T& val) {
  8035. -#else
  8036. - template<typename t> CImg& operator+=(const t& val) {
  8037. -#endif
  8038. - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)+val);
  8039. - return *this;
  8040. - }
  8041. -
  8042. - //! Operator+=
  8043. - template<typename t> CImg& operator+=(const CImg<t>& img) {
  8044. - const unsigned int smin = cimg::min(size(),img.size());
  8045. - t *ptrs = img.data+smin;
  8046. - for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)+(*(--ptrs))));
  8047. - return *this;
  8048. - }
  8049. -
  8050. - //! Operator++;
  8051. - CImg& operator++() {
  8052. - cimg_for(*this,ptr,T) (*ptr)++;
  8053. - return *this;
  8054. - }
  8055. -
  8056. - //! Operator-.
  8057. - CImg operator-() const {
  8058. - return CImg<T>(width,height,depth,dim,0)-=*this;
  8059. - }
  8060. -
  8061. - //! Operator-=.
  8062. -#ifdef cimg_use_visualcpp6
  8063. - CImg& operator-=(const T& val) {
  8064. -#else
  8065. - template<typename t> CImg& operator-=(const t& val) {
  8066. -#endif
  8067. - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)-val);
  8068. - return *this;
  8069. - }
  8070. -
  8071. - //! Operator-=.
  8072. - template<typename t> CImg& operator-=(const CImg<t>& img) {
  8073. - const unsigned int smin = cimg::min(size(),img.size());
  8074. - t *ptrs = img.data+smin;
  8075. - for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)-(*(--ptrs))));
  8076. - return *this;
  8077. - }
  8078. -
  8079. - //! Operator--.
  8080. - CImg& operator--() {
  8081. - cimg_for(*this,ptr,T) (*ptr)--;
  8082. - return *this;
  8083. - }
  8084. -
  8085. - //! Operator*=.
  8086. -#ifdef cimg_use_visualcpp6
  8087. - CImg& operator*=(const double val) {
  8088. -#else
  8089. - template<typename t> CImg& operator*=(const t& val) {
  8090. -#endif
  8091. - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)*val);
  8092. - return *this;
  8093. - }
  8094. -
  8095. - //! Operator*=.
  8096. - template<typename t> CImg& operator*=(const CImg<t>& img) {
  8097. - return ((*this)*img).swap(*this);
  8098. - }
  8099. -
  8100. - //! Operator/=.
  8101. -#ifdef cimg_use_visualcpp6
  8102. - CImg& operator/=(const double val) {
  8103. -#else
  8104. - template<typename t> CImg& operator/=(const t& val) {
  8105. -#endif
  8106. - cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)/val);
  8107. - return *this;
  8108. - }
  8109. -
  8110. - //! Operator/=.
  8111. - template<typename t> CImg& operator/=(const CImg<t>& img) {
  8112. - return assign(*this*img.get_inverse());
  8113. - }
  8114. -
  8115. - //! Modulo.
  8116. - CImg operator%(const CImg& img) const {
  8117. - return (+*this)%=img;
  8118. - }
  8119. -
  8120. - //! Modulo.
  8121. - CImg operator%(const T& val) const {
  8122. - return (+*this)%=val;
  8123. - }
  8124. -
  8125. - //! In-place modulo.
  8126. - CImg& operator%=(const T& val) {
  8127. - cimg_for(*this,ptr,T) (*ptr)%=val;
  8128. - return *this;
  8129. - }
  8130. -
  8131. - //! In-place modulo.
  8132. - CImg& operator%=(const CImg& img) {
  8133. - const unsigned int smin = cimg::min(size(),img.size());
  8134. - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)%=*(--ptrs));
  8135. - return *this;
  8136. - }
  8137. -
  8138. - //! Bitwise AND.
  8139. - CImg operator&(const CImg& img) const {
  8140. - return (+*this)&=img;
  8141. - }
  8142. -
  8143. - //! Bitwise AND.
  8144. - CImg operator&(const T& val) const {
  8145. - return (+*this)&=val;
  8146. - }
  8147. -
  8148. - //! In-place bitwise AND.
  8149. - CImg& operator&=(const CImg& img) {
  8150. - const unsigned int smin = cimg::min(size(),img.size());
  8151. - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)&=*(--ptrs));
  8152. - return *this;
  8153. - }
  8154. -
  8155. - //! In-place bitwise AND.
  8156. - CImg& operator&=(const T& val) {
  8157. - cimg_for(*this,ptr,T) (*ptr)&=val;
  8158. - return *this;
  8159. - }
  8160. -
  8161. - //! Bitwise OR.
  8162. - CImg operator|(const CImg& img) const {
  8163. - return (+*this)|=img;
  8164. - }
  8165. -
  8166. - //! Bitwise OR.
  8167. - CImg operator|(const T& val) const {
  8168. - return (+*this)|=val;
  8169. - }
  8170. -
  8171. - //! In-place bitwise OR.
  8172. - CImg& operator|=(const CImg& img) {
  8173. - const unsigned int smin = cimg::min(size(),img.size());
  8174. - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)|=*(--ptrs));
  8175. - return *this;
  8176. - }
  8177. -
  8178. - //! In-place bitwise OR.
  8179. - CImg& operator|=(const T& val) {
  8180. - cimg_for(*this,ptr,T) (*ptr)|=val;
  8181. - return *this;
  8182. - }
  8183. -
  8184. - //! Bitwise XOR.
  8185. - CImg operator^(const CImg& img) const {
  8186. - return (+*this)^=img;
  8187. - }
  8188. -
  8189. - //! Bitwise XOR.
  8190. - CImg operator^(const T& val) const {
  8191. - return (+*this)^=val;
  8192. - }
  8193. -
  8194. - //! In-place bitwise XOR.
  8195. - CImg& operator^=(const CImg& img) {
  8196. - const unsigned int smin = cimg::min(size(),img.size());
  8197. - for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)^=*(--ptrs));
  8198. - return *this;
  8199. - }
  8200. -
  8201. - //! In-place bitwise XOR.
  8202. - CImg& operator^=(const T& val) {
  8203. - cimg_for(*this,ptr,T) (*ptr)^=val;
  8204. - return *this;
  8205. - }
  8206. -
  8207. - //! Boolean NOT.
  8208. - CImg operator!() const {
  8209. - CImg<T> res(width,height,depth,dim);
  8210. - const T *ptrs = end();
  8211. - cimg_for(res,ptrd,T) *ptrd=!(*(--ptrs));
  8212. - return res;
  8213. - }
  8214. -
  8215. - //! Bitwise NOT.
  8216. - CImg operator~() const {
  8217. - CImg<T> res(width,height,depth,dim);
  8218. - const T *ptrs = end();
  8219. - cimg_for(res,ptrd,T) *ptrd=~(*(--ptrs));
  8220. - return res;
  8221. - }
  8222. -
  8223. - //! Bitwise shift
  8224. - CImg& operator<<=(const unsigned int n) {
  8225. - cimg_for(*this,ptr,T) (*ptr)<<=n;
  8226. - return *this;
  8227. - }
  8228. -
  8229. - //! Bitwise shift
  8230. - CImg operator<<(const unsigned int n) const {
  8231. - return (+*this)<<=n;
  8232. - }
  8233. -
  8234. - //! Bitwise shift
  8235. - CImg& operator>>=(const unsigned int n) {
  8236. - cimg_for(*this,ptr,T) (*ptr)>>=n;
  8237. - return *this;
  8238. - }
  8239. -
  8240. - //! Bitwise shift
  8241. - CImg operator>>(const unsigned int n) const {
  8242. - return (+*this)>>=n;
  8243. - }
  8244. -
  8245. - //! Boolean equality.
  8246. - template<typename t> bool operator==(const CImg<t>& img) const {
  8247. - const unsigned int siz = size();
  8248. - bool vequal = true;
  8249. - if (siz!=img.size()) return false;
  8250. - t *ptrs=img.data+siz;
  8251. - for (T *ptrd=data+siz; vequal && ptrd>data; vequal=vequal&&((*(--ptrd))==(*(--ptrs))));
  8252. - return vequal;
  8253. - }
  8254. -
  8255. - //! Boolean difference.
  8256. - template<typename t> bool operator!=(const CImg<t>& img) const {
  8257. - return !((*this)==img);
  8258. - }
  8259. -
  8260. - //! Get a new list
  8261. - template<typename t> CImgList<typename cimg::largest<T,t>::type> operator<<(const CImg<t>& img) const {
  8262. - typedef typename cimg::largest<T,t>::type restype;
  8263. - return CImgList<restype>(*this,img);
  8264. - }
  8265. -
  8266. - //@}
  8267. - //---------------------------------------
  8268. - //
  8269. - //! \name Usual Mathematics
  8270. - //@{
  8271. - //---------------------------------------
  8272. -
  8273. - //! Apply a R->R function on all image value.
  8274. - template<typename ts, typename td> CImg& apply(td (*func)(ts)) {
  8275. - cimg_for(*this,ptr,T) *ptr = (T)func(*ptr);
  8276. - return *this;
  8277. - }
  8278. -
  8279. - //! Return an image where each pixel value is equal to func(x).
  8280. - template<typename ts, typename td> CImg<typename cimg::largest<T,td>::type> get_apply(td (*func)(ts)) {
  8281. - typedef typename cimg::largest<T,td>::type restype;
  8282. - return CImg<restype>(*this,false).apply(func);
  8283. - }
  8284. -
  8285. - //! In-place pointwise multiplication between \c *this and \c img.
  8286. - /**
  8287. - This is the in-place version of get_mul().
  8288. - \sa get_mul().
  8289. - **/
  8290. - template<typename t> CImg& mul(const CImg<t>& img) {
  8291. - t *ptrs = img.data;
  8292. - T *ptrf = data + cimg::min(size(),img.size());
  8293. - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)(*ptrd*(*(ptrs++)));
  8294. - return *this;
  8295. - }
  8296. -
  8297. - //! Pointwise multiplication between \c *this and \c img.
  8298. - /**
  8299. - \param img Argument of the multiplication.
  8300. - - if \c *this and \c img have different size, the multiplication is applied on the maximum possible range.
  8301. - \sa get_div(),mul(),div()
  8302. - **/
  8303. - template<typename t> CImg<typename cimg::largest<T,t>::type> get_mul(const CImg<t>& img) const {
  8304. - typedef typename cimg::largest<T,t>::type restype;
  8305. - return CImg<restype>(*this,false).mul(img);
  8306. - }
  8307. -
  8308. - //! Replace the image by the pointwise division between \p *this and \p img.
  8309. - /**
  8310. - This is the in-place version of get_div().
  8311. - \see get_div().
  8312. - **/
  8313. - template<typename t> CImg& div(const CImg<t>& img) {
  8314. - t *ptrs = img.data;
  8315. - T *ptrf = data + cimg::min(size(),img.size());
  8316. - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)(*ptrd/(*(ptrs++)));
  8317. - return *this;
  8318. - }
  8319. -
  8320. - //! Return an image from a pointwise division between \p *this and \p img.
  8321. - /**
  8322. - \param img = argument of the division.
  8323. - \note if \c *this and \c img have different size, the division is applied
  8324. - only on possible values.
  8325. - \see get_mul(),mul(),div()
  8326. - **/
  8327. - template<typename t> CImg<typename cimg::largest<T,t>::type> get_div(const CImg<t>& img) const {
  8328. - typedef typename cimg::largest<T,t>::type restype;
  8329. - return CImg<restype>(*this,false).div(img);
  8330. - }
  8331. -
  8332. - //! Replace the image by the pointwise max operator between \p *this and \p img
  8333. - /**
  8334. - This is the in-place version of get_max().
  8335. - \see get_max().
  8336. - **/
  8337. - template<typename t> CImg& max(const CImg<t>& img) {
  8338. - t *ptrs = img.data;
  8339. - T *ptrf = data + cimg::min(size(),img.size());
  8340. - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=cimg::max((T)*(ptrs++),*ptrd);
  8341. - return *this;
  8342. - }
  8343. -
  8344. - //! Return the image corresponding to the max value for each pixel.
  8345. - /**
  8346. - \param img = second argument of the max operator (the first one is *this).
  8347. - \see max(), min(), get_min()
  8348. - **/
  8349. - template<typename t> CImg<typename cimg::largest<T,t>::type> get_max(const CImg<t>& img) const {
  8350. - typedef typename cimg::largest<T,t>::type restype;
  8351. - return CImg<restype>(*this,false).max(img);
  8352. - }
  8353. -
  8354. - //! Replace the image by the pointwise max operator between \p *this and \p val
  8355. - /**
  8356. - This is the in-place version of get_max().
  8357. - \see get_max().
  8358. - **/
  8359. -#ifdef cimg_use_visualcpp6
  8360. - CImg& max(const T val) {
  8361. -#else
  8362. - CImg& max(const T& val) {
  8363. -#endif
  8364. - cimg_for(*this,ptr,T) (*ptr)=cimg::max(*ptr,val);
  8365. - return *this;
  8366. - }
  8367. -
  8368. - //! Return the image corresponding to the max value for each pixel.
  8369. - /**
  8370. - \param val = second argument of the max operator (the first one is *this).
  8371. - \see max(), min(), get_min()
  8372. - **/
  8373. -#ifdef cimg_use_visualcpp6
  8374. - CImg get_max(const T val) const {
  8375. -#else
  8376. - CImg get_max(const T& val) const {
  8377. -#endif
  8378. - return (+*this).max(val);
  8379. - }
  8380. -
  8381. - //! Replace the image by the pointwise min operator between \p *this and \p img
  8382. - /**
  8383. - This is the in-place version of get_min().
  8384. - \see get_min().
  8385. - **/
  8386. - template<typename t> CImg& min(const CImg<t>& img) {
  8387. - t *ptrs = img.data;
  8388. - T *ptrf = data + cimg::min(size(),img.size());
  8389. - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=cimg::min((T)*(ptrs++),*ptrd);
  8390. - return *this;
  8391. - }
  8392. - //! Return the image corresponding to the min value for each pixel.
  8393. - /**
  8394. - \param img = second argument of the min operator (the first one is *this).
  8395. - \see min(), max(), get_max()
  8396. - **/
  8397. - template<typename t> CImg<typename cimg::largest<T,t>::type> get_min(const CImg<t>& img) const {
  8398. - typedef typename cimg::largest<T,t>::type restype;
  8399. - return CImg<restype>(*this,false).min(img);
  8400. - }
  8401. -
  8402. - //! Replace the image by the pointwise min operator between \p *this and \p val
  8403. - /**
  8404. - This is the in-place version of get_min().
  8405. - \see get_min().
  8406. - **/
  8407. -#ifdef cimg_use_visualcpp6
  8408. - CImg& min(const T val) {
  8409. -#else
  8410. - CImg& min(const T& val) {
  8411. -#endif
  8412. - cimg_for(*this,ptr,T) (*ptr)=cimg::min(*ptr,val);
  8413. - return *this;
  8414. - }
  8415. -
  8416. - //! Return the image corresponding to the min value for each pixel.
  8417. - /**
  8418. - \param val = second argument of the min operator (the first one is *this).
  8419. - \see min(), max(), get_max()
  8420. - **/
  8421. -#ifdef cimg_use_visualcpp6
  8422. - CImg get_min(const T val) const {
  8423. -#else
  8424. - CImg get_min(const T& val) const {
  8425. -#endif
  8426. - return (+*this).min(val);
  8427. - }
  8428. -
  8429. - //! Replace each image pixel by its square root.
  8430. - /**
  8431. - \see get_sqrt()
  8432. - **/
  8433. - CImg& sqrt() {
  8434. - cimg_for(*this,ptr,T) (*ptr)=(T)std::sqrt((double)(*ptr));
  8435. - return *this;
  8436. - }
  8437. -
  8438. - //! Return the image of the square root of the pixel values.
  8439. - /**
  8440. - \see sqrt()
  8441. - **/
  8442. - CImg<typename cimg::largest<T,float>::type> get_sqrt() const {
  8443. - typedef typename cimg::largest<T,float>::type restype;
  8444. - return CImg<restype>(*this,false).sqrt();
  8445. - }
  8446. -
  8447. - //! Replace each image pixel by its exponential.
  8448. - CImg& exp() {
  8449. - cimg_for(*this,ptr,T) (*ptr)=(T)std::exp((double)(*ptr));
  8450. - return *this;
  8451. - }
  8452. -
  8453. - //! Return the image of the exponential of the pixel values.
  8454. - CImg<typename cimg::largest<T,float>::type> get_exp() const {
  8455. - typedef typename cimg::largest<T,float>::type restype;
  8456. - return CImg<restype>(*this,false).exp();
  8457. - }
  8458. -
  8459. - //! Replace each image pixel by its log.
  8460. - /**
  8461. - \see get_log(), log10(), get_log10()
  8462. - **/
  8463. - CImg& log() {
  8464. - cimg_for(*this,ptr,T) (*ptr)=(T)std::log((double)(*ptr));
  8465. - return *this;
  8466. - }
  8467. -
  8468. - //! Return the image of the log of the pixel values.
  8469. - /**
  8470. - \see log(), log10(), get_log10()
  8471. - **/
  8472. - CImg<typename cimg::largest<T,float>::type> get_log() const {
  8473. - typedef typename cimg::largest<T,float>::type restype;
  8474. - return CImg<restype>(*this,false).log();
  8475. - }
  8476. -
  8477. - //! Replace each image pixel by its log10.
  8478. - /**
  8479. - \see get_log10(), log(), get_log()
  8480. - **/
  8481. - CImg& log10() {
  8482. - cimg_for(*this,ptr,T) (*ptr)=(T)std::log10((double)(*ptr));
  8483. - return *this;
  8484. - }
  8485. -
  8486. - //! Return the image of the log10 of the pixel values.
  8487. - /**
  8488. - \see log10(), log(), get_log()
  8489. - **/
  8490. - CImg<typename cimg::largest<T,float>::type> get_log10() const {
  8491. - typedef typename cimg::largest<T,float>::type restype;
  8492. - return CImg<restype>(*this,false).log10();
  8493. - }
  8494. -
  8495. - //! Replace each image pixel by its power by \p p.
  8496. - /**
  8497. - \param p = power
  8498. - \see get_pow(), sqrt(), get_sqrt()
  8499. - **/
  8500. - CImg& pow(const double p) {
  8501. - if (p==0) return fill(1);
  8502. - if (p==1) return *this;
  8503. - if (p==2) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val; } return *this; }
  8504. - if (p==3) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val; } return *this; }
  8505. - if (p==4) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val*val; } return *this; }
  8506. - cimg_for(*this,ptr,T) (*ptr)=(T)std::pow((double)(*ptr),p);
  8507. - return *this;
  8508. - }
  8509. -
  8510. - //! Return the image of the square root of the pixel values.
  8511. - /**
  8512. - \param p = power
  8513. - \see pow(), sqrt(), get_sqrt()
  8514. - **/
  8515. - CImg<typename cimg::largest<T,float>::type> get_pow(const double p) const {
  8516. - typedef typename cimg::largest<T,float>::type restype;
  8517. - return CImg<restype>(*this,false).pow(p);
  8518. - }
  8519. -
  8520. - //! Return each image pixel (*this)(x,y,z,k) by its power by \p img(x,y,z,k)
  8521. - /**
  8522. - In-place version
  8523. - **/
  8524. - template<typename t> CImg& pow(const CImg<t>& img) {
  8525. - t *ptrs = img.data;
  8526. - T *ptrf = data + cimg::min(size(),img.size());
  8527. - for (T* ptrd = data; ptrd<ptrf; ptrd++) (*ptrd)=(T)std::pow((double)*ptrd,(double)(*(ptrs++)));
  8528. - return *this;
  8529. - }
  8530. -
  8531. - //! Return each image pixel (*this)(x,y,z,k) by its power by \p img(x,y,z,k)
  8532. - template<typename t> CImg<typename cimg::largest<T,float>::type> get_pow(const CImg<t>& img) const {
  8533. - typedef typename cimg::largest<T,float>::type restype;
  8534. - return CImg<restype>(*this,false).pow(img);
  8535. - }
  8536. -
  8537. - //! Replace each pixel value by its absolute value.
  8538. - /**
  8539. - \see get_abs()
  8540. - **/
  8541. - CImg& abs() {
  8542. - cimg_for(*this,ptr,T) (*ptr)=cimg::abs(*ptr);
  8543. - return *this;
  8544. - }
  8545. -
  8546. - //! Return the image of the absolute value of the pixel values.
  8547. - /**
  8548. - \see abs()
  8549. - **/
  8550. - CImg<typename cimg::largest<T,float>::type> get_abs() const {
  8551. - typedef typename cimg::largest<T,float>::type restype;
  8552. - return CImg<restype>(*this,false).abs();
  8553. - }
  8554. -
  8555. - //! Replace each image pixel by its cosinus.
  8556. - /**
  8557. - \see get_cos(), sin(), get_sin(), tan(), get_tan()
  8558. - **/
  8559. - CImg& cos() {
  8560. - cimg_for(*this,ptr,T) (*ptr)=(T)std::cos((double)(*ptr));
  8561. - return *this;
  8562. - }
  8563. -
  8564. - //! Return the image of the cosinus of the pixel values.
  8565. - /**
  8566. - \see cos(), sin(), get_sin(), tan(), get_tan()
  8567. - **/
  8568. - CImg<typename cimg::largest<T,float>::type> get_cos() const {
  8569. - typedef typename cimg::largest<T,float>::type restype;
  8570. - return CImg<restype>(*this,false).cos();
  8571. - }
  8572. -
  8573. - //! Replace each image pixel by its sinus.
  8574. - /**
  8575. - \see get_sin(), cos(), get_cos(), tan(), get_tan()
  8576. - **/
  8577. - CImg& sin() {
  8578. - cimg_for(*this,ptr,T) (*ptr)=(T)std::sin((double)(*ptr));
  8579. - return *this;
  8580. - }
  8581. -
  8582. - //! Return the image of the sinus of the pixel values.
  8583. - /**
  8584. - \see sin(), cos(), get_cos(), tan(), get_tan()
  8585. - **/
  8586. - CImg<typename cimg::largest<T,float>::type> get_sin() const {
  8587. - typedef typename cimg::largest<T,float>::type restype;
  8588. - return CImg<restype>(*this,false).sin();
  8589. - }
  8590. -
  8591. - //! Replace each image pixel by its tangent.
  8592. - /**
  8593. - \see get_tan(), cos(), get_cos(), sin(), get_sin()
  8594. - **/
  8595. - CImg& tan() {
  8596. - cimg_for(*this,ptr,T) (*ptr)=(T)std::tan((double)(*ptr));
  8597. - return *this;
  8598. - }
  8599. -
  8600. - //! Return the image of the tangent of the pixel values.
  8601. - /**
  8602. - \see tan(), cos(), get_cos(), sin(), get_sin()
  8603. - **/
  8604. - CImg<typename cimg::largest<T,float>::type> get_tan() const {
  8605. - typedef typename cimg::largest<T,float>::type restype;
  8606. - return CImg<restype>(*this,false).tan();
  8607. - }
  8608. -
  8609. - //! Replace each image pixel by its arc-cosinus.
  8610. - CImg& acos() {
  8611. - cimg_for(*this,ptr,T) (*ptr)=(T)std::acos((double)(*ptr));
  8612. - return *this;
  8613. - }
  8614. -
  8615. - //! Return the image of the arc-cosinus of the pixel values.
  8616. - CImg<typename cimg::largest<T,float>::type> get_acos() const {
  8617. - typedef typename cimg::largest<T,float>::type restype;
  8618. - return CImg<restype>(*this,false).acos();
  8619. - }
  8620. -
  8621. - //! Replace each image pixel by its arc-sinus.
  8622. - CImg& asin() {
  8623. - cimg_for(*this,ptr,T) (*ptr)=(T)std::asin((double)(*ptr));
  8624. - return *this;
  8625. - }
  8626. -
  8627. - //! Return the image of the arc-sinus of the pixel values.
  8628. - CImg<typename cimg::largest<T,float>::type> get_asin() const {
  8629. - typedef typename cimg::largest<T,float>::type restype;
  8630. - return CImg<restype>(*this,false).asin();
  8631. - }
  8632. -
  8633. - //! Replace each image pixel by its arc-tangent.
  8634. - CImg& atan() {
  8635. - cimg_for(*this,ptr,T) (*ptr)=(T)std::atan((double)(*ptr));
  8636. - return *this;
  8637. - }
  8638. -
  8639. - //! Return the image of the arc-tangent of the pixel values.
  8640. - CImg<typename cimg::largest<T,float>::type> get_atan() const {
  8641. - typedef typename cimg::largest<T,float>::type restype;
  8642. - return CImg<restype>(*this,false).atan();
  8643. - }
  8644. -
  8645. - //! Return the MSE (Mean-Squared Error) between two images.
  8646. - template<typename t> double MSE(const CImg<t>& img) const {
  8647. - if (img.size()!=size())
  8648. - throw CImgArgumentException("CImg<%s>::MSE() : Instance image (%u,%u,%u,%u) and given image (%u,%u,%u,%u) have different dimensions.",
  8649. - pixel_type(),width,height,depth,dim,img.width,img.height,img.depth,img.dim);
  8650. -
  8651. - double vMSE = 0;
  8652. - const t* ptr2 = img.end();
  8653. - cimg_for(*this,ptr1,T) {
  8654. - const double diff = (double)*ptr1 - (double)*(--ptr2);
  8655. - vMSE += diff*diff;
  8656. - }
  8657. - vMSE/=img.size();
  8658. - return vMSE;
  8659. - }
  8660. -
  8661. - //! Return the PSNR between two images.
  8662. - template<typename t> double PSNR(const CImg<t>& img, const double valmax=255.0) const {
  8663. - const double vMSE = std::sqrt(MSE(img));
  8664. - return (vMSE!=0)?(20*std::log10(valmax/vMSE)):(cimg::type<double>::max());
  8665. - }
  8666. -
  8667. - //@}
  8668. - //-----------------------------------
  8669. - //
  8670. - //! \name Usual Image Transformations
  8671. - //@{
  8672. - //-----------------------------------
  8673. -
  8674. - //! Fill an image by a value \p val.
  8675. - /**
  8676. - \param val = fill value
  8677. - \note All pixel values of the instance image will be initialized by \p val.
  8678. - \see operator=().
  8679. - **/
  8680. - CImg& fill(const T& val) {
  8681. - if (!is_empty()) {
  8682. - if (val!=0 && sizeof(T)!=1) cimg_for(*this,ptr,T) *ptr=val;
  8683. - else std::memset(data,(int)val,size()*sizeof(T));
  8684. - }
  8685. - return *this;
  8686. - }
  8687. -
  8688. - CImg get_fill(const T& val) const {
  8689. - return (+*this).fill(val);
  8690. - }
  8691. -
  8692. - //! Fill sequentially all pixel values with values \a val0 and \a val1 respectively.
  8693. - /**
  8694. - \param val0 = fill value 1
  8695. - \param val1 = fill value 2
  8696. - **/
  8697. - CImg& fill(const T& val0,const T& val1) {
  8698. - if (!is_empty()) {
  8699. - T *ptr, *ptr_end = end()-1;
  8700. - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; }
  8701. - if (ptr!=ptr_end+1) *(ptr++)=val0;
  8702. - }
  8703. - return *this;
  8704. - }
  8705. -
  8706. - CImg get_fill(const T& val0, const T& val1) const {
  8707. - return (+*this).fill(val0,val1);
  8708. - }
  8709. -
  8710. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2.
  8711. - /**
  8712. - \param val0 = fill value 1
  8713. - \param val1 = fill value 2
  8714. - \param val2 = fill value 3
  8715. - **/
  8716. - CImg& fill(const T& val0,const T& val1,const T& val2) {
  8717. - if (!is_empty()) {
  8718. - T *ptr, *ptr_end = end()-2;
  8719. - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; }
  8720. - ptr_end+=2;
  8721. - switch (ptr_end-ptr) {
  8722. - case 2: *(--ptr_end)=val1;
  8723. - case 1: *(--ptr_end)=val0;
  8724. - }
  8725. - }
  8726. - return *this;
  8727. - }
  8728. -
  8729. - CImg get_fill(const T& val0, const T& val1, const T& val2) const {
  8730. - return (+*this).fill(val0,val1,val2);
  8731. - }
  8732. -
  8733. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3.
  8734. - /**
  8735. - \param val0 = fill value 1
  8736. - \param val1 = fill value 2
  8737. - \param val2 = fill value 3
  8738. - \param val3 = fill value 4
  8739. - **/
  8740. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3) {
  8741. - if (!is_empty()) {
  8742. - T *ptr, *ptr_end = end()-3;
  8743. - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; }
  8744. - ptr_end+=3;
  8745. - switch (ptr_end-ptr) {
  8746. - case 3: *(--ptr_end)=val2;
  8747. - case 2: *(--ptr_end)=val1;
  8748. - case 1: *(--ptr_end)=val0;
  8749. - }
  8750. - }
  8751. - return *this;
  8752. - }
  8753. -
  8754. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3) const {
  8755. - return (+*this).fill(val0,val1,val2,val3);
  8756. - }
  8757. -
  8758. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4.
  8759. - /**
  8760. - \param val0 = fill value 1
  8761. - \param val1 = fill value 2
  8762. - \param val2 = fill value 3
  8763. - \param val3 = fill value 4
  8764. - \param val4 = fill value 5
  8765. - **/
  8766. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4) {
  8767. - if (!is_empty()) {
  8768. - T *ptr, *ptr_end = end()-4;
  8769. - for (ptr=data; ptr<ptr_end; ) { *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; }
  8770. - ptr_end+=4;
  8771. - switch (ptr_end-ptr) {
  8772. - case 4: *(--ptr_end)=val3;
  8773. - case 3: *(--ptr_end)=val2;
  8774. - case 2: *(--ptr_end)=val1;
  8775. - case 1: *(--ptr_end)=val0;
  8776. - }
  8777. - }
  8778. - return *this;
  8779. - }
  8780. -
  8781. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4) const {
  8782. - return (+*this).fill(val0,val1,val2,val3,val4);
  8783. - }
  8784. -
  8785. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4 and \a val5
  8786. - /**
  8787. - \param val0 = fill value 1
  8788. - \param val1 = fill value 2
  8789. - \param val2 = fill value 3
  8790. - \param val3 = fill value 4
  8791. - \param val4 = fill value 5
  8792. - \param val5 = fill value 6
  8793. - **/
  8794. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,const T& val5) {
  8795. - if (!is_empty()) {
  8796. - T *ptr, *ptr_end = end()-5;
  8797. - for (ptr=data; ptr<ptr_end; ) {
  8798. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
  8799. - }
  8800. - ptr_end+=5;
  8801. - switch (ptr_end-ptr) {
  8802. - case 5: *(--ptr_end)=val4;
  8803. - case 4: *(--ptr_end)=val3;
  8804. - case 3: *(--ptr_end)=val2;
  8805. - case 2: *(--ptr_end)=val1;
  8806. - case 1: *(--ptr_end)=val0;
  8807. - }
  8808. - }
  8809. - return *this;
  8810. - }
  8811. -
  8812. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5) const {
  8813. - return (+*this).fill(val0,val1,val2,val3,val4,val5);
  8814. - }
  8815. -
  8816. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a val4 and \a val5
  8817. - /**
  8818. - \param val0 = fill value 1
  8819. - \param val1 = fill value 2
  8820. - \param val2 = fill value 3
  8821. - \param val3 = fill value 4
  8822. - \param val4 = fill value 5
  8823. - \param val5 = fill value 6
  8824. - \param val6 = fill value 7
  8825. - **/
  8826. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
  8827. - const T& val4,const T& val5,const T& val6) {
  8828. - if (!is_empty()) {
  8829. - T *ptr, *ptr_end = end()-6;
  8830. - for (ptr=data; ptr<ptr_end; ) {
  8831. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5; *(ptr++)=val6;
  8832. - }
  8833. - ptr_end+=6;
  8834. - switch (ptr_end-ptr) {
  8835. - case 6: *(--ptr_end)=val5;
  8836. - case 5: *(--ptr_end)=val4;
  8837. - case 4: *(--ptr_end)=val3;
  8838. - case 3: *(--ptr_end)=val2;
  8839. - case 2: *(--ptr_end)=val1;
  8840. - case 1: *(--ptr_end)=val0;
  8841. - }
  8842. - }
  8843. - return *this;
  8844. - }
  8845. -
  8846. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  8847. - const T& val6) const {
  8848. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6);
  8849. - }
  8850. -
  8851. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val7.
  8852. - /**
  8853. - \param val0 = fill value 1
  8854. - \param val1 = fill value 2
  8855. - \param val2 = fill value 3
  8856. - \param val3 = fill value 4
  8857. - \param val4 = fill value 5
  8858. - \param val5 = fill value 6
  8859. - \param val6 = fill value 7
  8860. - \param val7 = fill value 8
  8861. - **/
  8862. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
  8863. - const T& val4,const T& val5,const T& val6,const T& val7) {
  8864. - if (!is_empty()) {
  8865. - T *ptr, *ptr_end = end()-7;
  8866. - for (ptr=data; ptr<ptr_end; ) {
  8867. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3;
  8868. - *(ptr++)=val4; *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7;
  8869. - }
  8870. - ptr_end+=7;
  8871. - switch (ptr_end-ptr) {
  8872. - case 7: *(--ptr_end)=val6;
  8873. - case 6: *(--ptr_end)=val5;
  8874. - case 5: *(--ptr_end)=val4;
  8875. - case 4: *(--ptr_end)=val3;
  8876. - case 3: *(--ptr_end)=val2;
  8877. - case 2: *(--ptr_end)=val1;
  8878. - case 1: *(--ptr_end)=val0;
  8879. - }
  8880. - }
  8881. - return *this;
  8882. - }
  8883. -
  8884. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  8885. - const T& val6, const T& val7) const {
  8886. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7);
  8887. - }
  8888. -
  8889. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val8.
  8890. - /**
  8891. - \param val0 = fill value 1
  8892. - \param val1 = fill value 2
  8893. - \param val2 = fill value 3
  8894. - \param val3 = fill value 4
  8895. - \param val4 = fill value 5
  8896. - \param val5 = fill value 6
  8897. - \param val6 = fill value 7
  8898. - \param val7 = fill value 8
  8899. - \param val8 = fill value 9
  8900. - **/
  8901. - CImg& fill(const T& val0,const T& val1,const T& val2,
  8902. - const T& val3,const T& val4,const T& val5,
  8903. - const T& val6,const T& val7,const T& val8) {
  8904. - if (!is_empty()) {
  8905. - T *ptr, *ptr_end = end()-8;
  8906. - for (ptr=data; ptr<ptr_end; ) {
  8907. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2;
  8908. - *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
  8909. - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8;
  8910. - }
  8911. - ptr_end+=8;
  8912. - switch (ptr_end-ptr) {
  8913. - case 8: *(--ptr_end)=val7;
  8914. - case 7: *(--ptr_end)=val6;
  8915. - case 6: *(--ptr_end)=val5;
  8916. - case 5: *(--ptr_end)=val4;
  8917. - case 4: *(--ptr_end)=val3;
  8918. - case 3: *(--ptr_end)=val2;
  8919. - case 2: *(--ptr_end)=val1;
  8920. - case 1: *(--ptr_end)=val0;
  8921. - }
  8922. - }
  8923. - return *this;
  8924. - }
  8925. -
  8926. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  8927. - const T& val6, const T& val7, const T& val8) const {
  8928. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8);
  8929. - }
  8930. -
  8931. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val9.
  8932. - /**
  8933. - \param val0 = fill value 1
  8934. - \param val1 = fill value 2
  8935. - \param val2 = fill value 3
  8936. - \param val3 = fill value 4
  8937. - \param val4 = fill value 5
  8938. - \param val5 = fill value 6
  8939. - \param val6 = fill value 7
  8940. - \param val7 = fill value 8
  8941. - \param val8 = fill value 9
  8942. - \param val9 = fill value 10
  8943. - **/
  8944. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
  8945. - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9) {
  8946. - if (!is_empty()) {
  8947. - T *ptr, *ptr_end = end()-9;
  8948. - for (ptr=data; ptr<ptr_end; ) {
  8949. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4;
  8950. - *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9;
  8951. - }
  8952. - ptr_end+=9;
  8953. - switch (ptr_end-ptr) {
  8954. - case 9: *(--ptr_end)=val8;
  8955. - case 8: *(--ptr_end)=val7;
  8956. - case 7: *(--ptr_end)=val6;
  8957. - case 6: *(--ptr_end)=val5;
  8958. - case 5: *(--ptr_end)=val4;
  8959. - case 4: *(--ptr_end)=val3;
  8960. - case 3: *(--ptr_end)=val2;
  8961. - case 2: *(--ptr_end)=val1;
  8962. - case 1: *(--ptr_end)=val0;
  8963. - }
  8964. - }
  8965. - return *this;
  8966. - }
  8967. -
  8968. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  8969. - const T& val6, const T& val7, const T& val8, const T& val9) const {
  8970. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9);
  8971. - }
  8972. -
  8973. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val11.
  8974. - /**
  8975. - \param val0 = fill value 1
  8976. - \param val1 = fill value 2
  8977. - \param val2 = fill value 3
  8978. - \param val3 = fill value 4
  8979. - \param val4 = fill value 5
  8980. - \param val5 = fill value 6
  8981. - \param val6 = fill value 7
  8982. - \param val7 = fill value 8
  8983. - \param val8 = fill value 9
  8984. - \param val9 = fill value 10
  8985. - \param val10 = fill value 11
  8986. - \param val11 = fill value 12
  8987. - **/
  8988. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
  8989. - const T& val4,const T& val5,const T& val6,const T& val7,
  8990. - const T& val8,const T& val9,const T& val10,const T& val11) {
  8991. - if (!is_empty()) {
  8992. - T *ptr, *ptr_end = end()-11;
  8993. - for (ptr=data; ptr<ptr_end; ) {
  8994. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
  8995. - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
  8996. - }
  8997. - ptr_end+=11;
  8998. - switch (ptr_end-ptr) {
  8999. - case 11: *(--ptr_end)=val10;
  9000. - case 10: *(--ptr_end)=val9;
  9001. - case 9: *(--ptr_end)=val8;
  9002. - case 8: *(--ptr_end)=val7;
  9003. - case 7: *(--ptr_end)=val6;
  9004. - case 6: *(--ptr_end)=val5;
  9005. - case 5: *(--ptr_end)=val4;
  9006. - case 4: *(--ptr_end)=val3;
  9007. - case 3: *(--ptr_end)=val2;
  9008. - case 2: *(--ptr_end)=val1;
  9009. - case 1: *(--ptr_end)=val0;
  9010. - }
  9011. - }
  9012. - return *this;
  9013. - }
  9014. -
  9015. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  9016. - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11) const {
  9017. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11);
  9018. - }
  9019. -
  9020. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val11.
  9021. - /**
  9022. - \param val0 = fill value 1
  9023. - \param val1 = fill value 2
  9024. - \param val2 = fill value 3
  9025. - \param val3 = fill value 4
  9026. - \param val4 = fill value 5
  9027. - \param val5 = fill value 6
  9028. - \param val6 = fill value 7
  9029. - \param val7 = fill value 8
  9030. - \param val8 = fill value 9
  9031. - \param val9 = fill value 10
  9032. - \param val10 = fill value 11
  9033. - \param val11 = fill value 12
  9034. - \param val12 = fill value 13
  9035. - **/
  9036. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
  9037. - const T& val4,const T& val5,const T& val6,const T& val7,
  9038. - const T& val8,const T& val9,const T& val10,const T& val11,
  9039. - const T& val12) {
  9040. - if (!is_empty()) {
  9041. - T *ptr, *ptr_end = end()-12;
  9042. - for (ptr=data; ptr<ptr_end; ) {
  9043. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
  9044. - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
  9045. - *(ptr++)=val12;
  9046. - }
  9047. - ptr_end+=12;
  9048. - switch (ptr_end-ptr) {
  9049. - case 12: *(--ptr_end)=val11;
  9050. - case 11: *(--ptr_end)=val10;
  9051. - case 10: *(--ptr_end)=val9;
  9052. - case 9: *(--ptr_end)=val8;
  9053. - case 8: *(--ptr_end)=val7;
  9054. - case 7: *(--ptr_end)=val6;
  9055. - case 6: *(--ptr_end)=val5;
  9056. - case 5: *(--ptr_end)=val4;
  9057. - case 4: *(--ptr_end)=val3;
  9058. - case 3: *(--ptr_end)=val2;
  9059. - case 2: *(--ptr_end)=val1;
  9060. - case 1: *(--ptr_end)=val0;
  9061. - }
  9062. - }
  9063. - return *this;
  9064. - }
  9065. -
  9066. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  9067. - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11,
  9068. - const T& val12, const T& val13) const {
  9069. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13);
  9070. - }
  9071. -
  9072. -
  9073. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val15.
  9074. - /**
  9075. - \param val0 = fill value 1
  9076. - \param val1 = fill value 2
  9077. - \param val2 = fill value 3
  9078. - \param val3 = fill value 4
  9079. - \param val4 = fill value 5
  9080. - \param val5 = fill value 6
  9081. - \param val6 = fill value 7
  9082. - \param val7 = fill value 8
  9083. - \param val8 = fill value 9
  9084. - \param val9 = fill value 10
  9085. - \param val10 = fill value 11
  9086. - \param val11 = fill value 12
  9087. - \param val12 = fill value 13
  9088. - \param val13 = fill value 14
  9089. - \param val14 = fill value 15
  9090. - \param val15 = fill value 16
  9091. - **/
  9092. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,
  9093. - const T& val4,const T& val5,const T& val6,const T& val7,
  9094. - const T& val8,const T& val9,const T& val10,const T& val11,
  9095. - const T& val12,const T& val13,const T& val14,const T& val15) {
  9096. - if (!is_empty()) {
  9097. - T *ptr, *ptr_end = end()-15;
  9098. - for (ptr=data; ptr<ptr_end; ) {
  9099. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4; *(ptr++)=val5;
  9100. - *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9; *(ptr++)=val10; *(ptr++)=val11;
  9101. - *(ptr++)=val12; *(ptr++)=val13; *(ptr++)=val14; *(ptr++)=val15;
  9102. - }
  9103. - ptr_end+=15;
  9104. - switch (ptr_end-ptr) {
  9105. - case 15: *(--ptr_end)=val14;
  9106. - case 14: *(--ptr_end)=val13;
  9107. - case 13: *(--ptr_end)=val12;
  9108. - case 12: *(--ptr_end)=val11;
  9109. - case 11: *(--ptr_end)=val10;
  9110. - case 10: *(--ptr_end)=val9;
  9111. - case 9: *(--ptr_end)=val8;
  9112. - case 8: *(--ptr_end)=val7;
  9113. - case 7: *(--ptr_end)=val6;
  9114. - case 6: *(--ptr_end)=val5;
  9115. - case 5: *(--ptr_end)=val4;
  9116. - case 4: *(--ptr_end)=val3;
  9117. - case 3: *(--ptr_end)=val2;
  9118. - case 2: *(--ptr_end)=val1;
  9119. - case 1: *(--ptr_end)=val0;
  9120. - }
  9121. - }
  9122. - return *this;
  9123. - }
  9124. -
  9125. - CImg get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
  9126. - const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11,
  9127. - const T& val12, const T& val13, const T& val14, const T& val15) const {
  9128. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13,val14,val15);
  9129. - }
  9130. -
  9131. - //! Fill sequentially all pixel values with values \a val0 and \a val1 and \a val2 and \a val3 and \a ... and \a val24.
  9132. - /**
  9133. - \param val0 = fill value 1
  9134. - \param val1 = fill value 2
  9135. - \param val2 = fill value 3
  9136. - \param val3 = fill value 4
  9137. - \param val4 = fill value 5
  9138. - \param val5 = fill value 6
  9139. - \param val6 = fill value 7
  9140. - \param val7 = fill value 8
  9141. - \param val8 = fill value 9
  9142. - \param val9 = fill value 10
  9143. - \param val10 = fill value 11
  9144. - \param val11 = fill value 12
  9145. - \param val12 = fill value 13
  9146. - \param val13 = fill value 14
  9147. - \param val14 = fill value 15
  9148. - \param val15 = fill value 16
  9149. - \param val16 = fill value 17
  9150. - \param val17 = fill value 18
  9151. - \param val18 = fill value 19
  9152. - \param val19 = fill value 20
  9153. - \param val20 = fill value 21
  9154. - \param val21 = fill value 22
  9155. - \param val22 = fill value 23
  9156. - \param val23 = fill value 24
  9157. - \param val24 = fill value 25
  9158. - **/
  9159. - CImg& fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
  9160. - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9,
  9161. - const T& val10,const T& val11,const T& val12,const T& val13,const T& val14,
  9162. - const T& val15,const T& val16,const T& val17,const T& val18,const T& val19,
  9163. - const T& val20,const T& val21,const T& val22,const T& val23,const T& val24) {
  9164. - if (!is_empty()) {
  9165. - T *ptr, *ptr_end = end()-24;
  9166. - for (ptr=data; ptr<ptr_end; ) {
  9167. - *(ptr++)=val0; *(ptr++)=val1; *(ptr++)=val2; *(ptr++)=val3; *(ptr++)=val4;
  9168. - *(ptr++)=val5; *(ptr++)=val6; *(ptr++)=val7; *(ptr++)=val8; *(ptr++)=val9;
  9169. - *(ptr++)=val10; *(ptr++)=val11; *(ptr++)=val12; *(ptr++)=val13; *(ptr++)=val14;
  9170. - *(ptr++)=val15; *(ptr++)=val16; *(ptr++)=val17; *(ptr++)=val18; *(ptr++)=val19;
  9171. - *(ptr++)=val20; *(ptr++)=val21; *(ptr++)=val22; *(ptr++)=val23; *(ptr++)=val24;
  9172. - }
  9173. - ptr_end+=24;
  9174. - switch (ptr_end-ptr) {
  9175. - case 24: *(--ptr_end)=val23;
  9176. - case 23: *(--ptr_end)=val22;
  9177. - case 22: *(--ptr_end)=val21;
  9178. - case 21: *(--ptr_end)=val20;
  9179. - case 20: *(--ptr_end)=val19;
  9180. - case 19: *(--ptr_end)=val18;
  9181. - case 18: *(--ptr_end)=val17;
  9182. - case 17: *(--ptr_end)=val16;
  9183. - case 16: *(--ptr_end)=val15;
  9184. - case 15: *(--ptr_end)=val14;
  9185. - case 14: *(--ptr_end)=val13;
  9186. - case 13: *(--ptr_end)=val12;
  9187. - case 12: *(--ptr_end)=val11;
  9188. - case 11: *(--ptr_end)=val10;
  9189. - case 10: *(--ptr_end)=val9;
  9190. - case 9: *(--ptr_end)=val8;
  9191. - case 8: *(--ptr_end)=val7;
  9192. - case 7: *(--ptr_end)=val6;
  9193. - case 6: *(--ptr_end)=val5;
  9194. - case 5: *(--ptr_end)=val4;
  9195. - case 4: *(--ptr_end)=val3;
  9196. - case 3: *(--ptr_end)=val2;
  9197. - case 2: *(--ptr_end)=val1;
  9198. - case 1: *(--ptr_end)=val0;
  9199. - }
  9200. - }
  9201. - return *this;
  9202. - }
  9203. -
  9204. - CImg get_fill(const T& val0,const T& val1,const T& val2,const T& val3,const T& val4,
  9205. - const T& val5,const T& val6,const T& val7,const T& val8,const T& val9,
  9206. - const T& val10,const T& val11,const T& val12,const T& val13,const T& val14,
  9207. - const T& val15,const T& val16,const T& val17,const T& val18,const T& val19,
  9208. - const T& val20,const T& val21,const T& val22,const T& val23,const T& val24) const {
  9209. - return (+*this).fill(val0,val1,val2,val3,val4,val5,val6,val7,val8,val9,
  9210. - val10,val11,val12,val13,val14,val15,val16,val17,val18,val19,
  9211. - val20,val21,val22,val23,val24);
  9212. - }
  9213. -
  9214. - //! Linear normalization of the pixel values between \a a and \a b.
  9215. - /**
  9216. - \param a = minimum pixel value after normalization.
  9217. - \param b = maximum pixel value after normalization.
  9218. - \see get_normalize(), cut(), get_cut().
  9219. - **/
  9220. - CImg& normalize(const T& a, const T& b) {
  9221. - if (!is_empty()) {
  9222. - const CImgStats st(*this,false);
  9223. - if (st.min==st.max) return fill(0);
  9224. - if (st.min!=a || st.max!=b) cimg_for(*this,ptr,T) *ptr=(T)((*ptr-st.min)/(st.max-st.min)*(b-a)+a);
  9225. - }
  9226. - return *this;
  9227. - }
  9228. -
  9229. - //! Return the image of normalized values.
  9230. - /**
  9231. - \param a = minimum pixel value after normalization.
  9232. - \param b = maximum pixel value after normalization.
  9233. - \see normalize(), cut(), get_cut().
  9234. - **/
  9235. - CImg get_normalize(const T& a, const T& b) const {
  9236. - return (+*this).normalize(a,b);
  9237. - }
  9238. -
  9239. - //! Cut pixel values between \a a and \a b.
  9240. - /**
  9241. - \param a = minimum pixel value after cut.
  9242. - \param b = maximum pixel value after cut.
  9243. - \see get_cut(), normalize(), get_normalize().
  9244. - **/
  9245. - CImg& cut(const T& a, const T& b) {
  9246. - if (!is_empty())
  9247. - cimg_for(*this,ptr,T) *ptr = (*ptr<a)?a:((*ptr>b)?b:*ptr);
  9248. - return *this;
  9249. - }
  9250. -
  9251. - //! Return the image of cutted values.
  9252. - /**
  9253. - \param a = minimum pixel value after cut.
  9254. - \param b = maximum pixel value after cut.
  9255. - \see cut(), normalize(), get_normalize().
  9256. - **/
  9257. - CImg get_cut(const T& a, const T& b) const {
  9258. - return (+*this).cut(a,b);
  9259. - }
  9260. -
  9261. - //! Quantize pixel values into \n levels.
  9262. - /**
  9263. - \param n = number of quantification levels
  9264. - \see get_quantize().
  9265. - **/
  9266. - CImg& quantize(const unsigned int n=256) {
  9267. - if (!is_empty()) {
  9268. - if (!n) throw CImgArgumentException("CImg<%s>::quantize() : Cannot quantize image to 0 values.",
  9269. - pixel_type());
  9270. - const CImgStats st(*this,false);
  9271. - const double range = st.max-st.min;
  9272. - if (range>0) cimg_for(*this,ptr,T) {
  9273. - const unsigned int val = (unsigned int)((*ptr-st.min)*n/range);
  9274. - *ptr = (T)(st.min + cimg::min(val,n-1)*range);
  9275. - }
  9276. - }
  9277. - return *this;
  9278. - }
  9279. -
  9280. - //! Return a quantified image, with \n levels.
  9281. - /**
  9282. - \param n = number of quantification levels
  9283. - \see quantize().
  9284. - **/
  9285. - CImg get_quantize(const unsigned int n=256) const {
  9286. - return (+*this).quantize(n);
  9287. - }
  9288. -
  9289. - //! Threshold the image.
  9290. - /**
  9291. - \param thres = threshold
  9292. - \see get_threshold().
  9293. - **/
  9294. - CImg& threshold(const T& thres) {
  9295. - if (!is_empty()) cimg_for(*this,ptr,T) *ptr = *ptr<=thres?(T)0:(T)1;
  9296. - return *this;
  9297. - }
  9298. -
  9299. - //! Return a thresholded image.
  9300. - /**
  9301. - \param thres = threshold.
  9302. - \see threshold().
  9303. - **/
  9304. - CImg get_threshold(const T& thres) const {
  9305. - return (+*this).threshold(thres);
  9306. - }
  9307. -
  9308. - //! Return a rotated image.
  9309. - /**
  9310. - \param angle = rotation angle (in degrees).
  9311. - \param cond = rotation type. can be :
  9312. - - 0 = zero-value at borders
  9313. - - 1 = repeat image at borders
  9314. - - 2 = zero-value at borders and linear interpolation
  9315. - \note Returned image will probably have a different size than the instance image *this.
  9316. - \see rotate()
  9317. - **/
  9318. - CImg get_rotate(const float angle, const unsigned int cond=3) const {
  9319. - if (is_empty()) return CImg<T>();
  9320. - CImg dest;
  9321. - const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0),
  9322. - ca=(float)std::cos(rad), sa=(float)std::sin(rad);
  9323. - if (cond!=1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles
  9324. - const int wm1 = dimx()-1, hm1 = dimy()-1;
  9325. - const int iangle = (int)nangle/90;
  9326. - switch (iangle) {
  9327. - case 1: {
  9328. - dest.assign(height,width,depth,dim);
  9329. - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(y,hm1-x,z,v);
  9330. - } break;
  9331. - case 2: {
  9332. - dest.assign(width,height,depth,dim);
  9333. - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-x,hm1-y,z,v);
  9334. - } break;
  9335. - case 3: {
  9336. - dest.assign(height,width,depth,dim);
  9337. - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-y,x,z,v);
  9338. - } break;
  9339. - default:
  9340. - return *this;
  9341. - }
  9342. - } else { // generic version
  9343. - const float
  9344. - ux = (float)(cimg::abs(width*ca)), uy = (float)(cimg::abs(width*sa)),
  9345. - vx = (float)(cimg::abs(height*sa)), vy = (float)(cimg::abs(height*ca)),
  9346. - w2 = 0.5f*width, h2 = 0.5f*height,
  9347. - dw2 = 0.5f*(ux+vx), dh2 = 0.5f*(uy+vy);
  9348. - dest.assign((int)(ux+vx), (int)(uy+vy),depth,dim);
  9349. - switch (cond) {
  9350. - case 0: {
  9351. - cimg_forXY(dest,x,y)
  9352. - cimg_forZV(*this,z,v)
  9353. - dest(x,y,z,v) = pix2d((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),(int)(h2 - (x-dw2)*sa + (y-dh2)*ca),z,v,0);
  9354. - } break;
  9355. - case 1: {
  9356. - cimg_forXY(dest,x,y)
  9357. - cimg_forZV(*this,z,v)
  9358. - dest(x,y,z,v) = (*this)(cimg::mod((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),width),
  9359. - cimg::mod((int)(h2 - (x-dw2)*sa + (y-dh2)*ca),height),z,v);
  9360. - } break;
  9361. - case 2: {
  9362. - cimg_forXY(dest,x,y) {
  9363. - const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca;
  9364. - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)linear_pix2d(X,Y,z,v,0);
  9365. - }
  9366. - } break;
  9367. - default: {
  9368. - cimg_forXY(dest,x,y) {
  9369. - const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca;
  9370. - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)cubic_pix2d(X,Y,z,v,0);
  9371. - }
  9372. - } break;
  9373. - }
  9374. - }
  9375. - return dest;
  9376. - }
  9377. -
  9378. - //! Rotate the image
  9379. - /**
  9380. - \param angle = rotation angle (in degrees).
  9381. - \param cond = rotation type. can be :
  9382. - - 0 = zero-value at borders
  9383. - - 1 = repeat image at borders
  9384. - - 2 = zero-value at borders and linear interpolation
  9385. - \see get_rotate()
  9386. - **/
  9387. - CImg& rotate(const float angle,const unsigned int cond=3) { return get_rotate(angle,cond).swap(*this); }
  9388. -
  9389. - //! Return a rotated image around the point (\c cx,\c cy).
  9390. - /**
  9391. - \param angle = rotation angle (in degrees).
  9392. - \param cx = X-coordinate of the rotation center.
  9393. - \param cy = Y-coordinate of the rotation center.
  9394. - \param zoom = zoom.
  9395. - \param cond = rotation type. can be :
  9396. - - 0 = zero-value at borders
  9397. - - 1 = repeat image at borders
  9398. - - 2 = zero-value at borders and linear interpolation
  9399. - \see rotate()
  9400. - **/
  9401. - CImg get_rotate(const float angle,const float cx,const float cy,const float zoom=1,const unsigned int cond=3) const {
  9402. - if (is_empty()) return CImg<T>();
  9403. - CImg dest(width,height,depth,dim);
  9404. - const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0),
  9405. - ca=(float)std::cos(rad)/zoom, sa=(float)std::sin(rad)/zoom;
  9406. - if (cond!=1 && zoom==1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles
  9407. - const int iangle = (int)nangle/90;
  9408. - switch (iangle) {
  9409. - case 1: {
  9410. - dest.fill(0);
  9411. - const unsigned int
  9412. - xmin = cimg::max(0,(dimx()-dimy())/2), xmax = cimg::min(width,xmin+height),
  9413. - ymin = cimg::max(0,(dimy()-dimx())/2), ymax = cimg::min(height,ymin+width),
  9414. - xoff = xmin + cimg::min(0,(dimx()-dimy())/2),
  9415. - yoff = ymin + cimg::min(0,(dimy()-dimx())/2);
  9416. - cimg_forZV(dest,z,v) for (unsigned int y=ymin; y<ymax; y++) for (unsigned int x=xmin; x<xmax; x++)
  9417. - dest(x,y,z,v) = (*this)(y-yoff,height-1-x+xoff,z,v);
  9418. - } break;
  9419. - case 2: {
  9420. - cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(width-1-x,height-1-y,z,v);
  9421. - } break;
  9422. - case 3: {
  9423. - dest.fill(0);
  9424. - const unsigned int
  9425. - xmin = cimg::max(0,(dimx()-dimy())/2), xmax = cimg::min(width,xmin+height),
  9426. - ymin = cimg::max(0,(dimy()-dimx())/2), ymax = cimg::min(height,ymin+width),
  9427. - xoff = xmin + cimg::min(0,(dimx()-dimy())/2),
  9428. - yoff = ymin + cimg::min(0,(dimy()-dimx())/2);
  9429. - cimg_forZV(dest,z,v) for (unsigned int y=ymin; y<ymax; y++) for (unsigned int x=xmin; x<xmax; x++)
  9430. - dest(x,y,z,v) = (*this)(width-1-y+yoff,x-xoff,z,v);
  9431. - } break;
  9432. - default:
  9433. - return *this;
  9434. - }
  9435. - } else
  9436. - switch (cond) { // generic version
  9437. - case 0: {
  9438. - cimg_forXY(dest,x,y)
  9439. - cimg_forZV(*this,z,v)
  9440. - dest(x,y,z,v) = pix2d((int)(cx + (x-cx)*ca + (y-cy)*sa),(int)(cy - (x-cx)*sa + (y-cy)*ca),z,v,0);
  9441. - } break;
  9442. - case 1: {
  9443. - cimg_forXY(dest,x,y)
  9444. - cimg_forZV(*this,z,v)
  9445. - dest(x,y,z,v) = (*this)(cimg::mod((int)(cx + (x-cx)*ca + (y-cy)*sa),width),
  9446. - cimg::mod((int)(cy - (x-cx)*sa + (y-cy)*ca),height),z,v);
  9447. - } break;
  9448. - case 2: {
  9449. - cimg_forXY(dest,x,y) {
  9450. - const float X = cx + (x-cx)*ca + (y-cy)*sa, Y = cy - (x-cx)*sa + (y-cy)*ca;
  9451. - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)linear_pix2d(X,Y,z,v,0);
  9452. - }
  9453. - } break;
  9454. - default: {
  9455. - cimg_forXY(dest,x,y) {
  9456. - const float X = cx + (x-cx)*ca + (y-cy)*sa, Y = cy - (x-cx)*sa + (y-cy)*ca;
  9457. - cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)cubic_pix2d(X,Y,z,v,0);
  9458. - }
  9459. - } break;
  9460. - }
  9461. - return dest;
  9462. - }
  9463. -
  9464. - //! Rotate the image around the point (\c cx,\c cy).
  9465. - /**
  9466. - \param angle = rotation angle (in degrees).
  9467. - \param cx = X-coordinate of the rotation center.
  9468. - \param cy = Y-coordinate of the rotation center.
  9469. - \param zoom = zoom.
  9470. - \param cond = rotation type. can be :
  9471. - - 0 = zero-value at borders
  9472. - - 1 = repeat image at borders
  9473. - - 2 = zero-value at borders and linear interpolation
  9474. - \note Rotation does not change the image size. If you want to get an image with a new size, use get_rotate() instead.
  9475. - \see get_rotate()
  9476. - **/
  9477. - CImg& rotate(const float angle,const float cx,const float cy,const float zoom=1,const unsigned int cond=3) {
  9478. - return get_rotate(angle,cx,cy,zoom,cond).swap(*this);
  9479. - }
  9480. -
  9481. - //! Return a resized image.
  9482. - /**
  9483. - \param pdx = Number of columns (new size along the X-axis).
  9484. - \param pdy = Number of rows (new size along the Y-axis).
  9485. - \param pdz = Number of slices (new size along the Z-axis).
  9486. - \param pdv = Number of vector-channels (new size along the V-axis).
  9487. - \param interp = Resizing type :
  9488. - - 0 = no interpolation : additionnal space is filled with 0.
  9489. - - 1 = bloc interpolation (nearest point).
  9490. - - 2 = mosaic : image is repeated if necessary.
  9491. - - 3 = linear interpolation.
  9492. - - 4 = grid interpolation.
  9493. - - 5 = bi-cubic interpolation.
  9494. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9495. - **/
  9496. - CImg get_resize(const int pdx=-100, const int pdy=-100, const int pdz=-100, const int pdv=-100,
  9497. - const unsigned int interp=1, const int border_condition=-1) const {
  9498. - if (!pdx || !pdy || !pdz || !pdv) return CImg<T>();
  9499. - const unsigned int
  9500. - tdx = pdx<0?-pdx*width/100:pdx,
  9501. - tdy = pdy<0?-pdy*height/100:pdy,
  9502. - tdz = pdz<0?-pdz*depth/100:pdz,
  9503. - tdv = pdv<0?-pdv*dim/100:pdv,
  9504. - dx = tdx?tdx:1,
  9505. - dy = tdy?tdy:1,
  9506. - dz = tdz?tdz:1,
  9507. - dv = tdv?tdv:1;
  9508. - if (is_empty()) return CImg<T>(dx,dy,dz,dv,0);
  9509. - if (width==dx && height==dy && depth==dz && dim==dv) return *this;
  9510. - CImg res;
  9511. -
  9512. - switch (interp) {
  9513. - case 0: // Zero filling
  9514. - res.assign(dx,dy,dz,dv,0).draw_image(*this,0,0,0,0);
  9515. - break;
  9516. -
  9517. - case 1: { // Nearest-neighbor interpolation
  9518. - res.assign(dx,dy,dz,dv);
  9519. - unsigned int
  9520. - *const offx = new unsigned int[dx],
  9521. - *const offy = new unsigned int[dy+1],
  9522. - *const offz = new unsigned int[dz+1],
  9523. - *const offv = new unsigned int[dv+1],
  9524. - *poffx, *poffy, *poffz, *poffv,
  9525. - curr, old;
  9526. - const unsigned int wh = width*height, whd = width*height*depth, rwh = dx*dy, rwhd = dx*dy*dz;
  9527. - poffx = offx; curr=0; { cimg_forX(res,x) { old=curr; curr=(x+1)*width/dx; *(poffx++) = (unsigned int)curr-(unsigned int)old; }}
  9528. - poffy = offy; curr=0; { cimg_forY(res,y) { old=curr; curr=(y+1)*height/dy; *(poffy++) = width*((unsigned int)curr-(unsigned int)old); }} *poffy=0;
  9529. - poffz = offz; curr=0; { cimg_forZ(res,z) { old=curr; curr=(z+1)*depth/dz; *(poffz++) = wh*((unsigned int)curr-(unsigned int)old); }} *poffz=0;
  9530. - poffv = offv; curr=0; { cimg_forV(res,k) { old=curr; curr=(k+1)*dim/dv; *(poffv++) = whd*((unsigned int)curr-(unsigned int)old); }} *poffv=0;
  9531. - T *ptrd = res.ptr();
  9532. - const T* ptrv = ptr();
  9533. - poffv = offv;
  9534. - for (unsigned int k=0; k<dv; ) {
  9535. - const T *ptrz = ptrv;
  9536. - poffz = offz;
  9537. - for (unsigned int z=0; z<dz; ) {
  9538. - const T *ptry = ptrz;
  9539. - poffy = offy;
  9540. - for (unsigned int y=0; y<dy; ) {
  9541. - const T *ptrx = ptry;
  9542. - poffx = offx;
  9543. - cimg_forX(res,x) { *(ptrd++)=*ptrx; ptrx+=*(poffx++); }
  9544. - y++;
  9545. - unsigned int dy=*(poffy++);
  9546. - for (;!dy && y<dy; std::memcpy(ptrd, ptrd-dx, sizeof(T)*dx), y++, ptrd+=dx, dy=*(poffy++));
  9547. - ptry+=dy;
  9548. - }
  9549. - z++;
  9550. - unsigned int dz=*(poffz++);
  9551. - for (;!dz && z<dz; std::memcpy(ptrd, ptrd-rwh, sizeof(T)*rwh), z++, ptrd+=rwh, dz=*(poffz++));
  9552. - ptrz+=dz;
  9553. - }
  9554. - k++;
  9555. - unsigned int dv=*(poffv++);
  9556. - for (;!dv && k<dv; std::memcpy(ptrd, ptrd-rwhd, sizeof(T)*rwhd), k++, ptrd+=rwhd, dv=*(poffv++));
  9557. - ptrv+=dv;
  9558. - }
  9559. - delete[] offx; delete[] offy; delete[] offz; delete[] offv;
  9560. - } break;
  9561. -
  9562. - case 2: { // Mosaic filling
  9563. - res.assign(dx,dy,dz,dv);
  9564. - for (unsigned int k=0; k<dv; k+=dim)
  9565. - for (unsigned int z=0; z<dz; z+=depth)
  9566. - for (unsigned int y=0; y<dy; y+=height)
  9567. - for (unsigned int x=0; x<dx; x+=width) res.draw_image(*this,x,y,z,k);
  9568. - } break;
  9569. -
  9570. - case 3: { // Linear interpolation
  9571. - const unsigned int dimmax = cimg::max(dx,dy,dz,dv);
  9572. - const bool bborder = (interp>1 && border_condition<0);
  9573. - const float
  9574. - sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx,
  9575. - sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy,
  9576. - sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz,
  9577. - sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv;
  9578. - unsigned int *const off = new unsigned int[dimmax], *poff;
  9579. - float *const foff = new float[dimmax], *pfoff, old, curr;
  9580. - CImg resx, resy, resz, resv;
  9581. - T *ptrd;
  9582. -
  9583. - if (dx!=width) {
  9584. - if (width==1) resx = get_resize(dx,height,depth,dim,1,0);
  9585. - else {
  9586. - resx.assign(dx,height,depth,dim);
  9587. - curr = old = 0; poff = off; pfoff = foff;
  9588. - cimg_forX(resx,x) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sx; *(poff++) = (unsigned int)curr-(unsigned int)old; }
  9589. - ptrd = resx.ptr();
  9590. - const T *ptrs0 = ptr();
  9591. - cimg_forYZV(resx,y,z,k) {
  9592. - poff = off; pfoff = foff;
  9593. - const T *ptrs = ptrs0, *const ptrsmax = ptrs0 + (width-1);
  9594. - cimg_forX(resx,x) {
  9595. - const float alpha = *(pfoff++);
  9596. - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+1):(border_condition?val1:0);
  9597. - *(ptrd++) = (T)((1-alpha)*val1 + alpha*val2);
  9598. - ptrs+=*(poff++);
  9599. - }
  9600. - ptrs0+=width;
  9601. - }
  9602. - }
  9603. - } else resx.assign(*this,true);
  9604. -
  9605. - if (dy!=height) {
  9606. - if (height==1) resy = resx.get_resize(dx,dy,depth,dim,1,0);
  9607. - else {
  9608. - resy.assign(dx,dy,depth,dim);
  9609. - curr = old = 0; poff = off; pfoff = foff;
  9610. - cimg_forY(resy,y) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sy; *(poff++) = dx*((unsigned int)curr-(unsigned int)old); }
  9611. - cimg_forXZV(resy,x,z,k) {
  9612. - ptrd = resy.ptr(x,0,z,k);
  9613. - const T *ptrs = resx.ptr(x,0,z,k), *const ptrsmax = ptrs + (height-1)*dx;
  9614. - poff = off; pfoff = foff;
  9615. - cimg_forY(resy,y) {
  9616. - const float alpha = *(pfoff++);
  9617. - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+dx):(border_condition?val1:0);
  9618. - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
  9619. - ptrd+=dx;
  9620. - ptrs+=*(poff++);
  9621. - }
  9622. - }
  9623. - }
  9624. - resx.assign();
  9625. - } else resy.assign(resx,true);
  9626. -
  9627. - if (dz!=depth) {
  9628. - if (depth==1) resz = resy.get_resize(dx,dy,dz,dim,1,0);
  9629. - else {
  9630. - const unsigned int wh = dx*dy;
  9631. - resz.assign(dx,dy,dz,dim);
  9632. - curr = old = 0; poff = off; pfoff = foff;
  9633. - cimg_forZ(resz,z) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sz; *(poff++) = wh*((unsigned int)curr-(unsigned int)old); }
  9634. - cimg_forXYV(resz,x,y,k) {
  9635. - ptrd = resz.ptr(x,y,0,k);
  9636. - const T *ptrs = resy.ptr(x,y,0,k), *const ptrsmax = ptrs + (depth-1)*wh;
  9637. - poff = off; pfoff = foff;
  9638. - cimg_forZ(resz,z) {
  9639. - const float alpha = *(pfoff++);
  9640. - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+wh):(border_condition?val1:0);
  9641. - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
  9642. - ptrd+=wh;
  9643. - ptrs+=*(poff++);
  9644. - }
  9645. - }
  9646. - }
  9647. - resy.assign();
  9648. - } else resz.assign(resy,true);
  9649. -
  9650. - if (dv!=dim) {
  9651. - if (dim==1) resv = resz.get_resize(dx,dy,dz,dv,1,0);
  9652. - else {
  9653. - const unsigned int whd = dx*dy*dz;
  9654. - resv.assign(dx,dy,dz,dv);
  9655. - curr = old = 0; poff = off; pfoff = foff;
  9656. - cimg_forV(resv,k) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sv; *(poff++) = whd*((unsigned int)curr-(unsigned int)old); }
  9657. - cimg_forXYZ(resv,x,y,z) {
  9658. - ptrd = resv.ptr(x,y,z,0);
  9659. - const T *ptrs = resz.ptr(x,y,z,0), *const ptrsmax = ptrs + (dim-1)*whd;
  9660. - poff = off; pfoff = foff;
  9661. - cimg_forV(resv,k) {
  9662. - const float alpha = *(pfoff++);
  9663. - const T val1 = *ptrs, val2 = ptrs<ptrsmax?*(ptrs+whd):(border_condition?val1:0);
  9664. - *ptrd = (T)((1-alpha)*val1 + alpha*val2);
  9665. - ptrd+=whd;
  9666. - ptrs+=*(poff++);
  9667. - }
  9668. - }
  9669. - }
  9670. - resz.assign();
  9671. - } else resv.assign(resz,true);
  9672. -
  9673. - delete[] off; delete[] foff;
  9674. - return resv.is_shared?(resz.is_shared?(resy.is_shared?(resx.is_shared?(+(*this)):resx):resy):resz):resv;
  9675. - } break;
  9676. -
  9677. - case 4: { // Grid filling
  9678. - res.assign(dx,dy,dz,dv,0);
  9679. - cimg_forXYZV(*this,x,y,z,k) res(x*dx/width,y*dy/height,z*dz/depth,k*dv/dim) = (*this)(x,y,z,k);
  9680. - } break;
  9681. -
  9682. - case 5: { // Cubic interpolation
  9683. - const bool bborder = (interp>1 && border_condition<0);
  9684. - const float
  9685. - sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx,
  9686. - sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy,
  9687. - sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz,
  9688. - sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv;
  9689. - res.assign(dx,dy,dz,dv);
  9690. - float cx, cy, cz, ck = 0;
  9691. - cimg_forV(res,k) { cz = 0;
  9692. - cimg_forZ(res,z) { cy = 0;
  9693. - cimg_forY(res,y) { cx = 0;
  9694. - cimg_forX(res,x) { res(x,y,z,k) = (T)(border_condition?cubic_pix2d(cx,cy,(int)cz,(int)ck):cubic_pix2d(cx,cy,(int)cz,(int)ck,0));
  9695. - cx+=sx;
  9696. - } cy+=sy;
  9697. - } cz+=sz;
  9698. - } ck+=sv;
  9699. - }
  9700. - } break;
  9701. -
  9702. - }
  9703. -
  9704. - return res;
  9705. - }
  9706. -
  9707. - //! Return a resized image.
  9708. - /**
  9709. - \param src = Image giving the geometry of the resize.
  9710. - \param interp = Resizing type :
  9711. - - 0 = no interpolation : additionnal space is filled with 0.
  9712. - - 1 = bloc interpolation (nearest point).
  9713. - - 2 = mosaic : image is repeated if necessary.
  9714. - - 3 = linear interpolation.
  9715. - - 4 = grid interpolation.
  9716. - - 5 = bi-cubic interpolation.
  9717. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9718. - **/
  9719. - template<typename t> CImg get_resize(const CImg<t>& src, const unsigned int interp=1, const int border_condition=-1) const {
  9720. - return get_resize(src.width,src.height,src.depth,src.dim,interp,border_condition);
  9721. - }
  9722. -
  9723. - //! Return a resized image.
  9724. - /**
  9725. - \param disp = Display giving the geometry of the resize.
  9726. - \param interp = Resizing type :
  9727. - - 0 = no interpolation : additionnal space is filled with 0.
  9728. - - 1 = bloc interpolation (nearest point).
  9729. - - 2 = mosaic : image is repeated if necessary.
  9730. - - 3 = linear interpolation.
  9731. - - 4 = grid interpolation.
  9732. - - 5 = bi-cubic interpolation.
  9733. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9734. - **/
  9735. - CImg get_resize(const CImgDisplay& disp,const unsigned int interp=1, const int border_condition=-1) const {
  9736. - return get_resize(disp.width,disp.height,depth,dim,interp,border_condition);
  9737. - }
  9738. -
  9739. - //! Resize the image.
  9740. - /**
  9741. - \param pdx = Number of columns (new size along the X-axis).
  9742. - \param pdy = Number of rows (new size along the Y-axis).
  9743. - \param pdz = Number of slices (new size along the Z-axis).
  9744. - \param pdv = Number of vector-channels (new size along the V-axis).
  9745. - \param interp = Resizing type :
  9746. - - 0 = no interpolation : additionnal space is filled with 0.
  9747. - - 1 = bloc interpolation (nearest point).
  9748. - - 2 = mosaic : image is repeated if necessary.
  9749. - - 3 = linear interpolation.
  9750. - - 4 = grid interpolation.
  9751. - - 5 = bi-cubic interpolation.
  9752. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9753. - **/
  9754. - CImg& resize(const int pdx=-100, const int pdy=-100, const int pdz=-100, const int pdv=-100,
  9755. - const unsigned int interp=1, const int border_condition=-1) {
  9756. - if (!pdx || !pdy || !pdz || !pdv) return assign();
  9757. - const unsigned int
  9758. - dx = pdx<0?-pdx*width/100:pdx,
  9759. - dy = pdy<0?-pdy*height/100:pdy,
  9760. - dz = pdz<0?-pdz*depth/100:pdz,
  9761. - dv = pdv<0?-pdv*dim/100:pdv;
  9762. - if (width==dx && height==dy && depth==dz && dim==dv) return *this;
  9763. - return get_resize(dx,dy,dz,dv,interp,border_condition).swap(*this);
  9764. - }
  9765. -
  9766. - //! Resize the image.
  9767. - /**
  9768. - \param src = Image giving the geometry of the resize.
  9769. - \param interp = Resizing type :
  9770. - - 0 = no interpolation : additionnal space is filled with 0.
  9771. - - 1 = bloc interpolation (nearest point).
  9772. - - 2 = mosaic : image is repeated if necessary.
  9773. - - 3 = linear interpolation.
  9774. - - 4 = grid interpolation.
  9775. - - 5 = bi-cubic interpolation.
  9776. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9777. - **/
  9778. - template<typename t> CImg& resize(const CImg<t>& src, const unsigned int interp=1, const int border_condition=-1) {
  9779. - return resize(src.width,src.height,src.depth,src.dim,interp,border_condition);
  9780. - }
  9781. -
  9782. - //! Resize the image
  9783. - /**
  9784. - \param disp = Display giving the geometry of the resize.
  9785. - \param interp = Resizing type :
  9786. - - 0 = no interpolation : additionnal space is filled with 0.
  9787. - - 1 = bloc interpolation (nearest point).
  9788. - - 2 = mosaic : image is repeated if necessary.
  9789. - - 3 = linear interpolation.
  9790. - - 4 = grid interpolation.
  9791. - - 5 = bi-cubic interpolation.
  9792. - \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
  9793. - **/
  9794. - CImg& resize(const CImgDisplay& disp, const unsigned int interp=1, const int border_condition=-1) {
  9795. - return resize(disp.width,disp.height,depth,dim,interp,border_condition);
  9796. - }
  9797. -
  9798. - //! Return an half-resized image, using a special filter.
  9799. - /**
  9800. - \see resize_halfXY(), resize(), get_resize().
  9801. - **/
  9802. - CImg get_resize_halfXY() const {
  9803. - typedef typename cimg::largest<T,float>::type ftype;
  9804. - if (is_empty()) return CImg<T>();
  9805. - CImg<ftype> mask = CImg<ftype>::matrix(0.07842776544f, 0.1231940459f, 0.07842776544f,
  9806. - 0.1231940459f, 0.1935127547f, 0.1231940459f,
  9807. - 0.07842776544f, 0.1231940459f, 0.07842776544f);
  9808. - CImg_3x3(I,ftype);
  9809. - CImg dest(width/2,height/2,depth,dim);
  9810. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I)
  9811. - if (x%2 && y%2) dest(x/2,y/2,z,k) = (T)cimg_conv3x3(I,mask);
  9812. - return dest;
  9813. - }
  9814. -
  9815. - //! Half-resize the image, using a special filter
  9816. - /**
  9817. - \see get_resize_halfXY(), resize(), get_resize().
  9818. - **/
  9819. - CImg& resize_halfXY() {
  9820. - return get_resize_halfXY().swap(*this);
  9821. - }
  9822. -
  9823. - //! Return a square region of the image, as a new image
  9824. - /**
  9825. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9826. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9827. - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
  9828. - \param v0 = V-coordinate of the upper-left crop rectangle corner.
  9829. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9830. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9831. - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
  9832. - \param v1 = V-coordinate of the lower-right crop rectangle corner.
  9833. - \param border_condition = Dirichlet (false) or Neumann border conditions.
  9834. - \see crop()
  9835. - **/
  9836. - CImg get_crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,const unsigned int v0,
  9837. - const unsigned int x1,const unsigned int y1,const unsigned int z1,const unsigned int v1,
  9838. - const bool border_condition = false) const {
  9839. - if (is_empty())
  9840. - throw CImgInstanceException("CImg<%s>::get_crop() : Instance image (%u,%u,%u,%u,%p) is empty.",
  9841. - pixel_type(),width,height,depth,dim,data);
  9842. - const unsigned int dx=x1-x0+1, dy=y1-y0+1, dz=z1-z0+1, dv=v1-v0+1;
  9843. - CImg dest(dx,dy,dz,dv);
  9844. - if (x0>=width || x1>=width || y0>=height || y1>=height || z0>=depth || z1>=depth ||
  9845. - v0>=dim || v1>=dim || x1<x0 || y1<y0 || z1<z0 || v1<v0)
  9846. - switch (border_condition) {
  9847. - case false: { cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v,0); } break;
  9848. - default: { cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v); } break;
  9849. - } else {
  9850. - const T *psrc = ptr(x0,y0,z0,v0);
  9851. - T *pdest = dest.ptr(0,0,0,0);
  9852. - if (dx!=width)
  9853. - for (unsigned int k=0; k<dv; k++) {
  9854. - for (unsigned int z=0; z<dz; z++) {
  9855. - for (unsigned int y=0; y<dy; y++) {
  9856. - std::memcpy(pdest,psrc,dx*sizeof(T));
  9857. - pdest+=dx;
  9858. - psrc+=width;
  9859. - }
  9860. - psrc+=width*(height-dy);
  9861. - }
  9862. - psrc+=width*height*(depth-dz);
  9863. - }
  9864. - else {
  9865. - if (dy!=height)
  9866. - for (unsigned int k=0; k<dv; k++) {
  9867. - for (unsigned int z=0; z<dz; z++) {
  9868. - std::memcpy(pdest,psrc,dx*dy*sizeof(T));
  9869. - pdest+=dx*dy;
  9870. - psrc+=width*height;
  9871. - }
  9872. - psrc+=width*height*(depth-dz);
  9873. - }
  9874. - else {
  9875. - if (dz!=depth)
  9876. - for (unsigned int k=0; k<dv; k++) {
  9877. - std::memcpy(pdest,psrc,dx*dy*dz*sizeof(T));
  9878. - pdest+=dx*dy*dz;
  9879. - psrc+=width*height*depth;
  9880. - }
  9881. - else std::memcpy(pdest,psrc,dx*dy*dz*dv*sizeof(T));
  9882. - }
  9883. - }
  9884. - }
  9885. - return dest;
  9886. - }
  9887. -
  9888. - //! Return a square region of the image, as a new image
  9889. - /**
  9890. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9891. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9892. - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
  9893. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9894. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9895. - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
  9896. - \param border_condition = determine the type of border condition if
  9897. - some of the desired region is outside the image.
  9898. - \see crop()
  9899. - **/
  9900. - CImg get_crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,
  9901. - const unsigned int x1,const unsigned int y1,const unsigned int z1,
  9902. - const bool border_condition=false) const {
  9903. - return get_crop(x0,y0,z0,0,x1,y1,z1,dim-1,border_condition);
  9904. - }
  9905. -
  9906. - //! Return a square region of the image, as a new image
  9907. - /**
  9908. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9909. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9910. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9911. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9912. - \param border_condition = determine the type of border condition if
  9913. - some of the desired region is outside the image.
  9914. - \see crop()
  9915. - **/
  9916. - CImg get_crop(const unsigned int x0,const unsigned int y0,
  9917. - const unsigned int x1,const unsigned int y1,
  9918. - const bool border_condition=false) const {
  9919. - return get_crop(x0,y0,0,0,x1,y1,depth-1,dim-1,border_condition);
  9920. - }
  9921. -
  9922. - //! Return a square region of the image, as a new image
  9923. - /**
  9924. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9925. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9926. - \param border_condition = determine the type of border condition if
  9927. - some of the desired region is outside the image.
  9928. - \see crop()
  9929. - **/
  9930. - CImg get_crop(const unsigned int x0,const unsigned int x1,const bool border_condition=false) const {
  9931. - return get_crop(x0,0,0,0,x1,height-1,depth-1,dim-1,border_condition);
  9932. - }
  9933. -
  9934. - //! Replace the image by a square region of the image
  9935. - /**
  9936. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9937. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9938. - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
  9939. - \param v0 = V-coordinate of the upper-left crop rectangle corner.
  9940. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9941. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9942. - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
  9943. - \param v1 = V-coordinate of the lower-right crop rectangle corner.
  9944. - \param border_condition = determine the type of border condition if
  9945. - some of the desired region is outside the image.
  9946. - \see get_crop()
  9947. - **/
  9948. - CImg& crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,const unsigned int v0,
  9949. - const unsigned int x1,const unsigned int y1,const unsigned int z1,const unsigned int v1,
  9950. - const bool border_condition=false) {
  9951. - return get_crop(x0,y0,z0,v0,x1,y1,z1,v1,border_condition).swap(*this);
  9952. - }
  9953. -
  9954. - //! Replace the image by a square region of the image
  9955. - /**
  9956. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9957. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9958. - \param z0 = Z-coordinate of the upper-left crop rectangle corner.
  9959. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9960. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9961. - \param z1 = Z-coordinate of the lower-right crop rectangle corner.
  9962. - \param border_condition = determine the type of border condition if
  9963. - some of the desired region is outside the image.
  9964. - \see get_crop()
  9965. - **/
  9966. - CImg& crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,
  9967. - const unsigned int x1,const unsigned int y1,const unsigned int z1,
  9968. - const bool border_condition=false) {
  9969. - return crop(x0,y0,z0,0,x1,y1,z1,dim-1,border_condition);
  9970. - }
  9971. -
  9972. - //! Replace the image by a square region of the image
  9973. - /**
  9974. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9975. - \param y0 = Y-coordinate of the upper-left crop rectangle corner.
  9976. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9977. - \param y1 = Y-coordinate of the lower-right crop rectangle corner.
  9978. - \param border_condition = determine the type of border condition if
  9979. - some of the desired region is outside the image.
  9980. - \see get_crop()
  9981. - **/
  9982. - CImg& crop(const unsigned int x0,const unsigned int y0,
  9983. - const unsigned int x1,const unsigned int y1,
  9984. - const bool border_condition=false) {
  9985. - return crop(x0,y0,0,0,x1,y1,depth-1,dim-1,border_condition);
  9986. - }
  9987. -
  9988. - //! Replace the image by a square region of the image
  9989. - /**
  9990. - \param x0 = X-coordinate of the upper-left crop rectangle corner.
  9991. - \param x1 = X-coordinate of the lower-right crop rectangle corner.
  9992. - \param border_condition = determine the type of border condition if
  9993. - some of the desired region is outside the image.
  9994. - \see get_crop()
  9995. - **/
  9996. - CImg& crop(const unsigned int x0,const unsigned int x1,const bool border_condition=false) {
  9997. - return crop(x0,0,0,0,x1,height-1,depth-1,dim-1,border_condition);
  9998. - }
  9999. -
  10000. - //! Return a set of columns
  10001. - CImg get_columns(const unsigned int x0, const unsigned int x1) const {
  10002. - return get_crop(x0,0,0,0,x1,height-1,depth-1,dim-1);
  10003. - }
  10004. -
  10005. - //! Replace the instance image by a set of its columns
  10006. - CImg& columns(const unsigned int x0, const unsigned int x1) {
  10007. - return get_columns(x0,x1).swap(*this);
  10008. - }
  10009. -
  10010. - //! Return one column
  10011. - CImg get_column(const unsigned int x0) const {
  10012. - return get_columns(x0,x0);
  10013. - }
  10014. -
  10015. - //! Replace the instance image by one of its column
  10016. - CImg& column(const unsigned int x0) {
  10017. - return columns(x0,x0);
  10018. - }
  10019. -
  10020. - //! Get a copy of a set of lines of the instance image.
  10021. - CImg get_lines(const unsigned int y0, const unsigned int y1) const {
  10022. - return get_crop(0,y0,0,0,width-1,y1,depth-1,dim-1);
  10023. - }
  10024. -
  10025. - //! Replace the instance image by a set of lines of the instance image.
  10026. - CImg& lines(const unsigned int y0, const unsigned int y1) {
  10027. - return get_lines(y0,y1).swap(*this);
  10028. - }
  10029. -
  10030. - //! Get a copy of a line of the instance image.
  10031. - CImg get_line(const unsigned int y0) const {
  10032. - return get_lines(y0,y0);
  10033. - }
  10034. -
  10035. - //! Replace the instance image by one of its line.
  10036. - CImg& line(const unsigned int y0) {
  10037. - return lines(y0,y0);
  10038. - }
  10039. -
  10040. - //! Get a set of slices
  10041. - CImg get_slices(const unsigned int z0, const unsigned int z1) const {
  10042. - return get_crop(0,0,z0,0,width-1,height-1,z1,dim-1);
  10043. - }
  10044. -
  10045. - // Replace the image by a set of its z-slices
  10046. - CImg& slices(const unsigned int z0, const unsigned int z1) {
  10047. - return get_slices(z0,z1).swap(*this);
  10048. - }
  10049. -
  10050. - //! Get the z-slice \a z of *this, as a new image.
  10051. - CImg get_slice(const unsigned int z0) const {
  10052. - return get_slices(z0,z0);
  10053. - }
  10054. -
  10055. - //! Replace the image by one of its slice.
  10056. - CImg& slice(const unsigned int z0) {
  10057. - return slices(z0,z0);
  10058. - }
  10059. -
  10060. - //! Return a copy of a set of channels of the instance image.
  10061. - CImg get_channels(const unsigned int v0, const unsigned int v1) const {
  10062. - return get_crop(0,0,0,v0,width-1,height-1,depth-1,v1);
  10063. - }
  10064. -
  10065. - //! Replace the instance image by a set of channels of the instance image.
  10066. - CImg& channels(const unsigned int v0, const unsigned int v1) {
  10067. - return get_channels(v0,v1).swap(*this);
  10068. - }
  10069. -
  10070. - //! Return a copy of a channel of the instance image.
  10071. - CImg get_channel(const unsigned int v0) const {
  10072. - return get_channels(v0,v0);
  10073. - }
  10074. -
  10075. - //! Replace the instance image by one of its channel.
  10076. - CImg& channel(const unsigned int v0) {
  10077. - return channels(v0,v0);
  10078. - }
  10079. -
  10080. - //! Get a shared-memory image referencing a set of points of the instance image.
  10081. - CImg get_shared_points(const unsigned int x0, const unsigned int x1,
  10082. - const unsigned int y0=0, const unsigned int z0=0, const unsigned int v0=0) {
  10083. - const unsigned long beg = offset(x0,y0,z0,v0), end = offset(x1,y0,z0,v0);
  10084. - if (beg>end || beg>=size() || end>=size())
  10085. - throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from "
  10086. - "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim);
  10087. - return CImg<T>(data+beg,x1-x0+1,1,1,1,true);
  10088. - }
  10089. -
  10090. - //! Get a shared-memory image referencing a set of points of the instance image (const version).
  10091. - const CImg get_shared_points(const unsigned int x0, const unsigned int x1,
  10092. - const unsigned int y0=0, const unsigned int z0=0, const unsigned int v0=0) const {
  10093. - const unsigned long beg = offset(x0,y0,z0,v0), end = offset(x1,y0,z0,v0);
  10094. - if (beg>end || beg>=size() || end>=size())
  10095. - throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from "
  10096. - "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim);
  10097. - return CImg<T>(data+beg,x1-x0+1,1,1,1,true);
  10098. - }
  10099. -
  10100. - //! Return a shared-memory image referencing a set of lines of the instance image.
  10101. - CImg get_shared_lines(const unsigned int y0, const unsigned int y1,
  10102. - const unsigned int z0=0, const unsigned int v0=0) {
  10103. - const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0);
  10104. - if (beg>end || beg>=size() || end>=size())
  10105. - throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from "
  10106. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim);
  10107. - return CImg<T>(data+beg,width,y1-y0+1,1,1,true);
  10108. - }
  10109. -
  10110. - //! Return a shared-memory image referencing a set of lines of the instance image (const version).
  10111. - const CImg get_shared_lines(const unsigned int y0, const unsigned int y1,
  10112. - const unsigned int z0=0, const unsigned int v0=0) const {
  10113. - const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0);
  10114. - if (beg>end || beg>=size() || end>=size())
  10115. - throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from "
  10116. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim);
  10117. - return CImg<T>(data+beg,width,y1-y0+1,1,1,true);
  10118. - }
  10119. -
  10120. - //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image.
  10121. - CImg get_shared_line(const unsigned int y0, const unsigned int z0=0, const unsigned int v0=0) {
  10122. - return get_shared_lines(y0,y0,z0,v0);
  10123. - }
  10124. -
  10125. - //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image (const version).
  10126. - const CImg get_shared_line(const unsigned int y0,const unsigned int z0=0,const unsigned int v0=0) const {
  10127. - return get_shared_lines(y0,y0,z0,v0);
  10128. - }
  10129. -
  10130. - //! Return a shared memory image referencing a set of planes (z0->z1,v0) of the instance image.
  10131. - CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) {
  10132. - const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0);
  10133. - if (beg>end || beg>=size() || end>=size())
  10134. - throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from "
  10135. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim);
  10136. - return CImg<T>(data+beg,width,height,z1-z0+1,1,true);
  10137. - }
  10138. -
  10139. - //! Return a shared-memory image referencing a set of planes (z0->z1,v0) of the instance image (const version).
  10140. - const CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) const {
  10141. - const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0);
  10142. - if (beg>end || beg>=size() || end>=size())
  10143. - throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from "
  10144. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim);
  10145. - return CImg<T>(data+beg,width,height,z1-z0+1,1,true);
  10146. - }
  10147. -
  10148. - //! Return a shared-memory image referencing one plane (z0,v0) of the instance image.
  10149. - CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) {
  10150. - return get_shared_planes(z0,z0,v0);
  10151. - }
  10152. -
  10153. - //! Return a shared-memory image referencing one plane (z0,v0) of the instance image (const version).
  10154. - const CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) const {
  10155. - return get_shared_planes(z0,z0,v0);
  10156. - }
  10157. -
  10158. - //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image.
  10159. - CImg get_shared_channels(const unsigned int v0, const unsigned int v1) {
  10160. - const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1);
  10161. - if (beg>end || beg>=size() || end>=size())
  10162. - throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from "
  10163. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim);
  10164. - return CImg<T>(data+beg,width,height,depth,v1-v0+1,true);
  10165. - }
  10166. -
  10167. - //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image (const version).
  10168. - const CImg get_shared_channels(const unsigned int v0, const unsigned int v1) const {
  10169. - const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1);
  10170. - if (beg>end || beg>=size() || end>=size())
  10171. - throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from "
  10172. - "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim);
  10173. - return CImg<T>(data+beg,width,height,depth,v1-v0+1,true);
  10174. - }
  10175. -
  10176. - //! Return a shared-memory image referencing one channel v0 of the instance image.
  10177. - CImg get_shared_channel(const unsigned int v0) {
  10178. - return get_shared_channels(v0,v0);
  10179. - }
  10180. -
  10181. - //! Return a shared-memory image referencing one channel v0 of the instance image (const version).
  10182. - const CImg get_shared_channel(const unsigned int v0) const {
  10183. - return get_shared_channels(v0,v0);
  10184. - }
  10185. -
  10186. - //! Return a shared version of the instance image.
  10187. - CImg get_shared() {
  10188. - return CImg<T>(data,width,height,depth,dim,true);
  10189. - }
  10190. -
  10191. - //! Return a shared version of the instance image (const version).
  10192. - const CImg get_shared() const {
  10193. - return CImg<T>(data,width,height,depth,dim,true);
  10194. - }
  10195. -
  10196. - //! Mirror an image along the specified axis.
  10197. - /**
  10198. - This is the in-place version of get_mirror().
  10199. - \sa get_mirror().
  10200. - **/
  10201. - CImg& mirror(const char axe='x') {
  10202. - if (!is_empty()) {
  10203. - T *pf,*pb,*buf=0;
  10204. - switch (cimg::uncase(axe)) {
  10205. - case 'x': {
  10206. - pf = ptr(); pb = ptr(width-1);
  10207. - for (unsigned int yzv=0; yzv<height*depth*dim; yzv++) {
  10208. - for (unsigned int x=0; x<width/2; x++) { const T val = *pf; *(pf++)=*pb; *(pb--)=val; }
  10209. - pf+=width-width/2;
  10210. - pb+=width+width/2;
  10211. - }
  10212. - } break;
  10213. - case 'y': {
  10214. - buf = new T[width];
  10215. - pf = ptr(); pb = ptr(0,height-1);
  10216. - for (unsigned int zv=0; zv<depth*dim; zv++) {
  10217. - for (unsigned int y=0; y<height/2; y++) {
  10218. - std::memcpy(buf,pf,width*sizeof(T));
  10219. - std::memcpy(pf,pb,width*sizeof(T));
  10220. - std::memcpy(pb,buf,width*sizeof(T));
  10221. - pf+=width;
  10222. - pb-=width;
  10223. - }
  10224. - pf+=width*(height-height/2);
  10225. - pb+=width*(height+height/2);
  10226. - }
  10227. - } break;
  10228. - case 'z': {
  10229. - buf = new T[width*height];
  10230. - pf = ptr(); pb = ptr(0,0,depth-1);
  10231. - cimg_forV(*this,v) {
  10232. - for (unsigned int z=0; z<depth/2; z++) {
  10233. - std::memcpy(buf,pf,width*height*sizeof(T));
  10234. - std::memcpy(pf,pb,width*height*sizeof(T));
  10235. - std::memcpy(pb,buf,width*height*sizeof(T));
  10236. - pf+=width*height;
  10237. - pb-=width*height;
  10238. - }
  10239. - pf+=width*height*(depth-depth/2);
  10240. - pb+=width*height*(depth+depth/2);
  10241. - }
  10242. - } break;
  10243. - case 'v': {
  10244. - buf = new T[width*height*depth];
  10245. - pf = ptr(); pb = ptr(0,0,0,dim-1);
  10246. - for (unsigned int v=0; v<dim/2; v++) {
  10247. - std::memcpy(buf,pf,width*height*depth*sizeof(T));
  10248. - std::memcpy(pf,pb,width*height*depth*sizeof(T));
  10249. - std::memcpy(pb,buf,width*height*depth*sizeof(T));
  10250. - pf+=width*height*depth;
  10251. - pb-=width*height*depth;
  10252. - }
  10253. - } break;
  10254. - default:
  10255. - throw CImgArgumentException("CImg<%s>::mirror() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
  10256. - }
  10257. - if (buf) delete[] buf;
  10258. - }
  10259. - return *this;
  10260. - }
  10261. -
  10262. - //! Get a mirrored version of the image, along the specified axis.
  10263. - /**
  10264. - \param axe Axe used to mirror the image. Can be \c 'x', \c 'y', \c 'z' or \c 'v'.
  10265. - \sa mirror().
  10266. - **/
  10267. - CImg get_mirror(const char axe='x') {
  10268. - return (+*this).mirror(axe);
  10269. - }
  10270. -
  10271. - //! Translate the image
  10272. - /**
  10273. - This is the in-place version of get_translate().
  10274. - \sa get_translate().
  10275. - **/
  10276. - CImg& translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0,const int border_condition=0) {
  10277. - if (!is_empty()) {
  10278. -
  10279. - if (deltax) // Translate along X-axis
  10280. - switch (border_condition) {
  10281. - case 0:
  10282. - if (cimg::abs(deltax)>=(int)width) return fill(0);
  10283. - if (deltax>0) cimg_forYZV(*this,y,z,k) {
  10284. - std::memmove(ptr(0,y,z,k),ptr(deltax,y,z,k),(width-deltax)*sizeof(T));
  10285. - std::memset(ptr(width-deltax,y,z,k),0,deltax*sizeof(T));
  10286. - } else cimg_forYZV(*this,y,z,k) {
  10287. - std::memmove(ptr(-deltax,y,z,k),ptr(0,y,z,k),(width+deltax)*sizeof(T));
  10288. - std::memset(ptr(0,y,z,k),0,-deltax*sizeof(T));
  10289. - }
  10290. - break;
  10291. - case 1:
  10292. - if (deltax>0) {
  10293. - const int ndeltax = (deltax>=(int)width)?width-1:deltax;
  10294. - if (!ndeltax) return *this;
  10295. - cimg_forYZV(*this,y,z,k) {
  10296. - std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T));
  10297. - T *ptrd = ptr(width-1,y,z,k);
  10298. - const T &val = *ptrd;
  10299. - for (int l=0; l<ndeltax-1; l++) *(--ptrd) = val;
  10300. - }
  10301. - } else {
  10302. - const int ndeltax = (-deltax>=(int)width)?width-1:-deltax;
  10303. - if (!ndeltax) return *this;
  10304. - cimg_forYZV(*this,y,z,k) {
  10305. - std::memmove(ptr(ndeltax,y,z,k),ptr(0,y,z,k),(width-ndeltax)*sizeof(T));
  10306. - T *ptrd = ptr(0,y,z,k);
  10307. - const T &val = *ptrd;
  10308. - for (int l=0; l<ndeltax-1; l++) *(++ptrd) = val;
  10309. - }
  10310. - }
  10311. - break;
  10312. - case 2: {
  10313. - const int ml = cimg::mod(deltax,width), ndeltax = (ml<=(int)width/2)?ml:(ml-(int)width);
  10314. - if (!ndeltax) return *this;
  10315. - T* buf = new T[cimg::abs(ndeltax)];
  10316. - if (ndeltax>0) cimg_forYZV(*this,y,z,k) {
  10317. - std::memcpy(buf,ptr(0,y,z,k),ndeltax*sizeof(T));
  10318. - std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T));
  10319. - std::memcpy(ptr(width-ndeltax,y,z,k),buf,ndeltax*sizeof(T));
  10320. - } else cimg_forYZV(*this,y,z,k) {
  10321. - std::memcpy(buf,ptr(width+ndeltax,y,z,k),-ndeltax*sizeof(T));
  10322. - std::memmove(ptr(-ndeltax,y,z,k),ptr(0,y,z,k),(width+ndeltax)*sizeof(T));
  10323. - std::memcpy(ptr(0,y,z,k),buf,-ndeltax*sizeof(T));
  10324. - }
  10325. - delete[] buf;
  10326. - } break;
  10327. - }
  10328. -
  10329. - if (deltay) // Translate along Y-axis
  10330. - switch (border_condition) {
  10331. - case 0:
  10332. - if (cimg::abs(deltay)>=(int)height) return fill(0);
  10333. - if (deltay>0) cimg_forZV(*this,z,k) {
  10334. - std::memmove(ptr(0,0,z,k),ptr(0,deltay,z,k),width*(height-deltay)*sizeof(T));
  10335. - std::memset(ptr(0,height-deltay,z,k),0,width*deltay*sizeof(T));
  10336. - } else cimg_forZV(*this,z,k) {
  10337. - std::memmove(ptr(0,-deltay,z,k),ptr(0,0,z,k),width*(height+deltay)*sizeof(T));
  10338. - std::memset(ptr(0,0,z,k),0,-deltay*width*sizeof(T));
  10339. - }
  10340. - break;
  10341. - case 1:
  10342. - if (deltay>0) {
  10343. - const int ndeltay = (deltay>=(int)height)?height-1:deltay;
  10344. - if (!ndeltay) return *this;
  10345. - cimg_forZV(*this,z,k) {
  10346. - std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T));
  10347. - T *ptrd = ptr(0,height-ndeltay,z,k), *ptrs = ptr(0,height-1,z,k);
  10348. - for (int l=0; l<ndeltay-1; l++) { std::memcpy(ptrd,ptrs,width*sizeof(T)); ptrd+=width; }
  10349. - }
  10350. - } else {
  10351. - const int ndeltay = (-deltay>=(int)height)?height-1:-deltay;
  10352. - if (!ndeltay) return *this;
  10353. - cimg_forZV(*this,z,k) {
  10354. - std::memmove(ptr(0,ndeltay,z,k),ptr(0,0,z,k),width*(height-ndeltay)*sizeof(T));
  10355. - T *ptrd = ptr(0,1,z,k), *ptrs = ptr(0,0,z,k);
  10356. - for (int l=0; l<ndeltay-1; l++) { std::memcpy(ptrd,ptrs,width*sizeof(T)); ptrd+=width; }
  10357. - }
  10358. - }
  10359. - break;
  10360. - case 2: {
  10361. - const int ml = cimg::mod(deltay,height), ndeltay = (ml<=(int)height/2)?ml:(ml-(int)height);
  10362. - if (!ndeltay) return *this;
  10363. - T* buf = new T[width*cimg::abs(ndeltay)];
  10364. - if (ndeltay>0) cimg_forZV(*this,z,k) {
  10365. - std::memcpy(buf,ptr(0,0,z,k),width*ndeltay*sizeof(T));
  10366. - std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T));
  10367. - std::memcpy(ptr(0,height-ndeltay,z,k),buf,width*ndeltay*sizeof(T));
  10368. - } else cimg_forZV(*this,z,k) {
  10369. - std::memcpy(buf,ptr(0,height+ndeltay,z,k),-ndeltay*width*sizeof(T));
  10370. - std::memmove(ptr(0,-ndeltay,z,k),ptr(0,0,z,k),width*(height+ndeltay)*sizeof(T));
  10371. - std::memcpy(ptr(0,0,z,k),buf,-ndeltay*width*sizeof(T));
  10372. - }
  10373. - delete[] buf;
  10374. - } break;
  10375. - }
  10376. -
  10377. - if (deltaz) // Translate along Z-axis
  10378. - switch (border_condition) {
  10379. - case 0:
  10380. - if (cimg::abs(deltaz)>=(int)depth) return fill(0);
  10381. - if (deltaz>0) cimg_forV(*this,k) {
  10382. - std::memmove(ptr(0,0,0,k),ptr(0,0,deltaz,k),width*height*(depth-deltaz)*sizeof(T));
  10383. - std::memset(ptr(0,0,depth-deltaz,k),0,width*height*deltaz*sizeof(T));
  10384. - } else cimg_forV(*this,k) {
  10385. - std::memmove(ptr(0,0,-deltaz,k),ptr(0,0,0,k),width*height*(depth+deltaz)*sizeof(T));
  10386. - std::memset(ptr(0,0,0,k),0,-deltaz*width*height*sizeof(T));
  10387. - }
  10388. - break;
  10389. - case 1:
  10390. - if (deltaz>0) {
  10391. - const int ndeltaz = (deltaz>=(int)depth)?depth-1:deltaz;
  10392. - if (!ndeltaz) return *this;
  10393. - cimg_forV(*this,k) {
  10394. - std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T));
  10395. - T *ptrd = ptr(0,0,depth-ndeltaz,k), *ptrs = ptr(0,0,depth-1,k);
  10396. - for (int l=0; l<ndeltaz-1; l++) { std::memcpy(ptrd,ptrs,width*height*sizeof(T)); ptrd+=width*height; }
  10397. - }
  10398. - } else {
  10399. - const int ndeltaz = (-deltaz>=(int)depth)?depth-1:-deltaz;
  10400. - if (!ndeltaz) return *this;
  10401. - cimg_forV(*this,k) {
  10402. - std::memmove(ptr(0,0,ndeltaz,k),ptr(0,0,0,k),width*height*(depth-ndeltaz)*sizeof(T));
  10403. - T *ptrd = ptr(0,0,1,k), *ptrs = ptr(0,0,0,k);
  10404. - for (int l=0; l<ndeltaz-1; l++) { std::memcpy(ptrd,ptrs,width*height*sizeof(T)); ptrd+=width*height; }
  10405. - }
  10406. - }
  10407. - break;
  10408. - case 2: {
  10409. - const int ml = cimg::mod(deltaz,depth), ndeltaz = (ml<=(int)depth/2)?ml:(ml-(int)depth);
  10410. - if (!ndeltaz) return *this;
  10411. - T* buf = new T[width*height*cimg::abs(ndeltaz)];
  10412. - if (ndeltaz>0) cimg_forV(*this,k) {
  10413. - std::memcpy(buf,ptr(0,0,0,k),width*height*ndeltaz*sizeof(T));
  10414. - std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T));
  10415. - std::memcpy(ptr(0,0,depth-ndeltaz,k),buf,width*height*ndeltaz*sizeof(T));
  10416. - } else cimg_forV(*this,k) {
  10417. - std::memcpy(buf,ptr(0,0,depth+ndeltaz,k),-ndeltaz*width*height*sizeof(T));
  10418. - std::memmove(ptr(0,0,-ndeltaz,k),ptr(0,0,0,k),width*height*(depth+ndeltaz)*sizeof(T));
  10419. - std::memcpy(ptr(0,0,0,k),buf,-ndeltaz*width*height*sizeof(T));
  10420. - }
  10421. - delete[] buf;
  10422. - } break;
  10423. - }
  10424. -
  10425. - if (deltav) // Translate along V-axis
  10426. - switch (border_condition) {
  10427. - case 0:
  10428. - if (cimg::abs(deltav)>=(int)dim) return fill(0);
  10429. - if (deltav>0) {
  10430. - std::memmove(data,ptr(0,0,0,deltav),width*height*depth*(dim-deltav)*sizeof(T));
  10431. - std::memset(ptr(0,0,0,dim-deltav),0,width*height*depth*deltav*sizeof(T));
  10432. - } else cimg_forV(*this,k) {
  10433. - std::memmove(ptr(0,0,0,-deltav),data,width*height*depth*(dim+deltav)*sizeof(T));
  10434. - std::memset(data,0,-deltav*width*height*depth*sizeof(T));
  10435. - }
  10436. - break;
  10437. - case 1:
  10438. - if (deltav>0) {
  10439. - const int ndeltav = (deltav>=(int)dim)?dim-1:deltav;
  10440. - if (!ndeltav) return *this;
  10441. - std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T));
  10442. - T *ptrd = ptr(0,0,0,dim-ndeltav), *ptrs = ptr(0,0,0,dim-1);
  10443. - for (int l=0; l<ndeltav-1; l++) { std::memcpy(ptrd,ptrs,width*height*depth*sizeof(T)); ptrd+=width*height*depth; }
  10444. - } else {
  10445. - const int ndeltav = (-deltav>=(int)dim)?dim-1:-deltav;
  10446. - if (!ndeltav) return *this;
  10447. - std::memmove(ptr(0,0,0,ndeltav),data,width*height*depth*(dim-ndeltav)*sizeof(T));
  10448. - T *ptrd = ptr(0,0,0,1);
  10449. - for (int l=0; l<ndeltav-1; l++) { std::memcpy(ptrd,data,width*height*depth*sizeof(T)); ptrd+=width*height*depth; }
  10450. - }
  10451. - break;
  10452. - case 2: {
  10453. - const int ml = cimg::mod(deltav,dim), ndeltav = (ml<=(int)dim/2)?ml:(ml-(int)dim);
  10454. - if (!ndeltav) return *this;
  10455. - T* buf = new T[width*height*depth*cimg::abs(ndeltav)];
  10456. - if (ndeltav>0) {
  10457. - std::memcpy(buf,data,width*height*depth*ndeltav*sizeof(T));
  10458. - std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T));
  10459. - std::memcpy(ptr(0,0,0,dim-ndeltav),buf,width*height*depth*ndeltav*sizeof(T));
  10460. - } else {
  10461. - std::memcpy(buf,ptr(0,0,0,dim+ndeltav),-ndeltav*width*height*depth*sizeof(T));
  10462. - std::memmove(ptr(0,0,0,-ndeltav),data,width*height*depth*(dim+ndeltav)*sizeof(T));
  10463. - std::memcpy(data,buf,-ndeltav*width*height*depth*sizeof(T));
  10464. - }
  10465. - delete[] buf;
  10466. - } break;
  10467. - }
  10468. - }
  10469. - return *this;
  10470. - }
  10471. -
  10472. - //! Return a translated image.
  10473. - /**
  10474. - \param deltax Amount of displacement along the X-axis.
  10475. - \param deltay Amount of displacement along the Y-axis.
  10476. - \param deltaz Amount of displacement along the Z-axis.
  10477. - \param deltav Amount of displacement along the V-axis.
  10478. - \param border_condition Border condition.
  10479. -
  10480. - - \c border_condition can be :
  10481. - - 0 : Zero border condition (Dirichlet).
  10482. - - 1 : Nearest neighbors (Neumann).
  10483. - - 2 : Repeat Pattern (Fourier style).
  10484. - **/
  10485. - CImg get_translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0,
  10486. - const int border_condition=0) const {
  10487. - return (+*this).translate(deltax,deltay,deltaz,deltav,border_condition);
  10488. - }
  10489. -
  10490. - //! Return a 2D representation of a 3D image, with three slices.
  10491. - CImg get_projections2d(const unsigned int px0,const unsigned int py0,const unsigned int pz0) const {
  10492. - if (is_empty()) return CImg<T>();
  10493. - const unsigned int
  10494. - x0=(px0>=width)?width-1:px0,
  10495. - y0=(py0>=height)?height-1:py0,
  10496. - z0=(pz0>=depth)?depth-1:pz0;
  10497. - CImg res(width+depth,height+depth,1,dim);
  10498. - res.fill((*this)[0]);
  10499. - { cimg_forXYV(*this,x,y,k) res(x,y,0,k) = (*this)(x,y,z0,k); }
  10500. - { cimg_forYZV(*this,y,z,k) res(width+z,y,0,k) = (*this)(x0,y,z,k); }
  10501. - { cimg_forXZV(*this,x,z,k) res(x,height+z,0,k) = (*this)(x,y0,z,k); }
  10502. - return res;
  10503. - }
  10504. -
  10505. - //! Return the image histogram.
  10506. - /**
  10507. - The histogram H of an image I is a 1D-function where H(x) is the number of
  10508. - occurences of the value x in I.
  10509. - \param nblevels = Number of different levels of the computed histogram.
  10510. - For classical images, this value is 256 (default value). You should specify more levels
  10511. - if you are working with CImg<float> or images with high range of pixel values.
  10512. - \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min
  10513. - won't be counted.
  10514. - \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max
  10515. - won't be counted.
  10516. - \note If val_min==val_max==0 (default values), the function first estimates the minimum and maximum
  10517. - pixel values of the current image, then uses these values for the histogram computation.
  10518. - \result The histogram is returned as a 1D CImg<float> image H, having a size of (nblevels,1,1,1) such that
  10519. - H(0) and H(nblevels-1) are respectively equal to the number of occurences of the values val_min and val_max in I.
  10520. - \note Histogram computation always returns a 1D function. Histogram of multi-valued (such as color) images
  10521. - are not multi-dimensional.
  10522. - \see get_equalize_histogram(), equalize_histogram()
  10523. - **/
  10524. - CImg<float> get_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const {
  10525. - if (is_empty()) return CImg<float>();
  10526. - if (nblevels<1)
  10527. - throw CImgArgumentException("CImg<%s>::get_histogram() : Can't compute an histogram with %u levels",
  10528. - pixel_type(),nblevels);
  10529. - T vmin=val_min, vmax=val_max;
  10530. - CImg<float> res(nblevels,1,1,1,0);
  10531. - if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; }
  10532. - cimg_for(*this,ptr,T) {
  10533. - const int pos = (int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin));
  10534. - if (pos>=0 && pos<(int)nblevels) res[pos]++;
  10535. - }
  10536. - return res;
  10537. - }
  10538. -
  10539. - //! Equalize the image histogram
  10540. - /** This is the in-place version of \ref get_equalize_histogram() **/
  10541. - CImg& equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) {
  10542. - if (!is_empty()) {
  10543. - T vmin=val_min, vmax=val_max;
  10544. - if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; }
  10545. - CImg<float> hist = get_histogram(nblevels,vmin,vmax);
  10546. - float cumul=0;
  10547. - cimg_forX(hist,pos) { cumul+=hist[pos]; hist[pos]=cumul; }
  10548. - cimg_for(*this,ptr,T) {
  10549. - const int pos = (unsigned int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin));
  10550. - if (pos>=0 && pos<(int)nblevels) *ptr = (T)(vmin + (vmax-vmin)*hist[pos]/size());
  10551. - }
  10552. - }
  10553. - return *this;
  10554. - }
  10555. -
  10556. - //! Return the histogram-equalized version of the current image.
  10557. - /**
  10558. - The histogram equalization is a classical image processing algorithm that enhances the image contrast
  10559. - by expanding its histogram.
  10560. - \param nblevels = Number of different levels of the computed histogram.
  10561. - For classical images, this value is 256 (default value). You should specify more levels
  10562. - if you are working with CImg<float> or images with high range of pixel values.
  10563. - \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min
  10564. - won't be changed.
  10565. - \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max
  10566. - won't be changed.
  10567. - \note If val_min==val_max==0 (default values), the function acts on all pixel values of the image.
  10568. - \return A new image with same size is returned, where pixels have been equalized.
  10569. - \see get_histogram(), equalize_histogram()
  10570. - **/
  10571. - CImg get_equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const {
  10572. - return (+*this).equalize_histogram(nblevels,val_min,val_max);
  10573. - }
  10574. -
  10575. - //! Return the scalar image of vector norms.
  10576. - /**
  10577. - When dealing with vector-valued images (i.e images with dimv()>1), this function computes the L1,L2 or Linf norm of each
  10578. - vector-valued pixel.
  10579. - \param norm_type = Type of the norm being computed (1 = L1, 2 = L2, -1 = Linf).
  10580. - \return A scalar-valued image CImg<float> with size (dimx(),dimy(),dimz(),1), where each pixel is the norm
  10581. - of the corresponding pixels in the original vector-valued image.
  10582. - \see get_orientation_pointwise, orientation_pointwise, norm_pointwise.
  10583. - **/
  10584. - CImg<typename cimg::largest<T,float>::type> get_norm_pointwise(int norm_type=2) const {
  10585. - typedef typename cimg::largest<T,float>::type restype;
  10586. - if (is_empty()) return CImg<restype>();
  10587. - CImg<restype> res(width,height,depth);
  10588. - switch(norm_type) {
  10589. - case -1: { // Linf norm
  10590. - cimg_forXYZ(*this,x,y,z) {
  10591. - restype n=0; cimg_forV(*this,v) {
  10592. - const restype tmp = (restype)cimg::abs((*this)(x,y,z,v));
  10593. - if (tmp>n) n=tmp; res(x,y,z) = n;
  10594. - }
  10595. - }
  10596. - } break;
  10597. - case 1: { // L1 norm
  10598. - cimg_forXYZ(*this,x,y,z) {
  10599. - restype n=0; cimg_forV(*this,v) n+=cimg::abs((*this)(x,y,z,v)); res(x,y,z) = n;
  10600. - }
  10601. - } break;
  10602. - default: { // L2 norm
  10603. - cimg_forXYZ(*this,x,y,z) {
  10604. - restype n=0; cimg_forV(*this,v) n+=(*this)(x,y,z,v)*(*this)(x,y,z,v); res(x,y,z) = (restype)std::sqrt((double)n);
  10605. - }
  10606. - } break;
  10607. - }
  10608. - return res;
  10609. - }
  10610. -
  10611. - //! Replace each pixel value with its vector norm.
  10612. - /**
  10613. - This is the in-place version of \ref get_norm_pointwise().
  10614. - \note Be careful when using this function on CImg<T> with T=char, unsigned char,unsigned int or int. The vector norm
  10615. - is usually a floating point value, and a rough cast will be done here.
  10616. - **/
  10617. - CImg& norm_pointwise() {
  10618. - return CImg<T>(get_norm_pointwise()).swap(*this);
  10619. - }
  10620. -
  10621. - //! Return the image of normalized vectors
  10622. - /**
  10623. - When dealing with vector-valued images (i.e images with dimv()>1), this function return the image of normalized vectors
  10624. - (unit vectors). Null vectors are unchanged. The L2-norm is computed for the normalization.
  10625. - \return A new vector-valued image with same size, where each vector-valued pixels have been normalized.
  10626. - \see get_norm_pointwise, norm_pointwise, orientation_pointwise.
  10627. - **/
  10628. - CImg<typename cimg::largest<T,float>::type> get_orientation_pointwise() const {
  10629. - typedef typename cimg::largest<T,float>::type restype;
  10630. - if (is_empty()) return CImg<restype>();
  10631. - return CImg<restype>(*this,false).orientation_pointwise();
  10632. - }
  10633. -
  10634. - //! Replace each pixel value by its normalized vector
  10635. - /** This is the in-place version of \ref get_orientation_pointwise() **/
  10636. - CImg& orientation_pointwise() {
  10637. - cimg_forXYZ(*this,x,y,z) {
  10638. - float n = 0.0f;
  10639. - cimg_forV(*this,v) n+=(float)((*this)(x,y,z,v)*(*this)(x,y,z,v));
  10640. - n = (float)std::sqrt(n);
  10641. - if (n>0) cimg_forV(*this,v) (*this)(x,y,z,v)=(T)((*this)(x,y,z,v)/n);
  10642. - else cimg_forV(*this,v) (*this)(x,y,z,v)=0;
  10643. - }
  10644. - return *this;
  10645. - }
  10646. -
  10647. - //! Split image into a list CImgList<>.
  10648. - CImgList<T> get_split(const char axe='x', const unsigned int nb=0) const {
  10649. - if (is_empty()) return CImgList<T>();
  10650. - CImgList<T> res;
  10651. - switch (cimg::uncase(axe)) {
  10652. - case 'x': {
  10653. - if (nb>width)
  10654. - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'x' into %u images.",
  10655. - pixel_type(),width,height,depth,dim,data,nb);
  10656. - res.assign(nb?nb:width);
  10657. - const unsigned int delta = width/res.size + ((width%res.size)?1:0);
  10658. - unsigned int l,x;
  10659. - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(x,0,0,0,x+delta-1,height-1,depth-1,dim-1);
  10660. - res[res.size-1] = get_crop(x,0,0,0,width-1,height-1,depth-1,dim-1);
  10661. - } break;
  10662. - case 'y': {
  10663. - if (nb>height)
  10664. - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'y' into %u images.",
  10665. - pixel_type(),width,height,depth,dim,data,nb);
  10666. - res.assign(nb?nb:height);
  10667. - const unsigned int delta = height/res.size + ((height%res.size)?1:0);
  10668. - unsigned int l,x;
  10669. - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,x,0,0,width-1,x+delta-1,depth-1,dim-1);
  10670. - res[res.size-1] = get_crop(0,x,0,0,width-1,height-1,depth-1,dim-1);
  10671. - } break;
  10672. - case 'z': {
  10673. - if (nb>depth)
  10674. - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'z' into %u images.",
  10675. - pixel_type(),width,height,depth,dim,data,nb);
  10676. - res.assign(nb?nb:depth);
  10677. - const unsigned int delta = depth/res.size + ((depth%res.size)?1:0);
  10678. - unsigned int l,x;
  10679. - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,0,x,0,width-1,height-1,x+delta-1,dim-1);
  10680. - res[res.size-1] = get_crop(0,0,x,0,width-1,height-1,depth-1,dim-1);
  10681. - } break;
  10682. - case 'v': {
  10683. - if (nb>dim)
  10684. - throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'v' into %u images.",
  10685. - pixel_type(),width,height,depth,dim,data,nb);
  10686. - res.assign(nb?nb:dim);
  10687. - const unsigned int delta = dim/res.size + ((dim%res.size)?1:0);
  10688. - unsigned int l,x;
  10689. - for (l=0, x=0; l<res.size-1; l++, x+=delta) res[l] = get_crop(0,0,0,x,width-1,height-1,depth-1,x+delta-1);
  10690. - res[res.size-1] = get_crop(0,0,0,x,width-1,height-1,depth-1,dim-1);
  10691. - } break;
  10692. - default:
  10693. - throw CImgArgumentException("CImg<%s>::get_split() : Unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
  10694. - break;
  10695. - }
  10696. - return res;
  10697. - }
  10698. -
  10699. - //! Append an image to another one
  10700. - CImg get_append(const CImg<T>& img, const char axis='x', const char align='c') const {
  10701. - if (img.is_empty()) return *this;
  10702. - if (is_empty()) return img;
  10703. - CImgList<T> temp(2);
  10704. - temp[0].width = width; temp[0].height = height; temp[0].depth = depth;
  10705. - temp[0].dim = dim; temp[0].data = data;
  10706. - temp[1].width = img.width; temp[1].height = img.height; temp[1].depth = img.depth;
  10707. - temp[1].dim = img.dim; temp[1].data = img.data;
  10708. - const CImg<T> res = temp.get_append(axis,align);
  10709. - temp[0].width = temp[0].height = temp[0].depth = temp[0].dim = 0; temp[0].data = 0;
  10710. - temp[1].width = temp[1].height = temp[1].depth = temp[1].dim = 0; temp[1].data = 0;
  10711. - return res;
  10712. - }
  10713. -
  10714. - //! Append an image to another one (in-place version)
  10715. - CImg& append(const CImg<T>& img, const char axis='x', const char align='c') {
  10716. - if (img.is_empty()) return *this;
  10717. - if (is_empty()) return (*this=img);
  10718. - return get_append(img,axis,align).swap(*this);
  10719. - }
  10720. -
  10721. - //! Return a list of images, corresponding to the XY-gradients of an image.
  10722. - /**
  10723. - \param scheme = Numerical scheme used for the gradient computation :
  10724. - - -1 = Backward finite differences
  10725. - - 0 = Centered finite differences
  10726. - - 1 = Forward finite differences
  10727. - - 2 = Using Sobel masks
  10728. - - 3 = Using rotation invariant masks
  10729. - - 4 = Using Deriche recusrsive filter.
  10730. - **/
  10731. - CImgList<typename cimg::largest<T,float>::type> get_gradientXY(const int scheme=0) const {
  10732. - typedef typename cimg::largest<T,float>::type restype;
  10733. - if (is_empty()) return CImgList<restype>(2);
  10734. - CImgList<restype> res(2,width,height,depth,dim);
  10735. - switch(scheme) {
  10736. - case -1: { // backward finite differences
  10737. - CImg_3x3(I,restype);
  10738. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = Icc-Ipc; res[1](x,y,z,k) = Icc-Icp; }
  10739. - } break;
  10740. - case 1: { // forward finite differences
  10741. - CImg_2x2(I,restype);
  10742. - cimg_forZV(*this,z,k) cimg_for2x2(*this,x,y,z,k,I) { res[0](x,y,0,k) = Inc-Icc; res[1](x,y,z,k) = Icn-Icc; }
  10743. - } break;
  10744. - case 2: { // using Sobel mask
  10745. - CImg_3x3(I,restype);
  10746. - const float a = 1, b = 2;
  10747. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
  10748. - res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn;
  10749. - res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn;
  10750. - }
  10751. - } break;
  10752. - case 3: { // using rotation invariant mask
  10753. - CImg_3x3(I,restype);
  10754. - const float a = (float)(0.25*(2-std::sqrt(2.0))), b = (float)(0.5f*(std::sqrt(2.0)-1));
  10755. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
  10756. - res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn;
  10757. - res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn;
  10758. - }
  10759. - } break;
  10760. - case 4: { // using Deriche filter with low standard variation
  10761. - res[0] = get_deriche(0,1,'x');
  10762. - res[1] = get_deriche(0,1,'y');
  10763. - } break;
  10764. - default: { // central finite differences
  10765. - CImg_3x3(I,restype);
  10766. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) {
  10767. - res[0](x,y,z,k) = 0.5f*(Inc-Ipc);
  10768. - res[1](x,y,z,k) = 0.5f*(Icn-Icp);
  10769. - }
  10770. - } break;
  10771. - }
  10772. - return res;
  10773. - }
  10774. -
  10775. - //! Return a list of images, corresponding to the XYZ-gradients of an image.
  10776. - /**
  10777. - \see get_gradientXY().
  10778. - **/
  10779. - CImgList<typename cimg::largest<T,float>::type> get_gradientXYZ(const int scheme=0) const {
  10780. - typedef typename cimg::largest<T,float>::type restype;
  10781. - if (is_empty()) return CImgList<restype>(3);
  10782. - CImgList<restype> res(3,width,height,depth,dim);
  10783. - CImg_3x3x3(I,restype);
  10784. - switch(scheme) {
  10785. - case -1: { // backward finite differences
  10786. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  10787. - res[0](x,y,z,k) = Iccc-Ipcc;
  10788. - res[1](x,y,z,k) = Iccc-Icpc;
  10789. - res[2](x,y,z,k) = Iccc-Iccp;
  10790. - }
  10791. - } break;
  10792. - case 1: { // forward finite differences
  10793. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  10794. - res[0](x,y,z,k) = Incc-Iccc;
  10795. - res[1](x,y,z,k) = Icnc-Iccc;
  10796. - res[2](x,y,z,k) = Iccn-Iccc;
  10797. - }
  10798. - } break;
  10799. - case 4: { // using Deriche filter with low standard variation
  10800. - res[0] = get_deriche(0,1,'x');
  10801. - res[1] = get_deriche(0,1,'y');
  10802. - res[2] = get_deriche(0,1,'z');
  10803. - } break;
  10804. - default: { // central finite differences
  10805. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  10806. - res[0](x,y,z,k) = 0.5f*(Incc-Ipcc);
  10807. - res[1](x,y,z,k) = 0.5f*(Icnc-Icpc);
  10808. - res[2](x,y,z,k) = 0.5f*(Iccn-Iccp);
  10809. - }
  10810. - } break;
  10811. - }
  10812. - return res;
  10813. - }
  10814. -
  10815. - //! Return the 2D structure tensor field of an image
  10816. - CImg<typename cimg::largest<T,float>::type> get_structure_tensorXY(const int scheme=1) const {
  10817. - typedef typename cimg::largest<T,float>::type restype;
  10818. - if (is_empty()) return CImg<restype>();
  10819. - CImg<restype> res(width,height,depth,3,0);
  10820. - CImg_3x3(I,restype);
  10821. - switch (scheme) {
  10822. - case 0: { // classical central finite differences
  10823. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) {
  10824. - const restype
  10825. - ix = 0.5f*(Inc-Ipc),
  10826. - iy = 0.5f*(Icn-Icp);
  10827. - res(x,y,z,0)+=ix*ix;
  10828. - res(x,y,z,1)+=ix*iy;
  10829. - res(x,y,z,2)+=iy*iy;
  10830. - }
  10831. - } break;
  10832. - default: { // Precise forward/backward finite differences
  10833. - cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) {
  10834. - const restype
  10835. - ixf = Inc-Icc, ixb = Icc-Ipc,
  10836. - iyf = Icn-Icc, iyb = Icc-Icp;
  10837. - res(x,y,z,0) += 0.5f*(ixf*ixf+ixb*ixb);
  10838. - res(x,y,z,1) += 0.25f*(ixf*iyf+ixf*iyb+ixb*iyf+ixb*iyb);
  10839. - res(x,y,z,2) += 0.5f*(iyf*iyf+iyb*iyb);
  10840. - }
  10841. - } break;
  10842. - }
  10843. - return res;
  10844. - }
  10845. -
  10846. - //! In-place version of the previous function
  10847. - CImg& structure_tensorXY(const int scheme=1) {
  10848. - return get_structure_tensorXY(scheme).swap(*this);
  10849. - }
  10850. -
  10851. - //! Return the 3D structure tensor field of an image
  10852. - CImg<typename cimg::largest<T,float>::type> get_structure_tensorXYZ(const int scheme=1) const {
  10853. - typedef typename cimg::largest<T,float>::type restype;
  10854. - if (is_empty()) return CImg<restype>();
  10855. - CImg<restype> res(width,height,depth,6,0);
  10856. - CImg_3x3x3(I,restype);
  10857. - switch (scheme) {
  10858. - case 0: { // classical central finite differences
  10859. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  10860. - const restype
  10861. - ix = 0.5f*(Incc-Ipcc),
  10862. - iy = 0.5f*(Icnc-Icpc),
  10863. - iz = 0.5f*(Iccn-Iccp);
  10864. - res(x,y,z,0)+=ix*ix;
  10865. - res(x,y,z,1)+=ix*iy;
  10866. - res(x,y,z,2)+=ix*iz;
  10867. - res(x,y,z,3)+=iy*iy;
  10868. - res(x,y,z,4)+=iy*iz;
  10869. - res(x,y,z,5)+=iz*iz;
  10870. - }
  10871. - } break;
  10872. - default: { // Precise forward/backward finite differences
  10873. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  10874. - const restype
  10875. - ixf = Incc-Iccc, ixb = Iccc-Ipcc,
  10876. - iyf = Icnc-Iccc, iyb = Iccc-Icpc,
  10877. - izf = Iccn-Iccc, izb = Iccc-Iccp;
  10878. - res(x,y,z,0) += 0.5f*(ixf*ixf + ixb*ixb);
  10879. - res(x,y,z,1) += 0.25f*(ixf*iyf + ixf*iyb + ixb*iyf + ixb*iyb);
  10880. - res(x,y,z,2) += 0.25f*(ixf*izf + ixf*izb + ixb*izf + ixb*izb);
  10881. - res(x,y,z,3) += 0.5f*(iyf*iyf + iyb*iyb);
  10882. - res(x,y,z,4) += 0.25f*(iyf*izf + iyf*izb + iyb*izf + iyb*izb);
  10883. - res(x,y,z,5) += 0.5f*(izf*izf + izb*izb);
  10884. - }
  10885. - } break;
  10886. - }
  10887. - return res;
  10888. - }
  10889. -
  10890. - //! In-place version of the previous function
  10891. - CImg& structure_tensorXYZ(const int scheme=1) {
  10892. - return get_structure_tensorXYZ(scheme).swap(*this);
  10893. - }
  10894. -
  10895. - //@}
  10896. - //-------------------------------------
  10897. - //
  10898. - //! \name Meshes and Triangulations
  10899. - //@{
  10900. - //-------------------------------------
  10901. -
  10902. - struct _marching_squares_func {
  10903. - const CImg<T>& ref;
  10904. - _marching_squares_func(const CImg<T>& pref):ref(pref) {}
  10905. - float operator()(const float x, const float y) const {
  10906. - return (float)ref((int)x,(int)y);
  10907. - }
  10908. - };
  10909. -
  10910. - struct _marching_cubes_func {
  10911. - const CImg<T>& ref;
  10912. - _marching_cubes_func(const CImg<T>& pref):ref(pref) {}
  10913. - float operator()(const float x, const float y, const float z) const {
  10914. - return (float)ref((int)x,(int)y,(int)z);
  10915. - }
  10916. - };
  10917. -
  10918. - struct _marching_squares_func_float {
  10919. - const CImg<T>& ref;
  10920. - _marching_squares_func_float(const CImg<T>& pref):ref(pref) {}
  10921. - float operator()(const float x, const float y) const {
  10922. - return (float)ref.linear_pix2d(x,y);
  10923. - }
  10924. - };
  10925. -
  10926. - struct _marching_cubes_func_float {
  10927. - const CImg<T>& ref;
  10928. - _marching_cubes_func_float(const CImg<T>& pref):ref(pref) {}
  10929. - float operator()(const float x, const float y, const float z) const {
  10930. - return (float)ref.linear_pix3d(x,y,z);
  10931. - }
  10932. - };
  10933. -
  10934. - //! Get a vectorization of an implicit function defined by the instance image.
  10935. - template<typename tp, typename tf>
  10936. - const CImg& marching_squares(const float isovalue,CImgList<tp>& points, CImgList<tf>& primitives) const {
  10937. - if (height<=1 || depth>1 || dim>1)
  10938. - throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.",
  10939. - pixel_type(),width,height,depth,dim,data);
  10940. - const _marching_squares_func func(*this);
  10941. - cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,1.0f,1.0f,points,primitives);
  10942. - return *this;
  10943. - }
  10944. -
  10945. - //! Get a vectorization of an implicit function defined by the instance image.
  10946. - /**
  10947. - This version allows to specify the marching squares resolution along x,y, and z.
  10948. - **/
  10949. - template<typename tp, typename tf>
  10950. - const CImg& marching_squares(const float isovalue,
  10951. - const float resx, const float resy,
  10952. - CImgList<tp>& points, CImgList<tf>& primitives) const {
  10953. - if (height<=1 || depth>1 || dim>1)
  10954. - throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.",
  10955. - pixel_type(),width,height,depth,dim,data);
  10956. - const _marching_squares_func_float func(*this);
  10957. - cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,resx,resy,points,primitives);
  10958. - return *this;
  10959. - }
  10960. -
  10961. - //! Get a triangulation of an implicit function defined by the instance image
  10962. - template<typename tp, typename tf>
  10963. - const CImg& marching_cubes(const float isovalue,CImgList<tp>& points, CImgList<tf>& primitives,
  10964. - const bool invert_faces = false) const {
  10965. - if (depth<=1 || dim>1)
  10966. - throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.",
  10967. - pixel_type(),width,height,depth,dim,data);
  10968. - const _marching_cubes_func func(*this);
  10969. - cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f,
  10970. - 1.0f,1.0f,1.0f,points,primitives,invert_faces);
  10971. - return *this;
  10972. - }
  10973. -
  10974. - //! Get a triangulation of an implicit function defined by the instance image
  10975. - /**
  10976. - This version allows to specify the marching cube resolution along x,y and z.
  10977. - **/
  10978. - template<typename tp, typename tf>
  10979. - const CImg& marching_cubes(const float isovalue,
  10980. - const float resx, const float resy, const float resz,
  10981. - CImgList<tp>& points, CImgList<tf>& primitives,
  10982. - const bool invert_faces = false) const {
  10983. - if (depth<=1 || dim>1)
  10984. - throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.",
  10985. - pixel_type(),width,height,depth,dim,data);
  10986. - const _marching_cubes_func_float func(*this);
  10987. - cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f,
  10988. - resx,resy,resz,points,primitives,invert_faces);
  10989. - return *this;
  10990. - }
  10991. -
  10992. - //@}
  10993. - //----------------------------
  10994. - //
  10995. - //! \name Color conversions
  10996. - //@{
  10997. - //----------------------------
  10998. -
  10999. - //! Return the default 256 colors palette.
  11000. - /**
  11001. - The default color palette is used by %CImg when displaying images on 256 colors displays.
  11002. - It consists in the quantification of the (R,G,B) color space using 3:3:2 bits for color coding
  11003. - (i.e 8 levels for the Red and Green and 4 levels for the Blue).
  11004. - \return A 256x1x1x3 color image defining the palette entries.
  11005. - **/
  11006. - static CImg<T> get_default_LUT8() {
  11007. - static CImg<T> palette;
  11008. - if (!palette.data) {
  11009. - palette.assign(256,1,1,3);
  11010. - for (unsigned int index=0, r=16; r<256; r+=32)
  11011. - for (unsigned int g=16; g<256; g+=32)
  11012. - for (unsigned int b=32; b<256; b+=64) {
  11013. - palette(index,0) = r;
  11014. - palette(index,1) = g;
  11015. - palette(index++,2) = b;
  11016. - }
  11017. - }
  11018. - return palette;
  11019. - }
  11020. -
  11021. - //! Convert color pixels from (R,G,B) to match a specified palette.
  11022. - /**
  11023. - This function return a (R,G,B) image where colored pixels are constrained to match entries
  11024. - of the specified color \c palette.
  11025. - \param palette User-defined palette that will constraint the color conversion.
  11026. - \param dithering Enable/Disable Floyd-Steinberg dithering.
  11027. - \param indexing If \c true, each resulting image pixel is an index to the given color palette.
  11028. - Otherwise, (R,G,B) values of the palette are copied instead.
  11029. - **/
  11030. - template<typename t> CImg<t> get_RGBtoLUT(const CImg<t>& palette, const bool dithering=true,const bool indexing=false) const {
  11031. - if (is_empty()) return CImg<t>();
  11032. - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoLUT() : Input image dimension is dim=%u, "
  11033. - "should be a (R,G,B) image.",pixel_type(),dim);
  11034. - if (palette.data && palette.dim!=3)
  11035. - throw CImgArgumentException("CImg<%s>::RGBtoLUT() : Given palette dimension is dim=%u, "
  11036. - "should be a (R,G,B) palette",pixel_type(),palette.dim);
  11037. - CImg<t> res(width,height,depth,indexing?1:3), pal = palette.data?palette:CImg<t>::get_default_LUT8();
  11038. - float *line1 = new float[3*width], *line2 = new float[3*width], *pline1 = line1, *pline2 = line2;
  11039. - cimg_forZ(*this,z) {
  11040. - float *ptr=pline2; cimg_forX(*this,x) { *(ptr++)=(*this)(x,0,z,0); *(ptr++)=(*this)(x,0,z,1); *(ptr++)=(*this)(x,0,z,2); }
  11041. - cimg_forY(*this,y) {
  11042. - cimg::swap(pline1,pline2);
  11043. - if (y<dimy()-1) {
  11044. - const int ny = y+1;
  11045. - float *ptr=pline2; cimg_forX(*this,x) { *(ptr++)=(*this)(x,ny,z,0); *(ptr++)=(*this)(x,ny,z,1); *(ptr++)=(*this)(x,ny,z,2); }
  11046. - }
  11047. - float *ptr1=pline1, *ptr2=pline2;
  11048. - cimg_forX(*this,x) {
  11049. - float R = *(ptr1++), G = *(ptr1++), B = *(ptr1++);
  11050. - R = R<0?0:(R>255?255:R); G = G<0?0:(G>255?255:G); B = B<0?0:(B>255?255:B);
  11051. - int best_index = 0;
  11052. - t Rbest=0,Gbest=0,Bbest=0;
  11053. - if (palette.data) { // find best match in given color palette
  11054. - float min = cimg::type<float>::max();
  11055. - cimg_forX(palette,off) {
  11056. - const t Rp = palette(off,0), Gp = palette(off,1), Bp = palette(off,2);
  11057. - const float error = (float)((Rp-R)*(Rp-R) + (Gp-G)*(Gp-G) + (Bp-B)*(Bp-B));
  11058. - if (error<min) { min=error; best_index=off; Rbest=Rp; Gbest=Gp; Bbest=Bp; }
  11059. - }
  11060. - } else {
  11061. - Rbest = (t)((unsigned char)R&0xe0); Gbest = (t)((unsigned char)G&0xe0); Bbest = (t)((unsigned char)B&0xc0);
  11062. - best_index = (unsigned char)Rbest | ((unsigned char)Gbest>>3) | ((unsigned char)Bbest>>6);
  11063. - }
  11064. - if (indexing) res(x,y,z) = best_index;
  11065. - else { res(x,y,z,0) = Rbest; res(x,y,z,1) = Gbest; res(x,y,z,2) = Bbest; }
  11066. - if (dithering) { // apply dithering to neighborhood pixels if needed
  11067. - const float dR = (float)(R-Rbest), dG = (float)(G-Gbest), dB = (float)(B-Bbest);
  11068. - if (x<dimx()-1) { *(ptr1++)+= dR*7/16; *(ptr1++)+= dG*7/16; *(ptr1++)+= dB*7/16; ptr1-=3; }
  11069. - if (y<dimy()-1) {
  11070. - *(ptr2++)+= dR*5/16; *(ptr2++)+= dG*5/16; *ptr2+= dB*5/16; ptr2-=2;
  11071. - if (x>0) { *(--ptr2)+= dB*3/16; *(--ptr2)+= dG*3/16; *(--ptr2)+= dR*3/16; ptr2+=3; }
  11072. - if (x<dimx()-1) { ptr2+=3; *(ptr2++)+= dR/16; *(ptr2++)+= dG/16; *ptr2+= dB/16; ptr2-=5; }
  11073. - }
  11074. - }
  11075. - ptr2+=3;
  11076. - }
  11077. - }
  11078. - }
  11079. - delete[] line1; delete[] line2;
  11080. - return res;
  11081. - }
  11082. -
  11083. - //! Convert color pixels from (R,G,B) to match the default 256 colors palette.
  11084. - /**
  11085. - Same as get_RGBtoLUT() with the default color palette given by get_default_LUT8().
  11086. - **/
  11087. - CImg<T> get_RGBtoLUT(const bool dithering=true, const bool indexing=false) const {
  11088. - CImg<T> foo;
  11089. - return get_RGBtoLUT(foo,dithering,indexing);
  11090. - }
  11091. -
  11092. - //! Convert color pixels from (R,G,B) to match the specified color palette.
  11093. - /** This is the in-place version of get_RGBtoLUT(). **/
  11094. - CImg& RGBtoLUT(const CImg<T>& palette,const bool dithering=true,const bool indexing=false) {
  11095. - return get_RGBtoLUT(palette,dithering,indexing).swap(*this);
  11096. - }
  11097. -
  11098. - //! Convert color pixels from (R,G,B) to match the specified color palette.
  11099. - /** This is the in-place version of get_RGBtoLUT(). **/
  11100. - CImg& RGBtoLUT(const bool dithering=true,const bool indexing=false) {
  11101. - CImg<T> foo;
  11102. - return get_RGBtoLUT(foo,dithering,indexing).swap(*this);
  11103. - }
  11104. -
  11105. - //! Convert an indexed image to a (R,G,B) image using the specified color palette.
  11106. - template<typename t> CImg<t> get_LUTtoRGB(const CImg<t>& palette) const {
  11107. - if (is_empty()) return CImg<t>();
  11108. - if (dim!=1) throw CImgInstanceException("CImg<%s>::LUTtoRGB() : Input image dimension is dim=%u, "
  11109. - "should be a LUT image",pixel_type(),dim);
  11110. - if (palette.data && palette.dim!=3)
  11111. - throw CImgArgumentException("CImg<%s>::LUTtoRGB() : Given palette dimension is dim=%u, "
  11112. - "should be a (R,G,B) palette",pixel_type(),palette.dim);
  11113. - CImg<t> res(width,height,depth,3);
  11114. - CImg<t> pal = palette.data?palette:get_default_LUT8();
  11115. - cimg_forXYZ(*this,x,y,z) {
  11116. - const unsigned int index = (unsigned int)(*this)(x,y,z);
  11117. - res(x,y,z,0) = pal(index,0);
  11118. - res(x,y,z,1) = pal(index,1);
  11119. - res(x,y,z,2) = pal(index,2);
  11120. - }
  11121. - return res;
  11122. - }
  11123. -
  11124. - //! Convert an indexed image (with the default palette) to a (R,G,B) image.
  11125. - CImg<T> get_LUTtoRGB() const {
  11126. - CImg<T> foo;
  11127. - return get_LUTtoRGB(foo);
  11128. - }
  11129. -
  11130. - //! In-place version of get_LUTtoRGB().
  11131. - CImg& LUTtoRGB(const CImg<T>& palette) {
  11132. - return get_LUTtoRGB(palette).swap(*this);
  11133. - }
  11134. -
  11135. - //! In-place version of get_LUTroRGB().
  11136. - CImg& LUTtoRGB() {
  11137. - CImg<T> foo;
  11138. - return get_LUTtoRGB(foo).swap(*this);
  11139. - }
  11140. -
  11141. - //! Convert color pixels from (R,G,B) to (H,S,V).
  11142. - CImg& RGBtoHSV() {
  11143. - if (!is_empty()) {
  11144. - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoHSV() : Input image dimension is dim=%u, "
  11145. - "should be a (R,G,B) image.",pixel_type(),dim);
  11146. - cimg_forXYZ(*this,x,y,z) {
  11147. - const float
  11148. - R = (float)((*this)(x,y,z,0)/255.0f),
  11149. - G = (float)((*this)(x,y,z,1)/255.0f),
  11150. - B = (float)((*this)(x,y,z,2)/255.0f);
  11151. - const float m = cimg::min(R,G,B), v = cimg::max(R,G,B);
  11152. - float h,s;
  11153. - if (v==m) { h=-1; s=0; } else {
  11154. - const float
  11155. - f = (R==m)?(G-B):((G==m)?(B-R):(R-G)),
  11156. - i = (R==m)?3.0f:((G==m)?5.0f:1.0f);
  11157. - h = (i-f/(v-m));
  11158. - s = (v-m)/v;
  11159. - if (h>=6.0f) h-=6.0f;
  11160. - h*=(float)cimg::PI/3.0f;
  11161. - }
  11162. - (*this)(x,y,z,0) = (T)h;
  11163. - (*this)(x,y,z,1) = (T)s;
  11164. - (*this)(x,y,z,2) = (T)v;
  11165. - }
  11166. - }
  11167. - return *this;
  11168. - }
  11169. -
  11170. - //! Convert color pixels from (H,S,V) to (R,G,B).
  11171. - CImg& HSVtoRGB() {
  11172. - if (!is_empty()) {
  11173. - if (dim!=3) throw CImgInstanceException("CImg<%s>::HSVtoRGB() : Input image dimension is dim=%u, "
  11174. - "should be a (H,S,V) image",pixel_type(),dim);
  11175. - cimg_forXYZ(*this,x,y,z) {
  11176. - float
  11177. - H = (float)((*this)(x,y,z,0)),
  11178. - S = (float)((*this)(x,y,z,1)),
  11179. - V = (float)((*this)(x,y,z,2));
  11180. - float R=0,G=0,B=0;
  11181. - if (H<0) R=G=B=V;
  11182. - else {
  11183. - H/=(float)cimg::PI/3.0f;
  11184. - const int i = (int)std::floor(H);
  11185. - const float
  11186. - f = (i&1)?(H-i):(1.0f-H+i),
  11187. - m = V*(1.0f-S),
  11188. - n = V*(1.0f-S*f);
  11189. - switch(i) {
  11190. - case 6:
  11191. - case 0: R=V; G=n; B=m; break;
  11192. - case 1: R=n; G=V; B=m; break;
  11193. - case 2: R=m; G=V; B=n; break;
  11194. - case 3: R=m; G=n; B=V; break;
  11195. - case 4: R=n; G=m; B=V; break;
  11196. - case 5: R=V; G=m; B=n; break;
  11197. - }
  11198. - }
  11199. - (*this)(x,y,z,0) = (T)(R*255.0f);
  11200. - (*this)(x,y,z,1) = (T)(G*255.0f);
  11201. - (*this)(x,y,z,2) = (T)(B*255.0f);
  11202. - }
  11203. - }
  11204. - return *this;
  11205. - }
  11206. -
  11207. - //! Convert color pixels from (R,G,B) to (Y,Cb,Cr)_8 (Thanks to Chen Wang).
  11208. - CImg& RGBtoYCbCr() {
  11209. - if (!is_empty()) {
  11210. - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYCbCr() : Input image dimension is dim=%u, "
  11211. - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
  11212. - cimg_forXYZ(*this,x,y,z) {
  11213. - const int
  11214. - R = (int)((*this)(x,y,z,0)),
  11215. - G = (int)((*this)(x,y,z,1)),
  11216. - B = (int)((*this)(x,y,z,2));
  11217. - const int
  11218. - Y = ((66*R+129*G+25*B+128)>>8) + 16,
  11219. - Cb = ((-38*R-74*G+112*B+128)>>8) + 128,
  11220. - Cr = ((112*R-94*G-18*B+128)>>8) + 128;
  11221. - (*this)(x,y,z,0) = (T)(Y<0?0:(Y>255?255:Y));
  11222. - (*this)(x,y,z,1) = (T)(Cb<0?0:(Cb>255?255:Cb));
  11223. - (*this)(x,y,z,2) = (T)(Cr<0?0:(Cr>255?255:Cr));
  11224. - }
  11225. - }
  11226. - return *this;
  11227. - }
  11228. -
  11229. - //! Convert color pixels from (Y,Cb,Cr)_8 to (R,G,B).
  11230. - CImg& YCbCrtoRGB() {
  11231. - if (!is_empty()) {
  11232. - if (dim!=3) throw CImgInstanceException("CImg<%s>::YCbCrtoRGB() : Input image dimension is dim=%u, "
  11233. - "should be a (Y,Cb,Cr)_8 image (dim=3)",pixel_type(),dim);
  11234. - cimg_forXYZ(*this,x,y,z) {
  11235. - const int
  11236. - Y = (int)((*this)(x, y, z, 0)-16),
  11237. - Cb = (int)((*this)(x, y, z, 1)-128),
  11238. - Cr = (int)((*this)(x, y, z, 2)-128);
  11239. - const int
  11240. - R = ((298*Y + 409*Cr + 128) >> 8 ),
  11241. - G = ((298*Y - 100*Cb - 208*Cr + 128) >> 8 ),
  11242. - B = ((298*Y + 516*Cb + 128) >> 8 );
  11243. - (*this)(x,y,z,0) = (T)(R<0?0:(R>255?255:R));
  11244. - (*this)(x,y,z,1) = (T)(G<0?0:(G>255?255:G));
  11245. - (*this)(x,y,z,2) = (T)(B<0?0:(B>255?255:B));
  11246. - }
  11247. - }
  11248. - return *this;
  11249. - }
  11250. -
  11251. - //! Convert color pixels from (R,G,B) to (Y,U,V).
  11252. - CImg& RGBtoYUV() {
  11253. - if (!is_empty()) {
  11254. - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYUV() : Input image dimension is dim=%u, "
  11255. - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
  11256. - cimg_forXYZ(*this,x,y,z) {
  11257. - const float
  11258. - R = (*this)(x,y,z,0)/255.0f,
  11259. - G = (*this)(x,y,z,1)/255.0f,
  11260. - B = (*this)(x,y,z,2)/255.0f,
  11261. - Y = (T)(0.299*R + 0.587*G + 0.114*B);
  11262. - (*this)(x,y,z,0) = Y;
  11263. - (*this)(x,y,z,1) = (T)(0.492*(B-Y));
  11264. - (*this)(x,y,z,2) = (T)(0.877*(R-Y));
  11265. - }
  11266. - }
  11267. - return *this;
  11268. - }
  11269. -
  11270. - //! Convert color pixels from (Y,U,V) to (R,G,B).
  11271. - CImg& YUVtoRGB() {
  11272. - if (!is_empty()) {
  11273. - if (dim!=3) throw CImgInstanceException("CImg<%s>::YUVtoRGB() : Input image dimension is dim=%u, "
  11274. - "should be a (Y,U,V) image (dim=3)",pixel_type(),dim);
  11275. - cimg_forXYZ(*this,x,y,z) {
  11276. - const T Y = (*this)(x,y,z,0), U = (*this)(x,y,z,1), V = (*this)(x,y,z,2);
  11277. - (*this)(x,y,z,0) = (T)((Y + 1.140*V)*255.0f);
  11278. - (*this)(x,y,z,1) = (T)((Y - 0.395*U - 0.581*V)*255.0f);
  11279. - (*this)(x,y,z,2) = (T)((Y + 2.032*U)*255.0f);
  11280. - }
  11281. - }
  11282. - return *this;
  11283. - }
  11284. -
  11285. - //! Convert color pixels from (R,G,B) to (X,Y,Z)_709.
  11286. - CImg& RGBtoXYZ() {
  11287. - if (!is_empty()) {
  11288. - if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoXYZ() : Input image dimension is dim=%u, "
  11289. - "should be a (R,G,B) image (dim=3)",pixel_type(),dim);
  11290. - cimg_forXYZ(*this,x,y,z) {
  11291. - const float
  11292. - R = (float)((*this)(x,y,z,0)/255.0f),
  11293. - G = (float)((*this)(x,y,z,1)/255.0f),
  11294. - B = (float)((*this)(x,y,z,2)/255.0f);
  11295. - (*this)(x,y,z,0) = (T)(0.412453*R + 0.357580*G + 0.180423*B);
  11296. - (*this)(x,y,z,1) = (T)(0.212671*R + 0.715160*G + 0.072169*B);
  11297. - (*this)(x,y,z,2) = (T)(0.019334*R + 0.119193*G + 0.950227*B);
  11298. - }
  11299. - }
  11300. - return *this;
  11301. - }
  11302. -
  11303. - //! Convert (X,Y,Z)_709 pixels of a color image into the (R,G,B) color space.
  11304. - CImg& XYZtoRGB() {
  11305. - if (!is_empty()) {
  11306. - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoRGB() : Input image dimension is dim=%u, "
  11307. - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
  11308. - cimg_forXYZ(*this,x,y,z) {
  11309. - const float
  11310. - X = (float)(255.0f*(*this)(x,y,z,0)),
  11311. - Y = (float)(255.0f*(*this)(x,y,z,1)),
  11312. - Z = (float)(255.0f*(*this)(x,y,z,2));
  11313. - (*this)(x,y,z,0) = (T)(3.240479*X - 1.537150*Y - 0.498535*Z);
  11314. - (*this)(x,y,z,1) = (T)(-0.969256*X + 1.875992*Y + 0.041556*Z);
  11315. - (*this)(x,y,z,2) = (T)(0.055648*X - 0.204043*Y + 1.057311*Z);
  11316. - }
  11317. - }
  11318. - return *this;
  11319. - }
  11320. -
  11321. - //! Convert (X,Y,Z)_709 pixels of a color image into the (L*,a*,b*) color space.
  11322. -#define cimg_Labf(x) ((x)>=0.008856?(std::pow(x,1/3.0)):(7.787*(x)+16.0/116.0))
  11323. -#define cimg_Labfi(x) ((x)>=0.206893?((x)*(x)*(x)):(((x)-16.0/116.0)/7.787))
  11324. -
  11325. - CImg& XYZtoLab() {
  11326. - if (!is_empty()) {
  11327. - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoLab() : Input image dimension is dim=%u, "
  11328. - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
  11329. - const double
  11330. - Xn = 0.412453 + 0.357580 + 0.180423,
  11331. - Yn = 0.212671 + 0.715160 + 0.072169,
  11332. - Zn = 0.019334 + 0.119193 + 0.950227;
  11333. - cimg_forXYZ(*this,x,y,z) {
  11334. - const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2);
  11335. - const double
  11336. - XXn = X/Xn, YYn = Y/Yn, ZZn = Z/Zn,
  11337. - fX = cimg_Labf(XXn), fY = cimg_Labf(YYn), fZ = cimg_Labf(ZZn);
  11338. - (*this)(x,y,z,0) = (T)(116*fY-16);
  11339. - (*this)(x,y,z,1) = (T)(500*(fX-fY));
  11340. - (*this)(x,y,z,2) = (T)(200*(fY-fZ));
  11341. - }
  11342. - }
  11343. - return *this;
  11344. - }
  11345. -
  11346. - //! Convert (L,a,b) pixels of a color image into the (X,Y,Z) color space.
  11347. - CImg& LabtoXYZ() {
  11348. - if (!is_empty()) {
  11349. - if (dim!=3) throw CImgInstanceException("CImg<%s>::LabtoXYZ() : Input image dimension is dim=%u, "
  11350. - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
  11351. - const double
  11352. - Xn = 0.412453 + 0.357580 + 0.180423,
  11353. - Yn = 0.212671 + 0.715160 + 0.072169,
  11354. - Zn = 0.019334 + 0.119193 + 0.950227;
  11355. - cimg_forXYZ(*this,x,y,z) {
  11356. - const T L = (*this)(x,y,z,0), a = (*this)(x,y,z,1), b = (*this)(x,y,z,2);
  11357. - const double
  11358. - cY = (L+16)/116.0,
  11359. - Y = Yn*cimg_Labfi(cY),
  11360. - pY = std::pow(Y/Yn,1.0/3),
  11361. - cX = a/500+pY,
  11362. - X = Xn*cX*cX*cX,
  11363. - cZ = pY-b/200,
  11364. - Z = Zn*cZ*cZ*cZ;
  11365. - (*this)(x,y,z,0) = (T)(X);
  11366. - (*this)(x,y,z,1) = (T)(Y);
  11367. - (*this)(x,y,z,2) = (T)(Z);
  11368. - }
  11369. - }
  11370. - return *this;
  11371. - }
  11372. -
  11373. - //! Convert (X,Y,Z)_709 pixels of a color image into the (x,y,Y) color space.
  11374. - CImg& XYZtoxyY() {
  11375. - if (!is_empty()) {
  11376. - if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoxyY() : Input image dimension is dim=%u, "
  11377. - "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim);
  11378. - cimg_forXYZ(*this,x,y,z) {
  11379. - const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2), sum = (X+Y+Z), nsum = sum>0?sum:1;
  11380. - (*this)(x,y,z,0) = X/nsum;
  11381. - (*this)(x,y,z,1) = Y/nsum;
  11382. - (*this)(x,y,z,2) = Y;
  11383. - }
  11384. - }
  11385. - return *this;
  11386. - }
  11387. -
  11388. - //! Convert (x,y,Y) pixels of a color image into the (X,Y,Z)_709 color space.
  11389. - CImg& xyYtoXYZ() {
  11390. - if (!is_empty()) {
  11391. - if (dim!=3) throw CImgInstanceException("CImg<%s>::xyYtoXYZ() : Input image dimension is dim=%u, "
  11392. - "should be a (x,y,Y) image (dim=3)",pixel_type(),dim);
  11393. - cimg_forXYZ(*this,x,y,z) {
  11394. - const T px = (*this)(x,y,z,0), py = (*this)(x,y,z,1), Y = (*this)(x,y,z,2), ny = py>0?py:1;
  11395. - (*this)(x,y,z,0) = (T)(px*Y/ny);
  11396. - (*this)(x,y,z,1) = Y;
  11397. - (*this)(x,y,z,2) = (T)((1-px-py)*Y/ny);
  11398. - }
  11399. - }
  11400. - return *this;
  11401. - }
  11402. -
  11403. - //! In-place version of get_RGBtoLab().
  11404. - CImg& RGBtoLab() {
  11405. - return RGBtoXYZ().XYZtoLab();
  11406. - }
  11407. -
  11408. - //! In-place version of get_LabtoRGb().
  11409. - CImg& LabtoRGB() {
  11410. - return LabtoXYZ().XYZtoRGB();
  11411. - }
  11412. -
  11413. - //! In-place version of get_RGBtoxyY().
  11414. - CImg& RGBtoxyY() {
  11415. - return RGBtoXYZ().XYZtoxyY();
  11416. - }
  11417. -
  11418. - //! In-place version of get_xyYtoRGB().
  11419. - CImg& xyYtoRGB() {
  11420. - return xyYtoXYZ().XYZtoRGB();
  11421. - }
  11422. -
  11423. - //! Convert a (R,G,B) image to a (H,S,V) one.
  11424. - CImg get_RGBtoHSV() const {
  11425. - return (+*this).RGBtoHSV();
  11426. - }
  11427. -
  11428. - //! Convert a (H,S,V) image to a (R,G,B) one.
  11429. - CImg get_HSVtoRGB() const {
  11430. - return (+*this).HSVtoRGB();
  11431. - }
  11432. -
  11433. - //! Convert a (R,G,B) image to a (Y,Cb,Cr) one.
  11434. - CImg get_RGBtoYCbCr() const {
  11435. - return (+*this).RGBtoYCbCr();
  11436. - }
  11437. -
  11438. - //! Convert a (Y,Cb,Cr) image to a (R,G,B) one.
  11439. - CImg get_YCbCrtoRGB() const {
  11440. - return (+*this).YCbCrtoRGB();
  11441. - }
  11442. -
  11443. - //! Convert a (R,G,B) image into a (Y,U,V) one.
  11444. - CImg<typename cimg::largest<T,float>::type> get_RGBtoYUV() const {
  11445. - typedef typename cimg::largest<T,float>::type restype;
  11446. - return CImg<restype>(*this,false).RGBtoYUV();
  11447. - }
  11448. -
  11449. - //! Convert a (Y,U,V) image into a (R,G,B) one.
  11450. - CImg get_YUVtoRGB() const {
  11451. - return (+*this).YUVtoRGB();
  11452. - }
  11453. -
  11454. - //! Convert a (R,G,B) image to a (X,Y,Z) one.
  11455. - CImg<typename cimg::largest<T,float>::type> get_RGBtoXYZ() const {
  11456. - typedef typename cimg::largest<T,float>::type restype;
  11457. - return CImg<restype>(*this,false).RGBtoXYZ();
  11458. - }
  11459. -
  11460. - //! Convert a (X,Y,Z) image to a (R,G,B) one.
  11461. - CImg get_XYZtoRGB() const {
  11462. - return (+*this).XYZtoRGB();
  11463. - }
  11464. -
  11465. - //! Convert a (X,Y,Z) image to a (L,a,b) one.
  11466. - CImg get_XYZtoLab() const {
  11467. - return (+*this).XYZtoLab();
  11468. - }
  11469. -
  11470. - //! Convert a (L,a,b) image to a (X,Y,Z) one.
  11471. - CImg get_LabtoXYZ() const {
  11472. - return (+*this).LabtoXYZ();
  11473. - }
  11474. -
  11475. - //! Convert a (X,Y,Z) image to a (x,y,Y) one.
  11476. - CImg get_XYZtoxyY() const {
  11477. - return (+*this).XYZtoxyY();
  11478. - }
  11479. -
  11480. - //! Convert a (x,y,Y) image to a (X,Y,Z) one.
  11481. - CImg get_xyYtoXYZ() const {
  11482. - return (+*this).xyYtoXYZ();
  11483. - }
  11484. -
  11485. - //! Convert a (R,G,B) image to a (L,a,b) one.
  11486. - CImg get_RGBtoLab() const {
  11487. - return (+*this).RGBtoLab();
  11488. - }
  11489. -
  11490. - //! Convert a (L,a,b) image to a (R,G,B) one.
  11491. - CImg get_LabtoRGB() const {
  11492. - return (+*this).LabtoRGB();
  11493. - }
  11494. -
  11495. - //! Convert a (R,G,B) image to a (x,y,Y) one.
  11496. - CImg get_RGBtoxyY() const {
  11497. - return (+*this).RGBtoxyY();
  11498. - }
  11499. -
  11500. - //! Convert a (x,y,Y) image to a (R,G,B) one.
  11501. - CImg get_xyYtoRGB() const {
  11502. - return (+*this).xyYtoRGB();
  11503. - }
  11504. -
  11505. - //@}
  11506. - //-------------------
  11507. - //
  11508. - //! \name Drawing
  11509. - //@{
  11510. - //-------------------
  11511. -
  11512. - // Should be used only by member functions. Not an user-friendly function.
  11513. - // Pre-requisites : x0<x1, y-coordinate is valid, col is valid.
  11514. - CImg& draw_scanline(const int x0, const int x1, const int y, const T *const color,
  11515. - const float opacity=1, const float brightness=1, const bool init=false) {
  11516. - static float nopacity=0, copacity=0;
  11517. - static unsigned int whz=0;
  11518. - static const T* col = 0;
  11519. - if (init) {
  11520. - nopacity = cimg::abs(opacity);
  11521. - copacity = 1-cimg::max(opacity,0.0f);
  11522. - whz = width*height*depth;
  11523. - col = color;
  11524. - } else {
  11525. - const int nx0 = cimg::max(x0,0), nx1 = cimg::min(x1,(int)width-1), dx = nx1-nx0;
  11526. - T *ptrd = ptr(0,y) + nx0;
  11527. - if (dx>=0) {
  11528. - if (opacity>=1) {
  11529. - int off = whz-dx-1;
  11530. - if (sizeof(T)!=1) cimg_forV(*this,k) {
  11531. - const T val = (T)(*(col++)*brightness);
  11532. - for (int x=dx; x>=0; x--) *(ptrd++)=val;
  11533. - ptrd+=off;
  11534. - } else cimg_forV(*this,k) { std::memset(ptrd,(int)(*(col++)*brightness),dx+1); ptrd+=whz; }
  11535. - col-=dim;
  11536. - } else {
  11537. - int off = whz-dx-1;
  11538. - cimg_forV(*this,k) {
  11539. - const T val = (T)(*(col++)*brightness);
  11540. - for (int x=dx; x>=0; x--) { *ptrd = (T)(val*nopacity + *ptrd*copacity); ptrd++; }
  11541. - ptrd+=off;
  11542. - }
  11543. - col-=dim;
  11544. - }
  11545. - }
  11546. - }
  11547. - return *this;
  11548. - }
  11549. -
  11550. - CImg& draw_scanline(const T *const color,const float opacity=1) { return draw_scanline(0,0,0,color,opacity,1.0f,true); }
  11551. -
  11552. - //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0,\c z0).
  11553. - /**
  11554. - \param x0 = X-coordinate of the vector-valued pixel to plot.
  11555. - \param y0 = Y-coordinate of the vector-valued pixel to plot.
  11556. - \param z0 = Z-coordinate of the vector-valued pixel to plot.
  11557. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11558. - \param opacity = opacity of the drawing.
  11559. - \note Clipping is supported.
  11560. - **/
  11561. - CImg& draw_point(const int x0,const int y0,const int z0,
  11562. - const T *const color,const float opacity=1) {
  11563. - if (!is_empty()) {
  11564. - if (!color) throw CImgArgumentException("CImg<%s>::draw_point() : Specified color is (null)",pixel_type());
  11565. - if (x0>=0 && y0>=0 && z0>=0 && x0<dimx() && y0<dimy() && z0<dimz()) {
  11566. - const T *col=color;
  11567. - const unsigned int whz = width*height*depth;
  11568. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11569. - T *ptrd = ptr(x0,y0,z0,0);
  11570. - if (opacity>=1) cimg_forV(*this,k) { *ptrd = *(col++); ptrd+=whz; }
  11571. - else cimg_forV(*this,k) { *ptrd=(T)(*(col++)*nopacity + *ptrd*copacity); ptrd+=whz; }
  11572. - }
  11573. - }
  11574. - return *this;
  11575. - }
  11576. -
  11577. - //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0).
  11578. - /**
  11579. - \param x0 = X-coordinate of the vector-valued pixel to plot.
  11580. - \param y0 = Y-coordinate of the vector-valued pixel to plot.
  11581. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11582. - \param opacity = opacity of the drawing.
  11583. - \note Clipping is supported.
  11584. - **/
  11585. - CImg& draw_point(const int x0,const int y0,const T *const color,const float opacity=1) {
  11586. - return draw_point(x0,y0,0,color,opacity);
  11587. - }
  11588. -
  11589. - //! Draw a 2D colored line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
  11590. - /**
  11591. - \param x0 = X-coordinate of the starting point of the line.
  11592. - \param y0 = Y-coordinate of the starting point of the line.
  11593. - \param x1 = X-coordinate of the ending point of the line.
  11594. - \param y1 = Y-coordinate of the ending point of the line.
  11595. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11596. - \param pattern = An integer whose bits describes the line pattern.
  11597. - \param opacity = opacity of the drawing.
  11598. - \note Clipping is supported.
  11599. - **/
  11600. - CImg& draw_line(const int x0,const int y0,const int x1,const int y1,
  11601. - const T *const color,const unsigned int pattern=~0L,const float opacity=1) {
  11602. - if (!is_empty()) {
  11603. - if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type());
  11604. - const T* col=color;
  11605. - int nx0 = x0, nx1 = x1, ny0 = y0, ny1 = y1;
  11606. -
  11607. - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1);
  11608. - if (nx1<0 || nx0>=dimx()) return *this;
  11609. - if (nx0<0) { ny0-=nx0*(ny1-ny0)/(nx1-nx0); nx0=0; }
  11610. - if (nx1>=dimx()) { ny1+=(nx1-dimx())*(ny0-ny1)/(nx1-nx0); nx1=dimx()-1;}
  11611. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1);
  11612. - if (ny1<0 || ny0>=dimy()) return *this;
  11613. - if (ny0<0) { nx0-=ny0*(nx1-nx0)/(ny1-ny0); ny0=0; }
  11614. - if (ny1>=dimy()) { nx1+=(ny1-dimy())*(nx0-nx1)/(ny1-ny0); ny1=dimy()-1;}
  11615. -
  11616. - const bool steep = (ny1-ny0)>cimg::abs(nx1-nx0);
  11617. - if (steep) cimg::swap(nx0,ny0,nx1,ny1);
  11618. - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1);
  11619. - const int
  11620. - dx = nx1-nx0, dy = cimg::abs(ny1-ny0),
  11621. - offx = steep?width:1,
  11622. - offy = (ny0<ny1?1:-1)*(steep?1:width);
  11623. -
  11624. - if (opacity>=1) cimg_forV(*this,k) {
  11625. - unsigned int hatch=1;
  11626. - T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k);
  11627. - const T c = *(col++);
  11628. - for (int error=0, x=nx0; x<=nx1; x++) {
  11629. - if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd=c;
  11630. - ptrd+=offx;
  11631. - if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; }
  11632. - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
  11633. - }
  11634. - } else {
  11635. - const float nopacity = cimg::abs(opacity), copacity=1-cimg::max(opacity,0.0f);
  11636. - cimg_forV(*this,k) {
  11637. - unsigned int hatch=1;
  11638. - T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k);
  11639. - const T c = *(col++);
  11640. - for (int error=0, x=nx0; x<=nx1; x++) {
  11641. - if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd = (T)(c*nopacity + copacity*(*ptrd));
  11642. - ptrd+=offx;
  11643. - if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; }
  11644. - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
  11645. - }
  11646. - }
  11647. - }
  11648. - }
  11649. - return *this;
  11650. - }
  11651. -
  11652. - //! Draw a 3D colored line in the instance image, at coordinates (\c x0,\c y0,\c z0)-(\c x1,\c y1,\c z1).
  11653. - /**
  11654. - \param x0 = X-coordinate of the starting point of the line.
  11655. - \param y0 = Y-coordinate of the starting point of the line.
  11656. - \param z0 = Z-coordinate of the starting point of the line.
  11657. - \param x1 = X-coordinate of the ending point of the line.
  11658. - \param y1 = Y-coordinate of the ending point of the line.
  11659. - \param z1 = Z-coordinate of the ending point of the line.
  11660. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11661. - \param pattern = An integer whose bits describes the line pattern.
  11662. - \param opacity = opacity of the drawing.
  11663. - \note Clipping is supported.
  11664. - **/
  11665. - CImg& draw_line(const int x0, const int y0, const int z0, const int x1, const int y1, const int z1,
  11666. - const T *const color, const unsigned int pattern=~0L, const float opacity=1) {
  11667. - if (!is_empty()) {
  11668. - if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type());
  11669. - const T* col=color;
  11670. - unsigned int hatch=1;
  11671. - int nx0 = x0, ny0 = y0, nz0 = z0, nx1 = x1, ny1 = y1, nz1 = z1;
  11672. - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
  11673. - if (nx1<0 || nx0>=dimx()) return *this;
  11674. - if (nx0<0) { const int D=1+nx1-nx0; ny0-=nx0*(1+ny1-ny0)/D; nz0-=nx0*(1+nz1-nz0)/D; nx0=0; }
  11675. - if (nx1>=dimx()) { const int d=nx1-dimx(), D=1+nx1-nx0; ny1+=d*(1+ny0-ny1)/D; nz1+=d*(1+nz0-nz1)/D; nx1=dimx()-1;}
  11676. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
  11677. - if (ny1<0 || ny0>=dimy()) return *this;
  11678. - if (ny0<0) { const int D=1+ny1-ny0; nx0-=ny0*(1+nx1-nx0)/D; nz0-=ny0*(1+nz1-nz0)/D; ny0=0; }
  11679. - if (ny1>=dimy()) { const int d=ny1-dimy(), D=1+ny1-ny0; nx1+=d*(1+nx0-nx1)/D; nz1+=d*(1+nz0-nz1)/D; ny1=dimy()-1;}
  11680. - if (nz0>nz1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1);
  11681. - if (nz1<0 || nz0>=dimz()) return *this;
  11682. - if (nz0<0) { const int D=1+nz1-nz0; nx0-=nz0*(1+nx1-nx0)/D; ny0-=nz0*(1+ny1-ny0)/D; nz0=0; }
  11683. - if (nz1>=dimz()) { const int d=nz1-dimz(), D=1+nz1-nz0; nx1+=d*(1+nx0-nx1)/D; ny1+=d*(1+ny0-ny1)/D; nz1=dimz()-1;}
  11684. - const unsigned int dmax = cimg::max(cimg::abs(nx1-nx0),cimg::abs(ny1-ny0),nz1-nz0), whz = width*height*depth;
  11685. - const float px = (nx1-nx0)/(float)dmax, py = (ny1-ny0)/(float)dmax, pz = (nz1-nz0)/(float)dmax;
  11686. - float x = (float)nx0, y = (float)ny0, z = (float)nz0;
  11687. - if (opacity>=1) for (unsigned int t=0; t<=dmax; t++) {
  11688. - if (!(~pattern) || (~pattern && pattern&hatch)) {
  11689. - T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0);
  11690. - cimg_forV(*this,k) { *ptrd=*(col++); ptrd+=whz; }
  11691. - col-=dim;
  11692. - }
  11693. - x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
  11694. - } else {
  11695. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11696. - for (unsigned int t=0; t<=dmax; t++) {
  11697. - if (!(~pattern) || (~pattern && pattern&hatch)) {
  11698. - T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0);
  11699. - cimg_forV(*this,k) { *ptrd = (T)(*(col++)*nopacity + copacity*(*ptrd)); ptrd+=whz; }
  11700. - col-=dim;
  11701. - }
  11702. - x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
  11703. - }
  11704. - }
  11705. - }
  11706. - return *this;
  11707. - }
  11708. -
  11709. - //! Draw a 2D textured line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
  11710. - /**
  11711. - \param x0 = X-coordinate of the starting point of the line.
  11712. - \param y0 = Y-coordinate of the starting point of the line.
  11713. - \param x1 = X-coordinate of the ending point of the line.
  11714. - \param y1 = Y-coordinate of the ending point of the line.
  11715. - \param texture = a colored texture image used to draw the line color.
  11716. - \param tx0 = X-coordinate of the starting point of the texture.
  11717. - \param ty0 = Y-coordinate of the starting point of the texture.
  11718. - \param tx1 = X-coordinate of the ending point of the texture.
  11719. - \param ty1 = Y-coordinate of the ending point of the texture.
  11720. - \param opacity = opacity of the drawing.
  11721. - \note Clipping is supported, but texture coordinates do not support clipping.
  11722. - **/
  11723. - template<typename t> CImg& draw_line(const int x0,const int y0,const int x1,const int y1,
  11724. - const CImg<t>& texture,
  11725. - const int tx0,const int ty0,const int tx1,const int ty1,
  11726. - const float opacity=1) {
  11727. - if (!is_empty()) {
  11728. - if (texture.is_empty() || texture.dim<dim)
  11729. - throw CImgArgumentException("CImg<%s>::draw_line() : specified texture (%u,%u,%u,%u,%p) has wrong dimensions.",
  11730. - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
  11731. - int nx0=x0, ny0=y0, nx1=x1, ny1=y1, ntx0=tx0, nty0=ty0, ntx1=tx1, nty1=ty1;
  11732. - if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
  11733. - if (nx1<0 || nx0>=dimx()) return *this;
  11734. - if (nx0<0) { const int D=nx1-nx0; ny0-=nx0*(ny1-ny0)/D; ntx0-=nx0*(ntx1-ntx0)/D; nty0-=nx0*(nty1-nty0)/D; nx0=0; }
  11735. - if (nx1>=dimx()) { const int d=nx1-dimx(),D=nx1-nx0; ny1+=d*(ny0-ny1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; nx1=dimx()-1; }
  11736. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
  11737. - if (ny1<0 || ny0>=dimy()) return *this;
  11738. - if (ny0<0) { const int D=ny1-ny0; nx0-=ny0*(nx1-nx0)/D; ntx0-=ny0*(ntx1-ntx0)/D; nty0-=ny0*(nty1-nty0)/D; ny0=0; }
  11739. - if (ny1>=dimy()) { const int d=ny1-dimy(),D=ny1-ny0; nx1+=d*(nx0-nx1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; ny1=dimy()-1; }
  11740. - const unsigned int dmax = (unsigned int)cimg::max(cimg::abs(nx1-nx0),ny1-ny0),
  11741. - whz = width*height*depth, twhz = texture.width*texture.height*texture.depth;
  11742. - const float px = dmax?(nx1-nx0)/(float)dmax:0, py = dmax?(ny1-ny0)/(float)dmax:0,
  11743. - tpx = dmax?(ntx1-ntx0)/(float)dmax:0, tpy = dmax?(nty1-nty0)/(float)dmax:0;
  11744. - float x = (float)nx0, y = (float)ny0, tx = (float)ntx0, ty = (float)nty0;
  11745. - if (opacity>=1) for (unsigned int tt=0; tt<=dmax; tt++) {
  11746. - T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0);
  11747. - const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0);
  11748. - cimg_forV(*this,k) { *ptrd = (T)*ptrs; ptrd+=whz; ptrs+=twhz; }
  11749. - x+=px; y+=py; tx+=tpx; ty+=tpy;
  11750. - } else {
  11751. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11752. - for (unsigned int tt=0; tt<=dmax; tt++) {
  11753. - T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0);
  11754. - const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0);
  11755. - cimg_forV(*this,k) { *ptrd = (T)(nopacity*(*ptrs) + copacity*(*ptrd)); ptrd+=whz; ptrs+=twhz; }
  11756. - x+=px; y+=py; tx+=tpx; ty+=tpy;
  11757. - }
  11758. - }
  11759. - }
  11760. - return *this;
  11761. - }
  11762. -
  11763. - //! Draw a 2D colored arrow in the instance image, at coordinates (\c x0,\c y0)->(\c x1,\c y1).
  11764. - /**
  11765. - \param x0 = X-coordinate of the starting point of the arrow (tail).
  11766. - \param y0 = Y-coordinate of the starting point of the arrow (tail).
  11767. - \param x1 = X-coordinate of the ending point of the arrow (head).
  11768. - \param y1 = Y-coordinate of the ending point of the arrow (head).
  11769. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11770. - \param angle = aperture angle of the arrow head
  11771. - \param length = length of the arrow head. If <0, described as a percentage of the arrow length.
  11772. - \param pattern = An integer whose bits describes the line pattern.
  11773. - \param opacity = opacity of the drawing.
  11774. - \note Clipping is supported.
  11775. - **/
  11776. - CImg& draw_arrow(const int x0,const int y0,const int x1,const int y1,
  11777. - const T *const color,
  11778. - const float angle=30,const float length=-10,const unsigned int pattern=~0L,const float opacity=1) {
  11779. - if (!is_empty()) {
  11780. - const float u = (float)(x0-x1), v = (float)(y0-y1), sq = u*u+v*v,
  11781. - deg = (float)(angle*cimg::PI/180), ang = (sq>0)?(float)std::atan2(v,u):0.0f,
  11782. - l = (length>=0)?length:-length*(float)std::sqrt(sq)/100;
  11783. - if (sq>0) {
  11784. - const double cl = std::cos(ang-deg), sl = std::sin(ang-deg), cr = std::cos(ang+deg), sr = std::sin(ang+deg);
  11785. - const int
  11786. - xl = x1+(int)(l*cl), yl = y1+(int)(l*sl),
  11787. - xr = x1+(int)(l*cr), yr = y1+(int)(l*sr),
  11788. - xc = x1+(int)((l+1)*(cl+cr))/2, yc = y1+(int)((l+1)*(sl+sr))/2;
  11789. - draw_line(x0,y0,xc,yc,color,pattern,opacity).draw_triangle(x1,y1,xl,yl,xr,yr,color,opacity);
  11790. - } else draw_point(x0,y0,color,opacity);
  11791. - }
  11792. - return *this;
  11793. - }
  11794. -
  11795. - //! Draw a sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0).
  11796. - /**
  11797. - \param sprite = sprite image.
  11798. - \param x0 = X-coordinate of the sprite position in the instance image.
  11799. - \param y0 = Y-coordinate of the sprite position in the instance image.
  11800. - \param z0 = Z-coordinate of the sprite position in the instance image.
  11801. - \param v0 = V-coordinate of the sprite position in the instance image.
  11802. - \param opacity = opacity of the drawing.
  11803. - \note Clipping is supported.
  11804. - **/
  11805. - template<typename t> CImg& draw_image(const CImg<t>& sprite,
  11806. - const int x0=0,const int y0=0,const int z0=0,const int v0=0,const float opacity=1) {
  11807. - if (!is_empty()) {
  11808. - if (sprite.is_empty())
  11809. - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
  11810. - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
  11811. - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
  11812. - const int
  11813. - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
  11814. - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
  11815. - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
  11816. - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
  11817. - const t *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+
  11818. - (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0);
  11819. - const unsigned int
  11820. - offX = width-lX, soffX = sprite.width-lX,
  11821. - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
  11822. - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ);
  11823. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11824. - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
  11825. - if (lX>0 && lY>0 && lZ>0 && lV>0)
  11826. - for (int v=0; v<lV; v++) {
  11827. - for (int z=0; z<lZ; z++) {
  11828. - for (int y=0; y<lY; y++) {
  11829. - if (opacity>=1) for (int x=0; x<lX; x++) *(ptrd++) = (T)*(ptrs++);
  11830. - else for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*(*(ptrs++)) + copacity*(*ptrd)); ptrd++; }
  11831. - ptrd+=offX; ptrs+=soffX;
  11832. - }
  11833. - ptrd+=offY; ptrs+=soffY;
  11834. - }
  11835. - ptrd+=offZ; ptrs+=soffZ;
  11836. - }
  11837. - }
  11838. - return *this;
  11839. - }
  11840. -
  11841. -#ifndef cimg_use_visualcpp6
  11842. - CImg& draw_image(const CImg& sprite,const int x0=0,const int y0=0,const int z0=0,const int v0=0,const float opacity=1) {
  11843. - if (!is_empty()) {
  11844. - if (sprite.is_empty())
  11845. - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
  11846. - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
  11847. - if (this==&sprite) return draw_image(CImg<T>(sprite),x0,y0,z0,v0,opacity);
  11848. - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
  11849. - const int
  11850. - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
  11851. - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
  11852. - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
  11853. - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
  11854. - const T *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+
  11855. - (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0);
  11856. - const unsigned int
  11857. - offX = width-lX, soffX = sprite.width-lX,
  11858. - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
  11859. - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ),
  11860. - slX = lX*sizeof(T);
  11861. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11862. - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
  11863. - if (lX>0 && lY>0 && lZ>0 && lV>0)
  11864. - for (int v=0; v<lV; v++) {
  11865. - for (int z=0; z<lZ; z++) {
  11866. - if (opacity>=1) for (int y=0; y<lY; y++) { std::memcpy(ptrd,ptrs,slX); ptrd+=width; ptrs+=sprite.width; }
  11867. - else for (int y=0; y<lY; y++) {
  11868. - for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*(*(ptrs++)) + copacity*(*ptrd)); ptrd++; }
  11869. - ptrd+=offX; ptrs+=soffX;
  11870. - }
  11871. - ptrd+=offY; ptrs+=soffY;
  11872. - }
  11873. - ptrd+=offZ; ptrs+=soffZ;
  11874. - }
  11875. - }
  11876. - return *this;
  11877. - }
  11878. -#endif
  11879. -
  11880. - //! Draw a masked sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0).
  11881. - /**
  11882. - \param sprite = sprite image.
  11883. - \param mask = mask image.
  11884. - \param x0 = X-coordinate of the sprite position in the instance image.
  11885. - \param y0 = Y-coordinate of the sprite position in the instance image.
  11886. - \param z0 = Z-coordinate of the sprite position in the instance image.
  11887. - \param v0 = V-coordinate of the sprite position in the instance image.
  11888. - \param mask_valmax = Maximum pixel value of the mask image \c mask.
  11889. - \param opacity = opacity of the drawing.
  11890. - \note Pixel values of \c mask set the opacity of the corresponding pixels in \c sprite.
  11891. - \note Clipping is supported.
  11892. - \note Dimensions along x,y and z of \c sprite and \c mask must be the same.
  11893. - **/
  11894. - template<typename ti,typename tm> CImg& draw_image(const CImg<ti>& sprite, const CImg<tm>& mask,
  11895. - const int x0=0, const int y0=0, const int z0=0, const int v0=0,
  11896. - const tm mask_valmax='\1', const float opacity=1) {
  11897. - if (!is_empty()) {
  11898. - if (sprite.is_empty())
  11899. - throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.",
  11900. - pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data);
  11901. - if (mask.is_empty())
  11902. - throw CImgArgumentException("CImg<%s>::draw_image() : Specified mask image (%u,%u,%u,%u,%p) is empty.",
  11903. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
  11904. - if ((void*)this==(void*)&sprite) return draw_image(CImg<T>(sprite),mask,x0,y0,z0,v0);
  11905. - if(mask.width!=sprite.width || mask.height!=sprite.height || mask.depth!=sprite.depth)
  11906. - throw CImgArgumentException("CImg<%s>::draw_image() : Mask dimension is (%u,%u,%u,%u), while sprite is (%u,%u,%u,%u)",
  11907. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,sprite.width,sprite.height,sprite.depth,sprite.dim);
  11908. - const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0);
  11909. - const int
  11910. - lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0),
  11911. - lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0),
  11912. - lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0),
  11913. - lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0);
  11914. - const int coff = -(bx?x0:0)-(by?y0*mask.dimx():0)-(bz?z0*mask.dimx()*mask.dimy():0)-
  11915. - (bv?v0*mask.dimx()*mask.dimy()*mask.dimz():0),
  11916. - ssize = mask.dimx()*mask.dimy()*mask.dimz();
  11917. - const ti *ptrs = sprite.ptr() + coff;
  11918. - const tm *ptrm = mask.ptr() + coff;
  11919. - const unsigned int
  11920. - offX = width-lX, soffX = sprite.width-lX,
  11921. - offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY),
  11922. - offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ);
  11923. - T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0);
  11924. - if (lX>0 && lY>0 && lZ>0 && lV>0)
  11925. - for (int v=0; v<lV; v++) {
  11926. - ptrm = mask.data + (ptrm - mask.data)%ssize;
  11927. - for (int z=0; z<lZ; z++) {
  11928. - for (int y=0; y<lY; y++) {
  11929. - for (int x=0; x<lX; x++) {
  11930. - const float mopacity = *(ptrm++)*opacity,
  11931. - nopacity = cimg::abs(mopacity), copacity = mask_valmax-cimg::max(mopacity,0.0f);
  11932. - *ptrd = (T)((nopacity*(*(ptrs++))+copacity*(*ptrd))/mask_valmax);
  11933. - ptrd++;
  11934. - }
  11935. - ptrd+=offX; ptrs+=soffX; ptrm+=soffX;
  11936. - }
  11937. - ptrd+=offY; ptrs+=soffY; ptrm+=soffY;
  11938. - }
  11939. - ptrd+=offZ; ptrs+=soffZ; ptrm+=soffZ;
  11940. - }
  11941. - }
  11942. - return *this;
  11943. - }
  11944. -
  11945. - //! Draw a 4D filled rectangle in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0)-(\c x1,\c y1,\c z1,\c v1).
  11946. - /**
  11947. - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
  11948. - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
  11949. - \param z0 = Z-coordinate of the upper-left rectangle corner in the instance image.
  11950. - \param v0 = V-coordinate of the upper-left rectangle corner in the instance image.
  11951. - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
  11952. - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
  11953. - \param z1 = Z-coordinate of the lower-right rectangle corner in the instance image.
  11954. - \param v1 = V-coordinate of the lower-right rectangle corner in the instance image.
  11955. - \param val = scalar value used to fill the rectangle area.
  11956. - \param opacity = opacity of the drawing.
  11957. - \note Clipping is supported.
  11958. - **/
  11959. - CImg& draw_rectangle(const int x0,const int y0,const int z0,const int v0,
  11960. - const int x1,const int y1,const int z1,const int v1,
  11961. - const T& val,const float opacity=1.0f) {
  11962. - if (!is_empty()) {
  11963. - const bool bx=(x0<x1), by=(y0<y1), bz=(z0<z1), bv=(v0<v1);
  11964. - const int nx0=bx?x0:x1, nx1=bx?x1:x0, ny0=by?y0:y1, ny1=by?y1:y0, nz0=bz?z0:z1, nz1=bz?z1:z0, nv0=bv?v0:v1, nv1=bv?v1:v0;
  11965. - const int
  11966. - lX = (1+nx1-nx0) + (nx1>=dimx()?dimx()-1-nx1:0) + (nx0<0?nx0:0),
  11967. - lY = (1+ny1-ny0) + (ny1>=dimy()?dimy()-1-ny1:0) + (ny0<0?ny0:0),
  11968. - lZ = (1+nz1-nz0) + (nz1>=dimz()?dimz()-1-nz1:0) + (nz0<0?nz0:0),
  11969. - lV = (1+nv1-nv0) + (nv1>=dimv()?dimv()-1-nv1:0) + (nv0<0?nv0:0);
  11970. - const unsigned int offX = width-lX, offY = width*(height-lY), offZ = width*height*(depth-lZ);
  11971. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  11972. - T *ptrd = ptr(nx0<0?0:nx0,ny0<0?0:ny0,nz0<0?0:nz0,nv0<0?0:nv0);
  11973. - if (lX>0 && lY>0 && lZ>0 && lV>0)
  11974. - for (int v=0; v<lV; v++) {
  11975. - for (int z=0; z<lZ; z++) {
  11976. - for (int y=0; y<lY; y++) {
  11977. - if (opacity>=1) {
  11978. - if (sizeof(T)!=1) { for (int x=0; x<lX; x++) *(ptrd++) = val; ptrd+=offX; }
  11979. - else { std::memset(ptrd,(int)val,lX); ptrd+=width; }
  11980. - } else { for (int x=0; x<lX; x++) { *ptrd = (T)(nopacity*val+copacity*(*ptrd)); ptrd++; } ptrd+=offX; }
  11981. - }
  11982. - ptrd+=offY;
  11983. - }
  11984. - ptrd+=offZ;
  11985. - }
  11986. - }
  11987. - return *this;
  11988. - }
  11989. -
  11990. - //! Draw a 3D filled colored rectangle in the instance image, at coordinates (\c x0,\c y0,\c z0)-(\c x1,\c y1,\c z1).
  11991. - /**
  11992. - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
  11993. - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
  11994. - \param z0 = Z-coordinate of the upper-left rectangle corner in the instance image.
  11995. - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
  11996. - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
  11997. - \param z1 = Z-coordinate of the lower-right rectangle corner in the instance image.
  11998. - \param color = array of dimv() values of type \c T, defining the drawing color.
  11999. - \param opacity = opacity of the drawing.
  12000. - \note Clipping is supported.
  12001. - **/
  12002. - CImg& draw_rectangle(const int x0,const int y0,const int z0,
  12003. - const int x1,const int y1,const int z1,
  12004. - const T *const color,const float opacity=1) {
  12005. - if (!color) throw CImgArgumentException("CImg<%s>::draw_rectangle : specified color is (null)",pixel_type());
  12006. - cimg_forV(*this,k) draw_rectangle(x0,y0,z0,k,x1,y1,z1,k,color[k],opacity);
  12007. - return *this;
  12008. - }
  12009. -
  12010. - //! Draw a 2D filled colored rectangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1).
  12011. - /**
  12012. - \param x0 = X-coordinate of the upper-left rectangle corner in the instance image.
  12013. - \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image.
  12014. - \param x1 = X-coordinate of the lower-right rectangle corner in the instance image.
  12015. - \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image.
  12016. - \param color = array of dimv() values of type \c T, defining the drawing color.
  12017. - \param opacity = opacity of the drawing.
  12018. - \note Clipping is supported.
  12019. - **/
  12020. - CImg& draw_rectangle(const int x0,const int y0,const int x1,const int y1,
  12021. - const T *const color,const float opacity=1) {
  12022. - draw_rectangle(x0,y0,0,x1,y1,depth-1,color,opacity);
  12023. - return *this;
  12024. - }
  12025. -
  12026. - //! Draw a 2D filled colored triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12027. - /**
  12028. - \param x0 = X-coordinate of the first corner in the instance image.
  12029. - \param y0 = Y-coordinate of the first corner in the instance image.
  12030. - \param x1 = X-coordinate of the second corner in the instance image.
  12031. - \param y1 = Y-coordinate of the second corner in the instance image.
  12032. - \param x2 = X-coordinate of the third corner in the instance image.
  12033. - \param y2 = Y-coordinate of the third corner in the instance image.
  12034. - \param color = array of dimv() values of type \c T, defining the drawing color.
  12035. - \param opacity = opacity of the drawing (<1)
  12036. - \param brightness = brightness of the drawing (in [0,1])
  12037. - \note Clipping is supported.
  12038. - **/
  12039. - CImg& draw_triangle(const int x0,const int y0,
  12040. - const int x1,const int y1,
  12041. - const int x2,const int y2,
  12042. - const T *const color,
  12043. - const float opacity=1,
  12044. - const float brightness=1) {
  12045. - draw_scanline(color,opacity);
  12046. - int nx0 = x0, ny0 = y0, nx1 = x1, ny1 = y1, nx2 = x2, ny2 = y2;
  12047. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1);
  12048. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2);
  12049. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2);
  12050. - if (ny0>=dimy() || ny2<0) return *this;
  12051. - const float
  12052. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12053. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12054. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1);
  12055. - float xleft = (float)nx0, xright = xleft, pleft = (p1<p2)?p1:p2, pright = (p1<p2)?p2:p1;
  12056. - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; }
  12057. - const int ya = ny1>dimy()?height:ny1;
  12058. - for (int y=ny0<0?0:ny0; y<ya; y++) {
  12059. - draw_scanline((int)xleft,(int)xright,y,color,opacity,brightness);
  12060. - xleft+=pleft; xright+=pright;
  12061. - }
  12062. - if (p1<p2) { xleft=(float)nx1; pleft=p3; if (ny1<0) xleft-=ny1*pleft; }
  12063. - else { xright=(float)nx1; pright=p3; if (ny1<0) xright-=ny1*pright; }
  12064. - const int yb = ny2>=dimy()?height-1:ny2;
  12065. - for (int yy=ny1<0?0:ny1; yy<=yb; yy++) {
  12066. - draw_scanline((int)xleft,(int)xright,yy,color,opacity,brightness);
  12067. - xleft+=pleft; xright+=pright;
  12068. - }
  12069. - return *this;
  12070. - }
  12071. -
  12072. - //! Draw a 2D Gouraud-filled triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12073. - /**
  12074. - \param x0 = X-coordinate of the first corner in the instance image.
  12075. - \param y0 = Y-coordinate of the first corner in the instance image.
  12076. - \param x1 = X-coordinate of the second corner in the instance image.
  12077. - \param y1 = Y-coordinate of the second corner in the instance image.
  12078. - \param x2 = X-coordinate of the third corner in the instance image.
  12079. - \param y2 = Y-coordinate of the third corner in the instance image.
  12080. - \param color = array of dimv() values of type \c T, defining the global drawing color.
  12081. - \param c0 = brightness of the first corner.
  12082. - \param c1 = brightness of the second corner.
  12083. - \param c2 = brightness of the third corner.
  12084. - \param opacity = opacity of the drawing.
  12085. - \note Clipping is supported.
  12086. - **/
  12087. - CImg& draw_triangle(const int x0, const int y0,
  12088. - const int x1, const int y1,
  12089. - const int x2, const int y2,
  12090. - const T *const color,
  12091. - const float c0, const float c1, const float c2,
  12092. - const float opacity=1) {
  12093. - if (!is_empty()) {
  12094. - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,whz=width*height*depth;
  12095. - float nc0=c0,nc1=c1,nc2=c2;
  12096. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nc0,nc1);
  12097. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nc0,nc2);
  12098. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nc1,nc2);
  12099. - if (ny0>=dimy() || ny2<0) return *this;
  12100. - const float
  12101. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12102. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12103. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
  12104. - cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0,
  12105. - cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0,
  12106. - cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0;
  12107. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  12108. - float pleft,pright,cpleft,cpright,xleft=(float)nx0,xright=xleft,cleft=nc0,cright=cleft;
  12109. - if (p1<p2) { pleft=p1; pright=p2; cpleft=cp1; cpright=cp2; }
  12110. - else { pleft=p2; pright=p1; cpleft=cp2; cpright=cp1; }
  12111. - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; cleft-=ny0*cpleft; cright-=ny0*cpright; }
  12112. - const int ya = ny1<dimy()?ny1:height;
  12113. - for (int y=(ny0<0?0:ny0); y<ya; y++) {
  12114. - const int dx = (int)xright-(int)xleft;
  12115. - const float
  12116. - cp = dx?(cright-cleft)/dx:0,
  12117. - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
  12118. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12119. - if (xmin<=xmax) {
  12120. - const int offx=whz-xmax+xmin-1;
  12121. - T* ptrd = ptr(xmin,y,0,0);
  12122. - if (opacity>=1) cimg_forV(*this,k) {
  12123. - const T col = color[k];
  12124. - float c=ci;
  12125. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; }
  12126. - ptrd+=offx;
  12127. - } else cimg_forV(*this,k) {
  12128. - const T col = color[k];
  12129. - float c=ci;
  12130. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; }
  12131. - ptrd+=offx;
  12132. - }
  12133. - }
  12134. - xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright;
  12135. - }
  12136. -
  12137. - if (p1<p2) {
  12138. - xleft=(float)nx1; pleft=p3; cleft=nc1; cpleft=cp3;
  12139. - if (ny1<0) { xleft-=ny1*pleft; cleft-=ny1*cpleft; }
  12140. - } else {
  12141. - xright=(float)nx1; pright=p3; cright=nc1; cpright=cp3;
  12142. - if (ny1<0) { xright-=ny1*pright; cright-=ny1*cpright; }
  12143. - }
  12144. - const int yb = ny2>=dimy()?(height-1):ny2;
  12145. - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
  12146. - const int dx = (int)xright-(int)xleft;
  12147. - const float
  12148. - cp = dx?(cright-cleft)/dx:0,
  12149. - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
  12150. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12151. - if (xmin<=xmax) {
  12152. - const int offx=whz-xmax+xmin-1;
  12153. - T* ptrd = ptr(xmin,yy,0,0);
  12154. - if (opacity>=1) cimg_forV(*this,k) {
  12155. - const T col = color[k];
  12156. - float c=ci;
  12157. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; }
  12158. - ptrd+=offx;
  12159. - } else cimg_forV(*this,k) {
  12160. - const T col = color[k];
  12161. - float c=ci;
  12162. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; }
  12163. - ptrd+=offx;
  12164. - }
  12165. - }
  12166. - xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright;
  12167. - }
  12168. - }
  12169. - return *this;
  12170. - }
  12171. -
  12172. - //! Draw a 2D phong-shaded triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12173. - /**
  12174. - \param x0 = X-coordinate of the first corner in the instance image.
  12175. - \param y0 = Y-coordinate of the first corner in the instance image.
  12176. - \param x1 = X-coordinate of the second corner in the instance image.
  12177. - \param y1 = Y-coordinate of the second corner in the instance image.
  12178. - \param x2 = X-coordinate of the third corner in the instance image.
  12179. - \param y2 = Y-coordinate of the third corner in the instance image.
  12180. - \param color = array of dimv() values of type \c T, defining the global drawing color.
  12181. - \param light = light image.
  12182. - \param lx0 = X-coordinate of the first corner in the light image.
  12183. - \param ly0 = Y-coordinate of the first corner in the light image.
  12184. - \param lx1 = X-coordinate of the second corner in the light image.
  12185. - \param ly1 = Y-coordinate of the second corner in the light image.
  12186. - \param lx2 = X-coordinate of the third corner in the light image.
  12187. - \param ly2 = Y-coordinate of the third corner in the light image.
  12188. - \param opacity = opacity of the drawing.
  12189. - \note Clipping is supported, but texture coordinates do not support clipping.
  12190. - **/
  12191. - template<typename t> CImg& draw_triangle(const int x0,const int y0,
  12192. - const int x1,const int y1,
  12193. - const int x2,const int y2,
  12194. - const T *const color,
  12195. - const CImg<t>& light,
  12196. - const int lx0,const int ly0,
  12197. - const int lx1,const int ly1,
  12198. - const int lx2,const int ly2,
  12199. - const float opacity=1.0f) {
  12200. - if (!is_empty()) {
  12201. - if (light.is_empty())
  12202. - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light texture (%u,%u,%u,%u,%p) is empty.",
  12203. - pixel_type(),light.width,light.height,light.depth,light.dim,light.data);
  12204. - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2,whz=width*height*depth;
  12205. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nlx0,nlx1,nly0,nly1);
  12206. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nlx0,nlx2,nly0,nly2);
  12207. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nlx1,nlx2,nly1,nly2);
  12208. - if (ny0>=dimy() || ny2<0) return *this;
  12209. - const float
  12210. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12211. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12212. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
  12213. - lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0,
  12214. - lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0,
  12215. - lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0,
  12216. - lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0,
  12217. - lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0,
  12218. - lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0;
  12219. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  12220. - float pleft,pright,lpxleft,lpyleft,lpxright,lpyright,
  12221. - xleft=(float)nx0,xright=xleft,lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft;
  12222. - if (p1<p2) { pleft=p1; pright=p2; lpxleft=lpx1; lpyleft=lpy1; lpxright=lpx2; lpyright=lpy2; }
  12223. - else { pleft=p2; pright=p1; lpxleft=lpx2; lpyleft=lpy2; lpxright=lpx1; lpyright=lpy1; }
  12224. - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; lxleft-=ny0*lpxleft; lyleft-=ny0*lpyleft;
  12225. - lxright-=ny0*lpxright; lyright-=ny0*lpyright; }
  12226. - const int ya = ny1<dimy()?ny1:height;
  12227. - for (int y=(ny0<0?0:ny0); y<ya; y++) {
  12228. - const int dx = (int)xright-(int)xleft;
  12229. - const float
  12230. - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
  12231. - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
  12232. - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
  12233. - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
  12234. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12235. - if (xmin<=xmax) {
  12236. - const int offx=whz-xmax+xmin-1;
  12237. - T* ptrd = ptr(xmin,y,0,0);
  12238. - if (opacity>=1) cimg_forV(*this,k) {
  12239. - float lx=lxi, ly=lyi;
  12240. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; }
  12241. - ptrd+=offx;
  12242. - } else cimg_forV(*this,k) {
  12243. - float lx=lxi, ly=lyi;
  12244. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; }
  12245. - ptrd+=offx;
  12246. - }
  12247. - }
  12248. - xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
  12249. - }
  12250. -
  12251. - if (p1<p2) {
  12252. - xleft=(float)nx1; pleft=p3; lxleft=(float)nlx1; lyleft=(float)nly1; lpxleft=lpx3; lpyleft=lpy3;
  12253. - if (ny1<0) { xleft-=ny1*pleft; lxleft-=ny1*lpxleft; lyleft-=ny1*lpyleft; }
  12254. - } else {
  12255. - xright=(float)nx1; pright=p3; lxright=(float)nlx1; lyright=(float)nly1; lpxright=lpx3; lpyright=lpy3;
  12256. - if (ny1<0) { xright-=ny1*pright; lxright-=ny1*lpxright; lyright-=ny1*lpyright; }
  12257. - }
  12258. - const int yb = ny2>=dimy()?(height-1):ny2;
  12259. - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
  12260. - const int dx = (int)xright-(int)xleft;
  12261. - const float
  12262. - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
  12263. - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
  12264. - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
  12265. - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
  12266. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12267. - if (xmin<=xmax) {
  12268. - const int offx=whz-xmax+xmin-1;
  12269. - T* ptrd = ptr(xmin,yy,0,0);
  12270. - if (opacity>=1) cimg_forV(*this,k) {
  12271. - float lx=lxi, ly=lyi;
  12272. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; }
  12273. - ptrd+=offx;
  12274. - } else cimg_forV(*this,k) {
  12275. - float lx=lxi, ly=lyi;
  12276. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; }
  12277. - ptrd+=offx;
  12278. - }
  12279. - }
  12280. - xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
  12281. - }
  12282. - }
  12283. - return *this;
  12284. - }
  12285. -
  12286. - //! Draw a 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12287. - /**
  12288. - \param x0 = X-coordinate of the first corner in the instance image.
  12289. - \param y0 = Y-coordinate of the first corner in the instance image.
  12290. - \param x1 = X-coordinate of the second corner in the instance image.
  12291. - \param y1 = Y-coordinate of the second corner in the instance image.
  12292. - \param x2 = X-coordinate of the third corner in the instance image.
  12293. - \param y2 = Y-coordinate of the third corner in the instance image.
  12294. - \param texture = texture image used to fill the triangle.
  12295. - \param tx0 = X-coordinate of the first corner in the texture image.
  12296. - \param ty0 = Y-coordinate of the first corner in the texture image.
  12297. - \param tx1 = X-coordinate of the second corner in the texture image.
  12298. - \param ty1 = Y-coordinate of the second corner in the texture image.
  12299. - \param tx2 = X-coordinate of the third corner in the texture image.
  12300. - \param ty2 = Y-coordinate of the third corner in the texture image.
  12301. - \param opacity = opacity of the drawing.
  12302. - \param brightness = brightness of the drawing.
  12303. - \note Clipping is supported, but texture coordinates do not support clipping.
  12304. - **/
  12305. - template<typename t> CImg& draw_triangle(const int x0,const int y0,
  12306. - const int x1,const int y1,
  12307. - const int x2,const int y2,
  12308. - const CImg<t>& texture,
  12309. - const int tx0,const int ty0,
  12310. - const int tx1,const int ty1,
  12311. - const int tx2,const int ty2,
  12312. - const float opacity=1.0f, const float brightness=1.0f) {
  12313. - if (!is_empty()) {
  12314. - if (texture.is_empty())
  12315. - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
  12316. - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
  12317. - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth;
  12318. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1);
  12319. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2);
  12320. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2);
  12321. - if (ny0>=dimy() || ny2<0) return *this;
  12322. - const float
  12323. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12324. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12325. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
  12326. - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
  12327. - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
  12328. - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
  12329. - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
  12330. - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
  12331. - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0;
  12332. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  12333. - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,
  12334. - xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft;
  12335. - if (p1<p2) { pleft=p1; pright=p2; tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2; }
  12336. - else { pleft=p2; pright=p1; tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1; }
  12337. - if (ny0<0) { xleft-=ny0*pleft; xright-=ny0*pright; txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft;
  12338. - txright-=ny0*tpxright; tyright-=ny0*tpyright; }
  12339. - const int ya = ny1<dimy()?ny1:height;
  12340. - for (int y=(ny0<0?0:ny0); y<ya; y++) {
  12341. - const int dx = (int)xright-(int)xleft;
  12342. - const float
  12343. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12344. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12345. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12346. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy));
  12347. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12348. - if (xmin<=xmax) {
  12349. - const int offx=whz-xmax+xmin-1;
  12350. - T* ptrd = ptr(xmin,y,0,0);
  12351. - if (opacity>=1) cimg_forV(*this,k) {
  12352. - float tx=txi, ty=tyi;
  12353. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; }
  12354. - ptrd+=offx;
  12355. - } else cimg_forV(*this,k) {
  12356. - float tx=txi, ty=tyi;
  12357. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; }
  12358. - ptrd+=offx;
  12359. - }
  12360. - }
  12361. - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
  12362. - }
  12363. -
  12364. - if (p1<p2) {
  12365. - xleft=(float)nx1; pleft=p3; txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3;
  12366. - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; }
  12367. - } else {
  12368. - xright=(float)nx1; pright=p3; txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3;
  12369. - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; }
  12370. - }
  12371. - const int yb = ny2>=dimy()?(height-1):ny2;
  12372. - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
  12373. - const int dx = (int)xright-(int)xleft;
  12374. - const float
  12375. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12376. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12377. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12378. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy));
  12379. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12380. - if (xmin<=xmax) {
  12381. - const int offx=whz-xmax+xmin-1;
  12382. - T* ptrd = ptr(xmin,yy,0,0);
  12383. - if (opacity>=1) cimg_forV(*this,k) {
  12384. - float tx=txi, ty=tyi;
  12385. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; }
  12386. - ptrd+=offx;
  12387. - } else cimg_forV(*this,k) {
  12388. - float tx=txi, ty=tyi;
  12389. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; }
  12390. - ptrd+=offx;
  12391. - }
  12392. - }
  12393. - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
  12394. - }
  12395. - }
  12396. - return *this;
  12397. - }
  12398. -
  12399. - //! Draw a 2D textured triangle with Gouraud-Shading in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12400. - /**
  12401. - \param x0 = X-coordinate of the first corner in the instance image.
  12402. - \param y0 = Y-coordinate of the first corner in the instance image.
  12403. - \param x1 = X-coordinate of the second corner in the instance image.
  12404. - \param y1 = Y-coordinate of the second corner in the instance image.
  12405. - \param x2 = X-coordinate of the third corner in the instance image.
  12406. - \param y2 = Y-coordinate of the third corner in the instance image.
  12407. - \param texture = texture image used to fill the triangle.
  12408. - \param tx0 = X-coordinate of the first corner in the texture image.
  12409. - \param ty0 = Y-coordinate of the first corner in the texture image.
  12410. - \param tx1 = X-coordinate of the second corner in the texture image.
  12411. - \param ty1 = Y-coordinate of the second corner in the texture image.
  12412. - \param tx2 = X-coordinate of the third corner in the texture image.
  12413. - \param ty2 = Y-coordinate of the third corner in the texture image.
  12414. - \param c0 = brightness value of the first corner.
  12415. - \param c1 = brightness value of the second corner.
  12416. - \param c2 = brightness value of the third corner.
  12417. - \param opacity = opacity of the drawing.
  12418. - \note Clipping is supported, but texture coordinates do not support clipping.
  12419. - **/
  12420. - template<typename t> CImg& draw_triangle(const int x0,const int y0,
  12421. - const int x1,const int y1,
  12422. - const int x2,const int y2,
  12423. - const CImg<t>& texture,
  12424. - const int tx0,const int ty0,
  12425. - const int tx1,const int ty1,
  12426. - const int tx2,const int ty2,
  12427. - const float c0,const float c1,const float c2,
  12428. - const float opacity=1) {
  12429. - if (!is_empty()) {
  12430. - if (texture.is_empty())
  12431. - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
  12432. - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
  12433. - int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth;
  12434. - float nc0=c0,nc1=c1,nc2=c2;
  12435. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nc0,nc1);
  12436. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nc0,nc2);
  12437. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nc1,nc2);
  12438. - if (ny0>=dimy() || ny2<0) return *this;
  12439. - const float
  12440. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12441. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12442. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
  12443. - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
  12444. - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
  12445. - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
  12446. - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
  12447. - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
  12448. - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0,
  12449. - cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0,
  12450. - cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0,
  12451. - cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0;
  12452. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  12453. - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,cpleft,cpright,
  12454. - xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft,cleft=nc0,cright=cleft;
  12455. - if (p1<p2) { pleft=p1; pright=p2; tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2; cpleft=cp1; cpright=cp2; }
  12456. - else { pleft=p2; pright=p1; tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1; cpleft=cp2, cpright=cp1; }
  12457. - if (ny0<0) {
  12458. - xleft-=ny0*pleft; xright-=ny0*pright; txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft; cleft-=ny0*cpleft;
  12459. - txright-=ny0*tpxright; tyright-=ny0*tpyright; cright-=ny0*cpright;
  12460. - }
  12461. - const int ya = ny1<dimy()?ny1:height;
  12462. - for (int y=(ny0<0?0:ny0); y<ya; y++) {
  12463. - const int dx = (int)xright-(int)xleft;
  12464. - const float
  12465. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12466. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12467. - cp = dx?(cright-cleft)/dx:0,
  12468. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12469. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
  12470. - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
  12471. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12472. - if (xmin<=xmax) {
  12473. - const int offx=whz-xmax+xmin-1;
  12474. - T* ptrd = ptr(xmin,y,0,0);
  12475. - if (opacity>=1) cimg_forV(*this,k) {
  12476. - float tx=txi, ty=tyi, c=ci;
  12477. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; }
  12478. - ptrd+=offx;
  12479. - } else cimg_forV(*this,k) {
  12480. - float tx=txi, ty=tyi, c=ci;
  12481. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=cp; }
  12482. - ptrd+=offx;
  12483. - }
  12484. - }
  12485. - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright;
  12486. - }
  12487. -
  12488. - if (p1<p2) {
  12489. - xleft=(float)nx1; pleft=p3; txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3; cleft=nc1; cpleft=cp3;
  12490. - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; cleft-=ny1*cpleft; }
  12491. - } else {
  12492. - xright=(float)nx1; pright=p3; txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3; cright=nc1; cpright=cp3;
  12493. - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; cright-=ny1*cpright; }
  12494. - }
  12495. - const int yb = ny2>=dimy()?(height-1):ny2;
  12496. - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
  12497. - const int dx = (int)xright-(int)xleft;
  12498. - const float
  12499. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12500. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12501. - cp = dx?(cright-cleft)/dx:0,
  12502. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12503. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
  12504. - ci = (xleft>=0)?cleft:(cleft-xleft*cp);
  12505. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12506. - if (xmin<=xmax) {
  12507. - const int offx=whz-xmax+xmin-1;
  12508. - T* ptrd = ptr(xmin,yy,0,0);
  12509. - if (opacity>=1) cimg_forV(*this,k) {
  12510. - float tx=txi, ty=tyi, c=ci;
  12511. - for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; }
  12512. - ptrd+=offx;
  12513. - } else cimg_forV(*this,k) {
  12514. - float tx=txi, ty=tyi, c=ci;
  12515. - for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=ci; }
  12516. - ptrd+=offx;
  12517. - }
  12518. - }
  12519. - xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright;
  12520. - }
  12521. - }
  12522. - return *this;
  12523. - }
  12524. -
  12525. - //! Draw a phong-shaded 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2).
  12526. - /**
  12527. - \param x0 = X-coordinate of the first corner in the instance image.
  12528. - \param y0 = Y-coordinate of the first corner in the instance image.
  12529. - \param x1 = X-coordinate of the second corner in the instance image.
  12530. - \param y1 = Y-coordinate of the second corner in the instance image.
  12531. - \param x2 = X-coordinate of the third corner in the instance image.
  12532. - \param y2 = Y-coordinate of the third corner in the instance image.
  12533. - \param texture = texture image used to fill the triangle.
  12534. - \param tx0 = X-coordinate of the first corner in the texture image.
  12535. - \param ty0 = Y-coordinate of the first corner in the texture image.
  12536. - \param tx1 = X-coordinate of the second corner in the texture image.
  12537. - \param ty1 = Y-coordinate of the second corner in the texture image.
  12538. - \param tx2 = X-coordinate of the third corner in the texture image.
  12539. - \param ty2 = Y-coordinate of the third corner in the texture image.
  12540. - \param light = light image.
  12541. - \param lx0 = X-coordinate of the first corner in the light image.
  12542. - \param ly0 = Y-coordinate of the first corner in the light image.
  12543. - \param lx1 = X-coordinate of the second corner in the light image.
  12544. - \param ly1 = Y-coordinate of the second corner in the light image.
  12545. - \param lx2 = X-coordinate of the third corner in the light image.
  12546. - \param ly2 = Y-coordinate of the third corner in the light image.
  12547. - \param opacity = opacity of the drawing.
  12548. - \note Clipping is supported, but texture coordinates do not support clipping.
  12549. - **/
  12550. - template<typename t, typename tl> CImg& draw_triangle(const int x0,const int y0,
  12551. - const int x1,const int y1,
  12552. - const int x2,const int y2,
  12553. - const CImg<t>& texture,
  12554. - const int tx0,const int ty0,
  12555. - const int tx1,const int ty1,
  12556. - const int tx2,const int ty2,
  12557. - const CImg<tl>& light,
  12558. - const int lx0,const int ly0,
  12559. - const int lx1,const int ly1,
  12560. - const int lx2,const int ly2,
  12561. - const float opacity=1.0f) {
  12562. - if (!is_empty()) {
  12563. - if (texture.is_empty())
  12564. - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.",
  12565. - pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data);
  12566. - if (light.is_empty())
  12567. - throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light (%u,%u,%u,%u,%p) is empty.",
  12568. - pixel_type(),light.width,light.height,light.depth,light.dim,light.data);
  12569. - int
  12570. - nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,
  12571. - ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,
  12572. - nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2,
  12573. - whz=width*height*depth;
  12574. - if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nlx0,nlx1,nly0,nly1);
  12575. - if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nlx0,nlx2,nly0,nly2);
  12576. - if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nlx1,nlx2,nly1,nly2);
  12577. - if (ny0>=dimy() || ny2<0) return *this;
  12578. - const float
  12579. - p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0),
  12580. - p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0),
  12581. - p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1),
  12582. - tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0,
  12583. - tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0,
  12584. - tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0,
  12585. - tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0,
  12586. - tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0,
  12587. - tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0,
  12588. - lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0,
  12589. - lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0,
  12590. - lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0,
  12591. - lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0,
  12592. - lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0,
  12593. - lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0;
  12594. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  12595. - float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,lpxleft,lpyleft,lpxright,lpyright,
  12596. - xleft=(float)nx0,xright=xleft,
  12597. - txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft,
  12598. - lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft;
  12599. - if (p1<p2) {
  12600. - pleft=p1; pright=p2;
  12601. - tpxleft=tpx1; tpyleft=tpy1; tpxright=tpx2; tpyright=tpy2;
  12602. - lpxleft=lpx1; lpyleft=lpy1; lpxright=lpx2; lpyright=lpy2;
  12603. - } else {
  12604. - pleft=p2; pright=p1;
  12605. - tpxleft=tpx2; tpyleft=tpy2; tpxright=tpx1; tpyright=tpy1;
  12606. - lpxleft=tpx2; lpyleft=tpy2; lpxright=tpx1; lpyright=tpy1;
  12607. - }
  12608. - if (ny0<0) {
  12609. - xleft-=ny0*pleft; xright-=ny0*pright;
  12610. - txleft-=ny0*tpxleft; tyleft-=ny0*tpyleft; txright-=ny0*tpxright; tyright-=ny0*tpyright;
  12611. - lxleft-=ny0*lpxleft; lyleft-=ny0*lpyleft; lxright-=ny0*lpxright; lyright-=ny0*lpyright;
  12612. - }
  12613. - const int ya = ny1<dimy()?ny1:height;
  12614. - for (int y=(ny0<0?0:ny0); y<ya; y++) {
  12615. - const int dx = (int)xright-(int)xleft;
  12616. - const float
  12617. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12618. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12619. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12620. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
  12621. - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
  12622. - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
  12623. - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
  12624. - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
  12625. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12626. - if (xmin<=xmax) {
  12627. - const int offx=whz-xmax+xmin-1;
  12628. - T* ptrd = ptr(xmin,y,0,0);
  12629. - if (opacity>=1) cimg_forV(*this,k) {
  12630. - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
  12631. - for (int x=xmin; x<=xmax; x++) {
  12632. - *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k));
  12633. - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
  12634. - }
  12635. - ptrd+=offx;
  12636. - } else cimg_forV(*this,k) {
  12637. - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
  12638. - for (int x=xmin; x<=xmax; x++) {
  12639. - *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++;
  12640. - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
  12641. - }
  12642. - ptrd+=offx;
  12643. - }
  12644. - }
  12645. - xleft+=pleft; xright+=pright;
  12646. - txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
  12647. - lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
  12648. - }
  12649. -
  12650. - if (p1<p2) {
  12651. - xleft=(float)nx1; pleft=p3;
  12652. - txleft=(float)ntx1; tyleft=(float)nty1; tpxleft=tpx3; tpyleft=tpy3;
  12653. - lxleft=(float)nlx1; lyleft=(float)nly1; lpxleft=lpx3; lpyleft=lpy3;
  12654. - if (ny1<0) { xleft-=ny1*pleft; txleft-=ny1*tpxleft; tyleft-=ny1*tpyleft; lxleft-=ny1*lpxleft; lyleft-=ny1*lpyleft; }
  12655. - } else {
  12656. - xright=(float)nx1; pright=p3;
  12657. - txright=(float)ntx1; tyright=(float)nty1; tpxright=tpx3; tpyright=tpy3;
  12658. - lxright=(float)nlx1; lyright=(float)nly1; lpxright=lpx3; lpyright=lpy3;
  12659. - if (ny1<0) { xright-=ny1*pright; txright-=ny1*tpxright; tyright-=ny1*tpyright; lxright-=ny1*lpxright; lyright-=ny1*lpyright; }
  12660. - }
  12661. - const int yb = ny2>=dimy()?(height-1):ny2;
  12662. - for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) {
  12663. - const int dx = (int)xright-(int)xleft;
  12664. - const float
  12665. - tpx = dx?((int)txright-(int)txleft)/(float)dx:0,
  12666. - tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0,
  12667. - txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)),
  12668. - tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)),
  12669. - lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0,
  12670. - lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0,
  12671. - lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)),
  12672. - lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy));
  12673. - const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright<dimx())?(int)xright:(width-1);
  12674. - if (xmin<=xmax) {
  12675. - const int offx=whz-xmax+xmin-1;
  12676. - T* ptrd = ptr(xmin,yy,0,0);
  12677. - if (opacity>=1) cimg_forV(*this,k) {
  12678. - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
  12679. - for (int x=xmin; x<=xmax; x++) {
  12680. - *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k));
  12681. - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
  12682. - }
  12683. - ptrd+=offx;
  12684. - } else cimg_forV(*this,k) {
  12685. - float tx=txi, ty=tyi, lx=lxi, ly=lyi;
  12686. - for (int x=xmin; x<=xmax; x++) {
  12687. - *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++;
  12688. - tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy;
  12689. - }
  12690. - ptrd+=offx;
  12691. - }
  12692. - }
  12693. - xleft+=pleft; xright+=pright;
  12694. - txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright;
  12695. - lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright;
  12696. - }
  12697. - }
  12698. - return *this;
  12699. - }
  12700. -
  12701. -
  12702. - //! Draw an ellipse on the instance image
  12703. - /**
  12704. - \param x0 = X-coordinate of the ellipse center.
  12705. - \param y0 = Y-coordinate of the ellipse center.
  12706. - \param r1 = First radius of the ellipse.
  12707. - \param r2 = Second radius of the ellipse.
  12708. - \param ru = X-coordinate of the orientation vector related to the first radius.
  12709. - \param rv = Y-coordinate of the orientation vector related to the first radius.
  12710. - \param color = array of dimv() values of type \c T, defining the drawing color.
  12711. - \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
  12712. - \param opacity = opacity of the drawing.
  12713. - **/
  12714. - CImg& draw_ellipse(const int x0,const int y0,const float r1,const float r2,const float ru,const float rv,
  12715. - const T *const color,const unsigned int pattern=0L, const float opacity=1) {
  12716. - if (!is_empty()) {
  12717. - draw_scanline(color,opacity);
  12718. - if (!color) throw CImgArgumentException("CImg<%s>::draw_ellipse : Specified color is (null).",pixel_type());
  12719. - unsigned int hatch=1;
  12720. - const float
  12721. - nr1 = cimg::abs(r1), nr2 = cimg::abs(r2),
  12722. - norm = (float)std::sqrt(ru*ru+rv*rv),
  12723. - u = norm>0?ru/norm:1,
  12724. - v = norm>0?rv/norm:0,
  12725. - rmax = cimg::max(nr1,nr2),
  12726. - l1 = (float)std::pow(rmax/(nr1>0?nr1:1e-6),2),
  12727. - l2 = (float)std::pow(rmax/(nr2>0?nr2:1e-6),2),
  12728. - a = l1*u*u + l2*v*v,
  12729. - b = u*v*(l1-l2),
  12730. - c = l1*v*v + l2*u*u;
  12731. - const int
  12732. - yb = (int)std::sqrt(a*rmax*rmax/(a*c-b*b)),
  12733. - ymin = (y0-yb<0)?0:(y0-yb),
  12734. - ymax = (1+y0+yb>=dimy())?height-1:(1+y0+yb);
  12735. - int oxmin=0, oxmax=0;
  12736. - bool first_line = true;
  12737. - for (int y=ymin; y<ymax; y++) {
  12738. - const float
  12739. - Y = (float)(y-y0)+0.25f,
  12740. - delta = b*b*Y*Y-a*(c*Y*Y-rmax*rmax),
  12741. - sdelta = (float)((delta>0?std::sqrt(delta):0)),
  12742. - fxmin = x0-(b*Y+sdelta)/a,
  12743. - fxmax = x0-(b*Y-sdelta)/a;
  12744. - const int xmin = (int)fxmin, xmax = (int)fxmax;
  12745. - if (!pattern) draw_scanline(xmin,xmax,y,color,opacity);
  12746. - else {
  12747. - if (!(~pattern) || (~pattern && pattern&hatch)) {
  12748. - if (first_line) { draw_scanline(xmin,xmax,y,color,opacity); first_line = false; }
  12749. - else {
  12750. - if (xmin<oxmin) draw_scanline(xmin,oxmin-1,y,color,opacity);
  12751. - else draw_scanline(oxmin+(oxmin==xmin?0:1),xmin,y,color,opacity);
  12752. - if (xmax<oxmax) draw_scanline(xmax,oxmax-1,y,color,opacity);
  12753. - else draw_scanline(oxmax+(oxmax==xmax?0:1),xmax,y,color,opacity);
  12754. - }
  12755. - }
  12756. - }
  12757. - oxmin = xmin; oxmax = xmax;
  12758. - if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1));
  12759. - }
  12760. - }
  12761. - return *this;
  12762. - }
  12763. -
  12764. - //! Draw an ellipse on the instance image
  12765. - /**
  12766. - \param x0 = X-coordinate of the ellipse center.
  12767. - \param y0 = Y-coordinate of the ellipse center.
  12768. - \param tensor = Diffusion tensor describing the ellipse.
  12769. - \param color = array of dimv() values of type \c T, defining the drawing color.
  12770. - \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
  12771. - \param opacity = opacity of the drawing.
  12772. - **/
  12773. - template<typename t> CImg& draw_ellipse(const int x0,const int y0,const CImg<t> &tensor,
  12774. - const T *color,const unsigned int pattern=0L,const float opacity=1) {
  12775. - CImgList<t> eig = tensor.get_symmetric_eigen();
  12776. - const CImg<t> &val = eig[0], &vec = eig[1];
  12777. - return draw_ellipse(x0,y0,val(0),val(1),vec(0,0),vec(0,1),color,pattern,opacity);
  12778. - }
  12779. -
  12780. - //! Draw a circle on the instance image
  12781. - /**
  12782. - \param x0 = X-coordinate of the circle center.
  12783. - \param y0 = Y-coordinate of the circle center.
  12784. - \param r = radius of the circle.
  12785. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  12786. - \param pattern = If zero, the circle is filled, else pattern is an integer whose bits describe the outline pattern.
  12787. - \param opacity = opacity of the drawing.
  12788. - **/
  12789. - CImg& draw_circle(const int x0,const int y0,float r,const T *const color,const unsigned int pattern=0L,const float opacity=1) {
  12790. - return draw_ellipse(x0,y0,r,r,1,0,color,pattern,opacity);
  12791. - }
  12792. -
  12793. - //! Draw a text into the instance image.
  12794. - /**
  12795. - \param text = a C-string containing the text to display.
  12796. - \param x0 = X-coordinate of the text in the instance image.
  12797. - \param y0 = Y-coordinate of the text in the instance image.
  12798. - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
  12799. - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
  12800. - \param font = List of font characters used for the drawing.
  12801. - \param opacity = opacity of the drawing.
  12802. - \note Clipping is supported.
  12803. - \see get_font().
  12804. - **/
  12805. - template<typename t> CImg& draw_text(const char *const text,
  12806. - const int x0,const int y0,
  12807. - const T *const fgcolor,const T *const bgcolor,
  12808. - const CImgList<t>& font,const float opacity=1) {
  12809. - if (!text)
  12810. - throw CImgArgumentException("CImg<%s>::draw_text() : Specified input string is (null).",pixel_type());
  12811. - if (font.is_empty())
  12812. - throw CImgArgumentException("CImg<%s>::draw_text() : Specified font (%u,%p) is empty.",
  12813. - pixel_type(),font.size,font.data);
  12814. -
  12815. - if (is_empty()) {
  12816. - // If needed, pre-compute needed size of the image
  12817. - int x=0, y=0, w=0;
  12818. - for (int i=0; i<cimg::strlen(text); i++) {
  12819. - const unsigned char c = text[i];
  12820. - switch (c) {
  12821. - case '\n': y+=font[' '].height; if (x>w) w=x; x=0; break;
  12822. - case '\t': x+=4*font[' '].width; break;
  12823. - default: if (c<font.size) x+=font[c].width;
  12824. - }
  12825. - }
  12826. - if (x!=0) {
  12827. - if (x>w) w=x;
  12828. - y+=font[' '].height;
  12829. - }
  12830. - assign(x0+w,y0+y,1,font[' '].dim,0);
  12831. - if (bgcolor) cimg_forV(*this,k) get_shared_channel(k).fill(bgcolor[k]);
  12832. - }
  12833. -
  12834. - int x = x0, y = y0;
  12835. - CImg<T> letter;
  12836. - for (int i=0; i<cimg::strlen(text); i++) {
  12837. - const unsigned char c = text[i];
  12838. - switch (c) {
  12839. - case '\n': y+=font[' '].height; x=x0; break;
  12840. - case '\t': x+=4*font[' '].width; break;
  12841. - default: if (c<font.size) {
  12842. - letter = font[c];
  12843. - const CImg& mask = (c+256)<(int)font.size?font[c+256]:font[c];
  12844. - if (fgcolor) for (unsigned int p=0; p<letter.width*letter.height; p++)
  12845. - if (mask(p)) cimg_forV(*this,k) letter(p,0,0,k) = (T)(letter(p,0,0,k)*fgcolor[k]);
  12846. - if (bgcolor) for (unsigned int p=0; p<letter.width*letter.height; p++)
  12847. - if (!mask(p)) cimg_forV(*this,k) letter(p,0,0,k) = bgcolor[k];
  12848. - if (!bgcolor && font.size>=512) draw_image(letter,mask,x,y,0,0,(T)1,opacity);
  12849. - else draw_image(letter,x,y,0,0,opacity);
  12850. - x+=letter.width;
  12851. - }
  12852. - break;
  12853. - }
  12854. - }
  12855. - return *this;
  12856. - }
  12857. -
  12858. - //! Draw a text into the instance image.
  12859. - /**
  12860. - \param text = a C-string containing the text to display.
  12861. - \param x0 = X-coordinate of the text in the instance image.
  12862. - \param y0 = Y-coordinate of the text in the instance image.
  12863. - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
  12864. - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
  12865. - \param font_size = Height of the desired font (11,13,24,38 or 57)
  12866. - \param opacity = opacity of the drawing.
  12867. - \note Clipping is supported.
  12868. - \see get_font().
  12869. - **/
  12870. - CImg& draw_text(const char *const text,
  12871. - const int x0,const int y0,
  12872. - const T *const fgcolor,const T *const bgcolor=0,
  12873. - const unsigned int font_size=11,const float opacity=1.0f) {
  12874. - return draw_text(text,x0,y0,fgcolor,bgcolor,CImgList<T>::get_font(font_size),opacity);
  12875. - }
  12876. -
  12877. -
  12878. - //! Draw a text into the instance image.
  12879. - /**
  12880. - \param x0 = X-coordinate of the text in the instance image.
  12881. - \param y0 = Y-coordinate of the text in the instance image.
  12882. - \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent').
  12883. - \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent').
  12884. - \param opacity = opacity of the drawing.
  12885. - \param format = a 'printf'-style format, followed by arguments.
  12886. - \note Clipping is supported.
  12887. - **/
  12888. - CImg& draw_text(const int x0,const int y0,
  12889. - const T *const fgcolor,const T *const bgcolor, const unsigned int font_size,
  12890. - const float opacity,const char *format,...) {
  12891. - char tmp[2048]={0};
  12892. - std::va_list ap;
  12893. - va_start(ap,format);
  12894. - std::vsprintf(tmp,format,ap);
  12895. - va_end(ap);
  12896. - return draw_text(tmp,x0,y0,fgcolor,bgcolor,font_size,opacity);
  12897. - }
  12898. -
  12899. - template<typename t> CImg& draw_text(const int x0,const int y0,
  12900. - const T *const fgcolor,const T *const bgcolor,
  12901. - const CImgList<t>& font, const float opacity, const char *format,...) {
  12902. - char tmp[2048]={0};
  12903. - std::va_list ap;
  12904. - va_start(ap,format);
  12905. - std::vsprintf(tmp,format,ap);
  12906. - va_end(ap);
  12907. - return draw_text(tmp,x0,y0,fgcolor,bgcolor,font,opacity);
  12908. - }
  12909. -
  12910. -
  12911. - //! Draw a vector field in the instance image.
  12912. - /**
  12913. - \param flow = a 2d image of 2d vectors used as input data.
  12914. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  12915. - \param sampling = length (in pixels) between each arrow.
  12916. - \param factor = length factor of each arrow (if <0, computed as a percentage of the maximum length).
  12917. - \param quiver_type = type of plot. Can be 0 (arrows) or 1 (segments).
  12918. - \param opacity = opacity of the drawing.
  12919. - \note Clipping is supported.
  12920. - **/
  12921. - template<typename t>
  12922. - CImg& draw_quiver(const CImg<t>& flow, const T *const color,
  12923. - const unsigned int sampling=25, const float factor=-20,
  12924. - const int quiver_type=0, const float opacity=1) {
  12925. - if (!is_empty()) {
  12926. - if (flow.is_empty() || flow.dim!=2)
  12927. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.",
  12928. - pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data);
  12929. - if (!color)
  12930. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color is (null)",
  12931. - pixel_type());
  12932. - if (sampling<=0)
  12933. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g",
  12934. - pixel_type(),sampling);
  12935. -
  12936. - float vmax,fact;
  12937. - if (factor<=0) {
  12938. - const CImgStats st(flow.get_norm_pointwise(2),false);
  12939. - vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max));
  12940. - fact = -factor;
  12941. - } else { fact = factor; vmax = 1; }
  12942. -
  12943. - for (unsigned int y=sampling/2; y<height; y+=sampling)
  12944. - for (unsigned int x=sampling/2; x<width; x+=sampling) {
  12945. - const unsigned int X = x*flow.width/width, Y = y*flow.height/height;
  12946. - float u = (float)flow(X,Y,0,0)*fact/vmax, v = (float)flow(X,Y,0,1)*fact/vmax;
  12947. - if (!quiver_type) {
  12948. - const int xx = x+(int)u, yy = y+(int)v;
  12949. - draw_arrow(x,y,xx,yy,color,45.0f,sampling/5.0f,~0L,opacity);
  12950. - } else draw_line((int)(x-0.5*u),(int)(y-0.5*v),(int)(x+0.5*u),(int)(y+0.5*v),color,~0L,opacity);
  12951. - }
  12952. - }
  12953. - return *this;
  12954. - }
  12955. -
  12956. - //! Draw a vector field in the instance image, using a colormap.
  12957. - /**
  12958. - \param flow = a 2d image of 2d vectors used as input data.
  12959. - \param color = a 2d image of dimv()-D vectors corresponding to the color of each arrow.
  12960. - \param sampling = length (in pixels) between each arrow.
  12961. - \param factor = length factor of each arrow (if <0, computed as a percentage of the maximum length).
  12962. - \param quiver_type = type of plot. Can be 0 (arrows) or 1 (segments).
  12963. - \param opacity = opacity of the drawing.
  12964. - \note Clipping is supported.
  12965. - **/
  12966. - template<typename t1,typename t2>
  12967. - CImg& draw_quiver(const CImg<t1>& flow, const CImg<t2>& color,
  12968. - const unsigned int sampling=25, const float factor=-20,
  12969. - const int quiver_type=0, const float opacity=1) {
  12970. - if (!is_empty()) {
  12971. - if (flow.is_empty() || flow.dim!=2)
  12972. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.",
  12973. - pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data);
  12974. - if (color.is_empty() || color.width!=flow.width || color.height!=flow.height)
  12975. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color (%u,%u,%u,%u,%p) has wrong dimensions.",
  12976. - pixel_type(),color.width,color.height,color.depth,color.dim,color.data);
  12977. - if (sampling<=0)
  12978. - throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g",pixel_type(),sampling);
  12979. -
  12980. - float vmax,fact;
  12981. - if (factor<=0) {
  12982. - const CImgStats st(flow.get_norm_pointwise(2),false);
  12983. - vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max));
  12984. - fact = -factor;
  12985. - } else { fact = factor; vmax = 1; }
  12986. -
  12987. - for (unsigned int y=sampling/2; y<height; y+=sampling)
  12988. - for (unsigned int x=sampling/2; x<width; x+=sampling) {
  12989. - const unsigned int X = x*flow.width/width, Y = y*flow.height/height;
  12990. - float u = (float)flow(X,Y,0,0)*fact/vmax, v = (float)flow(X,Y,0,1)*fact/vmax;
  12991. - if (!quiver_type) {
  12992. - const int xx = x+(int)u, yy = y+(int)v;
  12993. - draw_arrow(x,y,xx,yy,color.get_vector_at(X,Y).data,45.0f,sampling/5.0f,~0L,opacity);
  12994. - } else draw_line((int)(x-0.5*u),(int)(y-0.5*v),(int)(x+0.5*u),(int)(y+0.5*v),color.get_vector_at(X,Y).data,~0L,opacity);
  12995. - }
  12996. - }
  12997. - return *this;
  12998. - }
  12999. -
  13000. - //! Draw a 1D graph on the instance image.
  13001. - /**
  13002. - \param data = an image containing the graph values I = f(x).
  13003. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  13004. - \param gtype = define the type of the plot :
  13005. - - 0 = Plot using linear interpolation (segments).
  13006. - - 1 = Plot with bars.
  13007. - - 2 = Plot using cubic interpolation (3-polynomials).
  13008. - \param ymin = lower bound of the y-range.
  13009. - \param ymax = upper bound of the y-range.
  13010. - \param opacity = opacity of the drawing.
  13011. - \note
  13012. - - if \c ymin==ymax==0, the y-range is computed automatically from the input sample.
  13013. - \see draw_axis().
  13014. - **/
  13015. - template<typename t>
  13016. - CImg& draw_graph(const CImg<t>& data, const T *const color, const unsigned int gtype=0,
  13017. - const double ymin=0, const double ymax=0, const float opacity=1) {
  13018. - if (!is_empty()) {
  13019. - if (!color) throw CImgArgumentException("CImg<%s>::draw_graph() : Specified color is (null)",pixel_type());
  13020. - T *color1 = new T[dim], *color2 = new T[dim];
  13021. - cimg_forV(*this,k) { color1[k]=(T)(color[k]*0.6f); color2[k]=(T)(color[k]*0.3f); }
  13022. - CImgStats st;
  13023. - if (ymin==ymax) { st = CImgStats(data,false); cimg::swap(st.min,st.max); } else { st.min = ymin; st.max = ymax; }
  13024. - if (st.min==st.max) { st.min--; st.max++; }
  13025. - const float ca = height>1?(float)(st.max-st.min)/(height-1):0, cb = (float)st.min;
  13026. - const int Y0 = (int)(-cb/ca);
  13027. - int pY=0;
  13028. - cimg_foroff(data,off) {
  13029. - const int Y = (int)((data[off]-cb)/ca);
  13030. - switch (gtype) {
  13031. - case 0: // plot with segments
  13032. - if (off>0) draw_line((int)((off-1)*width/data.size()),pY,(int)(off*width/data.size()),Y,color,~0L,opacity);
  13033. - break;
  13034. - case 1: { // plot with bars
  13035. - const unsigned int X = off*width/data.size(), nX = (off+1)*width/data.size()-1;
  13036. - draw_rectangle(X,(int)Y0,nX,Y,color1,opacity);
  13037. - draw_line(X,Y,X,(int)Y0,color2,~0L,opacity);
  13038. - draw_line(X,(int)Y0,nX,(int)Y0,Y<=Y0?color2:color,~0L,opacity);
  13039. - draw_line(nX,Y,nX,(int)Y0,color,~0L,opacity);
  13040. - draw_line(X,Y,nX,Y,Y<=Y0?color:color2,~0L,opacity);
  13041. - } break;
  13042. - }
  13043. - pY=Y;
  13044. - }
  13045. - if (gtype==2) { // plot with cubic interpolation
  13046. - const CImg<t> ndata = data.get_shared_points(0,data.size()-1);
  13047. - cimg_forX(*this,x) {
  13048. - const int Y = (int)((ndata.cubic_pix1d((float)x*ndata.width/width)-cb)/ca);
  13049. - if (x>0) draw_line(x,pY,x+1,Y,color,~0L,opacity);
  13050. - pY=Y;
  13051. - }
  13052. - }
  13053. - delete[] color1; delete[] color2;
  13054. - }
  13055. - return *this;
  13056. - }
  13057. -
  13058. - //! Draw a labelled horizontal axis on the instance image.
  13059. - /**
  13060. - \param x0 = lower bound of the x-range.
  13061. - \param x1 = upper bound of the x-range.
  13062. - \param y = Y-coordinate of the horizontal axis in the instance image.
  13063. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  13064. - \param precision = precision of the labels.
  13065. - \param grid_pattern = pattern of the grid
  13066. - \param opacity = opacity of the drawing.
  13067. - \note if \c precision==0, precision of the labels is automatically computed.
  13068. - \see draw_graph().
  13069. - **/
  13070. - template<typename t> CImg& draw_axis(const CImg<t>& xvalues, const int y, const T *const color,
  13071. - const int precision=-1, const float opacity=1.0f) {
  13072. - if (!is_empty()) {
  13073. - int siz = (int)xvalues.size()-1;
  13074. - if (siz<=0) draw_line(0,y,width-1,y,color,~0L,opacity);
  13075. - else {
  13076. - if (xvalues[0]<xvalues[siz]) draw_arrow(0,y,width-1,y,color,30,5,~0L,opacity);
  13077. - else draw_arrow(width-1,y,0,y,color,30,5,~0L,opacity);
  13078. - const int yt = (y+14)<dimy()?(y+3):(y-14);
  13079. - char txt[32];
  13080. - cimg_foroff(xvalues,x) {
  13081. - if (precision>=0) std::sprintf(txt,"%.*g",precision,(double)xvalues(x));
  13082. - else std::sprintf(txt,"%g",(double)xvalues(x));
  13083. - const int xi=(int)(x*(width-1)/siz), xt = xi-(int)std::strlen(txt)*3;
  13084. - draw_point(xi,y-1,color,opacity).draw_point(xi,y+1,color,opacity).
  13085. - draw_text(txt,xt<0?0:xt,yt,color,0,11,opacity);
  13086. - }
  13087. - }
  13088. - }
  13089. - return *this;
  13090. - }
  13091. -
  13092. - //! Draw a labelled vertical axis on the instance image.
  13093. - template<typename t> CImg& draw_axis(const int x, const CImg<t>& yvalues, const T *const color,
  13094. - const int precision=-1, const float opacity=1.0f) {
  13095. - if (!is_empty()) {
  13096. - int siz = (int)yvalues.size()-1;
  13097. - if (siz<=0) draw_line(x,0,x,height-1,color,~0L,opacity);
  13098. - else {
  13099. - if (yvalues[0]<yvalues[siz]) draw_arrow(x,0,x,height-1,color,30,5,~0L,opacity);
  13100. - else draw_arrow(x,height-1,x,0,color,30,5,~0L,opacity);
  13101. - char txt[32];
  13102. - cimg_foroff(yvalues,y) {
  13103. - if (precision>=0) std::sprintf(txt,"%.*g",precision,(double)yvalues(y));
  13104. - else std::sprintf(txt,"%g",(double)yvalues(y));
  13105. - const int
  13106. - yi = (int)(y*(height-1)/siz),
  13107. - tmp = yi-5,
  13108. - nyi = tmp<0?0:(tmp>=(int)height-11?(int)height-11:tmp),
  13109. - xt = x-(int)std::strlen(txt)*7;
  13110. - draw_point(x-1,yi,color,opacity).draw_point(x+1,yi,color,opacity);
  13111. - if (xt>0) draw_text(txt,xt,nyi,color,0,11,opacity);
  13112. - else draw_text(txt,x+3,nyi,color,0,11,opacity);
  13113. - }
  13114. - }
  13115. - }
  13116. - return *this;
  13117. - }
  13118. -
  13119. - //! Draw a labelled horizontal+vertical axis on the instance image.
  13120. - template<typename tx, typename ty> CImg& draw_axis(const CImg<tx>& xvalues, const CImg<ty>& yvalues, const T *const color,
  13121. - const int precisionx=-1, const int precisiony=-1,
  13122. - const float opacity=1.0f) {
  13123. - if (!is_empty()) {
  13124. - const CImg<tx> nxvalues(xvalues.data,xvalues.size(),1,1,1,true);
  13125. - const int sizx = (int)xvalues.size()-1, wm1 = (int)(width)-1;
  13126. - if (sizx>0) {
  13127. - float ox = (float)nxvalues[0];
  13128. - for (unsigned int x=1; x<width; x++) {
  13129. - const float nx = (float)nxvalues.linear_pix1d((float)x*sizx/wm1);
  13130. - if (nx*ox<=0) { draw_axis(nx==0?x:x-1,yvalues,color,precisiony,opacity); break; }
  13131. - ox = nx;
  13132. - }
  13133. - }
  13134. - const CImg<ty> nyvalues(yvalues.data,yvalues.size(),1,1,1,true);
  13135. - const int sizy = (int)yvalues.size()-1, hm1 = (int)(height)-1;
  13136. - if (sizy>0) {
  13137. - float oy = (float)nyvalues[0];
  13138. - for (unsigned int y=1; y<height; y++) {
  13139. - const float ny = (float)nyvalues.linear_pix1d((float)y*sizy/hm1);
  13140. - if (ny*oy<=0) { draw_axis(xvalues,ny==0?y:y-1,color,precisionx,opacity); break; }
  13141. - oy = ny;
  13142. - }
  13143. - }
  13144. - }
  13145. - return *this;
  13146. - }
  13147. -
  13148. - //! Draw a labelled horizontal+vertical axis on the instance image.
  13149. - template<typename tx, typename ty> CImg& draw_axis(const tx& x0, const tx& x1, const ty& y0, const ty& y1,
  13150. - const T *const color,
  13151. - const int subdivisionx=-60, const int subdivisiony=-60,
  13152. - const int precisionx=-1, const int precisiony=-1,
  13153. - const float opacity=1.0f) {
  13154. - return draw_axis(CImg<tx>::sequence(subdivisionx>0?subdivisionx:1-(int)width/subdivisionx,x0,x1),
  13155. - CImg<ty>::sequence(subdivisiony>0?subdivisiony:1-(int)height/subdivisiony,y0,y1),
  13156. - color,precisionx,precisiony,opacity);
  13157. - }
  13158. -
  13159. - //! Draw grid on the instance image
  13160. - template<typename tx, typename ty>
  13161. - CImg& draw_grid(const CImg<tx>& xvalues, const CImg<ty>& yvalues, const T *const color,
  13162. - const unsigned int patternx=~0U, const unsigned int patterny=~0U,
  13163. - const float opacity=1.0f) {
  13164. - if (!is_empty()) {
  13165. - if (!xvalues.is_empty()) cimg_foroff(xvalues,x) {
  13166. - const int xi = (int)xvalues[x];
  13167. - if (xi>=0 && xi<(int)width) draw_line(xi,0,xi,height-1,color,patternx,opacity);
  13168. - }
  13169. - if (!yvalues.is_empty()) cimg_foroff(yvalues,y) {
  13170. - const int yi = (int)yvalues[y];
  13171. - if (yi>=0 && yi<(int)height) draw_line(0,yi,width-1,yi,color,patterny,opacity);
  13172. - }
  13173. - }
  13174. - return *this;
  13175. - }
  13176. -
  13177. - //! Draw grid on the instance image
  13178. - CImg& draw_grid(const float deltax, const float deltay,
  13179. - const float offsetx, const float offsety,
  13180. - const T *const color,
  13181. - const unsigned int patternx=~0U, const unsigned int patterny=~0U,
  13182. - const bool invertx=false, const bool inverty=false,
  13183. - const float opacity=1.0f) {
  13184. -
  13185. - CImg<unsigned int> seqx, seqy;
  13186. -
  13187. - if (deltax!=0) {
  13188. - const float dx = deltax>0?deltax:width*-deltax/100;
  13189. - const unsigned int nx = (unsigned int)(width/dx);
  13190. - seqx = CImg<unsigned int>::sequence(1+nx,0,(unsigned int)(dx*nx));
  13191. - if (offsetx) cimg_foroff(seqx,x) seqx(x) = (unsigned int)cimg::mod(seqx(x)+offsetx,(float)width);
  13192. - if (invertx) cimg_foroff(seqx,x) seqx(x) = width-1-seqx(x);
  13193. - }
  13194. -
  13195. - if (deltay!=0) {
  13196. - const float dy = deltay>0?deltay:height*-deltay/100;
  13197. - const unsigned int ny = (unsigned int)(height/dy);
  13198. - seqy = CImg<unsigned int>::sequence(1+ny,0,(unsigned int)(dy*ny));
  13199. - if (offsety) cimg_foroff(seqy,y) seqy(y) = (unsigned int)cimg::mod(seqy(y)+offsety,(float)height);
  13200. - if (inverty) cimg_foroff(seqy,y) seqy(y) = height-1-seqy(y);
  13201. - }
  13202. -
  13203. - return draw_grid(seqx,seqy,color,patternx,patterny,opacity);
  13204. - }
  13205. -
  13206. - // INNER CLASS used by function CImg<>::draw_fill()
  13207. - template<typename T1,typename T2> struct _draw_fill {
  13208. - const T1 *const color;
  13209. - const float sigma,opacity;
  13210. - const CImg<T1> value;
  13211. - CImg<T2> region;
  13212. -
  13213. - _draw_fill(const CImg<T1>& img,const int x,const int y,const int z,
  13214. - const T *const pcolor,const float psigma,const float popacity):
  13215. - color(pcolor),sigma(psigma),opacity(popacity),
  13216. - value(img.get_vector_at(x,y,z)), region(CImg<T2>(img.width,img.height,img.depth,1,(T2)false)) {
  13217. - }
  13218. -
  13219. - _draw_fill& operator=(const _draw_fill& d) {
  13220. - color = d.color;
  13221. - sigma = d.sigma;
  13222. - opacity = d.opacity;
  13223. - value = d.value;
  13224. - region = d.region;
  13225. - return *this;
  13226. - }
  13227. -
  13228. - bool comp(const CImg<T1>& A,const CImg<T1>& B) const {
  13229. - bool res=true;
  13230. - const T *pA=A.data+A.size();
  13231. - for (const T *pB=B.data+B.size(); res && pA>A.data; res=(cimg::abs(*(--pA)-(*(--pB)))<=sigma) );
  13232. - return res;
  13233. - }
  13234. -
  13235. - void fill(CImg<T1>& img,const int x,const int y,const int z) {
  13236. - if (x<0 || x>=img.dimx() || y<0 || y>=img.dimy() || z<0 || z>=img.dimz()) return;
  13237. - if (!region(x,y,z) && comp(value,img.get_vector_at(x,y,z))) {
  13238. - const T *col=color;
  13239. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  13240. - int xmin,xmax;
  13241. - if (opacity>=1) cimg_forV(img,k) img(x,y,z,k)=*(col++);
  13242. - else cimg_forV(img,k) img(x,y,z,k)=(T1)(*(col++)*opacity+copacity*img(x,y,z,k));
  13243. - col-=img.dim;
  13244. - region(x,y,z) = (T2)true;
  13245. - for (xmin=x-1; xmin>=0 && comp(value,img.get_vector_at(xmin,y,z)); xmin--) {
  13246. - if (opacity>=1) cimg_forV(img,k) img(xmin,y,z,k) = *(col++);
  13247. - else cimg_forV(img,k) img(xmin,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmin,y,z,k));
  13248. - col-=img.dim;
  13249. - region(xmin,y,z)=(T2)true;
  13250. - }
  13251. - for (xmax=x+1; xmax<img.dimx() && comp(value,img.get_vector_at(xmax,y,z)); xmax++) {
  13252. - if (opacity>=1) cimg_forV(img,k) img(xmax,y,z,k) = *(col++);
  13253. - else cimg_forV(img,k) img(xmax,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmax,y,z,k));
  13254. - col-=img.dim;
  13255. - region(xmax,y,z)=(T2)true;
  13256. - }
  13257. - xmin++; xmax--;
  13258. - for (; xmin<=xmax; xmin++) {
  13259. - fill(img,xmin,y-1,z);
  13260. - fill(img,xmin,y+1,z);
  13261. - fill(img,xmin,y,z-1);
  13262. - fill(img,xmin,y,z+1);
  13263. - }
  13264. - }
  13265. - }
  13266. - };
  13267. -
  13268. - //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image.
  13269. - /**
  13270. - \param x = X-coordinate of the starting point of the region to fill.
  13271. - \param y = Y-coordinate of the starting point of the region to fill.
  13272. - \param z = Z-coordinate of the starting point of the region to fill.
  13273. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  13274. - \param region = image that will contain the mask of the filled region mask, as an output.
  13275. - \param sigma = tolerance concerning neighborhood values.
  13276. - \param opacity = opacity of the drawing.
  13277. -
  13278. - \return \p region is initialized with the binary mask of the filled region.
  13279. - **/
  13280. - template<typename t> CImg& draw_fill(const int x,const int y,const int z,
  13281. - const T *const color, CImg<t>& region,const float sigma=0,
  13282. - const float opacity=1) {
  13283. - _draw_fill<T,t> F(*this,x,y,z,color,sigma,opacity);
  13284. - F.fill(*this,x,y,z);
  13285. - region = F.region;
  13286. - return *this;
  13287. - }
  13288. -
  13289. - //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image.
  13290. - /**
  13291. - \param x = X-coordinate of the starting point of the region to fill.
  13292. - \param y = Y-coordinate of the starting point of the region to fill.
  13293. - \param z = Z-coordinate of the starting point of the region to fill.
  13294. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  13295. - \param sigma = tolerance concerning neighborhood values.
  13296. - \param opacity = opacity of the drawing.
  13297. - **/
  13298. - CImg& draw_fill(const int x,const int y,const int z,const T *const color,const float sigma=0,const float opacity=1) {
  13299. - CImg<bool> tmp;
  13300. - return draw_fill(x,y,z,color,tmp,sigma,opacity);
  13301. - }
  13302. -
  13303. - //! Draw a 2D filled region starting from a point (\c x,\c y) in the instance image.
  13304. - /**
  13305. - \param x = X-coordinate of the starting point of the region to fill.
  13306. - \param y = Y-coordinate of the starting point of the region to fill.
  13307. - \param color = an array of dimv() values of type \c T, defining the drawing color.
  13308. - \param sigma = tolerance concerning neighborhood values.
  13309. - \param opacity = opacity of the drawing.
  13310. - **/
  13311. - CImg& draw_fill(const int x,const int y,const T *const color,const float sigma=0,const float opacity=1) {
  13312. - CImg<bool> tmp;
  13313. - return draw_fill(x,y,0,color,tmp,sigma,opacity);
  13314. - }
  13315. -
  13316. - //! Draw a plasma square in the instance image.
  13317. - /**
  13318. - \param x0 = X-coordinate of the upper-left corner of the plasma.
  13319. - \param y0 = Y-coordinate of the upper-left corner of the plasma.
  13320. - \param x1 = X-coordinate of the lower-right corner of the plasma.
  13321. - \param y1 = Y-coordinate of the lower-right corner of the plasma.
  13322. - \param alpha = Alpha-parameter of the plasma.
  13323. - \param beta = Beta-parameter of the plasma.
  13324. - \param opacity = opacity of the drawing.
  13325. - **/
  13326. - CImg& draw_plasma(const int x0, const int y0, const int x1, const int y1,
  13327. - const double alpha=1.0, const double beta=1.0, const float opacity=1) {
  13328. - if (!is_empty()) {
  13329. - int nx0=x0,nx1=x1,ny0=y0,ny1=y1;
  13330. - if (nx1<nx0) cimg::swap(nx0,nx1);
  13331. - if (ny1<ny0) cimg::swap(ny0,ny1);
  13332. - if (nx0<0) nx0=0;
  13333. - if (nx1>=dimx()) nx1=width-1;
  13334. - if (ny0<0) ny0=0;
  13335. - if (ny1>=dimy()) ny1=height-1;
  13336. - const int xc = (nx0+nx1)/2, yc = (ny0+ny1)/2, dx=(xc-nx0), dy=(yc-ny0);
  13337. - const double dc = std::sqrt((double)(dx*dx+dy*dy))*alpha + beta;
  13338. - float val = 0;
  13339. - cimg_forV(*this,k) {
  13340. - if (opacity>=1) {
  13341. - (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k)));
  13342. - (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k)));
  13343. - (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k)));
  13344. - (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k)));
  13345. - do {
  13346. - val = (float)(0.25f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) +
  13347. - (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand());
  13348. - } while (val<(float)cimg::type<T>::min() || val>(float)cimg::type<T>::max());
  13349. - (*this)(xc,yc,0,k) = (T)val;
  13350. - } else {
  13351. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  13352. - (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k))*nopacity + copacity*(*this)(xc,ny0,0,k));
  13353. - (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(xc,ny1,0,k));
  13354. - (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k))*nopacity + copacity*(*this)(nx0,yc,0,k));
  13355. - (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(nx1,yc,0,k));
  13356. - do {
  13357. - val = (float)(0.25f*(((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) +
  13358. - (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand())*nopacity
  13359. - + copacity*(*this)(xc,yc,0,k));
  13360. - } while (val<(float)cimg::type<T>::min() || val>(float)cimg::type<T>::max());
  13361. - (*this)(xc,yc,0,k) = (T)val;
  13362. - }
  13363. - }
  13364. - if (xc!=nx0 || yc!=ny0) {
  13365. - draw_plasma(nx0,ny0,xc,yc,alpha,beta,opacity);
  13366. - draw_plasma(xc,ny0,nx1,yc,alpha,beta,opacity);
  13367. - draw_plasma(nx0,yc,xc,ny1,alpha,beta,opacity);
  13368. - draw_plasma(xc,yc,nx1,ny1,alpha,beta,opacity);
  13369. - }
  13370. - }
  13371. - return *this;
  13372. - }
  13373. -
  13374. - //! Draw a plasma in the instance image.
  13375. - /**
  13376. - \param alpha = Alpha-parameter of the plasma.
  13377. - \param beta = Beta-parameter of the plasma.
  13378. - \param opacity = opacity of the drawing.
  13379. - **/
  13380. - CImg& draw_plasma(const double alpha=1.0,const double beta=1.0,const float opacity=1) {
  13381. - return draw_plasma(0,0,width-1,height-1,alpha,beta,opacity);
  13382. - }
  13383. -
  13384. - //! Draw a 1D gaussian function in the instance image.
  13385. - /**
  13386. - \param xc = X-coordinate of the gaussian center.
  13387. - \param sigma = Standard variation of the gaussian distribution.
  13388. - \param color = array of dimv() values of type \c T, defining the drawing color.
  13389. - \param opacity = opacity of the drawing.
  13390. - **/
  13391. - CImg& draw_gaussian(const float xc,const double sigma,const T *const color,const float opacity=1) {
  13392. - if (!is_empty()) {
  13393. - if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type());
  13394. - const double sigma2 = 2*sigma*sigma;
  13395. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  13396. - const unsigned int whz = width*height*depth;
  13397. - const T *col = color;
  13398. - cimg_forX(*this,x) {
  13399. - const float dx = (x-xc);
  13400. - const double val = std::exp( -dx*dx/sigma2 );
  13401. - T *ptrd = ptr(x,0,0,0);
  13402. - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
  13403. - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
  13404. - col-=dim;
  13405. - }
  13406. - }
  13407. - return *this;
  13408. - }
  13409. -
  13410. - //! Draw an anisotropic 2D gaussian function in the instance image.
  13411. - /**
  13412. - \param xc = X-coordinate of the gaussian center.
  13413. - \param yc = Y-coordinate of the gaussian center.
  13414. - \param tensor = 2x2 covariance matrix.
  13415. - \param color = array of dimv() values of type \c T, defining the drawing color.
  13416. - \param opacity = opacity of the drawing.
  13417. - **/
  13418. - template<typename t> CImg& draw_gaussian(const float xc,const float yc,const CImg<t>& tensor,
  13419. - const T *const color,const float opacity=1) {
  13420. - if (!is_empty()) {
  13421. - if (tensor.width!=2 || tensor.height!=2 || tensor.depth!=1 || tensor.dim!=1)
  13422. - throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 2x2 matrix.",
  13423. - pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data);
  13424. - if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type());
  13425. - const CImg<t> invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0);
  13426. - const t &a=invT2(0,0), &b=2*invT2(1,0), &c=invT2(1,1);
  13427. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  13428. - const unsigned int whz = width*height*depth;
  13429. - const T *col = color;
  13430. - float dy = -yc;
  13431. - cimg_forY(*this,y) {
  13432. - float dx = -xc;
  13433. - cimg_forX(*this,x) {
  13434. - const float val = (float)std::exp(a*dx*dx + b*dx*dy + c*dy*dy);
  13435. - T *ptrd = ptr(x,y,0,0);
  13436. - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
  13437. - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
  13438. - col-=dim;
  13439. - dx++;
  13440. - }
  13441. - dy++;
  13442. - }
  13443. - }
  13444. - return *this;
  13445. - }
  13446. -
  13447. - //! Draw an isotropic 2D gaussian function in the instance image
  13448. - /**
  13449. - \param xc = X-coordinate of the gaussian center.
  13450. - \param yc = Y-coordinate of the gaussian center.
  13451. - \param sigma = standard variation of the gaussian distribution.
  13452. - \param color = array of dimv() values of type \c T, defining the drawing color.
  13453. - \param opacity = opacity of the drawing.
  13454. - **/
  13455. - CImg& draw_gaussian(const float xc,const float yc,const float sigma,const T *const color,const float opacity=1) {
  13456. - return draw_gaussian(xc,yc,CImg<float>::diagonal(sigma,sigma),color,opacity);
  13457. - }
  13458. -
  13459. - //! Draw an anisotropic 3D gaussian function in the instance image.
  13460. - /**
  13461. - \param xc = X-coordinate of the gaussian center.
  13462. - \param yc = Y-coordinate of the gaussian center.
  13463. - \param zc = Z-coordinate of the gaussian center.
  13464. - \param tensor = 3x3 covariance matrix.
  13465. - \param color = array of dimv() values of type \c T, defining the drawing color.
  13466. - \param opacity = opacity of the drawing.
  13467. - **/
  13468. - template<typename t> CImg& draw_gaussian(const float xc,const float yc,const float zc,const CImg<t>& tensor,
  13469. - const T *const color,const float opacity=1) {
  13470. - if (!is_empty()) {
  13471. - if (tensor.width!=3 || tensor.height!=3 || tensor.depth!=1 || tensor.dim!=1)
  13472. - throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 3x3 matrix.",
  13473. - pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data);
  13474. - const CImg<t> invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0);
  13475. - const t a=invT(0,0), b=2*invT(1,0), c=2*invT(2,0), d=invT(1,1), e=2*invT(2,1), f=invT(2,2);
  13476. - const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f);
  13477. - const unsigned int whz = width*height*depth;
  13478. - const T *col = color;
  13479. - cimg_forXYZ(*this,x,y,z) {
  13480. - const float dx = (x-xc), dy = (y-yc), dz = (z-zc);
  13481. - const double val = std::exp(a*dx*dx + b*dx*dy + c*dx*dz + d*dy*dy + e*dy*dz + f*dz*dz);
  13482. - T *ptrd = ptr(x,y,z,0);
  13483. - if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; }
  13484. - else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; }
  13485. - col-=dim;
  13486. - }
  13487. - }
  13488. - return *this;
  13489. - }
  13490. -
  13491. - //! Draw an isotropic 3D gaussian function in the instance image
  13492. - /**
  13493. - \param xc = X-coordinate of the gaussian center.
  13494. - \param yc = Y-coordinate of the gaussian center.
  13495. - \param zc = Z-coordinate of the gaussian center.
  13496. - \param sigma = standard variation of the gaussian distribution.
  13497. - \param color = array of dimv() values of type \c T, defining the drawing color.
  13498. - \param opacity = opacity of the drawing.
  13499. - **/
  13500. - CImg& draw_gaussian(const float xc,const float yc,const float zc,
  13501. - const double sigma,const T *const color,const float opacity=1) {
  13502. - return draw_gaussian(xc,yc,zc,CImg<float>::diagonal(sigma,sigma,sigma),color,opacity);
  13503. - }
  13504. -
  13505. - //! Draw a 3D object in the instance image
  13506. - /**
  13507. - \param X = X-coordinate of the 3d object position
  13508. - \param Y = Y-coordinate of the 3d object position
  13509. - \param Z = Z-coordinate of the 3d object position
  13510. - \param points = Image N*3 describing 3D point coordinates
  13511. - \param primitives = List of P primitives
  13512. - \param colors = List of P color (or textures)
  13513. - \param opacities = Image of P opacities
  13514. - \param render_type = Render type (0=Points, 1=Lines, 2=Faces (no light), 3=Faces (flat), 4=Faces(Gouraud)
  13515. - \param double_sided = Tell if object faces have two sides or are oriented.
  13516. - \param focale = length of the focale
  13517. - \param lightx = X-coordinate of the light
  13518. - \param lighty = Y-coordinate of the light
  13519. - \param lightz = Z-coordinate of the light
  13520. - \param ambiant_light = Brightness (between 0..1) of the ambiant light
  13521. - **/
  13522. - template<typename tp, typename tf, typename to>
  13523. - CImg& draw_object3d(const float X, const float Y, const float Z,
  13524. - const CImg<tp>& points, const CImgList<tf>& primitives,
  13525. - const CImgList<T>& colors, const CImgList<to>& opacities,
  13526. - const unsigned int render_type=4,
  13527. - const bool double_sided=false, const float focale=500,
  13528. - const float lightx=0, const float lighty=0, const float lightz=-5000,
  13529. - const float ambiant_light = 0.05f) {
  13530. -
  13531. - static CImg<float> light_texture;
  13532. - if (is_empty() || points.is_empty() || primitives.is_empty()) return *this;
  13533. - if (colors.is_empty() || opacities.is_empty())
  13534. - throw CImgArgumentException("CImg<%s>::draw_object3d() : Undefined colors or opacities",pixel_type());
  13535. -
  13536. - if (points.height<3)
  13537. - return draw_object3d(X,Y,Z,points.get_resize(-100,3,1,1,0),primitives,colors,opacities,
  13538. - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
  13539. -
  13540. - // Create light texture for phong-like rendering
  13541. - if (render_type==5) {
  13542. - if (colors.size>primitives.size) light_texture = colors[primitives.size];
  13543. - else {
  13544. - static float olightx=0, olighty=0, olightz=0, oambiant_light=0;
  13545. - if (light_texture.is_empty() || lightx!=olightx || lighty!=olighty || lightz!=olightz || ambiant_light!=oambiant_light) {
  13546. - light_texture.assign(512,512);
  13547. - const float white[1]={ 1.0f },
  13548. - dlx = lightx-X, dly = lighty-Y, dlz = lightz-Z,
  13549. - nl = (float)std::sqrt(dlx*dlx+dly*dly+dlz*dlz),
  13550. - nlx = light_texture.width/2*(1+dlx/nl),
  13551. - nly = light_texture.height/2*(1+dly/nl);
  13552. - (light_texture.draw_gaussian(nlx,nly,light_texture.width/3.0f,white)+=ambiant_light).cut(0.0f,1.0f);
  13553. - olightx = lightx; olighty = lighty; olightz = lightz; oambiant_light = ambiant_light;
  13554. - }
  13555. - }
  13556. - }
  13557. -
  13558. - // Compute 3D to 2D projection
  13559. - CImg<float> projections(points.width,2);
  13560. - cimg_forX(points,l) {
  13561. - const float
  13562. - x = (float)points(l,0),
  13563. - y = (float)points(l,1),
  13564. - z = (float)points(l,2);
  13565. - const float projectedz = z + Z + focale;
  13566. - projections(l,1) = Y + focale*y/projectedz;
  13567. - projections(l,0) = X + focale*x/projectedz;
  13568. - }
  13569. -
  13570. - // Compute and sort visible primitives
  13571. - CImg<unsigned int> visibles(primitives.size);
  13572. - CImg<float> zrange(primitives.size);
  13573. - unsigned int nb_visibles = 0;
  13574. - const float zmin = -focale+1.5f;
  13575. - { cimglist_for(primitives,l) {
  13576. - const CImg<tf>& primitive = primitives[l];
  13577. - switch (primitive.size()) {
  13578. - case 1: { // Point
  13579. - const unsigned int i0 = (unsigned int)primitive(0);
  13580. - const float x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2));
  13581. - if (z0>zmin && x0>=0 && x0<width && y0>=0 && y0<height) {
  13582. - visibles(nb_visibles) = (unsigned int)l;
  13583. - zrange(nb_visibles++) = z0;
  13584. - }
  13585. - } break;
  13586. - case 2: // Line or textured line
  13587. - case 6: {
  13588. - const unsigned int
  13589. - i0 = (unsigned int)primitive(0),
  13590. - i1 = (unsigned int)primitive(1);
  13591. - const float
  13592. - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
  13593. - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2));
  13594. - float xm, xM, ym, yM;
  13595. - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
  13596. - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
  13597. - if (z0>zmin && z1>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
  13598. - visibles(nb_visibles) = (unsigned int)l;
  13599. - zrange(nb_visibles++) = 0.5f*(z0+z1);
  13600. - }
  13601. - } break;
  13602. - case 3: // Triangle or textured triangle
  13603. - case 9: {
  13604. - const unsigned int
  13605. - i0 = (unsigned int)primitive(0),
  13606. - i1 = (unsigned int)primitive(1),
  13607. - i2 = (unsigned int)primitive(2);
  13608. - const float
  13609. - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
  13610. - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2)),
  13611. - x2 = projections(i2,0), y2 = projections(i2,1), z2 = (float)(Z+points(i2,2));
  13612. - float xm, xM, ym, yM;
  13613. - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
  13614. - if (x2<xm) xm = x2;
  13615. - if (x2>xM) xM = x2;
  13616. - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
  13617. - if (y2<ym) ym = y2;
  13618. - if (y2>yM) yM = y2;
  13619. - if (z0>zmin && z1>zmin && z2>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
  13620. - if (double_sided || (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)<0) {
  13621. - visibles(nb_visibles) = (unsigned int)l;
  13622. - zrange(nb_visibles++) = (z0+z1+z2)/3;
  13623. - }
  13624. - }
  13625. - } break;
  13626. - case 4: // Rectangle or textured rectangle
  13627. - case 12: {
  13628. - const unsigned int
  13629. - i0 = (unsigned int)primitive(0),
  13630. - i1 = (unsigned int)primitive(1),
  13631. - i2 = (unsigned int)primitive(2),
  13632. - i3 = (unsigned int)primitive(3);
  13633. - const float
  13634. - x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)),
  13635. - x1 = projections(i1,0), y1 = projections(i1,1), z1 = (float)(Z+points(i1,2)),
  13636. - x2 = projections(i2,0), y2 = projections(i2,1), z2 = (float)(Z+points(i2,2)),
  13637. - x3 = projections(i3,0), y3 = projections(i3,1), z3 = (float)(Z+points(i3,2));
  13638. - float xm, xM, ym, yM;
  13639. - if (x0<x1) { xm = x0; xM = x1; } else { xm = x1; xM = x0; }
  13640. - if (x2<xm) xm = x2;
  13641. - if (x2>xM) xM = x2;
  13642. - if (x3<xm) xm = x3;
  13643. - if (x3>xM) xM = x3;
  13644. - if (y0<y1) { ym = y0; yM = y1; } else { ym = y1; yM = y0; }
  13645. - if (y2<ym) ym = y2;
  13646. - if (y2>yM) yM = y2;
  13647. - if (y3<ym) ym = y3;
  13648. - if (y3>yM) yM = y3;
  13649. - if (z0>zmin && z1>zmin && z2>zmin && z3>zmin && xM>=0 && xm<width && yM>=0 && ym<height) {
  13650. - if (double_sided || (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)<0) {
  13651. - visibles(nb_visibles) = (unsigned int)l;
  13652. - zrange(nb_visibles++) = (z0+z1+z2+z3)/4;
  13653. - }
  13654. - }
  13655. - } break;
  13656. - default:
  13657. - throw CImgArgumentException("CImg<%s>::draw_object3d() : Primitive %u is invalid (size = %u, can be 1,2,3,4,6,9 or 12)",
  13658. - pixel_type(),l,primitive.size());
  13659. - }}
  13660. - }
  13661. - if (nb_visibles<=0) return *this;
  13662. - CImg<unsigned int> permutations;
  13663. - CImg<float>(zrange.data,nb_visibles,1,1,1,true).sort(permutations,false);
  13664. -
  13665. - // Compute light properties
  13666. - CImg<float> lightprops;
  13667. - switch (render_type) {
  13668. - case 3: { // Flat Shading
  13669. - lightprops.assign(nb_visibles);
  13670. - cimg_forX(lightprops,l) {
  13671. - const CImg<tf>& primitive = primitives(visibles(permutations(l)));
  13672. - const unsigned int psize = primitive.size();
  13673. - if (psize==3 || psize==4 || psize==9 || psize==12) {
  13674. - const unsigned int
  13675. - i0 = (unsigned int)primitive(0),
  13676. - i1 = (unsigned int)primitive(1),
  13677. - i2 = (unsigned int)primitive(2);
  13678. - const float
  13679. - x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2),
  13680. - x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2),
  13681. - x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2),
  13682. - dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0,
  13683. - dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0,
  13684. - nx = dy1*dz2-dz1*dy2,
  13685. - ny = dz1*dx2-dx1*dz2,
  13686. - nz = dx1*dy2-dy1*dx2,
  13687. - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
  13688. - lx = X+(x0+x1+x2)/3-lightx,
  13689. - ly = Y+(y0+y1+y2)/3-lighty,
  13690. - lz = Z+(z0+z1+z2)/3-lightz,
  13691. - nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz),
  13692. - factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl),
  13693. - nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f);
  13694. - lightprops[l] = cimg::min(nfactor+ambiant_light,1.0f);
  13695. - } else lightprops[l] = 1.0f;
  13696. - }
  13697. - } break;
  13698. -
  13699. - case 4: // Gouraud Shading
  13700. - case 5: { // Phong-Shading
  13701. - CImg<float> points_normals(points.width,3,1,1,0);
  13702. - cimglist_for(primitives,l) {
  13703. - const CImg<tf>& primitive = primitives[l];
  13704. - const unsigned int psize = primitive.size();
  13705. - const bool
  13706. - triangle_flag = (psize==3) || (psize==9),
  13707. - rectangle_flag = (psize==4) || (psize==12);
  13708. - if (triangle_flag || rectangle_flag) {
  13709. - const unsigned int
  13710. - i0 = (unsigned int)primitive(0),
  13711. - i1 = (unsigned int)primitive(1),
  13712. - i2 = (unsigned int)primitive(2),
  13713. - i3 = rectangle_flag?(unsigned int)primitive(3):0;
  13714. - const float
  13715. - x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2),
  13716. - x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2),
  13717. - x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2),
  13718. - dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0,
  13719. - dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0,
  13720. - nx = dy1*dz2-dz1*dy2,
  13721. - ny = dz1*dx2-dx1*dz2,
  13722. - nz = dx1*dy2-dy1*dx2,
  13723. - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
  13724. - nnx = nx/norm,
  13725. - nny = ny/norm,
  13726. - nnz = nz/norm;
  13727. - points_normals(i0,0)+=nnx; points_normals(i0,1)+=nny; points_normals(i0,2)+=nnz;
  13728. - points_normals(i1,0)+=nnx; points_normals(i1,1)+=nny; points_normals(i1,2)+=nnz;
  13729. - points_normals(i2,0)+=nnx; points_normals(i2,1)+=nny; points_normals(i2,2)+=nnz;
  13730. - if (rectangle_flag) {
  13731. - points_normals(i3,0)+=nnx; points_normals(i3,1)+=nny; points_normals(i3,2)+=nnz;
  13732. - }
  13733. - }
  13734. - }
  13735. -
  13736. - if (render_type==4) {
  13737. - lightprops.assign(points.width);
  13738. - cimg_forX(points,ll) {
  13739. - const float
  13740. - nx = points_normals(ll,0),
  13741. - ny = points_normals(ll,1),
  13742. - nz = points_normals(ll,2),
  13743. - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
  13744. - lx = (float)(X+points(ll,0)-lightx),
  13745. - ly = (float)(Y+points(ll,1)-lighty),
  13746. - lz = (float)(Z+points(ll,2)-lightz),
  13747. - nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz),
  13748. - factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl),
  13749. - nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f);
  13750. - lightprops[ll] = cimg::min(nfactor+ambiant_light,1.0f);
  13751. - }
  13752. - } else {
  13753. - lightprops.assign(points.width,2);
  13754. - cimg_forX(points,ll) {
  13755. - const float
  13756. - nx = points_normals(ll,0),
  13757. - ny = points_normals(ll,1),
  13758. - nz = points_normals(ll,2),
  13759. - norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz),
  13760. - nnx = nx/norm, nny = ny/norm;
  13761. - lightprops(ll,0) = (light_texture.width/2-1)*(1+nnx);
  13762. - lightprops(ll,1) = (light_texture.height/2-1)*(1+nny);
  13763. - }
  13764. - }
  13765. - } break;
  13766. - }
  13767. -
  13768. - // Draw visible primitives
  13769. - const unsigned int opacsize = opacities.size;
  13770. - { for (unsigned int l=0; l<nb_visibles; l++) {
  13771. - const unsigned int n_primitive = visibles(permutations(l));
  13772. - const CImg<tf>& primitive = primitives[n_primitive];
  13773. - const CImg<T>& color = colors[n_primitive%colors.size];
  13774. - const CImg<to>& opacity = opacities[n_primitive%opacsize];
  13775. - const float opac = opacity.size()?(float)opacity(0):1.0f;
  13776. -
  13777. - switch (primitive.size()) {
  13778. - case 1: { // colored point or sprite
  13779. - const unsigned int n0 = (unsigned int)primitive[0];
  13780. - const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1);
  13781. - if (color.size()==dim) draw_point(x0,y0,color.ptr(),opac);
  13782. - else {
  13783. - const float z = Z + points(n0,2);
  13784. - const int factor = (int)(focale*100/(z+focale));
  13785. - const int sw = color.width*factor/200, sh = color.height*factor/200;
  13786. - if (x0+sw>=0 && x0-sw<(int)width && y0+sh>=0 && y0-sh<(int)height) {
  13787. - const CImg<T> sprite = color.get_resize(-factor,-factor,1,-100,render_type<=3?1:3);
  13788. - if (opacity.width==color.width && opacity.height==color.height)
  13789. - draw_image(sprite,opacity.get_resize(sprite.width,sprite.height,1,sprite.dim,1),x0-sw,y0-sh,0,0);
  13790. - else draw_image(sprite,x0-sw,y0-sh,0,0,opac);
  13791. - }
  13792. - }
  13793. - } break;
  13794. - case 2: { // colored line
  13795. - const unsigned int
  13796. - n0 = (unsigned int)primitive[0],
  13797. - n1 = (unsigned int)primitive[1];
  13798. - const int
  13799. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13800. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1);
  13801. - if (render_type) draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac);
  13802. - else draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac);
  13803. - } break;
  13804. - case 6: { // textured line
  13805. - const unsigned int
  13806. - n0 = (unsigned int)primitive[0],
  13807. - n1 = (unsigned int)primitive[1],
  13808. - tx0 = (unsigned int)primitive[2],
  13809. - ty0 = (unsigned int)primitive[3],
  13810. - tx1 = (unsigned int)primitive[4],
  13811. - ty1 = (unsigned int)primitive[5];
  13812. - const int
  13813. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13814. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1);
  13815. - if (render_type) draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac);
  13816. - else draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
  13817. - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac);
  13818. - } break;
  13819. - case 3: { // colored triangle
  13820. - const unsigned int
  13821. - n0 = (unsigned int)primitive[0],
  13822. - n1 = (unsigned int)primitive[1],
  13823. - n2 = (unsigned int)primitive[2];
  13824. - const int
  13825. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13826. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
  13827. - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1);
  13828. - switch(render_type) {
  13829. - case 0:
  13830. - draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac).draw_point(x2,y2,color.ptr(),opac);
  13831. - break;
  13832. - case 1:
  13833. - draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x0,y0,x2,y2,color.ptr(),~0L,opac).
  13834. - draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac);
  13835. - break;
  13836. - case 2:
  13837. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac);
  13838. - break;
  13839. - case 3:
  13840. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l));
  13841. - break;
  13842. - case 4:
  13843. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprops(n0),lightprops(n1),lightprops(n2),opac);
  13844. - break;
  13845. - case 5:
  13846. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture,
  13847. - (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1),
  13848. - (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1),
  13849. - (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1),
  13850. - opac);
  13851. - break;
  13852. - }
  13853. - } break;
  13854. - case 4: { // colored rectangle
  13855. - const unsigned int
  13856. - n0 = (unsigned int)primitive[0],
  13857. - n1 = (unsigned int)primitive[1],
  13858. - n2 = (unsigned int)primitive[2],
  13859. - n3 = (unsigned int)primitive[3];
  13860. - const int
  13861. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13862. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
  13863. - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1),
  13864. - x3 = (int)projections(n3,0), y3 = (int)projections(n3,1);
  13865. - switch(render_type) {
  13866. - case 0:
  13867. - draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac).
  13868. - draw_point(x2,y2,color.ptr(),opac).draw_point(x3,y3,color.ptr(),opac);
  13869. - break;
  13870. - case 1:
  13871. - draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac).
  13872. - draw_line(x2,y2,x3,y3,color.ptr(),~0L,opac).draw_line(x3,y3,x0,y0,color.ptr(),~0L,opac);
  13873. - break;
  13874. - case 2:
  13875. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac).draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac);
  13876. - break;
  13877. - case 3:
  13878. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l)).
  13879. - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac,lightprops(l));
  13880. - break;
  13881. - case 4: {
  13882. - const float
  13883. - lightprop0 = lightprops(n0), lightprop1 = lightprops(n1),
  13884. - lightprop2 = lightprops(n2), lightprop3 = lightprops(n3);
  13885. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprop0,lightprop1,lightprop2,opac).
  13886. - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),lightprop0,lightprop2,lightprop3,opac);
  13887. - } break;
  13888. - case 5: {
  13889. - const unsigned int
  13890. - lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1),
  13891. - lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1),
  13892. - lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1),
  13893. - lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1);
  13894. - draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac).
  13895. - draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac);
  13896. - } break;
  13897. - }
  13898. - } break;
  13899. - case 9: { // Textured triangle
  13900. - const unsigned int
  13901. - n0 = (unsigned int)primitive[0],
  13902. - n1 = (unsigned int)primitive[1],
  13903. - n2 = (unsigned int)primitive[2],
  13904. - tx0 = (unsigned int)primitive[3],
  13905. - ty0 = (unsigned int)primitive[4],
  13906. - tx1 = (unsigned int)primitive[5],
  13907. - ty1 = (unsigned int)primitive[6],
  13908. - tx2 = (unsigned int)primitive[7],
  13909. - ty2 = (unsigned int)primitive[8];
  13910. - const int
  13911. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13912. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
  13913. - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1);
  13914. - switch(render_type) {
  13915. - case 0:
  13916. - draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
  13917. - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac).
  13918. - draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac);
  13919. - break;
  13920. - case 1:
  13921. - draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac).
  13922. - draw_line(x0,y0,x2,y2,color,tx0,ty0,tx2,ty2,opac).
  13923. - draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac);
  13924. - break;
  13925. - case 2:
  13926. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac);
  13927. - break;
  13928. - case 3:
  13929. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l));
  13930. - break;
  13931. - case 4:
  13932. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprops(n0),lightprops(n1),lightprops(n2),opac);
  13933. - break;
  13934. - case 5:
  13935. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,
  13936. - (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1),
  13937. - (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1),
  13938. - (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1),
  13939. - opac);
  13940. - break;
  13941. - }
  13942. - } break;
  13943. - case 12: { // Textured rectangle
  13944. - const unsigned int
  13945. - n0 = (unsigned int)primitive[0],
  13946. - n1 = (unsigned int)primitive[1],
  13947. - n2 = (unsigned int)primitive[2],
  13948. - n3 = (unsigned int)primitive[3],
  13949. - tx0 = (unsigned int)primitive[4],
  13950. - ty0 = (unsigned int)primitive[5],
  13951. - tx1 = (unsigned int)primitive[6],
  13952. - ty1 = (unsigned int)primitive[7],
  13953. - tx2 = (unsigned int)primitive[8],
  13954. - ty2 = (unsigned int)primitive[9],
  13955. - tx3 = (unsigned int)primitive[10],
  13956. - ty3 = (unsigned int)primitive[11];
  13957. - const int
  13958. - x0 = (int)projections(n0,0), y0 = (int)projections(n0,1),
  13959. - x1 = (int)projections(n1,0), y1 = (int)projections(n1,1),
  13960. - x2 = (int)projections(n2,0), y2 = (int)projections(n2,1),
  13961. - x3 = (int)projections(n3,0), y3 = (int)projections(n3,1);
  13962. - switch(render_type) {
  13963. - case 0:
  13964. - draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac).
  13965. - draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac).
  13966. - draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac).
  13967. - draw_point(x3,y3,color.get_vector_at(tx3,ty3).ptr(),opac);
  13968. - break;
  13969. - case 1:
  13970. - draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac).
  13971. - draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac).
  13972. - draw_line(x2,y2,x3,y3,color,tx2,ty2,tx3,ty3,opac).
  13973. - draw_line(x3,y3,x0,y0,color,tx3,ty3,tx0,ty0,opac);
  13974. - break;
  13975. - case 2:
  13976. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac).
  13977. - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac);
  13978. - break;
  13979. - case 3:
  13980. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l)).
  13981. - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac,lightprops(l));
  13982. - break;
  13983. - case 4: {
  13984. - const float
  13985. - lightprop0 = lightprops(n0), lightprop1 = lightprops(n1),
  13986. - lightprop2 = lightprops(n2), lightprop3 = lightprops(n3);
  13987. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprop0,lightprop1,lightprop2,opac).
  13988. - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,lightprop0,lightprop2,lightprop3,opac);
  13989. - } break;
  13990. - case 5: {
  13991. - const unsigned int
  13992. - lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1),
  13993. - lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1),
  13994. - lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1),
  13995. - lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1);
  13996. - draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac).
  13997. - draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac);
  13998. - } break;
  13999. - }
  14000. - } break;
  14001. - }
  14002. - }
  14003. - }
  14004. - return *this;
  14005. - }
  14006. -
  14007. - //! Draw a 3D object in the instance image
  14008. - template<typename tp, typename tf, typename to>
  14009. - CImg& draw_object3d(const float X, const float Y, const float Z,
  14010. - const CImgList<tp>& points, const CImgList<tf>& primitives,
  14011. - const CImgList<T>& colors, const CImgList<to>& opacities,
  14012. - const unsigned int render_type=4,
  14013. - const bool double_sided=false, const float focale=500,
  14014. - const float lightx=0, const float lighty=0, const float lightz=-5000,
  14015. - const float ambiant_light = 0.05f) {
  14016. - if (points.is_empty()) return *this;
  14017. - CImg<tp> npoints(points.size,3,1,1,0);
  14018. - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
  14019. - cimg_forX(npoints,l) {
  14020. - const CImg<tp>& point = points[l];
  14021. - const unsigned int siz = point.size();
  14022. - if (!siz)
  14023. - throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at "
  14024. - "position %u.",pixel_type(),points.size,l);
  14025. - *(ptrZ++) = (siz>2)?point(2):0;
  14026. - *(ptrY++) = (siz>1)?point(1):0;
  14027. - *(ptrX++) = point(0);
  14028. - }
  14029. - return draw_object3d(X,Y,Z,npoints,primitives,colors,opacities,
  14030. - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
  14031. - }
  14032. -
  14033. - //! Draw a 3D object in the instance image
  14034. - template<typename tp, typename tf, typename to>
  14035. - CImg& draw_object3d(const float X, const float Y, const float Z,
  14036. - const CImg<tp>& points, const CImgList<tf>& primitives,
  14037. - const CImgList<T>& colors, const CImg<to>& opacities,
  14038. - const unsigned int render_type=4,
  14039. - const bool double_sided=false, const float focale=500,
  14040. - const float lightx=0, const float lighty=0, const float lightz=-5000,
  14041. - const float ambiant_light = 0.05f) {
  14042. - CImgList<to> nopacities(opacities.size(),1);
  14043. - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
  14044. - return draw_object3d(X,Y,Z,points,primitives,colors,nopacities,
  14045. - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
  14046. - }
  14047. -
  14048. - //! Draw a 3D object in the instance image
  14049. - template<typename tp, typename tf, typename to>
  14050. - CImg& draw_object3d(const float X, const float Y, const float Z,
  14051. - const CImgList<tp>& points, const CImgList<tf>& primitives,
  14052. - const CImgList<T>& colors, const CImg<to>& opacities,
  14053. - const unsigned int render_type=4,
  14054. - const bool double_sided=false, const float focale=500,
  14055. - const float lightx=0, const float lighty=0, const float lightz=-5000,
  14056. - const float ambiant_light = 0.05f) {
  14057. - CImgList<to> nopacities(opacities.size(),1);
  14058. - { cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); }
  14059. - if (points.is_empty()) return *this;
  14060. - CImg<tp> npoints(points.size,3,1,1,0);
  14061. - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
  14062. - cimg_forX(npoints,l) {
  14063. - const CImg<tp>& point = points[l];
  14064. - const unsigned int siz = point.size();
  14065. - if (!siz)
  14066. - throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at "
  14067. - "position %u.",pixel_type(),points.size,l);
  14068. - *(ptrZ++) = (siz>2)?point(2):0;
  14069. - *(ptrY++) = (siz>1)?point(1):0;
  14070. - *(ptrX++) = point(0);
  14071. - }
  14072. - return draw_object3d(X,Y,Z,npoints,primitives,colors,nopacities,
  14073. - render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light);
  14074. - }
  14075. -
  14076. - //! Draw a 3D object in the instance image
  14077. - template<typename tp, typename tf>
  14078. - CImg& draw_object3d(const float X, const float Y, const float Z,
  14079. - const tp& points, const CImgList<tf>& primitives,
  14080. - const CImgList<T>& colors,
  14081. - const unsigned int render_type=4,
  14082. - const bool double_sided=false, const float focale=500,
  14083. - const float lightx=0, const float lighty=0, const float lightz=-5000,
  14084. - const float ambiant_light = 0.05f, const float opacity=1.0f) {
  14085. - return draw_object3d(X,Y,Z,points,primitives,colors,
  14086. - CImg<float>(primitives.size,1,1,1,opacity),
  14087. - render_type,double_sided,focale,lightx,lighty,lightz,
  14088. - ambiant_light);
  14089. - }
  14090. -
  14091. - //! Rescale and center a 3D object
  14092. - CImg& resize_object3d(const float siz=100, const bool centering=true) {
  14093. - T *ptrx = ptr(0,0), *ptry = ptr(0,1), *ptrz = ptr(0,2);
  14094. - float xm = (float)*(ptrx++), ym = (float)*(ptry++), zm = (float)*(ptrz++), xM = xm, yM = ym, zM = zm;
  14095. - for (unsigned int p=1; p<width; p++) {
  14096. - const float x = (float)*(ptrx++), y = (float)*(ptry++), z = (float)*(ptrz++);
  14097. - if (x<xm) xm = x;
  14098. - if (y<ym) ym = y;
  14099. - if (z<zm) zm = z;
  14100. - if (x>xM) xM = x;
  14101. - if (y>yM) yM = y;
  14102. - if (z>zM) zM = z;
  14103. - }
  14104. - const float
  14105. - cx = 0.5f*(xm+xM),
  14106. - cy = 0.5f*(ym+yM),
  14107. - cz = 0.5f*(zm+zM),
  14108. - delta = cimg::max(xM-xm,yM-ym,zM-zm),
  14109. - ratio = (siz>=0)?(delta<=0?0:(siz/delta)):-siz/100;
  14110. - ptrx = ptr(0,0);
  14111. - ptry = ptr(0,1);
  14112. - ptrz = ptr(0,2);
  14113. - if (centering) cimg_forX(*this,l) {
  14114. - T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++);
  14115. - x = (T)((x-cx)*ratio);
  14116. - y = (T)((y-cy)*ratio);
  14117. - z = (T)((z-cz)*ratio);
  14118. - } else cimg_forX(*this,l) {
  14119. - T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++);
  14120. - x = (T)(cx+(x-cx)*ratio);
  14121. - y = (T)(cy+(y-cy)*ratio);
  14122. - z = (T)(cz+(z-cz)*ratio);
  14123. - }
  14124. - return *this;
  14125. - }
  14126. -
  14127. - //! Get a rescaled and centered version of the 3D object
  14128. - CImg get_resize_object3d(const float siz=100, const bool centering=true) const {
  14129. - return CImg<T>(*this,false).resize_object3d(siz,centering);
  14130. - }
  14131. -
  14132. - //@}
  14133. - //----------------------------
  14134. - //
  14135. - //! \name Image Filtering
  14136. - //@{
  14137. - //----------------------------
  14138. -
  14139. - //! Return the correlation of the image by a mask.
  14140. - /**
  14141. - The result \p res of the correlation of an image \p img by a mask \p mask is defined to be :
  14142. -
  14143. - res(x,y,z) = sum_{i,j,k} img(x+i,y+j,z+k)*mask(i,j,k)
  14144. -
  14145. - \param mask = the correlation kernel.
  14146. - \param cond = the border condition type (0=zero, 1=dirichlet)
  14147. - \param weighted_correl = enable local normalization.
  14148. - **/
  14149. - template<typename t> CImg<typename cimg::largest<T,t>::type>
  14150. - get_correlate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_correl=false) const {
  14151. - typedef typename cimg::largest<T,t>::type restype;
  14152. - typedef typename cimg::largest<t,float>::type fftype;
  14153. - typedef typename cimg::largest<T,fftype>::type ftype;
  14154. -
  14155. - if (is_empty()) return CImg<restype>();
  14156. - if (mask.is_empty() || mask.dim!=1)
  14157. - throw CImgArgumentException("CImg<%s>::get_correlate() : Specified mask (%u,%u,%u,%u,%p) is not scalar.",
  14158. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
  14159. - CImg<restype> dest(width,height,depth,dim);
  14160. - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) {
  14161. - // A special optimization is done for 2x2,3x3,4x4,5x5,2x2x2 and 3x3x3 mask (with cond=1)
  14162. - switch (mask.depth) {
  14163. - case 3: {
  14164. - CImg_3x3x3(I,T);
  14165. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x3(I,mask);
  14166. - else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) {
  14167. - const double norm = (double)cimg_squaresum3x3x3(I);
  14168. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x3(I,mask)/std::sqrt(norm)):0;
  14169. - }
  14170. - } break;
  14171. - case 2: {
  14172. - CImg_2x2x2(I,T);
  14173. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x2(I,mask);
  14174. - else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) {
  14175. - const double norm = (double)cimg_squaresum2x2x2(I);
  14176. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x2(I,mask)/std::sqrt(norm)):0;
  14177. - }
  14178. - } break;
  14179. - default:
  14180. - case 1:
  14181. - switch (mask.width) {
  14182. - case 5: {
  14183. - CImg_5x5(I,T);
  14184. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr5x5(I,mask);
  14185. - else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) {
  14186. - const double norm = (double)cimg_squaresum5x5(I);
  14187. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr5x5(I,mask)/std::sqrt(norm)):0;
  14188. - }
  14189. - } break;
  14190. - case 4: {
  14191. - CImg_4x4(I,T);
  14192. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr4x4(I,mask);
  14193. - else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) {
  14194. - const double norm = (double)cimg_squaresum4x4(I);
  14195. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr4x4(I,mask)/std::sqrt(norm)):0;
  14196. - }
  14197. - } break;
  14198. - case 3: {
  14199. - CImg_3x3(I,T);
  14200. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3(I,mask);
  14201. - else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) {
  14202. - const double norm = (double)cimg_squaresum3x3(I);
  14203. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3(I,mask)/std::sqrt(norm)):0;
  14204. - }
  14205. - } break;
  14206. - case 2: {
  14207. - CImg_2x2(I,T);
  14208. - if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2(I,mask);
  14209. - else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) {
  14210. - const double norm = (double)cimg_squaresum2x2(I);
  14211. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2(I,mask)/std::sqrt(norm)):0;
  14212. - }
  14213. - } break;
  14214. - case 1: dest = mask(0)*(*this); break;
  14215. - }
  14216. - }
  14217. - } else {
  14218. - // Generic version for other masks
  14219. - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
  14220. - cimg_forV(*this,v)
  14221. - if (!weighted_correl) { // Classical correlation
  14222. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14223. - ftype val = 0;
  14224. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14225. - val+= (*this)(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
  14226. - dest(x,y,z,v)=(restype)val;
  14227. - }
  14228. - if (cond) cimg_forYZV(*this,y,z,v)
  14229. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14230. - ftype val = 0;
  14231. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14232. - val+= pix3d(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
  14233. - dest(x,y,z,v)=(restype)val;
  14234. - }
  14235. - else cimg_forYZV(*this,y,z,v)
  14236. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14237. - ftype val = 0;
  14238. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14239. - val+= pix3d(x+xm,y+ym,z+zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0);
  14240. - dest(x,y,z,v)=(restype)val;
  14241. - }
  14242. - } else { // Weighted correlation
  14243. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14244. - ftype val = 0, norm = 0;
  14245. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14246. - const T cval = (*this)(x+xm,y+ym,z+zm,v);
  14247. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14248. - norm+= cval*cval;
  14249. - }
  14250. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
  14251. - }
  14252. - if (cond) cimg_forYZV(*this,y,z,v)
  14253. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14254. - ftype val = 0, norm = 0;
  14255. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14256. - const T cval = pix3d(x+xm,y+ym,z+zm,v);
  14257. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14258. - norm+=cval*cval;
  14259. - }
  14260. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
  14261. - }
  14262. - else cimg_forYZV(*this,y,z,v)
  14263. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14264. - ftype val = 0, norm = 0;
  14265. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14266. - const T cval = pix3d(x+xm,y+ym,z+zm,v,0);
  14267. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14268. - norm+= cval*cval;
  14269. - }
  14270. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0;
  14271. - }
  14272. - }
  14273. - }
  14274. - return dest;
  14275. - }
  14276. -
  14277. -
  14278. - //! Correlate the image by a mask
  14279. - /**
  14280. - This is the in-place version of get_correlate.
  14281. - \see get_correlate
  14282. - **/
  14283. - template<typename t> CImg& correlate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_correl=false) {
  14284. - return get_correlate(mask,cond,weighted_correl).swap(*this);
  14285. - }
  14286. -
  14287. - //! Return the convolution of the image by a mask
  14288. - /**
  14289. - The result \p res of the convolution of an image \p img by a mask \p mask is defined to be :
  14290. -
  14291. - res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*mask(i,j,k)
  14292. -
  14293. - \param mask = the correlation kernel.
  14294. - \param cond = the border condition type (0=zero, 1=dirichlet)
  14295. - \param weighted_convol = enable local normalization.
  14296. - **/
  14297. - template<typename t> CImg<typename cimg::largest<T,t>::type>
  14298. - get_convolve(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_convol=false) const {
  14299. - typedef typename cimg::largest<T,t>::type restype;
  14300. - typedef typename cimg::largest<t,float>::type fftype;
  14301. - typedef typename cimg::largest<T,fftype>::type ftype;
  14302. -
  14303. - if (is_empty()) return CImg<restype>();
  14304. - if (mask.is_empty() || mask.dim!=1)
  14305. - throw CImgArgumentException("CImg<%s>::get_convolve() : Specified mask (%u,%u,%u,%u,%p) is not scalar.",
  14306. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
  14307. - CImg<restype> dest(width,height,depth,dim);
  14308. - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { // optimized version
  14309. - switch (mask.depth) {
  14310. - case 3: {
  14311. - CImg_3x3x3(I,T);
  14312. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv3x3x3(I,mask);
  14313. - else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) {
  14314. - const double norm = (double)cimg_squaresum3x3x3(I);
  14315. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x3(I,mask)/std::sqrt(norm)):0;
  14316. - }
  14317. - } break;
  14318. - case 2: {
  14319. - CImg_2x2x2(I,T);
  14320. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv2x2x2(I,mask);
  14321. - else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) {
  14322. - const double norm = (double)cimg_squaresum2x2x2(I);
  14323. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x2(I,mask)/std::sqrt(norm)):0;
  14324. - }
  14325. - } break;
  14326. - default:
  14327. - case 1:
  14328. - switch (mask.width) {
  14329. - case 5: {
  14330. - CImg_5x5(I,T);
  14331. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv5x5(I,mask);
  14332. - else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) {
  14333. - const double norm = (double)cimg_squaresum5x5(I);
  14334. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv5x5(I,mask)/std::sqrt(norm)):0;
  14335. - }
  14336. - } break;
  14337. - case 4: {
  14338. - CImg_4x4(I,T);
  14339. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv4x4(I,mask);
  14340. - else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) {
  14341. - const double norm = (double)cimg_squaresum4x4(I);
  14342. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv4x4(I,mask)/std::sqrt(norm)):0;
  14343. - }
  14344. - } break;
  14345. - case 3: {
  14346. - CImg_3x3(I,T);
  14347. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv3x3(I,mask);
  14348. - else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) {
  14349. - const double norm = (double)cimg_squaresum3x3(I);
  14350. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3(I,mask)/std::sqrt(norm)):0;
  14351. - }
  14352. - } break;
  14353. - case 2: {
  14354. - CImg_2x2(I,T);
  14355. - if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv2x2(I,mask);
  14356. - else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) {
  14357. - const double norm = (double)cimg_squaresum2x2(I);
  14358. - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2(I,mask)/std::sqrt(norm)):0;
  14359. - }
  14360. - } break;
  14361. - case 1: dest = mask(0)*(*this); break;
  14362. - }
  14363. - }
  14364. - } else { // generic version
  14365. -
  14366. - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
  14367. - cimg_forV(*this,v)
  14368. - if (!weighted_convol) { // Classical convolution
  14369. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14370. - ftype val = 0;
  14371. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14372. - val+= (*this)(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
  14373. - dest(x,y,z,v)=(restype)val;
  14374. - }
  14375. - if (cond) cimg_forYZV(*this,y,z,v)
  14376. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14377. - ftype val = 0;
  14378. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14379. - val+= pix3d(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0);
  14380. - dest(x,y,z,v)=(restype)val;
  14381. - }
  14382. - else cimg_forYZV(*this,y,z,v)
  14383. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14384. - ftype val = 0;
  14385. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14386. - val+= pix3d(x-xm,y-ym,z-zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0);
  14387. - dest(x,y,z,v)=(restype)val;
  14388. - }
  14389. - } else { // Weighted convolution
  14390. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14391. - ftype val = 0, norm = 0;
  14392. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14393. - const T cval = (*this)(x-xm,y-ym,z-zm,v);
  14394. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14395. - norm+= cval*cval;
  14396. - }
  14397. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
  14398. - }
  14399. - if (cond) cimg_forYZV(*this,y,z,v)
  14400. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14401. - ftype val = 0, norm = 0;
  14402. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14403. - const T cval = pix3d(x-xm,y-ym,z-zm,v);
  14404. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14405. - norm+=cval*cval;
  14406. - }
  14407. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
  14408. - }
  14409. - else cimg_forYZV(*this,y,z,v)
  14410. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14411. - double val = 0, norm = 0;
  14412. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) {
  14413. - const T cval = pix3d(x-xm,y-ym,z-zm,v,0);
  14414. - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0);
  14415. - norm+= cval*cval;
  14416. - }
  14417. - dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0;
  14418. - }
  14419. - }
  14420. - }
  14421. - return dest;
  14422. - }
  14423. -
  14424. - //! Convolve the image by a mask
  14425. - /**
  14426. - This is the in-place version of get_convolve().
  14427. - \see get_convolve()
  14428. - **/
  14429. - template<typename t> CImg& convolve(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_convol=false) {
  14430. - return get_convolve(mask,cond,weighted_convol).swap(*this);
  14431. - }
  14432. -
  14433. - //! Return the erosion of the image by a structuring element.
  14434. - template<typename t> CImg<typename cimg::largest<T,t>::type>
  14435. - get_erode(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_erosion=false) const {
  14436. - typedef typename cimg::largest<T,t>::type restype;
  14437. - if (is_empty()) return CImg<restype>();
  14438. - if (mask.is_empty() || mask.dim!=1)
  14439. - throw CImgArgumentException("CImg<%s>::get_erosion() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.",
  14440. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
  14441. - CImg<restype> dest(width,height,depth,dim);
  14442. - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2,
  14443. - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
  14444. - cimg_forV(*this,v)
  14445. - if (!weighted_erosion) { // Classical erosion
  14446. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14447. - restype min_val = cimg::type<restype>::max();
  14448. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14449. - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)(*this)(x+xm,y+ym,z+zm,v),min_val);
  14450. - dest(x,y,z,v)=min_val;
  14451. - }
  14452. - if (cond) cimg_forYZV(*this,y,z,v)
  14453. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14454. - restype min_val = cimg::type<restype>::max();
  14455. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14456. - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v),min_val);
  14457. - dest(x,y,z,v)=min_val;
  14458. - }
  14459. - else cimg_forYZV(*this,y,z,v)
  14460. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14461. - restype min_val = cimg::type<restype>::max();
  14462. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14463. - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v,0),min_val);
  14464. - dest(x,y,z,v)=min_val;
  14465. - }
  14466. - } else { // Weighted erosion
  14467. - t mval=0;
  14468. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14469. - restype min_val = cimg::type<restype>::max();
  14470. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14471. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)((*this)(x+xm,y+ym,z+zm,v)+mval),min_val);
  14472. - dest(x,y,z,v)=min_val;
  14473. - }
  14474. - if (cond) cimg_forYZV(*this,y,z,v)
  14475. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14476. - restype min_val = cimg::type<restype>::max();
  14477. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14478. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v)+mval),min_val);
  14479. - dest(x,y,z,v)=min_val;
  14480. - }
  14481. - else cimg_forYZV(*this,y,z,v)
  14482. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14483. - restype min_val = cimg::type<restype>::max();
  14484. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14485. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v,0)+mval),min_val);
  14486. - dest(x,y,z,v)=min_val;
  14487. - }
  14488. - }
  14489. - return dest;
  14490. - }
  14491. -
  14492. - //! Erode the image by a structuring element
  14493. - /**
  14494. - This is the in-place version of get_erode().
  14495. - \see get_erode()
  14496. - **/
  14497. - template<typename t> CImg& erode(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_erosion=false) {
  14498. - return get_erode(mask,cond,weighted_erosion).swap(*this);
  14499. - }
  14500. -
  14501. - //! Erode the image by a square structuring element of size n
  14502. - CImg get_erode(const unsigned int n, const unsigned int cond=1) const {
  14503. - static CImg<T> mask;
  14504. - if (mask.width!=n) mask.assign(n,n,1,1,1);
  14505. - const CImg<T> res = get_erode(mask,cond,false);
  14506. - if (n>20) mask.assign();
  14507. - return res;
  14508. - }
  14509. -
  14510. - //! Erode the image by a square structuring element of size n
  14511. - CImg& erode(const unsigned int n, const unsigned int cond=1) {
  14512. - return get_erode(n,cond).swap(*this);
  14513. - }
  14514. -
  14515. - //! Return the dilatation of the image by a structuring element.
  14516. - template<typename t> CImg<typename cimg::largest<T,t>::type>
  14517. - get_dilate(const CImg<t>& mask, const unsigned int cond=1, const bool weighted_dilatation=false) const {
  14518. - typedef typename cimg::largest<T,t>::type restype;
  14519. - if (is_empty()) return CImg<restype>();
  14520. - if (mask.is_empty() || mask.dim!=1)
  14521. - throw CImgArgumentException("CImg<%s>::get_dilate() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.",
  14522. - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data);
  14523. - CImg<restype> dest(width,height,depth,dim);
  14524. - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2,
  14525. - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2);
  14526. - cimg_forV(*this,v)
  14527. - if (!weighted_dilatation) { // Classical dilatation
  14528. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14529. - restype max_val = cimg::type<restype>::min();
  14530. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14531. - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)(*this)(x+xm,y+ym,z+zm,v),max_val);
  14532. - dest(x,y,z,v)=max_val;
  14533. - }
  14534. - if (cond) cimg_forYZV(*this,y,z,v)
  14535. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14536. - restype max_val = cimg::type<restype>::min();
  14537. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14538. - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v),max_val);
  14539. - dest(x,y,z,v)=max_val;
  14540. - }
  14541. - else cimg_forYZV(*this,y,z,v)
  14542. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14543. - restype max_val = cimg::type<restype>::min();
  14544. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14545. - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v,0),max_val);
  14546. - dest(x,y,z,v)=max_val;
  14547. - }
  14548. - } else { // Weighted dilatation
  14549. - t mval=0;
  14550. - for (int z=czm; z<dimz()-czm; z++) for (int y=cym; y<dimy()-cym; y++) for (int x=cxm; x<dimx()-cxm; x++) {
  14551. - restype max_val = cimg::type<restype>::min();
  14552. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14553. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)((*this)(x+xm,y+ym,z+zm,v)-mval),max_val);
  14554. - dest(x,y,z,v)=max_val;
  14555. - }
  14556. - if (cond) cimg_forYZV(*this,y,z,v)
  14557. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14558. - restype max_val = cimg::type<restype>::min();
  14559. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14560. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v)-mval),max_val);
  14561. - dest(x,y,z,v)=max_val;
  14562. - }
  14563. - else cimg_forYZV(*this,y,z,v)
  14564. - for (int x=0; x<dimx(); (y<cym || y>=dimy()-cym || z<czm || z>=dimz()-czm)?x++:((x<cxm-1 || x>=dimx()-cxm)?x++:(x=dimx()-cxm))) {
  14565. - restype max_val = cimg::type<restype>::min();
  14566. - for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++)
  14567. - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v,0)-mval),max_val);
  14568. - dest(x,y,z,v)=max_val;
  14569. - }
  14570. - }
  14571. - return dest;
  14572. - }
  14573. -
  14574. - //! Dilate the image by a structuring element
  14575. - /**
  14576. - This is the in-place version of get_dilate().
  14577. - \see get_dilate()
  14578. - **/
  14579. - template<typename t> CImg& dilate(const CImg<t>& mask,const unsigned int cond=1,const bool weighted_dilatation=false) {
  14580. - return get_dilate(mask,cond,weighted_dilatation).swap(*this);
  14581. - }
  14582. -
  14583. - //! Dilate the image by a square structuring element of size n
  14584. - CImg get_dilate(const unsigned int n, const unsigned int cond=1) const {
  14585. - static CImg<T> mask;
  14586. - if (mask.width!=n) mask.assign(n,n,1,1,1);
  14587. - const CImg<T> res = get_dilate(mask,cond,false);
  14588. - if (n>20) mask.assign();
  14589. - return res;
  14590. - }
  14591. -
  14592. - //! Dilate the image by a square structuring element of size n
  14593. - CImg& dilate(const unsigned int n, const unsigned int cond=1) {
  14594. - return get_dilate(n,cond).swap(*this);
  14595. - }
  14596. -
  14597. - //! Add noise to the image
  14598. - /**
  14599. - This is the in-place version of get_noise.
  14600. - \see get_noise.
  14601. - **/
  14602. - CImg& noise(const double sigma=-20, const unsigned int ntype=0) {
  14603. - if (!is_empty()) {
  14604. - double nsigma = sigma, max = (double)cimg::type<T>::max(), min = (double)cimg::type<T>::min();
  14605. - static bool first_time = true;
  14606. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  14607. - CImgStats st;
  14608. - if (nsigma==0) return *this;
  14609. - if (nsigma<0 || ntype==2) st = CImgStats(*this,false);
  14610. - if (nsigma<0) nsigma = -nsigma*(st.max-st.min)/100.0;
  14611. - switch (ntype) {
  14612. - case 0: { // Gaussian noise
  14613. - cimg_for(*this,ptr,T) {
  14614. - double val = *ptr+nsigma*cimg::grand();
  14615. - if (val>max) val = max;
  14616. - if (val<min) val = min;
  14617. - *ptr = (T)val;
  14618. - }
  14619. - } break;
  14620. - case 1: { // Uniform noise
  14621. - cimg_for(*this,ptr,T) {
  14622. - double val = *ptr+nsigma*cimg::crand();
  14623. - if (val>max) val = max;
  14624. - if (val<min) val = min;
  14625. - *ptr = (T)val;
  14626. - }
  14627. - } break;
  14628. - case 2: { // Salt & Pepper noise
  14629. - if (st.max==st.min) { st.min=0; st.max=255; }
  14630. - cimg_for(*this,ptr,T) if (cimg::rand()*100<nsigma) *ptr=(T)(cimg::rand()<0.5?st.max:st.min);
  14631. - } break;
  14632. - case 3: { // Poisson Noise
  14633. - cimg_for(*this,ptr,T) {
  14634. - const double z = (double)*ptr;
  14635. - if (z<=1.0e-10) *ptr=(T)0;
  14636. - else {
  14637. - if (z>100.0) *ptr = (T)(unsigned int)((std::sqrt(z) * cimg::grand()) + z);
  14638. - else {
  14639. - unsigned int k = 0;
  14640. - const double y=std::exp(-z);
  14641. - for (double s=1.0; s>=y; k++) s *= cimg::rand();
  14642. - *ptr=(T)(k-1);
  14643. - }
  14644. - }
  14645. - }
  14646. - } break;
  14647. - case 4: { // Rice noise
  14648. - const double sqrt2 = (double)std::sqrt(2.0);
  14649. - cimg_for(*this,ptr,T) {
  14650. - const double
  14651. - val0 = (double)*ptr/sqrt2,
  14652. - re = val0 + nsigma*cimg::grand(),
  14653. - im = val0 + nsigma*cimg::grand();
  14654. - double val = std::sqrt(re*re + im*im);
  14655. - if (val>max) val = max;
  14656. - if (val<min) val = min;
  14657. - *ptr = (T)val;
  14658. - }
  14659. - } break;
  14660. - }
  14661. - }
  14662. - return *this;
  14663. - }
  14664. -
  14665. - //! Return a noisy image
  14666. - /**
  14667. - \param sigma = power of the noise. if sigma<0, it corresponds to the percentage of the maximum image value.
  14668. - \param ntype = noise type. can be 0=gaussian, 1=uniform or 2=Salt and Pepper.
  14669. - \return A noisy version of the instance image.
  14670. - **/
  14671. - CImg get_noise(const double sigma=-20,const unsigned int ntype=0) const {
  14672. - return (+*this).noise(sigma,ntype);
  14673. - }
  14674. -
  14675. -#define cimg_deriche_apply(x0,y0,z0,k0,nb,offset,T) { \
  14676. - ima = ptr(x0,y0,z0,k0); \
  14677. - I2 = *ima; ima+=offset; I1 = *ima; ima+=offset; \
  14678. - Y2 = *(Y++) = sumg0*I2; Y1 = *(Y++) = g0*I1 + sumg1*I2; \
  14679. - for (i=2; i<(nb); i++) { I1 = *ima; ima+=offset; \
  14680. - Y0 = *(Y++) = a1*I1 + a2*I2 + b1*Y1 + b2*Y2; \
  14681. - I2=I1; Y2=Y1; Y1=Y0; } \
  14682. - ima-=offset; I2 = *ima; Y2 = Y1 = parity*sumg1*I2; *ima = (T)(*(--Y)+Y2); \
  14683. - ima-=offset; I1 = *ima; *ima = (T)(*(--Y)+Y1); \
  14684. - for (i=(nb)-3; i>=0; i--) { Y0=a3*I1+a4*I2+b1*Y1+b2*Y2; ima-=offset; \
  14685. - I2=I1; I1=*ima; *ima=(T)(*(--Y)+Y0); Y2=Y1; Y1=Y0; } \
  14686. - }
  14687. -
  14688. - //! Apply a deriche filter on the image
  14689. - /**
  14690. - This is the in-place version of get_deriche
  14691. - \see get_deriche.
  14692. - **/
  14693. - CImg& deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) {
  14694. - if (!is_empty()) {
  14695. - if (sigma<0 || order<0 || order>2)
  14696. - throw CImgArgumentException("CImg<%s>::deriche() : Bad arguments (sigma=%g, order=%d)",pixel_type(),sigma,order);
  14697. - const float alpha=sigma>0?(1.695f/sigma):20,ea=(float)std::exp(alpha),ema=(float)std::exp(-alpha),em2a=ema*ema,b1=2*ema,b2=-em2a;
  14698. - float ek,ekn,parity,a1,a2,a3,a4,g0,sumg1,sumg0;
  14699. - double *Y,Y0,Y1,Y2;
  14700. - int i,offset,nb;
  14701. - T *ima,I1,I2;
  14702. - switch(order) {
  14703. - case 1: // first derivative
  14704. - ek = -(1-ema)*(1-ema)*(1-ema)/(2*(ema+1)*ema); a1 = a4 = 0; a2 = ek*ema; a3 = -ek*ema; parity =-1;
  14705. - if (cond) { sumg1 = (ek*ea) / ((ea-1)*(ea-1)); g0 = 0; sumg0 = g0+sumg1; }
  14706. - else g0 = sumg0 = sumg1 = 0;
  14707. - break;
  14708. - case 2: // second derivative
  14709. - ekn = ( -2*(-1+3*ea-3*ea*ea+ea*ea*ea)/(3*ea+1+3*ea*ea+ea*ea*ea) );
  14710. - ek = -(em2a-1)/(2*alpha*ema); a1 = ekn; a2 = -ekn*(1+ek*alpha)*ema; a3 = ekn*(1-ek*alpha)*ema; a4 = -ekn*em2a; parity =1;
  14711. - if (cond) { sumg1 = ekn/2; g0 = ekn; sumg0 = g0+sumg1; }
  14712. - else g0=sumg0=sumg1=0;
  14713. - break;
  14714. - default: // smoothing
  14715. - ek = (1-ema)*(1-ema) / (1+2*alpha*ema - em2a); a1 = ek; a2 = ek*ema*(alpha-1); a3 = ek*ema*(alpha+1); a4 = -ek*em2a; parity = 1;
  14716. - if (cond) { sumg1 = ek*(alpha*ea+ea-1) / ((ea-1)*(ea-1)); g0 = ek; sumg0 = g0+sumg1; }
  14717. - else g0=sumg0=sumg1=0;
  14718. - break;
  14719. - }
  14720. - // filter init
  14721. - Y = new double[cimg::max(width,height,depth)];
  14722. - switch(cimg::uncase(axe)) {
  14723. - case 'x': if (width>1) { offset = 1; nb = width; cimg_forYZV(*this,y,z,k) cimg_deriche_apply(0,y,z,k,nb,offset,T); } break;
  14724. - case 'y': if (height>1) { offset = width; nb = height; cimg_forXZV(*this,x,z,k) cimg_deriche_apply(x,0,z,k,nb,offset,T); } break;
  14725. - case 'z': if (depth>1) { offset = width*height; nb = depth; cimg_forXYV(*this,x,y,k) cimg_deriche_apply(x,y,0,k,nb,offset,T); } break;
  14726. - default: throw CImgArgumentException("CImg<%s>::deriche() : unknow axe '%c', must be 'x','y' or 'z'",pixel_type(),axe);
  14727. - }
  14728. - delete[] Y;
  14729. - }
  14730. - return *this;
  14731. - }
  14732. -
  14733. - //! Return the result of the Deriche filter
  14734. - /**
  14735. - The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of
  14736. - order 0,1 or 2 of an image.
  14737. - \see blur
  14738. - **/
  14739. - CImg get_deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) const {
  14740. - return (+*this).deriche(sigma,order,axe,cond);
  14741. - }
  14742. -
  14743. - //! Blur the image with a Deriche filter (anisotropically)
  14744. - /**
  14745. - This is the in-place version of get_blur().
  14746. - \see get_blur().
  14747. - **/
  14748. - CImg& blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) {
  14749. - if (!is_empty()) {
  14750. - if (width>1 && sigmax>0) deriche(sigmax,0,'x',cond);
  14751. - if (height>1 && sigmay>0) deriche(sigmay,0,'y',cond);
  14752. - if (depth>1 && sigmaz>0) deriche(sigmaz,0,'z',cond);
  14753. - }
  14754. - return *this;
  14755. - }
  14756. -
  14757. - //! Blur the image with a Canny-Deriche filter.
  14758. - /** This is the in-place version of get_blur(). **/
  14759. - CImg& blur(const float sigma,const unsigned int cond=1) { return blur(sigma,sigma,sigma,cond); }
  14760. -
  14761. - //! Return a blurred version of the image, using a Canny-Deriche filter.
  14762. - /**
  14763. - Blur the image with an anisotropic exponential filter (Deriche filter of order 0).
  14764. - **/
  14765. - CImg get_blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) const {
  14766. - return (+*this).blur(sigmax,sigmay,sigmaz,cond);
  14767. - }
  14768. -
  14769. - //! Return a blurred version of the image, using a Canny-Deriche filter.
  14770. - CImg get_blur(const float sigma,const unsigned int cond=1) const {
  14771. - return (+*this).blur(sigma,cond);
  14772. - }
  14773. -
  14774. - //! Blur an image following a field of diffusion tensors.
  14775. - /** This is the in-place version of get_blur_anisotropic(). **/
  14776. - template<typename t>
  14777. - CImg& blur_anisotropic(const CImg<t>& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f,
  14778. - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) {
  14779. -#define cimg_valign2d(i,j) \
  14780. - { ftype &u = W(i,j,0,0), &v = W(i,j,0,1); \
  14781. - if (u*curru + v*currv<0) { u=-u; v=-v; }}
  14782. -#define cimg_valign3d(i,j,k) \
  14783. - { ftype &u = W(i,j,k,0), &v = W(i,j,k,1), &w = W(i,j,k,2); \
  14784. - if (u*curru + v*currv + w*currw<0) { u=-u; v=-v; w=-w; }}
  14785. -
  14786. - // Check arguments and init variables
  14787. - typedef typename cimg::largest<T,float>::type ftype;
  14788. - if (!is_empty() && amplitude>0) {
  14789. - if (G.is_empty() || (G.dim!=3 && G.dim!=6) || G.width!=width || G.height!=height || G.depth!=depth)
  14790. - throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Specified tensor field (%u,%u,%u,%u) is not valid.",
  14791. - pixel_type(),G.width,G.height,G.depth,G.dim);
  14792. -
  14793. - const float sqrt2amplitude = (float)std::sqrt(2*amplitude);
  14794. - const bool threed = (G.dim>=6);
  14795. - const int
  14796. - dx1 = dimx()-1,
  14797. - dy1 = dimy()-1,
  14798. - dz1 = dimz()-1;
  14799. - CImg<ftype>
  14800. - dest(width,height,depth,dim,0),
  14801. - W(width,height,depth,threed?4:3),
  14802. - tmp(dim);
  14803. - int N = 0;
  14804. -
  14805. - if (threed)
  14806. - // 3D version of the algorithm
  14807. - for (float phi=(180%(int)da)/2.0f; phi<=180; phi+=da) {
  14808. - const float
  14809. - phir = (float)(phi*cimg::PI/180),
  14810. - datmp = (float)(da/std::cos(phir)),
  14811. - da2 = datmp<1?360.0f:datmp;
  14812. -
  14813. - for (float theta=0; theta<360; (theta+=da2),N++) {
  14814. - const float
  14815. - thetar = (float)(theta*cimg::PI/180),
  14816. - vx = (float)(std::cos(thetar)*std::cos(phir)),
  14817. - vy = (float)(std::sin(thetar)*std::cos(phir)),
  14818. - vz = (float)std::sin(phir);
  14819. - const t
  14820. - *pa = G.ptr(0,0,0,0),
  14821. - *pb = G.ptr(0,0,0,1),
  14822. - *pc = G.ptr(0,0,0,2),
  14823. - *pd = G.ptr(0,0,0,3),
  14824. - *pe = G.ptr(0,0,0,4),
  14825. - *pf = G.ptr(0,0,0,5);
  14826. - ftype
  14827. - *pd0 = W.ptr(0,0,0,0),
  14828. - *pd1 = W.ptr(0,0,0,1),
  14829. - *pd2 = W.ptr(0,0,0,2),
  14830. - *pd3 = W.ptr(0,0,0,3);
  14831. - cimg_forXYZ(G,xg,yg,zg) {
  14832. - const t
  14833. - a = *(pa++), b = *(pb++), c = *(pc++),
  14834. - d = *(pd++), e = *(pe++), f = *(pf++);
  14835. - const float
  14836. - u = (float)(a*vx + b*vy + c*vz),
  14837. - v = (float)(b*vx + d*vy + e*vz),
  14838. - w = (float)(c*vx + e*vy + f*vz),
  14839. - n = (float)std::sqrt(1e-5+u*u+v*v+w*w),
  14840. - dln = dl/n;
  14841. - *(pd0++) = (ftype)(u*dln);
  14842. - *(pd1++) = (ftype)(v*dln);
  14843. - *(pd2++) = (ftype)(w*dln);
  14844. - *(pd3++) = (ftype)n;
  14845. - }
  14846. -
  14847. - cimg_forXYZ(*this,x,y,z) {
  14848. - tmp.fill(0);
  14849. - const float
  14850. - cu = (float)W(x,y,z,0),
  14851. - cv = (float)W(x,y,z,1),
  14852. - cw = (float)W(x,y,z,2),
  14853. - n = (float)W(x,y,z,3),
  14854. - fsigma = (float)(n*sqrt2amplitude),
  14855. - length = gauss_prec*fsigma,
  14856. - fsigma2 = 2*fsigma*fsigma;
  14857. - float
  14858. - S = 0,
  14859. - pu = cu,
  14860. - pv = cv,
  14861. - pw = cw,
  14862. - X = (float)x,
  14863. - Y = (float)y,
  14864. - Z = (float)z;
  14865. -
  14866. - switch (interpolation) {
  14867. - case 0:
  14868. - // Nearest neighbor
  14869. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
  14870. - const int
  14871. - cx = (int)(X+0.5f),
  14872. - cy = (int)(Y+0.5f),
  14873. - cz = (int)(Z+0.5f);
  14874. - float
  14875. - u = (float)W(cx,cy,cz,0),
  14876. - v = (float)W(cx,cy,cz,1),
  14877. - w = (float)W(cx,cy,cz,2);
  14878. - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
  14879. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,cz,k); S++; }
  14880. - else {
  14881. - const float coef = (float)std::exp(-l*l/fsigma2);
  14882. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,cz,k));
  14883. - S+=coef;
  14884. - }
  14885. - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
  14886. - } break;
  14887. -
  14888. - case 1:
  14889. - // Linear interpolation
  14890. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
  14891. - const int
  14892. - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
  14893. - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1,
  14894. - cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1;
  14895. - const float
  14896. - curru = (float)W(cx,cy,cz,0),
  14897. - currv = (float)W(cx,cy,cz,1),
  14898. - currw = (float)W(cx,cy,cz,2);
  14899. - cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz);
  14900. - cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz);
  14901. - cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz);
  14902. - cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz);
  14903. - cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz);
  14904. - cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz);
  14905. - cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz);
  14906. - cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz);
  14907. - cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz);
  14908. - float
  14909. - u = (float)(W.linear_pix3d(X,Y,Z,0)),
  14910. - v = (float)(W.linear_pix3d(X,Y,Z,1)),
  14911. - w = (float)(W.linear_pix3d(X,Y,Z,2));
  14912. - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
  14913. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; }
  14914. - else {
  14915. - const float coef = (float)std::exp(-l*l/fsigma2);
  14916. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k));
  14917. - S+=coef;
  14918. - }
  14919. - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
  14920. - } break;
  14921. -
  14922. - default:
  14923. - // 2nd order Runge Kutta
  14924. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) {
  14925. - const int
  14926. - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
  14927. - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1,
  14928. - cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1;
  14929. - const float
  14930. - curru = (float)W(cx,cy,cz,0),
  14931. - currv = (float)W(cx,cy,cz,1),
  14932. - currw = (float)W(cx,cy,cz,2);
  14933. - cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz);
  14934. - cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz);
  14935. - cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz);
  14936. - cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz);
  14937. - cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz);
  14938. - cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz);
  14939. - cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz);
  14940. - cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz);
  14941. - cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz);
  14942. - const float
  14943. - u0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,0)),
  14944. - v0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,1)),
  14945. - w0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,2));
  14946. - float
  14947. - u = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,0)),
  14948. - v = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,1)),
  14949. - w = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,2));
  14950. - if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; }
  14951. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; }
  14952. - else {
  14953. - const float coef = (float)std::exp(-l*l/fsigma2);
  14954. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k));
  14955. - S+=coef;
  14956. - }
  14957. - X+=(pu=u); Y+=(pv=v); Z+=(pw=w);
  14958. - } break;
  14959. - }
  14960. - if (S>0) cimg_forV(dest,k) dest(x,y,z,k)+=tmp[k]/S;
  14961. - else cimg_forV(dest,k) dest(x,y,z,k)+=(ftype)((*this)(x,y,z,k));
  14962. -#ifdef cimg_plugin_greycstoration
  14963. - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
  14964. - else return *this;
  14965. -#endif
  14966. - }
  14967. - }
  14968. - } else
  14969. - // 2D version of the algorithm
  14970. - for (float theta=(360%(int)da)/2.0f; theta<360; (theta+=da),N++) {
  14971. - const float
  14972. - thetar = (float)(theta*cimg::PI/180),
  14973. - vx = (float)(std::cos(thetar)),
  14974. - vy = (float)(std::sin(thetar));
  14975. - const t
  14976. - *pa = G.ptr(0,0,0,0),
  14977. - *pb = G.ptr(0,0,0,1),
  14978. - *pc = G.ptr(0,0,0,2);
  14979. - ftype
  14980. - *pd0 = W.ptr(0,0,0,0),
  14981. - *pd1 = W.ptr(0,0,0,1),
  14982. - *pd2 = W.ptr(0,0,0,2);
  14983. - cimg_forXY(G,xg,yg) {
  14984. - const t a = *(pa++), b = *(pb++), c = *(pc++);
  14985. - const float
  14986. - u = (float)(a*vx + b*vy),
  14987. - v = (float)(b*vx + c*vy),
  14988. - n = (float)std::sqrt(1e-5+u*u+v*v),
  14989. - dln = dl/n;
  14990. - *(pd0++) = (ftype)(u*dln);
  14991. - *(pd1++) = (ftype)(v*dln);
  14992. - *(pd2++) = (ftype)n;
  14993. - }
  14994. -
  14995. - cimg_forXY(*this,x,y) {
  14996. - tmp.fill(0);
  14997. - const float
  14998. - cu = (float)W(x,y,0,0),
  14999. - cv = (float)W(x,y,0,1),
  15000. - n = (float)W(x,y,0,2),
  15001. - fsigma = (float)(n*sqrt2amplitude),
  15002. - length = gauss_prec*fsigma,
  15003. - fsigma2 = 2*fsigma*fsigma;
  15004. - float
  15005. - S = 0,
  15006. - pu = cu,
  15007. - pv = cv,
  15008. - X = (float)x,
  15009. - Y = (float)y;
  15010. -
  15011. - switch (interpolation) {
  15012. -
  15013. - case 0:
  15014. - // Nearest-neighbor interpolation for 2D images
  15015. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
  15016. - const int
  15017. - cx = (int)(X+0.5f),
  15018. - cy = (int)(Y+0.5f);
  15019. - float
  15020. - u = (float)W(cx,cy,0,0),
  15021. - v = (float)W(cx,cy,0,1);
  15022. - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
  15023. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,0,k); S++; }
  15024. - else {
  15025. - const float coef = (float)std::exp(-l*l/fsigma2);
  15026. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,0,k));
  15027. - S+=coef;
  15028. - }
  15029. - X+=(pu=u); Y+=(pv=v);
  15030. - } break;
  15031. -
  15032. - case 1:
  15033. - // Linear interpolation for 2D images
  15034. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
  15035. - const int
  15036. - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
  15037. - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1;
  15038. - const float
  15039. - curru = (float)W(cx,cy,0,0),
  15040. - currv = (float)W(cx,cy,0,1);
  15041. - cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py);
  15042. - cimg_valign2d(px,cy); cimg_valign2d(nx,cy);
  15043. - cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny);
  15044. - float
  15045. - u = (float)(W.linear_pix2d(X,Y,0,0)),
  15046. - v = (float)(W.linear_pix2d(X,Y,0,1));
  15047. - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
  15048. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; }
  15049. - else {
  15050. - const float coef = (float)std::exp(-l*l/fsigma2);
  15051. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k));
  15052. - S+=coef;
  15053. - }
  15054. - X+=(pu=u); Y+=(pv=v);
  15055. - } break;
  15056. -
  15057. - default:
  15058. - // 2nd-order Runge-kutta interpolation for 2D images
  15059. - for (float l=0; l<length && X>=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) {
  15060. - const int
  15061. - cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1,
  15062. - cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1;
  15063. - const float
  15064. - curru = (float)W(cx,cy,0,0),
  15065. - currv = (float)W(cx,cy,0,1);
  15066. - cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py);
  15067. - cimg_valign2d(px,cy); cimg_valign2d(nx,cy);
  15068. - cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny);
  15069. - const float
  15070. - u0 = (float)(0.5f*W.linear_pix2d(X,Y,0,0)),
  15071. - v0 = (float)(0.5f*W.linear_pix2d(X,Y,0,1));
  15072. - float
  15073. - u = (float)(W.linear_pix2d(X+u0,Y+v0,0,0)),
  15074. - v = (float)(W.linear_pix2d(X+u0,Y+v0,0,1));
  15075. - if ((pu*u + pv*v)<0) { u=-u; v=-v; }
  15076. - if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; }
  15077. - else {
  15078. - const float coef = (float)std::exp(-l*l/fsigma2);
  15079. - cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k));
  15080. - S+=coef;
  15081. - }
  15082. - X+=(pu=u); Y+=(pv=v);
  15083. - } break;
  15084. - }
  15085. - if (S>0) cimg_forV(dest,k) dest(x,y,0,k)+=tmp[k]/S;
  15086. - else cimg_forV(dest,k) dest(x,y,0,k)+=(ftype)((*this)(x,y,0,k));
  15087. -#ifdef cimg_plugin_greycstoration
  15088. - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
  15089. - else return *this;
  15090. -#endif
  15091. - }
  15092. - }
  15093. - const ftype *ptrs = dest.data+dest.size();
  15094. - const T m = cimg::type<T>::min(), M = cimg::type<T>::max();
  15095. - cimg_for(*this,ptrd,T) { const ftype val = *(--ptrs)/N; *ptrd = val<m?m:(val>M?M:(T)val); }
  15096. - }
  15097. - return *this;
  15098. - }
  15099. -
  15100. - //! Get a blurred version of an image following a field of diffusion tensors.
  15101. - /**
  15102. - \param G = Field of square roots of diffusion tensors used to drive the smoothing.
  15103. - \param amplitude = amplitude of the smoothing.
  15104. - \param dl = spatial discretization.
  15105. - \param da = angular discretization.
  15106. - \param gauss_prec = precision of the gaussian function.
  15107. - \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta)
  15108. - \param fast_approx = Tell to use the fast approximation or not.
  15109. - **/
  15110. - template<typename t>
  15111. - CImg get_blur_anisotropic(const CImg<t>& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f,
  15112. - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) const {
  15113. - return (+*this).blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
  15114. - }
  15115. -
  15116. - //! Blur an image following a field of diffusion tensors.
  15117. - template<typename tm>
  15118. - CImg& blur_anisotropic(const CImg<tm>& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
  15119. - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f,
  15120. - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,
  15121. - const float geom_factor=1.0f) {
  15122. - if (!is_empty() && amplitude>0) {
  15123. - if (amplitude==0) return *this;
  15124. - if (amplitude<0 || sharpness<0 || anisotropy<0 || anisotropy>1 || alpha<0 || sigma<0 || dl<0 || da<0 || gauss_prec<0)
  15125. - throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Given parameters are amplitude(%g), sharpness(%g), "
  15126. - "anisotropy(%g), alpha(%g), sigma(%g), dl(%g), da(%g), gauss_prec(%g).\n"
  15127. - "Admissible parameters are in the range : amplitude>0, sharpness>0, anisotropy in [0,1], "
  15128. - "alpha>0, sigma>0, dl>0, da>0, gauss_prec>0.",
  15129. - pixel_type(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec);
  15130. - const bool threed = (depth>1), no_mask = mask.is_empty();
  15131. - const float nsharpness = cimg::max(sharpness,1e-5f), power1 = 0.5f*nsharpness, power2 = power1/(1e-7f+1.0f-anisotropy);
  15132. -
  15133. - CImg<float> blurred = CImg<float>(*this,false).blur(alpha);
  15134. - if (geom_factor>0) blurred*=geom_factor;
  15135. - else blurred.normalize(0,-geom_factor);
  15136. -
  15137. - if (threed) { // Field for 3D volumes
  15138. - CImg<float> val(3), vec(3,3), G(blurred.get_structure_tensorXYZ());
  15139. - if (sigma>0) G.blur(sigma);
  15140. - cimg_forXYZ(*this,x,y,z) {
  15141. - if (no_mask || mask(x,y,z)) {
  15142. - G.get_tensor_at(x,y,z).symmetric_eigen(val,vec);
  15143. - const float l1 = val[2], l2 = val[1], l3 = val[0],
  15144. - ux = vec(0,0), uy = vec(0,1), uz = vec(0,2),
  15145. - vx = vec(1,0), vy = vec(1,1), vz = vec(1,2),
  15146. - wx = vec(2,0), wy = vec(2,1), wz = vec(2,2),
  15147. - n1 = (float)std::pow(1.0f+l1+l2+l3,-power1),
  15148. - n2 = (float)std::pow(1.0f+l1+l2+l3,-power2);
  15149. - G(x,y,z,0) = n1*(ux*ux + vx*vx) + n2*wx*wx;
  15150. - G(x,y,z,1) = n1*(ux*uy + vx*vy) + n2*wx*wy;
  15151. - G(x,y,z,2) = n1*(ux*uz + vx*vz) + n2*wx*wz;
  15152. - G(x,y,z,3) = n1*(uy*uy + vy*vy) + n2*wy*wy;
  15153. - G(x,y,z,4) = n1*(uy*uz + vy*vz) + n2*wy*wz;
  15154. - G(x,y,z,5) = n1*(uz*uz + vz*vz) + n2*wz*wz;
  15155. - } else G(x,y,z,0) = G(x,y,z,1) = G(x,y,z,2) = G(x,y,z,3) = G(x,y,z,4) = G(x,y,z,5) = 0;
  15156. -#ifdef cimg_plugin_greycstoration
  15157. - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
  15158. - else return *this;
  15159. -#endif
  15160. - }
  15161. - blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
  15162. - } else { // Field for 2D images
  15163. - CImg<float> val(2), vec(2,2), G(blurred.get_structure_tensorXY());
  15164. - if (sigma>0) G.blur(sigma);
  15165. - cimg_forXY(*this,x,y) {
  15166. - if (no_mask || mask(x,y)) {
  15167. - G.get_tensor_at(x,y).symmetric_eigen(val,vec);
  15168. - const float l1 = val[1], l2 = val[0],
  15169. - ux = vec(1,0), uy = vec(1,1),
  15170. - vx = vec(0,0), vy = vec(0,1),
  15171. - n1 = (float)std::pow(1.0f+l1+l2,-power1),
  15172. - n2 = (float)std::pow(1.0f+l1+l2,-power2);
  15173. - G(x,y,0,0) = n1*ux*ux + n2*vx*vx;
  15174. - G(x,y,0,1) = n1*ux*uy + n2*vx*vy;
  15175. - G(x,y,0,2) = n1*uy*uy + n2*vy*vy;
  15176. - } else G(x,y,0,0) = G(x,y,0,1) = G(x,y,0,2) = 0;
  15177. -#ifdef cimg_plugin_greycstoration
  15178. - if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++;
  15179. - else return *this;
  15180. -#endif
  15181. - }
  15182. - blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx);
  15183. - }
  15184. - }
  15185. - return *this;
  15186. - }
  15187. -
  15188. - //! Blur an image in an anisotropic way.
  15189. - /**
  15190. - \param amplitude = amplitude of the anisotropic blur.
  15191. - \param sharpness = define the contour preservation.
  15192. - \param anisotropy = define the smoothing anisotropy.
  15193. - \param alpha = image pre-blurring (gaussian).
  15194. - \param sigma = regularity of the tensor-valued geometry.
  15195. - \param dl = spatial discretization.
  15196. - \param da = angular discretization.
  15197. - \param gauss_prec = precision of the gaussian function.
  15198. - \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta)
  15199. - \param fast_approx = Tell to use the fast approximation or not
  15200. - **/
  15201. - template<typename tm>
  15202. - CImg get_blur_anisotropic(const CImg<tm>& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
  15203. - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,
  15204. - const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0,
  15205. - const bool fast_approx=true, const float geom_factor=1.0f) const {
  15206. - return (+*this).blur_anisotropic(mask,amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
  15207. - }
  15208. -
  15209. - //! Blur an image following in an anistropic way.
  15210. - CImg& blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
  15211. - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f,
  15212. - const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,
  15213. - const float geom_factor=1.0f) {
  15214. - return blur_anisotropic(CImg<T>(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
  15215. - }
  15216. -
  15217. - //! Blur an image following in an anistropic way.
  15218. - CImg get_blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f,
  15219. - const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,
  15220. - const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0,
  15221. - const bool fast_approx=true, const float geom_factor=1.0f) const {
  15222. - return (+*this).blur_anisotropic(amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor);
  15223. - }
  15224. -
  15225. - //! Return the Fast Fourier Transform of an image (along a specified axis)
  15226. - CImgList<typename cimg::largest<T,float>::type> get_FFT(const char axe, const bool inverse=false) const {
  15227. - typedef typename cimg::largest<T,float>::type restype;
  15228. - return CImgList<restype>(*this).FFT(axe,inverse);
  15229. - }
  15230. -
  15231. - //! Return the Fast Fourier Transform on an image
  15232. - CImgList<typename cimg::largest<T,float>::type> get_FFT(const bool inverse=false) const {
  15233. - typedef typename cimg::largest<T,float>::type restype;
  15234. - return CImgList<restype>(*this).FFT(inverse);
  15235. - }
  15236. -
  15237. - //! Apply a median filter.
  15238. - CImg get_blur_median(const unsigned int n=3) {
  15239. - CImg<T> res(width,height,depth,dim);
  15240. - if (!n || n==1) return *this;
  15241. - const int hl=n/2, hr=hl-1+n%2;
  15242. - if (res.depth!=1) { // 3D median filter
  15243. - CImg<T> vois;
  15244. - cimg_forXYZV(*this,x,y,z,k) {
  15245. - vois = get_crop(x-hl,y-hl,z-hl,k,x+hr,y+hr,z+hr,k);
  15246. - res(x,y,z,k) = vois.median();
  15247. - }
  15248. - } else { // 2D median filter
  15249. -#define _median_sort(a,b) if ((a)>(b)) cimg::swap(a,b)
  15250. - switch (n) {
  15251. - case 3: {
  15252. - CImg_3x3(I,T);
  15253. - CImg_3x3(J,T);
  15254. - cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) {
  15255. - cimg_copy3x3(I,J);
  15256. - _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn);
  15257. - _median_sort(Jpp, Jcp); _median_sort(Jpc, Jcc); _median_sort(Jpn, Jcn);
  15258. - _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn);
  15259. - _median_sort(Jpp, Jpc); _median_sort(Jnc, Jnn); _median_sort(Jcc, Jcn);
  15260. - _median_sort(Jpc, Jpn); _median_sort(Jcp, Jcc); _median_sort(Jnp, Jnc);
  15261. - _median_sort(Jcc, Jcn); _median_sort(Jcc, Jnp); _median_sort(Jpn, Jcc);
  15262. - _median_sort(Jcc, Jnp);
  15263. - res(x,y,0,k) = Jcc;
  15264. - }
  15265. - } break;
  15266. - case 5: {
  15267. - CImg_5x5(I,T);
  15268. - CImg_5x5(J,T);
  15269. - cimg_forV(*this,k) cimg_for5x5(*this,x,y,0,k,I) {
  15270. - cimg_copy5x5(I,J);
  15271. - _median_sort(Jbb, Jpb); _median_sort(Jnb, Jab); _median_sort(Jcb, Jab); _median_sort(Jcb, Jnb);
  15272. - _median_sort(Jpp, Jcp); _median_sort(Jbp, Jcp); _median_sort(Jbp, Jpp); _median_sort(Jap, Jbc);
  15273. - _median_sort(Jnp, Jbc); _median_sort(Jnp, Jap); _median_sort(Jcc, Jnc); _median_sort(Jpc, Jnc);
  15274. - _median_sort(Jpc, Jcc); _median_sort(Jbn, Jpn); _median_sort(Jac, Jpn); _median_sort(Jac, Jbn);
  15275. - _median_sort(Jnn, Jan); _median_sort(Jcn, Jan); _median_sort(Jcn, Jnn); _median_sort(Jpa, Jca);
  15276. - _median_sort(Jba, Jca); _median_sort(Jba, Jpa); _median_sort(Jna, Jaa); _median_sort(Jcb, Jbp);
  15277. - _median_sort(Jnb, Jpp); _median_sort(Jbb, Jpp); _median_sort(Jbb, Jnb); _median_sort(Jab, Jcp);
  15278. - _median_sort(Jpb, Jcp); _median_sort(Jpb, Jab); _median_sort(Jpc, Jac); _median_sort(Jnp, Jac);
  15279. - _median_sort(Jnp, Jpc); _median_sort(Jcc, Jbn); _median_sort(Jap, Jbn); _median_sort(Jap, Jcc);
  15280. - _median_sort(Jnc, Jpn); _median_sort(Jbc, Jpn); _median_sort(Jbc, Jnc); _median_sort(Jba, Jna);
  15281. - _median_sort(Jcn, Jna); _median_sort(Jcn, Jba); _median_sort(Jpa, Jaa); _median_sort(Jnn, Jaa);
  15282. - _median_sort(Jnn, Jpa); _median_sort(Jan, Jca); _median_sort(Jnp, Jcn); _median_sort(Jap, Jnn);
  15283. - _median_sort(Jbb, Jnn); _median_sort(Jbb, Jap); _median_sort(Jbc, Jan); _median_sort(Jpb, Jan);
  15284. - _median_sort(Jpb, Jbc); _median_sort(Jpc, Jba); _median_sort(Jcb, Jba); _median_sort(Jcb, Jpc);
  15285. - _median_sort(Jcc, Jpa); _median_sort(Jnb, Jpa); _median_sort(Jnb, Jcc); _median_sort(Jnc, Jca);
  15286. - _median_sort(Jab, Jca); _median_sort(Jab, Jnc); _median_sort(Jac, Jna); _median_sort(Jbp, Jna);
  15287. - _median_sort(Jbp, Jac); _median_sort(Jbn, Jaa); _median_sort(Jpp, Jaa); _median_sort(Jpp, Jbn);
  15288. - _median_sort(Jcp, Jpn); _median_sort(Jcp, Jan); _median_sort(Jnc, Jpa); _median_sort(Jbn, Jna);
  15289. - _median_sort(Jcp, Jnc); _median_sort(Jcp, Jbn); _median_sort(Jpb, Jap); _median_sort(Jnb, Jpc);
  15290. - _median_sort(Jbp, Jcn); _median_sort(Jpc, Jcn); _median_sort(Jap, Jcn); _median_sort(Jab, Jbc);
  15291. - _median_sort(Jpp, Jcc); _median_sort(Jcp, Jac); _median_sort(Jab, Jpp); _median_sort(Jab, Jcp);
  15292. - _median_sort(Jcc, Jac); _median_sort(Jbc, Jac); _median_sort(Jpp, Jcp); _median_sort(Jbc, Jcc);
  15293. - _median_sort(Jpp, Jbc); _median_sort(Jpp, Jcn); _median_sort(Jcc, Jcn); _median_sort(Jcp, Jcn);
  15294. - _median_sort(Jcp, Jbc); _median_sort(Jcc, Jnn); _median_sort(Jcp, Jcc); _median_sort(Jbc, Jnn);
  15295. - _median_sort(Jcc, Jba); _median_sort(Jbc, Jba); _median_sort(Jbc, Jcc);
  15296. - res(x,y,0,k) = Jcc;
  15297. - }
  15298. - } break;
  15299. - default: {
  15300. - CImg<T> vois;
  15301. - cimg_forXYV(*this,x,y,k) {
  15302. - vois = get_crop(x-hl,y-hl,0,k,x+hr,y+hr,0,k);
  15303. - res(x,y,0,k) = vois.median();
  15304. - }
  15305. - } break;
  15306. - }
  15307. - }
  15308. - return res;
  15309. - }
  15310. -
  15311. - //! Apply a median filter
  15312. - CImg& blur_median(const unsigned int n=3) {
  15313. - return get_blur_median(n).swap(*this);
  15314. - }
  15315. -
  15316. - //! Sharpen image using anisotropic shock filters
  15317. - CImg& sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) {
  15318. - if (is_empty()) return *this;
  15319. - const bool threed = (depth>1);
  15320. - const float nedge = 0.5f*edge;
  15321. - typedef typename cimg::largest<T,float>::type ftype;
  15322. - CImg<ftype> val, vec, veloc(width,height,depth,dim);
  15323. -
  15324. - if (threed) {
  15325. - CImg<ftype> G = (alpha>0?get_blur(alpha).get_structure_tensorXYZ():get_structure_tensorXYZ());
  15326. - if (sigma>0) G.blur(sigma);
  15327. - CImg_3x3x3(I,float);
  15328. - cimg_forXYZ(G,x,y,z) {
  15329. - G.get_tensor_at(x,y,z).symmetric_eigen(val,vec);
  15330. - G(x,y,z,0) = vec(0,0);
  15331. - G(x,y,z,1) = vec(0,1);
  15332. - G(x,y,z,2) = vec(0,2);
  15333. - G(x,y,z,3) = 1.0f-(float)std::pow(1.0f+val[0]+val[1]+val[2],-nedge);
  15334. - }
  15335. - cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) {
  15336. - const float
  15337. - u = G(x,y,z,0),
  15338. - v = G(x,y,z,1),
  15339. - w = G(x,y,z,2),
  15340. - amp = G(x,y,z,3),
  15341. - ixx = Incc+Ipcc-2*Iccc,
  15342. - ixy = 0.25f*(Innc+Ippc-Inpc-Ipnc),
  15343. - ixz = 0.25f*(Incn+Ipcp-Incp-Ipcn),
  15344. - iyy = Icnc+Icpc-2*Iccc,
  15345. - iyz = 0.25f*(Icnn+Icpp-Icnp-Icpn),
  15346. - izz = Iccn+Iccp-2*Iccc,
  15347. - ixf = Incc-Iccc,
  15348. - ixb = Iccc-Ipcc,
  15349. - iyf = Icnc-Iccc,
  15350. - iyb = Iccc-Icpc,
  15351. - izf = Iccn-Iccc,
  15352. - izb = Iccc-Iccp,
  15353. - itt = u*u*ixx + v*v*iyy + w*w*izz + 2*u*v*ixy + 2*u*w*ixz + 2*v*w*iyz,
  15354. - it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb) + w*cimg::minmod(izf,izb);
  15355. - veloc(x,y,z,k) = -amp*cimg::sign(itt)*cimg::abs(it);
  15356. - }
  15357. - } else {
  15358. - CImg<ftype> G = (alpha>0?get_blur(alpha).get_structure_tensorXY():get_structure_tensorXY());
  15359. - if (sigma>0) G.blur(sigma);
  15360. - CImg_3x3(I,float);
  15361. - cimg_forXY(G,x,y) {
  15362. - G.get_tensor_at(x,y).symmetric_eigen(val,vec);
  15363. - G(x,y,0) = vec(0,0);
  15364. - G(x,y,1) = vec(0,1);
  15365. - G(x,y,2) = 1.0f-(float)std::pow(1.0f+val[0]+val[1],-nedge);
  15366. - }
  15367. - cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) {
  15368. - const float
  15369. - u = G(x,y,0),
  15370. - v = G(x,y,1),
  15371. - amp = G(x,y,2),
  15372. - ixx = Inc+Ipc-2*Icc,
  15373. - ixy = 0.25f*(Inn+Ipp-Inp-Ipn),
  15374. - iyy = Icn+Icp-2*Icc,
  15375. - ixf = Inc-Icc,
  15376. - ixb = Icc-Ipc,
  15377. - iyf = Icn-Icc,
  15378. - iyb = Icc-Icp,
  15379. - itt = u*u*ixx + v*v*iyy + 2*u*v*ixy,
  15380. - it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb);
  15381. - veloc(x,y,k) = -amp*cimg::sign(itt)*cimg::abs(it);
  15382. - }
  15383. - }
  15384. - const CImgStats stats(veloc);
  15385. - const float vmax = (float)cimg::max(cimg::abs(stats.min),cimg::abs(stats.max));
  15386. - if (vmax!=0) { veloc*=amplitude/vmax; (*this)+=veloc; }
  15387. - return *this;
  15388. - }
  15389. -
  15390. - CImg get_sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) const {
  15391. - return (+*this).sharpen(amplitude,edge,alpha,sigma);
  15392. - }
  15393. -
  15394. - //@}
  15395. - //-----------------------------
  15396. - //
  15397. - //! \name Matrix and Vectors
  15398. - //@{
  15399. - //-----------------------------
  15400. -
  15401. - //! Return a vector with specified coefficients
  15402. - static CImg vector(const T& a1) {
  15403. - return CImg<T>(1,1).fill(a1);
  15404. - }
  15405. -
  15406. - //! Return a vector with specified coefficients
  15407. - static CImg vector(const T& a1,const T& a2) {
  15408. - return CImg<T>(1,2).fill(a1,a2);
  15409. - }
  15410. -
  15411. - //! Return a vector with specified coefficients
  15412. - static CImg vector(const T& a1,const T& a2,const T& a3) {
  15413. - return CImg<T>(1,3).fill(a1,a2,a3);
  15414. - }
  15415. -
  15416. - //! Return a vector with specified coefficients
  15417. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4) {
  15418. - return CImg<T>(1,4).fill(a1,a2,a3,a4);
  15419. - }
  15420. -
  15421. - //! Return a vector with specified coefficients
  15422. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) {
  15423. - return CImg<T>(1,5).fill(a1,a2,a3,a4,a5);
  15424. - }
  15425. -
  15426. - //! Return a vector with specified coefficients
  15427. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) {
  15428. - return CImg<T>(1,6).fill(a1,a2,a3,a4,a5,a6);
  15429. - }
  15430. -
  15431. - //! Return a vector with specified coefficients
  15432. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15433. - const T& a5,const T& a6,const T& a7) {
  15434. - return CImg<T>(1,7).fill(a1,a2,a3,a4,a5,a6,a7);
  15435. - }
  15436. -
  15437. - //! Return a vector with specified coefficients
  15438. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15439. - const T& a5,const T& a6,const T& a7,const T& a8) {
  15440. - return CImg<T>(1,8).fill(a1,a2,a3,a4,a5,a6,a7,a8);
  15441. - }
  15442. -
  15443. - //! Return a vector with specified coefficients
  15444. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15445. - const T& a5,const T& a6,const T& a7,const T& a8,const T& a9) {
  15446. - return CImg<T>(1,9).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9);
  15447. - }
  15448. -
  15449. - //! Return a vector with specified coefficients
  15450. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15451. - const T& a5,const T& a6,const T& a7,const T& a8,
  15452. - const T& a9,const T& a10) {
  15453. - return CImg<T>(1,10).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
  15454. - }
  15455. -
  15456. - //! Return a vector with specified coefficients
  15457. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15458. - const T& a5,const T& a6,const T& a7,const T& a8,
  15459. - const T& a9,const T& a10, const T& a11) {
  15460. - return CImg<T>(1,11).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
  15461. - }
  15462. -
  15463. - //! Return a vector with specified coefficients
  15464. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15465. - const T& a5,const T& a6,const T& a7,const T& a8,
  15466. - const T& a9,const T& a10, const T& a11, const T& a12) {
  15467. - return CImg<T>(1,12).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
  15468. - }
  15469. -
  15470. - //! Return a vector with specified coefficients
  15471. - static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,
  15472. - const T& a5,const T& a6,const T& a7,const T& a8,
  15473. - const T& a9,const T& a10, const T& a11, const T& a12,
  15474. - const T& a13) {
  15475. - return CImg<T>(1,13).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
  15476. - }
  15477. -
  15478. - //! Return a 1x1 square matrix with specified coefficients
  15479. - static CImg matrix(const T& a1) {
  15480. - return vector(a1);
  15481. - }
  15482. -
  15483. - //! Return a 2x2 square matrix with specified coefficients
  15484. - static CImg matrix(const T& a1,const T& a2,
  15485. - const T& a3,const T& a4) {
  15486. - return CImg<T>(2,2).fill(a1,a2,
  15487. - a3,a4);
  15488. - }
  15489. -
  15490. - //! Return a 3x3 square matrix with specified coefficients
  15491. - static CImg matrix(const T& a1,const T& a2,const T& a3,
  15492. - const T& a4,const T& a5,const T& a6,
  15493. - const T& a7,const T& a8,const T& a9) {
  15494. - return CImg<T>(3,3).fill(a1,a2,a3,
  15495. - a4,a5,a6,
  15496. - a7,a8,a9);
  15497. - }
  15498. -
  15499. - //! Return a 4x4 square matrix with specified coefficients
  15500. - static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4,
  15501. - const T& a5,const T& a6,const T& a7,const T& a8,
  15502. - const T& a9,const T& a10,const T& a11,const T& a12,
  15503. - const T& a13,const T& a14,const T& a15,const T& a16) {
  15504. - return CImg<T>(4,4).fill(a1,a2,a3,a4,
  15505. - a5,a6,a7,a8,
  15506. - a9,a10,a11,a12,
  15507. - a13,a14,a15,a16);
  15508. - }
  15509. -
  15510. - //! Return a 5x5 square matrix with specified coefficients
  15511. - static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,
  15512. - const T& a6,const T& a7,const T& a8,const T& a9,const T& a10,
  15513. - const T& a11,const T& a12,const T& a13,const T& a14,const T& a15,
  15514. - const T& a16,const T& a17,const T& a18,const T& a19,const T& a20,
  15515. - const T& a21,const T& a22,const T& a23,const T& a24,const T& a25) {
  15516. - return CImg<T>(5,5).fill(a1,a2,a3,a4,a5,
  15517. - a6,a7,a8,a9,a10,
  15518. - a11,a12,a13,a14,a15,
  15519. - a16,a17,a18,a19,a20,
  15520. - a21,a22,a23,a24,a25);
  15521. - }
  15522. -
  15523. - //! In-place version of get_matrix().
  15524. - CImg& matrix() {
  15525. - const unsigned int siz = size();
  15526. - switch (siz) {
  15527. - case 1: break;
  15528. - case 4: width = height = 2; break;
  15529. - case 9: width = height = 3; break;
  15530. - case 16: width = height = 4; break;
  15531. - case 25: width = height = 5; break;
  15532. - case 36: width = height = 6; break;
  15533. - case 49: width = height = 7; break;
  15534. - case 64: width = height = 8; break;
  15535. - case 81: width = height = 9; break;
  15536. - case 100: width = height = 10; break;
  15537. - default: {
  15538. - unsigned int i=11, i2=i*i;
  15539. - while (i2<siz) { i2+=2*i+1; i++; }
  15540. - if (i2==siz) width = height = i;
  15541. - else throw CImgInstanceException("CImg<%s>::matrix() : Image size = %u is not a square number",pixel_type(),siz);
  15542. - } break;
  15543. - }
  15544. - return *this;
  15545. - }
  15546. -
  15547. - //! Realign pixel values of the instance image as a square matrix
  15548. - CImg get_matrix() const {
  15549. - return (+*this).matrix();
  15550. - }
  15551. -
  15552. - //! Return a 1x1 symmetric matrix with specified coefficients
  15553. - static CImg tensor(const T& a1) {
  15554. - return matrix(a1);
  15555. - }
  15556. -
  15557. - //! Return a 2x2 symmetric matrix tensor with specified coefficients
  15558. - static CImg tensor(const T& a1,const T& a2,const T& a3) {
  15559. - return matrix(a1,a2,
  15560. - a2,a3);
  15561. - }
  15562. -
  15563. - //! Return a 3x3 symmetric matrix with specified coefficients
  15564. - static CImg tensor(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) {
  15565. - return matrix(a1,a2,a3,
  15566. - a2,a4,a5,
  15567. - a3,a5,a6);
  15568. - }
  15569. -
  15570. - CImg get_tensor() const {
  15571. - CImg<T> res;
  15572. - const unsigned int siz = size();
  15573. - switch (siz) {
  15574. - case 1: break;
  15575. - case 3:
  15576. - res.assign(2,2);
  15577. - res(0,0) = (*this)(0);
  15578. - res(1,0) = res(0,1) = (*this)(1);
  15579. - res(1,1) = (*this)(2);
  15580. - break;
  15581. - case 6:
  15582. - res.assign(3,3);
  15583. - res(0,0) = (*this)(0);
  15584. - res(1,0) = res(0,1) = (*this)(1);
  15585. - res(2,0) = res(0,2) = (*this)(2);
  15586. - res(1,1) = (*this)(3);
  15587. - res(2,1) = res(1,2) = (*this)(4);
  15588. - res(2,2) = (*this)(5);
  15589. - break;
  15590. - default:
  15591. - throw CImgInstanceException("CImg<%s>::get_tensor() : Wrong vector dimension = %u in instance image.",
  15592. - pixel_type(), dim);
  15593. - break;
  15594. - }
  15595. - return res;
  15596. - }
  15597. -
  15598. - //! In-place version of get_tensor().
  15599. - CImg& tensor() {
  15600. - return get_tensor().swap(*this);
  15601. - }
  15602. -
  15603. - //! Return a 1x1 diagonal matrix with specified coefficients
  15604. - static CImg diagonal(const T& a1) {
  15605. - return matrix(a1);
  15606. - }
  15607. -
  15608. - //! Return a 2x2 diagonal matrix with specified coefficients
  15609. - static CImg diagonal(const T& a1,const T& a2) {
  15610. - return matrix(a1,0,
  15611. - 0,a2);
  15612. - }
  15613. -
  15614. - //! Return a 3x3 diagonal matrix with specified coefficients
  15615. - static CImg diagonal(const T& a1,const T& a2,const T& a3) {
  15616. - return matrix(a1,0,0,
  15617. - 0,a2,0,
  15618. - 0,0,a3);
  15619. - }
  15620. -
  15621. - //! Return a 4x4 diagonal matrix with specified coefficients
  15622. - static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4) {
  15623. - return matrix(a1,0,0,0,
  15624. - 0,a2,0,0,
  15625. - 0,0,a3,0,
  15626. - 0,0,0,a4);
  15627. - }
  15628. -
  15629. - //! Return a 5x5 diagonal matrix with specified coefficients
  15630. - static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) {
  15631. - return matrix(a1,0,0,0,0,
  15632. - 0,a2,0,0,0,
  15633. - 0,0,a3,0,0,
  15634. - 0,0,0,a4,0,
  15635. - 0,0,0,0,a5);
  15636. - }
  15637. -
  15638. - //! Unroll all images values into specified axis.
  15639. - CImg& unroll(const char axe='x') {
  15640. - const unsigned int siz = size();
  15641. - if (siz) switch (axe) {
  15642. - case 'x': width = siz; height=depth=dim=1; break;
  15643. - case 'y': height = siz; width=depth=dim=1; break;
  15644. - case 'z': depth = siz; width=height=dim=1; break;
  15645. - case 'v': dim = siz; width=height=depth=1; break;
  15646. - default: throw CImgArgumentException("CImg<%s>::unroll() : Given axe is '%c' which is not 'x','y','z' or 'v'",
  15647. - pixel_type(),axe);
  15648. - }
  15649. - return *this;
  15650. - }
  15651. -
  15652. - CImg get_unroll(const char axe='x') const {
  15653. - return (+*this).unroll(axe);
  15654. - }
  15655. -
  15656. - CImg& vector() {
  15657. - return unroll('y');
  15658. - }
  15659. -
  15660. - CImg get_vector() const {
  15661. - return get_unroll('y');
  15662. - }
  15663. -
  15664. - //! Get a diagonal matrix, whose diagonal coefficients are the coefficients of the input image
  15665. - CImg get_diagonal() const {
  15666. - if (is_empty()) return CImg<T>();
  15667. - CImg res(size(),size(),1,1,0);
  15668. - cimg_foroff(*this,off) res(off,off)=(*this)(off);
  15669. - return res;
  15670. - }
  15671. -
  15672. - //! Replace a vector by a diagonal matrix containing the original vector coefficients.
  15673. - CImg& diagonal() {
  15674. - return get_diagonal().swap(*this);
  15675. - }
  15676. -
  15677. - //! Return a NxN identity matrix
  15678. - static CImg identity_matrix(const unsigned int N) {
  15679. - CImg<T> res(N,N,1,1,0);
  15680. - cimg_forX(res,x) res(x,x)=1;
  15681. - return res;
  15682. - }
  15683. -
  15684. - CImg& identity_matrix() {
  15685. - return get_identity_matrix(cimg::max(width,height)).swap(*this);
  15686. - }
  15687. -
  15688. - CImg get_identity_matrix() const {
  15689. - return identity_matrix(cimg::max(width,height));
  15690. - }
  15691. -
  15692. - //! Return a N-numbered sequence vector from \p a0 to \p a1
  15693. - CImg& sequence(const T& a0, const T& a1) {
  15694. - if (!is_empty()) {
  15695. - const unsigned int siz = size()-1;
  15696. - const float delta = (float)((float)a1-a0);
  15697. - T* ptr = data;
  15698. - cimg_foroff(*this,l) *(ptr++) = (T)(a0 + delta*l/siz);
  15699. - }
  15700. - return *this;
  15701. - }
  15702. -
  15703. - CImg get_sequence(const T& a0, const T& a1) const {
  15704. - return (+*this).sequence(a0,a1);
  15705. - }
  15706. -
  15707. - static CImg sequence(const unsigned int N, const T& a0, const T& a1) {
  15708. - if (N) return CImg<T>(1,N).sequence(a0,a1);
  15709. - return CImg<T>();
  15710. - }
  15711. -
  15712. - //! Return a 3x3 rotation matrix along the (x,y,z)-axis with an angle w.
  15713. - static CImg rotation_matrix(const float x, const float y, const float z, const float w, const bool quaternion_data=false) {
  15714. - float X,Y,Z,W;
  15715. - if (!quaternion_data) {
  15716. - const float norm = (float)std::sqrt(x*x + y*y + z*z),
  15717. - nx = norm>0?x/norm:0,
  15718. - ny = norm>0?y/norm:0,
  15719. - nz = norm>0?z/norm:1,
  15720. - nw = norm>0?w:0,
  15721. - sina = (float)std::sin(nw/2),
  15722. - cosa = (float)std::cos(nw/2);
  15723. - X = nx*sina;
  15724. - Y = ny*sina;
  15725. - Z = nz*sina;
  15726. - W = cosa;
  15727. - } else {
  15728. - const float norm = (float)std::sqrt(x*x + y*y + z*z + w*w);
  15729. - if (norm>0) { X=x/norm; Y=y/norm; Z=z/norm; W=w/norm; }
  15730. - else { X=Y=Z=0; W=1; }
  15731. - }
  15732. - const float xx=X*X, xy=X*Y, xz=X*Z, xw=X*W, yy=Y*Y, yz=Y*Z, yw=Y*W, zz=Z*Z, zw=Z*W;
  15733. - return CImg<T>::matrix(1-2*(yy+zz), 2*(xy+zw), 2*(xz-yw),
  15734. - 2*(xy-zw), 1-2*(xx+zz), 2*(yz+xw),
  15735. - 2*(xz+yw), 2*(yz-xw), 1-2*(xx+yy));
  15736. - }
  15737. -
  15738. - //! Return a new image corresponding to the vector located at (\p x,\p y,\p z) of the current vector-valued image.
  15739. - CImg get_vector_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const {
  15740. - CImg dest(1,dim);
  15741. - cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k);
  15742. - return dest;
  15743. - }
  15744. -
  15745. - //! Return a new image corresponding to the \a square \a matrix located at (\p x,\p y,\p z) of the current vector-valued image.
  15746. - CImg get_matrix_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const {
  15747. - const int n = (int)std::sqrt((double)dim);
  15748. - CImg dest(n,n);
  15749. - cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k);
  15750. - return dest;
  15751. - }
  15752. -
  15753. - //! Return a new image corresponding to the \a diffusion \a tensor located at (\p x,\p y,\p z) of the current vector-valued image.
  15754. - CImg get_tensor_at(const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) const {
  15755. - if (dim==6) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2),
  15756. - (*this)(x,y,z,3),(*this)(x,y,z,4),(*this)(x,y,z,5));
  15757. - if (dim==3) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2));
  15758. - return tensor((*this)(x,y,z,0));
  15759. - }
  15760. -
  15761. - //! Set the image \p vec as the \a vector \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
  15762. - CImg& set_vector_at(const CImg& vec,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
  15763. - return draw_point(x,y,z,vec.data,1);
  15764. - }
  15765. -
  15766. - //! Set the image \p vec as the \a square \a matrix-valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
  15767. - CImg& set_matrix_at(const CImg& mat,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
  15768. - return set_vector_at(mat,x,y,z);
  15769. - }
  15770. -
  15771. - //! Set the image \p vec as the \a tensor \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image.
  15772. - CImg& set_tensor_at(const CImg& ten,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) {
  15773. - if (ten.height==2) {
  15774. - (*this)(x,y,z,0)=ten[0];
  15775. - (*this)(x,y,z,1)=ten[1];
  15776. - (*this)(x,y,z,2)=ten[3];
  15777. - }
  15778. - else {
  15779. - (*this)(x,y,z,0)=ten[0];
  15780. - (*this)(x,y,z,1)=ten[1];
  15781. - (*this)(x,y,z,2)=ten[2];
  15782. - (*this)(x,y,z,3)=ten[4];
  15783. - (*this)(x,y,z,4)=ten[5];
  15784. - (*this)(x,y,z,5)=ten[8];
  15785. - }
  15786. - return *this;
  15787. - }
  15788. -
  15789. - //! Return the transpose version of the current matrix.
  15790. - CImg get_transpose() const {
  15791. - CImg<T> res(height,width,depth,dim);
  15792. - cimg_forXYZV(*this,x,y,z,v) res(y,x,z,v) = (*this)(x,y,z,v);
  15793. - return res;
  15794. - }
  15795. -
  15796. - //! Replace the current matrix by its transpose.
  15797. - CImg& transpose() {
  15798. - if (width==1) { width=height; height=1; return *this; }
  15799. - if (height==1) { height=width; width=1; return *this; }
  15800. - if (width==height) {
  15801. - cimg_forYZV(*this,y,z,v) for (int x=y; x<(int)width; x++) cimg::swap((*this)(x,y,z,v),(*this)(y,x,z,v));
  15802. - return *this;
  15803. - }
  15804. - return (*this)=get_transpose();
  15805. - }
  15806. -
  15807. - //! Inverse the current matrix.
  15808. - CImg& inverse(const bool use_LU=true) {
  15809. - if (!is_empty()) {
  15810. - if (width!=height || depth!=1 || dim!=1)
  15811. - throw CImgInstanceException("CImg<%s>::inverse() : Instance matrix (%u,%u,%u,%u,%p) is not square.",
  15812. - pixel_type(),width,height,depth,dim,data);
  15813. - const double dete = width>3?-1.0:det();
  15814. - if (dete!=0.0 && width==2) {
  15815. - const double
  15816. - a = data[0], c = data[1],
  15817. - b = data[2], d = data[3];
  15818. - data[0] = (T)(d/dete); data[1] = (T)(-c/dete);
  15819. - data[2] = (T)(-b/dete), data[3] = (T)(a/dete);
  15820. - } else if (dete!=0.0 && width==3) {
  15821. - const double
  15822. - a = data[0], d = data[1], g = data[2],
  15823. - b = data[3], e = data[4], h = data[5],
  15824. - c = data[6], f = data[7], i = data[8];
  15825. - data[0] = (T)((i*e-f*h)/dete), data[1] = (T)((g*f-i*d)/dete), data[2] = (T)((d*h-g*e)/dete);
  15826. - data[3] = (T)((h*c-i*b)/dete), data[4] = (T)((i*a-c*g)/dete), data[5] = (T)((g*b-a*h)/dete);
  15827. - data[6] = (T)((b*f-e*c)/dete), data[7] = (T)((d*c-a*f)/dete), data[8] = (T)((a*e-d*b)/dete);
  15828. - } else {
  15829. - if (use_LU) { // LU-based inverse computation
  15830. - CImg<T> A(*this), indx, col(1,width);
  15831. - bool d;
  15832. - A._LU(indx,d);
  15833. - cimg_forX(*this,j) {
  15834. - col.fill(0); col(j)=1;
  15835. - col._solve(A,indx);
  15836. - cimg_forX(*this,i) (*this)(j,i) = col(i);
  15837. - }
  15838. - } else { // SVD-based inverse computation
  15839. - CImg<T> U(width,width),S(1,width),V(width,width);
  15840. - SVD(U,S,V,false);
  15841. - U.transpose();
  15842. - cimg_forY(S,k) if (S[k]!=0) S[k]=1/S[k];
  15843. - S.diagonal();
  15844. - *this = V*S*U;
  15845. - }
  15846. - }
  15847. - }
  15848. - return *this;
  15849. - }
  15850. -
  15851. - //! Return the inverse of the current matrix.
  15852. - CImg<typename cimg::largest<T,float>::type> get_inverse(const bool use_LU=true) const {
  15853. - typedef typename cimg::largest<T,float>::type restype;
  15854. - return CImg<restype>(*this,false).inverse(use_LU);
  15855. - }
  15856. -
  15857. - //! Return the pseudo-inverse (Moore-Penrose) of the matrix
  15858. - CImg<typename cimg::largest<T,float>::type> get_pseudoinverse() const {
  15859. - typedef typename cimg::largest<T,float>::type restype;
  15860. - CImg<restype> At = get_transpose(), At2(At);
  15861. - return (((At*=*this).inverse())*=At2);
  15862. - }
  15863. -
  15864. - //! Replace the matrix by its pseudo-inverse
  15865. - CImg& pseudoinverse() {
  15866. - typedef typename cimg::largest<T,float>::type restype;
  15867. - CImg<restype> At = get_transpose(), At2(At);
  15868. - ((At*=*this).inverse())*=At2;
  15869. - return ((*this)=At);
  15870. - }
  15871. -
  15872. - //! Return the trace of the current matrix.
  15873. - double trace() const {
  15874. - if (is_empty())
  15875. - throw CImgInstanceException("CImg<%s>::trace() : Instance matrix (%u,%u,%u,%u,%p) is empty.",
  15876. - pixel_type(),width,height,depth,dim,data);
  15877. - double res=0;
  15878. - cimg_forX(*this,k) res+=(*this)(k,k);
  15879. - return res;
  15880. - }
  15881. -
  15882. - //! Return the kth smallest element of the image
  15883. - // (Adapted from the numerical recipies for CImg)
  15884. - const T kth_smallest(const unsigned int k) const {
  15885. - if (is_empty())
  15886. - throw CImgInstanceException("CImg<%s>::kth_smallest() : Instance image (%u,%u,%u,%u,%p) is empty.",
  15887. - pixel_type(),width,height,depth,dim,data);
  15888. - CImg<T> arr(*this);
  15889. - unsigned long l=0,ir=size()-1;
  15890. - for (;;) {
  15891. - if (ir<=l+1) {
  15892. - if (ir==l+1 && arr[ir]<arr[l]) cimg::swap(arr[l],arr[ir]);
  15893. - return arr[k];
  15894. - } else {
  15895. - const unsigned long mid = (l+ir)>>1;
  15896. - cimg::swap(arr[mid],arr[l+1]);
  15897. - if (arr[l]>arr[ir]) cimg::swap(arr[l],arr[ir]);
  15898. - if (arr[l+1]>arr[ir]) cimg::swap(arr[l+1],arr[ir]);
  15899. - if (arr[l]>arr[l+1]) cimg::swap(arr[l],arr[l+1]);
  15900. - unsigned long i = l+1, j = ir;
  15901. - const T pivot = arr[l+1];
  15902. - for (;;) {
  15903. - do i++; while (arr[i]<pivot);
  15904. - do j--; while (arr[j]>pivot);
  15905. - if (j<i) break;
  15906. - cimg::swap(arr[i],arr[j]);
  15907. - }
  15908. - arr[l+1] = arr[j];
  15909. - arr[j] = pivot;
  15910. - if (j>=k) ir=j-1;
  15911. - if (j<=k) l=i;
  15912. - }
  15913. - }
  15914. - return 0;
  15915. - }
  15916. -
  15917. - //! Return the median of the image
  15918. - const T median() const {
  15919. - const unsigned int s = size();
  15920. - const T res = kth_smallest(s>>1);
  15921. - return (s%2)?res:((res+kth_smallest((s>>1)-1))/2);
  15922. - }
  15923. -
  15924. - //! Return the dot product of the current vector/matrix with the vector/matrix \p img.
  15925. - double dot(const CImg& img) const {
  15926. - if (is_empty())
  15927. - throw CImgInstanceException("CImg<%s>::dot() : Instance object (%u,%u,%u,%u,%p) is empty.",
  15928. - pixel_type(),width,height,depth,dim,data);
  15929. - if (img.is_empty())
  15930. - throw CImgArgumentException("CImg<%s>::trace() : Specified argument (%u,%u,%u,%u,%p) is empty.",
  15931. - pixel_type(),img.width,img.height,img.depth,img.dim,img.data);
  15932. - const unsigned long nb = cimg::min(size(),img.size());
  15933. - double res=0;
  15934. - for (unsigned long off=0; off<nb; off++) res+=data[off]*img[off];
  15935. - return res;
  15936. - }
  15937. -
  15938. - //! Return the cross product between two 3d vectors
  15939. - CImg& cross(const CImg& img) {
  15940. - if (width!=1 || height<3 || img.width!=1 || img.height<3)
  15941. - throw CImgInstanceException("CImg<%s>::cross() : Arguments (%u,%u,%u,%u,%p) and (%u,%u,%u,%u,%p) must be both 3d vectors.",
  15942. - pixel_type(),width,height,depth,dim,data,img.width,img.height,img.depth,img.dim,img.data);
  15943. - const T x = (*this)[0], y = (*this)[1], z = (*this)[2];
  15944. - (*this)[0] = y*img[2]-z*img[1];
  15945. - (*this)[1] = z*img[0]-x*img[2];
  15946. - (*this)[2] = x*img[1]-y*img[0];
  15947. - return *this;
  15948. - }
  15949. -
  15950. - //! Return the cross product between two 3d vectors
  15951. - CImg get_cross(const CImg& img) const {
  15952. - return (+*this).cross(img);
  15953. - }
  15954. -
  15955. - //! Return the determinant of the current matrix.
  15956. - double det() const {
  15957. - if (is_empty() || width!=height || depth!=1 || dim!=1)
  15958. - throw CImgInstanceException("CImg<%s>::det() : Instance matrix (%u,%u,%u,%u,%p) is not square or is empty.",
  15959. - pixel_type(),width,height,depth,dim,data);
  15960. - switch (width) {
  15961. - case 1: return (*this)(0,0);
  15962. - case 2: return (*this)(0,0)*(*this)(1,1)-(*this)(0,1)*(*this)(1,0);
  15963. - case 3: {
  15964. - const double
  15965. - a = data[0], d = data[1], g = data[2],
  15966. - b = data[3], e = data[4], h = data[5],
  15967. - c = data[6], f = data[7], i = data[8];
  15968. - return i*a*e-a*h*f-i*b*d+b*g*f+c*d*h-c*g*e;
  15969. - }
  15970. - default: {
  15971. - typedef typename cimg::largest<T,float>::type ftype;
  15972. - CImg<ftype> lu(*this);
  15973. - CImg<unsigned int> indx;
  15974. - bool d;
  15975. - lu._LU(indx,d);
  15976. - double res = d?1.0:-1.0;
  15977. - cimg_forX(lu,i) res*=lu(i,i);
  15978. - return res;
  15979. - }
  15980. - }
  15981. - return 0;
  15982. - }
  15983. -
  15984. - //! Return the norm of the current vector/matrix. \p ntype = norm type (0=L2, 1=L1, -1=Linf).
  15985. - double norm(const int ntype=2) const {
  15986. - if (is_empty())
  15987. - throw CImgInstanceException("CImg<%s>::norm() : Instance object (%u,%u,%u,%u,%p) is empty.",
  15988. - pixel_type(),width,height,depth,dim,data);
  15989. - double res = 0;
  15990. - switch (ntype) {
  15991. - case -1: {
  15992. - cimg_foroff(*this,off) {
  15993. - const double tmp = cimg::abs((double)data[off]);
  15994. - if (tmp>res) res = tmp;
  15995. - }
  15996. - return res;
  15997. - } break;
  15998. - case 1 : {
  15999. - cimg_foroff(*this,off) res+=cimg::abs((double)data[off]);
  16000. - return res;
  16001. - } break;
  16002. - default: { return std::sqrt(dot(*this)); }
  16003. - }
  16004. - return 0;
  16005. - }
  16006. -
  16007. - //! Return the sum of all the pixel values in an image.
  16008. - double sum() const {
  16009. - if (is_empty())
  16010. - throw CImgInstanceException("CImg<%s>::sum() : Instance object (%u,%u,%u,%u,%p) is empty.",
  16011. - pixel_type(),width,height,depth,dim,data);
  16012. - double res=0;
  16013. - cimg_for(*this,ptr,T) res+=*ptr;
  16014. - return res;
  16015. - }
  16016. -
  16017. - //! Compute the SVD of a general matrix.
  16018. - template<typename t> const CImg& SVD(CImg<t>& U, CImg<t>& S, CImg<t>& V,
  16019. - const bool sorting=true, const unsigned int max_iter=40) const {
  16020. - if (is_empty()) { U.assign(); S.assign(); V.assign(); }
  16021. - else {
  16022. - U = *this;
  16023. - if (S.size()<width) S.assign(1,width);
  16024. - if (V.width<width || V.height<height) V.assign(width,width);
  16025. - CImg<t> rv1(width);
  16026. - t anorm=0,c,f,g=0,h,s,scale=0;
  16027. - int l=0, nm=0;
  16028. -
  16029. - cimg_forX(U,i) {
  16030. - l = i+1; rv1[i] = scale*g; g = s = scale = 0;
  16031. - if (i<dimy()) {
  16032. - for (int k=i; k<dimy(); k++) scale+= cimg::abs(U(i,k));
  16033. - if (scale) {
  16034. - for (int k=i; k<dimy(); k++) { U(i,k)/=scale; s+= U(i,k)*U(i,k); }
  16035. - f = U(i,i); g = (t)((f>=0?-1:1)*std::sqrt(s)); h=f*g-s; U(i,i)=f-g;
  16036. - for (int j=l; j<dimx(); j++) {
  16037. - s = 0; for (int k=i; k<dimy(); k++) s+= U(i,k)*U(j,k);
  16038. - f = s/h;
  16039. - { for (int k=i; k<dimy(); k++) U(j,k)+= f*U(i,k); }
  16040. - }
  16041. - { for (int k=i; k<dimy(); k++) U(i,k)*= scale; }
  16042. - }
  16043. - }
  16044. - S[i]=scale*g;
  16045. -
  16046. - g = s = scale = 0;
  16047. - if (i<dimy() && i!=dimx()-1) {
  16048. - for (int k=l; k<dimx(); k++) scale += cimg::abs(U(k,i));
  16049. - if (scale) {
  16050. - for (int k=l; k<dimx(); k++) { U(k,i)/= scale; s+= U(k,i)*U(k,i); }
  16051. - f = U(l,i); g = (t)((f>=0?-1:1)*std::sqrt(s)); h = f*g-s; U(l,i) = f-g;
  16052. - { for (int k=l; k<dimx(); k++) rv1[k]=U(k,i)/h; }
  16053. - for (int j=l; j<dimy(); j++) {
  16054. - s=0; for (int k=l; k<dimx(); k++) s+= U(k,j)*U(k,i);
  16055. - { for (int k=l; k<dimx(); k++) U(k,j)+= s*rv1[k]; }
  16056. - }
  16057. - { for (int k=l; k<dimx(); k++) U(k,i)*= scale; }
  16058. - }
  16059. - }
  16060. - anorm=cimg::max((t)anorm,(cimg::abs(S[i])+cimg::abs(rv1[i])));
  16061. - }
  16062. -
  16063. - { for (int i=dimx()-1; i>=0; i--) {
  16064. - if (i<dimx()-1) {
  16065. - if (g) {
  16066. - { for (int j=l; j<dimx(); j++) V(i,j) =(U(j,i)/U(l,i))/g; }
  16067. - for (int j=l; j<dimx(); j++) {
  16068. - s=0; for (int k=l; k<dimx(); k++) s+= U(k,i)*V(j,k);
  16069. - { for (int k=l; k<dimx(); k++) V(j,k)+= s*V(i,k); }
  16070. - }
  16071. - }
  16072. - for (int j=l; j<dimx(); j++) V(j,i)=V(i,j)=0.0;
  16073. - }
  16074. - V(i,i) = 1.0; g = rv1[i]; l = i;
  16075. - }
  16076. - }
  16077. -
  16078. - { for (int i=cimg::min(dimx(),dimy())-1; i>=0; i--) {
  16079. - l = i+1; g = S[i];
  16080. - for (int j=l; j<dimx(); j++) U(j,i) = 0;
  16081. - if (g) {
  16082. - g = 1/g;
  16083. - for (int j=l; j<dimx(); j++) {
  16084. - s=0; for (int k=l; k<dimy(); k++) s+= U(i,k)*U(j,k);
  16085. - f = (s/U(i,i))*g;
  16086. - { for (int k=i; k<dimy(); k++) U(j,k)+= f*U(i,k); }
  16087. - }
  16088. - { for (int j=i; j<dimy(); j++) U(i,j)*= g; }
  16089. - } else for (int j=i; j<dimy(); j++) U(i,j)=0;
  16090. - U(i,i)++;
  16091. - }
  16092. - }
  16093. -
  16094. - for (int k=dimx()-1; k>=0; k--) {
  16095. - for (unsigned int its=0; its<max_iter; its++) {
  16096. - bool flag = true;
  16097. - for (l=k; l>=1; l--) {
  16098. - nm = l-1;
  16099. - if ((cimg::abs(rv1[l])+anorm)==anorm) { flag = false; break; }
  16100. - if ((cimg::abs(S[nm])+anorm)==anorm) break;
  16101. - }
  16102. - if (flag) {
  16103. - c = 0; s = 1;
  16104. - for (int i=l; i<=k; i++) {
  16105. - f = s*rv1[i]; rv1[i] = c*rv1[i];
  16106. - if ((cimg::abs(f)+anorm)==anorm) break;
  16107. - g = S[i]; h = (t)cimg::pythagore(f,g); S[i] = h; h = 1/h; c = g*h; s = -f*h;
  16108. - cimg_forY(U,j) { const t y = U(nm,j), z = U(i,j); U(nm,j) = y*c+z*s; U(i,j) = z*c-y*s; }
  16109. - }
  16110. - }
  16111. - const t& z = S[k];
  16112. - if (l==k) { if (z<0) { S[k] = -z; cimg_forX(U,j) V(k,j) = -V(k,j); } break; }
  16113. - nm = k-1;
  16114. - t x = S[l], y = S[nm];
  16115. - g = rv1[nm]; h = rv1[k];
  16116. - f = ((y-z)*(y+z)+(g-h)*(g+h))/(2*h*y);
  16117. - g = (t)cimg::pythagore(f,1.0);
  16118. - f = ((x-z)*(x+z)+h*((y/(f+ (f>=0?g:-g)))-h))/x;
  16119. - c = s = 1;
  16120. - for (int j=l; j<=nm; j++) {
  16121. - const int i = j+1;
  16122. - g = rv1[i]; h = s*g; g = c*g;
  16123. - t y = S[i];
  16124. - t z = (t)cimg::pythagore(f,h);
  16125. - rv1[j] = z; c = f/z; s = h/z;
  16126. - f = x*c+g*s; g = g*c-x*s; h = y*s; y*=c;
  16127. - cimg_forX(U,jj) { const t x = V(j,jj), z = V(i,jj); V(j,jj) = x*c+z*s; V(i,jj) = z*c-x*s; }
  16128. - z = (t)cimg::pythagore(f,h); S[j] = z;
  16129. - if (z) { z = 1/z; c = f*z; s = h*z; }
  16130. - f = c*g+s*y; x = c*y-s*g;
  16131. - { cimg_forY(U,jj) { const t y = U(j,jj); z = U(i,jj); U(j,jj) = y*c+z*s; U(i,jj) = z*c-y*s; }}
  16132. - }
  16133. - rv1[l] = 0; rv1[k]=f; S[k]=x;
  16134. - }
  16135. - }
  16136. -
  16137. - if (sorting) {
  16138. - CImg<int> permutations(width);
  16139. - CImg<t> tmp(width);
  16140. - S.sort(permutations,false);
  16141. - cimg_forY(U,k) {
  16142. - cimg_forX(permutations,x) tmp(x) = U(permutations(x),k);
  16143. - std::memcpy(U.ptr(0,k),tmp.data,sizeof(t)*width);
  16144. - }
  16145. - { cimg_forY(V,k) {
  16146. - cimg_forX(permutations,x) tmp(x) = V(permutations(x),k);
  16147. - std::memcpy(V.ptr(0,k),tmp.data,sizeof(t)*width);
  16148. - }}
  16149. - }
  16150. - }
  16151. - return *this;
  16152. - }
  16153. -
  16154. - //! Compute the SVD of a general matrix.
  16155. - template<typename t> const CImg& SVD(CImgList<t>& USV) const {
  16156. - if (USV.size<3) USV.assign(3);
  16157. - return SVD(USV[0],USV[1],USV[2]);
  16158. - }
  16159. -
  16160. - //! Compute the SVD of a general matrix.
  16161. - CImgList<typename cimg::largest<T,float>::type> get_SVD(const bool sorting=true) const {
  16162. - typedef typename cimg::largest<T,float>::type restype;
  16163. - CImgList<restype> res(3);
  16164. - SVD(res[0],res[1],res[2],sorting);
  16165. - return res;
  16166. - }
  16167. -
  16168. - // INNER ROUTINE : Compute the LU decomposition of a permuted matrix (c.f. numerical recipies)
  16169. - template<typename t> CImg& _LU(CImg<t>& indx, bool& d) {
  16170. - typedef typename cimg::largest<T,float>::type ftype;
  16171. - const int N = dimx();
  16172. - int imax=0;
  16173. - CImg<ftype> vv(N);
  16174. - indx.assign(N);
  16175. - d=true;
  16176. - cimg_forX(*this,i) {
  16177. - ftype vmax=0.0;
  16178. - cimg_forX(*this,j) {
  16179. - const ftype tmp = cimg::abs((*this)(j,i));
  16180. - if (tmp>vmax) vmax = tmp;
  16181. - }
  16182. - if (vmax==0) return fill(0);
  16183. - vv[i] = 1/vmax;
  16184. - }
  16185. - cimg_forX(*this,j) {
  16186. - for (int i=0; i<j; i++) {
  16187. - ftype sum=(*this)(j,i);
  16188. - for (int k=0; k<i; k++) sum-=(*this)(k,i)*(*this)(j,k);
  16189. - (*this)(j,i) = (T)sum;
  16190. - }
  16191. - ftype vmax=0;
  16192. - { for (int i=j; i<dimx(); i++) {
  16193. - ftype sum=(*this)(j,i);
  16194. - for (int k=0; k<j; k++) sum-=(*this)(k,i)*(*this)(j,k);
  16195. - (*this)(j,i) = (T)sum;
  16196. - const ftype tmp = vv[i]*cimg::abs(sum);
  16197. - if (tmp>=vmax) { vmax=tmp; imax=i; }
  16198. - }}
  16199. - if (j!=imax) {
  16200. - cimg_forX(*this,k) cimg::swap((*this)(k,imax),(*this)(k,j));
  16201. - d =!d;
  16202. - vv[imax] = vv[j];
  16203. - }
  16204. - indx[j] = (t)imax;
  16205. - if ((*this)(j,j)==0) (*this)(j,j)=(T)1e-20;
  16206. - if (j<N) {
  16207. - const ftype tmp = 1/(ftype)(*this)(j,j);
  16208. - for (int i=j+1; i<N; i++) (*this)(j,i)*=tmp;
  16209. - }
  16210. - }
  16211. - return *this;
  16212. - }
  16213. -
  16214. - // INNER ROUTINE : Solve a linear system, using the LU decomposition
  16215. - template<typename t> CImg& _solve(const CImg<T>& A, const CImg<t>& indx) {
  16216. - typedef typename cimg::largest<T,float>::type ftype;
  16217. - const int N = size();
  16218. - int ii=-1;
  16219. - ftype sum;
  16220. - for (int i=0; i<N; i++) {
  16221. - const int ip = (int)indx[i];
  16222. - ftype sum = (*this)(ip);
  16223. - (*this)(ip) = (*this)(i);
  16224. - if (ii>=0) for (int j=ii; j<=i-1; j++) sum-=A(j,i)*(*this)(j);
  16225. - else if (sum!=0) ii=i;
  16226. - (*this)(i)=sum;
  16227. - }
  16228. - { for (int i=N-1; i>=0; i--) {
  16229. - sum = (*this)(i);
  16230. - for (int j=i+1; j<N; j++) sum-=A(j,i)*(*this)(j);
  16231. - (*this)(i)=sum/A(i,i);
  16232. - }}
  16233. - return *this;
  16234. - }
  16235. -
  16236. - //! Solve a linear system AX=B where B=*this. (in-place version)
  16237. - CImg& solve(const CImg& A) {
  16238. - if (width!=1 || depth!=1 || dim!=1 || height!=A.height || A.depth!=1 || A.dim!=1)
  16239. - throw CImgArgumentException("CImg<%s>::solve() : Instance matrix size is (%u,%u,%u,%u) while "
  16240. - "size of given matrix A is (%u,%u,%u,%u).",
  16241. - pixel_type(),width,height,depth,dim,A.width,A.height,A.depth,A.dim);
  16242. - if (A.width==A.height) {
  16243. - CImg<T> lu(A);
  16244. - CImg<T> indx;
  16245. - bool d;
  16246. - lu._LU(indx,d);
  16247. - _solve(lu,indx);
  16248. - } else assign(A.get_pseudoinverse()*(*this));
  16249. - return *this;
  16250. - }
  16251. -
  16252. - //! Solve a linear system AX=B where B=*this.
  16253. - CImg<typename cimg::largest<T,float>::type> get_solve(const CImg& A) const {
  16254. - typedef typename cimg::largest<T,float>::type restype;
  16255. - return CImg<restype>(*this,false).solve(A);
  16256. - }
  16257. -
  16258. - //! Compute the eigenvalues and eigenvectors of a matrix.
  16259. - template<typename t> const CImg<T>& eigen(CImg<t>& val, CImg<t> &vec) const {
  16260. - if (is_empty()) { val.assign(); vec.assign(); }
  16261. - else {
  16262. - if (width!=height || depth>1 || dim>1)
  16263. - throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.",
  16264. - pixel_type(),width,height,depth,dim,data);
  16265. - if (val.size()<width) val.assign(1,width);
  16266. - if (vec.size()<width*width) vec.assign(width,width);
  16267. - switch(width) {
  16268. - case 1: { val[0]=(t)(*this)[0]; vec[0]=(t)1; } break;
  16269. - case 2: {
  16270. - const double a = (*this)[0], b = (*this)[1], c = (*this)[2], d = (*this)[3], e = a+d;
  16271. - double f = e*e-4*(a*d-b*c);
  16272. - cimg::warn(f<0,"CImg<%s>::eigen() : Complex eigenvalues",pixel_type());
  16273. - f = std::sqrt(f);
  16274. - const double l1 = 0.5*(e-f), l2 = 0.5*(e+f);
  16275. - const double theta1 = std::atan2(l2-a,b), theta2 = std::atan2(l1-a,b);
  16276. - val[0]=(t)l2;
  16277. - val[1]=(t)l1;
  16278. - vec(0,0) = (t)std::cos(theta1);
  16279. - vec(0,1) = (t)std::sin(theta1);
  16280. - vec(1,0) = (t)std::cos(theta2);
  16281. - vec(1,1) = (t)std::sin(theta2);
  16282. - } break;
  16283. - default:
  16284. - throw CImgInstanceException("CImg<%s>::eigen() : Eigenvalues computation of general matrices is limited"
  16285. - "to 2x2 matrices (given is %ux%u)", pixel_type(),width,height);
  16286. - }
  16287. - }
  16288. - return *this;
  16289. - }
  16290. -
  16291. - //! Return the eigenvalues and eigenvectors of a matrix.
  16292. - CImgList<typename cimg::largest<T,float>::type> get_eigen() const {
  16293. - typedef typename cimg::largest<T,float>::type restype;
  16294. - CImgList<restype> res(2);
  16295. - eigen(res[0],res[1]);
  16296. - return res;
  16297. - }
  16298. -
  16299. - //! Compute the eigenvalues and eigenvectors of a matrix.
  16300. - template<typename t> const CImg<T>& eigen(CImgList<t>& eig) const {
  16301. - if (eig.size<2) eig.assign(2);
  16302. - eigen(eig[0],eig[1]);
  16303. - return *this;
  16304. - }
  16305. -
  16306. - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
  16307. - template<typename t> const CImg<T>& symmetric_eigen(CImg<t>& val, CImg<t>& vec) const {
  16308. - if (is_empty()) { val.assign(); vec.assign(); }
  16309. - else {
  16310. - if (width!=height || depth>1 || dim>1)
  16311. - throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.",
  16312. - pixel_type(),width,height,depth,dim,data);
  16313. -
  16314. - if (val.size()<width) val.assign(1,width);
  16315. - if (vec.data && vec.size()<width*width) vec.assign(width,width);
  16316. - if (width<3) return eigen(val,vec);
  16317. - CImg<t> V(width,width);
  16318. - SVD(vec,val,V,false);
  16319. - cimg_forX(vec,x) { // check for negative eigenvalues
  16320. - t scal=0;
  16321. - cimg_forY(vec,y) scal+=vec(x,y)*V(x,y);
  16322. - if (scal<0) val[x]=-val[x];
  16323. - }
  16324. - CImg<int> permutations(width); // sort eigenvalues in decreasing order
  16325. - CImg<t> tmp(width);
  16326. - val.sort(permutations,false);
  16327. - cimg_forY(vec,k) {
  16328. - cimg_forX(permutations,x) tmp(x) = vec(permutations(x),k);
  16329. - std::memcpy(vec.ptr(0,k),tmp.data,sizeof(t)*width);
  16330. - }
  16331. - }
  16332. - return *this;
  16333. - }
  16334. -
  16335. - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
  16336. - CImgList<typename cimg::largest<T,float>::type> get_symmetric_eigen() const {
  16337. - typedef typename cimg::largest<T,float>::type restype;
  16338. - CImgList<restype> res(2);
  16339. - symmetric_eigen(res[0],res[1]);
  16340. - return res;
  16341. - }
  16342. -
  16343. - //! Compute the eigenvalues and eigenvectors of a symmetric matrix.
  16344. - template<typename t> const CImg<T>& symmetric_eigen(CImgList<t>& eig) const {
  16345. - if (eig.size<2) eig.assign(2);
  16346. - symmetric_eigen(eig[0],eig[1]);
  16347. - return *this;
  16348. - }
  16349. -
  16350. - template<typename t> CImg<T>& _quicksort(const int min,const int max,CImg<t>& permutations,const bool increasing) {
  16351. - if (min<max) {
  16352. - const int mid = (min+max)/2;
  16353. - if (increasing) {
  16354. - if ((*this)[min]>(*this)[mid]) {
  16355. - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
  16356. - if ((*this)[mid]>(*this)[max]) {
  16357. - cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); }
  16358. - if ((*this)[min]>(*this)[mid]) {
  16359. - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
  16360. - } else {
  16361. - if ((*this)[min]<(*this)[mid]) {
  16362. - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
  16363. - if ((*this)[mid]<(*this)[max]) {
  16364. - cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); }
  16365. - if ((*this)[min]<(*this)[mid]) {
  16366. - cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); }
  16367. - }
  16368. - if (max-min>=3) {
  16369. - const T pivot = (*this)[mid];
  16370. - int i = min, j = max;
  16371. - if (increasing) {
  16372. - do {
  16373. - while ((*this)[i]<pivot) i++;
  16374. - while ((*this)[j]>pivot) j--;
  16375. - if (i<=j) {
  16376. - cimg::swap((*this)[i],(*this)[j]);
  16377. - cimg::swap(permutations[i++],permutations[j--]);
  16378. - }
  16379. - } while (i<=j);
  16380. - } else {
  16381. - do {
  16382. - while ((*this)[i]>pivot) i++;
  16383. - while ((*this)[j]<pivot) j--;
  16384. - if (i<=j) {
  16385. - cimg::swap((*this)[i],(*this)[j]);
  16386. - cimg::swap(permutations[i++],permutations[j--]);
  16387. - }
  16388. - } while (i<=j);
  16389. - }
  16390. - if (min<j) _quicksort(min,j,permutations,increasing);
  16391. - if (i<max) _quicksort(i,max,permutations,increasing);
  16392. - }
  16393. - }
  16394. - return *this;
  16395. - }
  16396. -
  16397. - //! Sort values of a vector and get permutations.
  16398. - template<typename t>
  16399. - CImg<T>& sort(CImg<t>& permutations,const bool increasing=true) {
  16400. - if (is_empty()) permutations.assign();
  16401. - else {
  16402. - if (permutations.size()!=size()) permutations.assign(size());
  16403. - cimg_foroff(permutations,off) permutations[off] = (t)off;
  16404. - _quicksort(0,size()-1,permutations,increasing);
  16405. - }
  16406. - return *this;
  16407. - }
  16408. -
  16409. - //! Sort values of a vector.
  16410. - CImg<T>& sort(const bool increasing=true) { CImg<T> foo; return sort(foo,increasing); }
  16411. -
  16412. - //! Get a sorted version a of vector, with permutations.
  16413. - template<typename t> CImg<T> get_sort(CImg<t>& permutations,const bool increasing=true) {
  16414. - return (+*this).sort(permutations,increasing);
  16415. - }
  16416. -
  16417. - //! Get a sorted version of a vector.
  16418. - CImg<T> get_sort(const bool increasing=true) {
  16419. - return (+*this).sort(increasing);
  16420. - }
  16421. -
  16422. - //! Get a permutation of the pixels
  16423. - template<typename t> CImg<T> get_permute(const CImg<t>& permutation) const {
  16424. - if (permutation.size()!=size())
  16425. - throw CImgArgumentException("CImg<%s>::get_permute() : Instance image (%u,%u,%u,%u,%p) and permutation (%u,%u,%u,%u,%p)"
  16426. - "have different sizes.",pixel_type(),
  16427. - width,height,depth,dim,data,
  16428. - permutation.width,permutation.height,permutation.depth,permutation.dim,permutation.data);
  16429. - CImg<T> res(width,height,depth,dim);
  16430. - const t *p = permutation.ptr(permutation.size());
  16431. - cimg_for(res,ptr,T) *ptr = (*this)[*(--p)];
  16432. - return res;
  16433. - }
  16434. -
  16435. - //! In-place version of the previous function
  16436. - template<typename t> CImg<T>& permute(const CImg<t>& permutation) {
  16437. - return get_permute(permutation).swap(*this);
  16438. - }
  16439. -
  16440. - //@}
  16441. - //-------------------
  16442. - //
  16443. - //! \name Display
  16444. - //@{
  16445. - //-------------------
  16446. -
  16447. - //! Display an image into a CImgDisplay window.
  16448. - const CImg& display(CImgDisplay& disp) const {
  16449. - disp.display(*this);
  16450. - return *this;
  16451. - }
  16452. -
  16453. - //! Display an image in a window with a title \p title, and wait a 'is_closed' or 'keyboard' event.\n
  16454. - //! Parameters \p min_size and \p max_size set the minimum and maximum dimensions of the display window.
  16455. - //! If negative, they corresponds to a percentage of the original image size.
  16456. - const CImg& display(const char* title, const int min_size=128, const int max_size=1024) const {
  16457. - if (is_empty())
  16458. - throw CImgInstanceException("CImg<%s>::display() : Instance image (%u,%u,%u,%u,%p) is empty.",
  16459. - pixel_type(),width,height,depth,dim,data);
  16460. - CImgDisplay *disp;
  16461. - unsigned int w = width+(depth>1?depth:0), h = height+(depth>1?depth:0), XYZ[3];
  16462. - print(title);
  16463. - const unsigned int dmin = cimg::min(w,h), minsiz = min_size>=0?min_size:(-min_size)*dmin/100;
  16464. - if (dmin<minsiz) { w=w*minsiz/dmin; w+=(w==0); h=h*minsiz/dmin; h+=(h==0); }
  16465. - const unsigned int dmax = cimg::max(w,h), maxsiz = max_size>=0?max_size:(-max_size)*dmax/100;
  16466. - if (dmax>maxsiz) { w=w*maxsiz/dmax; w+=(w==0); h=h*maxsiz/dmax; h+=(h==0); }
  16467. - disp = new CImgDisplay(w,h,title,3,3);
  16468. - XYZ[0] = width/2; XYZ[1] = height/2; XYZ[2] = depth/2;
  16469. - while (!disp->is_closed && !disp->key) feature_selection(0,1,*disp,XYZ);
  16470. - delete disp;
  16471. - return *this;
  16472. - }
  16473. -
  16474. - //! Display an image in a window, with a default title. See also \see display() for details on parameters.
  16475. - const CImg& display(const int min_size=128, const int max_size=1024) const {
  16476. - char title[256]={0};
  16477. - std::sprintf(title,"CImg<%s>",pixel_type());
  16478. - return display(title,min_size,max_size);
  16479. - }
  16480. -
  16481. - //! High-level interface to select features from images
  16482. - const CImg& feature_selection(int* const selection, const int feature_type, CImgDisplay &disp,
  16483. - unsigned int *const XYZ=0,const unsigned char *const color=0) const {
  16484. - if (is_empty())
  16485. - throw CImgInstanceException("CImg<%s>::feature_selection() : Instance image (%u,%u,%u,%u,%p) is empty.",
  16486. - pixel_type(),width,height,depth,dim,data);
  16487. -
  16488. - const unsigned int
  16489. - old_events = disp.events,
  16490. - old_normalization = disp.normalization,
  16491. - hatch = 0x55555555;
  16492. -
  16493. - bool old_is_resized = disp.is_resized;
  16494. - disp.events = 3;
  16495. - disp.normalization = 0;
  16496. - disp.show().key = 0;
  16497. -
  16498. - unsigned char fgcolor[3] = { 255,255,105 }, bgcolor[3] = { 0,0,0 };
  16499. - if (color) std::memcpy(fgcolor,color,sizeof(unsigned char)*cimg::min(3,dimv()));
  16500. -
  16501. - int area = 0, clicked_area = 0, phase = 0,
  16502. - X0 = (int)((XYZ?XYZ[0]:width/2)%width), Y0 = (int)((XYZ?XYZ[1]:height/2)%height), Z0 = (int)((XYZ?XYZ[2]:depth/2)%depth),
  16503. - X1 =-1, Y1 = -1, Z1 = -1,
  16504. - X = -1, Y = -1, Z = -1,
  16505. - oX = X, oY = Y, oZ = Z;
  16506. - unsigned int old_button = 0, key = 0;
  16507. -
  16508. - bool feature_selected = false, text_down = false;
  16509. - CImg<unsigned char> visu, visu0;
  16510. - char text[1024] = { 0 };
  16511. -
  16512. - while (!key && !disp.is_closed && !feature_selected) {
  16513. -
  16514. - // Handle mouse motion and selection
  16515. - oX = X; oY = Y; oZ = Z;
  16516. - int mx = disp.mouse_x, my = disp.mouse_y;
  16517. - const int mX = mx*(width+(depth>1?depth:0))/disp.width, mY = my*(height+(depth>1?depth:0))/disp.height;
  16518. -
  16519. - area = 0;
  16520. - if (mX<dimx() && mY<dimy()) { area = 1; X = mX; Y = mY; Z = phase?Z1:Z0; }
  16521. - if (mX<dimx() && mY>=dimy()) { area = 2; X = mX; Z = mY-height; Y = phase?Y1:Y0; }
  16522. - if (mX>=dimx() && mY<dimy()) { area = 3; Y = mY; Z = mX-width; X = phase?X1:X0; }
  16523. -
  16524. - key = disp.key;
  16525. - if (key && key!=cimg::keyCTRLLEFT) {
  16526. - if (disp.is_pressed(cimg::keyCTRLLEFT)) {
  16527. - switch (key) {
  16528. - case cimg::keyARROWLEFT:
  16529. - case cimg::keyARROWDOWN: disp.wheel--; break;
  16530. - case cimg::keyARROWRIGHT:
  16531. - case cimg::keyARROWUP: disp.wheel++; break;
  16532. - case cimg::keyD: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-200,-200); disp.is_resized = true; break;
  16533. - case cimg::keyC: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-50,-50); disp.is_resized = true; break;
  16534. - case cimg::keyF:
  16535. - disp.resize(disp.screen_dimx(),disp.screen_dimy()).toggle_fullscreen();
  16536. - disp.is_resized = true;
  16537. - break;
  16538. - case cimg::keyS: {
  16539. - static unsigned int snap_number = 0;
  16540. - char filename[32] = {0};
  16541. - std::FILE *file;
  16542. - do {
  16543. - std::sprintf(filename,"CImg_%.4u.bmp",snap_number++);
  16544. - if ((file=std::fopen(filename,"r"))!=0) std::fclose(file);
  16545. - } while (file);
  16546. - if (!visu0.is_empty()) visu0.save(filename);
  16547. - } break;
  16548. - default: break;
  16549. - }
  16550. - key = disp.key = 0;
  16551. - }
  16552. - } else key = 0;
  16553. -
  16554. - if (!area) mx = my = X = Y = Z = -1;
  16555. - else {
  16556. - if (disp.button&1 && phase<2) { X1 = X; Y1 = Y; Z1 = Z; }
  16557. - if (!(disp.button&1) && phase>=2) {
  16558. - switch (clicked_area) {
  16559. - case 1: Z1 = Z; break;
  16560. - case 2: Y1 = Y; break;
  16561. - case 3: X1 = X; break;
  16562. - }
  16563. - }
  16564. - if (disp.button&2) { if (phase) { X1 = X; Y1 = Y; Z1 = Z; } else { X0 = X; Y0 = Y; Z0 = Z; } }
  16565. - if (disp.button&4) { oX = X = X0; oY = Y = Y0; oZ = Z = Z0; phase = 0; visu.assign(); }
  16566. - if (disp.wheel) {
  16567. - switch (area) {
  16568. - case 1: if (phase) Z = (Z1+=disp.wheel); else Z = (Z0+=disp.wheel); break;
  16569. - case 2: if (phase) Y = (Y1+=disp.wheel); else Y = (Y0+=disp.wheel); break;
  16570. - case 3: if (phase) X = (X1+=disp.wheel); else X = (X0+=disp.wheel); break;
  16571. - default: break;
  16572. - }
  16573. - disp.wheel = 0;
  16574. - }
  16575. - if ((disp.button&1)!=old_button) {
  16576. - switch (phase++) {
  16577. - case 0: X0 = X1 = X; Y0 = Y1 = Y; Z0 = Z1 = Z; clicked_area = area; break;
  16578. - case 1: X1 = X; Y1 = Y; Z1 = Z; break;
  16579. - default: break;
  16580. - }
  16581. - old_button = disp.button&1;
  16582. - }
  16583. - if (depth>1 && (X!=oX || Y!=oY || Z!=oZ)) visu0.assign();
  16584. - }
  16585. -
  16586. - if (phase) {
  16587. - if (!feature_type) feature_selected = phase?true:false;
  16588. - else {
  16589. - if (depth>1) feature_selected = (phase==3)?true:false;
  16590. - else feature_selected = (phase==2)?true:false;
  16591. - }
  16592. - }
  16593. -
  16594. - if (X0<0) X0 = 0; if (X0>=(int)width) X0 = (int)width-1; if (Y0<0) Y0 = 0; if (Y0>=(int)height) Y0 = (int)height-1;
  16595. - if (Z0<0) Z0 = 0; if (Z0>=(int)depth) Z0 = (int)depth-1;
  16596. - if (X1<1) X1 = 0; if (X1>=(int)width) X1 = (int)width-1; if (Y1<0) Y1 = 0; if (Y1>=(int)height) Y1 = (int)height-1;
  16597. - if (Z1<0) Z1 = 0; if (Z1>=(int)depth) Z1 = (int)depth-1;
  16598. -
  16599. - // Draw visualization image on the display
  16600. - if (oX!=X || oY!=Y || oZ!=Z || visu0.is_empty()) {
  16601. - if (visu0.is_empty()) {
  16602. - CImg<T> tmp;
  16603. - if (depth==1) tmp = get_resize(disp.width,disp.height,1,cimg::min(3,dimv()));
  16604. - else tmp = (!phase?get_projections2d(X0,Y0,Z0):get_projections2d(X1,Y1,Z1)).get_resize(disp.width,disp.height,1,cimg::min(3,dimv()));
  16605. - if (old_normalization) {
  16606. - if (old_normalization<3 || cimg::type<T>::is_float()) {
  16607. - if (sizeof(T)>1) visu0.assign(tmp.normalize(0,255));
  16608. - else visu0.assign(tmp).normalize(0,255);
  16609. - } else {
  16610. - if (cimg::type<T>::id()!=cimg::type<unsigned char>::id()) {
  16611. - const float m = cimg::type<T>::min(), M = cimg::type<T>::max();
  16612. - visu0.assign((CImg<float>(tmp)-=m)*=255.0f/(M-m));
  16613. - } else visu0.assign(tmp);
  16614. - }
  16615. - } else visu0.assign(tmp);
  16616. - }
  16617. - visu = visu0;
  16618. -
  16619. - const int d=(depth>1)?depth:0;
  16620. - if (phase) switch (feature_type) {
  16621. - case 1: {
  16622. - const int
  16623. - x0=(int)((X0+0.5f)*disp.width/(width+d)), y0=(int)((Y0+0.5f)*disp.height/(height+d)),
  16624. - x1=(int)((X1+0.5f)*disp.width/(width+d)), y1=(int)((Y1+0.5f)*disp.height/(height+d));
  16625. - visu.draw_arrow(x0,y0,x1,y1,fgcolor,30.0f,5.0f,hatch);
  16626. - if (d) {
  16627. - const int zx0=(int)((width+Z0+0.5f)*disp.width/(width+d)), zx1=(int)((width+Z1+0.5f)*disp.width/(width+d)),
  16628. - zy0=(int)((height+Z0+0.5f)*disp.height/(height+d)), zy1=(int)((height+Z1+0.5f)*disp.height/(height+d));
  16629. - visu.draw_arrow(zx0,y0,zx1,y1,fgcolor,30.0f,5.0f,hatch).draw_arrow(x0,zy0,x1,zy1,fgcolor,30.0f,5.0f,hatch);
  16630. - }
  16631. - } break;
  16632. - case 2: {
  16633. - const int
  16634. - x0=(X0<X1?X0:X1)*disp.width/(width+d),
  16635. - y0=(Y0<Y1?Y0:Y1)*disp.height/(height+d),
  16636. - x1=((X0<X1?X1:X0)+1)*disp.width/(width+d)-1,
  16637. - y1=((Y0<Y1?Y1:Y0)+1)*disp.height/(height+d)-1;
  16638. - visu.draw_rectangle(x0,y0,x1,y1,fgcolor,0.2f).draw_line(x0,y0,x1,y0,fgcolor,hatch).
  16639. - draw_line(x1,y0,x1,y1,fgcolor,hatch).draw_line(x1,y1,x0,y1,fgcolor,hatch).draw_line(x0,y1,x0,y0,fgcolor,hatch);
  16640. - if (d) {
  16641. - const int
  16642. - zx0=(int)((width+(Z0<Z1?Z0:Z1))*disp.width/(width+d)),
  16643. - zy0=(int)((height+(Z0<Z1?Z0:Z1))*disp.height/(height+d)),
  16644. - zx1=(int)((width+(Z0<Z1?Z1:Z0)+1)*disp.width/(width+d))-1,
  16645. - zy1=(int)((height+(Z0<Z1?Z1:Z0)+1)*disp.height/(height+d))-1;
  16646. - visu.draw_rectangle(zx0,y0,zx1,y1,fgcolor,0.2f).draw_line(zx0,y0,zx1,y0,fgcolor,hatch).
  16647. - draw_line(zx1,y0,zx1,y1,fgcolor,hatch).draw_line(zx1,y1,zx0,y1,fgcolor,hatch).draw_line(zx0,y1,zx0,y0,fgcolor,hatch);
  16648. - visu.draw_rectangle(x0,zy0,x1,zy1,fgcolor,0.2f).draw_line(x0,zy0,x1,zy0,fgcolor,hatch).
  16649. - draw_line(x1,zy0,x1,zy1,fgcolor,hatch).draw_line(x1,zy1,x0,zy1,fgcolor,hatch).draw_line(x0,zy1,x0,zy0,fgcolor,hatch);
  16650. - }
  16651. - } break;
  16652. - case 3: {
  16653. - const int
  16654. - x0=X0*disp.width/(width+d),
  16655. - y0=Y0*disp.height/(height+d),
  16656. - x1=X1*disp.width/(width+d)-1,
  16657. - y1=Y1*disp.height/(height+d)-1;
  16658. - visu.draw_ellipse(x0,y0,(float)(x1-x0),(float)(y1-y0),1.0f,0.0f,fgcolor,0L,0.2f).
  16659. - draw_ellipse(x0,y0,(float)(x1-x0),(float)(y1-y0),1.0f,0.0f,fgcolor,hatch);
  16660. - if (d) {
  16661. - const int
  16662. - zx0=(int)((width+Z0)*disp.width/(width+d)),
  16663. - zy0=(int)((height+Z0)*disp.height/(height+d)),
  16664. - zx1=(int)((width+Z1+1)*disp.width/(width+d))-1,
  16665. - zy1=(int)((height+Z1+1)*disp.height/(height+d))-1;
  16666. - visu.draw_ellipse(zx0,y0,(float)(zx1-zx0),(float)(y1-y0),1.0f,0.0f,fgcolor,0L,0.2f).
  16667. - draw_ellipse(zx0,y0,(float)(zx1-zx0),(float)(y1-y0),1.0f,0.0f,fgcolor,hatch).
  16668. - draw_ellipse(x0,zy0,(float)(x1-x0),(float)(zy1-zy0),1.0f,0.0f,fgcolor,0L,0.2f).
  16669. - draw_ellipse(x0,zy0,(float)(x1-x0),(float)(zy1-zy0),1.0f,0.0f,fgcolor,hatch);
  16670. - }
  16671. - } break;
  16672. - }
  16673. -
  16674. - if (my<12) text_down = true;
  16675. - if (my>=visu.dimy()-11) text_down = false;
  16676. - if (!feature_type || !phase) {
  16677. - if (X>=0 && Y>=0 && Z>=0 && X<(int)width && Y<(int)height && Z<(int)depth) {
  16678. - if (depth>1) std::sprintf(text,"Coords (%d,%d,%d)={ ",X,Y,Z); else std::sprintf(text,"Coords (%d,%d)={ ",X,Y);
  16679. - char *ctext = text + cimg::strlen(text), *const ltext = text+512;
  16680. - for (unsigned int k=0; k<dim && ctext<ltext; k++) {
  16681. - std::sprintf(ctext,"%g ",(double)(*this)(X,Y,Z,k));
  16682. - ctext = text + cimg::strlen(text);
  16683. - }
  16684. - std::sprintf(text+cimg::strlen(text),"}");
  16685. - }
  16686. - } else switch (feature_type) {
  16687. - case 1: {
  16688. - const double dX=(double)(X0-X1), dY=(double)(Y0-Y1), dZ=(double)(Z0-Z1), norm = std::sqrt(dX*dX+dY*dY+dZ*dZ);
  16689. - if (depth>1) std::sprintf(text,"Vect (%d,%d,%d)-(%d,%d,%d), norm=%g",X0,Y0,Z0,X1,Y1,Z1,norm);
  16690. - else std::sprintf(text,"Vect (%d,%d)-(%d,%d), norm=%g",X0,Y0,X1,Y1,norm);
  16691. - } break;
  16692. - case 2:
  16693. - if (depth>1) std::sprintf(text,"Box (%d,%d,%d)-(%d,%d,%d), Size=(%d,%d,%d)",
  16694. - X0<X1?X0:X1,Y0<Y1?Y0:Y1,Z0<Z1?Z0:Z1,
  16695. - X0<X1?X1:X0,Y0<Y1?Y1:Y0,Z0<Z1?Z1:Z0,
  16696. - 1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1),1+cimg::abs(Z0-Z1));
  16697. - else std::sprintf(text,"Box (%d,%d)-(%d,%d), Size=(%d,%d)",
  16698. - X0<X1?X0:X1,Y0<Y1?Y0:Y1,X0<X1?X1:X0,Y0<Y1?Y1:Y0,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1));
  16699. - break;
  16700. - default:
  16701. - if (depth>1) std::sprintf(text,"Ellipse (%d,%d,%d)-(%d,%d,%d), Radii=(%d,%d,%d)",
  16702. - X0,Y0,Z0,X1,Y1,Z1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1),1+cimg::abs(Z0-Z1));
  16703. - else std::sprintf(text,"Ellipse (%d,%d)-(%d,%d), Radii=(%d,%d)",
  16704. - X0,Y0,X1,Y1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1));
  16705. -
  16706. - break;
  16707. - }
  16708. - if (phase || (mx>=0 && my>=0)) visu.draw_text(text,0,text_down?visu.dimy()-11:0,fgcolor,bgcolor,11,0.7f);
  16709. - disp.display(visu).wait(25);
  16710. - } else disp.wait();
  16711. -
  16712. - if (disp.is_resized) { disp.resize(false); old_is_resized = true; disp.is_resized = false; visu0.assign(); }
  16713. - }
  16714. -
  16715. - // Return result
  16716. - if (XYZ) { XYZ[0] = (unsigned int)X0; XYZ[1] = (unsigned int)Y0; XYZ[2] = (unsigned int)Z0; }
  16717. - if (feature_selected) {
  16718. - if (feature_type==2) {
  16719. - if (X0>X1) cimg::swap(X0,X1);
  16720. - if (Y0>Y1) cimg::swap(Y0,Y1);
  16721. - if (Z0>Z1) cimg::swap(Z0,Z1);
  16722. - }
  16723. - if (selection) {
  16724. - if (X1<0 || Y1<0 || Z1<0) X0=Y0=Z0=X1=Y1=Z1=-1;
  16725. - switch(feature_type) {
  16726. - case 1:
  16727. - case 2: selection[3] = X1; selection[4] = Y1; selection[5] = Z1;
  16728. - default: selection[0] = X0; selection[1] = Y0; selection[2] = Z0;
  16729. - }
  16730. - }
  16731. - } else if (selection) selection[0]=selection[1]=selection[2]=selection[3]=selection[4]=selection[5]=-1;
  16732. - disp.button = 0;
  16733. - disp.events = old_events;
  16734. - disp.normalization = old_normalization;
  16735. - disp.is_resized = old_is_resized;
  16736. - disp.key = key;
  16737. - return *this;
  16738. - }
  16739. -
  16740. - //! High-level interface to select features in images
  16741. - const CImg& feature_selection(int *const selection, const int feature_type,
  16742. - unsigned int *const XYZ=0,const unsigned char *const color=0) const {
  16743. - unsigned int w = width + (depth>1?depth:0), h = height + (depth>1?depth:0);
  16744. - const unsigned int dmin = cimg::min(w,h), minsiz = 256;
  16745. - if (dmin<minsiz) { w=w*minsiz/dmin; h=h*minsiz/dmin; }
  16746. - const unsigned int dmax = cimg::max(w,h), maxsiz = 1024;
  16747. - if (dmax>maxsiz) { w=w*maxsiz/dmax; h=h*maxsiz/dmax; }
  16748. - CImgDisplay disp(w,h," ",1,3);
  16749. - return feature_selection(selection,feature_type,disp,XYZ,color);
  16750. - }
  16751. -
  16752. - //! High-level interface for displaying a 3d object
  16753. - template<typename tp, typename tf, typename to>
  16754. - const CImg& display_object3d(const CImg<tp>& points,const CImgList<tf>& primitives,
  16755. - const CImgList<T>& colors, const CImgList<to>& opacities, CImgDisplay& disp,
  16756. - const bool centering=true,
  16757. - const int render_static=4, const int render_motion=1,
  16758. - const bool double_sided=false,
  16759. - const float focale=500.0f, const float ambiant_light=0.05f,
  16760. - const bool display_axes=true, float *const pose_matrix=0) const {
  16761. -
  16762. - // Check input arguments
  16763. - if (points.is_empty() || primitives.is_empty() || opacities.is_empty())
  16764. - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (%u), primitives (%u) or opacities (%u) are empty.",
  16765. - pixel_type(),points.size()/3,primitives.size,opacities.size);
  16766. - if (is_empty())
  16767. - return CImg<T>(disp.width,disp.height,1,colors[0].size(),0).
  16768. - display_object3d(points,primitives,colors,opacities,disp,centering,
  16769. - render_static,render_motion,double_sided,focale,ambiant_light);
  16770. - if (points.height<3)
  16771. - return display_object3d(points.get_resize(-100,3,1,1,0),primitives,colors,opacities,disp,
  16772. - centering,render_static,render_motion,double_sided,focale,ambiant_light);
  16773. -
  16774. - // Init 3D objects and compute object statistics
  16775. - CImg<float> pose, rot_mat,
  16776. - centered_points = centering?CImg<float>(points.width,3):CImg<float>(),
  16777. - rotated_points(points.width,3),
  16778. - bbox_points, rotated_bbox_points,
  16779. - axes_points, rotated_axes_points;
  16780. - CImgList<to> bbox_opacities, axes_opacities;
  16781. - CImgList<T> bbox_colors, axes_colors;
  16782. - CImgList<tf> bbox_primitives, axes_primitives;
  16783. - float dx=0, dy=0, dz=0, ratio=1;
  16784. - const T valmax = cimg::type<T>::max();
  16785. -
  16786. - const CImgStats
  16787. - sx(points.get_shared_line(0),false),
  16788. - sy(points.get_shared_line(1),false),
  16789. - sz(points.get_shared_line(2),false);
  16790. - const float
  16791. - xm = (float)sx.min, xM = (float)sx.max,
  16792. - ym = (float)sy.min, yM = (float)sy.max,
  16793. - zm = (float)sz.min, zM = (float)sz.max,
  16794. - delta = cimg::max(xM-xm,yM-ym,zM-zm);
  16795. -
  16796. - if (display_axes) {
  16797. - axes_points.assign(7,3);
  16798. - rotated_axes_points.assign(7,3);
  16799. - axes_opacities.assign(3,1,1,1,1,1.0f);
  16800. - axes_colors.assign(3,dim,1,1,1,valmax);
  16801. - axes_points(0,0) = 0; axes_points(0,1) = 0; axes_points(0,2) = 0;
  16802. - axes_points(1,0) = 20; axes_points(1,1) = 0; axes_points(1,2) = 0;
  16803. - axes_points(2,0) = 0; axes_points(2,1) = 20; axes_points(2,2) = 0;
  16804. - axes_points(3,0) = 0; axes_points(3,1) = 0; axes_points(3,2) = 20;
  16805. - axes_points(4,0) = 22; axes_points(4,1) = -6; axes_points(4,2) = 0;
  16806. - axes_points(5,0) = -6; axes_points(5,1) = 22; axes_points(5,2) = 0;
  16807. - axes_points(6,0) = -6; axes_points(6,1) = -6; axes_points(6,2) = 22;
  16808. - axes_primitives.insert(CImg<tf>::vector(0,1));
  16809. - axes_primitives.insert(CImg<tf>::vector(0,2));
  16810. - axes_primitives.insert(CImg<tf>::vector(0,3));
  16811. - }
  16812. -
  16813. - // Begin user interaction loop
  16814. - CImg<T> visu0(*this), visu;
  16815. - bool init = true, clicked = false, redraw = true;
  16816. - unsigned int key = 0;
  16817. - int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
  16818. - const unsigned int old_events = disp.events;
  16819. - disp.show().button = disp.key = 0;
  16820. - disp.events = 3;
  16821. -
  16822. - while (!disp.is_closed && !key) {
  16823. -
  16824. - // Init object position and scale if necessary
  16825. - if (init) {
  16826. - ratio = delta>0?(2.0f*cimg::min(disp.width,disp.height)/(3.0f*delta)):0;
  16827. - dx = 0.5f*(xM+xm); dy = 0.5f*(yM+ym); dz = 0.5f*(zM+zm);
  16828. - if (centering) {
  16829. - cimg_forX(centered_points,l) {
  16830. - centered_points(l,0) = (float)((points(l,0)-dx)*ratio);
  16831. - centered_points(l,1) = (float)((points(l,1)-dy)*ratio);
  16832. - centered_points(l,2) = (float)((points(l,2)-dz)*ratio);
  16833. - }
  16834. - }
  16835. -
  16836. - if (render_static<0 || render_motion<0) {
  16837. - bbox_colors.assign(12,dim,1,1,1,valmax);
  16838. - bbox_primitives.assign(12,1,2);
  16839. - bbox_points.assign(8,3);
  16840. - rotated_bbox_points.assign(8,3);
  16841. - bbox_points(0,0) = xm; bbox_points(0,1) = ym; bbox_points(0,2) = zm;
  16842. - bbox_points(1,0) = xM; bbox_points(1,1) = ym; bbox_points(1,2) = zm;
  16843. - bbox_points(2,0) = xM; bbox_points(2,1) = yM; bbox_points(2,2) = zm;
  16844. - bbox_points(3,0) = xm; bbox_points(3,1) = yM; bbox_points(3,2) = zm;
  16845. - bbox_points(4,0) = xm; bbox_points(4,1) = ym; bbox_points(4,2) = zM;
  16846. - bbox_points(5,0) = xM; bbox_points(5,1) = ym; bbox_points(5,2) = zM;
  16847. - bbox_points(6,0) = xM; bbox_points(6,1) = yM; bbox_points(6,2) = zM;
  16848. - bbox_points(7,0) = xm; bbox_points(7,1) = yM; bbox_points(7,2) = zM;
  16849. - bbox_primitives[0].fill(0,1); bbox_primitives[1].fill(1,2); bbox_primitives[2].fill(2,3); bbox_primitives[3].fill(3,0);
  16850. - bbox_primitives[4].fill(4,5); bbox_primitives[5].fill(5,6); bbox_primitives[6].fill(6,7); bbox_primitives[7].fill(7,4);
  16851. - bbox_primitives[8].fill(0,4); bbox_primitives[9].fill(1,5); bbox_primitives[10].fill(2,6); bbox_primitives[11].fill(3,7);
  16852. - bbox_opacities.assign(bbox_primitives.size,1,1,1,1,1.0f);
  16853. - }
  16854. -
  16855. - if (pose_matrix) pose = CImg<float>(pose_matrix,4,4,1,1,false); else pose = CImg<float>::identity_matrix(4);
  16856. - init = false;
  16857. - redraw = true;
  16858. - }
  16859. -
  16860. - // Rotate and Draw 3D object
  16861. - if (redraw) {
  16862. - const float
  16863. - r00 = pose(0,0), r10 = pose(1,0), r20 = pose(2,0), r30 = pose(3,0),
  16864. - r01 = pose(0,1), r11 = pose(1,1), r21 = pose(2,1), r31 = pose(3,1),
  16865. - r02 = pose(0,2), r12 = pose(1,2), r22 = pose(2,2), r32 = pose(3,2);
  16866. - if ((clicked && render_motion>=0) || (!clicked && render_static>=0)) {
  16867. - if (centering) cimg_forX(centered_points,l) {
  16868. - const float x = centered_points(l,0), y = centered_points(l,1), z = centered_points(l,2);
  16869. - rotated_points(l,0) = r00*x + r10*y + r20*z + r30;
  16870. - rotated_points(l,1) = r01*x + r11*y + r21*z + r31;
  16871. - rotated_points(l,2) = r02*x + r12*y + r22*z + r32;
  16872. - } else cimg_forX(points,l) {
  16873. - const float x = (float)points(l,0), y = (float)points(l,1), z = (float)points(l,2);
  16874. - rotated_points(l,0) = r00*x + r10*y + r20*z + r30;
  16875. - rotated_points(l,1) = r01*x + r11*y + r21*z + r31;
  16876. - rotated_points(l,2) = r02*x + r12*y + r22*z + r32;
  16877. - }
  16878. - } else {
  16879. - if (!centering) cimg_forX(bbox_points,l) {
  16880. - const float x = bbox_points(l,0), y = bbox_points(l,1), z = bbox_points(l,2);
  16881. - rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30;
  16882. - rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31;
  16883. - rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32;
  16884. - } else cimg_forX(bbox_points,l) {
  16885. - const float x = (bbox_points(l,0)-dx)*ratio, y = (bbox_points(l,1)-dy)*ratio, z = (bbox_points(l,2)-dz)*ratio;
  16886. - rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30;
  16887. - rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31;
  16888. - rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32;
  16889. - }
  16890. - }
  16891. -
  16892. - // Draw object
  16893. - visu = visu0;
  16894. - if ((clicked && render_motion<0) || (!clicked && render_static<0))
  16895. - visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0,
  16896. - rotated_bbox_points,bbox_primitives,bbox_colors,bbox_opacities,1,
  16897. - false,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,0.2f);
  16898. - else visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0,
  16899. - rotated_points,primitives,colors,opacities,clicked?render_motion:render_static,
  16900. - double_sided,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,ambiant_light);
  16901. -
  16902. - // Draw axes
  16903. - if (display_axes) {
  16904. - const float Xaxes = 25.0f, Yaxes = visu.height-35.0f;
  16905. - cimg_forX(axes_points,l) {
  16906. - const float x = axes_points(l,0), y = axes_points(l,1), z = axes_points(l,2);
  16907. - rotated_axes_points(l,0) = r00*x + r10*y + r20*z;
  16908. - rotated_axes_points(l,1) = r01*x + r11*y + r21*z;
  16909. - rotated_axes_points(l,2) = r02*x + r12*y + r22*z;
  16910. - }
  16911. - axes_opacities(0,0) = (rotated_axes_points(1,2)>0)?0.5f:1.0f;
  16912. - axes_opacities(1,0) = (rotated_axes_points(2,2)>0)?0.5f:1.0f;
  16913. - axes_opacities(2,0) = (rotated_axes_points(3,2)>0)?0.5f:1.0f;
  16914. - visu.draw_object3d(Xaxes, Yaxes, 0, rotated_axes_points,axes_primitives,axes_colors,axes_opacities,1,false,focale,0,0,0,0).
  16915. - draw_text("X",(int)(Xaxes+rotated_axes_points(4,0)), (int)(Yaxes+rotated_axes_points(4,1)), axes_colors[0].ptr(), 0, 11, axes_opacities(0,0)).
  16916. - draw_text("Y",(int)(Xaxes+rotated_axes_points(5,0)), (int)(Yaxes+rotated_axes_points(5,1)), axes_colors[1].ptr(), 0, 11, axes_opacities(1,0)).
  16917. - draw_text("Z",(int)(Xaxes+rotated_axes_points(6,0)), (int)(Yaxes+rotated_axes_points(6,1)), axes_colors[2].ptr(), 0, 11, axes_opacities(2,0));
  16918. - }
  16919. -
  16920. - visu.display(disp);
  16921. - if (!clicked || render_motion==render_static) redraw = false;
  16922. - }
  16923. -
  16924. - // Handle user interaction
  16925. - if ((disp.button || disp.wheel) && disp.mouse_x>=0 && disp.mouse_y>=0) {
  16926. - redraw = true;
  16927. - if (!clicked) { x0 = x1 = disp.mouse_x; y0 = y1 = disp.mouse_y; if (!disp.wheel) clicked = true; }
  16928. - else { x1 = disp.mouse_x; y1 = disp.mouse_y; }
  16929. - if (disp.button&1) {
  16930. - const float
  16931. - R = 0.4f*cimg::min(disp.width,disp.height),
  16932. - R2 = R*R,
  16933. - u0 = (float)(x0-disp.dimx()/2),
  16934. - v0 = (float)(y0-disp.dimy()/2),
  16935. - u1 = (float)(x1-disp.dimx()/2),
  16936. - v1 = (float)(y1-disp.dimy()/2),
  16937. - n0 = (float)std::sqrt(u0*u0+v0*v0),
  16938. - n1 = (float)std::sqrt(u1*u1+v1*v1),
  16939. - nu0 = n0>R?(u0*R/n0):u0,
  16940. - nv0 = n0>R?(v0*R/n0):v0,
  16941. - nw0 = (float)std::sqrt(cimg::max(0.0f,R2-nu0*nu0-nv0*nv0)),
  16942. - nu1 = n1>R?(u1*R/n1):u1,
  16943. - nv1 = n1>R?(v1*R/n1):v1,
  16944. - nw1 = (float)std::sqrt(cimg::max(0.0f,R2-nu1*nu1-nv1*nv1)),
  16945. - u = nv0*nw1-nw0*nv1,
  16946. - v = nw0*nu1-nu0*nw1,
  16947. - w = nv0*nu1-nu0*nv1,
  16948. - n = (float)std::sqrt(u*u+v*v+w*w),
  16949. - alpha = (float)std::asin(n/R2);
  16950. - rot_mat = CImg<float>::rotation_matrix(u,v,w,alpha);
  16951. - rot_mat *= pose.get_crop(0,0,2,2);
  16952. - pose.draw_image(rot_mat,0,0);
  16953. - x0=x1; y0=y1;
  16954. - }
  16955. - if (disp.button&2) { pose(3,2)+=(y1-y0); x0=x1; y0=y1; }
  16956. - if (disp.wheel) { pose(3,2)-=15*disp.wheel; disp.wheel=0; }
  16957. - if (disp.button&4) { pose(3,0)+=(x1-x0); pose(3,1)+=(y1-y0); x0=x1; y0=y1; }
  16958. - if ((disp.button&1) && (disp.button&2)) { init = true; disp.button = 0; x0 = x1; y0 = y1; pose = CImg<float>::identity_matrix(4); }
  16959. - } else if (clicked) { x0=x1; y0=y1; clicked = false; redraw = true; }
  16960. -
  16961. - key = disp.key;
  16962. - if (key && key!=cimg::keyCTRLLEFT) {
  16963. - if (disp.is_pressed(cimg::keyCTRLLEFT)) {
  16964. - switch (key) {
  16965. - case cimg::keyD: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-200,-200); disp.is_resized = true; break;
  16966. - case cimg::keyC: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-50,-50); disp.is_resized = true; break;
  16967. - case cimg::keyF: disp.resize(disp.screen_dimx(),disp.screen_dimy()).toggle_fullscreen().is_resized = true; break;
  16968. - case cimg::keyS: { // Save snapshot
  16969. - static unsigned int snap_number = 0;
  16970. - char filename[32] = {0};
  16971. - std::FILE *file;
  16972. - do {
  16973. - std::sprintf(filename,"CImg_%.4u.bmp",snap_number++);
  16974. - if ((file=std::fopen(filename,"r"))!=0) std::fclose(file);
  16975. - } while (file);
  16976. - visu.save(filename);
  16977. - } break;
  16978. - }
  16979. - disp.key = key = 0;
  16980. - }
  16981. - } else key = 0;
  16982. - if (disp.is_resized) { disp.resize(false); visu0 = get_resize(disp,1); redraw = true; }
  16983. - }
  16984. - if (pose_matrix) std::memcpy(pose_matrix,pose.data,16*sizeof(float));
  16985. - disp.events = old_events;
  16986. - disp.button = 0;
  16987. - return *this;
  16988. - }
  16989. -
  16990. - //! High-level interface for displaying a 3d object
  16991. - template<typename tp, typename tf, typename to>
  16992. - const CImg& display_object3d(const CImgList<tp>& points,const CImgList<tf>& primitives,
  16993. - const CImgList<T>& colors, const CImgList<to>& opacities, CImgDisplay &disp,
  16994. - const bool centering=true,
  16995. - const int render_static=4, const int render_motion=1,
  16996. - const bool double_sided=false,
  16997. - const float focale=500.0f, const float ambiant_light=0.05f,
  16998. - const bool display_axes=true, float *const pose_matrix=0) const {
  16999. - CImg<tp> npoints(points.size,3,1,1,0);
  17000. - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
  17001. - cimg_forX(npoints,l) {
  17002. - const CImg<tp>& point = points[l];
  17003. - const unsigned int siz = point.size();
  17004. - if (!siz)
  17005. - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at "
  17006. - "position %u.",pixel_type(),points.size,l);
  17007. - *(ptrZ++) = (siz>2)?point(2):0;
  17008. - *(ptrY++) = (siz>1)?point(1):0;
  17009. - *(ptrX++) = point(0);
  17010. - }
  17011. - return display_object3d(npoints,primitives,colors,opacities,disp,centering,
  17012. - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
  17013. - }
  17014. -
  17015. - //! High-level interface for displaying a 3d object
  17016. - template<typename tp, typename tf, typename to>
  17017. - const CImg& display_object3d(const CImg<tp>& points, const CImgList<tf>& primitives,
  17018. - const CImgList<T>& colors, const CImg<to>& opacities, CImgDisplay& disp,
  17019. - const bool centering=true,
  17020. - const int render_static=4, const int render_motion=1,
  17021. - const bool double_sided=false,
  17022. - const float focale=500.0f, const float ambiant_light=0.05f,
  17023. - const bool display_axes=true, float *const pose_matrix=0) const {
  17024. - CImgList<to> nopacities(opacities.size(),1);
  17025. - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
  17026. - return display_object3d(points,primitives,colors,nopacities,disp,centering,
  17027. - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
  17028. -
  17029. - }
  17030. -
  17031. - //! High-level interface for displaying a 3d object
  17032. - template<typename tp, typename tf, typename to>
  17033. - const CImg& display_object3d(const CImgList<tp>& points,const CImgList<tf>& primitives,
  17034. - const CImgList<T>& colors, const CImg<to>& opacities, CImgDisplay& disp,
  17035. - const bool centering=true,
  17036. - const int render_static=4, const int render_motion=1,
  17037. - const bool double_sided=false,
  17038. - const float focale=500.0f, const float ambiant_light=0.05f,
  17039. - const bool display_axes=true, float *const pose_matrix=0) const {
  17040. - CImgList<to> nopacities(opacities.size(),1);
  17041. - cimglist_for(nopacities,l) nopacities(l,0) = opacities(l);
  17042. - if (points.is_empty()) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points are empty.",
  17043. - pixel_type());
  17044. - CImg<tp> npoints(points.size,3,1,1,0);
  17045. - tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2);
  17046. - { cimg_forX(npoints,l) {
  17047. - const CImg<tp>& point = points[l];
  17048. - const unsigned int siz = point.size();
  17049. - if (!siz)
  17050. - throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at "
  17051. - "position %u.",pixel_type(),points.size,l);
  17052. - *(ptrZ++) = (siz>2)?point(2):0;
  17053. - *(ptrY++) = (siz>1)?point(1):0;
  17054. - *(ptrX++) = point(0);
  17055. - }
  17056. - }
  17057. - return display_object3d(npoints,primitives,colors,nopacities,disp,centering,
  17058. - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
  17059. - }
  17060. -
  17061. - //! High-level interface for displaying a 3d object
  17062. - template<typename tp, typename tf, typename to>
  17063. - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
  17064. - const CImgList<T>& colors, const to& opacities,
  17065. - const bool centering=true,
  17066. - const int render_static=4, const int render_motion=1,
  17067. - const bool double_sided=false,
  17068. - const float focale=500.0f, const float ambiant_light=0.05f,
  17069. - const bool display_axes=true, float *const pose_matrix=0) const {
  17070. - CImgDisplay disp(width,height," ",0);
  17071. - return display_object3d(points,primitives,colors,opacities,disp,centering,
  17072. - render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix);
  17073. - }
  17074. -
  17075. - //! High-level interface for displaying a 3d object
  17076. - template<typename tp, typename tf>
  17077. - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
  17078. - const CImgList<T>& colors,
  17079. - const bool centering=true,
  17080. - const int render_static=4, const int render_motion=1,
  17081. - const bool double_sided=false,
  17082. - const float focale=500.0f, const float ambiant_light=0.05f,
  17083. - const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const {
  17084. - CImgDisplay disp(width,height," ",0);
  17085. - return display_object3d(points,primitives,colors,CImg<float>::vector(opacity),
  17086. - disp,centering,render_static,render_motion,double_sided,
  17087. - focale,ambiant_light,display_axes,pose_matrix);
  17088. - }
  17089. -
  17090. - //! High-level interface for displaying a 3d object
  17091. - template<typename tp, typename tf>
  17092. - const CImg& display_object3d(const tp& points, const CImgList<tf>& primitives,
  17093. - const CImgList<T>& colors, CImgDisplay &disp,
  17094. - const bool centering=true,
  17095. - const int render_static=4, const int render_motion=1,
  17096. - const bool double_sided=false,
  17097. - const float focale=500.0f, const float ambiant_light=0.05f,
  17098. - const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const {
  17099. - return display_object3d(points,primitives,colors,CImg<float>::vector(opacity),
  17100. - disp,centering,render_static,render_motion,double_sided,
  17101. - focale,ambiant_light,display_axes,pose_matrix);
  17102. - }
  17103. -
  17104. - //@}
  17105. - //----------------------
  17106. - //
  17107. - //! \name Input-Output
  17108. - //@{
  17109. - //----------------------
  17110. -
  17111. - //! Load an image from a file.
  17112. - /**
  17113. - \param filename = name of the image file to load.
  17114. - \return A CImg<T> instance containing the pixel data defined in the image file.
  17115. - \note The extension of \c filename defines the file format. If no filename
  17116. - extension is provided, CImg<T>::get_load() will try to load a CRAW file (CImg Raw file).
  17117. - **/
  17118. - static CImg get_load(const char *const filename) {
  17119. - const char *ext = cimg::filename_split(filename);
  17120. - if (!cimg::strncasecmp(ext,"asc",3)) return get_load_ascii(filename);
  17121. - if (!cimg::strncasecmp(ext,"dlm",3) ||
  17122. - !cimg::strncasecmp(ext,"txt",3)) return get_load_dlm(filename);
  17123. - if (!cimg::strncasecmp(ext,"inr",3)) return get_load_inr(filename);
  17124. - if (!cimg::strncasecmp(ext,"hdr",3)) return get_load_analyze(filename);
  17125. - if (!cimg::strncasecmp(ext,"par",3) ||
  17126. - !cimg::strncasecmp(ext,"rec",3)) return get_load_parrec(filename);
  17127. - if (!cimg::strncasecmp(ext,"pan",3)) return get_load_pandore(filename);
  17128. - if (!cimg::strncasecmp(ext,"bmp",3)) return get_load_bmp(filename);
  17129. - if (!cimg::strncasecmp(ext,"png",3)) return get_load_png(filename);
  17130. - if (!cimg::strncasecmp(ext,"tif",3)) return get_load_tiff(filename);
  17131. - if (!cimg::strncasecmp(ext,"jpg",3) ||
  17132. - !cimg::strncasecmp(ext,"jpeg",4)) return get_load_jpeg(filename);
  17133. - if (!cimg::strncasecmp(ext,"ppm",3) ||
  17134. - !cimg::strncasecmp(ext,"pgm",3) ||
  17135. - !cimg::strncasecmp(ext,"pnm",3)) return get_load_pnm(filename);
  17136. - if (!cimg::strncasecmp(ext,"cimg",4) ||
  17137. - ext[0]=='\0') return get_load_cimg(filename);
  17138. - if (!cimg::strncasecmp(ext,"dcm",3) ||
  17139. - !cimg::strncasecmp(ext,"dicom",5)) return get_load_dicom(filename);
  17140. - return get_load_other(filename);
  17141. - }
  17142. -
  17143. - //! Load an image from a file
  17144. - /** This is the in-place version of get_load(). **/
  17145. - CImg& load(const char *const filename) {
  17146. - return get_load(filename).swap(*this);
  17147. - }
  17148. -
  17149. - //! Load an image from an ASCII file.
  17150. - static CImg get_load_ascii(std::FILE *const file, const char *const filename=0) {
  17151. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  17152. - char line[256] = {0};
  17153. - std::fscanf(nfile,"%255[^\n]",line);
  17154. - unsigned int off, dx = 0, dy = 1, dz = 1, dv = 1;
  17155. - int err = 1;
  17156. - std::sscanf(line,"%u %u %u %u",&dx,&dy,&dz,&dv);
  17157. - if (!dx || !dy || !dz || !dv) {
  17158. - if (!file) cimg::fclose(nfile);
  17159. - throw CImgIOException("CImg<%s>::get_load_ascii() : File '%s' is not a valid .ASC file.\n"
  17160. - "Specified image dimensions are (%u,%u,%u,%u).",
  17161. - pixel_type(),filename?filename:"(FILE*)",dx,dy,dz,dv);
  17162. - }
  17163. - CImg dest(dx,dy,dz,dv);
  17164. - double val;
  17165. - T *ptr = dest.data;
  17166. - for (off=0; off<dest.size() && err==1; off++) {
  17167. - err = std::fscanf(nfile,"%lf%*[^0-9.eE+-]",&val);
  17168. - *(ptr++)=(T)val;
  17169. - }
  17170. - cimg::warn(off<dest.size(),"CImg<%s>::get_load_ascii() : File '%s', only %u/%u values read.",
  17171. - pixel_type(),filename?filename:"(FILE*)",off,dest.size());
  17172. - if (!file) cimg::fclose(nfile);
  17173. - return dest;
  17174. - }
  17175. -
  17176. - //! Load an image from an ASCII file.
  17177. - static CImg get_load_ascii(const char *const filename) {
  17178. - return get_load_ascii(0,filename);
  17179. - }
  17180. -
  17181. - //! Load an image from an ASCII file (in-place version).
  17182. - CImg& load_ascii(std::FILE *const file, const char *const filename=0) {
  17183. - return get_load_ascii(file,filename).swap(*this);
  17184. - }
  17185. -
  17186. - //! Load an image from an ASCII file (in-place version).
  17187. - CImg& load_ascii(const char *const filename) {
  17188. - return get_load_ascii(filename).swap(*this);
  17189. - }
  17190. -
  17191. - //! Load an image from a DLM file
  17192. - static CImg get_load_dlm(std::FILE *const file, const char *const filename=0) {
  17193. - std::FILE *const nfile = file?file:cimg::fopen(filename,"r");
  17194. - CImg dest(256,256);
  17195. - char c, delimiter[256]={0}, tmp[256];
  17196. - unsigned int cdx=0,dx=0,dy=0;
  17197. - int oerr=0, err;
  17198. - double val;
  17199. - while ((err = std::fscanf(nfile,"%lf%255[^0-9.eE+-]",&val,delimiter))!=EOF) {
  17200. - oerr = err;
  17201. - if (err>0) dest(cdx++,dy) = (T)val;
  17202. - if (cdx>=dest.width) dest.resize(dest.width+256,1,1,1,0);
  17203. - c=0; if (!std::sscanf(delimiter,"%255[^\n]%c",tmp,&c) || c=='\n') {
  17204. - dx = cimg::max(cdx,dx);
  17205. - dy++;
  17206. - if (dy>=dest.height) dest.resize(dest.width,dest.height+256,1,1,0);
  17207. - cdx=0;
  17208. - }
  17209. - }
  17210. - if (cdx && oerr==1) { dx=cdx; dy++; }
  17211. - if (!dx || !dy) {
  17212. - if (!file) cimg::fclose(nfile);
  17213. - throw CImgIOException("CImg<%s>::get_load_dlm() : File '%s' is not a valid DLM file.\n"
  17214. - "Specified image dimensions are (%u,%u).",
  17215. - pixel_type(),filename?filename:"(FILE*)",dx,dy);
  17216. - }
  17217. - dest.resize(dx,dy,1,1,0);
  17218. - if (!file) cimg::fclose(nfile);
  17219. - return dest;
  17220. - }
  17221. -
  17222. - //! Load an image from a DLM file
  17223. - static CImg get_load_dlm(const char *const filename=0) {
  17224. - return get_load_dlm(0,filename);
  17225. - }
  17226. -
  17227. - //! Load an image from a DLM file (in-place version).
  17228. - CImg& load_dlm(std::FILE *const file, const char *const filename=0) {
  17229. - return get_load_dlm(file,filename).swap(*this);
  17230. - }
  17231. -
  17232. - //! Load an image from a DLM file (in-place version).
  17233. - CImg& load_dlm(const char *const filename) {
  17234. - return get_load_dlm(filename).swap(*this);
  17235. - }
  17236. -
  17237. - //! Load an image from a PNM file
  17238. - static CImg get_load_pnm(std::FILE *const file, const char *const filename=0) {
  17239. - std::FILE *const nfile=file?file:cimg::fopen(filename,"rb");
  17240. - unsigned int ppm_type,width,height,colormax=255;
  17241. - char item[1024]={0};
  17242. - int err;
  17243. - while ((err=std::fscanf(nfile,"%1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
  17244. - if(std::sscanf(item," P%u",&ppm_type)!=1) {
  17245. - if (!file) cimg::fclose(nfile);
  17246. - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PNM header 'P?' not found.",
  17247. - pixel_type(),filename?filename:"(FILE*)");
  17248. - }
  17249. - while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
  17250. - if ((err=std::sscanf(item," %u %u %u",&width,&height,&colormax))<2) {
  17251. - if (!file) cimg::fclose(nfile);
  17252. - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', WIDTH and HEIGHT fields are not defined in PNM header.",
  17253. - pixel_type(),filename?filename:"(FILE*)");
  17254. - }
  17255. - if (err==2) {
  17256. - while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile);
  17257. - cimg::warn(std::sscanf(item,"%u",&colormax)!=1,
  17258. - "CImg<%s>::get_load_pnm() : File '%s', COLORMAX field is not defined in PNM header.",
  17259. - pixel_type(),filename?filename:"(FILE*)");
  17260. - }
  17261. - std::fgetc(nfile);
  17262. -
  17263. - CImg dest;
  17264. - int rval,gval,bval;
  17265. -
  17266. - switch (ppm_type) {
  17267. - case 2: { // Grey Ascii
  17268. - dest.assign(width,height,1,1);
  17269. - T* rdata = dest.ptr();
  17270. - cimg_foroff(dest,off) { std::fscanf(nfile,"%d",&rval); *(rdata++)=(T)rval; }
  17271. - } break;
  17272. - case 3: { // Color Ascii
  17273. - dest.assign(width,height,1,3);
  17274. - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
  17275. - cimg_forXY(dest,x,y) {
  17276. - std::fscanf(nfile,"%d %d %d",&rval,&gval,&bval);
  17277. - *(rdata++)=(T)rval;
  17278. - *(gdata++)=(T)gval;
  17279. - *(bdata++)=(T)bval; }
  17280. - } break;
  17281. - case 5: { // Grey Binary
  17282. - if (colormax<256) { // 8 bits
  17283. - CImg<unsigned char> raw(width,height,1,1);
  17284. - cimg::fread(raw.data,width*height,nfile);
  17285. - dest=raw;
  17286. - } else { // 16 bits
  17287. - CImg<unsigned short> raw(width,height,1,1);
  17288. - cimg::fread(raw.data,width*height,nfile);
  17289. - if (!cimg::endian()) cimg::endian_swap(raw.data,width*height);
  17290. - dest=raw;
  17291. - }
  17292. - } break;
  17293. - case 6: { // Color Binary
  17294. - if (colormax<256) { // 8 bits
  17295. - CImg<unsigned char> raw(width,height,1,3);
  17296. - cimg::fread(raw.data,width*height*3,nfile);
  17297. - dest.assign(width,height,1,3);
  17298. - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
  17299. - const unsigned char *ptrs = raw.ptr();
  17300. - for (unsigned int off = raw.width*raw.height; off; --off) {
  17301. - *(rdata++) = (T)*(ptrs++);
  17302. - *(gdata++) = (T)*(ptrs++);
  17303. - *(bdata++) = (T)*(ptrs++);
  17304. - }
  17305. - } else { // 16 bits
  17306. - CImg<unsigned short> raw(width,height,1,3);
  17307. - cimg::fread(raw.data,width*height*3,nfile);
  17308. - if (!cimg::endian()) cimg::endian_swap(raw.data,width*height*3);
  17309. - dest.assign(width,height,1,3);
  17310. - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
  17311. - const unsigned short *ptrs = raw.ptr();
  17312. - for (unsigned int off = raw.width*raw.height; off; --off) {
  17313. - *(rdata++) = (T)*(ptrs++);
  17314. - *(gdata++) = (T)*(ptrs++);
  17315. - *(bdata++) = (T)*(ptrs++);
  17316. - }
  17317. - }
  17318. - } break;
  17319. - default:
  17320. - if (!file) cimg::fclose(nfile);
  17321. - throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PPM type 'P%d' not supported.",
  17322. - pixel_type(),filename?filename:"(FILE*)",ppm_type);
  17323. - }
  17324. - if (!file) cimg::fclose(nfile);
  17325. - return dest;
  17326. - }
  17327. -
  17328. - //! Load an image from a PNM file.
  17329. - static CImg get_load_pnm(const char *const filename) {
  17330. - return get_load_pnm(0,filename);
  17331. - }
  17332. -
  17333. - //! Load an image from a PNM file (in-place version).
  17334. - CImg& load_pnm(std::FILE *const file, const char *const filename=0) {
  17335. - return get_load_pnm(file,filename).swap(*this);
  17336. - }
  17337. -
  17338. - //! Load an image from a PNM file (in-place version).
  17339. - CImg& load_pnm(const char *const filename) {
  17340. - return get_load_pnm(filename).swap(*this);
  17341. - }
  17342. -
  17343. - //! Load a YUV image sequence file.
  17344. - static CImg get_load_yuv(std::FILE *const file, const char *const filename,
  17345. - const unsigned int sizex, const unsigned int sizey=1,
  17346. - const unsigned int first_frame=0, const int last_frame=-1,
  17347. - const bool yuv2rgb = false) {
  17348. - return CImgList<T>::get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c');
  17349. - }
  17350. -
  17351. - //! Load a YUV image sequence file.
  17352. - static CImg get_load_yuv(const char *const filename,
  17353. - const unsigned int sizex, const unsigned int sizey=1,
  17354. - const unsigned int first_frame=0, const int last_frame=-1,
  17355. - const bool yuv2rgb = false) {
  17356. - return CImgList<T>::get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c');
  17357. - }
  17358. -
  17359. - //! Load a YUV image sequence file (in-place).
  17360. - CImg& load_yuv(std::FILE *const file, const char *const filename,
  17361. - const unsigned int sizex, const unsigned int sizey=1,
  17362. - const unsigned int first_frame=0, const int last_frame=-1,
  17363. - const bool yuv2rgb = false) {
  17364. - return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
  17365. - }
  17366. -
  17367. - //! Load a YUV image sequence file (in-place).
  17368. - CImg& load_yuv(const char *const filename,
  17369. - const unsigned int sizex, const unsigned int sizey=1,
  17370. - const unsigned int first_frame=0, const int last_frame=-1,
  17371. - const bool yuv2rgb = false) {
  17372. - return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
  17373. - }
  17374. -
  17375. - //! Load an image from a BMP file.
  17376. - static CImg get_load_bmp(std::FILE *const file, const char *const filename=0) {
  17377. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  17378. - unsigned char header[64];
  17379. - cimg::fread(header,54,nfile);
  17380. - if (header[0]!='B' || header[1]!='M') {
  17381. - if (!file) cimg::fclose(nfile);
  17382. - throw CImgIOException("CImg<%s>::get_load_bmp() : File '%s' is not a valid BMP file.",
  17383. - pixel_type(),filename?filename:"(FILE*)");
  17384. - }
  17385. -
  17386. - // Read header and pixel buffer
  17387. - int
  17388. - file_size = header[0x02] + (header[0x03]<<8) + (header[0x04]<<16) + (header[0x05]<<24),
  17389. - offset = header[0x0A] + (header[0x0B]<<8) + (header[0x0C]<<16) + (header[0x0D]<<24),
  17390. - dx = header[0x12] + (header[0x13]<<8) + (header[0x14]<<16) + (header[0x15]<<24),
  17391. - dy = header[0x16] + (header[0x17]<<8) + (header[0x18]<<16) + (header[0x19]<<24),
  17392. - compression = header[0x1E] + (header[0x1F]<<8) + (header[0x20]<<16) + (header[0x21]<<24),
  17393. - nb_colors = header[0x2E] + (header[0x2F]<<8) + (header[0x30]<<16) + (header[0x31]<<24),
  17394. - bpp = header[0x1C] + (header[0x1D]<<8),
  17395. - *palette = 0;
  17396. - const int
  17397. - dx_bytes = (bpp==1)?(dx/8+(dx%8?1:0)):((bpp==4)?(dx/2+(dx%2?1:0)):(dx*bpp/8)),
  17398. - align = (4-dx_bytes%4)%4,
  17399. - buf_size = cimg::min(cimg::abs(dy)*(dx_bytes+align),file_size-offset);
  17400. -
  17401. - if (bpp<16) { if (!nb_colors) nb_colors=1<<bpp; } else nb_colors=0;
  17402. - if (nb_colors) { palette = new int[nb_colors]; cimg::fread(palette,nb_colors,nfile); }
  17403. - const int xoffset = offset-54-4*nb_colors;
  17404. - if (xoffset>0) std::fseek(nfile,xoffset,SEEK_CUR);
  17405. - unsigned char *buffer = new unsigned char[buf_size], *ptrs = buffer;
  17406. - cimg::fread(buffer,buf_size,nfile);
  17407. - if (!file) cimg::fclose(nfile);
  17408. -
  17409. - // Decompress buffer (if necessary)
  17410. - if (compression) {
  17411. - delete[] buffer;
  17412. - if (file) {
  17413. - throw CImgIOException("CImg<%s>::get_load_bmp() : Not able to read a compressed BMP file using a *FILE input",pixel_type());
  17414. - } else return get_load_other(filename);
  17415. - }
  17416. -
  17417. - // Read pixel data
  17418. - CImg res(dx,cimg::abs(dy),1,3);
  17419. - switch (bpp) {
  17420. - case 1: { // Monochrome
  17421. - for (int y=res.height-1; y>=0; y--) {
  17422. - unsigned char mask = 0x80, val = 0;
  17423. - cimg_forX(res,x) {
  17424. - if (mask==0x80) val = *(ptrs++);
  17425. - const unsigned char *col = (unsigned char*)(palette+(val&mask?1:0));
  17426. - res(x,y,2) = (T)*(col++);
  17427. - res(x,y,1) = (T)*(col++);
  17428. - res(x,y,0) = (T)*(col++);
  17429. - mask = cimg::ror(mask);
  17430. - } ptrs+=align; }
  17431. - } break;
  17432. - case 4: { // 16 colors
  17433. - for (int y=res.height-1; y>=0; y--) {
  17434. - unsigned char mask = 0xF0, val = 0;
  17435. - cimg_forX(res,x) {
  17436. - if (mask==0xF0) val = *(ptrs++);
  17437. - const unsigned char color = (mask<16)?(val&mask):((val&mask)>>4);
  17438. - unsigned char *col = (unsigned char*)(palette+color);
  17439. - res(x,y,2) = (T)*(col++);
  17440. - res(x,y,1) = (T)*(col++);
  17441. - res(x,y,0) = (T)*(col++);
  17442. - mask = cimg::ror(mask,4);
  17443. - } ptrs+=align; }
  17444. - } break;
  17445. - case 8: { // 256 colors
  17446. - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
  17447. - const unsigned char *col = (unsigned char*)(palette+*(ptrs++));
  17448. - res(x,y,2) = (T)*(col++);
  17449. - res(x,y,1) = (T)*(col++);
  17450. - res(x,y,0) = (T)*(col++);
  17451. - } ptrs+=align; }
  17452. - } break;
  17453. - case 16: { // 16 bits colors
  17454. - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
  17455. - const unsigned char c1 = *(ptrs++), c2 = *(ptrs++);
  17456. - const unsigned short col = c1+(c2<<8);
  17457. - res(x,y,2) = (T)(col&0x1F);
  17458. - res(x,y,1) = (T)((col>>5)&0x1F);
  17459. - res(x,y,0) = (T)((col>>10)&0x1F);
  17460. - } ptrs+=align; }
  17461. - } break;
  17462. - case 24: { // 24 bits colors
  17463. - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
  17464. - res(x,y,2) = (T)*(ptrs++);
  17465. - res(x,y,1) = (T)*(ptrs++);
  17466. - res(x,y,0) = (T)*(ptrs++);
  17467. - } ptrs+=align; }
  17468. - } break;
  17469. - case 32: { // 32 bits colors
  17470. - for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) {
  17471. - res(x,y,2) = (T)*(ptrs++);
  17472. - res(x,y,1) = (T)*(ptrs++);
  17473. - res(x,y,0) = (T)*(ptrs++);
  17474. - ptrs++;
  17475. - } ptrs+=align; }
  17476. - } break;
  17477. - }
  17478. - if (palette) delete[] palette;
  17479. - delete[] buffer;
  17480. - if (dy<0) res.mirror('y');
  17481. - return res;
  17482. - }
  17483. -
  17484. - //! Load an image from a BMP file
  17485. - static CImg get_load_bmp(const char *const filename) {
  17486. - return get_load_bmp(0,filename);
  17487. - }
  17488. -
  17489. - //! Load an image from a BMP file
  17490. - CImg& load_bmp(std::FILE *const file, const char *const filename=0) {
  17491. - return get_load_bmp(file,filename).swap(*this);
  17492. - }
  17493. -
  17494. - //! Load an image from a BMP file
  17495. - CImg& load_bmp(const char *const filename) {
  17496. - return get_load_bmp(filename).swap(*this);
  17497. - }
  17498. -
  17499. - //! Load an image from a PNG file.
  17500. - // Note : Most of this function has been written by Eric Fausett
  17501. - static CImg get_load_png(std::FILE *const file, const char *const filename=0) {
  17502. -#ifndef cimg_use_png
  17503. - if (file)
  17504. - throw CImgIOException("CImg<%s>::get_load_png() : File '(FILE*)' cannot be read without using libpng.",pixel_type());
  17505. - else return get_load_other(filename);
  17506. -#else
  17507. - // Open file and check for PNG validity
  17508. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  17509. - unsigned char pngCheck[8];
  17510. - cimg::fread(pngCheck,8,nfile);
  17511. - if (png_sig_cmp(pngCheck,0,8)) {
  17512. - if (!file) cimg::fclose(nfile);
  17513. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s' is not a valid PNG file.",
  17514. - pixel_type(),filename?filename:"(FILE*)");
  17515. - }
  17516. -
  17517. - // Setup PNG structures for read
  17518. - png_voidp user_error_ptr=0;
  17519. - png_error_ptr user_error_fn=0, user_warning_fn=0;
  17520. - png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, // Verifies libpng version correct
  17521. - user_error_ptr, user_error_fn, user_warning_fn);
  17522. - if(!png_ptr){
  17523. - if (!file) cimg::fclose(nfile);
  17524. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'png_ptr' data structure.",
  17525. - pixel_type(),filename?filename:"(FILE*)");
  17526. - }
  17527. - png_infop info_ptr = png_create_info_struct(png_ptr);
  17528. - if(!info_ptr){
  17529. - if (!file) cimg::fclose(nfile);
  17530. - png_destroy_read_struct(&png_ptr, (png_infopp)0, (png_infopp)0);
  17531. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'info_ptr' data structure.",
  17532. - pixel_type(),filename?filename:"(FILE*)");
  17533. - }
  17534. - png_infop end_info = png_create_info_struct(png_ptr);
  17535. - if(!end_info){
  17536. - if (!file) cimg::fclose(nfile);
  17537. - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)0);
  17538. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'end_info' data structure.",
  17539. - pixel_type(),filename?filename:"(FILE*)");
  17540. - }
  17541. -
  17542. - // Error handling callback for png file reading
  17543. - if (setjmp(png_jmpbuf(png_ptr))){
  17544. - if (!file) cimg::fclose(nfile);
  17545. - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
  17546. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', unknown fatal error.",
  17547. - pixel_type(),filename?filename:"(FILE*)");
  17548. - }
  17549. - png_init_io(png_ptr, nfile);
  17550. - png_set_sig_bytes(png_ptr, 8);
  17551. -
  17552. - // Get PNG Header Info up to data block
  17553. - png_read_info(png_ptr, info_ptr);
  17554. - png_uint_32 width, height;
  17555. - int bit_depth, color_type, interlace_type;
  17556. - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type,
  17557. - int_p_NULL, int_p_NULL);
  17558. - int new_bit_depth = bit_depth;
  17559. - int new_color_type = color_type;
  17560. -
  17561. - // Transforms to unify image data
  17562. - if (new_color_type == PNG_COLOR_TYPE_PALETTE){
  17563. - png_set_palette_to_rgb(png_ptr);
  17564. - new_color_type -= PNG_COLOR_MASK_PALETTE;
  17565. - new_bit_depth = 8;
  17566. - }
  17567. - if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
  17568. - png_set_gray_1_2_4_to_8(png_ptr);
  17569. - new_bit_depth = 8;
  17570. - }
  17571. - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
  17572. - png_set_tRNS_to_alpha(png_ptr);
  17573. - if (new_color_type == PNG_COLOR_TYPE_GRAY || new_color_type == PNG_COLOR_TYPE_GRAY_ALPHA){
  17574. - png_set_gray_to_rgb(png_ptr);
  17575. - new_color_type |= PNG_COLOR_MASK_COLOR;
  17576. - }
  17577. - if (new_color_type == PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, 0xffffU, PNG_FILLER_AFTER);
  17578. - png_read_update_info(png_ptr, info_ptr);
  17579. - if (!(new_bit_depth==8 || new_bit_depth==16)) {
  17580. - if (!file) cimg::fclose(nfile);
  17581. - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
  17582. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong bit coding (bit_depth=%u)",
  17583. - pixel_type(),filename?filename:"(FILE*)",new_bit_depth);
  17584. - }
  17585. - const int byte_depth = new_bit_depth>>3;
  17586. -
  17587. - // Allocate Memory for Image Read
  17588. - png_bytep *imgData = new png_bytep[height];
  17589. - for (unsigned int row=0; row < height; row++) imgData[row] = new png_byte[byte_depth * 4 * width];
  17590. - png_read_image(png_ptr, imgData);
  17591. - png_read_end(png_ptr, end_info);
  17592. -
  17593. - // Read pixel data
  17594. - if (!(new_color_type==PNG_COLOR_TYPE_RGB || new_color_type==PNG_COLOR_TYPE_RGB_ALPHA)) {
  17595. - if (!file) cimg::fclose(nfile);
  17596. - png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0);
  17597. - throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong color coding (new_color_type=%u)",
  17598. - pixel_type(),filename?filename:"(FILE*)",new_color_type);
  17599. - }
  17600. - const bool no_alpha_channel = (new_color_type==PNG_COLOR_TYPE_RGB);
  17601. - CImg res(width,height,1,no_alpha_channel?3:4);
  17602. - const unsigned long off = width*height;
  17603. - T *ptr1 = res.data, *ptr2 = ptr1+off, *ptr3 = ptr2+off, *ptr4 = ptr3+off;
  17604. - switch(new_bit_depth){
  17605. - case 8: {
  17606. - cimg_forY(res,y){
  17607. - const unsigned char *ptrs = (unsigned char*)imgData[y];
  17608. - cimg_forX(res,x){
  17609. - *(ptr1++) = (T)*(ptrs++);
  17610. - *(ptr2++) = (T)*(ptrs++);
  17611. - *(ptr3++) = (T)*(ptrs++);
  17612. - if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++);
  17613. - }
  17614. - }
  17615. - } break;
  17616. - case 16: {
  17617. - cimg_forY(res,y){
  17618. - const unsigned short *ptrs = (unsigned short*)(imgData[y]);
  17619. - cimg_forX(res,x){
  17620. - *(ptr1++) = (T)*(ptrs++);
  17621. - *(ptr2++) = (T)*(ptrs++);
  17622. - *(ptr3++) = (T)*(ptrs++);
  17623. - if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++);
  17624. - }
  17625. - }
  17626. - } break;
  17627. - }
  17628. - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
  17629. -
  17630. - // Deallocate Image Read Memory
  17631. - for (unsigned int n=0; n<height; n++) delete[] imgData[n];
  17632. - delete[] imgData;
  17633. - if (!file) cimg::fclose(nfile);
  17634. - return res;
  17635. -#endif
  17636. - }
  17637. -
  17638. - //! Load an image from a PNG file
  17639. - static CImg get_load_png(const char *const filename) {
  17640. - return get_load_png(0,filename);
  17641. - }
  17642. -
  17643. - //! Load an image from a PNG file
  17644. - CImg& load_png(std::FILE *const file, const char *const filename=0) {
  17645. - return get_load_png(file,filename).swap(*this);
  17646. - }
  17647. -
  17648. - //! Load an image from a PNG file
  17649. - CImg& load_png(const char *const filename) {
  17650. - return get_load_png(filename).swap(*this);
  17651. - }
  17652. -
  17653. - //! Load an image in TIFF format
  17654. - // Original contribution by Jerome Boulanger.
  17655. - static CImg get_load_tiff(const char *const filename=0) {
  17656. -#ifndef cimg_use_tiff
  17657. - return get_load_other(filename);
  17658. -#else
  17659. - CImg dest;
  17660. - TIFF *tif = TIFFOpen(filename,"r");
  17661. -#if cimg_debug>=3
  17662. - TIFFSetWarningHandler(0);
  17663. - TIFFSetErrorHandler(0);
  17664. -#endif
  17665. - if (tif) {
  17666. - unsigned int number_of_directories = 0;
  17667. - do number_of_directories++; while (TIFFReadDirectory(tif));
  17668. - uint16 samplesperpixel, bitspersample;
  17669. - uint32 nx,ny;
  17670. - TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&nx);
  17671. - TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&ny);
  17672. - TIFFGetField(tif,TIFFTAG_SAMPLESPERPIXEL,&samplesperpixel);
  17673. - if (samplesperpixel!=1 && samplesperpixel!=3 && samplesperpixel!=4) {
  17674. - cimg::warn(true,"CImg<%s>::get_load_tiff() : File '%s', unknow value for tag : TIFFTAG_SAMPLESPERPIXEL, will force it to 1.",
  17675. - pixel_type(),filename?filename:"(FILE*)");
  17676. - samplesperpixel=1;
  17677. - }
  17678. - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample);
  17679. - TIFFClose(tif);
  17680. - tif = TIFFOpen(filename,"r");
  17681. - dest.assign(nx,ny,number_of_directories,samplesperpixel);
  17682. -
  17683. - unsigned int dir=0;
  17684. - do {
  17685. - if (bitspersample!=8 || !(samplesperpixel == 1 || samplesperpixel == 3 || samplesperpixel == 4)){ //if !rgba 8bit
  17686. - uint16 photo, config;
  17687. - TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&config);
  17688. - TIFFGetField(tif,TIFFTAG_PHOTOMETRIC,&photo);
  17689. - if (TIFFIsTiled(tif)) {
  17690. - uint32 tw, th;
  17691. - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
  17692. - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
  17693. - if (config==PLANARCONFIG_CONTIG) {
  17694. - switch(bitspersample){
  17695. - case 8:{
  17696. - unsigned char *buf;
  17697. - buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
  17698. - if (buf) {
  17699. - for (unsigned int row = 0; row<ny; row+=th) {
  17700. - for (unsigned int col = 0; col<nx; col+=tw) {
  17701. - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
  17702. - _TIFFfree(buf);
  17703. - TIFFClose(tif);
  17704. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17705. - pixel_type(),filename?filename:"(FILE*)");
  17706. - } else {
  17707. - unsigned char * ptr = buf;
  17708. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17709. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17710. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17711. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17712. - }
  17713. - }
  17714. - }
  17715. - _TIFFfree(buf);
  17716. - }
  17717. - break;
  17718. - }
  17719. - case 16:{
  17720. - unsigned short *buf;
  17721. - buf = (unsigned short *)_TIFFmalloc(TIFFTileSize(tif));
  17722. - if (buf) {
  17723. - for (unsigned int row = 0; row<ny; row+=th) {
  17724. - for (unsigned int col = 0; col<nx; col+=tw) {
  17725. - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
  17726. - _TIFFfree(buf);
  17727. - TIFFClose(tif);
  17728. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17729. - pixel_type(),filename?filename:"(FILE*)");
  17730. - } else {
  17731. - unsigned short * ptr = buf;
  17732. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17733. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17734. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17735. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17736. - }
  17737. - }
  17738. - }
  17739. - _TIFFfree(buf);
  17740. - }
  17741. - break;
  17742. - }
  17743. - case 32:{
  17744. - float *buf;
  17745. - buf = (float *)_TIFFmalloc(TIFFTileSize(tif));
  17746. - if (buf) {
  17747. - for (unsigned int row = 0; row<ny; row+=th) {
  17748. - for (unsigned int col = 0; col<nx; col+=tw) {
  17749. - if (TIFFReadTile(tif,buf,col,row,0,0)<0) {
  17750. - _TIFFfree(buf);
  17751. - TIFFClose(tif);
  17752. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17753. - pixel_type(),filename?filename:"(FILE*)");
  17754. - } else {
  17755. - float * ptr = buf;
  17756. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17757. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17758. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17759. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17760. - }
  17761. - }
  17762. - }
  17763. - _TIFFfree(buf);
  17764. - }
  17765. - break;
  17766. - }
  17767. - }
  17768. - }
  17769. - else {
  17770. - switch(bitspersample){
  17771. - case 8:{
  17772. - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
  17773. - if (buf) {
  17774. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17775. - for (unsigned int row = 0; row<ny; row+=th) {
  17776. - for (unsigned int col = 0; col<nx; col+=tw) {
  17777. - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
  17778. - _TIFFfree(buf);
  17779. - TIFFClose(tif);
  17780. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17781. - pixel_type(),filename?filename:"(FILE*)");
  17782. - } else {
  17783. - unsigned char * ptr = buf;
  17784. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17785. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17786. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17787. - }
  17788. - }
  17789. - }
  17790. - _TIFFfree(buf);
  17791. - }
  17792. - break;
  17793. - }
  17794. - case 16:{
  17795. - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFTileSize(tif));
  17796. - if (buf) {
  17797. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17798. - for (unsigned int row = 0; row<ny; row+=th) {
  17799. - for (unsigned int col = 0; col<nx; col+=tw) {
  17800. - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
  17801. - _TIFFfree(buf);
  17802. - TIFFClose(tif);
  17803. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17804. - pixel_type(),filename?filename:"(FILE*)");
  17805. - } else {
  17806. - unsigned short * ptr = buf;
  17807. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17808. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17809. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17810. - }
  17811. - }
  17812. - }
  17813. - _TIFFfree(buf);
  17814. - }
  17815. - break;
  17816. - }
  17817. - case 32:{
  17818. - float *buf = (float *)_TIFFmalloc(TIFFTileSize(tif));
  17819. - if (buf) {
  17820. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17821. - for (unsigned int row = 0; row<ny; row+=th) {
  17822. - for (unsigned int col = 0; col<nx; col+=tw) {
  17823. - if (TIFFReadTile(tif,buf,col,row,0,vv)<0) {
  17824. - _TIFFfree(buf);
  17825. - TIFFClose(tif);
  17826. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a tile.",
  17827. - pixel_type(),filename?filename:"(FILE*)");
  17828. - } else {
  17829. - float * ptr = buf;
  17830. - for (unsigned int rr=row;rr<cimg::min( row+th,(unsigned int)ny);rr++)
  17831. - for (unsigned int cc=col;cc<cimg::min( col+tw,(unsigned int)nx);cc++)
  17832. - dest(cc,rr,dir,vv)= (T)(float)*(ptr++);
  17833. - }
  17834. - }
  17835. - }
  17836. - _TIFFfree(buf);
  17837. - }
  17838. - break;
  17839. - }
  17840. - }
  17841. - }
  17842. - } else {
  17843. - if (config==PLANARCONFIG_CONTIG) {
  17844. - switch(bitspersample){
  17845. - case 8 :{
  17846. - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
  17847. - if (buf) {
  17848. - uint32 row, rowsperstrip = (uint32)-1;
  17849. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17850. - for (row = 0; row<ny; row+= rowsperstrip) {
  17851. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17852. - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
  17853. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17854. - _TIFFfree(buf);
  17855. - TIFFClose(tif);
  17856. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.",
  17857. - pixel_type(),filename?filename:"(FILE*)");
  17858. - }
  17859. - unsigned char * ptr = buf;
  17860. - for (unsigned int rr=0; rr<nrow; rr++)
  17861. - for (unsigned int cc=0;cc<nx;cc++)
  17862. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17863. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17864. -
  17865. - }
  17866. - _TIFFfree(buf);
  17867. - }
  17868. - break;
  17869. - }
  17870. - case 16:{
  17871. - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFStripSize(tif));
  17872. - if (buf) {
  17873. - uint32 row, rowsperstrip = (uint32)-1;
  17874. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17875. - for (row = 0; row<ny; row+= rowsperstrip) {
  17876. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17877. - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
  17878. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17879. - _TIFFfree(buf);
  17880. - TIFFClose(tif);
  17881. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
  17882. - pixel_type(),filename?filename:"(FILE*)");
  17883. - }
  17884. - unsigned short * ptr = buf;
  17885. - for (unsigned int rr=0; rr<nrow; rr++)
  17886. - for (unsigned int cc=0;cc<nx;cc++)
  17887. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17888. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17889. - }
  17890. - _TIFFfree(buf);
  17891. - }
  17892. - break;
  17893. - }
  17894. - case 32:{
  17895. - float *buf = (float *)_TIFFmalloc(TIFFStripSize(tif));
  17896. - if (buf) {
  17897. - uint32 row, rowsperstrip = (uint32)-1;
  17898. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17899. - for (row = 0; row<ny; row+= rowsperstrip) {
  17900. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17901. - tstrip_t strip = TIFFComputeStrip(tif, row, 0);
  17902. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17903. - _TIFFfree(buf);
  17904. - TIFFClose(tif);
  17905. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
  17906. - pixel_type(),filename?filename:"(FILE*)");
  17907. - }
  17908. - float * ptr = buf;
  17909. - for (unsigned int rr=0; rr<nrow; rr++)
  17910. - for (unsigned int cc=0;cc<nx;cc++)
  17911. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17912. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17913. - }
  17914. - _TIFFfree(buf);
  17915. - }
  17916. - break;
  17917. - }
  17918. -
  17919. - }
  17920. - }
  17921. - else {
  17922. - switch(bitspersample){
  17923. - case 8 :{
  17924. - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
  17925. - if (buf) {
  17926. - uint32 row, rowsperstrip = (uint32)-1;
  17927. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17928. - for (unsigned int vv=0;vv<samplesperpixel;vv++){
  17929. - for (row = 0; row<ny; row+= rowsperstrip) {
  17930. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17931. - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
  17932. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17933. - _TIFFfree(buf);
  17934. - TIFFClose(tif);
  17935. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.",
  17936. - pixel_type(),filename?filename:"(FILE*)");
  17937. - }
  17938. - unsigned char * ptr = buf;
  17939. - for (unsigned int rr=0;rr<nrow; rr++)
  17940. - for (unsigned int cc=0;cc<nx;cc++)
  17941. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17942. - }}
  17943. - _TIFFfree(buf);
  17944. - }
  17945. - break;
  17946. - }
  17947. - case 16:{
  17948. - unsigned short *buf = (unsigned short *)_TIFFmalloc(TIFFStripSize(tif));
  17949. - if (buf) {
  17950. - uint32 row, rowsperstrip = (uint32)-1;
  17951. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17952. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17953. - for (row = 0; row<ny; row+= rowsperstrip) {
  17954. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17955. - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
  17956. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17957. - _TIFFfree(buf);
  17958. - TIFFClose(tif);
  17959. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
  17960. - pixel_type(),filename?filename:"(FILE*)");
  17961. - }
  17962. - unsigned short * ptr = buf;
  17963. - for (unsigned int rr=0;rr<nrow;rr++)
  17964. - for (unsigned int cc=0;cc<nx;cc++)
  17965. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17966. - }
  17967. - _TIFFfree(buf);
  17968. - }
  17969. - break;
  17970. - }
  17971. - case 32:{
  17972. - float *buf = (float *)_TIFFmalloc(TIFFStripSize(tif));
  17973. - if (buf) {
  17974. - uint32 row, rowsperstrip = (uint32)-1;
  17975. - TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
  17976. - for (unsigned int vv=0;vv<samplesperpixel;vv++)
  17977. - for (row = 0; row<ny; row+= rowsperstrip) {
  17978. - uint32 nrow = (row+rowsperstrip>ny?ny-row:rowsperstrip);
  17979. - tstrip_t strip = TIFFComputeStrip(tif, row, vv);
  17980. - if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) {
  17981. - _TIFFfree(buf);
  17982. - TIFFClose(tif);
  17983. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.",
  17984. - pixel_type(),filename?filename:"(FILE*)");
  17985. - }
  17986. - float * ptr = buf;
  17987. - for (unsigned int rr=0;rr<nrow;rr++)
  17988. - for (unsigned int cc=0;cc<nx;cc++)
  17989. - dest(cc,row+rr,dir,vv)= (T)(float)*(ptr++);
  17990. - }
  17991. - _TIFFfree(buf);
  17992. - }
  17993. - break;
  17994. - }
  17995. - }
  17996. - }
  17997. - }
  17998. - }
  17999. - else {
  18000. - uint32* raster = (uint32*)_TIFFmalloc(nx * ny * sizeof (uint32));
  18001. - if (!raster) {
  18002. - _TIFFfree(raster);
  18003. - TIFFClose(tif);
  18004. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', not enough memory for buffer allocation.",
  18005. - pixel_type(),filename?filename:"(FILE*)");
  18006. - }
  18007. - TIFFReadRGBAImage(tif,nx,ny,raster,0);
  18008. - switch (samplesperpixel){
  18009. - case 1:{
  18010. - cimg_forXY(dest,x,y) dest(x,y,dir)=(T)(float)((raster[nx*(ny-1-y)+x]+ 128) / 257);
  18011. - break;
  18012. - }
  18013. - case 3:{
  18014. - cimg_forXY(dest,x,y) {
  18015. - dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]);
  18016. - dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]);
  18017. - dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]);
  18018. - }
  18019. - break;
  18020. - }
  18021. - case 4:{
  18022. - cimg_forXY(dest,x,y) {
  18023. - dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]);
  18024. - dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]);
  18025. - dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]);
  18026. - dest(x,y,dir,3)=(T)(float)TIFFGetA(raster[nx*(ny-1-y)+x]);
  18027. - }
  18028. - break;
  18029. - }
  18030. - }
  18031. - _TIFFfree(raster);
  18032. - }
  18033. - dir++;
  18034. - } while (TIFFReadDirectory(tif));
  18035. - TIFFClose(tif);
  18036. - } else
  18037. - throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while loading the image.",
  18038. - pixel_type(),filename?filename:"(FILE*)");
  18039. - return dest;
  18040. -#endif
  18041. - }
  18042. -
  18043. - //! Load an image from a TIFF file
  18044. - CImg& load_tiff(const char *const filename) {
  18045. - return get_load_tiff(filename).swap(*this);
  18046. - }
  18047. -
  18048. - //! Load a file in JPEG format.
  18049. - static CImg get_load_jpeg(std::FILE *const file, const char *const filename=0) {
  18050. -#ifndef cimg_use_jpeg
  18051. - if (file)
  18052. - throw CImgIOException("CImg<%s>::get_load_jpeg() : File '(FILE*)' cannot be read without using libjpeg.",
  18053. - pixel_type());
  18054. - else return get_load_other(filename);
  18055. -#else
  18056. - struct jpeg_decompress_struct cinfo;
  18057. - struct jpeg_error_mgr jerr;
  18058. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18059. -
  18060. - cinfo.err = jpeg_std_error(&jerr);
  18061. - jpeg_create_decompress(&cinfo);
  18062. - jpeg_stdio_src(&cinfo,nfile);
  18063. - jpeg_read_header(&cinfo,TRUE);
  18064. - jpeg_start_decompress(&cinfo);
  18065. -
  18066. - if (cinfo.output_components!=1 && cinfo.output_components!=3 && cinfo.output_components!=4) {
  18067. - cimg::warn(true,"CImg<%s>::get_load_jpeg() : Don't know how to read image '%s' with libpeg, trying ImageMagick's convert",
  18068. - pixel_type(),filename?filename:"(unknown)");
  18069. - if (!file) return get_load_other(filename);
  18070. - else {
  18071. - if (!file) cimg::fclose(nfile);
  18072. - throw CImgIOException("CImg<%s>::get_load_jpeg() : Cannot read JPEG image '%s' using a *FILE input.",
  18073. - pixel_type(),filename?filename:"(FILE*)");
  18074. - }
  18075. - }
  18076. -
  18077. - const unsigned int row_stride = cinfo.output_width * cinfo.output_components;
  18078. - unsigned char *buf = new unsigned char[cinfo.output_width*cinfo.output_height*cinfo.output_components], *buf2 = buf;
  18079. - JSAMPROW row_pointer[1];
  18080. - while (cinfo.output_scanline < cinfo.output_height) {
  18081. - row_pointer[0] = &buf[cinfo.output_scanline*row_stride];
  18082. - jpeg_read_scanlines(&cinfo,row_pointer,1);
  18083. - }
  18084. - jpeg_finish_decompress(&cinfo);
  18085. - jpeg_destroy_decompress(&cinfo);
  18086. - if (!file) cimg::fclose(nfile);
  18087. -
  18088. - CImg<T> dest(cinfo.output_width,cinfo.output_height,1,cinfo.output_components);
  18089. - switch (dest.dim) {
  18090. - case 1: {
  18091. - T *ptr_g = dest.ptr();
  18092. - cimg_forXY(dest,x,y) *(ptr_g++) = (T)*(buf2++);
  18093. - } break;
  18094. - case 3: {
  18095. - T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1), *ptr_b = dest.ptr(0,0,0,2);
  18096. - cimg_forXY(dest,x,y) {
  18097. - *(ptr_r++) = (T)*(buf2++);
  18098. - *(ptr_g++) = (T)*(buf2++);
  18099. - *(ptr_b++) = (T)*(buf2++);
  18100. - }
  18101. - } break;
  18102. - case 4: {
  18103. - T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1),
  18104. - *ptr_b = dest.ptr(0,0,0,2), *ptr_a = dest.ptr(0,0,0,3);
  18105. - cimg_forXY(dest,x,y) {
  18106. - *(ptr_r++) = (T)*(buf2++);
  18107. - *(ptr_g++) = (T)*(buf2++);
  18108. - *(ptr_b++) = (T)*(buf2++);
  18109. - *(ptr_a++) = (T)*(buf2++);
  18110. - }
  18111. - } break;
  18112. - }
  18113. - delete[] buf;
  18114. - return dest;
  18115. -#endif
  18116. - }
  18117. -
  18118. - //! Load an image from a JPEG file
  18119. - static CImg get_load_jpeg(const char *const filename) {
  18120. - return get_load_jpeg(0,filename);
  18121. - }
  18122. -
  18123. - //! Load an image from a JPEG file
  18124. - CImg& load_jpeg(std::FILE *const file, const char *const filename=0) {
  18125. - return get_load_jpeg(file,filename).swap(*this);
  18126. - }
  18127. -
  18128. - //! Load an image from a JPEG file
  18129. - CImg& load_jpeg(const char *const filename) {
  18130. - return get_load_jpeg(filename).swap(*this);
  18131. - }
  18132. -
  18133. - //! Load an image using builtin ImageMagick++ Library
  18134. - /**
  18135. - Added April/may 2006 by Christoph Hormann <chris_hormann@gmx.de>
  18136. - This is experimental code, not much tested, use with care.
  18137. - **/
  18138. - static CImg get_load_magick(const char *const filename) {
  18139. - CImg dest;
  18140. -#ifdef cimg_use_magick
  18141. - Magick::Image image(filename);
  18142. - const unsigned int width = image.size().width(), height = image.size().height();
  18143. - switch (image.type()) {
  18144. - case Magick::PaletteMatteType:
  18145. - case Magick::TrueColorMatteType:
  18146. - case Magick::ColorSeparationType: {
  18147. - dest.assign(width,height,1,4);
  18148. - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2), *adata = dest.ptr(0,0,0,3);
  18149. - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
  18150. - for (unsigned int off = width*height; off; --off) {
  18151. - *(rdata++) = (T)(pixels->red);
  18152. - *(gdata++) = (T)(pixels->green);
  18153. - *(bdata++) = (T)(pixels->blue);
  18154. - *(adata++) = (T)(pixels->opacity);
  18155. - pixels++;
  18156. - }
  18157. - } break;
  18158. - case Magick::PaletteType:
  18159. - case Magick::TrueColorType: {
  18160. - dest.assign(width,height,1,3);
  18161. - T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2);
  18162. - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
  18163. - for (unsigned int off = width*height; off; --off) {
  18164. - *(rdata++) = (T)(pixels->red);
  18165. - *(gdata++) = (T)(pixels->green);
  18166. - *(bdata++) = (T)(pixels->blue);
  18167. - pixels++;
  18168. - }
  18169. - } break;
  18170. - case Magick::GrayscaleMatteType: {
  18171. - dest.assign(width,height,1,2);
  18172. - T *data = dest.ptr(0,0,0,0), *adata = dest.ptr(0,0,0,1);
  18173. - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
  18174. - for (unsigned int off = width*height; off; --off) {
  18175. - *(data++) = (T)(pixels->red);
  18176. - *(adata++) = (T)(pixels->opacity);
  18177. - pixels++;
  18178. - }
  18179. - } break;
  18180. - default: {
  18181. - dest.assign(width,height,1,1);
  18182. - T *data = dest.ptr(0,0,0,0);
  18183. - Magick::PixelPacket *pixels = image.getPixels(0,0,width,height);
  18184. - for (unsigned int off = width*height; off; --off) {
  18185. - *(data++) = (T)(pixels->red);
  18186. - pixels++;
  18187. - }
  18188. - } break;
  18189. - }
  18190. - return dest;
  18191. -#else
  18192. - throw CImgIOException("CImg<%s>::get_load_magick() : File '%s', Magick++ has not been linked during compilation.",
  18193. - pixel_type(),filename?filename:"(null)");
  18194. - return dest;
  18195. -#endif
  18196. - }
  18197. -
  18198. - //! Load an image using builtin ImageMagick++ Library (in-place version).
  18199. - CImg& load_magick(const char *const filename) {
  18200. - return get_load_magick(filename).swap(*this);
  18201. - }
  18202. -
  18203. - //! Load an image from a RAW file.
  18204. - static CImg get_load_raw(std::FILE *const file, const char *const filename,
  18205. - const unsigned int sizex, const unsigned int sizey=1,
  18206. - const unsigned int sizez=1, const unsigned int sizev=1,
  18207. - const bool multiplexed=false, const bool endian_swap=false) {
  18208. - CImg<T> res(sizex,sizey,sizez,sizev,0);
  18209. - if (res.is_empty()) return res;
  18210. -
  18211. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18212. - if (!multiplexed) {
  18213. - cimg::fread(res.ptr(),res.size(),nfile);
  18214. - if (endian_swap) cimg::endian_swap(res.ptr(),res.size());
  18215. - }
  18216. - else {
  18217. - CImg<T> buf(1,1,1,sizev);
  18218. - cimg_forXYZ(res,x,y,z) {
  18219. - cimg::fread(buf.ptr(),sizev,nfile);
  18220. - if (endian_swap) cimg::endian_swap(buf.ptr(),sizev);
  18221. - res.set_vector_at(buf,x,y,z); }
  18222. - }
  18223. - if (!file) cimg::fclose(nfile);
  18224. - return res;
  18225. - }
  18226. -
  18227. - //! Load an image from a RAW file.
  18228. - static CImg get_load_raw(const char *const filename,
  18229. - const unsigned int sizex, const unsigned int sizey=1,
  18230. - const unsigned int sizez=1, const unsigned int sizev=1,
  18231. - const bool multiplexed = false, const bool endian_swap = false) {
  18232. - return get_load_raw(0,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap);
  18233. - }
  18234. -
  18235. - //! In-place version of get_load_raw()
  18236. - CImg& load_raw(std::FILE *const file, const char *const filename,
  18237. - const unsigned int sizex, const unsigned int sizey=1,
  18238. - const unsigned int sizez=1, const unsigned int sizev=1,
  18239. - const bool multiplexed = false, const bool endian_swap = false) {
  18240. - return get_load_raw(file,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this);
  18241. - }
  18242. -
  18243. - //! In-place version of get_load_raw()
  18244. - CImg& load_raw(const char *const filename,
  18245. - const unsigned int sizex, const unsigned int sizey=1,
  18246. - const unsigned int sizez=1, const unsigned int sizev=1,
  18247. - const bool multiplexed = false, const bool endian_swap = false) {
  18248. - return get_load_raw(filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this);
  18249. - }
  18250. -
  18251. - //! Load an image from a RGBA file.
  18252. - static CImg get_load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18253. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18254. - unsigned char *buffer = new unsigned char[dimw*dimh*4];
  18255. - cimg::fread(buffer,dimw*dimh*4,nfile);
  18256. - if (!file) cimg::fclose(nfile);
  18257. - CImg res(dimw,dimh,1,4);
  18258. - T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB = res.ptr(0,0,0,2), *pA = res.ptr(0,0,0,3);
  18259. - const unsigned char *ptrs = buffer;
  18260. - for (unsigned int off=res.width*res.height; off>0; --off) {
  18261. - *(pR++) = (T)*(ptrs++);
  18262. - *(pG++) = (T)*(ptrs++);
  18263. - *(pB++) = (T)*(ptrs++);
  18264. - *(pA++) = (T)*(ptrs++);
  18265. - }
  18266. - delete[] buffer;
  18267. - return res;
  18268. - }
  18269. -
  18270. - //! Load an image from a RGBA file.
  18271. - static CImg get_load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18272. - return get_load_rgba(0,filename,dimw,dimh);
  18273. - }
  18274. -
  18275. - //! In-place version of get_load_rgba()
  18276. - CImg& load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18277. - return get_load_rgba(file, filename,dimw,dimh).swap(*this);
  18278. - }
  18279. -
  18280. - //! In-place version of get_load_rgba()
  18281. - CImg& load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18282. - return get_load_rgba(filename,dimw,dimh).swap(*this);
  18283. - }
  18284. -
  18285. - //! Load an image from a RGB file.
  18286. - static CImg get_load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18287. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18288. - unsigned char *buffer = new unsigned char[dimw*dimh*3];
  18289. - cimg::fread(buffer,dimw*dimh*3,nfile);
  18290. - if (!file) cimg::fclose(nfile);
  18291. - CImg res(dimw,dimh,1,3);
  18292. - T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB=res.ptr(0,0,0,2);
  18293. - const unsigned char *ptrs = buffer;
  18294. - for (unsigned int off=res.width*res.height; off>0; --off) {
  18295. - *(pR++) = (T)*(ptrs++);
  18296. - *(pG++) = (T)*(ptrs++);
  18297. - *(pB++) = (T)*(ptrs++);
  18298. - }
  18299. - delete[] buffer;
  18300. - return res;
  18301. - }
  18302. -
  18303. - //! Load an image from a RGB file.
  18304. - static CImg get_load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18305. - return get_load_rgb(0,filename,dimw,dimh);
  18306. - }
  18307. -
  18308. - //! In-place version of get_load_rgb()
  18309. - CImg& load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18310. - return get_load_rgb(file, filename,dimw,dimh).swap(*this);
  18311. - }
  18312. -
  18313. - //! In-place version of get_load_rgb()
  18314. - CImg& load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) {
  18315. - return get_load_rgb(filename,dimw,dimh).swap(*this);
  18316. - }
  18317. -
  18318. -#define cimg_load_inr_case(Tf,sign,pixsize,Ts) \
  18319. - if (!loaded && fopt[6]==pixsize && fopt[4]==Tf && fopt[5]==sign) { \
  18320. - Ts *xval, *val = new Ts[fopt[0]*fopt[3]]; \
  18321. - cimg_forYZ(dest,y,z) { \
  18322. - cimg::fread(val,fopt[0]*fopt[3],nfile); \
  18323. - if (fopt[7]!=endian) cimg::endian_swap(val,fopt[0]*fopt[3]); \
  18324. - xval = val; cimg_forX(dest,x) cimg_forV(dest,k) \
  18325. - dest(x,y,z,k) = (T)*(xval++); \
  18326. - } \
  18327. - delete[] val; \
  18328. - loaded = true; \
  18329. - }
  18330. -
  18331. - static void _load_inr(std::FILE *file, int out[8], float *const voxsize=0) {
  18332. - char item[1024],tmp1[64],tmp2[64];
  18333. - out[0]=out[1]=out[2]=out[3]=out[5]=1; out[4]=out[6]=out[7]=-1;
  18334. - std::fscanf(file,"%63s",item);
  18335. - if(cimg::strncasecmp(item,"#INRIMAGE-4#{",13)!=0)
  18336. - throw CImgIOException("CImg<%s>::get_load_inr() : File does not appear to be a valid INR file.\n"
  18337. - "(INRIMAGE-4 identifier not found)",pixel_type());
  18338. - while (std::fscanf(file," %63[^\n]%*c",item)!=EOF && cimg::strncmp(item,"##}",3)) {
  18339. - std::sscanf(item," XDIM%*[^0-9]%d",out);
  18340. - std::sscanf(item," YDIM%*[^0-9]%d",out+1);
  18341. - std::sscanf(item," ZDIM%*[^0-9]%d",out+2);
  18342. - std::sscanf(item," VDIM%*[^0-9]%d",out+3);
  18343. - std::sscanf(item," PIXSIZE%*[^0-9]%d",out+6);
  18344. - if (voxsize) {
  18345. - std::sscanf(item," VX%*[^0-9.eE+-]%f",voxsize);
  18346. - std::sscanf(item," VY%*[^0-9.eE+-]%f",voxsize+1);
  18347. - std::sscanf(item," VZ%*[^0-9.eE+-]%f",voxsize+2);
  18348. - }
  18349. - if (std::sscanf(item," CPU%*[ =]%s",tmp1)) out[7]=cimg::strncasecmp(tmp1,"sun",3)?0:1;
  18350. - switch(std::sscanf(item," TYPE%*[ =]%s %s",tmp1,tmp2)) {
  18351. - case 0: break;
  18352. - case 2: out[5] = cimg::strncasecmp(tmp1,"unsigned",8)?1:0; std::strcpy(tmp1,tmp2);
  18353. - case 1:
  18354. - if (!cimg::strncasecmp(tmp1,"int",3) || !cimg::strncasecmp(tmp1,"fixed",5)) out[4]=0;
  18355. - if (!cimg::strncasecmp(tmp1,"float",5) || !cimg::strncasecmp(tmp1,"double",6)) out[4]=1;
  18356. - if (!cimg::strncasecmp(tmp1,"packed",6)) out[4]=2;
  18357. - if (out[4]>=0) break;
  18358. - default: throw CImgIOException("cimg::inr_header_read() : Invalid TYPE '%s'",tmp2);
  18359. - }
  18360. - }
  18361. - if(out[0]<0 || out[1]<0 || out[2]<0 || out[3]<0)
  18362. - throw CImgIOException("CImg<%s>::get_load_inr() : Bad dimensions in .inr file = ( %d , %d , %d , %d )",
  18363. - pixel_type(),out[0],out[1],out[2],out[3]);
  18364. - if(out[4]<0 || out[5]<0) throw CImgIOException("CImg<%s>::get_load_inr() : TYPE is not fully defined",pixel_type());
  18365. - if(out[6]<0) throw CImgIOException("CImg<%s>::get_load_inr() : PIXSIZE is not fully defined",pixel_type());
  18366. - if(out[7]<0) throw CImgIOException("CImg<%s>::get_load_inr() : Big/Little Endian coding type is not defined",pixel_type());
  18367. - }
  18368. -
  18369. - //! Load an image from an INRIMAGE-4 file.
  18370. - static CImg get_load_inr(std::FILE *const file, const char *const filename=0, float *voxsize=0) {
  18371. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18372. - int fopt[8], endian=cimg::endian()?1:0;
  18373. - bool loaded = false;
  18374. - if (voxsize) voxsize[0]=voxsize[1]=voxsize[2]=1;
  18375. - _load_inr(nfile,fopt,voxsize);
  18376. - CImg<T> dest(fopt[0],fopt[1],fopt[2],fopt[3]);
  18377. - cimg_load_inr_case(0,0,8, unsigned char);
  18378. - cimg_load_inr_case(0,1,8, char);
  18379. - cimg_load_inr_case(0,0,16,unsigned short);
  18380. - cimg_load_inr_case(0,1,16,short);
  18381. - cimg_load_inr_case(0,0,32,unsigned int);
  18382. - cimg_load_inr_case(0,1,32,int);
  18383. - cimg_load_inr_case(1,0,32,float);
  18384. - cimg_load_inr_case(1,1,32,float);
  18385. - cimg_load_inr_case(1,0,64,double);
  18386. - cimg_load_inr_case(1,1,64,double);
  18387. - if (!loaded) {
  18388. - if (!file) cimg::fclose(nfile);
  18389. - throw CImgIOException("CImg<%s>::get_load_inr() : File '%s', cannot read images of the type specified in the file",
  18390. - pixel_type(),filename?filename:"(FILE*)");
  18391. - }
  18392. - if (!file) cimg::fclose(nfile);
  18393. - return dest;
  18394. - }
  18395. -
  18396. - //! Load an image from an INRIMAGE-4 file.
  18397. - static CImg get_load_inr(const char *const filename, float *const voxsize=0) {
  18398. - return get_load_inr(0,filename,voxsize);
  18399. - }
  18400. -
  18401. - //! In-place version of get_load_inr()
  18402. - CImg& load_inr(std::FILE *const file, const char *const filename=0, float *const voxsize=0) {
  18403. - return get_load_inr(file,filename,voxsize).swap(*this);
  18404. - }
  18405. -
  18406. - //! In-place version of get_load_inr()
  18407. - CImg& load_inr(const char *const filename, float *const voxsize=0) {
  18408. - return get_load_inr(filename,voxsize).swap(*this);
  18409. - }
  18410. -
  18411. -#define cimg_load_pandore_case(nid,nbdim,nwidth,nheight,ndepth,ndim,stype) \
  18412. - case nid: { \
  18413. - cimg::fread(dims,nbdim,nfile); \
  18414. - if (endian) cimg::endian_swap(dims,nbdim); \
  18415. - dest.assign(nwidth,nheight,ndepth,ndim); \
  18416. - stype *buffer = new stype[dest.size()]; \
  18417. - cimg::fread(buffer,dest.size(),nfile); \
  18418. - if (endian) cimg::endian_swap(buffer,dest.size()); \
  18419. - T *ptrd = dest.ptr(); \
  18420. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); \
  18421. - buffer-=dest.size(); \
  18422. - delete[] buffer; \
  18423. - } \
  18424. - break;
  18425. -
  18426. - //! Load an image from a PANDORE-5 file.
  18427. - static CImg get_load_pandore(std::FILE *const file, const char *const filename=0) {
  18428. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  18429. - typedef unsigned char uchar;
  18430. - /* Don't use these two and they cause warnings.
  18431. - *
  18432. - typedef unsigned short ushort;
  18433. - typedef unsigned int uint;
  18434. - */
  18435. - typedef unsigned long ulong;
  18436. - CImg dest;
  18437. - char tmp[32];
  18438. - cimg::fread(tmp,12,nfile);
  18439. - if (cimg::strncasecmp("PANDORE",tmp,7)) {
  18440. - if (!file) cimg::fclose(nfile);
  18441. - throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s' is not a valid PANDORE file.\n"
  18442. - "(PANDORE identifier not found).",pixel_type(),filename?filename:"(FILE*)");
  18443. - }
  18444. - unsigned int imageid,dims[8];
  18445. - int ptbuf[4];
  18446. - cimg::fread(&imageid,1,nfile);
  18447. - const bool endian = (imageid>255);
  18448. - if (endian) cimg::endian_swap(imageid);
  18449. -
  18450. - cimg::fread(tmp,20,nfile);
  18451. - switch (imageid) {
  18452. - cimg_load_pandore_case(2,2,dims[1],1,1,1,uchar);
  18453. - cimg_load_pandore_case(3,2,dims[1],1,1,1,long);
  18454. - cimg_load_pandore_case(4,2,dims[1],1,1,1,float);
  18455. - cimg_load_pandore_case(5,3,dims[2],dims[1],1,1,uchar);
  18456. - cimg_load_pandore_case(6,3,dims[2],dims[1],1,1,long);
  18457. - cimg_load_pandore_case(7,3,dims[2],dims[1],1,1,float);
  18458. - cimg_load_pandore_case(8,4,dims[3],dims[2],dims[1],1,uchar);
  18459. - cimg_load_pandore_case(9,4,dims[3],dims[2],dims[1],1,long);
  18460. - cimg_load_pandore_case(10,4,dims[3],dims[2],dims[1],1,float);
  18461. -
  18462. - case 11: { // Region 1D
  18463. - cimg::fread(dims,3,nfile);
  18464. - if (endian) cimg::endian_swap(dims,3);
  18465. - dest.assign(dims[1],1,1,1);
  18466. - if (dims[2]<256) {
  18467. - unsigned char *buffer = new unsigned char[dest.size()];
  18468. - cimg::fread(buffer,dest.size(),nfile);
  18469. - T *ptrd = dest.ptr();
  18470. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18471. - buffer-=dest.size();
  18472. - delete[] buffer;
  18473. - } else {
  18474. - if (dims[2]<65536) {
  18475. - unsigned short *buffer = new unsigned short[dest.size()];
  18476. - cimg::fread(buffer,dest.size(),nfile);
  18477. - if (endian) cimg::endian_swap(buffer,dest.size());
  18478. - T *ptrd = dest.ptr();
  18479. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18480. - buffer-=dest.size();
  18481. - delete[] buffer;
  18482. - } else {
  18483. - unsigned int *buffer = new unsigned int[dest.size()];
  18484. - cimg::fread(buffer,dest.size(),nfile);
  18485. - if (endian) cimg::endian_swap(buffer,dest.size());
  18486. - T *ptrd = dest.ptr();
  18487. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18488. - buffer-=dest.size();
  18489. - delete[] buffer;
  18490. - }
  18491. - }
  18492. - }
  18493. - break;
  18494. - case 12: { // Region 2D
  18495. - cimg::fread(dims,4,nfile);
  18496. - if (endian) cimg::endian_swap(dims,4);
  18497. - dest.assign(dims[2],dims[1],1,1);
  18498. - if (dims[3]<256) {
  18499. - unsigned char *buffer = new unsigned char[dest.size()];
  18500. - cimg::fread(buffer,dest.size(),nfile);
  18501. - T *ptrd = dest.ptr();
  18502. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18503. - buffer-=dest.size();
  18504. - delete[] buffer;
  18505. - } else {
  18506. - if (dims[3]<65536) {
  18507. - unsigned short *buffer = new unsigned short[dest.size()];
  18508. - cimg::fread(buffer,dest.size(),nfile);
  18509. - if (endian) cimg::endian_swap(buffer,dest.size());
  18510. - T *ptrd = dest.ptr();
  18511. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18512. - buffer-=dest.size();
  18513. - delete[] buffer;
  18514. - } else {
  18515. - unsigned long *buffer = new unsigned long[dest.size()];
  18516. - cimg::fread(buffer,dest.size(),nfile);
  18517. - if (endian) cimg::endian_swap(buffer,dest.size());
  18518. - T *ptrd = dest.ptr();
  18519. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18520. - buffer-=dest.size();
  18521. - delete[] buffer;
  18522. - }
  18523. - }
  18524. - }
  18525. - break;
  18526. - case 13: { // Region 3D
  18527. - cimg::fread(dims,5,nfile);
  18528. - if (endian) cimg::endian_swap(dims,5);
  18529. - dest.assign(dims[3],dims[2],dims[1],1);
  18530. - if (dims[4]<256) {
  18531. - unsigned char *buffer = new unsigned char[dest.size()];
  18532. - cimg::fread(buffer,dest.size(),nfile);
  18533. - T *ptrd = dest.ptr();
  18534. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18535. - buffer-=dest.size();
  18536. - delete[] buffer;
  18537. - } else {
  18538. - if (dims[4]<65536) {
  18539. - unsigned short *buffer = new unsigned short[dest.size()];
  18540. - cimg::fread(buffer,dest.size(),nfile);
  18541. - if (endian) cimg::endian_swap(buffer,dest.size());
  18542. - T *ptrd = dest.ptr();
  18543. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18544. - buffer-=dest.size();
  18545. - delete[] buffer;
  18546. - } else {
  18547. - unsigned int *buffer = new unsigned int[dest.size()];
  18548. - cimg::fread(buffer,dest.size(),nfile);
  18549. - if (endian) cimg::endian_swap(buffer,dest.size());
  18550. - T *ptrd = dest.ptr();
  18551. - cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++);
  18552. - buffer-=dest.size();
  18553. - delete[] buffer;
  18554. - }
  18555. - }
  18556. - }
  18557. - break;
  18558. - cimg_load_pandore_case(16,4,dims[2],dims[1],1,3,uchar);
  18559. - cimg_load_pandore_case(17,4,dims[2],dims[1],1,3,long);
  18560. - cimg_load_pandore_case(18,4,dims[2],dims[1],1,3,float);
  18561. - cimg_load_pandore_case(19,5,dims[3],dims[2],dims[1],3,uchar);
  18562. - cimg_load_pandore_case(20,5,dims[3],dims[2],dims[1],3,long);
  18563. - cimg_load_pandore_case(21,5,dims[3],dims[2],dims[1],3,float);
  18564. - cimg_load_pandore_case(22,2,dims[1],1,1,dims[0],uchar);
  18565. - cimg_load_pandore_case(23,2,dims[1],1,1,dims[0],long);
  18566. - cimg_load_pandore_case(24,2,dims[1],1,1,dims[0],ulong);
  18567. - cimg_load_pandore_case(25,2,dims[1],1,1,dims[0],float);
  18568. - cimg_load_pandore_case(26,3,dims[2],dims[1],1,dims[0],uchar);
  18569. - cimg_load_pandore_case(27,3,dims[2],dims[1],1,dims[0],long);
  18570. - cimg_load_pandore_case(28,3,dims[2],dims[1],1,dims[0],ulong);
  18571. - cimg_load_pandore_case(29,3,dims[2],dims[1],1,dims[0],float);
  18572. - cimg_load_pandore_case(30,4,dims[3],dims[2],dims[1],dims[0],uchar);
  18573. - cimg_load_pandore_case(31,4,dims[3],dims[2],dims[1],dims[0],long);
  18574. - cimg_load_pandore_case(32,4,dims[3],dims[2],dims[1],dims[0],ulong);
  18575. - cimg_load_pandore_case(33,4,dims[3],dims[2],dims[1],dims[0],float);
  18576. - case 34: // Points 1D
  18577. - cimg::fread(ptbuf,1,nfile);
  18578. - if (endian) cimg::endian_swap(ptbuf,1);
  18579. - dest.assign(1); dest[0]=(T)ptbuf[0];
  18580. - break;
  18581. - case 35: // Points 2D
  18582. - cimg::fread(ptbuf,2,nfile);
  18583. - if (endian) cimg::endian_swap(ptbuf,2);
  18584. - dest.assign(2); dest[0]=(T)ptbuf[1]; dest[1]=(T)ptbuf[0];
  18585. - break;
  18586. - case 36: // Points 3D
  18587. - cimg::fread(ptbuf,3,nfile);
  18588. - if (endian) cimg::endian_swap(ptbuf,3);
  18589. - dest.assign(3); dest[0]=(T)ptbuf[2]; dest[1]=(T)ptbuf[1]; dest[2]=(T)ptbuf[0];
  18590. - break;
  18591. - default:
  18592. - if (!file) cimg::fclose(nfile);
  18593. - throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s', cannot read images with ID_type=%u",
  18594. - pixel_type(),filename?filename:"(FILE*)",imageid);
  18595. - }
  18596. - if (!file) cimg::fclose(nfile);
  18597. - return dest;
  18598. - }
  18599. -
  18600. - //! Load an image from a PANDORE-5 file.
  18601. - static CImg get_load_pandore(const char *const filename) {
  18602. - return get_load_pandore(0,filename);
  18603. - }
  18604. -
  18605. - //! In-place version of get_load_pandore()
  18606. - CImg& load_pandore(std::FILE *const file, const char *const filename) {
  18607. - return get_load_pandore(file,filename).swap(*this);
  18608. - }
  18609. -
  18610. - //! In-place version of get_load_pandore()
  18611. - CImg& load_pandore(const char *const filename) {
  18612. - return get_load_pandore(filename).swap(*this);
  18613. - }
  18614. -
  18615. - //! Load an image from an ANALYZE7.5 file
  18616. - static CImg get_load_analyze(const char *const filename, float *const voxsize=0) {
  18617. -
  18618. - // Open header and data files
  18619. - std::FILE *file_header=0, *file=0;
  18620. - char body[1024];
  18621. - const char *ext = cimg::filename_split(filename,body);
  18622. - if (!cimg::strncasecmp(ext,"hdr",3) ||
  18623. - !cimg::strncasecmp(ext,"img",3)) {
  18624. - std::sprintf(body+cimg::strlen(body),".hdr");
  18625. - file_header = cimg::fopen(body,"rb");
  18626. - if (!file_header) return CImg<T>();
  18627. - std::sprintf(body+cimg::strlen(body)-3,"img");
  18628. - file = cimg::fopen(body,"rb");
  18629. - if (!file) { cimg::fclose(file_header); return CImg<T>(); }
  18630. - } else throw CImgIOException("CImg<%s>::get_load_analyze() : Filename '%s', not recognized as an Analyze 7.5 file.",
  18631. - pixel_type(),filename);
  18632. -
  18633. - // Read header
  18634. - bool endian = false;
  18635. - unsigned int header_size;
  18636. - cimg::fread(&header_size,1,file_header);
  18637. - if (header_size>=4096) { endian = true; cimg::endian_swap(header_size); }
  18638. - unsigned char *header = new unsigned char[header_size];
  18639. - cimg::fread(header+4,header_size-4,file_header);
  18640. - cimg::fclose(file_header);
  18641. - if (endian) {
  18642. - cimg::endian_swap((short*)(header+40),5);
  18643. - cimg::endian_swap((short*)(header+70),1);
  18644. - cimg::endian_swap((short*)(header+72),1);
  18645. - cimg::endian_swap((float*)(header+76),4);
  18646. - cimg::endian_swap((float*)(header+112),1);
  18647. - }
  18648. - unsigned short *dim = (unsigned short*)(header+40), dimx=1, dimy=1, dimz=1, dimv=1;
  18649. - cimg::warn(!dim[0],"CImg<%s>::get_load_analyze() : Specified image has zero dimensions.",pixel_type());
  18650. - cimg::warn(dim[0]>4,"CImg<%s>::get_load_analyze() : Number of image dimension is %d, reading only the 4 first dimensions",
  18651. - pixel_type(),dim[0]);
  18652. - if (dim[0]>=1) dimx = dim[1];
  18653. - if (dim[0]>=2) dimy = dim[2];
  18654. - if (dim[0]>=3) dimz = dim[3];
  18655. - if (dim[0]>=4) dimv = dim[4];
  18656. -
  18657. - float scalefactor = *(float*)(header+112); if (scalefactor==0) scalefactor=1;
  18658. - const unsigned short datatype = *(short*)(header+70);
  18659. - if (voxsize) { const float *vsize = (float*)(header+76); voxsize[0] = vsize[1]; voxsize[1] = vsize[2]; voxsize[2] = vsize[3]; }
  18660. - delete[] header;
  18661. -
  18662. - // Read pixel data
  18663. - CImg dest(dimx,dimy,dimz,dimv);
  18664. - switch (datatype) {
  18665. - case 2: {
  18666. - unsigned char *buffer = new unsigned char[dimx*dimy*dimz*dimv];
  18667. - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
  18668. - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
  18669. - delete[] buffer;
  18670. - } break;
  18671. - case 4: {
  18672. - short *buffer = new short[dimx*dimy*dimz*dimv];
  18673. - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
  18674. - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
  18675. - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
  18676. - delete[] buffer;
  18677. - } break;
  18678. - case 8: {
  18679. - int *buffer = new int[dimx*dimy*dimz*dimv];
  18680. - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
  18681. - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
  18682. - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
  18683. - delete[] buffer;
  18684. - } break;
  18685. - case 16: {
  18686. - float *buffer = new float[dimx*dimy*dimz*dimv];
  18687. - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
  18688. - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
  18689. - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
  18690. - delete[] buffer;
  18691. - } break;
  18692. - case 64: {
  18693. - double *buffer = new double[dimx*dimy*dimz*dimv];
  18694. - cimg::fread(buffer,dimx*dimy*dimz*dimv,file);
  18695. - if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv);
  18696. - cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor);
  18697. - delete[] buffer;
  18698. - } break;
  18699. - default:
  18700. - cimg::fclose(file);
  18701. - throw CImgIOException("CImg<%s>::get_load_analyze() : File '%s, cannot read images width 'datatype = %d'",
  18702. - pixel_type(),filename,datatype);
  18703. - }
  18704. - cimg::fclose(file);
  18705. - return dest;
  18706. - }
  18707. -
  18708. - //! In-place version of get_load_analyze()
  18709. - CImg& load_analyze(const char *const filename, float *const voxsize = 0) {
  18710. - return get_load_analyze(filename,voxsize).swap(*this);
  18711. - }
  18712. -
  18713. - //! Load PAR-REC (Philips) image file
  18714. - static CImg get_load_parrec(const char *const filename, const char axe='v', const char align='p') {
  18715. - return CImgList<T>::get_load_parrec(filename).get_append(axe,align);
  18716. - }
  18717. -
  18718. - //! In-place version of get_load_parrec()
  18719. - CImg& load_parrec(const char *const filename, const char axis='v', const char align='p') {
  18720. - return get_load_parrec(filename,axis,align).swap(*this);
  18721. - }
  18722. -
  18723. - //! Load an image from a CImg RAW file
  18724. - static CImg get_load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') {
  18725. - return CImgList<T>::get_load_cimg(file,filename).get_append(axis,align);
  18726. - }
  18727. -
  18728. - //! Load an image from a CImg RAW file
  18729. - static CImg get_load_cimg(const char *const filename, const char axis='v', const char align='p') {
  18730. - return get_load_cimg(0,filename,axis,align);
  18731. - }
  18732. -
  18733. - //! In-place version of get_load_cimg()
  18734. - CImg& load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') {
  18735. - return get_load_cimg(file,filename,axis,align).swap(*this);
  18736. - }
  18737. -
  18738. - //! In-place version of get_load_cimg()
  18739. - CImg& load_cimg(const char *const filename, const char axis='v', const char align='p') {
  18740. - return get_load_cimg(filename,axis,align).swap(*this);
  18741. - }
  18742. -
  18743. - //! Function that loads the image for other file formats that are not natively handled by CImg.
  18744. - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
  18745. - static CImg get_load_imagemagick(const char *const filename) {
  18746. - static bool first_time = true;
  18747. - char command[1024], filetmp[512];
  18748. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  18749. - std::FILE *file = 0;
  18750. - do {
  18751. - std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  18752. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  18753. - } while (file);
  18754. - std::sprintf(command,"%s \"%s\" %s",cimg::imagemagick_path(),filename,filetmp);
  18755. - cimg::system(command,cimg::imagemagick_path());
  18756. - if (!(file = std::fopen(filetmp,"rb"))) {
  18757. - cimg::fclose(cimg::fopen(filename,"r"));
  18758. - throw CImgIOException("CImg<%s>::get_load_imagemagick() : Failed to open image '%s'.\n\n"
  18759. - "Path of 'ImageMagick's convert' : \"%s\"\n"
  18760. - "Path of temporary filename : \"%s\"",
  18761. - pixel_type(),filename,cimg::imagemagick_path(),filetmp);
  18762. - } else cimg::fclose(file);
  18763. - const CImg dest = CImg<T>::get_load_pnm(filetmp);
  18764. - std::remove(filetmp);
  18765. - return dest;
  18766. - }
  18767. -
  18768. - //! In-place version of get_load_imagemagick()
  18769. - CImg& load_imagemagick(const char *const filename) {
  18770. - return get_load_imagemagick(filename).swap(*this);
  18771. - }
  18772. -
  18773. - //! Function that loads the image for other file formats that are not natively handled by CImg.
  18774. - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
  18775. - static CImg get_load_graphicsmagick(const char *const filename) {
  18776. - static bool first_time = true;
  18777. - char command[1024], filetmp[512];
  18778. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  18779. - std::FILE *file = 0;
  18780. - do {
  18781. - std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  18782. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  18783. - } while (file);
  18784. - std::sprintf(command,"%s convert \"%s\" %s",cimg::graphicsmagick_path(),filename,filetmp);
  18785. - cimg::system(command,cimg::graphicsmagick_path());
  18786. - if (!(file = std::fopen(filetmp,"rb"))) {
  18787. - cimg::fclose(cimg::fopen(filename,"r"));
  18788. - throw CImgIOException("CImg<%s>::get_load_graphicsmagick() : Failed to open image '%s'.\n\n"
  18789. - "Path of 'GraphicsMagick's gm' : \"%s\"\n"
  18790. - "Path of temporary filename : \"%s\"",
  18791. - pixel_type(),filename,cimg::graphicsmagick_path(),filetmp);
  18792. - } else cimg::fclose(file);
  18793. - const CImg dest = CImg<T>::get_load_pnm(filetmp);
  18794. - std::remove(filetmp);
  18795. - return dest;
  18796. - }
  18797. -
  18798. - //! In-place version of get_load_graphicsmagick()
  18799. - CImg& load_graphicsmagick(const char *const filename) {
  18800. - return get_load_graphicsmagick(filename).swap(*this);
  18801. - }
  18802. -
  18803. - //! Function that loads the image for other file formats that are not natively handled by CImg.
  18804. - //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...).
  18805. - static CImg get_load_other(const char *const filename) {
  18806. - CImg<T> res;
  18807. - const unsigned int odebug = cimg::exception_mode();
  18808. - cimg::exception_mode() = 0;
  18809. - try { res.load_magick(filename); }
  18810. - catch (CImgException&) {
  18811. - try { res.load_imagemagick(filename); }
  18812. - catch (CImgException&) {
  18813. - try { res.load_graphicsmagick(filename); }
  18814. - catch (CImgException&) {
  18815. - res.assign();
  18816. - }
  18817. - }
  18818. - }
  18819. - cimg::exception_mode()=odebug;
  18820. - if (res.is_empty())
  18821. - throw CImgIOException("CImg<%s>::get_load_other() : Failed to open image '%s'.\n"
  18822. - "Check you have either the ImageMagick or GraphicsMagick package installed.",
  18823. - pixel_type(),filename);
  18824. - return res;
  18825. - }
  18826. -
  18827. - //! In-place version of get_load_graphicsmagick()
  18828. - CImg& load_other(const char *const filename) {
  18829. - return get_load_other(filename).swap(*this);
  18830. - }
  18831. -
  18832. - //! Load an image from a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net )
  18833. - static CImg get_load_dicom(const char *const filename) {
  18834. - static bool first_time = true;
  18835. - char command[1024], filetmp[512], body[512];
  18836. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  18837. - cimg::fclose(cimg::fopen(filename,"r"));
  18838. - std::FILE *file;
  18839. - do {
  18840. - std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000);
  18841. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  18842. - } while (file);
  18843. - std::sprintf(command,"%s -w -c anlz -o %s -f %s",cimg::medcon_path(),filetmp,filename);
  18844. - cimg::system(command);
  18845. - cimg::filename_split(filetmp,body);
  18846. - std::sprintf(command,"m000-%s.hdr",body);
  18847. - file = std::fopen(command,"rb");
  18848. - if (!file) {
  18849. - throw CImgIOException("CImg<%s>::get_load_dicom() : Failed to open image '%s'.\n\n"
  18850. - "Path of 'medcon' : \"%s\"\n"
  18851. - "Path of temporary filename : \"%s\"",
  18852. - pixel_type(),filename,cimg::medcon_path,filetmp);
  18853. - } else cimg::fclose(file);
  18854. - const CImg dest = CImg<T>::get_load_analyze(command);
  18855. - std::remove(command);
  18856. - std::sprintf(command,"m000-%s.img",body);
  18857. - std::remove(command);
  18858. - return dest;
  18859. - }
  18860. -
  18861. - //! In-place version of get_load_dicom()
  18862. - CImg& load_dicom(const char *const filename) {
  18863. - return get_load_dicom(filename).swap(*this);
  18864. - }
  18865. -
  18866. - //! Load OFF files (GeomView 3D object files)
  18867. - template<typename tf,typename tc>
  18868. - static CImg<T> get_load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
  18869. - const bool invert_faces=false) {
  18870. - std::FILE *file=cimg::fopen(filename,"r");
  18871. - unsigned int nb_points=0, nb_triangles=0;
  18872. - int err;
  18873. - if ((err = std::fscanf(file,"OFF%u%u%*[^\n]",&nb_points,&nb_triangles))!=2) {
  18874. - cimg::fclose(file);
  18875. - throw CImgIOException("CImg<%s>::get_load_off() : File '%s' is not a valid OFF file.",pixel_type(),filename);
  18876. - }
  18877. -
  18878. - // Read points data
  18879. - CImg<T> points(nb_points,3);
  18880. - float X=0,Y=0,Z=0;
  18881. - cimg_forX(points,l) {
  18882. - if ((err = std::fscanf(file,"%f%f%f%*[^\n]",&X,&Y,&Z))!=3) {
  18883. - cimg::fclose(file);
  18884. - throw CImgIOException("CImg<%s>::get_load_off() : File '%s', cannot read point %u.\n",pixel_type(),filename,l);
  18885. - }
  18886. - points(l,0) = (T)X; points(l,1) = (T)Y; points(l,2) = (T)Z;
  18887. - }
  18888. -
  18889. - // Read primitive data
  18890. - primitives.assign();
  18891. - colors.assign();
  18892. - bool stopflag = false;
  18893. - while (!stopflag) {
  18894. - unsigned int prim=0, i0=0, i1=0, i2=0, i3=0;
  18895. - char s_colors[256] = {'\0'};
  18896. - if ((err = std::fscanf(file,"%u",&prim))!=1) stopflag=true;
  18897. - else switch (prim) {
  18898. - case 3: {
  18899. - if ((err = std::fscanf(file,"%u%u%u%255[^\n]",&i0,&i1,&i2,s_colors))<3) stopflag = true;
  18900. - else {
  18901. - float c0=0.5, c1=0.5, c2=0.5;
  18902. - std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2);
  18903. - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2));
  18904. - else primitives.insert(CImg<tf>::vector(i0,i2,i1));
  18905. - colors.insert(CImg<tc>::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255)));
  18906. - }
  18907. - } break;
  18908. - case 4: {
  18909. - if ((err = std::fscanf(file,"%u%u%u%u%255[^\n]",&i0,&i1,&i2,&i3,s_colors))<4) stopflag = true;
  18910. - else {
  18911. - float c0=0.5, c1=0.5, c2=0.5;
  18912. - std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2);
  18913. - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2,i3));
  18914. - else primitives.insert(CImg<tf>::vector(i0,i3,i2,i1));
  18915. - colors.insert(CImg<tc>::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255),(tc)(c2*255)));
  18916. - }
  18917. - } break;
  18918. - default: stopflag = true;
  18919. - }
  18920. - }
  18921. - cimg::fclose(file);
  18922. - cimg::warn(primitives.size!=nb_triangles,
  18923. - "CImg<%s>::get_load_off() : File '%s' contained %u triangles instead of %u as claimed in the header.",
  18924. - pixel_type(),filename,primitives.size,nb_triangles);
  18925. - return points;
  18926. - }
  18927. -
  18928. - //! In-place version of get_load_off()
  18929. - template<typename tf,typename tc>
  18930. - CImg& load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors, const bool invert_faces=false) {
  18931. - return get_load_off(filename,primitives,colors,invert_faces).swap(*this);
  18932. - }
  18933. -
  18934. - //! Save the image as a file.
  18935. - /**
  18936. - The used file format is defined by the file extension in the filename \p filename.\n
  18937. - Parameter \p number can be used to add a 6-digit number to the filename before saving.\n
  18938. - If \p normalize is true, a normalized version of the image (between [0,255]) is saved.
  18939. - **/
  18940. - const CImg& save(const char *const filename, const int number=-1) const {
  18941. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  18942. - pixel_type(),width,height,depth,dim,data,filename);
  18943. - if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  18944. - pixel_type(),width,height,depth,dim,data);
  18945. - const char *ext = cimg::filename_split(filename);
  18946. - char nfilename[1024];
  18947. - const char *const fn = (number>=0)?cimg::filename_number(filename,number,6,nfilename):filename;
  18948. - if (!cimg::strncasecmp(ext,"asc",3)) return save_ascii(fn);
  18949. - if (!cimg::strncasecmp(ext,"dlm",3) ||
  18950. - !cimg::strncasecmp(ext,"txt",3)) return save_dlm(fn);
  18951. - if (!cimg::strncasecmp(ext,"inr",3)) return save_inr(fn);
  18952. - if (!cimg::strncasecmp(ext,"hdr",3)) return save_analyze(fn);
  18953. - if (!cimg::strncasecmp(ext,"dcm",3)) return save_dicom(fn);
  18954. - if (!cimg::strncasecmp(ext,"pan",3)) return save_pandore(fn);
  18955. - if (!cimg::strncasecmp(ext,"bmp",3)) return save_bmp(fn);
  18956. - if (!cimg::strncasecmp(ext,"png",3)) return save_png(fn);
  18957. - if (!cimg::strncasecmp(ext,"tif",3)) return save_tiff(fn);
  18958. - if (!cimg::strncasecmp(ext,"jpg",3) ||
  18959. - !cimg::strncasecmp(ext,"jpeg",4)) return save_jpeg(fn);
  18960. - if (!cimg::strncasecmp(ext,"rgba",4)) return save_rgba(fn);
  18961. - if (!cimg::strncasecmp(ext,"rgb",3)) return save_rgb(fn);
  18962. - if (!cimg::strncasecmp(ext,"raw",3)) return save_raw(fn);
  18963. - if (!cimg::strncasecmp(ext,"cimg",4) || ext[0]=='\0') return save_cimg(fn);
  18964. - if (!cimg::strncasecmp(ext,"pgm",3) ||
  18965. - !cimg::strncasecmp(ext,"ppm",3) ||
  18966. - !cimg::strncasecmp(ext,"pnm",3)) return save_pnm(fn);
  18967. - if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(fn,true);
  18968. - return save_other(fn);
  18969. - }
  18970. -
  18971. - //! Save the image as an ASCII file (ASCII Raw + simple header).
  18972. - const CImg& save_ascii(std::FILE *const file, const char *const filename=0) const {
  18973. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  18974. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  18975. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  18976. - pixel_type(),width,height,depth,dim,data);
  18977. - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
  18978. - std::fprintf(nfile,"%u %u %u %u\n",width,height,depth,dim);
  18979. - const T* ptrs = data;
  18980. - cimg_forYZV(*this,y,z,v) {
  18981. - cimg_forX(*this,x) std::fprintf(nfile,"%g ",(double)*(ptrs++));
  18982. - std::fputc('\n',nfile);
  18983. - }
  18984. - if (!file) cimg::fclose(nfile);
  18985. - return *this;
  18986. - }
  18987. -
  18988. - //! Save the image as an ASCII file (ASCII Raw + simple header).
  18989. - const CImg& save_ascii(const char *const filename) const {
  18990. - return save_ascii(0,filename);
  18991. - }
  18992. -
  18993. - //! Save the image as a DLM file.
  18994. - const CImg& save_dlm(std::FILE *const file, const char *const filename=0) const {
  18995. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  18996. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  18997. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  18998. - pixel_type(),width,height,depth,dim,data);
  18999. - cimg::warn(depth>1,
  19000. - "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Pixel values along Z will be unrolled (file '%s').",
  19001. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19002. - cimg::warn(dim>1,
  19003. - "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Pixel values along V will be unrolled (file '%s').",
  19004. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19005. -
  19006. - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
  19007. - const T* ptrs = data;
  19008. - cimg_forYZV(*this,y,z,v) {
  19009. - cimg_forX(*this,x) std::fprintf(nfile,"%g%s",(double)*(ptrs++),(x==(int)width-1)?"":",");
  19010. - std::fputc('\n',nfile);
  19011. - }
  19012. - if (!file) cimg::fclose(nfile);
  19013. - return *this;
  19014. - }
  19015. -
  19016. - //! Save the image as a DLM file.
  19017. - const CImg& save_dlm(const char *const filename) const {
  19018. - return save_dlm(0,filename);
  19019. - }
  19020. -
  19021. - //! Save the image as a PNM file.
  19022. - const CImg& save_pnm(std::FILE *const file, const char *const filename=0) const {
  19023. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19024. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19025. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19026. - pixel_type(),width,height,depth,dim,data);
  19027. - const CImgStats st(*this,false);
  19028. - cimg::warn(depth>1,
  19029. - "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
  19030. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19031. - cimg::warn(dim>3,
  19032. - "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').",
  19033. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19034. - const double stmin = st.min, stmax = st.max;
  19035. - cimg::warn(stmin<0 || stmax>65535,"CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) has pixel values in [%g,%g]. Probable type overflow (file '%s').",pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19036. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19037. - const T
  19038. - *ptrR = ptr(0,0,0,0),
  19039. - *ptrG = (dim>=2)?ptr(0,0,0,1):ptrR,
  19040. - *ptrB = (dim>=3)?ptr(0,0,0,2):ptrR;
  19041. - const unsigned int buf_size = width*height*(dim==1?1:3);
  19042. -
  19043. - std::fprintf(nfile,"P%c\n# CREATOR: CImg : Original size=%ux%ux%ux%u\n%u %u\n%u\n",
  19044. - (dim==1?'5':'6'),width,height,depth,dim,width,height,(st.max)<256?255:65535);
  19045. -
  19046. - switch(dim) {
  19047. - case 1: {
  19048. - if ((st.max)<256) { // Binary PGM 8 bits
  19049. - unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd;
  19050. - cimg_forXY(*this,x,y) *(xptrd++) = (unsigned char)*(ptrR++);
  19051. - cimg::fwrite(ptrd,buf_size,nfile);
  19052. - delete[] ptrd;
  19053. - } else { // Binary PGM 16 bits
  19054. - unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd;
  19055. - cimg_forXY(*this,x,y) *(xptrd++) = (unsigned short)*(ptrR++);
  19056. - if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size);
  19057. - cimg::fwrite(ptrd,buf_size,nfile);
  19058. - delete[] ptrd;
  19059. - }
  19060. - } break;
  19061. - default: {
  19062. - if ((st.max)<256) { // Binary PPM 8 bits
  19063. - unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd;
  19064. - cimg_forXY(*this,x,y) {
  19065. - *(xptrd++) = (unsigned char)*(ptrR++);
  19066. - *(xptrd++) = (unsigned char)*(ptrG++);
  19067. - *(xptrd++) = (unsigned char)*(ptrB++);
  19068. - }
  19069. - cimg::fwrite(ptrd,buf_size,nfile);
  19070. - delete[] ptrd;
  19071. - } else { // Binary PPM 16 bits
  19072. - unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd;
  19073. - cimg_forXY(*this,x,y) {
  19074. - *(xptrd++) = (unsigned short)*(ptrR++);
  19075. - *(xptrd++) = (unsigned short)*(ptrG++);
  19076. - *(xptrd++) = (unsigned short)*(ptrB++);
  19077. - }
  19078. - if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size);
  19079. - cimg::fwrite(ptrd,buf_size,nfile);
  19080. - delete[] ptrd;
  19081. - }
  19082. - } break;
  19083. - }
  19084. - if (!file) cimg::fclose(nfile);
  19085. - return *this;
  19086. - }
  19087. -
  19088. - //! Save the image as a PNM file.
  19089. - const CImg& save_pnm(const char *const filename) const {
  19090. - return save_pnm(0,filename);
  19091. - }
  19092. -
  19093. - //! Save an image as a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net )
  19094. - const CImg& save_dicom(const char *const filename) const {
  19095. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19096. - pixel_type(),width,height,depth,dim,data,filename);
  19097. - if (!filename) throw CImgArgumentException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19098. - pixel_type(),width,height,depth,dim,data);
  19099. - static bool first_time = true;
  19100. - char command[1024], filetmp[512], body[512];
  19101. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  19102. - std::FILE *file;
  19103. - do {
  19104. - std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000);
  19105. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  19106. - } while (file);
  19107. - save_analyze(filetmp);
  19108. - std::sprintf(command,"%s -w -c dicom -o %s -f %s",cimg::medcon_path(),filename,filetmp);
  19109. - cimg::system(command);
  19110. - std::remove(filetmp);
  19111. - cimg::filename_split(filetmp,body);
  19112. - std::sprintf(filetmp,"%s.img",body);
  19113. - std::remove(filetmp);
  19114. - std::sprintf(command,"m000-%s",filename);
  19115. - file = std::fopen(command,"rb");
  19116. - if (!file) {
  19117. - cimg::fclose(cimg::fopen(filename,"r"));
  19118. - throw CImgIOException("CImg<%s>::save_dicom() : Failed to save image '%s'.\n\n"
  19119. - "Path of 'medcon' : \"%s\"\n"
  19120. - "Path of temporary filename : \"%s\"",
  19121. - pixel_type(),filename,cimg::medcon_path(),filetmp);
  19122. - } else cimg::fclose(file);
  19123. - std::rename(command,filename);
  19124. - return *this;
  19125. - }
  19126. -
  19127. - //! Save the image as an ANALYZE7.5 file.
  19128. - const CImg& save_analyze(const char *const filename, const float *const voxsize=0) const {
  19129. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19130. - pixel_type(),width,height,depth,dim,data,filename);
  19131. - if (!filename) throw CImgArgumentException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19132. - pixel_type(),width,height,depth,dim,data);
  19133. - std::FILE *file;
  19134. - char header[348],hname[1024],iname[1024];
  19135. - const char *ext = cimg::filename_split(filename);
  19136. - short datatype=-1;
  19137. - std::memset(header,0,348);
  19138. - if (!ext[0]) { std::sprintf(hname,"%s.hdr",filename); std::sprintf(iname,"%s.img",filename); }
  19139. - if (!cimg::strncasecmp(ext,"hdr",3)) {
  19140. - std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(iname+cimg::strlen(iname)-3,"img");
  19141. - }
  19142. - if (!cimg::strncasecmp(ext,"img",3)) {
  19143. - std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(hname+cimg::strlen(iname)-3,"hdr");
  19144. - }
  19145. - ((int*)(header))[0] = 348;
  19146. - std::sprintf(header+4,"CImg");
  19147. - std::sprintf(header+14," ");
  19148. - ((short*)(header+36))[0] = 4096;
  19149. - ((char*)(header+38))[0] = 114;
  19150. - ((short*)(header+40))[0] = 4;
  19151. - ((short*)(header+40))[1] = width;
  19152. - ((short*)(header+40))[2] = height;
  19153. - ((short*)(header+40))[3] = depth;
  19154. - ((short*)(header+40))[4] = dim;
  19155. - if (!cimg::strcasecmp(pixel_type(),"bool")) datatype = 2;
  19156. - if (!cimg::strcasecmp(pixel_type(),"unsigned char")) datatype = 2;
  19157. - if (!cimg::strcasecmp(pixel_type(),"char")) datatype = 2;
  19158. - if (!cimg::strcasecmp(pixel_type(),"unsigned short")) datatype = 4;
  19159. - if (!cimg::strcasecmp(pixel_type(),"short")) datatype = 4;
  19160. - if (!cimg::strcasecmp(pixel_type(),"unsigned int")) datatype = 8;
  19161. - if (!cimg::strcasecmp(pixel_type(),"int")) datatype = 8;
  19162. - if (!cimg::strcasecmp(pixel_type(),"unsigned long")) datatype = 8;
  19163. - if (!cimg::strcasecmp(pixel_type(),"long")) datatype = 8;
  19164. - if (!cimg::strcasecmp(pixel_type(),"float")) datatype = 16;
  19165. - if (!cimg::strcasecmp(pixel_type(),"double")) datatype = 64;
  19166. - if (datatype<0)
  19167. - throw CImgIOException("CImg<%s>::save_analyze() : Cannot save image '%s' since pixel type (%s)"
  19168. - "is not handled in Analyze7.5 specifications.\n",
  19169. - pixel_type(),filename,pixel_type());
  19170. - ((short*)(header+70))[0] = datatype;
  19171. - ((short*)(header+72))[0] = sizeof(T);
  19172. - ((float*)(header+112))[0] = 1;
  19173. - ((float*)(header+76))[0] = 0;
  19174. - if (voxsize) {
  19175. - ((float*)(header+76))[1] = voxsize[0];
  19176. - ((float*)(header+76))[2] = voxsize[1];
  19177. - ((float*)(header+76))[3] = voxsize[2];
  19178. - } else ((float*)(header+76))[1] = ((float*)(header+76))[2] = ((float*)(header+76))[3] = 1;
  19179. - file = cimg::fopen(hname,"wb");
  19180. - cimg::fwrite(header,348,file);
  19181. - cimg::fclose(file);
  19182. - file = cimg::fopen(iname,"wb");
  19183. - cimg::fwrite(data,size(),file);
  19184. - cimg::fclose(file);
  19185. - return *this;
  19186. - }
  19187. -
  19188. - //! Save the image as a CImg file (Binary RAW + simple header)
  19189. - const CImg& save_cimg(std::FILE *const file, const char *const filename=0) const {
  19190. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19191. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19192. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19193. - pixel_type(),width,height,depth,dim,data);
  19194. - CImgList<T> tmp(1);
  19195. - tmp[0].width = width;
  19196. - tmp[0].height = height;
  19197. - tmp[0].depth = depth;
  19198. - tmp[0].dim = dim;
  19199. - tmp[0].data = data;
  19200. - tmp.save_cimg(file,filename);
  19201. - tmp[0].width = tmp[0].height = tmp[0].depth = tmp[0].dim = 0;
  19202. - tmp[0].data = 0;
  19203. - return *this;
  19204. - }
  19205. -
  19206. - //! Save the image as a CImg file (Binary RAW + simple header)
  19207. - const CImg& save_cimg(const char *const filename) const {
  19208. - return save_cimg(0,filename);
  19209. - }
  19210. -
  19211. - //! Save the image as a RAW file
  19212. - const CImg& save_raw(std::FILE *const file, const char *const filename=0, const bool multiplexed=false) const {
  19213. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19214. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19215. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19216. - pixel_type(),width,height,depth,dim,data);
  19217. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19218. - if (!multiplexed) cimg::fwrite(data,size(),nfile);
  19219. - else {
  19220. - CImg<T> buf(dim);
  19221. - cimg_forXYZ(*this,x,y,z) {
  19222. - cimg_forV(*this,k) buf[k] = (*this)(x,y,z,k);
  19223. - cimg::fwrite(buf.data,dim,nfile);
  19224. - }
  19225. - }
  19226. - if (!file) cimg::fclose(nfile);
  19227. - return *this;
  19228. - }
  19229. -
  19230. - //! Save the image as a RAW file
  19231. - const CImg& save_raw(const char *const filename=0, const bool multiplexed=false) const {
  19232. - return save_raw(0,filename,multiplexed);
  19233. - }
  19234. -
  19235. - //! Save the image using ImageMagick's convert.
  19236. - /** Function that saves the image for other file formats that are not natively handled by CImg,
  19237. - using the tool 'convert' from the ImageMagick package.\n
  19238. - This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install
  19239. - the ImageMagick package in order to get
  19240. - this function working properly (see http://www.imagemagick.org ).
  19241. - **/
  19242. - const CImg& save_imagemagick(const char *const filename, const unsigned int quality=100) const {
  19243. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')",
  19244. - pixel_type(),width,height,depth,dim,data,filename);
  19245. - if (!filename) throw CImgArgumentException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19246. - pixel_type(),width,height,depth,dim,data);
  19247. - static bool first_time = true;
  19248. - char command[512],filetmp[512];
  19249. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  19250. - std::FILE *file;
  19251. - do {
  19252. - if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  19253. - else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  19254. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  19255. - } while (file);
  19256. - save_pnm(filetmp);
  19257. - std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::imagemagick_path(),quality,filetmp,filename);
  19258. - cimg::system(command);
  19259. - file = std::fopen(filename,"rb");
  19260. - if (!file) throw CImgIOException("CImg<%s>::save_imagemagick() : Failed to save image '%s'.\n\n"
  19261. - "Path of 'convert' : \"%s\"\n"
  19262. - "Path of temporary filename : \"%s\"\n",
  19263. - pixel_type(),filename,cimg::imagemagick_path(),filetmp);
  19264. - if (file) cimg::fclose(file);
  19265. - std::remove(filetmp);
  19266. - return *this;
  19267. - }
  19268. -
  19269. - //! Save the image using GraphicsMagick's gm.
  19270. - /** Function that saves the image for other file formats that are not natively handled by CImg,
  19271. - using the tool 'gm' from the GraphicsMagick package.\n
  19272. - This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install
  19273. - the GraphicsMagick package in order to get
  19274. - this function working properly (see http://www.graphicsmagick.org ).
  19275. - **/
  19276. - const CImg& save_graphicsmagick(const char *const filename, const unsigned int quality=100) const {
  19277. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')",
  19278. - pixel_type(),width,height,depth,dim,data,filename);
  19279. - if (!filename) throw CImgArgumentException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19280. - pixel_type(),width,height,depth,dim,data);
  19281. - static bool first_time = true;
  19282. - char command[512],filetmp[512];
  19283. - if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; }
  19284. - std::FILE *file;
  19285. - do {
  19286. - if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  19287. - else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000);
  19288. - if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file);
  19289. - } while (file);
  19290. - save_pnm(filetmp);
  19291. - std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::graphicsmagick_path(),quality,filetmp,filename);
  19292. - cimg::system(command);
  19293. - file = std::fopen(filename,"rb");
  19294. - if (!file) throw CImgIOException("CImg<%s>::save_graphicsmagick() : Failed to save image '%s'.\n\n"
  19295. - "Path of 'gm' : \"%s\"\n"
  19296. - "Path of temporary filename : \"%s\"\n",
  19297. - pixel_type(),filename,cimg::graphicsmagick_path(),filetmp);
  19298. - if (file) cimg::fclose(file);
  19299. - std::remove(filetmp);
  19300. - return *this;
  19301. - }
  19302. -
  19303. - const CImg& save_other(const char *const filename, const unsigned int quality=100) const {
  19304. - const unsigned int odebug = cimg::exception_mode();
  19305. - bool is_saved = true;
  19306. - cimg::exception_mode() = 0;
  19307. - try { save_magick(filename); }
  19308. - catch (CImgException&) {
  19309. - try { save_imagemagick(filename,quality); }
  19310. - catch (CImgException&) {
  19311. - try { save_graphicsmagick(filename,quality); }
  19312. - catch (CImgException&) {
  19313. - is_saved = false;
  19314. - }
  19315. - }
  19316. - }
  19317. - cimg::exception_mode() = odebug;
  19318. - if (!is_saved) throw CImgIOException("CImg<%s>::save_other() : File '%s' cannot be saved.\n"
  19319. - "Check you have either the ImageMagick or GraphicsMagick package installed.",
  19320. - pixel_type(),filename);
  19321. - return *this;
  19322. - }
  19323. -
  19324. - //! Save the image as an INRIMAGE-4 file.
  19325. - const CImg& save_inr(std::FILE *const file, const char *const filename=0, const float *const voxsize=0) const {
  19326. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19327. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19328. - if (!filename) throw CImgArgumentException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19329. - pixel_type(),width,height,depth,dim,data);
  19330. - int inrpixsize=-1;
  19331. - const char *inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0";
  19332. - if (!cimg::strcasecmp(pixel_type(),"unsigned char")) { inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; }
  19333. - if (!cimg::strcasecmp(pixel_type(),"char")) { inrtype = "fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; }
  19334. - if (!cimg::strcasecmp(pixel_type(),"unsigned short")) { inrtype = "unsigned fixed\nPIXSIZE=16 bits\nSCALE=2**0";inrpixsize = 2; }
  19335. - if (!cimg::strcasecmp(pixel_type(),"short")) { inrtype = "fixed\nPIXSIZE=16 bits\nSCALE=2**0"; inrpixsize = 2; }
  19336. - if (!cimg::strcasecmp(pixel_type(),"unsigned int")) { inrtype = "unsigned fixed\nPIXSIZE=32 bits\nSCALE=2**0";inrpixsize = 4; }
  19337. - if (!cimg::strcasecmp(pixel_type(),"int")) { inrtype = "fixed\nPIXSIZE=32 bits\nSCALE=2**0"; inrpixsize = 4; }
  19338. - if (!cimg::strcasecmp(pixel_type(),"float")) { inrtype = "float\nPIXSIZE=32 bits"; inrpixsize = 4; }
  19339. - if (!cimg::strcasecmp(pixel_type(),"double")) { inrtype = "float\nPIXSIZE=64 bits"; inrpixsize = 8; }
  19340. - if (inrpixsize<=0) throw CImgIOException("CImg<%s>::save_inr() : Don't know how to save images of '%s'",pixel_type(),pixel_type());
  19341. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19342. - char header[257];
  19343. - int err = std::sprintf(header,"#INRIMAGE-4#{\nXDIM=%u\nYDIM=%u\nZDIM=%u\nVDIM=%u\n",width,height,depth,dim);
  19344. - if (voxsize) err += std::sprintf(header+err,"VX=%g\nVY=%g\nVZ=%g\n",voxsize[0],voxsize[1],voxsize[2]);
  19345. - err += std::sprintf(header+err,"TYPE=%s\nCPU=%s\n",inrtype,cimg::endian()?"sun":"decm");
  19346. - std::memset(header+err,'\n',252-err);
  19347. - std::memcpy(header+252,"##}\n",4);
  19348. - cimg::fwrite(header,256,nfile);
  19349. - cimg_forXYZ(*this,x,y,z) cimg_forV(*this,k) cimg::fwrite(&((*this)(x,y,z,k)),1,nfile);
  19350. - if (!file) cimg::fclose(nfile);
  19351. - return *this;
  19352. - }
  19353. -
  19354. - //! Save the image as an INRIMAGE-4 file.
  19355. - const CImg& save_inr(const char *const filename, const float *const voxsize=0) const {
  19356. - return save_inr(0,filename,voxsize);
  19357. - }
  19358. -
  19359. -#define cimg_save_pandore_case(sy,sz,sv,stype,id) \
  19360. - if (!saved && (sy?(sy==height):true) && (sz?(sz==depth):true) && (sv?(sv==dim):true) && !strcmp(stype,pixel_type())) { \
  19361. - unsigned int *iheader = (unsigned int*)(header+12); \
  19362. - nbdims = _save_pandore_header_length((*iheader=id),dims,colorspace); \
  19363. - cimg::fwrite(header,36,nfile); \
  19364. - cimg::fwrite(dims,nbdims,nfile); \
  19365. - if (id==2 || id==5 || id==8 || id==16 || id==19 || id==22 || id==26 || id==30) { \
  19366. - unsigned char *buffer = new unsigned char[size()]; \
  19367. - const T *ptrs = ptr(); \
  19368. - cimg_foroff(*this,off) *(buffer++)=(unsigned char)(*(ptrs++)); \
  19369. - buffer-=size(); \
  19370. - cimg::fwrite(buffer,size(),nfile); \
  19371. - delete[] buffer; \
  19372. - } \
  19373. - if (id==3 || id==6 || id==9 || id==17 || id==20 || id==23 || id==27 || id==31) { \
  19374. - unsigned long *buffer = new unsigned long[size()]; \
  19375. - const T *ptrs = ptr(); \
  19376. - cimg_foroff(*this,off) *(buffer++)=(long)(*(ptrs++)); \
  19377. - buffer-=size(); \
  19378. - cimg::fwrite(buffer,size(),nfile); \
  19379. - delete[] buffer; \
  19380. - } \
  19381. - if (id==4 || id==7 || id==10 || id==18 || id==21 || id==25 || id==29 || id==33) { \
  19382. - float *buffer = new float[size()]; \
  19383. - const T *ptrs = ptr(); \
  19384. - cimg_foroff(*this,off) *(buffer++)=(float)(*(ptrs++)); \
  19385. - buffer-=size(); \
  19386. - cimg::fwrite(buffer,size(),nfile); \
  19387. - delete[] buffer; \
  19388. - } \
  19389. - saved = true; \
  19390. - }
  19391. -
  19392. - unsigned int _save_pandore_header_length(unsigned int id,unsigned int *dims,const unsigned int colorspace=0) const {
  19393. - unsigned int nbdims=0;
  19394. - if (id==2 || id==3 || id==4) { dims[0]=1; dims[1]=width; nbdims=2; }
  19395. - if (id==5 || id==6 || id==7) { dims[0]=1; dims[1]=height; dims[2]=width; nbdims=3; }
  19396. - if (id==8 || id==9 || id==10) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; }
  19397. - if (id==16 || id==17 || id==18) { dims[0]=3; dims[1]=height; dims[2]=width; dims[3]=colorspace; nbdims=4; }
  19398. - if (id==19 || id==20 || id==21) { dims[0]=3; dims[1]=depth; dims[2]=height; dims[3]=width; dims[4]=colorspace; nbdims=5; }
  19399. - if (id==22 || id==23 || id==25) { dims[0]=dim; dims[1]=width; nbdims=2; }
  19400. - if (id==26 || id==27 || id==29) { dims[0]=dim; dims[1]=height; dims[2]=width; nbdims=3; }
  19401. - if (id==30 || id==31 || id==33) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; }
  19402. - return nbdims;
  19403. - }
  19404. -
  19405. - //! Save the image as a PANDORE-5 file.
  19406. - const CImg& save_pandore(std::FILE *const file, const char *const filename=0, const unsigned int colorspace=0) const {
  19407. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19408. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19409. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19410. - pixel_type(),width,height,depth,dim,data);
  19411. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19412. - unsigned char header[36] = { 'P','A','N','D','O','R','E','0','4',0,0,0,
  19413. - 0,0,0,0,
  19414. - 'C','I','m','g',0,0,0,0,0,
  19415. - 'N','o',' ','d','a','t','e',0,0,0,
  19416. - 0 };
  19417. - unsigned int nbdims,dims[5];
  19418. - bool saved=false;
  19419. - cimg_save_pandore_case(1,1,1,"unsigned char",2);
  19420. - cimg_save_pandore_case(1,1,1,"char",3);
  19421. - cimg_save_pandore_case(1,1,1,"short",3);
  19422. - cimg_save_pandore_case(1,1,1,"unsigned short",3);
  19423. - cimg_save_pandore_case(1,1,1,"unsigned int",3);
  19424. - cimg_save_pandore_case(1,1,1,"int",3);
  19425. - cimg_save_pandore_case(1,1,1,"unsigned long",4);
  19426. - cimg_save_pandore_case(1,1,1,"long",3);
  19427. - cimg_save_pandore_case(1,1,1,"float",4);
  19428. - cimg_save_pandore_case(1,1,1,"double",4);
  19429. -
  19430. - cimg_save_pandore_case(0,1,1,"unsigned char",5);
  19431. - cimg_save_pandore_case(0,1,1,"char",6);
  19432. - cimg_save_pandore_case(0,1,1,"short",6);
  19433. - cimg_save_pandore_case(0,1,1,"unsigned short",6);
  19434. - cimg_save_pandore_case(0,1,1,"unsigned int",6);
  19435. - cimg_save_pandore_case(0,1,1,"int",6);
  19436. - cimg_save_pandore_case(0,1,1,"unsigned long",7);
  19437. - cimg_save_pandore_case(0,1,1,"long",6);
  19438. - cimg_save_pandore_case(0,1,1,"float",7);
  19439. - cimg_save_pandore_case(0,1,1,"double",7);
  19440. -
  19441. - cimg_save_pandore_case(0,0,1,"unsigned char",8);
  19442. - cimg_save_pandore_case(0,0,1,"char",9);
  19443. - cimg_save_pandore_case(0,0,1,"short",9);
  19444. - cimg_save_pandore_case(0,0,1,"unsigned short",9);
  19445. - cimg_save_pandore_case(0,0,1,"unsigned int",9);
  19446. - cimg_save_pandore_case(0,0,1,"int",9);
  19447. - cimg_save_pandore_case(0,0,1,"unsigned long",10);
  19448. - cimg_save_pandore_case(0,0,1,"long",9);
  19449. - cimg_save_pandore_case(0,0,1,"float",10);
  19450. - cimg_save_pandore_case(0,0,1,"double",10);
  19451. -
  19452. - cimg_save_pandore_case(0,1,3,"unsigned char",16);
  19453. - cimg_save_pandore_case(0,1,3,"char",17);
  19454. - cimg_save_pandore_case(0,1,3,"short",17);
  19455. - cimg_save_pandore_case(0,1,3,"unsigned short",17);
  19456. - cimg_save_pandore_case(0,1,3,"unsigned int",17);
  19457. - cimg_save_pandore_case(0,1,3,"int",17);
  19458. - cimg_save_pandore_case(0,1,3,"unsigned long",18);
  19459. - cimg_save_pandore_case(0,1,3,"long",17);
  19460. - cimg_save_pandore_case(0,1,3,"float",18);
  19461. - cimg_save_pandore_case(0,1,3,"double",18);
  19462. -
  19463. - cimg_save_pandore_case(0,0,3,"unsigned char",19);
  19464. - cimg_save_pandore_case(0,0,3,"char",20);
  19465. - cimg_save_pandore_case(0,0,3,"short",20);
  19466. - cimg_save_pandore_case(0,0,3,"unsigned short",20);
  19467. - cimg_save_pandore_case(0,0,3,"unsigned int",20);
  19468. - cimg_save_pandore_case(0,0,3,"int",20);
  19469. - cimg_save_pandore_case(0,0,3,"unsigned long",21);
  19470. - cimg_save_pandore_case(0,0,3,"long",20);
  19471. - cimg_save_pandore_case(0,0,3,"float",21);
  19472. - cimg_save_pandore_case(0,0,3,"double",21);
  19473. -
  19474. - cimg_save_pandore_case(1,1,0,"unsigned char",22);
  19475. - cimg_save_pandore_case(1,1,0,"char",23);
  19476. - cimg_save_pandore_case(1,1,0,"short",23);
  19477. - cimg_save_pandore_case(1,1,0,"unsigned short",23);
  19478. - cimg_save_pandore_case(1,1,0,"unsigned int",23);
  19479. - cimg_save_pandore_case(1,1,0,"int",23);
  19480. - cimg_save_pandore_case(1,1,0,"unsigned long",25);
  19481. - cimg_save_pandore_case(1,1,0,"long",23);
  19482. - cimg_save_pandore_case(1,1,0,"float",25);
  19483. - cimg_save_pandore_case(1,1,0,"double",25);
  19484. -
  19485. - cimg_save_pandore_case(0,1,0,"unsigned char",26);
  19486. - cimg_save_pandore_case(0,1,0,"char",27);
  19487. - cimg_save_pandore_case(0,1,0,"short",27);
  19488. - cimg_save_pandore_case(0,1,0,"unsigned short",27);
  19489. - cimg_save_pandore_case(0,1,0,"unsigned int",27);
  19490. - cimg_save_pandore_case(0,1,0,"int",27);
  19491. - cimg_save_pandore_case(0,1,0,"unsigned long",29);
  19492. - cimg_save_pandore_case(0,1,0,"long",27);
  19493. - cimg_save_pandore_case(0,1,0,"float",29);
  19494. - cimg_save_pandore_case(0,1,0,"double",29);
  19495. -
  19496. - cimg_save_pandore_case(0,0,0,"unsigned char",30);
  19497. - cimg_save_pandore_case(0,0,0,"char",31);
  19498. - cimg_save_pandore_case(0,0,0,"short",31);
  19499. - cimg_save_pandore_case(0,0,0,"unsigned short",31);
  19500. - cimg_save_pandore_case(0,0,0,"unsigned int",31);
  19501. - cimg_save_pandore_case(0,0,0,"int",31);
  19502. - cimg_save_pandore_case(0,0,0,"unsigned long",33);
  19503. - cimg_save_pandore_case(0,0,0,"long",31);
  19504. - cimg_save_pandore_case(0,0,0,"float",33);
  19505. - cimg_save_pandore_case(0,0,0,"double",33);
  19506. -
  19507. - if (!file) cimg::fclose(nfile);
  19508. - return *this;
  19509. - }
  19510. -
  19511. - //! Save the image as a PANDORE-5 file.
  19512. - const CImg& save_pandore(const char *const filename=0, const unsigned int colorspace=0) const {
  19513. - return save_pandore(0,filename,colorspace);
  19514. - }
  19515. -
  19516. - //! Save the image as a YUV video sequence file
  19517. - const CImg& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const {
  19518. - CImgList<T>(*this).save_yuv(file,filename,rgb2yuv);
  19519. - return *this;
  19520. - }
  19521. -
  19522. - //! Save the image as a YUV video sequence file
  19523. - const CImg& save_yuv(const char *const filename, const bool rgb2yuv=true) const {
  19524. - return save_yuv(0,filename,rgb2yuv);
  19525. - }
  19526. -
  19527. - //! Save the image as a BMP file
  19528. - const CImg& save_bmp(std::FILE *const file, const char *const filename=0) const {
  19529. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19530. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19531. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19532. - pixel_type(),width,height,depth,dim,data);
  19533. - cimg::warn(depth>1,
  19534. - "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
  19535. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19536. - cimg::warn(dim>3,
  19537. - "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').",
  19538. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19539. -
  19540. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19541. - unsigned char header[54]={0}, align_buf[4]={0};
  19542. - const unsigned int
  19543. - align = (4-(3*width)%4)%4,
  19544. - buf_size = (3*width+align)*dimy(),
  19545. - file_size = 54+buf_size;
  19546. - header[0] = 'B'; header[1] = 'M';
  19547. - header[0x02]=file_size&0xFF; header[0x03]=(file_size>>8)&0xFF;
  19548. - header[0x04]=(file_size>>16)&0xFF; header[0x05]=(file_size>>24)&0xFF;
  19549. - header[0x0A]=0x36;
  19550. - header[0x0E]=0x28;
  19551. - header[0x12]=width&0xFF; header[0x13]=(width>>8)&0xFF;
  19552. - header[0x14]=(width>>16)&0xFF; header[0x15]=(width>>24)&0xFF;
  19553. - header[0x16]=height&0xFF; header[0x17]=(height>>8)&0xFF;
  19554. - header[0x18]=(height>>16)&0xFF; header[0x19]=(height>>24)&0xFF;
  19555. - header[0x1A]=1; header[0x1B]=0;
  19556. - header[0x1C]=24; header[0x1D]=0;
  19557. - header[0x22]=buf_size&0xFF; header[0x23]=(buf_size>>8)&0xFF;
  19558. - header[0x24]=(buf_size>>16)&0xFF; header[0x25]=(buf_size>>24)&0xFF;
  19559. - header[0x27]=0x1; header[0x2B]=0x1;
  19560. - cimg::fwrite(header,54,nfile);
  19561. -
  19562. - const T
  19563. - *pR = ptr(0,height-1,0,0),
  19564. - *pG = (dim>=2)?ptr(0,height-1,0,1):pR,
  19565. - *pB = (dim>=3)?ptr(0,height-1,0,2):pR;
  19566. -
  19567. - cimg_forY(*this,y) {
  19568. - cimg_forX(*this,x) {
  19569. - std::fputc((unsigned char)(*(pB++)),nfile);
  19570. - std::fputc((unsigned char)(*(pG++)),nfile);
  19571. - std::fputc((unsigned char)(*(pR++)),nfile);
  19572. - }
  19573. - cimg::fwrite(align_buf,align,nfile);
  19574. - pR-=2*width; pG-=2*width; pB-=2*width;
  19575. - }
  19576. - if (!file) cimg::fclose(nfile);
  19577. - return *this;
  19578. - }
  19579. -
  19580. - //! Save the image as a BMP file
  19581. - const CImg& save_bmp(const char *const filename) const {
  19582. - return save_bmp(0,filename);
  19583. - }
  19584. -
  19585. - //! Save an image to a PNG file.
  19586. - // Most of this function has been written by Eric Fausett
  19587. - /**
  19588. - \param filename = name of the png image file to save
  19589. - \return *this
  19590. - \note The png format specifies a variety of possible data formats. Grey scale, Grey
  19591. - scale with Alpha, RGB color, RGB color with Alpha, and Palletized color are supported.
  19592. - Per channel bit depths of 1, 2, 4, 8, and 16 are natively supported. The
  19593. - type of file saved depends on the number of channels in the CImg file. If there is 4 or more
  19594. - channels, the image will be saved as an RGB color with Alpha image using the bottom 4 channels.
  19595. - If there are 3 channels, the saved image will be an RGB color image. If 2 channels then the
  19596. - image saved will be Grey scale with Alpha, and if 1 channel will be saved as a Grey scale
  19597. - image.
  19598. - **/
  19599. - const CImg& save_png(std::FILE *const file, const char *const filename=0) const {
  19600. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19601. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19602. - if (!filename) throw CImgArgumentException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19603. - pixel_type(),width,height,depth,dim,data);
  19604. - cimg::warn(depth>1,
  19605. - "CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
  19606. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19607. -#ifndef cimg_use_png
  19608. - if (!file) return save_other(filename);
  19609. - else throw CImgIOException("CImg<%s>::save_png() : Cannot save a PNG image in a *FILE output. Use libpng instead.",
  19610. - pixel_type());
  19611. -#else
  19612. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19613. -
  19614. - // Setup PNG structures for write
  19615. - png_voidp user_error_ptr=0;
  19616. - png_error_ptr user_error_fn=0, user_warning_fn=0;
  19617. - png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
  19618. - user_error_ptr, user_error_fn, user_warning_fn);
  19619. - if(!png_ptr){
  19620. - if (!file) cimg::fclose(nfile);
  19621. - throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'png_ptr' data structure.",
  19622. - pixel_type(),filename?filename:"(unknown)");
  19623. - }
  19624. - png_infop info_ptr = png_create_info_struct(png_ptr);
  19625. - if(!info_ptr){
  19626. - png_destroy_write_struct(&png_ptr,(png_infopp)0);
  19627. - if (!file) cimg::fclose(nfile);
  19628. - throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'info_ptr' data structure.",
  19629. - pixel_type(),filename?filename:"(unknown)");
  19630. - }
  19631. - if (setjmp(png_jmpbuf(png_ptr))){
  19632. - png_destroy_write_struct(&png_ptr, &info_ptr);
  19633. - if (!file) cimg::fclose(nfile);
  19634. - throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.",
  19635. - pixel_type(),filename?filename:"(unknown)");
  19636. - }
  19637. -
  19638. - png_init_io(png_ptr, nfile);
  19639. - png_uint_32 width = dimx();
  19640. - png_uint_32 height = dimy();
  19641. - const CImgStats stats(*this,false);
  19642. - const float vmin = (float)stats.min, vmax = (float)stats.max;
  19643. - const int bit_depth = (vmin<0 || vmax>=256)?16:8;
  19644. - int color_type;
  19645. - switch (dimv()) {
  19646. - case 1: color_type = PNG_COLOR_TYPE_GRAY; break;
  19647. - case 2: color_type = PNG_COLOR_TYPE_GRAY_ALPHA; break;
  19648. - case 3: color_type = PNG_COLOR_TYPE_RGB; break;
  19649. - default: color_type = PNG_COLOR_TYPE_RGB_ALPHA;
  19650. - }
  19651. - const int interlace_type = PNG_INTERLACE_NONE;
  19652. - const int compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
  19653. - const int filter_method = PNG_FILTER_TYPE_DEFAULT;
  19654. - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type,
  19655. - compression_type, filter_method);
  19656. - png_write_info(png_ptr, info_ptr);
  19657. - const int byte_depth = bit_depth>>3;
  19658. - const int numChan = dimv()>4?4:dimv();
  19659. - const int pixel_bit_depth_flag = numChan * (bit_depth-1);
  19660. -
  19661. - // Allocate Memory for Image Save and Fill pixel data
  19662. - png_bytep *imgData = new png_byte*[height];
  19663. - for(unsigned int row=0; row<height; row++) imgData[row] = new png_byte[byte_depth * numChan * width];
  19664. - const T *pC0 = ptr(0,0,0,0);
  19665. - switch(pixel_bit_depth_flag) {
  19666. - case 7 : { // Gray 8-bit
  19667. - cimg_forY(*this,y) {
  19668. - unsigned char *ptrs = imgData[y];
  19669. - cimg_forX(*this,x) *(ptrs++) = (unsigned char)*(pC0++);
  19670. - }
  19671. - } break;
  19672. - case 14: { // Gray w/ Alpha 8-bit
  19673. - const T *pC1 = ptr(0,0,0,1);
  19674. - cimg_forY(*this,y) {
  19675. - unsigned char *ptrs = imgData[y];
  19676. - cimg_forX(*this,x) {
  19677. - *(ptrs++) = (unsigned char)*(pC0++);
  19678. - *(ptrs++) = (unsigned char)*(pC1++);
  19679. - }
  19680. - }
  19681. - } break;
  19682. - case 21: { // RGB 8-bit
  19683. - const T *pC1 = ptr(0,0,0,1);
  19684. - const T *pC2 = ptr(0,0,0,2);
  19685. - cimg_forY(*this,y) {
  19686. - unsigned char *ptrs = imgData[y];
  19687. - cimg_forX(*this,x) {
  19688. - *(ptrs++) = (unsigned char)*(pC0++);
  19689. - *(ptrs++) = (unsigned char)*(pC1++);
  19690. - *(ptrs++) = (unsigned char)*(pC2++);
  19691. - }
  19692. - }
  19693. - } break;
  19694. - case 28: { // RGB x/ Alpha 8-bit
  19695. - const T *pC1 = ptr(0,0,0,1);
  19696. - const T *pC2 = ptr(0,0,0,2);
  19697. - const T *pC3 = ptr(0,0,0,3);
  19698. - cimg_forY(*this,y){
  19699. - unsigned char *ptrs = imgData[y];
  19700. - cimg_forX(*this,x){
  19701. - *(ptrs++) = (unsigned char)*(pC0++);
  19702. - *(ptrs++) = (unsigned char)*(pC1++);
  19703. - *(ptrs++) = (unsigned char)*(pC2++);
  19704. - *(ptrs++) = (unsigned char)*(pC3++);
  19705. - }
  19706. - }
  19707. - } break;
  19708. - case 15: { // Gray 16-bit
  19709. - cimg_forY(*this,y){
  19710. - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
  19711. - cimg_forX(*this,x) *(ptrs++) = (unsigned short)*(pC0++);
  19712. - }
  19713. - } break;
  19714. - case 30: { // Gray w/ Alpha 16-bit
  19715. - const T *pC1 = ptr(0,0,0,1);
  19716. - cimg_forY(*this,y){
  19717. - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
  19718. - cimg_forX(*this,x) {
  19719. - *(ptrs++) = (unsigned short)*(pC0++);
  19720. - *(ptrs++) = (unsigned short)*(pC1++);
  19721. - }
  19722. - }
  19723. - } break;
  19724. - case 45: { // RGB 16-bit
  19725. - const T *pC1 = ptr(0,0,0,1);
  19726. - const T *pC2 = ptr(0,0,0,2);
  19727. - cimg_forY(*this,y) {
  19728. - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
  19729. - cimg_forX(*this,x) {
  19730. - *(ptrs++) = (unsigned short)*(pC0++);
  19731. - *(ptrs++) = (unsigned short)*(pC1++);
  19732. - *(ptrs++) = (unsigned short)*(pC2++);
  19733. - }
  19734. - }
  19735. - } break;
  19736. - case 60: { // RGB w/ Alpha 16-bit
  19737. - const T *pC1 = ptr(0,0,0,1);
  19738. - const T *pC2 = ptr(0,0,0,2);
  19739. - const T *pC3 = ptr(0,0,0,3);
  19740. - cimg_forY(*this,y) {
  19741. - unsigned short *ptrs = reinterpret_cast<unsigned short*>(imgData[y]);
  19742. - cimg_forX(*this,x) {
  19743. - *(ptrs++) = (unsigned short)*(pC0++);
  19744. - *(ptrs++) = (unsigned short)*(pC1++);
  19745. - *(ptrs++) = (unsigned short)*(pC2++);
  19746. - *(ptrs++) = (unsigned short)*(pC3++);
  19747. - }
  19748. - }
  19749. - } break;
  19750. - default:
  19751. - if (!file) cimg::fclose(nfile);
  19752. - throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.",
  19753. - pixel_type(),filename?filename:"(unknown)");
  19754. - break;
  19755. - }
  19756. - png_write_image(png_ptr, imgData);
  19757. - png_write_end(png_ptr, info_ptr);
  19758. - png_destroy_write_struct(&png_ptr, &info_ptr);
  19759. -
  19760. - // Deallocate Image Write Memory
  19761. - for (unsigned int n=0; n<height; n++) delete[] imgData[n];
  19762. - delete[] imgData;
  19763. - if (!file) cimg::fclose(nfile);
  19764. - return *this;
  19765. -#endif
  19766. - }
  19767. -
  19768. - //! Save a file in PNG format
  19769. - const CImg& save_png(const char *const filename) const {
  19770. - return save_png(0,filename);
  19771. - }
  19772. -
  19773. - //! Save a file in TIFF format.
  19774. - const CImg& save_tiff(const char *const filename) const {
  19775. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_tiff() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19776. - pixel_type(),width,height,depth,dim,data,filename);
  19777. - if (!filename) throw CImgArgumentException("CImg<%s>::save_tiff() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19778. - pixel_type(),width,height,depth,dim,data);
  19779. -#ifdef cimg_use_tiff
  19780. - uint32 rowsperstrip = (uint32) -1;
  19781. - uint16 spp = dimv(), bpp = sizeof(T)*8;
  19782. - uint16 photometric;
  19783. - if (spp==3 || spp==4)
  19784. - photometric = PHOTOMETRIC_RGB;
  19785. - else
  19786. - photometric = PHOTOMETRIC_MINISBLACK;
  19787. - uint16 compression = COMPRESSION_NONE;
  19788. - TIFF *out;
  19789. - out = TIFFOpen(filename,"w");
  19790. - if (out) {
  19791. - for (unsigned int dir=0; dir<depth; dir++) {
  19792. - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32)dimx());
  19793. - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32)dimy());
  19794. - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
  19795. - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp);
  19796. - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bpp);
  19797. - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
  19798. - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
  19799. - TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
  19800. - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
  19801. - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
  19802. - TIFFSetField(out, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
  19803. - TIFFSetField(out, TIFFTAG_SOFTWARE, "CImg");
  19804. - T *buf = (T *)_TIFFmalloc(TIFFStripSize(out));
  19805. - if (buf){
  19806. - for (unsigned int row = 0; row < height; row+=rowsperstrip) {
  19807. - uint32 nrow = (row+rowsperstrip>height?height-row:rowsperstrip);
  19808. - tstrip_t strip = TIFFComputeStrip(out, row, 0);
  19809. - tsize_t i = 0;
  19810. - for (unsigned int rr=0; rr<nrow; rr++)
  19811. - for (unsigned int cc=0;cc<width;cc++)
  19812. - for (unsigned int vv=0;vv<spp;vv++)
  19813. - buf[i++] = (*this)(cc,row+rr,dir,vv);
  19814. - if(TIFFWriteEncodedStrip(out, strip, buf, i*sizeof(T))<0){
  19815. - throw CImgException("CImg<%s>::get_save_tiff() : File '%s', an error occure while writing a strip.",
  19816. - pixel_type(),filename?filename:"(FILE*)");
  19817. - }
  19818. - }
  19819. - _TIFFfree(buf);
  19820. - }
  19821. - TIFFWriteDirectory(out);
  19822. - }
  19823. - TIFFClose(out);
  19824. - }
  19825. - else throw CImgException("CImg<%s>::save_tiff() : File '%s', error while writing tiff file.",
  19826. - pixel_type(),filename);
  19827. -#else
  19828. - return save_other(filename);
  19829. -#endif
  19830. - return *this;
  19831. - }
  19832. -
  19833. - //! Save a file in JPEG format.
  19834. - const CImg<T>& save_jpeg(std::FILE *const file, const char *const filename=0, const unsigned int quality=100) const {
  19835. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19836. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19837. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).",
  19838. - pixel_type(),width,height,depth,dim,data);
  19839. - cimg::warn(depth>1,
  19840. - "CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').",
  19841. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19842. -#ifndef cimg_use_jpeg
  19843. - if (!file) return save_other(filename,quality);
  19844. - else throw CImgIOException("CImg<%s>::save_jpeg() : Cannot save a JPEG image in a *FILE output. Use libjpeg instead.",
  19845. - pixel_type());
  19846. -#else
  19847. -
  19848. - // Fill pixel buffer
  19849. - unsigned char *buf;
  19850. - unsigned int dimbuf=0;
  19851. - J_COLOR_SPACE colortype=JCS_RGB;
  19852. - switch (dim) {
  19853. - case 1: { // Greyscale images
  19854. - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=1)];
  19855. - colortype = JCS_GRAYSCALE;
  19856. - const T *ptr_g = ptr();
  19857. - cimg_forXY(*this,x,y) *(buf2++) = (unsigned char)*(ptr_g++);
  19858. - } break;
  19859. - case 2:
  19860. - case 3: { // RGB images
  19861. - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=3)];
  19862. - const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,dim>2?2:0);
  19863. - colortype = JCS_RGB;
  19864. - cimg_forXY(*this,x,y) {
  19865. - *(buf2++) = (unsigned char)*(ptr_r++);
  19866. - *(buf2++) = (unsigned char)*(ptr_g++);
  19867. - *(buf2++) = (unsigned char)*(ptr_b++);
  19868. - }
  19869. - } break;
  19870. - default: { // YCMYK images
  19871. - unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=4)];
  19872. - const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,2), *ptr_a = ptr(0,0,0,3);
  19873. - colortype = JCS_CMYK;
  19874. - cimg_forXY(*this,x,y) {
  19875. - *(buf2++) = (unsigned char)*(ptr_r++);
  19876. - *(buf2++) = (unsigned char)*(ptr_g++);
  19877. - *(buf2++) = (unsigned char)*(ptr_b++);
  19878. - *(buf2++) = (unsigned char)*(ptr_a++);
  19879. - }
  19880. - } break;
  19881. - }
  19882. -
  19883. - // Call libjpeg functions
  19884. - struct jpeg_compress_struct cinfo;
  19885. - struct jpeg_error_mgr jerr;
  19886. - cinfo.err = jpeg_std_error(&jerr);
  19887. - jpeg_create_compress(&cinfo);
  19888. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19889. - jpeg_stdio_dest(&cinfo,nfile);
  19890. - cinfo.image_width = width;
  19891. - cinfo.image_height = height;
  19892. - cinfo.input_components = dimbuf;
  19893. - cinfo.in_color_space = colortype;
  19894. - jpeg_set_defaults(&cinfo);
  19895. - jpeg_set_quality(&cinfo,quality<100?quality:100,TRUE);
  19896. - jpeg_start_compress(&cinfo,TRUE);
  19897. -
  19898. - const unsigned int row_stride = width*dimbuf;
  19899. - JSAMPROW row_pointer[1];
  19900. - while (cinfo.next_scanline < cinfo.image_height) {
  19901. - row_pointer[0] = &buf[cinfo.next_scanline*row_stride];
  19902. - jpeg_write_scanlines(&cinfo,row_pointer,1);
  19903. - }
  19904. - jpeg_finish_compress(&cinfo);
  19905. -
  19906. - delete[] buf;
  19907. - if (!file) cimg::fclose(nfile);
  19908. - jpeg_destroy_compress(&cinfo);
  19909. - return *this;
  19910. -#endif
  19911. - }
  19912. -
  19913. - //! Save a file in JPEG format.
  19914. - const CImg<T>& save_jpeg(const char *const filename, const unsigned int quality=100) const {
  19915. - return save_jpeg(0,filename,quality);
  19916. - }
  19917. -
  19918. - //! Save the image using built-in ImageMagick++ library
  19919. - const CImg& save_magick(const char *const filename) const {
  19920. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19921. - pixel_type(),width,height,depth,dim,data);
  19922. - if (!filename) throw CImgArgumentException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19923. - pixel_type(),width,height,depth,dim,data);
  19924. -#ifdef cimg_use_magick
  19925. - Magick::Image image(Magick::Geometry(width,height),"black");
  19926. - image.type(Magick::TrueColorType);
  19927. - const T *rdata = ptr(0,0,0,0), *gdata = dim>1?ptr(0,0,0,1):rdata, *bdata = dim>2?ptr(0,0,0,2):gdata;
  19928. - cimg_forXY(*this,x,y) image.pixelColor(x,y,Magick::ColorRGB(*(rdata++)/255.0,*(gdata++)/255.0,*(bdata++)/255.0));
  19929. - image.syncPixels();
  19930. - image.write(filename);
  19931. -#else
  19932. - throw CImgIOException("CImg<%s>::save_magick() : File '%s', Magick++ library has not been linked.",
  19933. - pixel_type(),filename);
  19934. -#endif
  19935. - return *this;
  19936. - }
  19937. -
  19938. - //! Save the image as a RGBA file
  19939. - const CImg& save_rgba(std::FILE *const file, const char *const filename=0) const {
  19940. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19941. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19942. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19943. - pixel_type(),width,height,depth,dim,data);
  19944. - cimg::warn(dim!=4,
  19945. - "CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) has not exactly 4 channels (file '%s').",
  19946. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19947. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19948. - const unsigned int wh = width*height;
  19949. - unsigned char *buffer = new unsigned char[4*wh], *nbuffer=buffer;
  19950. - const T
  19951. - *ptr1 = ptr(0,0,0,0),
  19952. - *ptr2 = dim>1?ptr(0,0,0,1):ptr1,
  19953. - *ptr3 = dim>2?ptr(0,0,0,2):ptr1,
  19954. - *ptr4 = dim>3?ptr(0,0,0,3):0;
  19955. - for (unsigned int k=0; k<wh; k++) {
  19956. - *(nbuffer++) = (unsigned char)(*(ptr1++));
  19957. - *(nbuffer++) = (unsigned char)(*(ptr2++));
  19958. - *(nbuffer++) = (unsigned char)(*(ptr3++));
  19959. - *(nbuffer++) = (unsigned char)(ptr4?(*(ptr4++)):255);
  19960. - }
  19961. - cimg::fwrite(buffer,4*wh,nfile);
  19962. - if (!file) cimg::fclose(nfile);
  19963. - delete[] buffer;
  19964. - return *this;
  19965. - }
  19966. -
  19967. - //! Save the image as a RGBA file
  19968. - const CImg& save_rgba(const char *const filename) const {
  19969. - return save_rgba(0,filename);
  19970. - }
  19971. -
  19972. - //! Save the image as a RGB file
  19973. - const CImg& save_rgb(std::FILE *const file, const char *const filename=0) const {
  19974. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  19975. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19976. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p), specified file is (null).",
  19977. - pixel_type(),width,height,depth,dim,data);
  19978. - cimg::warn(dim!=3,
  19979. - "CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p) has not exactly 3 channels (file '%s').",
  19980. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  19981. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  19982. - const unsigned int wh = width*height;
  19983. - unsigned char *buffer = new unsigned char[3*wh], *nbuffer=buffer;
  19984. - const T
  19985. - *ptr1 = ptr(0,0,0,0),
  19986. - *ptr2 = dim>1?ptr(0,0,0,1):ptr1,
  19987. - *ptr3 = dim>2?ptr(0,0,0,2):ptr1;
  19988. - for (unsigned int k=0; k<wh; k++) {
  19989. - *(nbuffer++) = (unsigned char)(*(ptr1++));
  19990. - *(nbuffer++) = (unsigned char)(*(ptr2++));
  19991. - *(nbuffer++) = (unsigned char)(*(ptr3++));
  19992. - }
  19993. - cimg::fwrite(buffer,3*wh,nfile);
  19994. - if (!file) cimg::fclose(nfile);
  19995. - delete[] buffer;
  19996. - return *this;
  19997. - }
  19998. -
  19999. - //! Save the image as a RGB file
  20000. - const CImg& save_rgb(const char *const filename) const {
  20001. - return save_rgb(0,filename);
  20002. - }
  20003. -
  20004. - //! Get a 40x38 color logo of a 'danger' item
  20005. - static CImg get_logo40x38() {
  20006. - static bool first_time = true;
  20007. - static CImg<T> res(40,38,1,3);
  20008. - if (first_time) {
  20009. - const unsigned char *ptrs = cimg::logo40x38;
  20010. - T *ptr1 = res.ptr(0,0,0,0), *ptr2 = res.ptr(0,0,0,1), *ptr3 = res.ptr(0,0,0,2);
  20011. - for (unsigned int off = 0; off<res.width*res.height;) {
  20012. - const unsigned char n = *(ptrs++), r = *(ptrs++), g = *(ptrs++), b = *(ptrs++);
  20013. - for (unsigned int l=0; l<n; off++,l++) { *(ptr1++) = (T)r; *(ptr2++) = (T)g; *(ptr3++) = (T)b; }
  20014. - }
  20015. - first_time = false;
  20016. - }
  20017. - return res;
  20018. - }
  20019. -
  20020. - //! Save OFF files (GeomView 3D object files)
  20021. - template<typename tf, typename tc>
  20022. - const CImg& save_off(std::FILE *const file, const char *const filename,
  20023. - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
  20024. - if (is_empty()) throw CImgInstanceException("CImg<%s>::save_off() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').",
  20025. - pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)");
  20026. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_off() : Specified filename is (null).",pixel_type());
  20027. - std::FILE *const nfile = file?file:cimg::fopen(filename,"w");
  20028. - std::fprintf(nfile,"OFF\n%u %u %u\n",width,primitives.size,3*primitives.size);
  20029. - cimg_forX(*this,i) std::fprintf(nfile,"%f %f %f\n",(float)((*this)(i,0)),(float)((*this)(i,1)),(float)((*this)(i,2)));
  20030. - cimglist_for(primitives,l) {
  20031. - const unsigned int prim = primitives[l].size();
  20032. - switch (prim) {
  20033. - case 3: {
  20034. - if (invert_faces)
  20035. - std::fprintf(nfile,"3 %u %u %u %f %f %f\n",
  20036. - (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2),
  20037. - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
  20038. - else
  20039. - std::fprintf(nfile,"3 %u %u %u %f %f %f\n",
  20040. - (unsigned int)primitives(l,0),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1),
  20041. - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
  20042. - } break;
  20043. - case 4: {
  20044. - if (invert_faces)
  20045. - std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n",
  20046. - (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2),(unsigned int)primitives(l,3),
  20047. - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
  20048. - else
  20049. - std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n",
  20050. - (unsigned int)primitives(l,0),(unsigned int)primitives(l,3),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1),
  20051. - (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f));
  20052. - } break;
  20053. - }
  20054. - }
  20055. - if (!file) cimg::fclose(nfile);
  20056. - return *this;
  20057. - }
  20058. -
  20059. - //! Save OFF files (GeomView 3D object files)
  20060. - template<typename tf, typename tc>
  20061. - const CImg& save_off(const char *const filename,
  20062. - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
  20063. - return save_off(filename,primitives,colors,invert_faces);
  20064. - }
  20065. -
  20066. - };
  20067. -
  20068. -
  20069. - /*
  20070. - #-----------------------------------------
  20071. - #
  20072. - #
  20073. - #
  20074. - # Definition of the CImgList<> structure
  20075. - #
  20076. - #
  20077. - #
  20078. - #------------------------------------------
  20079. - */
  20080. -
  20081. - //! Class representing list of images CImg<T>.
  20082. - template<typename T> struct CImgList {
  20083. -
  20084. - //! Size of the list (number of elements inside)
  20085. - unsigned int size;
  20086. -
  20087. - //! Allocation size of the list
  20088. - unsigned int allocsize;
  20089. -
  20090. - //! Pointer to the first list element
  20091. - CImg<T> *data;
  20092. -
  20093. - //! Define a CImgList<T>::iterator
  20094. - typedef CImg<T>* iterator;
  20095. -
  20096. - //! Define a CImgList<T>::const_iterator
  20097. - typedef const CImg<T>* const_iterator;
  20098. -
  20099. - //! Get value type
  20100. - typedef T value_type;
  20101. -
  20102. - //@}
  20103. - //---------------------------
  20104. - //
  20105. - //! \name Plugins
  20106. - //@{
  20107. - //---------------------------
  20108. -#ifdef cimglist_plugin
  20109. -#include cimglist_plugin
  20110. -#endif
  20111. - //@}
  20112. -
  20113. - //------------------------------------------
  20114. - //
  20115. - //! \name Constructors - Destructor - Copy
  20116. - //@{
  20117. - //------------------------------------------
  20118. -
  20119. - //! Default constructor
  20120. - CImgList():
  20121. - size(0),allocsize(0),data(0) {}
  20122. -
  20123. - //! Destructor
  20124. - ~CImgList() {
  20125. - if (data) delete[] data;
  20126. - }
  20127. -
  20128. - //! In-place version of the default constructor and default destructor
  20129. - CImgList& assign() {
  20130. - if (data) delete[] data;
  20131. - size = allocsize = 0;
  20132. - data = 0;
  20133. - return *this;
  20134. - }
  20135. -
  20136. - //! Equivalent to assign() (STL-compliant name)
  20137. - CImgList& clear() {
  20138. - return assign();
  20139. - }
  20140. -
  20141. - //! Copy constructor
  20142. - template<typename t> CImgList(const CImgList<t>& list):
  20143. - size(0),allocsize(0),data(0) {
  20144. - assign(list);
  20145. - }
  20146. -
  20147. - CImgList(const CImgList& list):
  20148. - size(0),allocsize(0),data(0) {
  20149. - assign(list);
  20150. - }
  20151. -
  20152. - //! Copy constructor that create a shared object
  20153. - template<typename t> CImgList(const CImgList<t>& list, const bool shared):
  20154. - size(0),allocsize(0),data(0) {
  20155. - assign(list,shared);
  20156. - }
  20157. -
  20158. - CImgList(const CImgList& list, const bool shared):
  20159. - size(0),allocsize(0),data(0) {
  20160. - assign(list,shared);
  20161. - }
  20162. -
  20163. - //! In-place version of the copy constructor
  20164. - template<typename t> CImgList& assign(const CImgList<t>& list, const bool shared=false) {
  20165. - assign(list.size);
  20166. - cimglist_for(*this,l) (*this)[l].assign(list[l],shared);
  20167. - return *this;
  20168. - }
  20169. -
  20170. - //! Construct an image list containing n empty images
  20171. - explicit CImgList(const unsigned int n):
  20172. - size(n) {
  20173. - data = new CImg<T>[allocsize=cimg::nearest_pow2(n)];
  20174. - }
  20175. -
  20176. - //! In-place version of the previous constructor
  20177. - CImgList& assign(const unsigned int n) {
  20178. - if (n) {
  20179. - if (allocsize<n || allocsize>(n<<2)) {
  20180. - if (data) delete[] data;
  20181. - data = new CImg<T>[allocsize=cimg::nearest_pow2(n)];
  20182. - }
  20183. - size = n;
  20184. - } else return assign();
  20185. - return *this;
  20186. - }
  20187. -
  20188. - //! Construct an image list containing n images with specified size
  20189. - CImgList(const unsigned int n, const unsigned int width, const unsigned int height=1,
  20190. - const unsigned int depth=1, const unsigned int dim=1):
  20191. - size(0),allocsize(0),data(0) {
  20192. - assign(n,width,height,depth,dim);
  20193. - }
  20194. -
  20195. - //! In-place version of the previous constructor
  20196. - CImgList& assign(const unsigned int n, const unsigned int width, const unsigned int height=1,
  20197. - const unsigned int depth=1, const unsigned int dim=1) {
  20198. - const unsigned int siz = width*height*depth*dim;
  20199. - if (n && siz) { assign(n); cimglist_for(*this,l) data[l].assign(width,height,depth,dim); }
  20200. - else return assign();
  20201. - return *this;
  20202. - }
  20203. -
  20204. - //! Construct an image list containing n images with specified size, filled with val
  20205. - CImgList(const unsigned int n, const unsigned int width, const unsigned int height,
  20206. - const unsigned int depth, const unsigned int dim, const T& val):
  20207. - size(0),allocsize(0),data(0) {
  20208. - assign(n,width,height,depth,dim,val);
  20209. - }
  20210. -
  20211. - //! In-place version of the previous constructor
  20212. - CImgList& assign(const unsigned int n,const unsigned int width,const unsigned int height,
  20213. - const unsigned int depth, const unsigned int dim,const T& val) {
  20214. - assign(n,width,height,depth,dim);
  20215. - cimglist_for(*this,l) data[l].fill(val);
  20216. - return *this;
  20217. - }
  20218. -
  20219. - //! Construct a list containing n copies of the image img
  20220. - template<typename t> CImgList(const unsigned int n, const CImg<t>& img, const bool shared=false):
  20221. - size(0),allocsize(0),data(0) {
  20222. - assign(n,img,shared);
  20223. - }
  20224. -
  20225. - //! In-place version of the previous constructor
  20226. - template<typename t> CImgList& assign(const unsigned int n, const CImg<t>& img, const bool shared=false) {
  20227. - assign(n);
  20228. - cimglist_for(*this,l) data[l].assign(img,shared);
  20229. - return *this;
  20230. - }
  20231. -
  20232. - //! Construct an image list from one image
  20233. - template<typename t> explicit CImgList(const CImg<t>& img, const bool shared=false):
  20234. - size(0),allocsize(0),data(0) {
  20235. - assign(img,shared);
  20236. - }
  20237. -
  20238. - //! In-place version of the previous constructor
  20239. - template<typename t> CImgList& assign(const CImg<t>& img, const bool shared=false) {
  20240. - return assign(1,img,shared);
  20241. - }
  20242. -
  20243. - //! Construct an image list from two images
  20244. - template<typename t1, typename t2> CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const bool shared=false):
  20245. - size(0),allocsize(0),data(0) {
  20246. - assign(img1,img2,shared);
  20247. - }
  20248. -
  20249. - //! In-place version of the previous constructor
  20250. - template<typename t1, typename t2> CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const bool shared=false) {
  20251. - assign(2);
  20252. - data[0].assign(img1,shared); data[1].assign(img2,shared);
  20253. - return *this;
  20254. - }
  20255. -
  20256. - //! Construct an image list from three images
  20257. - template<typename t1, typename t2, typename t3> CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const bool shared=false):
  20258. - size(0),allocsize(0),data(0) {
  20259. - assign(img1,img2,img3,shared);
  20260. - }
  20261. -
  20262. - //! In-place version of the previous constructor
  20263. - template<typename t1, typename t2, typename t3> CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const bool shared=false) {
  20264. - assign(3);
  20265. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared);
  20266. - return *this;
  20267. - }
  20268. -
  20269. - //! Construct an image list from four images
  20270. - template<typename t1, typename t2, typename t3, typename t4>
  20271. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const bool shared=false):
  20272. - size(0),allocsize(0),data(0) {
  20273. - assign(img1,img2,img3,img4,shared);
  20274. - }
  20275. -
  20276. - //! In-place version of the previous constructor
  20277. - template<typename t1, typename t2, typename t3, typename t4>
  20278. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const bool shared=false) {
  20279. - assign(4);
  20280. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20281. - return *this;
  20282. - }
  20283. -
  20284. - //! Construct an image list from five images
  20285. - template<typename t1, typename t2, typename t3, typename t4, typename t5>
  20286. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5, const bool shared=false):
  20287. - size(0),allocsize(0),data(0) {
  20288. - assign(img1,img2,img3,img4,img5,shared);
  20289. - }
  20290. -
  20291. - //! In-place version of the previous constructor
  20292. - template<typename t1, typename t2, typename t3, typename t4, typename t5>
  20293. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20294. - const bool shared=false) {
  20295. - assign(5);
  20296. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20297. - data[4].assign(img5,shared);
  20298. - return *this;
  20299. - }
  20300. -
  20301. - //! Construct an image list from six images
  20302. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6>
  20303. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20304. - const CImg<t6>& img6, const bool shared=false):
  20305. - size(0),allocsize(0),data(0) {
  20306. - assign(img1,img2,img3,img4,img5,img6,shared);
  20307. - }
  20308. -
  20309. - //! In-place version of the previous constructor
  20310. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6>
  20311. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20312. - const CImg<t6>& img6, const bool shared=false) {
  20313. - assign(6);
  20314. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20315. - data[4].assign(img5,shared); data[5].assign(img6,shared);
  20316. - return *this;
  20317. - }
  20318. -
  20319. - //! Construct an image list from seven images
  20320. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7>
  20321. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20322. - const CImg<t6>& img6, const CImg<t7>& img7, const bool shared=false):
  20323. - size(0),allocsize(0),data(0) {
  20324. - assign(img1,img2,img3,img4,img5,img6,img7,shared);
  20325. - }
  20326. -
  20327. - //! In-place version of the previous constructor
  20328. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7>
  20329. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20330. - const CImg<t6>& img6, const CImg<t7>& img7, const bool shared=false) {
  20331. - assign(7);
  20332. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20333. - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared);
  20334. - return *this;
  20335. - }
  20336. -
  20337. - //! Construct an image list from eight images
  20338. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8>
  20339. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20340. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const bool shared=false):
  20341. - size(0),allocsize(0),data(0) {
  20342. - assign(img1,img2,img3,img4,img5,img6,img7,img8,shared);
  20343. - }
  20344. -
  20345. - //! In-place version of the previous constructor
  20346. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8>
  20347. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20348. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const bool shared=false) {
  20349. - assign(8);
  20350. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20351. - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
  20352. - return *this;
  20353. - }
  20354. -
  20355. - //! Construct an image list from nine images
  20356. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
  20357. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20358. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const bool shared=false):
  20359. - size(0),allocsize(0),data(0) {
  20360. - assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,shared);
  20361. - }
  20362. -
  20363. - //! In-place version of the previous constructor
  20364. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
  20365. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20366. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const bool shared=false) {
  20367. - assign(9);
  20368. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20369. - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
  20370. - data[8].assign(img9,shared);
  20371. - return *this;
  20372. - }
  20373. -
  20374. - //! Construct an image list from ten images
  20375. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
  20376. - CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20377. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const CImg<t10>& img10,
  20378. - const bool shared=false):
  20379. - size(0),allocsize(0),data(0) {
  20380. - assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10,shared);
  20381. - }
  20382. -
  20383. - //! In-place version of the previous constructor
  20384. - template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
  20385. - CImgList& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5,
  20386. - const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, const CImg<t9>& img9, const CImg<t10>& img10,
  20387. - const bool shared=false) {
  20388. - assign(10);
  20389. - data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared);
  20390. - data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared);
  20391. - data[8].assign(img9,shared); data[9].assign(img10,shared);
  20392. - return *this;
  20393. - }
  20394. -
  20395. - //! Construct an image list from a filename
  20396. - CImgList(const char *const filename):
  20397. - size(0),allocsize(0),data(0) {
  20398. - assign(filename);
  20399. - }
  20400. -
  20401. - //! In-place version of the previous constructor
  20402. - CImgList& assign(const char *const filename) {
  20403. - return load(filename);
  20404. - }
  20405. -
  20406. - //! Return a string describing the type of the image pixels in the list (template parameter \p T).
  20407. - static const char* pixel_type() {
  20408. - return cimg::type<T>::id();
  20409. - }
  20410. -
  20411. - //! Return \p true if list is empty
  20412. - bool is_empty() const {
  20413. - return (!data || !size);
  20414. - }
  20415. -
  20416. - //! Return \c true if the list contains an image with indice k
  20417. - bool contains(const int k) const {
  20418. - return data && k<size;
  20419. - }
  20420. -
  20421. - //! Return \c true if the k-th image of the list contains the pixel (x,y,z,v)
  20422. - bool contains(const int k, const int x, const int y=0, const int z=0, const int v=0) const {
  20423. - return contains(k) && data[k].contains(x,y,z,v);
  20424. - }
  20425. -
  20426. -
  20427. -
  20428. - //@}
  20429. - //------------------------------
  20430. - //
  20431. - //! \name Arithmetics Operators
  20432. - //@{
  20433. - //------------------------------
  20434. -
  20435. - //! Assignement operator
  20436. - template<typename t> CImgList& operator=(const CImgList<t>& list) {
  20437. - return assign(list);
  20438. - }
  20439. -
  20440. - CImgList& operator=(const CImgList& list) {
  20441. - return assign(list);
  20442. - }
  20443. -
  20444. - //! Assignement operator.
  20445. - template<typename t> CImgList& operator=(const CImg<t>& img) {
  20446. - cimglist_for(*this,l) data[l]=img;
  20447. - return *this;
  20448. - }
  20449. -
  20450. - //! Assignement operator.
  20451. - CImgList& operator=(const T& val) {
  20452. - cimglist_for(*this,l) data[l].fill(val);
  20453. - return *this;
  20454. - }
  20455. -
  20456. - //! Operator+
  20457. - CImgList operator+() const {
  20458. - return CImgList<T>(*this);
  20459. - }
  20460. -
  20461. - //! Operator+=
  20462. -#ifdef cimg_use_visualcpp6
  20463. - CImgList& operator+=(const T& val) {
  20464. -#else
  20465. - template<typename t> CImgList& operator+=(const t& val) {
  20466. -#endif
  20467. - cimglist_for(*this,l) (*this)[l]+=val;
  20468. - return *this;
  20469. - }
  20470. -
  20471. - //! Operator+=
  20472. - template<typename t> CImgList& operator+=(const CImgList<t>& list) {
  20473. - const unsigned int sizemax = min(size,list.size);
  20474. - for (unsigned int l=0; l<sizemax; l++) (*this)[l]+=list[l];
  20475. - return *this;
  20476. - }
  20477. -
  20478. - //! Operator++
  20479. - CImgList& operator++() {
  20480. - cimglist_for(*this,l) (*this)[l]++;
  20481. - return *this;
  20482. - }
  20483. -
  20484. - //! Operator-
  20485. - CImgList operator-() const {
  20486. - CImgList<T> res(size);
  20487. - cimglist_for(res,l) res[l].assign(-data[l]);
  20488. - return res;
  20489. - }
  20490. -
  20491. - //! Operator-=.
  20492. -#ifdef cimg_use_visualcpp6
  20493. - CImgList& operator-=(const T& val) {
  20494. -#else
  20495. - template<typename t> CImgList& operator-=(const t& val) {
  20496. -#endif
  20497. - cimglist_for(*this,l) (*this)[l]-=val;
  20498. - return *this;
  20499. - }
  20500. -
  20501. - //! Operator-=.
  20502. - template<typename t> CImgList& operator-=(const CImgList<t>& list) {
  20503. - const unsigned int sizemax = min(size,list.size);
  20504. - for (unsigned int l=0; l<sizemax; l++) (*this)[l]-=list[l];
  20505. - return *this;
  20506. - }
  20507. -
  20508. - //! Operator--
  20509. - CImgList& operator--() {
  20510. - cimglist_for(*this,l) (*this)[l]--;
  20511. - return *this;
  20512. - }
  20513. -
  20514. - //! Operator*=.
  20515. -#ifdef cimg_use_visualcpp6
  20516. - CImgList& operator*=(const double val) {
  20517. -#else
  20518. - template<typename t> CImgList& operator*=(const t& val) {
  20519. -#endif
  20520. - cimglist_for(*this,l) (*this)[l]*=val;
  20521. - return *this;
  20522. - }
  20523. -
  20524. - //! Operator*=.
  20525. - template<typename t> CImgList& operator*=(const CImgList<t>& list) {
  20526. - const unsigned int N = cimg::min(size,list.size);
  20527. - for (unsigned int l=0; l<N; l++) (*this)[l]*=list[l];
  20528. - return this;
  20529. - }
  20530. -
  20531. - //! Operator/=.
  20532. -#ifdef cimg_use_visualcpp6
  20533. - CImgList& operator/=(const double val) {
  20534. -#else
  20535. - template<typename t> CImgList& operator/=(const t& val) {
  20536. -#endif
  20537. - cimglist_for(*this,l) (*this)[l]/=val;
  20538. - return *this;
  20539. - }
  20540. -
  20541. - //! Operator/=.
  20542. - template<typename t> CImgList& operator/=(const CImgList<t>& list) {
  20543. - const unsigned int N = cimg::min(size,list.size);
  20544. - for (unsigned int l=0; l<N; l++) (*this)[l]/=list[l];
  20545. - return this;
  20546. - }
  20547. -
  20548. - //@}
  20549. - //-------------------------
  20550. - //
  20551. - //! \name List Manipulation
  20552. - //@{
  20553. - //-------------------------
  20554. -
  20555. - //! Return a reference to the i-th element of the image list.
  20556. - CImg<T>& operator[](const unsigned int pos) {
  20557. -#if cimg_debug>=3
  20558. - if (pos>=size) {
  20559. - cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size);
  20560. - return *data;
  20561. - }
  20562. -#endif
  20563. - return data[pos];
  20564. - }
  20565. -
  20566. - const CImg<T>& operator[](const unsigned int pos) const {
  20567. -#if cimg_debug>=3
  20568. - if (pos>=size) {
  20569. - cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size);
  20570. - return *data;
  20571. - }
  20572. -#endif
  20573. - return data[pos];
  20574. - }
  20575. -
  20576. - //! Equivalent to CImgList<T>::operator[]
  20577. - CImg<T>& operator()(const unsigned int pos) { return (*this)[pos]; }
  20578. - const CImg<T>& operator()(const unsigned int pos) const { return (*this)[pos]; }
  20579. -
  20580. - //! Return a reference to (x,y,z,v) pixel of the pos-th image of the list
  20581. - T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0,
  20582. - const unsigned int z=0, const unsigned int v=0) {
  20583. - return (*this)[pos](x,y,z,v);
  20584. - }
  20585. - const T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0,
  20586. - const unsigned int z=0, const unsigned int v=0) const {
  20587. - return (*this)[pos](x,y,z,v);
  20588. - }
  20589. -
  20590. - //! Equivalent to CImgList<T>::operator[], with boundary checking
  20591. - CImg<T>& at(const unsigned int pos) {
  20592. - if (pos>=size)
  20593. - throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images",
  20594. - pixel_type(),pos,size);
  20595. - return data[pos];
  20596. - }
  20597. -
  20598. - const CImg<T>& at(const unsigned int pos) const {
  20599. - if (pos>=size)
  20600. - throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images",
  20601. - pixel_type(),pos,size);
  20602. - return data[pos];
  20603. - }
  20604. -
  20605. - //! Returns a reference to last element
  20606. - CImg<T>& back() {
  20607. - return (*this)(size-1);
  20608. - }
  20609. -
  20610. - const CImg<T>& back() const {
  20611. - return (*this)(size-1);
  20612. - }
  20613. -
  20614. - //! Returns a reference to the first element
  20615. - CImg<T>& front() {
  20616. - return *data;
  20617. - }
  20618. -
  20619. - const CImg<T>& front() const {
  20620. - return *data;
  20621. - }
  20622. -
  20623. - //! Returns an iterator to the beginning of the vector.
  20624. - iterator begin() {
  20625. - return data;
  20626. - }
  20627. -
  20628. - const_iterator begin() const {
  20629. - return data;
  20630. - }
  20631. -
  20632. - //! Returns an iterator just past the last element.
  20633. - iterator end() {
  20634. - return data + size;
  20635. - }
  20636. -
  20637. - const_iterator end() const {
  20638. - return data + size;
  20639. - }
  20640. -
  20641. - //! Insert a copy of the image \p img into the current image list, at position \p pos.
  20642. - template<typename t> CImgList& insert(const CImg<t>& img, const unsigned int pos, const bool shared) {
  20643. - if (pos>size)
  20644. - throw CImgArgumentException("CImgList<%s>::insert() : Cannot insert at position %u into a list with %u elements",
  20645. - pixel_type(),pos,size);
  20646. - if (shared)
  20647. - throw CImgArgumentException("CImgList<%s>::insert(): Cannot insert a shared image CImg<%s> into a CImgList<%s>",
  20648. - pixel_type(),img.pixel_type(),pixel_type());
  20649. - CImg<T> *new_data = (++size>allocsize)?new CImg<T>[allocsize?(allocsize<<=1):(allocsize=1)]:0;
  20650. - if (!size || !data) { data = new_data; *data = img; } else {
  20651. - if (new_data) {
  20652. - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
  20653. - if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
  20654. - std::memset(data,0,sizeof(CImg<T>)*(size-1));
  20655. - delete[] data;
  20656. - data = new_data;
  20657. - }
  20658. - else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
  20659. - data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0;
  20660. - data[pos] = img;
  20661. - }
  20662. - return *this;
  20663. - }
  20664. -
  20665. - CImgList& insert(const CImg<T>& img, const unsigned int pos, const bool shared) {
  20666. - if (pos>size)
  20667. - throw CImgArgumentException("CImgList<%s>::insert() : Can't insert at position %u into a list with %u elements",
  20668. - pixel_type(),pos,size);
  20669. - CImg<T> *new_data = (++size>allocsize)?new CImg<T>[allocsize?(allocsize<<=1):(allocsize=1)]:0;
  20670. - if (!size || !data) {
  20671. - data = new_data;
  20672. - if (shared && !img.is_empty()) {
  20673. - data->width = img.width; data->height = img.height; data->depth = img.depth; data->dim = img.dim;
  20674. - data->is_shared = true; data->data = img.data;
  20675. - } else *data = img;
  20676. - }
  20677. - else {
  20678. - if (new_data) {
  20679. - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
  20680. - if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
  20681. - std::memset(data,0,sizeof(CImg<T>)*(size-1));
  20682. - delete[] data;
  20683. - data = new_data;
  20684. - }
  20685. - else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg<T>)*(size-1-pos));
  20686. - if (shared && !img.is_empty()) {
  20687. - data[pos].width = img.width; data[pos].height = img.height; data[pos].depth = img.depth; data[pos].dim = img.dim;
  20688. - data[pos].is_shared = true; data[pos].data = img.data;
  20689. - } else {
  20690. - data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0;
  20691. - data[pos] = img;
  20692. - }
  20693. - }
  20694. - return *this;
  20695. - }
  20696. -
  20697. - template<typename t> CImgList& insert(const CImg<t>& img, const unsigned int pos) {
  20698. - return insert(img,pos,false);
  20699. - }
  20700. -
  20701. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImg<t>& img, const unsigned int pos, const bool shared=false) const {
  20702. - typedef typename cimg::largest<T,t>::type restype;
  20703. - return CImgList<restype>(*this).insert(img,pos,shared);
  20704. - }
  20705. -
  20706. - //! Insert a copy of the image \p img at the current image list.
  20707. - template<typename t> CImgList& insert(const CImg<t>& img) {
  20708. - return insert(img,size);
  20709. - }
  20710. -
  20711. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImg<t>& img) const {
  20712. - typedef typename cimg::largest<T,t>::type restype;
  20713. - return CImgList<restype>(*this).insert(img);
  20714. - }
  20715. -
  20716. - //! Insert a copy of the image \p img at the current image list.
  20717. - CImgList& operator<<(const CImg<T>& img) {
  20718. - return insert(img);
  20719. - }
  20720. -
  20721. - //! Insert n copies of the image \p img into the current image list, at position \p pos.
  20722. - template<typename t> CImgList& insert(const unsigned int n, const CImg<t>& img, const unsigned int pos) {
  20723. - for (unsigned int i=0; i<n; i++) insert(img,pos);
  20724. - return *this;
  20725. - }
  20726. -
  20727. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImg<t>& img, const unsigned int pos) const {
  20728. - typedef typename cimg::largest<T,t>::type restype;
  20729. - return CImgList<restype>(*this).insert(n,img,pos);
  20730. - }
  20731. -
  20732. -
  20733. - //! Insert n copies of the image \p img at the end of the list.
  20734. - template<typename t> CImgList& insert(const unsigned int n, const CImg<t>& img) {
  20735. - for (unsigned int i=0; i<n; i++) insert(img);
  20736. - return *this;
  20737. - }
  20738. -
  20739. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImg<t>& img) const {
  20740. - typedef typename cimg::largest<T,t>::type restype;
  20741. - return CImgList<restype>(*this).insert(n,img);
  20742. - }
  20743. -
  20744. - //! Insert a copy of the image list \p list into the current image list, starting from position \p pos.
  20745. - template<typename t> CImgList& insert(const CImgList<t>& list, const unsigned int pos) {
  20746. - cimglist_for(list,l) insert(list[l],pos+l);
  20747. - return *this;
  20748. - }
  20749. -
  20750. - CImgList& insert(const CImgList<T>& list, const unsigned int pos) {
  20751. - if (this!=&list) cimglist_for(list,l) insert(list[l],pos+l);
  20752. - else insert(CImgList<T>(list),pos);
  20753. - return *this;
  20754. - }
  20755. -
  20756. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImgList<t>& list, const unsigned int pos) const {
  20757. - typedef typename cimg::largest<T,t>::type restype;
  20758. - return CImgList<restype>(*this).insert(list,pos);
  20759. - }
  20760. -
  20761. - //! Append a copy of the image list \p list at the current image list.
  20762. - template<typename t> CImgList& insert(const CImgList<t>& list) {
  20763. - return insert(list,size);
  20764. - }
  20765. -
  20766. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const CImgList<t>& list) const {
  20767. - typedef typename cimg::largest<T,t>::type restype;
  20768. - return CImgList<restype>(*this).insert(list);
  20769. - }
  20770. -
  20771. - //! Insert a copy of the image list \p list at the current image list.
  20772. - CImgList& operator<<(const CImgList& list) {
  20773. - return insert(list);
  20774. - }
  20775. -
  20776. - //! Insert n copies of the list \p list at position \p pos of the current list.
  20777. - template<typename t> CImgList& insert(const unsigned int n, const CImgList<t>& list, const unsigned int pos) {
  20778. - for (unsigned int i=0; i<n; i++) insert(list,pos);
  20779. - return *this;
  20780. - }
  20781. -
  20782. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImgList<t>& list, const unsigned int pos) const {
  20783. - typedef typename cimg::largest<T,t>::type restype;
  20784. - return CImgList<restype>(*this).insert(n,list,pos);
  20785. - }
  20786. -
  20787. - //! Insert n copies of the list at the end of the current list
  20788. - template<typename t> CImgList& insert(const unsigned int n, const CImgList<t>& list) {
  20789. - for (unsigned int i=0; i<n; i++) insert(list);
  20790. - return *this;
  20791. - }
  20792. -
  20793. - template<typename t> CImgList<typename cimg::largest<T,t>::type> get_insert(const unsigned int n, const CImgList<t>& list) const {
  20794. - typedef typename cimg::largest<T,t>::type restype;
  20795. - return CImgList<restype>(*this).insert(n,list);
  20796. - }
  20797. -
  20798. - //! Insert image \p img at the end of the list.
  20799. - template<typename t> CImgList& push_back(const CImg<t>& img) {
  20800. - return insert(img);
  20801. - }
  20802. -
  20803. - //! Insert image \p img at the front of the list.
  20804. - template<typename t> CImgList& push_front(const CImg<t>& img) {
  20805. - return insert(img,0);
  20806. - }
  20807. -
  20808. - //! Insert list \p list at the end of the current list.
  20809. - template<typename t> CImgList& push_back(const CImgList<t>& list) {
  20810. - return insert(list);
  20811. - }
  20812. -
  20813. - //! Insert list \p list at the front of the current list.
  20814. - template<typename t> CImgList& push_front(const CImgList<t>& list) {
  20815. - return insert(list,0);
  20816. - }
  20817. -
  20818. - //! Insert a shared copy of the image \p img into the current image list, at position \p pos.
  20819. - template<typename t> CImgList& insert_shared(const CImg<t>& img, const unsigned int pos) {
  20820. - return insert(img,pos,true);
  20821. - }
  20822. -
  20823. - template<typename t> CImgList get_insert_shared(const CImg<t>& img, const unsigned int pos) const {
  20824. - return CImgList<T>(*this).insert_shared(img,pos);
  20825. - }
  20826. -
  20827. - //! Insert a shared copy of the image \p img at the current image list.
  20828. - template<typename t> CImgList& insert_shared(const CImg<t>& img) {
  20829. - return insert_shared(img,size);
  20830. - }
  20831. -
  20832. - template<typename t> CImgList get_insert_shared(const CImg<t>& img) const {
  20833. - return CImgList<T>(*this).insert_shared(img);
  20834. - }
  20835. -
  20836. - //! Insert n shared copies of the image \p img into the current image list, at position \p pos.
  20837. - template<typename t> CImgList& insert_shared(const unsigned int n, const CImg<t>& img, const unsigned int pos) {
  20838. - for (unsigned int i=0; i<n; i++) insert_shared(img,pos);
  20839. - return *this;
  20840. - }
  20841. -
  20842. - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImg<t>& img, const unsigned int pos) const {
  20843. - return CImgList<T>(*this).insert_shared(n,img,pos);
  20844. - }
  20845. -
  20846. - //! Insert n shared copies of the image \p img at the end of the list.
  20847. - template<typename t> CImgList& insert_shared(const unsigned int n, const CImg<t>& img) {
  20848. - for (unsigned int i=0; i<n; i++) insert_shared(img);
  20849. - return *this;
  20850. - }
  20851. -
  20852. - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImg<t>& img) const {
  20853. - return CImgList<T>(*this).insert_shared(n,img);
  20854. - }
  20855. -
  20856. - //! Insert a shared copy of all image of the list \p list into the current image list, starting from position \p pos.
  20857. - template<typename t> CImgList& insert_shared(const CImgList<t>& list, const unsigned int pos) {
  20858. - if (this!=&list) cimglist_for(list,l) insert_shared(list[l],pos+l);
  20859. - else insert_shared(CImgList<T>(list),pos);
  20860. - return *this;
  20861. - }
  20862. -
  20863. - template<typename t> CImgList get_insert_shared(const CImgList<t>& list, const unsigned int pos) const {
  20864. - return CImgList<T>(*this).insert_shared(list,pos);
  20865. - }
  20866. -
  20867. - //! Append a shared copy of the image list \p list at the current image list.
  20868. - template<typename t> CImgList& insert_shared(const CImgList<t>& list) {
  20869. - return insert_shared(list,size);
  20870. - }
  20871. -
  20872. - template<typename t> CImgList get_insert_shared(const CImgList<t>& list) const {
  20873. - return CImgList<T>(*this).insert_shared(list);
  20874. - }
  20875. -
  20876. - //! Insert n shared copies of the list \p list at position \p pos of the current list.
  20877. - template<typename t> CImgList& insert_shared(const unsigned int n, const CImgList<t>& list, const unsigned int pos) {
  20878. - for (unsigned int i=0; i<n; i++) insert_shared(list,pos);
  20879. - return *this;
  20880. - }
  20881. -
  20882. - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImgList<t>& list, const unsigned int pos) const {
  20883. - return CImgList<T>(*this).insert_shared(n,list,pos);
  20884. - }
  20885. -
  20886. - //! Insert n shared copies of the list \p list at the end of the list
  20887. - template<typename t> CImgList& insert_shared(const unsigned int n, const CImgList<t>& list) {
  20888. - return insert_shared(n,list,size);
  20889. - }
  20890. -
  20891. - template<typename t> CImgList get_insert_shared(const unsigned int n, const CImgList<t>& list) const {
  20892. - return CImgList<T>(*this).insert_shared(n,list);
  20893. - }
  20894. -
  20895. - //! Remove the image at position \p pos from the image list.
  20896. - CImgList& remove(const unsigned int pos) {
  20897. - if (pos>=size)
  20898. - cimg::warn(true,"CImgList<%s>::remove() : Cannot remove an image from a list (%p,%u), at position %u.",
  20899. - pixel_type(),data,size,pos);
  20900. - else {
  20901. - data[pos].assign();
  20902. - if (!(--size)) return assign();
  20903. - if (size<8 || size>(allocsize>>2)) { // Removing item without reallocation.
  20904. - if (pos!=size) {
  20905. - std::memmove(data+pos,data+pos+1,sizeof(CImg<T>)*(size-pos));
  20906. - CImg<T> &tmp = data[size];
  20907. - tmp.width = tmp.height = tmp.depth = tmp.dim = 0; tmp.data = 0;
  20908. - }
  20909. - } else { // Removing item with reallocation.
  20910. - allocsize>>=2;
  20911. - CImg<T> *new_data = new CImg<T>[allocsize];
  20912. - if (pos) std::memcpy(new_data,data,sizeof(CImg<T>)*pos);
  20913. - if (pos!=size) std::memcpy(new_data+pos,data+pos+1,sizeof(CImg<T>)*(size-pos));
  20914. - std::memset(data,0,sizeof(CImg<T>)*(size+1));
  20915. - delete[] data;
  20916. - data = new_data;
  20917. - }
  20918. - }
  20919. - return *this;
  20920. - }
  20921. -
  20922. - CImgList get_remove(const unsigned int pos) const {
  20923. - return CImgList<T>(*this).remove(pos);
  20924. - }
  20925. -
  20926. - //! Remove last element of the list;
  20927. - CImgList& pop_back() {
  20928. - return remove(size-1);
  20929. - }
  20930. -
  20931. - //! Remove last element of the list;
  20932. - CImgList& operator>>(CImg<T>& img) {
  20933. - if (size) { img.swap((*this)[size-1]); return remove(size-1); }
  20934. - cimg::warn(true,"CImgl<%s>::operator>>() : List is empty",pixel_type());
  20935. - img.assign();
  20936. - return *this;
  20937. - }
  20938. -
  20939. - //! Remove first element of the list;
  20940. - CImgList& pop_front() {
  20941. - return remove(0);
  20942. - }
  20943. -
  20944. - //! Remove the element pointed by iterator \p iter;
  20945. - CImgList& erase(const iterator iter) {
  20946. - return remove(iter-data);
  20947. - }
  20948. -
  20949. - //! Remove the last image from the image list.
  20950. - CImgList& remove() {
  20951. - if (size) return remove(size-1);
  20952. - else cimg::warn(true,"CImgList<%s>::remove() : List is empty",pixel_type());
  20953. - return *this;
  20954. - }
  20955. -
  20956. - CImgList get_remove() const {
  20957. - return CImgList<T>(*this).remove();
  20958. - }
  20959. -
  20960. - //! Reverse list order
  20961. - CImgList& reverse() {
  20962. - for (unsigned int l=0; l<size/2; l++) (*this)[l].swap((*this)[size-1-l]);
  20963. - return *this;
  20964. - }
  20965. -
  20966. - //! Get reversed list
  20967. - CImgList get_reverse() const {
  20968. - return CImgList<T>(*this).reverse();
  20969. - }
  20970. -
  20971. - //! Get a sub-list
  20972. - const CImgList get_crop(const unsigned int i0, const unsigned int i1, const bool shared=false) const {
  20973. - if (i0>i1 || i1>=size)
  20974. - throw CImgArgumentException("CImgList<%s>::get_crop() : Cannot get a sub-list (%u->%u) from a list of %u images",
  20975. - pixel_type(),i0,i1,size);
  20976. - CImgList<T> res(i1-i0+1);
  20977. - cimglist_for(res,l) res[l].assign((*this)[i0+l],shared);
  20978. - return res;
  20979. - }
  20980. -
  20981. - //! Replace a list by its sublist
  20982. - CImgList& crop(const unsigned int i0, const unsigned int i1, const bool shared=false) {
  20983. - return get_crop(i0,i1,shared).swap(*this);
  20984. - }
  20985. -
  20986. - //@}
  20987. - //----------------------------
  20988. - //
  20989. - //! \name Fourier Transforms
  20990. - //@{
  20991. - //----------------------------
  20992. -
  20993. - //! Compute the Fast Fourier Transform (along the specified axis).
  20994. - CImgList& FFT(const char axe, const bool inverse=false) {
  20995. - if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data);
  20996. - if (data[0].is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) is empty",
  20997. - pixel_type,data[0].width,data[0].height,data[0].depth,data[0].dim,data[0].data);
  20998. - cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data);
  20999. - if (size==1) insert(CImg<T>(data[0].width,data[0].height,data[0].depth,data[0].dim,0));
  21000. - CImg<T> &Ir = data[0], &Ii = data[1];
  21001. - if (Ir.width!=Ii.width || Ir.height!=Ii.height || Ir.depth!=Ii.depth || Ir.dim!=Ii.dim)
  21002. - throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) and imaginary part (%u,%u,%u,%u,%p)"
  21003. - "have different dimensions",pixel_type(),
  21004. - Ir.width,Ir.height,Ir.depth,Ir.dim,Ir.data,Ii.width,Ii.height,Ii.depth,Ii.dim,Ii.data);
  21005. -
  21006. -#ifdef cimg_use_fftw3
  21007. - fftw_complex *data_in;
  21008. - fftw_plan data_plan;
  21009. -
  21010. - switch (cimg::uncase(axe)) {
  21011. - case 'x': {
  21012. - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width);
  21013. - data_plan = fftw_plan_dft_1d(Ir.width, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
  21014. - cimg_forYZV(Ir,y,z,k) {
  21015. - T *ptrr = Ir.ptr(0,y,z,k), *ptri = Ii.ptr(0,y,z,k);
  21016. - double *ptrd = (double*)data_in;
  21017. - cimg_forX(Ir,x) { *(ptrd++) = (double)*(ptrr++); *(ptrd++) = (double)*(ptri++); }
  21018. - fftw_execute(data_plan);
  21019. - cimg_forX(Ir,x) { *(--ptri) = (T)*(--ptrd); *(--ptrr) = (T)*(--ptrd); }
  21020. - }
  21021. - } break;
  21022. -
  21023. - case 'y': {
  21024. - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.height);
  21025. - data_plan = fftw_plan_dft_1d(Ir.height, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
  21026. - const unsigned int off = Ir.width;
  21027. - cimg_forXZV(Ir,x,z,k) {
  21028. - T *ptrr = Ir.ptr(x,0,z,k), *ptri = Ii.ptr(x,0,z,k);
  21029. - double *ptrd = (double*)data_in;
  21030. - cimg_forY(Ir,y) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
  21031. - fftw_execute(data_plan);
  21032. - cimg_forY(Ir,y) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
  21033. - }
  21034. - } break;
  21035. -
  21036. - case 'z': {
  21037. - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.depth);
  21038. - data_plan = fftw_plan_dft_1d(Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
  21039. - const unsigned int off = Ir.width*Ir.height;
  21040. - cimg_forXYV(Ir,x,y,k) {
  21041. - T *ptrr = Ir.ptr(x,y,0,k), *ptri = Ii.ptr(x,y,0,k);
  21042. - double *ptrd = (double*)data_in;
  21043. - cimg_forZ(Ir,z) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
  21044. - fftw_execute(data_plan);
  21045. - cimg_forZ(Ir,z) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
  21046. - }
  21047. - } break;
  21048. -
  21049. - case 'v': {
  21050. - data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.dim);
  21051. - data_plan = fftw_plan_dft_1d(Ir.dim, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
  21052. - const unsigned int off = Ir.width*Ir.height*Ir.depth;
  21053. - cimg_forXYZ(Ir,x,y,z) {
  21054. - T *ptrr = Ir.ptr(x,y,z,0), *ptri = Ii.ptr(x,y,z,0);
  21055. - double *ptrd = (double*)data_in;
  21056. - cimg_forV(Ir,k) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; }
  21057. - fftw_execute(data_plan);
  21058. - cimg_forV(Ir,k) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); }
  21059. - }
  21060. - } break;
  21061. - }
  21062. -
  21063. - fftw_destroy_plan(data_plan);
  21064. - fftw_free(data_in);
  21065. -#else
  21066. - switch (cimg::uncase(axe)) {
  21067. - case 'x': { // Fourier along X
  21068. - const unsigned int N = Ir.width, N2 = (N>>1);
  21069. - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image along 'x' is %d != 2^N",
  21070. - pixel_type(),N);
  21071. - for (unsigned int i=0,j=0; i<N2; i++) {
  21072. - if (j>i) cimg_forYZV(Ir,y,z,v) { cimg::swap(Ir(i,y,z,v),Ir(j,y,z,v)); cimg::swap(Ii(i,y,z,v),Ii(j,y,z,v));
  21073. - if (j<N2) {
  21074. - const unsigned int ri = N-1-i, rj = N-1-j;
  21075. - cimg::swap(Ir(ri,y,z,v),Ir(rj,y,z,v)); cimg::swap(Ii(ri,y,z,v),Ii(rj,y,z,v));
  21076. - }}
  21077. - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
  21078. - }
  21079. - for (unsigned int delta=2; delta<=N; delta<<=1) {
  21080. - const unsigned int delta2 = (delta>>1);
  21081. - for (unsigned int i=0; i<N; i+=delta) {
  21082. - float wr = 1, wi = 0;
  21083. - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
  21084. - ca = (float)std::cos(angle),
  21085. - sa = (float)std::sin(angle);
  21086. - for (unsigned int k=0; k<delta2; k++) {
  21087. - const unsigned int j = i + k, nj = j + delta2;
  21088. - cimg_forYZV(Ir,y,z,k) {
  21089. - T &ir = Ir(j,y,z,k), &ii = Ii(j,y,z,k), &nir = Ir(nj,y,z,k), &nii = Ii(nj,y,z,k);
  21090. - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
  21091. - nir = ir - tmpr; nii = ii - tmpi;
  21092. - ir += tmpr; ii += tmpi;
  21093. - }
  21094. - const float nwr = wr*ca-wi*sa;
  21095. - wi = wi*ca + wr*sa;
  21096. - wr = nwr;
  21097. - }
  21098. - }
  21099. - }
  21100. - if (inverse) (*this)/=N;
  21101. - } break;
  21102. -
  21103. - case 'y': { // Fourier along Y
  21104. - const unsigned int N = Ir.height, N2 = (N>>1);
  21105. - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'y' is %d != 2^N",
  21106. - pixel_type(),N);
  21107. - for (unsigned int i=0,j=0; i<N2; i++) {
  21108. - if (j>i) cimg_forXZV(Ir,x,z,v) { cimg::swap(Ir(x,i,z,v),Ir(x,j,z,v)); cimg::swap(Ii(x,i,z,v),Ii(x,j,z,v));
  21109. - if (j<N2) {
  21110. - const unsigned int ri = N-1-i, rj = N-1-j;
  21111. - cimg::swap(Ir(x,ri,z,v),Ir(x,rj,z,v)); cimg::swap(Ii(x,ri,z,v),Ii(x,rj,z,v));
  21112. - }}
  21113. - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
  21114. - }
  21115. - for (unsigned int delta=2; delta<=N; delta<<=1) {
  21116. - const unsigned int delta2 = (delta>>1);
  21117. - for (unsigned int i=0; i<N; i+=delta) {
  21118. - float wr = 1, wi = 0;
  21119. - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
  21120. - ca = (float)std::cos(angle), sa = (float)std::sin(angle);
  21121. - for (unsigned int k=0; k<delta2; k++) {
  21122. - const unsigned int j = i + k, nj = j + delta2;
  21123. - cimg_forXZV(Ir,x,z,k) {
  21124. - T &ir = Ir(x,j,z,k), &ii = Ii(x,j,z,k), &nir = Ir(x,nj,z,k), &nii = Ii(x,nj,z,k);
  21125. - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
  21126. - nir = ir - tmpr; nii = ii - tmpi;
  21127. - ir += tmpr; ii += tmpi;
  21128. - }
  21129. - const float nwr = wr*ca-wi*sa;
  21130. - wi = wi*ca + wr*sa;
  21131. - wr = nwr;
  21132. - }
  21133. - }
  21134. - }
  21135. - if (inverse) (*this)/=N;
  21136. - } break;
  21137. -
  21138. - case 'z': { // Fourier along Z
  21139. - const unsigned int N = Ir.depth, N2 = (N>>1);
  21140. - if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'z' is %d != 2^N",
  21141. - pixel_type(),N);
  21142. - for (unsigned int i=0,j=0; i<N2; i++) {
  21143. - if (j>i) cimg_forXYV(Ir,x,y,v) { cimg::swap(Ir(x,y,i,v),Ir(x,y,j,v)); cimg::swap(Ii(x,y,i,v),Ii(x,y,j,v));
  21144. - if (j<N2) {
  21145. - const unsigned int ri = N-1-i, rj = N-1-j;
  21146. - cimg::swap(Ir(x,y,ri,v),Ir(x,y,rj,v)); cimg::swap(Ii(x,y,ri,v),Ii(x,y,rj,v));
  21147. - }}
  21148. - for (unsigned int m=N, n=N2; (j+=n)>=m; j-=m, m=n, n>>=1);
  21149. - }
  21150. - for (unsigned int delta=2; delta<=N; delta<<=1) {
  21151. - const unsigned int delta2 = (delta>>1);
  21152. - for (unsigned int i=0; i<N; i+=delta) {
  21153. - float wr = 1, wi = 0;
  21154. - const float angle = (float)((inverse?+1:-1)*2*cimg::PI/delta),
  21155. - ca = (float)std::cos(angle), sa = (float)std::sin(angle);
  21156. - for (unsigned int k=0; k<delta2; k++) {
  21157. - const unsigned int j = i + k, nj = j + delta2;
  21158. - cimg_forXYV(Ir,x,y,k) {
  21159. - T &ir = Ir(x,y,j,k), &ii = Ii(x,y,j,k), &nir = Ir(x,y,nj,k), &nii = Ii(x,y,nj,k);
  21160. - const T tmpr = wr*nir - wi*nii, tmpi = wr*nii + wi*nir;
  21161. - nir = ir - tmpr; nii = ii - tmpi;
  21162. - ir += tmpr; ii += tmpi;
  21163. - }
  21164. - const float nwr = wr*ca-wi*sa;
  21165. - wi = wi*ca + wr*sa;
  21166. - wr = nwr;
  21167. - }
  21168. - }
  21169. - }
  21170. - if (inverse) (*this)/=N;
  21171. - } break;
  21172. -
  21173. - default: throw CImgArgumentException("CImgList<%s>::FFT() : unknown axe '%c', must be 'x','y' or 'z'");
  21174. - }
  21175. -#endif
  21176. - return *this;
  21177. - }
  21178. -
  21179. - //! Return the Fast Fourier Transform of a complex image (along a specified axis).
  21180. - CImgList<typename cimg::largest<T,float>::type> get_FFT(const char axe,const bool inverse=false) const {
  21181. - typedef typename cimg::largest<T,float>::type restype;
  21182. - return CImgList<restype>(*this).FFT(axe,inverse);
  21183. - }
  21184. -
  21185. - //! Compute the Fast Fourier Transform of a complex image.
  21186. - CImgList& FFT(const bool inverse=false) {
  21187. - if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data);
  21188. - cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data);
  21189. - if (size==1) insert(CImg<T>(data[0].width,data[0].height,data[0].depth,data[0].dim,0));
  21190. - CImg<T> &Ir = data[0];
  21191. -
  21192. -#ifdef cimg_use_fftw3
  21193. - CImg<T> &Ii = data[1];
  21194. - fftw_complex *data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width*Ir.height*Ir.depth);
  21195. - fftw_plan data_plan;
  21196. - const unsigned int w = Ir.width, wh = w*Ir.height, whd = wh*Ir.depth;
  21197. - data_plan = fftw_plan_dft_3d(Ir.width, Ir.height, Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE);
  21198. - cimg_forV(Ir,k) {
  21199. - T *ptrr = Ir.ptr(0,0,0,k), *ptri = Ii.ptr(0,0,0,k);
  21200. - double *ptrd = (double*)data_in;
  21201. - cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z)
  21202. - { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=wh; ptri+=wh; }
  21203. - ptrr-=whd-w; ptri-=whd-w; }
  21204. - ptrr-=wh-1; ptri-=wh-1; }
  21205. - fftw_execute(data_plan);
  21206. - ptrd = (double*)data_in;
  21207. - ptrr = Ir.ptr(0,0,0,k), ptri = Ii.ptr(0,0,0,k);
  21208. - cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z)
  21209. - { *ptrr = (T)*(ptrd++); *ptri = (T)*(ptrd++); ptrr+=wh; ptri+=wh; }
  21210. - ptrr-=whd-w; ptri-=whd-w; }
  21211. - ptrr-=wh-1; ptri-=wh-1; }
  21212. - }
  21213. - fftw_destroy_plan(data_plan);
  21214. - fftw_free(data_in);
  21215. -#else
  21216. - if (Ir.depth>1) FFT('z',inverse);
  21217. - if (Ir.height>1) FFT('y',inverse);
  21218. - if (Ir.width>1) FFT('x',inverse);
  21219. -#endif
  21220. - return *this;
  21221. - }
  21222. -
  21223. - //! Return the Fast Fourier Transform of a complex image
  21224. - CImgList<typename cimg::largest<T,float>::type> get_FFT(const bool inverse=false) const {
  21225. - typedef typename cimg::largest<T,float>::type restype;
  21226. - return CImgList<restype>(*this).FFT(inverse);
  21227. - }
  21228. -
  21229. - //@}
  21230. - //----------------------------------
  21231. - //
  21232. - //! \name Input-Output and Display
  21233. - //@{
  21234. - //----------------------------------
  21235. -
  21236. - //! Print informations about the list on the standard output.
  21237. - const CImgList& print(const char* title=0, const unsigned int print_flag=1) const {
  21238. - char tmp[1024];
  21239. - std::fprintf(stderr,"%-8s(this=%p) : { size=%u, data=%p }\n",title?title:"CImgList",
  21240. - (void*)this,size,(void*)data);
  21241. - if (print_flag>0) cimglist_for(*this,l) {
  21242. - std::sprintf(tmp,"%s[%d]",title?title:"CImgList",l);
  21243. - data[l].print(tmp,print_flag);
  21244. - }
  21245. - return *this;
  21246. - }
  21247. -
  21248. - //! Display informations about the list on the standart output.
  21249. - const CImgList& print(const unsigned int print_flag) const {
  21250. - return print(0,print_flag);
  21251. - }
  21252. -
  21253. - //! Load an image list from a file.
  21254. - static CImgList get_load(const char *const filename) {
  21255. - const char *ext = cimg::filename_split(filename);
  21256. - if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return get_load_cimg(filename);
  21257. - if (!cimg::strncasecmp(ext,"rec",3) ||
  21258. - !cimg::strncasecmp(ext,"par",3)) return get_load_parrec(filename);
  21259. - CImgList res(1);
  21260. - res[0].load(filename);
  21261. - return res;
  21262. - }
  21263. -
  21264. - //! In-place version of load().
  21265. - CImgList& load(const char *const filename) {
  21266. - return get_load(filename).swap(*this);
  21267. - }
  21268. -
  21269. -#define cimg_load_cimg_case(Ts,Tss) \
  21270. - if (!loaded && !cimg::strcasecmp(Ts,tmp2)) for (unsigned int l=0; l<n; l++) { \
  21271. - const bool endian = cimg::endian(); \
  21272. - j=0; while((i=std::fgetc(nfile))!='\n') tmp[j++]=(char)i; tmp[j]='\0'; \
  21273. - std::sscanf(tmp,"%u %u %u %u",&w,&h,&z,&k);\
  21274. - if (w*h*z*k>0) { \
  21275. - Tss *buf = new Tss[w*h*z*k]; cimg::fread(buf,w*h*z*k,nfile); \
  21276. - if (endian) cimg::endian_swap(buf,w*h*z*k); \
  21277. - CImg<T> idest(w,h,z,k); \
  21278. - cimg_foroff(idest,off) idest[off] = (T)(buf[off]); idest.swap(res[l]); \
  21279. - delete[] buf; \
  21280. - } \
  21281. - loaded = true; \
  21282. - }
  21283. -
  21284. - //! Load an image list from a file (.raw format).
  21285. - static CImgList get_load_cimg(std::FILE *const file, const char *const filename=0) {
  21286. - typedef unsigned char uchar;
  21287. - typedef unsigned short ushort;
  21288. - typedef unsigned int uint;
  21289. - typedef unsigned long ulong;
  21290. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  21291. - char tmp[256],tmp2[256];
  21292. - int i;
  21293. - bool loaded = false;
  21294. - unsigned int n,j,w,h,z,k,err;
  21295. - j=0; while((i=std::fgetc(nfile))!='\n' && i!=EOF && j<256) tmp[j++]=i; tmp[j]='\0';
  21296. - err=std::sscanf(tmp,"%u%*c%255[A-Za-z ]",&n,tmp2);
  21297. - if (err!=2) {
  21298. - if (!file) cimg::fclose(nfile);
  21299. - throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', Unknow CImg RAW header.",
  21300. - pixel_type(),filename?filename:"(FILE*)");
  21301. - }
  21302. - CImgList<T> res(n);
  21303. - cimg_load_cimg_case("bool",bool);
  21304. - cimg_load_cimg_case("unsigned char",uchar);
  21305. - cimg_load_cimg_case("uchar",uchar);
  21306. - cimg_load_cimg_case("char",char);
  21307. - cimg_load_cimg_case("unsigned short",ushort);
  21308. - cimg_load_cimg_case("ushort",ushort);
  21309. - cimg_load_cimg_case("short",short);
  21310. - cimg_load_cimg_case("unsigned int",uint);
  21311. - cimg_load_cimg_case("uint",uint);
  21312. - cimg_load_cimg_case("int",int);
  21313. - cimg_load_cimg_case("unsigned long",ulong);
  21314. - cimg_load_cimg_case("ulong",ulong);
  21315. - cimg_load_cimg_case("long",long);
  21316. - cimg_load_cimg_case("float",float);
  21317. - cimg_load_cimg_case("double",double);
  21318. - if (!loaded) {
  21319. - if (!file) cimg::fclose(nfile);
  21320. - throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', cannot read images of pixels coded as '%s'.",
  21321. - pixel_type(),filename?filename:"(FILE*)",tmp2);
  21322. - }
  21323. - if (!file) cimg::fclose(nfile);
  21324. - return res;
  21325. - }
  21326. -
  21327. - //! Load an image list from a file (.raw format).
  21328. - static CImgList get_load_cimg(const char *const filename) {
  21329. - return get_load_cimg(0,filename);
  21330. - }
  21331. -
  21332. - //! In-place version of get_load_cimg().
  21333. - CImgList& load_cimg(std::FILE *const file, const char *const filename=0) {
  21334. - return get_load_cimg(file,filename).swap(*this);
  21335. - }
  21336. -
  21337. - //! In-place version of get_load_cimg().
  21338. - CImgList& load_cimg(const char *const filename) {
  21339. - return get_load_cimg(filename).swap(*this);
  21340. - }
  21341. -
  21342. - //! Load PAR-REC (Philips) image file
  21343. - static CImgList get_load_parrec(const char *const filename) {
  21344. - char body[1024], filenamepar[1024], filenamerec[1024];
  21345. - const char *ext = cimg::filename_split(filename,body);
  21346. - if (!cimg::strncmp(ext,"par",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.rec",body); }
  21347. - if (!cimg::strncmp(ext,"PAR",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.REC",body); }
  21348. - if (!cimg::strncmp(ext,"rec",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.par",body); }
  21349. - if (!cimg::strncmp(ext,"REC",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.PAR",body); }
  21350. - std::FILE *file = cimg::fopen(filenamepar,"r");
  21351. -
  21352. - // Parse header file
  21353. - CImgList<float> st_slices;
  21354. - CImgList<unsigned int> st_global;
  21355. - int err;
  21356. - char line[256]={0};
  21357. - do { err=std::fscanf(file,"%255[^\n]%*c",line); } while (err!=EOF && (line[0]=='#' || line[0]=='.'));
  21358. - do {
  21359. - unsigned int sn,sizex,sizey,pixsize;
  21360. - float rs,ri,ss;
  21361. - err=std::fscanf(file,"%u%*u%*u%*u%*u%*u%*u%u%*u%u%u%g%g%g%*[^\n]",&sn,&pixsize,&sizex,&sizey,&ri,&rs,&ss);
  21362. - if (err==7) {
  21363. - st_slices.insert(CImg<float>::vector((float)sn,(float)pixsize,(float)sizex,(float)sizey,ri,rs,ss,0));
  21364. - unsigned int i; for (i=0; i<st_global.size && sn<=st_global[i][2]; i++);
  21365. - if (i==st_global.size) st_global.insert(CImg<unsigned int>::vector(sizex,sizey,sn));
  21366. - else {
  21367. - CImg<unsigned int> &vec = st_global[i];
  21368. - if (sizex>vec[0]) vec[0] = sizex;
  21369. - if (sizey>vec[1]) vec[1] = sizey;
  21370. - vec[2] = sn;
  21371. - }
  21372. - st_slices[st_slices.size-1][7] = (float)i;
  21373. - }
  21374. - } while (err==7);
  21375. -
  21376. - // Read data
  21377. - std::FILE *file2 = cimg::fopen(filenamerec,"rb");
  21378. - CImgList<T> dest;
  21379. - { cimglist_for(st_global,l) {
  21380. - const CImg<unsigned int>& vec = st_global[l];
  21381. - dest.insert(CImg<T>(vec[0],vec[1],vec[2]));
  21382. - }}
  21383. -
  21384. - cimglist_for(st_slices,l) {
  21385. - const CImg<float>& vec = st_slices[l];
  21386. - const unsigned int
  21387. - sn = (unsigned int)vec[0]-1,
  21388. - pixsize = (unsigned int)vec[1],
  21389. - sizex = (unsigned int)vec[2],
  21390. - sizey = (unsigned int)vec[3],
  21391. - imn = (unsigned int)vec[7];
  21392. - const float ri = vec[4], rs = vec[5], ss = vec[6];
  21393. - switch (pixsize) {
  21394. - case 8: {
  21395. - CImg<unsigned char> buf(sizex,sizey);
  21396. - cimg::fread(buf.data,sizex*sizey,file2);
  21397. - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
  21398. - CImg<T>& img = dest[imn];
  21399. - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
  21400. - } break;
  21401. - case 16: {
  21402. - CImg<unsigned short> buf(sizex,sizey);
  21403. - cimg::fread(buf.data,sizex*sizey,file2);
  21404. - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
  21405. - CImg<T>& img = dest[imn];
  21406. - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
  21407. - } break;
  21408. - case 32: {
  21409. - CImg<unsigned int> buf(sizex,sizey);
  21410. - cimg::fread(buf.data,sizex*sizey,file2);
  21411. - if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey);
  21412. - CImg<T>& img = dest[imn];
  21413. - cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss));
  21414. - } break;
  21415. - default:
  21416. - cimg::fclose(file);
  21417. - cimg::fclose(file2);
  21418. - throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s', cannot handle image with pixsize = %d bits.",
  21419. - pixel_type(),filename,pixsize);
  21420. - break;
  21421. - }
  21422. - }
  21423. - cimg::fclose(file);
  21424. - cimg::fclose(file2);
  21425. - if (!dest.size)
  21426. - throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s' does not appear to be a valid PAR-REC file.",
  21427. - pixel_type(),filename);
  21428. - return dest;
  21429. - }
  21430. -
  21431. - //! In-place version of get_load_parrec().
  21432. - CImgList& load_parrec(const char *const filename) {
  21433. - return get_load_parrec(filename).swap(*this);
  21434. - }
  21435. -
  21436. - //! Load YUV image sequence.
  21437. - static CImgList get_load_yuv(std::FILE *const file, const char *const filename,
  21438. - const unsigned int sizex, const unsigned int sizey=1,
  21439. - const unsigned int first_frame=0, const int last_frame=-1,
  21440. - const bool yuv2rgb=false) {
  21441. - if (sizex%2 || sizey%2)
  21442. - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', image dimensions along X and Y must be even numbers (given are %ux%u)\n",
  21443. - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
  21444. - if (!sizex || !sizey)
  21445. - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given image sequence size (%u,%u) is invalid",
  21446. - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
  21447. - if (last_frame>0 && first_frame>(unsigned int)last_frame)
  21448. - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given first frame %u is posterior to last frame %d.",
  21449. - pixel_type(),filename?filename:"(unknown)",first_frame,last_frame);
  21450. - if (!sizex || !sizey)
  21451. - throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given frame size (%u,%u) is invalid.",
  21452. - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
  21453. - CImgList<T> res;
  21454. - CImg<unsigned char> tmp(sizex,sizey,1,3), UV(sizex/2,sizey/2,1,2);
  21455. - std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
  21456. - bool stopflag = false;
  21457. - int err;
  21458. - if (first_frame) {
  21459. - err = std::fseek(nfile,first_frame*(sizex*sizey + sizex*sizey/2),SEEK_CUR);
  21460. - if (err) {
  21461. - if (!file) cimg::fclose(nfile);
  21462. - throw CImgIOException("CImgList<%s>::get_load_yuv() : File '%s' doesn't contain frame number %u "
  21463. - "(out of range error).",pixel_type(),filename?filename:"(FILE*)",first_frame);
  21464. - }
  21465. - }
  21466. - unsigned int frame;
  21467. - for (frame = first_frame; !stopflag && (last_frame<0 || frame<=(unsigned int)last_frame); frame++) {
  21468. - tmp.fill(0);
  21469. - // TRY to read the luminance, don't replace by cimg::fread !
  21470. - err = (int)std::fread((void*)(tmp.ptr()),1,(size_t)(tmp.width*tmp.height),nfile);
  21471. - if (err!=(int)(tmp.width*tmp.height)) {
  21472. - stopflag = true;
  21473. - cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data,"
  21474. - " or given image dimensions (%u,%u) are incorrect.",
  21475. - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
  21476. - } else {
  21477. - UV.fill(0);
  21478. - // TRY to read the luminance, don't replace by cimg::fread !
  21479. - err = (int)std::fread((void*)(UV.ptr()),1,(size_t)(UV.size()),nfile);
  21480. - if (err!=(int)(UV.size())) {
  21481. - stopflag = true;
  21482. - cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data,"
  21483. - " or given image dimensions (%u,%u) are incorrect.",
  21484. - pixel_type(),filename?filename:"(unknown)",sizex,sizey);
  21485. - } else {
  21486. - cimg_forXY(UV,x,y) {
  21487. - const int x2=2*x, y2=2*y;
  21488. - tmp(x2,y2,1) = tmp(x2+1,y2,1) = tmp(x2,y2+1,1) = tmp(x2+1,y2+1,1) = UV(x,y,0);
  21489. - tmp(x2,y2,2) = tmp(x2+1,y2,2) = tmp(x2,y2+1,2) = tmp(x2+1,y2+1,2) = UV(x,y,1);
  21490. - }
  21491. - if (yuv2rgb) tmp.YCbCrtoRGB();
  21492. - res.insert(tmp);
  21493. - }
  21494. - }
  21495. - }
  21496. - cimg::warn(stopflag && last_frame>=0 && frame!=(unsigned int)last_frame,
  21497. - "CImgList<%s>::get_load_yuv() : File '%s', frame %d not reached since only %u frames were found in the file.",
  21498. - pixel_type(),filename?filename:"(unknown)",last_frame,frame-1,filename);
  21499. - if (!file) cimg::fclose(nfile);
  21500. - return res;
  21501. - }
  21502. -
  21503. - //! Load YUV image sequence.
  21504. - static CImgList get_load_yuv(const char *const filename,
  21505. - const unsigned int sizex, const unsigned int sizey=1,
  21506. - const unsigned int first_frame=0, const int last_frame=-1,
  21507. - const bool yuv2rgb=false) {
  21508. - return get_load_yuv(0,filename,sizex,sizey,first_frame,last_frame,yuv2rgb);
  21509. - }
  21510. -
  21511. - //! In-place version of get_load_yuv().
  21512. - CImgList& load_yuv(std::FILE *const file, const char *const filename,
  21513. - const unsigned int sizex, const unsigned int sizey=1,
  21514. - const unsigned int first_frame=0, const int last_frame=-1,
  21515. - const bool yuv2rgb=false) {
  21516. - return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
  21517. - }
  21518. -
  21519. - //! In-place version of get_load_yuv().
  21520. - CImgList& load_yuv(const char *const filename,
  21521. - const unsigned int sizex, const unsigned int sizey,
  21522. - const unsigned int first_frame=0, const int last_frame=-1,
  21523. - const bool yuv2rgb=false) {
  21524. - return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this);
  21525. - }
  21526. -
  21527. - //! Load from OFF file format
  21528. - template<typename tf,typename tc>
  21529. - static CImgList<T> get_load_off(std::FILE *const file, const char *const filename,
  21530. - CImgList<tf>& primitives, CImgList<tc>& colors,
  21531. - const bool invert_faces=false) {
  21532. - return CImg<T>::get_load_off(file,filename,primitives,colors,invert_faces).get_split('x');
  21533. - }
  21534. -
  21535. - //! Load from OFF file format
  21536. - template<typename tf,typename tc>
  21537. - static CImgList<T> get_load_off(const char *const filename,
  21538. - CImgList<tf>& primitives, CImgList<tc>& colors,
  21539. - const bool invert_faces=false) {
  21540. - return get_load_off(0,filename,primitives,colors,invert_faces);
  21541. - }
  21542. -
  21543. - //! In-place version of get_load_off()
  21544. - template<typename tf,typename tc>
  21545. - CImgList& load_off(std::FILE *const file, const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
  21546. - const bool invert_faces=false) {
  21547. - return get_load_off(file,filename,primitives,colors,invert_faces).swap(*this);
  21548. - }
  21549. -
  21550. - //! In-place version of get_load_off()
  21551. - template<typename tf,typename tc>
  21552. - CImgList& load_off(const char *const filename, CImgList<tf>& primitives, CImgList<tc>& colors,
  21553. - const bool invert_faces=false) {
  21554. - return get_load_off(filename,primitives,colors,invert_faces).swap(*this);
  21555. - }
  21556. -
  21557. - //! Save an image list into a file.
  21558. - /**
  21559. - Depending on the extension of the given filename, a file format is chosen for the output file.
  21560. - **/
  21561. - const CImgList& save(const char *const filename) const {
  21562. - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save() : Instance list (%u,%p) is empty (file '%s').",
  21563. - pixel_type(),size,data,filename);
  21564. - if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance list (%u,%p), specified filename is (null).",
  21565. - pixel_type(),size,data);
  21566. - const char *ext = cimg::filename_split(filename);
  21567. - if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return save_cimg(filename);
  21568. - if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(filename,true);
  21569. - if (size==1) data[0].save(filename,-1);
  21570. - else cimglist_for(*this,l) data[l].save(filename,l);
  21571. - return *this;
  21572. - }
  21573. -
  21574. - //! Save an image sequence into a YUV file
  21575. - const CImgList& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const {
  21576. - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_yuv() : Instance list (%u,%p) is empty (file '%s').",
  21577. - pixel_type(),size,data,filename?filename:"(unknown)");
  21578. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_yuv() : Instance list (%u,%p), specified file is (null).",
  21579. - pixel_type(),size,data);
  21580. - if ((*this)[0].dimx()%2 || (*this)[0].dimy()%2)
  21581. - throw CImgInstanceException("CImgList<%s>::save_yuv() : Image dimensions must be even numbers (current are %ux%u, file '%s').",
  21582. - pixel_type(),(*this)[0].dimx(),(*this)[0].dimy(),filename?filename:"(unknown)");
  21583. -
  21584. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  21585. - cimglist_for(*this,l) {
  21586. - CImg<unsigned char> YCbCr((*this)[l]);
  21587. - if (rgb2yuv) YCbCr.RGBtoYCbCr();
  21588. - cimg::fwrite(YCbCr.ptr(),YCbCr.width*YCbCr.height,nfile);
  21589. - cimg::fwrite(YCbCr.get_resize(YCbCr.width/2, YCbCr.height/2,1,3,3).ptr(0,0,0,1),
  21590. - YCbCr.width*YCbCr.height/2,nfile);
  21591. - }
  21592. - if (!file) cimg::fclose(nfile);
  21593. - return *this;
  21594. - }
  21595. -
  21596. - //! Save an image sequence into a YUV file
  21597. - const CImgList& save_yuv(const char *const filename=0, const bool rgb2yuv=true) const {
  21598. - return save_yuv(0,filename,rgb2yuv);
  21599. - }
  21600. -
  21601. - //! Save an image list into a CImg file (RAW binary file + simple header)
  21602. - /**
  21603. - A CImg RAW file is a simple uncompressed binary file that may be used to save list of CImg<T> images.
  21604. - \param filename : name of the output file.
  21605. - \return A reference to the current CImgList instance is returned.
  21606. - **/
  21607. - const CImgList& save_cimg(std::FILE *const file, const char *const filename=0) const {
  21608. - if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_cimg() : Instance list (%u,%p) is empty (file '%s').",
  21609. - pixel_type(),size,data,filename?filename:"(unknown)");
  21610. - if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance list (%u,%p), specified file is (null).",
  21611. - pixel_type(),size,data);
  21612. - std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
  21613. - std::fprintf(nfile,"%u %s\n",size,pixel_type());
  21614. - cimglist_for(*this,l) {
  21615. - const CImg<T>& img = data[l];
  21616. - std::fprintf(nfile,"%u %u %u %u\n",img.width,img.height,img.depth,img.dim);
  21617. - if (img.data) {
  21618. - if (cimg::endian()) {
  21619. - CImg<T> tmp(img);
  21620. - cimg::endian_swap(tmp.data,tmp.size());
  21621. - cimg::fwrite(tmp.data,img.width*img.height*img.depth*img.dim,nfile);
  21622. - } else cimg::fwrite(img.data,img.width*img.height*img.depth*img.dim,nfile);
  21623. - }
  21624. - }
  21625. - if (!file) cimg::fclose(nfile);
  21626. - return *this;
  21627. - }
  21628. -
  21629. - //! Save an image list into a CImg file (RAW binary file + simple header)
  21630. - const CImgList& save_cimg(const char *const filename) const {
  21631. - return save_cimg(0,filename);
  21632. - }
  21633. -
  21634. - //! Save an image list into a OFF file.
  21635. - template<typename tf, typename tc>
  21636. - const CImgList& save_off(std::FILE *const file, const char *const filename,
  21637. - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
  21638. - get_append('x').save_off(file,filename,primitives,colors,invert_faces);
  21639. - return *this;
  21640. - }
  21641. -
  21642. - //! Save an image list into a OFF file.
  21643. - template<typename tf, typename tc>
  21644. - const CImgList& save_off(const char *const filename,
  21645. - const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool invert_faces=false) const {
  21646. - return save_off(filename,primitives,colors,invert_faces);
  21647. - }
  21648. -
  21649. - //! Return a single image which is the concatenation of all images of the current CImgList instance.
  21650. - /**
  21651. - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  21652. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  21653. - \return A CImg<T> image corresponding to the concatenation is returned.
  21654. - **/
  21655. - CImg<T> get_append(const char axe='x',const char align='c') const {
  21656. - if (is_empty()) return CImg<T>();
  21657. - unsigned int dx=0,dy=0,dz=0,dv=0,pos=0;
  21658. - CImg<T> res;
  21659. - switch(cimg::uncase(axe)) {
  21660. - case 'x': {
  21661. - cimglist_for(*this,l) {
  21662. - const CImg<T>& img = (*this)[l];
  21663. - dx += img.width;
  21664. - dy = cimg::max(dy,img.height);
  21665. - dz = cimg::max(dz,img.depth);
  21666. - dv = cimg::max(dv,img.dim);
  21667. - }
  21668. - res.assign(dx,dy,dz,dv,0);
  21669. - switch (cimg::uncase(align)) {
  21670. - case 'p' : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],pos,0,0,0); pos+=(*this)[ll].width; }} break;
  21671. - case 'n' : { cimglist_for(*this,ll) {
  21672. - res.draw_image((*this)[ll],pos,dy-(*this)[ll].height,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].width;
  21673. - }} break;
  21674. - default : { cimglist_for(*this,ll) {
  21675. - res.draw_image((*this)[ll],pos,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2);
  21676. - pos+=(*this)[ll].width;
  21677. - }} break;
  21678. - }
  21679. - } break;
  21680. - case 'y': {
  21681. - cimglist_for(*this,l) {
  21682. - const CImg<T>& img = (*this)[l];
  21683. - dx = cimg::max(dx,img.width);
  21684. - dy += img.height;
  21685. - dz = cimg::max(dz,img.depth);
  21686. - dv = cimg::max(dv,img.dim);
  21687. - }
  21688. - res.assign(dx,dy,dz,dv,0);
  21689. - switch (cimg::uncase(align)) {
  21690. - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,pos,0,0); pos+=(*this)[ll].height; }} break;
  21691. - case 'n': { cimglist_for(*this,ll) {
  21692. - res.draw_image((*this)[ll],dx-(*this)[ll].width,pos,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].height;
  21693. - }} break;
  21694. - default : { cimglist_for(*this,ll) {
  21695. - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,pos,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2);
  21696. - pos+=(*this)[ll].height;
  21697. - }} break;
  21698. - }
  21699. - } break;
  21700. - case 'z': {
  21701. - cimglist_for(*this,l) {
  21702. - const CImg<T>& img = (*this)[l];
  21703. - dx = cimg::max(dx,img.width);
  21704. - dy = cimg::max(dy,img.height);
  21705. - dz += img.depth;
  21706. - dv = cimg::max(dv,img.dim);
  21707. - }
  21708. - res.assign(dx,dy,dz,dv,0);
  21709. - switch (cimg::uncase(align)) {
  21710. - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,pos,0); pos+=(*this)[ll].depth; }} break;
  21711. - case 'n': { cimglist_for(*this,ll) {
  21712. - res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,pos,dv-(*this)[ll].dim); pos+=(*this)[ll].depth;
  21713. - }} break;
  21714. - case 'c': { cimglist_for(*this,ll) {
  21715. - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,pos,(dv-(*this)[ll].dim)/2);
  21716. - pos+=(*this)[ll].depth;
  21717. - }} break;
  21718. - }
  21719. - } break;
  21720. - case 'v': {
  21721. - cimglist_for(*this,l) {
  21722. - const CImg<T>& img = (*this)[l];
  21723. - dx = cimg::max(dx,img.width);
  21724. - dy = cimg::max(dy,img.height);
  21725. - dz = cimg::max(dz,img.depth);
  21726. - dv += img.dim;
  21727. - }
  21728. - res.assign(dx,dy,dz,dv,0);
  21729. - switch (cimg::uncase(align)) {
  21730. - case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,0,pos); pos+=(*this)[ll].dim; }} break;
  21731. - case 'n': { cimglist_for(*this,ll) {
  21732. - res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,dz-(*this)[ll].depth,pos); pos+=(*this)[ll].dim;
  21733. - }} break;
  21734. - case 'c': { cimglist_for(*this,ll) {
  21735. - res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,pos);
  21736. - pos+=(*this)[ll].dim;
  21737. - }} break;
  21738. - }
  21739. - } break;
  21740. - default: throw CImgArgumentException("CImg<%s>::get_append() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe);
  21741. - }
  21742. - return res;
  21743. - }
  21744. -
  21745. - // Create an auto-cropped font (along the X axis) from a input font \p font.
  21746. - CImgList<T> get_crop_font() const {
  21747. - CImgList<T> res;
  21748. - cimglist_for(*this,l) {
  21749. - const CImg<T>& letter = (*this)[l];
  21750. - int xmin = letter.width, xmax = 0;
  21751. - cimg_forXY(letter,x,y) if (letter(x,y)) { if (x<xmin) xmin=x; if (x>xmax) xmax=x; }
  21752. - if (xmin>xmax) res.insert(CImg<T>(letter.width,letter.height,1,letter.dim,0));
  21753. - else res.insert(letter.get_crop(xmin,0,xmax,letter.height-1));
  21754. - }
  21755. - res[' '].resize(res['f'].width);
  21756. - res[' '+256].resize(res['f'].width);
  21757. - return res;
  21758. - }
  21759. -
  21760. - CImgList<T>& crop_font() {
  21761. - return get_crop_font().swap(*this);
  21762. - }
  21763. -
  21764. - static CImgList<T> get_font(const unsigned int *const font,const unsigned int w,const unsigned int h,
  21765. - const unsigned int paddingx, const unsigned int paddingy, const bool variable_size=true) {
  21766. - CImgList<T> res = CImgList<T>(256,w,h,1,3).insert(CImgList<T>(256,w,h,1,1));
  21767. - const unsigned int *ptr = font;
  21768. - unsigned int m = 0, val = 0;
  21769. - for (unsigned int y=0; y<h; y++)
  21770. - for (unsigned int x=0; x<256*w; x++) {
  21771. - m>>=1; if (!m) { m=0x80000000; val = *(ptr++); }
  21772. - CImg<T>& img = res[x/w], &mask = res[x/w+256];
  21773. - unsigned int xm = x%w;
  21774. - img(xm,y,0) = img(xm,y,1) = img(xm,y,2) = mask(xm,y,0) = (T)((val&m)?1:0);
  21775. - }
  21776. - if (variable_size) res.crop_font();
  21777. - if (paddingx || paddingy) cimglist_for(res,l) res[l].resize(res[l].dimx()+paddingx, res[l].dimy()+paddingy,1,-100,0);
  21778. - return res;
  21779. - }
  21780. -
  21781. - //! Return a CImg pre-defined font with desired size
  21782. - /**
  21783. - \param font_height = height of the desired font (can be 11,13,24,38 or 57)
  21784. - \param fixed_size = tell if the font has a fixed or variable width.
  21785. - **/
  21786. - static CImgList<T> get_font(const unsigned int font_width, const bool variable_size=true) {
  21787. - if (font_width<=11) {
  21788. - static CImgList<T> font7x11, nfont7x11;
  21789. - if (!variable_size && font7x11.is_empty()) font7x11 = get_font(cimg::font7x11,7,11,1,0,false);
  21790. - if (variable_size && nfont7x11.is_empty()) nfont7x11 = get_font(cimg::font7x11,7,11,1,0,true);
  21791. - return variable_size?nfont7x11:font7x11;
  21792. - }
  21793. - if (font_width<=13) {
  21794. - static CImgList<T> font10x13, nfont10x13;
  21795. - if (!variable_size && font10x13.is_empty()) font10x13 = get_font(cimg::font10x13,10,13,1,0,false);
  21796. - if (variable_size && nfont10x13.is_empty()) nfont10x13 = get_font(cimg::font10x13,10,13,1,0,true);
  21797. - return variable_size?nfont10x13:font10x13;
  21798. - }
  21799. - if (font_width<=17) {
  21800. - static CImgList<T> font8x17, nfont8x17;
  21801. - if (!variable_size && font8x17.is_empty()) font8x17 = get_font(cimg::font8x17,8,17,1,0,false);
  21802. - if (variable_size && nfont8x17.is_empty()) nfont8x17 = get_font(cimg::font8x17,8,17,1,0,true);
  21803. - return variable_size?nfont8x17:font8x17;
  21804. - }
  21805. - if (font_width<=19) {
  21806. - static CImgList<T> font10x19, nfont10x19;
  21807. - if (!variable_size && font10x19.is_empty()) font10x19 = get_font(cimg::font10x19,10,19,2,0,false);
  21808. - if (variable_size && nfont10x19.is_empty()) nfont10x19 = get_font(cimg::font10x19,10,19,2,0,true);
  21809. - return variable_size?nfont10x19:font10x19;
  21810. - }
  21811. - if (font_width<=24) {
  21812. - static CImgList<T> font12x24, nfont12x24;
  21813. - if (!variable_size && font12x24.is_empty()) font12x24 = get_font(cimg::font12x24,12,24,2,0,false);
  21814. - if (variable_size && nfont12x24.is_empty()) nfont12x24 = get_font(cimg::font12x24,12,24,2,0,true);
  21815. - return variable_size?nfont12x24:font12x24;
  21816. - }
  21817. - if (font_width<=32) {
  21818. - static CImgList<T> font16x32, nfont16x32;
  21819. - if (!variable_size && font16x32.is_empty()) font16x32 = get_font(cimg::font16x32,16,32,2,0,false);
  21820. - if (variable_size && nfont16x32.is_empty()) nfont16x32 = get_font(cimg::font16x32,16,32,2,0,true);
  21821. - return variable_size?nfont16x32:font16x32;
  21822. - }
  21823. - if (font_width<=38) {
  21824. - static CImgList<T> font19x38, nfont19x38;
  21825. - if (!variable_size && font19x38.is_empty()) font19x38 = get_font(cimg::font19x38,19,38,3,0,false);
  21826. - if (variable_size && nfont19x38.is_empty()) nfont19x38 = get_font(cimg::font19x38,19,38,3,0,true);
  21827. - return variable_size?nfont19x38:font19x38;
  21828. - }
  21829. - static CImgList<T> font29x57, nfont29x57;
  21830. - if (!variable_size && font29x57.is_empty()) font29x57 = get_font(cimg::font29x57,29,57,5,0,false);
  21831. - if (variable_size && nfont29x57.is_empty()) nfont29x57 = get_font(cimg::font29x57,29,57,5,0,true);
  21832. - return variable_size?nfont29x57:font29x57;
  21833. - }
  21834. -
  21835. - //! Display the current CImgList instance in an existing CImgDisplay window (by reference).
  21836. - /**
  21837. - This function displays the list images of the current CImgList instance into an existing CImgDisplay window.
  21838. - Images of the list are concatenated in a single temporarly image for visualization purposes.
  21839. - The function returns immediately.
  21840. - \param disp : reference to an existing CImgDisplay instance, where the current image list will be displayed.
  21841. - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  21842. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  21843. - \return A reference to the current CImgList instance is returned.
  21844. - **/
  21845. - const CImgList& display(CImgDisplay& disp, const char axe='x', const char align='c') const {
  21846. - get_append(axe,align).display(disp);
  21847. - return *this;
  21848. - }
  21849. -
  21850. - //! Display the current CImgList instance in a new display window.
  21851. - /**
  21852. - This function opens a new window with a specific title and displays the list images of the current CImgList instance into it.
  21853. - Images of the list are concatenated in a single temporarly image for visualization purposes.
  21854. - The function returns when a key is pressed or the display window is closed by the user.
  21855. - \param title : specify the title of the opening display window.
  21856. - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  21857. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  21858. - \param min_size : specify the minimum size of the opening display window. Images having dimensions below this
  21859. - size will be upscaled.
  21860. - \param max_size : specify the maximum size of the opening display window. Images having dimensions above this
  21861. - size will be downscaled.
  21862. - \return A reference to the current CImgList instance is returned.
  21863. - **/
  21864. - const CImgList& display(const char* title,const char axe='x',const char align='c',
  21865. - const int min_size=128,const int max_size=1024) const {
  21866. - get_append(axe,align).display(title,min_size,max_size);
  21867. - return *this;
  21868. - }
  21869. -
  21870. - //! Display the current CImgList instance in a new display window.
  21871. - /**
  21872. - This function opens a new window and displays the list images of the current CImgList instance into it.
  21873. - Images of the list are concatenated in a single temporarly image for visualization purposes.
  21874. - The function returns when a key is pressed or the display window is closed by the user.
  21875. - \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  21876. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  21877. - \param min_size : specify the minimum size of the opening display window. Images having dimensions below this
  21878. - size will be upscaled.
  21879. - \param max_size : specify the maximum size of the opening display window. Images having dimensions above this
  21880. - size will be downscaled.
  21881. - \return A reference to the current CImgList instance is returned.
  21882. - **/
  21883. - const CImgList& display(const char axe='x',const char align='c',
  21884. - const int min_size=128,const int max_size=1024) const {
  21885. - return display(" ",axe,align,min_size,max_size);
  21886. - }
  21887. -
  21888. - //! Rescale and center 3D object
  21889. - CImgList& resize_object3d(const float siz=100, const bool centering=true) {
  21890. - float xm = (float)((*this)(0,0)), ym = (float)((*this)(0,1)), zm = (float)((*this)(0,2)), xM = xm, yM = ym, zM = zm;
  21891. - for (unsigned int p=1; p<size; p++) {
  21892. - const float x = (float)((*this)(p,0)), y = (float)((*this)(p,1)), z = (float)((*this)(p,2));
  21893. - if (x<xm) xm = x;
  21894. - if (y<ym) ym = y;
  21895. - if (z<zm) zm = z;
  21896. - if (x>xM) xM = x;
  21897. - if (y>yM) yM = y;
  21898. - if (z>zM) zM = z;
  21899. - }
  21900. - const float
  21901. - cx = 0.5f*(xm+xM),
  21902. - cy = 0.5f*(ym+yM),
  21903. - cz = 0.5f*(zm+zM),
  21904. - delta = cimg::max(xM-xm,yM-ym,zM-zm),
  21905. - ratio = (siz>=0)?siz/delta:-siz/100;
  21906. - if (centering) cimglist_for(*this,l) {
  21907. - T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2);
  21908. - x = (T)((x-cx)*ratio);
  21909. - y = (T)((y-cy)*ratio);
  21910. - z = (T)((z-cz)*ratio);
  21911. - } else cimglist_for(*this,l) {
  21912. - T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2);
  21913. - x = (T)(cx+(x-cx)*ratio);
  21914. - y = (T)(cy+(y-cy)*ratio);
  21915. - z = (T)(cz+(z-cz)*ratio);
  21916. - }
  21917. - return *this;
  21918. - }
  21919. -
  21920. - //! Get a rescaled and centered version of the 3D object
  21921. - CImgList get_resize_object3d(const float siz=100, const bool centering=true) const {
  21922. - return CImgList<T>(*this).resize_object3d(siz,centering);
  21923. - }
  21924. -
  21925. - // Swap fields of two CImgList instances.
  21926. - CImgList& swap(CImgList& list) {
  21927. - cimg::swap(size,list.size);
  21928. - cimg::swap(allocsize,list.allocsize);
  21929. - cimg::swap(data,list.data);
  21930. - return list;
  21931. - }
  21932. -
  21933. - };
  21934. -
  21935. - /*
  21936. - #-----------------------------------------
  21937. - #
  21938. - #
  21939. - #
  21940. - # Complete previously defined functions
  21941. - #
  21942. - #
  21943. - #
  21944. - #------------------------------------------
  21945. - */
  21946. -
  21947. -#ifdef cimg_use_visualcpp6
  21948. - template<typename t> inline CImg<t> operator+(const CImg<t>& img, const t& val) {
  21949. - return CImg<t>(img,false)+=val;
  21950. - }
  21951. -#else
  21952. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img, const t2& val) {
  21953. - typedef typename cimg::largest<t1,t2>::type restype;
  21954. - return CImg<restype>(img,false)+=val;
  21955. - }
  21956. -#endif
  21957. -
  21958. -#ifdef cimg_use_visualcpp6
  21959. - template<typename t> inline CImg<t> operator+(const t& val, const CImg<t>& img) {
  21960. - return img+val;
  21961. - }
  21962. -#else
  21963. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const t1& val, const CImg<t2>& img) {
  21964. - return img+val;
  21965. - }
  21966. -#endif
  21967. -
  21968. -#ifdef cimg_use_visualcpp6
  21969. - template<typename t> inline CImgList<t> operator+(const CImgList<t>& list, const t& val) {
  21970. - return CImgList<t>(list)+=val;
  21971. - }
  21972. -#else
  21973. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list, const t2& val) {
  21974. - typedef typename cimg::largest<t1,t2>::type restype;
  21975. - return CImgList<restype>(list)+=val;
  21976. - }
  21977. -#endif
  21978. -
  21979. -#ifdef cimg_use_visualcpp6
  21980. - template<typename t> inline CImgList<t> operator+(const t& val, const CImgList<t>& list) {
  21981. - return list+val;
  21982. - }
  21983. -#else
  21984. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const t1& val, const CImgList<t2>& list) {
  21985. - return list+val;
  21986. - }
  21987. -#endif
  21988. -
  21989. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img1, const CImg<t2>& img2) {
  21990. - typedef typename cimg::largest<t1,t2>::type restype;
  21991. - return CImg<restype>(img1,false)+=img2;
  21992. - }
  21993. -
  21994. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImg<t1>& img, const CImgList<t2>& list) {
  21995. - typedef typename cimg::largest<t1,t2>::type restype;
  21996. - return CImgList<restype>(list)+=img;
  21997. - }
  21998. -
  21999. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list, const CImg<t2>& img) {
  22000. - return img+list;
  22001. - }
  22002. -
  22003. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator+(const CImgList<t1>& list1, const CImgList<t2>& list2) {
  22004. - typedef typename cimg::largest<t1,t2>::type restype;
  22005. - return CImgList<restype>(list1)+=list2;
  22006. - }
  22007. -
  22008. -#ifdef cimg_use_visualcpp6
  22009. - template<typename t> inline CImg<t> operator-(const CImg<t>& img, const t& val) {
  22010. - return CImg<t>(img,false)-=val;
  22011. - }
  22012. -#else
  22013. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img, const t2& val) {
  22014. - typedef typename cimg::largest<t1,t2>::type restype;
  22015. - return CImg<restype>(img,false)-=val;
  22016. - }
  22017. -#endif
  22018. -
  22019. -#ifdef cimg_use_visualcpp6
  22020. - template<typename t> inline CImg<t> operator-(const t& val, const CImg<t>& img) {
  22021. - return CImg<t>(img.width,img.height,img.depth,img.dim,val)-=img;
  22022. - }
  22023. -#else
  22024. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const t1& val, const CImg<t2>& img) {
  22025. - typedef typename cimg::largest<t1,t2>::type restype;
  22026. - return CImg<restype>(img.width,img.height,img.depth,img.dim,(restype)val)-=img;
  22027. - }
  22028. -#endif
  22029. -
  22030. -#ifdef cimg_use_visualcpp6
  22031. - template<typename t> inline CImgList<t> operator-(const CImgList<t>& list, const t& val) {
  22032. - return CImgList<t>(list)-=val;
  22033. - }
  22034. -#else
  22035. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list, const t2& val) {
  22036. - typedef typename cimg::largest<t1,t2>::type restype;
  22037. - return CImgList<restype>(list)-=val;
  22038. - }
  22039. -#endif
  22040. -
  22041. -#ifdef cimg_use_visualcpp6
  22042. - template<typename t> inline CImgList<double> operator-(const t& val, const CImgList<t>& list) {
  22043. - CImgList<t> res(list.size);
  22044. - cimglist_for(res,l) res[l] = val-list[l];
  22045. - return res;
  22046. - }
  22047. -#else
  22048. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const t1& val, const CImgList<t2>& list) {
  22049. - typedef typename cimg::largest<t1,t2>::type restype;
  22050. - CImgList<restype> res(list.size);
  22051. - cimglist_for(res,l) res[l] = val-list[l];
  22052. - return res;
  22053. - }
  22054. -#endif
  22055. -
  22056. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img1, const CImg<t2>& img2) {
  22057. - typedef typename cimg::largest<t1,t2>::type restype;
  22058. - return CImg<restype>(img1,false)-=img2;
  22059. - }
  22060. -
  22061. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImg<t1>& img, const CImgList<t2>& list) {
  22062. - typedef typename cimg::largest<t1,t2>::type restype;
  22063. - CImgList<restype> res(list.size);
  22064. - cimglist_for(res,l) res[l] = img-list[l];
  22065. - return res;
  22066. - }
  22067. -
  22068. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list, const CImg<t2>& img) {
  22069. - typedef typename cimg::largest<t1,t2>::type restype;
  22070. - return CImgList<restype>(list)-=img;
  22071. - }
  22072. -
  22073. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator-(const CImgList<t1>& list1, const CImgList<t2>& list2) {
  22074. - typedef typename cimg::largest<t1,t2>::type restype;
  22075. - return CImgList<restype>(list1)-=list2;
  22076. - }
  22077. -
  22078. -#ifdef cimg_use_visualcpp6
  22079. - template<typename t> inline CImg<t> operator*(const CImg<t>& img, const double val) {
  22080. - return CImg<t>(img,false)*=val;
  22081. - }
  22082. -#else
  22083. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img, const t2& val) {
  22084. - typedef typename cimg::largest<t1,t2>::type restype;
  22085. - return CImg<restype>(img,false)*=val;
  22086. - }
  22087. -#endif
  22088. -
  22089. -#ifdef cimg_use_visualcpp6
  22090. - template<typename t> inline CImg<t> operator*(const double val, const CImg<t>& img) {
  22091. - return img*val;
  22092. - }
  22093. -#else
  22094. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const t1& val, const CImg<t2>& img) {
  22095. - return img*val;
  22096. - }
  22097. -#endif
  22098. -
  22099. -#ifdef cimg_use_visualcpp6
  22100. - template<typename t> inline CImgList<t> operator*(const CImgList<t>& list, const double val) {
  22101. - return CImgList<t>(list)*=val;
  22102. - }
  22103. -#else
  22104. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list, const t2& val) {
  22105. - typedef typename cimg::largest<t1,t2>::type restype;
  22106. - return CImgList<restype>(list)*=val;
  22107. - }
  22108. -#endif
  22109. -
  22110. -#ifdef cimg_use_visualcpp6
  22111. - template<typename t> inline CImgList<t> operator*(const double val, const CImgList<t>& list) {
  22112. - return list*val;
  22113. - }
  22114. -#else
  22115. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const t1& val, const CImgList<t2>& list) {
  22116. - return list*val;
  22117. - }
  22118. -#endif
  22119. -
  22120. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img1, const CImg<t2>& img2) {
  22121. - typedef typename cimg::largest<t1,t2>::type restype;
  22122. - if (img1.width!=img2.height)
  22123. - throw CImgArgumentException("operator*() : can't multiply a matrix (%ux%u) by a matrix (%ux%u)",
  22124. - img1.width,img1.height,img2.width,img2.height);
  22125. - CImg<restype> res(img2.width,img1.height);
  22126. - restype val;
  22127. - cimg_forXY(res,i,j) { val=0; cimg_forX(img1,k) val+=img1(k,j)*img2(i,k); res(i,j) = val; }
  22128. - return res;
  22129. - }
  22130. -
  22131. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImg<t1>& img, const CImgList<t2>& list) {
  22132. - typedef typename cimg::largest<t1,t2>::type restype;
  22133. - CImgList<restype> res(list.size);
  22134. - cimglist_for(res,l) res[l] = img*list[l];
  22135. - return res;
  22136. - }
  22137. -
  22138. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list, const CImg<t2>& img) {
  22139. - typedef typename cimg::largest<t1,t2>::type restype;
  22140. - CImgList<restype> res(list.size);
  22141. - cimglist_for(res,l) res[l] = list[l]*img;
  22142. - return res;
  22143. - }
  22144. -
  22145. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator*(const CImgList<t1>& list1, const CImgList<t2>& list2) {
  22146. - typedef typename cimg::largest<t1,t2>::type restype;
  22147. - CImgList<restype> res(cimg::min(list1.size,list2.size));
  22148. - cimglist_for(res,l) res[l] = list1[l]*list2[l];
  22149. - return res;
  22150. - }
  22151. -
  22152. -#ifdef cimg_use_visualcpp6
  22153. - template<typename t> inline CImg<t> operator/(const CImg<t>& img, const double val) {
  22154. - return CImg<t>(img,false)/=val;
  22155. - }
  22156. -#else
  22157. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img, const t2& val) {
  22158. - typedef typename cimg::largest<t1,t2>::type restype;
  22159. - return CImg<restype>(img,false)/=val;
  22160. - }
  22161. -#endif
  22162. -
  22163. -#ifdef cimg_use_visualcpp6
  22164. - template<typename t> inline CImg<t> operator/(const double val, CImg<t>& img) {
  22165. - return val*img.get_inverse();
  22166. - }
  22167. -#else
  22168. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const t1& val, CImg<t2>& img) {
  22169. - return val*img.get_inverse();
  22170. - }
  22171. -#endif
  22172. -
  22173. -#ifdef cimg_use_visualcpp6
  22174. - template<typename t> inline CImgList<t> operator/(const CImgList<t>& list, const double val) {
  22175. - return CImgList<t>(list)/=val;
  22176. - }
  22177. -#else
  22178. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list, const t2& val) {
  22179. - typedef typename cimg::largest<t1,t2>::type restype;
  22180. - return CImgList<restype>(list)/=val;
  22181. - }
  22182. -#endif
  22183. -
  22184. -#ifdef cimg_use_visualcpp6
  22185. - template<typename t> inline CImgList<t> operator/(const double val, const CImgList<t>& list) {
  22186. - CImgList<t> res(list.size);
  22187. - cimglist_for(res,l) res[l] = val/list[l];
  22188. - return res;
  22189. - }
  22190. -#else
  22191. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const t1& val, const CImgList<t2>& list) {
  22192. - typedef typename cimg::largest<t1,t2>::type restype;
  22193. - CImgList<restype> res(list.size);
  22194. - cimglist_for(res,l) res[l] = val/list[l];
  22195. - return res;
  22196. - }
  22197. -#endif
  22198. -
  22199. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img1, const CImg<t2>& img2) {
  22200. - typedef typename cimg::largest<t1,t2>::type restype;
  22201. - return CImg<restype>(img1,false)*=img2.get_inverse();
  22202. - }
  22203. -
  22204. - template<typename t1, typename t2> inline CImg<typename cimg::largest<t1,t2>::type> operator/(const CImg<t1>& img, const CImgList<t2>& list) {
  22205. - typedef typename cimg::largest<t1,t2>::type restype;
  22206. - CImgList<restype> res(list.size);
  22207. - cimglist_for(res,l) res[l] = img/list[l];
  22208. - return res;
  22209. - }
  22210. -
  22211. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list, const CImg<t2>& img) {
  22212. - typedef typename cimg::largest<t1,t2>::type restype;
  22213. - return CImgList<restype>(list)/=img;
  22214. - }
  22215. -
  22216. - template<typename t1, typename t2> inline CImgList<typename cimg::largest<t1,t2>::type> operator/(const CImgList<t1>& list1, const CImgList<t2>& list2) {
  22217. - typedef typename cimg::largest<t1,t2>::type restype;
  22218. - return CImgList<restype>(list1)/=list2;
  22219. - }
  22220. -
  22221. -namespace cimg {
  22222. -
  22223. - //! Display a dialog box, where a user can click standard buttons.
  22224. - /**
  22225. - Up to 6 buttons can be defined in the dialog window.
  22226. - This function returns when a user clicked one of the button or closed the dialog window.
  22227. - \param title = Title of the dialog window.
  22228. - \param msg = Main message displayed inside the dialog window.
  22229. - \param button1_txt = Label of the 1st button.
  22230. - \param button2_txt = Label of the 2nd button.
  22231. - \param button3_txt = Label of the 3rd button.
  22232. - \param button4_txt = Label of the 4th button.
  22233. - \param button5_txt = Label of the 5th button.
  22234. - \param button6_txt = Label of the 6th button.
  22235. - \param logo = Logo image displayed at the left of the main message. This parameter is optional.
  22236. - \param centering = Tell to center the dialog window on the screen.
  22237. - \return The button number (from 0 to 5), or -1 if the dialog window has been closed by the user.
  22238. - \note If a button text is set to 0, then the corresponding button (and the followings) won't appear in
  22239. - the dialog box. At least one button is necessary.
  22240. - **/
  22241. -
  22242. - template<typename t>
  22243. - inline int dialog(const char *title,const char *msg,
  22244. - const char *button1_txt,const char *button2_txt,
  22245. - const char *button3_txt,const char *button4_txt,
  22246. - const char *button5_txt,const char *button6_txt,
  22247. - const CImg<t>& logo, const bool centering = false) {
  22248. -#if cimg_display_type!=0
  22249. - const unsigned char
  22250. - black[3]={0,0,0}, white[3]={255,255,255}, gray[3]={200,200,200}, gray2[3]={150,150,150};
  22251. -
  22252. - // Create buttons and canvas graphics
  22253. - CImgList<unsigned char> buttons, cbuttons, sbuttons;
  22254. - if (button1_txt) { buttons.insert(CImg<unsigned char>().draw_text(button1_txt,0,0,black,gray,13));
  22255. - if (button2_txt) { buttons.insert(CImg<unsigned char>().draw_text(button2_txt,0,0,black,gray,13));
  22256. - if (button3_txt) { buttons.insert(CImg<unsigned char>().draw_text(button3_txt,0,0,black,gray,13));
  22257. - if (button4_txt) { buttons.insert(CImg<unsigned char>().draw_text(button4_txt,0,0,black,gray,13));
  22258. - if (button5_txt) { buttons.insert(CImg<unsigned char>().draw_text(button5_txt,0,0,black,gray,13));
  22259. - if (button6_txt) { buttons.insert(CImg<unsigned char>().draw_text(button6_txt,0,0,black,gray,13));
  22260. - }}}}}}
  22261. - if (!buttons.size) throw CImgArgumentException("cimg::dialog() : No buttons have been defined. At least one is necessary");
  22262. -
  22263. - unsigned int bw=0, bh=0;
  22264. - cimglist_for(buttons,l) { bw = cimg::max(bw,buttons[l].width); bh = cimg::max(bh,buttons[l].height); }
  22265. - bw+=8; bh+=8;
  22266. - if (bw<64) bw=64;
  22267. - if (bw>128) bw=128;
  22268. - if (bh<24) bh=24;
  22269. - if (bh>48) bh=48;
  22270. -
  22271. - CImg<unsigned char> button = CImg<unsigned char>(bw,bh,1,3).
  22272. - draw_rectangle(0,0,bw-1,bh-1,gray).
  22273. - draw_line(0,0,bw-1,0,white).draw_line(0,bh-1,0,0,white).
  22274. - draw_line(bw-1,0,bw-1,bh-1,black).draw_line(bw-1,bh-1,0,bh-1,black).
  22275. - draw_line(1,bh-2,bw-2,bh-2,gray2).draw_line(bw-2,bh-2,bw-2,1,gray2);
  22276. - CImg<unsigned char> sbutton = CImg<unsigned char>(bw,bh,1,3).
  22277. - draw_rectangle(0,0,bw-1,bh-1,gray).
  22278. - draw_line(0,0,bw-1,0,black).draw_line(bw-1,0,bw-1,bh-1,black).
  22279. - draw_line(bw-1,bh-1,0,bh-1,black).draw_line(0,bh-1,0,0,black).
  22280. - draw_line(1,1,bw-2,1,white).draw_line(1,bh-2,1,1,white).
  22281. - draw_line(bw-2,1,bw-2,bh-2,black).draw_line(bw-2,bh-2,1,bh-2,black).
  22282. - draw_line(2,bh-3,bw-3,bh-3,gray2).draw_line(bw-3,bh-3,bw-3,2,gray2).
  22283. - draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA).
  22284. - draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA);
  22285. - CImg<unsigned char> cbutton = CImg<unsigned char>(bw,bh,1,3).
  22286. - draw_rectangle(0,0,bw-1,bh-1,black).draw_rectangle(1,1,bw-2,bh-2,gray2).draw_rectangle(2,2,bw-3,bh-3,gray).
  22287. - draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA).
  22288. - draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA);
  22289. -
  22290. - cimglist_for(buttons,ll) {
  22291. - cbuttons.insert(CImg<unsigned char>(cbutton).draw_image(buttons[ll],1+(bw-buttons[ll].dimx())/2,1+(bh-buttons[ll].dimy())/2));
  22292. - sbuttons.insert(CImg<unsigned char>(sbutton).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2));
  22293. - buttons[ll] = CImg<unsigned char>(button).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2);
  22294. - }
  22295. -
  22296. - CImg<unsigned char> canvas;
  22297. - if (msg) canvas = CImg<unsigned char>().draw_text(msg,0,0,black,gray,13);
  22298. - const unsigned int
  22299. - bwall = (buttons.size-1)*(12+bw) + bw,
  22300. - w = cimg::max(196U,36+logo.width+canvas.width, 24+bwall),
  22301. - h = cimg::max(96U,36+canvas.height+bh,36+logo.height+bh),
  22302. - lx = 12 + (canvas.data?0:((w-24-logo.width)/2)),
  22303. - ly = (h-12-bh-logo.height)/2,
  22304. - tx = lx+logo.width+12,
  22305. - ty = (h-12-bh-canvas.height)/2,
  22306. - bx = (w-bwall)/2,
  22307. - by = h-12-bh;
  22308. -
  22309. - if (canvas.data)
  22310. - canvas = CImg<unsigned char>(w,h,1,3).
  22311. - draw_rectangle(0,0,w-1,h-1,gray).
  22312. - draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white).
  22313. - draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black).
  22314. - draw_image(canvas,tx,ty);
  22315. - else
  22316. - canvas = CImg<unsigned char>(w,h,1,3).
  22317. - draw_rectangle(0,0,w-1,h-1,gray).
  22318. - draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white).
  22319. - draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black);
  22320. - if (logo.data) canvas.draw_image(logo,lx,ly);
  22321. -
  22322. - unsigned int xbuttons[6];
  22323. - cimglist_for(buttons,lll) { xbuttons[lll] = bx+(bw+12)*lll; canvas.draw_image(buttons[lll],xbuttons[lll],by); }
  22324. -
  22325. - // Open window and enter events loop
  22326. - CImgDisplay disp(canvas,title?title:" ",0,3,false,centering?true:false);
  22327. - if (centering) disp.move((CImgDisplay::screen_dimx()-disp.dimx())/2,
  22328. - (CImgDisplay::screen_dimy()-disp.dimy())/2);
  22329. - bool stopflag = false, refresh = false;
  22330. - int oselected = -1, oclicked = -1, selected = -1, clicked = -1;
  22331. - while (!disp.is_closed && !stopflag) {
  22332. - if (refresh) {
  22333. - if (clicked>=0) CImg<unsigned char>(canvas).draw_image(cbuttons[clicked],xbuttons[clicked],by).display(disp);
  22334. - else {
  22335. - if (selected>=0) CImg<unsigned char>(canvas).draw_image(sbuttons[selected],xbuttons[selected],by).display(disp);
  22336. - else canvas.display(disp);
  22337. - }
  22338. - refresh = false;
  22339. - }
  22340. - disp.wait(15);
  22341. - if (disp.is_resized) disp.resize(disp);
  22342. -
  22343. - if (disp.button&1) {
  22344. - oclicked = clicked;
  22345. - clicked = -1;
  22346. - cimglist_for(buttons,l)
  22347. - if (disp.mouse_y>=(int)by && disp.mouse_y<(int)(by+bh) &&
  22348. - disp.mouse_x>=(int)xbuttons[l] && disp.mouse_x<(int)(xbuttons[l]+bw)) {
  22349. - clicked = selected = l;
  22350. - refresh = true;
  22351. - }
  22352. - if (clicked!=oclicked) refresh = true;
  22353. - } else if (clicked>=0) stopflag = true;
  22354. -
  22355. - if (disp.key) {
  22356. - oselected = selected;
  22357. - switch (disp.key) {
  22358. - case cimg::keyESC: selected=-1; stopflag=true; break;
  22359. - case cimg::keyENTER: if (selected<0) selected=0; stopflag = true; break;
  22360. - case cimg::keyTAB:
  22361. - case cimg::keyARROWRIGHT:
  22362. - case cimg::keyARROWDOWN: selected = (selected+1)%buttons.size; break;
  22363. - case cimg::keyARROWLEFT:
  22364. - case cimg::keyARROWUP: selected = (selected+buttons.size-1)%buttons.size; break;
  22365. - }
  22366. - disp.key = 0;
  22367. - if (selected!=oselected) refresh = true;
  22368. - }
  22369. - }
  22370. - if (disp.is_closed) selected = -1;
  22371. - return selected;
  22372. -#else
  22373. - std::fprintf(stderr,"<%s>\n\n%s\n\n",title,msg);
  22374. - return -1+0*(int)(button1_txt-button2_txt+button3_txt-button4_txt+button5_txt-button6_txt+logo.width+(int)centering);
  22375. -#endif
  22376. - }
  22377. -
  22378. - inline int dialog(const char *title,const char *msg,
  22379. - const char *button1_txt,const char *button2_txt,const char *button3_txt,
  22380. - const char *button4_txt,const char *button5_txt,const char *button6_txt,
  22381. - const bool centering) {
  22382. - return dialog(title,msg,button1_txt,button2_txt,button3_txt,button4_txt,button5_txt,button6_txt,
  22383. - CImg<unsigned char>::get_logo40x38(),centering);
  22384. - }
  22385. -
  22386. -
  22387. - // Inner routine used by the Marching cube algorithm
  22388. - template<typename t> inline int _marching_cubes_indice(const unsigned int edge, const CImg<t>& indices1, const CImg<t>& indices2,
  22389. - const unsigned int x, const unsigned int y, const unsigned int nx, const unsigned int ny) {
  22390. - switch (edge) {
  22391. - case 0: return indices1(x,y,0);
  22392. - case 1: return indices1(nx,y,1);
  22393. - case 2: return indices1(x,ny,0);
  22394. - case 3: return indices1(x,y,1);
  22395. - case 4: return indices2(x,y,0);
  22396. - case 5: return indices2(nx,y,1);
  22397. - case 6: return indices2(x,ny,0);
  22398. - case 7: return indices2(x,y,1);
  22399. - case 8: return indices1(x,y,2);
  22400. - case 9: return indices1(nx,y,2);
  22401. - case 10: return indices1(nx,ny,2);
  22402. - case 11: return indices1(x,ny,2);
  22403. - }
  22404. - return 0;
  22405. - }
  22406. -
  22407. - //! Polygonize an implicit function
  22408. - // This function uses the Marching Cubes Tables published on the web page :
  22409. - // http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/
  22410. - template<typename tfunc, typename tp, typename tf>
  22411. - inline void marching_cubes(const tfunc& func, const float isovalue,
  22412. - const float x0,const float y0,const float z0,
  22413. - const float x1,const float y1,const float z1,
  22414. - const float resx,const float resy,const float resz,
  22415. - CImgList<tp>& points, CImgList<tf>& primitives,
  22416. - const bool invert_faces) {
  22417. -
  22418. - static unsigned int edges[256]={
  22419. - 0x000, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00,
  22420. - 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90,
  22421. - 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30,
  22422. - 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0,
  22423. - 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60,
  22424. - 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0,
  22425. - 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950,
  22426. - 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0,
  22427. - 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0,
  22428. - 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650,
  22429. - 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0,
  22430. - 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460,
  22431. - 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0,
  22432. - 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230,
  22433. - 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190,
  22434. - 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x000 };
  22435. -
  22436. - static int triangles[256][16] =
  22437. - {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22438. - {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22439. - {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22440. - {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1},
  22441. - {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22442. - {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1},
  22443. - {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1},
  22444. - {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22445. - {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22446. - {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1},
  22447. - {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1},
  22448. - {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1},
  22449. - {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1},
  22450. - {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1},
  22451. - {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1},
  22452. - {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1},
  22453. - {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22454. - {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1},
  22455. - {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
  22456. - {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1},
  22457. - {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
  22458. - {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1},
  22459. - {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1},
  22460. - {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1},
  22461. - {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1},
  22462. - {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22463. - {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1},
  22464. - {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1},
  22465. - {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1},
  22466. - {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1},
  22467. - {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1},
  22468. - {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22469. - {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22470. - {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1},
  22471. - {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1},
  22472. - {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1},
  22473. - {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1},
  22474. - {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1},
  22475. - {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1},
  22476. - {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1},
  22477. - {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1},
  22478. - {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1},
  22479. - {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1},
  22480. - {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1},
  22481. - {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1},
  22482. - {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1},
  22483. - {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1},
  22484. - {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1},
  22485. - {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1},
  22486. - {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1},
  22487. - {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1},
  22488. - {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1},
  22489. - {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1},
  22490. - {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1},
  22491. - {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1},
  22492. - {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22493. - {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1},
  22494. - {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1},
  22495. - {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1},
  22496. - {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22497. - {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1},
  22498. - {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1},
  22499. - {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22500. - {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22501. - {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22502. - {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
  22503. - {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1},
  22504. - {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1},
  22505. - {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1},
  22506. - {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1},
  22507. - {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1},
  22508. - {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1},
  22509. - {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1},
  22510. - {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1},
  22511. - {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1},
  22512. - {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1},
  22513. - {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22514. - {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1},
  22515. - {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1},
  22516. - {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22517. - {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
  22518. - {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1},
  22519. - {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1},
  22520. - {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1},
  22521. - {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1},
  22522. - {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1},
  22523. - {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1},
  22524. - {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1},
  22525. - {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1},
  22526. - {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1},
  22527. - {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1},
  22528. - {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1},
  22529. - {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1},
  22530. - {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22531. - {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1},
  22532. - {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22533. - {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1},
  22534. - {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1},
  22535. - {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1},
  22536. - {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1},
  22537. - {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1},
  22538. - {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1},
  22539. - {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1},
  22540. - {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22541. - {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1},
  22542. - {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1},
  22543. - {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1},
  22544. - {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22545. - {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1},
  22546. - {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1},
  22547. - {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22548. - {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22549. - {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1},
  22550. - {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1},
  22551. - {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1},
  22552. - {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1},
  22553. - {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1},
  22554. - {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22555. - {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1},
  22556. - {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22557. - {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1},
  22558. - {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22559. - {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1},
  22560. - {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22561. - {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22562. - {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22563. - {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
  22564. - {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}};
  22565. -
  22566. - const unsigned int
  22567. - nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1,
  22568. - ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1,
  22569. - nz = (unsigned int)((z1-z0+1)/resz), nzm1 = nz-1;
  22570. -
  22571. - if (!nxm1 || !nym1 || !nzm1) return;
  22572. -
  22573. - CImg<int> indices1(nx,ny,1,3,-1), indices2(indices1);
  22574. - CImg<float> values1(nx,ny), values2(nx,ny);
  22575. - float X=0, Y=0, Z=0, nX=0, nY=0, nZ=0;
  22576. -
  22577. - // Fill the first plane with function values
  22578. - Y=y0;
  22579. - cimg_forY(values1,y) {
  22580. - X = x0;
  22581. - cimg_forX(values1,x) { values1(x,y) = (float)func(X,Y,z0); X+=resx; }
  22582. - Y+=resy;
  22583. - }
  22584. -
  22585. - // Run Marching Cubes algorithm
  22586. - Z = z0; nZ = Z + resz;
  22587. - for (unsigned int zi=0; zi<nzm1; ++zi, Z=nZ, nZ+=resz) {
  22588. - Y = y0; nY = Y + resy;
  22589. - indices2.fill(-1);
  22590. - for (unsigned int yi=0, nyi=1; yi<nym1; ++yi, ++nyi, Y=nY, nY+=resy) {
  22591. - X = x0; nX = X + resx;
  22592. - for (unsigned int xi=0, nxi=1; xi<nxm1; ++xi, ++nxi, X=nX, nX+=resx) {
  22593. -
  22594. - // Determine cube configuration
  22595. - const float
  22596. - val0 = values1(xi,yi), val1 = values1(nxi,yi), val2 = values1(nxi,nyi), val3 = values1(xi,nyi),
  22597. - val4 = values2(xi,yi) = (float)func(X,Y,nZ),
  22598. - val5 = values2(nxi,yi) = (float)func(nX,Y,nZ),
  22599. - val6 = values2(nxi,nyi) = (float)func(nX,nY,nZ),
  22600. - val7 = values2(xi,nyi) = (float)func(X,nY,nZ);
  22601. -
  22602. - const unsigned int configuration =
  22603. - (val0<isovalue?1:0) | (val1<isovalue?2:0) | (val2<isovalue?4:0) | (val3<isovalue?8:0) |
  22604. - (val4<isovalue?16:0) | (val5<isovalue?32:0) | (val6<isovalue?64:0) | (val7<isovalue?128:0),
  22605. - edge = edges[configuration];
  22606. -
  22607. - // Compute intersection points
  22608. - if (edge) {
  22609. - if ((edge&1) && indices1(xi,yi,0)<0) {
  22610. - const float Xi = X + (isovalue-val0)*resx/(val1-val0);
  22611. - indices1(xi,yi,0) = points.size;
  22612. - points.insert(CImg<tp>::vector(Xi,Y,Z));
  22613. - }
  22614. - if ((edge&2) && indices1(nxi,yi,1)<0) {
  22615. - const float Yi = Y + (isovalue-val1)*resy/(val2-val1);
  22616. - indices1(nxi,yi,1) = points.size;
  22617. - points.insert(CImg<tp>::vector(nX,Yi,Z));
  22618. - }
  22619. - if ((edge&4) && indices1(xi,nyi,0)<0) {
  22620. - const float Xi = X + (isovalue-val3)*resx/(val2-val3);
  22621. - indices1(xi,nyi,0) = points.size;
  22622. - points.insert(CImg<tp>::vector(Xi,nY,Z));
  22623. - }
  22624. - if ((edge&8) && indices1(xi,yi,1)<0) {
  22625. - const float Yi = Y + (isovalue-val0)*resy/(val3-val0);
  22626. - indices1(xi,yi,1) = points.size;
  22627. - points.insert(CImg<tp>::vector(X,Yi,Z));
  22628. - }
  22629. - if ((edge&16) && indices2(xi,yi,0)<0) {
  22630. - const float Xi = X + (isovalue-val4)*resx/(val5-val4);
  22631. - indices2(xi,yi,0) = points.size;
  22632. - points.insert(CImg<tp>::vector(Xi,Y,nZ));
  22633. - }
  22634. - if ((edge&32) && indices2(nxi,yi,1)<0) {
  22635. - const float Yi = Y + (isovalue-val5)*resy/(val6-val5);
  22636. - indices2(nxi,yi,1) = points.size;
  22637. - points.insert(CImg<tp>::vector(nX,Yi,nZ));
  22638. - }
  22639. - if ((edge&64) && indices2(xi,nyi,0)<0) {
  22640. - const float Xi = X + (isovalue-val7)*resx/(val6-val7);
  22641. - indices2(xi,nyi,0) = points.size;
  22642. - points.insert(CImg<tp>::vector(Xi,nY,nZ));
  22643. - }
  22644. - if ((edge&128) && indices2(xi,yi,1)<0) {
  22645. - const float Yi = Y + (isovalue-val4)*resy/(val7-val4);
  22646. - indices2(xi,yi,1) = points.size;
  22647. - points.insert(CImg<tp>::vector(X,Yi,nZ));
  22648. - }
  22649. - if ((edge&256) && indices1(xi,yi,2)<0) {
  22650. - const float Zi = Z+ (isovalue-val0)*resz/(val4-val0);
  22651. - indices1(xi,yi,2) = points.size;
  22652. - points.insert(CImg<tp>::vector(X,Y,Zi));
  22653. - }
  22654. - if ((edge&512) && indices1(nxi,yi,2)<0) {
  22655. - const float Zi = Z + (isovalue-val1)*resz/(val5-val1);
  22656. - indices1(nxi,yi,2) = points.size;
  22657. - points.insert(CImg<tp>::vector(nX,Y,Zi));
  22658. - }
  22659. - if ((edge&1024) && indices1(nxi,nyi,2)<0) {
  22660. - const float Zi = Z + (isovalue-val2)*resz/(val6-val2);
  22661. - indices1(nxi,nyi,2) = points.size;
  22662. - points.insert(CImg<tp>::vector(nX,nY,Zi));
  22663. - }
  22664. - if ((edge&2048) && indices1(xi,nyi,2)<0) {
  22665. - const float Zi = Z + (isovalue-val3)*resz/(val7-val3);
  22666. - indices1(xi,nyi,2) = points.size;
  22667. - points.insert(CImg<tp>::vector(X,nY,Zi));
  22668. - }
  22669. -
  22670. - // Create triangles
  22671. - for (int *triangle=triangles[configuration]; *triangle!=-1; ) {
  22672. - const unsigned int p0 = *(triangle++), p1 = *(triangle++), p2 = *(triangle++);
  22673. - const tf
  22674. - i0 = (tf)(_marching_cubes_indice(p0,indices1,indices2,xi,yi,nxi,nyi)),
  22675. - i1 = (tf)(_marching_cubes_indice(p1,indices1,indices2,xi,yi,nxi,nyi)),
  22676. - i2 = (tf)(_marching_cubes_indice(p2,indices1,indices2,xi,yi,nxi,nyi));
  22677. - if (invert_faces) primitives.insert(CImg<tf>::vector(i0,i1,i2));
  22678. - else primitives.insert(CImg<tf>::vector(i0,i2,i1));
  22679. - }
  22680. - }
  22681. - }
  22682. - }
  22683. - cimg::swap(values1,values2);
  22684. - cimg::swap(indices1,indices2);
  22685. - }
  22686. - }
  22687. -
  22688. - // Inner routine used by the Marching square algorithm
  22689. - template<typename t> inline int _marching_squares_indice(const unsigned int edge, const CImg<t>& indices1, const CImg<t>& indices2,
  22690. - const unsigned int x, const unsigned int nx) {
  22691. - switch (edge) {
  22692. - case 0: return (int)indices1(x,0);
  22693. - case 1: return (int)indices1(nx,1);
  22694. - case 2: return (int)indices2(x,0);
  22695. - case 3: return (int)indices1(x,1);
  22696. - }
  22697. - return 0;
  22698. - }
  22699. -
  22700. - //! Polygonize an implicit 2D function by the marching squares algorithm
  22701. - template<typename tfunc, typename tp, typename tf>
  22702. - inline void marching_squares(const tfunc& func, const float isovalue,
  22703. - const float x0,const float y0,
  22704. - const float x1,const float y1,
  22705. - const float resx,const float resy,
  22706. - CImgList<tp>& points, CImgList<tf>& primitives) {
  22707. -
  22708. - static unsigned int edges[16]={ 0x0, 0x9, 0x3, 0xa, 0x6, 0xf, 0x5, 0xc, 0xc, 0x5, 0xf, 0x6, 0xa, 0x3, 0x9, 0x0 };
  22709. - static int segments[16][4] = { { -1,-1,-1,-1 }, { 0,3,-1,-1 }, { 0,1,-1,-1 }, { 1,3,-1,-1 },
  22710. - { 1,2,-1,-1 }, { 0,1,2,3 }, { 0,2,-1,-1 }, { 2,3,-1,-1 },
  22711. - { 2,3,-1,-1 }, { 0,2,-1,-1}, { 0,3,1,2 }, { 1,2,-1,-1 },
  22712. - { 1,3,-1,-1 }, { 0,1,-1,-1}, { 0,3,-1,-1}, { -1,-1,-1,-1 } };
  22713. - const unsigned int
  22714. - nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1,
  22715. - ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1;
  22716. -
  22717. - if (!nxm1 || !nym1) return;
  22718. -
  22719. - CImg<int> indices1(nx,1,1,2,-1), indices2(nx,1,1,2);
  22720. - CImg<float> values1(nx), values2(nx);
  22721. - float X = 0, Y = 0, nX = 0, nY = 0;
  22722. -
  22723. - // Fill first line with values
  22724. - cimg_forX(values1,x) { values1(x) = (float)func(X,Y); X+=resx; }
  22725. -
  22726. - // Run the marching squares algorithm
  22727. - Y = y0; nY = Y + resy;
  22728. - for (unsigned int yi=0, nyi=1; yi<nym1; ++yi, ++nyi, Y=nY, nY+=resy) {
  22729. - X = x0; nX = X + resx;
  22730. - indices2.fill(-1);
  22731. - for (unsigned int xi=0, nxi=1; xi<nxm1; ++xi, ++nxi, X=nX, nX+=resx) {
  22732. -
  22733. - // Determine cube configuration
  22734. - const float
  22735. - val0 = values1(xi), val1 = values1(nxi),
  22736. - val2 = values2(nxi) = (float)func(nX,nY),
  22737. - val3 = values2(xi) = (float)func(X,nY);
  22738. -
  22739. - const unsigned int configuration = (val0<isovalue?1:0) | (val1<isovalue?2:0) | (val2<isovalue?4:0) | (val3<isovalue?8:0),
  22740. - edge = edges[configuration];
  22741. -
  22742. - // Compute intersection points
  22743. - if (edge) {
  22744. - if ((edge&1) && indices1(xi,0)<0) {
  22745. - const float Xi = X + (isovalue-val0)*resx/(val1-val0);
  22746. - indices1(xi,0) = points.size;
  22747. - points.insert(CImg<tp>::vector(Xi,Y));
  22748. - }
  22749. - if ((edge&2) && indices1(nxi,1)<0) {
  22750. - const float Yi = Y + (isovalue-val1)*resy/(val2-val1);
  22751. - indices1(nxi,1) = points.size;
  22752. - points.insert(CImg<tp>::vector(nX,Yi));
  22753. - }
  22754. - if ((edge&4) && indices2(xi,0)<0) {
  22755. - const float Xi = X + (isovalue-val3)*resx/(val2-val3);
  22756. - indices2(xi,0) = points.size;
  22757. - points.insert(CImg<tp>::vector(Xi,nY));
  22758. - }
  22759. - if ((edge&8) && indices1(xi,1)<0) {
  22760. - const float Yi = Y + (isovalue-val0)*resy/(val3-val0);
  22761. - indices1(xi,1) = points.size;
  22762. - points.insert(CImg<tp>::vector(X,Yi));
  22763. - }
  22764. -
  22765. - // Create segments
  22766. - for (int *segment=segments[configuration]; *segment!=-1; ) {
  22767. - const unsigned int p0 = *(segment++), p1 = *(segment++);
  22768. - const tf
  22769. - i0 = (tf)(_marching_squares_indice(p0,indices1,indices2,xi,nxi)),
  22770. - i1 = (tf)(_marching_squares_indice(p1,indices1,indices2,xi,nxi));
  22771. - primitives.insert(CImg<tf>::vector(i0,i1));
  22772. - }
  22773. - }
  22774. - }
  22775. - values1.swap(values2);
  22776. - indices1.swap(indices2);
  22777. - }
  22778. - }
  22779. -
  22780. - // End of cimg:: namespace
  22781. -}
  22782. -
  22783. -
  22784. - // End of cimg_library:: namespace
  22785. -}
  22786. -
  22787. -#ifdef std
  22788. -#undef std
  22789. -#endif
  22790. -
  22791. -#endif
  22792. -
  22793. -// Local Variables:
  22794. -// mode: c++
  22795. -// End:
  22796. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/dummy2.cc vips-7.38.5/libvips/cimg/dummy2.cc
  22797. --- vips-7.38.5-vanilla/libvips/cimg/dummy2.cc 2014-07-17 23:48:36.231794473 -0400
  22798. +++ vips-7.38.5/libvips/cimg/dummy2.cc 1969-12-31 19:00:00.000000000 -0500
  22799. @@ -1,4 +0,0 @@
  22800. -/* mac os x libtool needs to link libraries containing c++ (eg. cimg) with
  22801. - * g++ ... force this with a dummy c++ file at the top level
  22802. - */
  22803. -const int im__dummy_value = 42;
  22804. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/Makefile.am vips-7.38.5/libvips/cimg/Makefile.am
  22805. --- vips-7.38.5-vanilla/libvips/cimg/Makefile.am 2014-07-17 23:48:36.230794473 -0400
  22806. +++ vips-7.38.5/libvips/cimg/Makefile.am 1969-12-31 19:00:00.000000000 -0500
  22807. @@ -1,27 +0,0 @@
  22808. -noinst_LTLIBRARIES = libcimg.la
  22809. -
  22810. -libcimg_la_SOURCES = \
  22811. - CImg.h \
  22812. - cimg_dispatch.c \
  22813. - cimg.cpp
  22814. -
  22815. -# various cimg settings as well
  22816. -# we need to change these a bit for win32
  22817. -if OS_WIN32
  22818. -AM_CPPFLAGS = \
  22819. - -Dcimg_strict \
  22820. - -Dcimg_OS=0 \
  22821. - -Dcimg_display_type=0 \
  22822. - -DLOCALEDIR=\""$(LOCALEDIR)"\"
  22823. -else
  22824. -AM_CPPFLAGS = \
  22825. - -Dcimg_strict \
  22826. - -Dcimg_OS=1 \
  22827. - -Dcimg_display_type=0 \
  22828. - -DLOCALEDIR=\""$(LOCALEDIR)"\"
  22829. -endif
  22830. -
  22831. -# used by the final libvips link rather than us
  22832. -EXTRA_DIST = dummy2.cc
  22833. -
  22834. -AM_CPPFLAGS += -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
  22835. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/cimg/Makefile.in vips-7.38.5/libvips/cimg/Makefile.in
  22836. --- vips-7.38.5-vanilla/libvips/cimg/Makefile.in 2014-07-17 23:48:36.230794473 -0400
  22837. +++ vips-7.38.5/libvips/cimg/Makefile.in 1969-12-31 19:00:00.000000000 -0500
  22838. @@ -1,747 +0,0 @@
  22839. -# Makefile.in generated by automake 1.13.3 from Makefile.am.
  22840. -# @configure_input@
  22841. -
  22842. -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
  22843. -
  22844. -# This Makefile.in is free software; the Free Software Foundation
  22845. -# gives unlimited permission to copy and/or distribute it,
  22846. -# with or without modifications, as long as this notice is preserved.
  22847. -
  22848. -# This program is distributed in the hope that it will be useful,
  22849. -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  22850. -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  22851. -# PARTICULAR PURPOSE.
  22852. -
  22853. -@SET_MAKE@
  22854. -
  22855. -VPATH = @srcdir@
  22856. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
  22857. -am__make_running_with_option = \
  22858. - case $${target_option-} in \
  22859. - ?) ;; \
  22860. - *) echo "am__make_running_with_option: internal error: invalid" \
  22861. - "target option '$${target_option-}' specified" >&2; \
  22862. - exit 1;; \
  22863. - esac; \
  22864. - has_opt=no; \
  22865. - sane_makeflags=$$MAKEFLAGS; \
  22866. - if $(am__is_gnu_make); then \
  22867. - sane_makeflags=$$MFLAGS; \
  22868. - else \
  22869. - case $$MAKEFLAGS in \
  22870. - *\\[\ \ ]*) \
  22871. - bs=\\; \
  22872. - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  22873. - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  22874. - esac; \
  22875. - fi; \
  22876. - skip_next=no; \
  22877. - strip_trailopt () \
  22878. - { \
  22879. - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  22880. - }; \
  22881. - for flg in $$sane_makeflags; do \
  22882. - test $$skip_next = yes && { skip_next=no; continue; }; \
  22883. - case $$flg in \
  22884. - *=*|--*) continue;; \
  22885. - -*I) strip_trailopt 'I'; skip_next=yes;; \
  22886. - -*I?*) strip_trailopt 'I';; \
  22887. - -*O) strip_trailopt 'O'; skip_next=yes;; \
  22888. - -*O?*) strip_trailopt 'O';; \
  22889. - -*l) strip_trailopt 'l'; skip_next=yes;; \
  22890. - -*l?*) strip_trailopt 'l';; \
  22891. - -[dEDm]) skip_next=yes;; \
  22892. - -[JT]) skip_next=yes;; \
  22893. - esac; \
  22894. - case $$flg in \
  22895. - *$$target_option*) has_opt=yes; break;; \
  22896. - esac; \
  22897. - done; \
  22898. - test $$has_opt = yes
  22899. -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  22900. -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  22901. -pkgdatadir = $(datadir)/@PACKAGE@
  22902. -pkgincludedir = $(includedir)/@PACKAGE@
  22903. -pkglibdir = $(libdir)/@PACKAGE@
  22904. -pkglibexecdir = $(libexecdir)/@PACKAGE@
  22905. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  22906. -install_sh_DATA = $(install_sh) -c -m 644
  22907. -install_sh_PROGRAM = $(install_sh) -c
  22908. -install_sh_SCRIPT = $(install_sh) -c
  22909. -INSTALL_HEADER = $(INSTALL_DATA)
  22910. -transform = $(program_transform_name)
  22911. -NORMAL_INSTALL = :
  22912. -PRE_INSTALL = :
  22913. -POST_INSTALL = :
  22914. -NORMAL_UNINSTALL = :
  22915. -PRE_UNINSTALL = :
  22916. -POST_UNINSTALL = :
  22917. -build_triplet = @build@
  22918. -host_triplet = @host@
  22919. -subdir = libvips/cimg
  22920. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  22921. - $(top_srcdir)/depcomp
  22922. -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  22923. -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
  22924. - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
  22925. - $(top_srcdir)/configure.ac
  22926. -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  22927. - $(ACLOCAL_M4)
  22928. -mkinstalldirs = $(install_sh) -d
  22929. -CONFIG_HEADER = $(top_builddir)/config.h
  22930. -CONFIG_CLEAN_FILES =
  22931. -CONFIG_CLEAN_VPATH_FILES =
  22932. -LTLIBRARIES = $(noinst_LTLIBRARIES)
  22933. -libcimg_la_LIBADD =
  22934. -am_libcimg_la_OBJECTS = cimg_dispatch.lo cimg.lo
  22935. -libcimg_la_OBJECTS = $(am_libcimg_la_OBJECTS)
  22936. -AM_V_lt = $(am__v_lt_@AM_V@)
  22937. -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
  22938. -am__v_lt_0 = --silent
  22939. -am__v_lt_1 =
  22940. -AM_V_P = $(am__v_P_@AM_V@)
  22941. -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  22942. -am__v_P_0 = false
  22943. -am__v_P_1 = :
  22944. -AM_V_GEN = $(am__v_GEN_@AM_V@)
  22945. -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  22946. -am__v_GEN_0 = @echo " GEN " $@;
  22947. -am__v_GEN_1 =
  22948. -AM_V_at = $(am__v_at_@AM_V@)
  22949. -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  22950. -am__v_at_0 = @
  22951. -am__v_at_1 =
  22952. -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
  22953. -depcomp = $(SHELL) $(top_srcdir)/depcomp
  22954. -am__depfiles_maybe = depfiles
  22955. -am__mv = mv -f
  22956. -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  22957. - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  22958. -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  22959. - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
  22960. - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
  22961. - $(AM_CFLAGS) $(CFLAGS)
  22962. -AM_V_CC = $(am__v_CC_@AM_V@)
  22963. -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
  22964. -am__v_CC_0 = @echo " CC " $@;
  22965. -am__v_CC_1 =
  22966. -CCLD = $(CC)
  22967. -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  22968. - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
  22969. - $(AM_LDFLAGS) $(LDFLAGS) -o $@
  22970. -AM_V_CCLD = $(am__v_CCLD_@AM_V@)
  22971. -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
  22972. -am__v_CCLD_0 = @echo " CCLD " $@;
  22973. -am__v_CCLD_1 =
  22974. -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  22975. - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
  22976. -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  22977. - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
  22978. - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
  22979. - $(AM_CXXFLAGS) $(CXXFLAGS)
  22980. -AM_V_CXX = $(am__v_CXX_@AM_V@)
  22981. -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
  22982. -am__v_CXX_0 = @echo " CXX " $@;
  22983. -am__v_CXX_1 =
  22984. -CXXLD = $(CXX)
  22985. -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  22986. - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  22987. - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  22988. -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
  22989. -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
  22990. -am__v_CXXLD_0 = @echo " CXXLD " $@;
  22991. -am__v_CXXLD_1 =
  22992. -SOURCES = $(libcimg_la_SOURCES)
  22993. -DIST_SOURCES = $(libcimg_la_SOURCES)
  22994. -am__can_run_installinfo = \
  22995. - case $$AM_UPDATE_INFO_DIR in \
  22996. - n|no|NO) false;; \
  22997. - *) (install-info --version) >/dev/null 2>&1;; \
  22998. - esac
  22999. -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  23000. -# Read a list of newline-separated strings from the standard input,
  23001. -# and print each of them once, without duplicates. Input order is
  23002. -# *not* preserved.
  23003. -am__uniquify_input = $(AWK) '\
  23004. - BEGIN { nonempty = 0; } \
  23005. - { items[$$0] = 1; nonempty = 1; } \
  23006. - END { if (nonempty) { for (i in items) print i; }; } \
  23007. -'
  23008. -# Make sure the list of sources is unique. This is necessary because,
  23009. -# e.g., the same source file might be shared among _SOURCES variables
  23010. -# for different programs/libraries.
  23011. -am__define_uniq_tagged_files = \
  23012. - list='$(am__tagged_files)'; \
  23013. - unique=`for i in $$list; do \
  23014. - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  23015. - done | $(am__uniquify_input)`
  23016. -ETAGS = etags
  23017. -CTAGS = ctags
  23018. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  23019. -ACLOCAL = @ACLOCAL@
  23020. -AMTAR = @AMTAR@
  23021. -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  23022. -AR = @AR@
  23023. -AS = @AS@
  23024. -AUTOCONF = @AUTOCONF@
  23025. -AUTOHEADER = @AUTOHEADER@
  23026. -AUTOMAKE = @AUTOMAKE@
  23027. -AWK = @AWK@
  23028. -CATALOGS = @CATALOGS@
  23029. -CATOBJEXT = @CATOBJEXT@
  23030. -CC = @CC@
  23031. -CCDEPMODE = @CCDEPMODE@
  23032. -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
  23033. -CFITSIO_LIBS = @CFITSIO_LIBS@
  23034. -CFLAGS = @CFLAGS@
  23035. -CPP = @CPP@
  23036. -CPPFLAGS = @CPPFLAGS@
  23037. -CXX = @CXX@
  23038. -CXXCPP = @CXXCPP@
  23039. -CXXDEPMODE = @CXXDEPMODE@
  23040. -CXXFLAGS = @CXXFLAGS@
  23041. -CYGPATH_W = @CYGPATH_W@
  23042. -DATADIRNAME = @DATADIRNAME@
  23043. -DEFS = @DEFS@
  23044. -DEPDIR = @DEPDIR@
  23045. -DLLTOOL = @DLLTOOL@
  23046. -DLLWRAP = @DLLWRAP@
  23047. -DSYMUTIL = @DSYMUTIL@
  23048. -DUMPBIN = @DUMPBIN@
  23049. -ECHO_C = @ECHO_C@
  23050. -ECHO_N = @ECHO_N@
  23051. -ECHO_T = @ECHO_T@
  23052. -EGREP = @EGREP@
  23053. -EXEEXT = @EXEEXT@
  23054. -EXIF_CFLAGS = @EXIF_CFLAGS@
  23055. -EXIF_LIBS = @EXIF_LIBS@
  23056. -FFTW_CFLAGS = @FFTW_CFLAGS@
  23057. -FFTW_LIBS = @FFTW_LIBS@
  23058. -FGREP = @FGREP@
  23059. -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
  23060. -GMOFILES = @GMOFILES@
  23061. -GMSGFMT = @GMSGFMT@
  23062. -GREP = @GREP@
  23063. -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
  23064. -GTHREAD_LIBS = @GTHREAD_LIBS@
  23065. -GTKDOC_CHECK = @GTKDOC_CHECK@
  23066. -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
  23067. -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
  23068. -GTKDOC_MKPDF = @GTKDOC_MKPDF@
  23069. -GTKDOC_REBASE = @GTKDOC_REBASE@
  23070. -HTML_DIR = @HTML_DIR@
  23071. -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
  23072. -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
  23073. -INSTALL = @INSTALL@
  23074. -INSTALL_DATA = @INSTALL_DATA@
  23075. -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  23076. -INSTALL_SCRIPT = @INSTALL_SCRIPT@
  23077. -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  23078. -INSTOBJEXT = @INSTOBJEXT@
  23079. -INTLLIBS = @INTLLIBS@
  23080. -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
  23081. -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
  23082. -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
  23083. -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
  23084. -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
  23085. -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
  23086. -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
  23087. -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
  23088. -JPEG_INCLUDES = @JPEG_INCLUDES@
  23089. -JPEG_LIBS = @JPEG_LIBS@
  23090. -LCMS_CFLAGS = @LCMS_CFLAGS@
  23091. -LCMS_LIBS = @LCMS_LIBS@
  23092. -LD = @LD@
  23093. -LDFLAGS = @LDFLAGS@
  23094. -LIBOBJS = @LIBOBJS@
  23095. -LIBRARY_AGE = @LIBRARY_AGE@
  23096. -LIBRARY_CURRENT = @LIBRARY_CURRENT@
  23097. -LIBRARY_REVISION = @LIBRARY_REVISION@
  23098. -LIBS = @LIBS@
  23099. -LIBTOOL = @LIBTOOL@
  23100. -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
  23101. -LIBWEBP_LIBS = @LIBWEBP_LIBS@
  23102. -LIPO = @LIPO@
  23103. -LN_S = @LN_S@
  23104. -LTLIBOBJS = @LTLIBOBJS@
  23105. -MAGICK_CFLAGS = @MAGICK_CFLAGS@
  23106. -MAGICK_LIBS = @MAGICK_LIBS@
  23107. -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
  23108. -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
  23109. -MAKEINFO = @MAKEINFO@
  23110. -MANIFEST_TOOL = @MANIFEST_TOOL@
  23111. -MATIO_CFLAGS = @MATIO_CFLAGS@
  23112. -MATIO_LIBS = @MATIO_LIBS@
  23113. -MKDIR_P = @MKDIR_P@
  23114. -MKINSTALLDIRS = @MKINSTALLDIRS@
  23115. -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
  23116. -MONOTONIC_LIBS = @MONOTONIC_LIBS@
  23117. -MSGFMT = @MSGFMT@
  23118. -MSGFMT_OPTS = @MSGFMT_OPTS@
  23119. -NM = @NM@
  23120. -NMEDIT = @NMEDIT@
  23121. -OBJDUMP = @OBJDUMP@
  23122. -OBJEXT = @OBJEXT@
  23123. -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
  23124. -OPENEXR_LIBS = @OPENEXR_LIBS@
  23125. -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
  23126. -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
  23127. -ORC_CFLAGS = @ORC_CFLAGS@
  23128. -ORC_LIBS = @ORC_LIBS@
  23129. -OTOOL = @OTOOL@
  23130. -OTOOL64 = @OTOOL64@
  23131. -PACKAGE = @PACKAGE@
  23132. -PACKAGES_USED = @PACKAGES_USED@
  23133. -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  23134. -PACKAGE_NAME = @PACKAGE_NAME@
  23135. -PACKAGE_STRING = @PACKAGE_STRING@
  23136. -PACKAGE_TARNAME = @PACKAGE_TARNAME@
  23137. -PACKAGE_URL = @PACKAGE_URL@
  23138. -PACKAGE_VERSION = @PACKAGE_VERSION@
  23139. -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
  23140. -PANGOFT2_LIBS = @PANGOFT2_LIBS@
  23141. -PATH_SEPARATOR = @PATH_SEPARATOR@
  23142. -PKG_CONFIG = @PKG_CONFIG@
  23143. -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
  23144. -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
  23145. -PNG_CFLAGS = @PNG_CFLAGS@
  23146. -PNG_INCLUDES = @PNG_INCLUDES@
  23147. -PNG_LIBS = @PNG_LIBS@
  23148. -POFILES = @POFILES@
  23149. -POSUB = @POSUB@
  23150. -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
  23151. -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
  23152. -PYTHON = @PYTHON@
  23153. -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
  23154. -PYTHON_INCLUDES = @PYTHON_INCLUDES@
  23155. -PYTHON_PLATFORM = @PYTHON_PLATFORM@
  23156. -PYTHON_PREFIX = @PYTHON_PREFIX@
  23157. -PYTHON_VERSION = @PYTHON_VERSION@
  23158. -RANLIB = @RANLIB@
  23159. -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
  23160. -REQUIRED_LIBS = @REQUIRED_LIBS@
  23161. -SED = @SED@
  23162. -SET_MAKE = @SET_MAKE@
  23163. -SHELL = @SHELL@
  23164. -STRIP = @STRIP@
  23165. -THREADS_CFLAGS = @THREADS_CFLAGS@
  23166. -THREADS_LIBS = @THREADS_LIBS@
  23167. -TIFF_CFLAGS = @TIFF_CFLAGS@
  23168. -TIFF_INCLUDES = @TIFF_INCLUDES@
  23169. -TIFF_LIBS = @TIFF_LIBS@
  23170. -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
  23171. -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
  23172. -USE_NLS = @USE_NLS@
  23173. -VERSION = @VERSION@
  23174. -VIPS_CFLAGS = @VIPS_CFLAGS@
  23175. -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
  23176. -VIPS_EXEEXT = @VIPS_EXEEXT@
  23177. -VIPS_INCLUDES = @VIPS_INCLUDES@
  23178. -VIPS_LIBDIR = @VIPS_LIBDIR@
  23179. -VIPS_LIBS = @VIPS_LIBS@
  23180. -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
  23181. -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
  23182. -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
  23183. -VIPS_VERSION = @VIPS_VERSION@
  23184. -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
  23185. -XGETTEXT = @XGETTEXT@
  23186. -XMKMF = @XMKMF@
  23187. -X_CFLAGS = @X_CFLAGS@
  23188. -X_EXTRA_LIBS = @X_EXTRA_LIBS@
  23189. -X_LIBS = @X_LIBS@
  23190. -X_PRE_LIBS = @X_PRE_LIBS@
  23191. -ZIP_INCLUDES = @ZIP_INCLUDES@
  23192. -ZIP_LIBS = @ZIP_LIBS@
  23193. -abs_builddir = @abs_builddir@
  23194. -abs_srcdir = @abs_srcdir@
  23195. -abs_top_builddir = @abs_top_builddir@
  23196. -abs_top_srcdir = @abs_top_srcdir@
  23197. -ac_ct_AR = @ac_ct_AR@
  23198. -ac_ct_CC = @ac_ct_CC@
  23199. -ac_ct_CXX = @ac_ct_CXX@
  23200. -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  23201. -am__include = @am__include@
  23202. -am__leading_dot = @am__leading_dot@
  23203. -am__quote = @am__quote@
  23204. -am__tar = @am__tar@
  23205. -am__untar = @am__untar@
  23206. -bindir = @bindir@
  23207. -build = @build@
  23208. -build_alias = @build_alias@
  23209. -build_cpu = @build_cpu@
  23210. -build_os = @build_os@
  23211. -build_vendor = @build_vendor@
  23212. -builddir = @builddir@
  23213. -datadir = @datadir@
  23214. -datarootdir = @datarootdir@
  23215. -docdir = @docdir@
  23216. -dvidir = @dvidir@
  23217. -exec_prefix = @exec_prefix@
  23218. -host = @host@
  23219. -host_alias = @host_alias@
  23220. -host_cpu = @host_cpu@
  23221. -host_os = @host_os@
  23222. -host_vendor = @host_vendor@
  23223. -htmldir = @htmldir@
  23224. -includedir = @includedir@
  23225. -infodir = @infodir@
  23226. -install_sh = @install_sh@
  23227. -libdir = @libdir@
  23228. -libexecdir = @libexecdir@
  23229. -localedir = @localedir@
  23230. -localstatedir = @localstatedir@
  23231. -mandir = @mandir@
  23232. -mkdir_p = @mkdir_p@
  23233. -oldincludedir = @oldincludedir@
  23234. -pdfdir = @pdfdir@
  23235. -pkgpyexecdir = @pkgpyexecdir@
  23236. -pkgpythondir = @pkgpythondir@
  23237. -prefix = @prefix@
  23238. -program_transform_name = @program_transform_name@
  23239. -psdir = @psdir@
  23240. -pyexecdir = @pyexecdir@
  23241. -pythondir = @pythondir@
  23242. -sbindir = @sbindir@
  23243. -sharedstatedir = @sharedstatedir@
  23244. -srcdir = @srcdir@
  23245. -sysconfdir = @sysconfdir@
  23246. -target_alias = @target_alias@
  23247. -top_build_prefix = @top_build_prefix@
  23248. -top_builddir = @top_builddir@
  23249. -top_srcdir = @top_srcdir@
  23250. -vips_introspection_sources = @vips_introspection_sources@
  23251. -noinst_LTLIBRARIES = libcimg.la
  23252. -libcimg_la_SOURCES = \
  23253. - CImg.h \
  23254. - cimg_dispatch.c \
  23255. - cimg.cpp
  23256. -
  23257. -@OS_WIN32_FALSE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=1 \
  23258. -@OS_WIN32_FALSE@ -Dcimg_display_type=0 \
  23259. -@OS_WIN32_FALSE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \
  23260. -@OS_WIN32_FALSE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \
  23261. -@OS_WIN32_FALSE@ @VIPS_INCLUDES@ $(am__empty)
  23262. -
  23263. -# various cimg settings as well
  23264. -# we need to change these a bit for win32
  23265. -@OS_WIN32_TRUE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=0 \
  23266. -@OS_WIN32_TRUE@ -Dcimg_display_type=0 \
  23267. -@OS_WIN32_TRUE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \
  23268. -@OS_WIN32_TRUE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \
  23269. -@OS_WIN32_TRUE@ @VIPS_INCLUDES@ $(am__empty)
  23270. -
  23271. -# used by the final libvips link rather than us
  23272. -EXTRA_DIST = dummy2.cc
  23273. -all: all-am
  23274. -
  23275. -.SUFFIXES:
  23276. -.SUFFIXES: .c .cpp .lo .o .obj
  23277. -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  23278. - @for dep in $?; do \
  23279. - case '$(am__configure_deps)' in \
  23280. - *$$dep*) \
  23281. - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  23282. - && { if test -f $@; then exit 0; else break; fi; }; \
  23283. - exit 1;; \
  23284. - esac; \
  23285. - done; \
  23286. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/cimg/Makefile'; \
  23287. - $(am__cd) $(top_srcdir) && \
  23288. - $(AUTOMAKE) --foreign libvips/cimg/Makefile
  23289. -.PRECIOUS: Makefile
  23290. -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  23291. - @case '$?' in \
  23292. - *config.status*) \
  23293. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  23294. - *) \
  23295. - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  23296. - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  23297. - esac;
  23298. -
  23299. -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  23300. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  23301. -
  23302. -$(top_srcdir)/configure: $(am__configure_deps)
  23303. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  23304. -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  23305. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  23306. -$(am__aclocal_m4_deps):
  23307. -
  23308. -clean-noinstLTLIBRARIES:
  23309. - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
  23310. - @list='$(noinst_LTLIBRARIES)'; \
  23311. - locs=`for p in $$list; do echo $$p; done | \
  23312. - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
  23313. - sort -u`; \
  23314. - test -z "$$locs" || { \
  23315. - echo rm -f $${locs}; \
  23316. - rm -f $${locs}; \
  23317. - }
  23318. -
  23319. -libcimg.la: $(libcimg_la_OBJECTS) $(libcimg_la_DEPENDENCIES) $(EXTRA_libcimg_la_DEPENDENCIES)
  23320. - $(AM_V_CXXLD)$(CXXLINK) $(libcimg_la_OBJECTS) $(libcimg_la_LIBADD) $(LIBS)
  23321. -
  23322. -mostlyclean-compile:
  23323. - -rm -f *.$(OBJEXT)
  23324. -
  23325. -distclean-compile:
  23326. - -rm -f *.tab.c
  23327. -
  23328. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg.Plo@am__quote@
  23329. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg_dispatch.Plo@am__quote@
  23330. -
  23331. -.c.o:
  23332. -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  23333. -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  23334. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  23335. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23336. -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
  23337. -
  23338. -.c.obj:
  23339. -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
  23340. -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  23341. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  23342. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23343. -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
  23344. -
  23345. -.c.lo:
  23346. -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  23347. -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  23348. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  23349. -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23350. -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
  23351. -
  23352. -.cpp.o:
  23353. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  23354. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  23355. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  23356. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23357. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
  23358. -
  23359. -.cpp.obj:
  23360. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
  23361. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  23362. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  23363. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23364. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
  23365. -
  23366. -.cpp.lo:
  23367. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  23368. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  23369. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  23370. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23371. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
  23372. -
  23373. -mostlyclean-libtool:
  23374. - -rm -f *.lo
  23375. -
  23376. -clean-libtool:
  23377. - -rm -rf .libs _libs
  23378. -
  23379. -ID: $(am__tagged_files)
  23380. - $(am__define_uniq_tagged_files); mkid -fID $$unique
  23381. -tags: tags-am
  23382. -TAGS: tags
  23383. -
  23384. -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  23385. - set x; \
  23386. - here=`pwd`; \
  23387. - $(am__define_uniq_tagged_files); \
  23388. - shift; \
  23389. - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
  23390. - test -n "$$unique" || unique=$$empty_fix; \
  23391. - if test $$# -gt 0; then \
  23392. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  23393. - "$$@" $$unique; \
  23394. - else \
  23395. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  23396. - $$unique; \
  23397. - fi; \
  23398. - fi
  23399. -ctags: ctags-am
  23400. -
  23401. -CTAGS: ctags
  23402. -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  23403. - $(am__define_uniq_tagged_files); \
  23404. - test -z "$(CTAGS_ARGS)$$unique" \
  23405. - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  23406. - $$unique
  23407. -
  23408. -GTAGS:
  23409. - here=`$(am__cd) $(top_builddir) && pwd` \
  23410. - && $(am__cd) $(top_srcdir) \
  23411. - && gtags -i $(GTAGS_ARGS) "$$here"
  23412. -cscopelist: cscopelist-am
  23413. -
  23414. -cscopelist-am: $(am__tagged_files)
  23415. - list='$(am__tagged_files)'; \
  23416. - case "$(srcdir)" in \
  23417. - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
  23418. - *) sdir=$(subdir)/$(srcdir) ;; \
  23419. - esac; \
  23420. - for i in $$list; do \
  23421. - if test -f "$$i"; then \
  23422. - echo "$(subdir)/$$i"; \
  23423. - else \
  23424. - echo "$$sdir/$$i"; \
  23425. - fi; \
  23426. - done >> $(top_builddir)/cscope.files
  23427. -
  23428. -distclean-tags:
  23429. - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  23430. -
  23431. -distdir: $(DISTFILES)
  23432. - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  23433. - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  23434. - list='$(DISTFILES)'; \
  23435. - dist_files=`for file in $$list; do echo $$file; done | \
  23436. - sed -e "s|^$$srcdirstrip/||;t" \
  23437. - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  23438. - case $$dist_files in \
  23439. - */*) $(MKDIR_P) `echo "$$dist_files" | \
  23440. - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  23441. - sort -u` ;; \
  23442. - esac; \
  23443. - for file in $$dist_files; do \
  23444. - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  23445. - if test -d $$d/$$file; then \
  23446. - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  23447. - if test -d "$(distdir)/$$file"; then \
  23448. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  23449. - fi; \
  23450. - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  23451. - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  23452. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  23453. - fi; \
  23454. - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  23455. - else \
  23456. - test -f "$(distdir)/$$file" \
  23457. - || cp -p $$d/$$file "$(distdir)/$$file" \
  23458. - || exit 1; \
  23459. - fi; \
  23460. - done
  23461. -check-am: all-am
  23462. -check: check-am
  23463. -all-am: Makefile $(LTLIBRARIES)
  23464. -installdirs:
  23465. -install: install-am
  23466. -install-exec: install-exec-am
  23467. -install-data: install-data-am
  23468. -uninstall: uninstall-am
  23469. -
  23470. -install-am: all-am
  23471. - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  23472. -
  23473. -installcheck: installcheck-am
  23474. -install-strip:
  23475. - if test -z '$(STRIP)'; then \
  23476. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  23477. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  23478. - install; \
  23479. - else \
  23480. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  23481. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  23482. - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  23483. - fi
  23484. -mostlyclean-generic:
  23485. -
  23486. -clean-generic:
  23487. -
  23488. -distclean-generic:
  23489. - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  23490. - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  23491. -
  23492. -maintainer-clean-generic:
  23493. - @echo "This command is intended for maintainers to use"
  23494. - @echo "it deletes files that may require special tools to rebuild."
  23495. -clean: clean-am
  23496. -
  23497. -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
  23498. - mostlyclean-am
  23499. -
  23500. -distclean: distclean-am
  23501. - -rm -rf ./$(DEPDIR)
  23502. - -rm -f Makefile
  23503. -distclean-am: clean-am distclean-compile distclean-generic \
  23504. - distclean-tags
  23505. -
  23506. -dvi: dvi-am
  23507. -
  23508. -dvi-am:
  23509. -
  23510. -html: html-am
  23511. -
  23512. -html-am:
  23513. -
  23514. -info: info-am
  23515. -
  23516. -info-am:
  23517. -
  23518. -install-data-am:
  23519. -
  23520. -install-dvi: install-dvi-am
  23521. -
  23522. -install-dvi-am:
  23523. -
  23524. -install-exec-am:
  23525. -
  23526. -install-html: install-html-am
  23527. -
  23528. -install-html-am:
  23529. -
  23530. -install-info: install-info-am
  23531. -
  23532. -install-info-am:
  23533. -
  23534. -install-man:
  23535. -
  23536. -install-pdf: install-pdf-am
  23537. -
  23538. -install-pdf-am:
  23539. -
  23540. -install-ps: install-ps-am
  23541. -
  23542. -install-ps-am:
  23543. -
  23544. -installcheck-am:
  23545. -
  23546. -maintainer-clean: maintainer-clean-am
  23547. - -rm -rf ./$(DEPDIR)
  23548. - -rm -f Makefile
  23549. -maintainer-clean-am: distclean-am maintainer-clean-generic
  23550. -
  23551. -mostlyclean: mostlyclean-am
  23552. -
  23553. -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
  23554. - mostlyclean-libtool
  23555. -
  23556. -pdf: pdf-am
  23557. -
  23558. -pdf-am:
  23559. -
  23560. -ps: ps-am
  23561. -
  23562. -ps-am:
  23563. -
  23564. -uninstall-am:
  23565. -
  23566. -.MAKE: install-am install-strip
  23567. -
  23568. -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
  23569. - clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
  23570. - ctags-am distclean distclean-compile distclean-generic \
  23571. - distclean-libtool distclean-tags distdir dvi dvi-am html \
  23572. - html-am info info-am install install-am install-data \
  23573. - install-data-am install-dvi install-dvi-am install-exec \
  23574. - install-exec-am install-html install-html-am install-info \
  23575. - install-info-am install-man install-pdf install-pdf-am \
  23576. - install-ps install-ps-am install-strip installcheck \
  23577. - installcheck-am installdirs maintainer-clean \
  23578. - maintainer-clean-generic mostlyclean mostlyclean-compile \
  23579. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  23580. - tags tags-am uninstall uninstall-am
  23581. -
  23582. -
  23583. -# Tell versions [3.59,3.63) of GNU make to not export all variables.
  23584. -# Otherwise a system limit (for SysV at least) may be exceeded.
  23585. -.NOEXPORT:
  23586. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/Makefile.am vips-7.38.5/libvips/Makefile.am
  23587. --- vips-7.38.5-vanilla/libvips/Makefile.am 2014-07-17 23:48:36.231794473 -0400
  23588. +++ vips-7.38.5/libvips/Makefile.am 2014-07-17 23:49:32.819792979 -0400
  23589. @@ -1,13 +1,5 @@
  23590. -# only build in the cimg dir if C++ is enabled
  23591. -if ENABLE_CXX
  23592. -C_COMPILE_DIR = cimg
  23593. -C_DIST_DIR =
  23594. -C_LIB = cimg/libcimg.la
  23595. -else
  23596. C_COMPILE_DIR =
  23597. -C_DIST_DIR = cimg
  23598. C_LIB =
  23599. -endif
  23600. SUBDIRS = \
  23601. include \
  23602. @@ -34,14 +26,6 @@
  23603. # empty means default to C linking
  23604. libvips_la_SOURCES =
  23605. -# if we have C++ components enabled, make sure we link the top-level with c++
  23606. -#
  23607. -# sadly the if/endif isn't enough to stop automake detecting a c++ link even
  23608. -# when c++ is disabled ... comment out this line if you have linking problems
  23609. -if ENABLE_CXX
  23610. -nodist_EXTRA_libvips_la_SOURCES = cimg/dummy2.cc
  23611. -endif
  23612. -
  23613. # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
  23614. libvips_la_LIBADD = \
  23615. resample/libresample.la \
  23616. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/Makefile.in vips-7.38.5/libvips/Makefile.in
  23617. --- vips-7.38.5-vanilla/libvips/Makefile.in 2014-07-17 23:48:36.231794473 -0400
  23618. +++ vips-7.38.5/libvips/Makefile.in 2014-07-17 23:49:32.819792979 -0400
  23619. @@ -142,7 +142,7 @@
  23620. am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
  23621. am__v_lt_0 = --silent
  23622. am__v_lt_1 =
  23623. -libvips_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  23624. +libvips_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  23625. $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  23626. $(CXXFLAGS) $(libvips_la_LDFLAGS) $(LDFLAGS) -o $@
  23627. AM_V_P = $(am__v_P_@AM_V@)
  23628. @@ -163,7 +163,7 @@
  23629. am__mv = mv -f
  23630. CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  23631. $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
  23632. -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  23633. +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  23634. $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
  23635. $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
  23636. $(AM_CXXFLAGS) $(CXXFLAGS)
  23637. @@ -172,7 +172,7 @@
  23638. am__v_CXX_0 = @echo " CXX " $@;
  23639. am__v_CXX_1 =
  23640. CXXLD = $(CXX)
  23641. -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  23642. +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  23643. $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  23644. $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  23645. AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
  23646. @@ -667,11 +667,11 @@
  23647. @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
  23648. dummy2.lo: cimg/dummy2.cc
  23649. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dummy2.lo -MD -MP -MF $(DEPDIR)/dummy2.Tpo -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
  23650. +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dummy2.lo -MD -MP -MF $(DEPDIR)/dummy2.Tpo -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
  23651. @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy2.Tpo $(DEPDIR)/dummy2.Plo
  23652. @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cimg/dummy2.cc' object='dummy2.lo' libtool=yes @AMDEPBACKSLASH@
  23653. @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  23654. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
  23655. +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc
  23656. mostlyclean-libtool:
  23657. -rm -f *.lo
  23658. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/bicubic.cpp vips-7.38.5/libvips/resample/bicubic.cpp
  23659. --- vips-7.38.5-vanilla/libvips/resample/bicubic.cpp 2014-07-17 23:48:36.232794473 -0400
  23660. +++ vips-7.38.5/libvips/resample/bicubic.cpp 1969-12-31 19:00:00.000000000 -0500
  23661. @@ -1,459 +0,0 @@
  23662. -/* bicubic (catmull-rom) interpolator
  23663. - *
  23664. - * 12/8/10
  23665. - * - revise window_size / window_offset stuff again
  23666. - */
  23667. -
  23668. -/*
  23669. -
  23670. - This file is part of VIPS.
  23671. -
  23672. - VIPS is free software; you can redistribute it and/or modify
  23673. - it under the terms of the GNU Lesser General Public License as published by
  23674. - the Free Software Foundation; either version 2 of the License, or
  23675. - (at your option) any later version.
  23676. -
  23677. - This program is distributed in the hope that it will be useful,
  23678. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  23679. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23680. - GNU Lesser General Public License for more details.
  23681. -
  23682. - You should have received a copy of the GNU Lesser General Public License
  23683. - along with this program; if not, write to the Free Software
  23684. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  23685. - 02110-1301 USA
  23686. -
  23687. - */
  23688. -
  23689. -/*
  23690. -
  23691. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  23692. -
  23693. - */
  23694. -
  23695. -/* Bicubic (Catmull-Rom) interpolator derived from Nicolas Robidoux's
  23696. - * original YAFR resampler with permission and thanks.
  23697. - */
  23698. -
  23699. -/*
  23700. -#define DEBUG
  23701. - */
  23702. -
  23703. -#ifdef HAVE_CONFIG_H
  23704. -#include <config.h>
  23705. -#endif /*HAVE_CONFIG_H*/
  23706. -#include <vips/intl.h>
  23707. -
  23708. -#include <stdio.h>
  23709. -#include <stdlib.h>
  23710. -
  23711. -#include <vips/vips.h>
  23712. -#include <vips/internal.h>
  23713. -
  23714. -#include "templates.h"
  23715. -
  23716. -#ifdef WITH_DMALLOC
  23717. -#include <dmalloc.h>
  23718. -#endif /*WITH_DMALLOC*/
  23719. -
  23720. -#define VIPS_TYPE_INTERPOLATE_BICUBIC \
  23721. - (vips_interpolate_bicubic_get_type())
  23722. -#define VIPS_INTERPOLATE_BICUBIC( obj ) \
  23723. - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
  23724. - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubic ))
  23725. -#define VIPS_INTERPOLATE_BICUBIC_CLASS( klass ) \
  23726. - (G_TYPE_CHECK_CLASS_CAST( (klass), \
  23727. - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass))
  23728. -#define VIPS_IS_INTERPOLATE_BICUBIC( obj ) \
  23729. - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_BICUBIC ))
  23730. -#define VIPS_IS_INTERPOLATE_BICUBIC_CLASS( klass ) \
  23731. - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_BICUBIC ))
  23732. -#define VIPS_INTERPOLATE_BICUBIC_GET_CLASS( obj ) \
  23733. - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
  23734. - VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass ))
  23735. -
  23736. -typedef VipsInterpolate VipsInterpolateBicubic;
  23737. -
  23738. -typedef VipsInterpolateClass VipsInterpolateBicubicClass;
  23739. -
  23740. -/* Precalculated interpolation matrices. int (used for pel
  23741. - * sizes up to short), and double (for all others). We go to
  23742. - * scale + 1 so we can round-to-nearest safely.
  23743. - */
  23744. -
  23745. -/* We could keep a large set of 2d 4x4 matricies, but this actually
  23746. - * works out slower since for many resizes the thing will no longer
  23747. - * fit in L1.
  23748. - */
  23749. -static int vips_bicubic_matrixi[VIPS_TRANSFORM_SCALE + 1][4];
  23750. -static double vips_bicubic_matrixf[VIPS_TRANSFORM_SCALE + 1][4];
  23751. -
  23752. -/* We need C linkage for this.
  23753. - */
  23754. -extern "C" {
  23755. -G_DEFINE_TYPE( VipsInterpolateBicubic, vips_interpolate_bicubic,
  23756. - VIPS_TYPE_INTERPOLATE );
  23757. -}
  23758. -
  23759. -/* Pointers to write to / read from, number of bands,
  23760. - * how many bytes to add to move down a line.
  23761. - */
  23762. -
  23763. -/* T is the type of pixels we are reading and writing.
  23764. - */
  23765. -
  23766. -/* Fixed-point version, for 8 and 16-bit types.
  23767. - */
  23768. -template <typename T, int min_value, int max_value>
  23769. -static void inline
  23770. -bicubic_int_tab( void *pout, const VipsPel *pin,
  23771. - const int bands, const int lskip,
  23772. - const int *cx, const int *cy )
  23773. -{
  23774. - T* restrict out = (T *) pout;
  23775. - const T* restrict in = (T *) pin;
  23776. -
  23777. - const int b1 = bands;
  23778. - const int b2 = b1 + b1;
  23779. - const int b3 = b1 + b2;
  23780. -
  23781. - const int l1 = lskip / sizeof( T );
  23782. - const int l2 = l1 + l1;
  23783. - const int l3 = l1 + l2;
  23784. -
  23785. - const int l1_plus_b1 = l1 + b1;
  23786. - const int l1_plus_b2 = l1 + b2;
  23787. - const int l1_plus_b3 = l1 + b3;
  23788. - const int l2_plus_b1 = l2 + b1;
  23789. - const int l2_plus_b2 = l2 + b2;
  23790. - const int l2_plus_b3 = l2 + b3;
  23791. - const int l3_plus_b1 = l3 + b1;
  23792. - const int l3_plus_b2 = l3 + b2;
  23793. - const int l3_plus_b3 = l3 + b3;
  23794. -
  23795. - for( int z = 0; z < bands; z++ ) {
  23796. - const T uno_one = in[0];
  23797. - const T uno_two = in[b1];
  23798. - const T uno_thr = in[b2];
  23799. - const T uno_fou = in[b3];
  23800. -
  23801. - const T dos_one = in[l1];
  23802. - const T dos_two = in[l1_plus_b1];
  23803. - const T dos_thr = in[l1_plus_b2];
  23804. - const T dos_fou = in[l1_plus_b3];
  23805. -
  23806. - const T tre_one = in[l2];
  23807. - const T tre_two = in[l2_plus_b1];
  23808. - const T tre_thr = in[l2_plus_b2];
  23809. - const T tre_fou = in[l2_plus_b3];
  23810. -
  23811. - const T qua_one = in[l3];
  23812. - const T qua_two = in[l3_plus_b1];
  23813. - const T qua_thr = in[l3_plus_b2];
  23814. - const T qua_fou = in[l3_plus_b3];
  23815. -
  23816. - int bicubic = bicubic_int<T>(
  23817. - uno_one, uno_two, uno_thr, uno_fou,
  23818. - dos_one, dos_two, dos_thr, dos_fou,
  23819. - tre_one, tre_two, tre_thr, tre_fou,
  23820. - qua_one, qua_two, qua_thr, qua_fou,
  23821. - cx, cy );
  23822. -
  23823. - if( bicubic < min_value )
  23824. - bicubic = min_value;
  23825. - else if( bicubic > max_value )
  23826. - bicubic = max_value;
  23827. -
  23828. - out[z] = bicubic;
  23829. -
  23830. - in += 1;
  23831. - }
  23832. -}
  23833. -
  23834. -/* Floating-point version, for int/float types.
  23835. - */
  23836. -template <typename T>
  23837. -static void inline
  23838. -bicubic_float_tab( void *pout, const VipsPel *pin,
  23839. - const int bands, const int lskip,
  23840. - const double *cx, const double *cy )
  23841. -{
  23842. - T* restrict out = (T *) pout;
  23843. - const T* restrict in = (T *) pin;
  23844. -
  23845. - const int b1 = bands;
  23846. - const int b2 = b1 + b1;
  23847. - const int b3 = b1 + b2;
  23848. -
  23849. - const int l1 = lskip / sizeof( T );
  23850. - const int l2 = l1 + l1;
  23851. - const int l3 = l1 + l2;
  23852. -
  23853. - const int l1_plus_b1 = l1 + b1;
  23854. - const int l1_plus_b2 = l1 + b2;
  23855. - const int l1_plus_b3 = l1 + b3;
  23856. - const int l2_plus_b1 = l2 + b1;
  23857. - const int l2_plus_b2 = l2 + b2;
  23858. - const int l2_plus_b3 = l2 + b3;
  23859. - const int l3_plus_b1 = l3 + b1;
  23860. - const int l3_plus_b2 = l3 + b2;
  23861. - const int l3_plus_b3 = l3 + b3;
  23862. -
  23863. - for( int z = 0; z < bands; z++ ) {
  23864. - const T uno_one = in[0];
  23865. - const T uno_two = in[b1];
  23866. - const T uno_thr = in[b2];
  23867. - const T uno_fou = in[b3];
  23868. -
  23869. - const T dos_one = in[l1];
  23870. - const T dos_two = in[l1_plus_b1];
  23871. - const T dos_thr = in[l1_plus_b2];
  23872. - const T dos_fou = in[l1_plus_b3];
  23873. -
  23874. - const T tre_one = in[l2];
  23875. - const T tre_two = in[l2_plus_b1];
  23876. - const T tre_thr = in[l2_plus_b2];
  23877. - const T tre_fou = in[l2_plus_b3];
  23878. -
  23879. - const T qua_one = in[l3];
  23880. - const T qua_two = in[l3_plus_b1];
  23881. - const T qua_thr = in[l3_plus_b2];
  23882. - const T qua_fou = in[l3_plus_b3];
  23883. -
  23884. - const T bicubic = bicubic_float<T>(
  23885. - uno_one, uno_two, uno_thr, uno_fou,
  23886. - dos_one, dos_two, dos_thr, dos_fou,
  23887. - tre_one, tre_two, tre_thr, tre_fou,
  23888. - qua_one, qua_two, qua_thr, qua_fou,
  23889. - cx, cy );
  23890. -
  23891. - out[z] = bicubic;
  23892. -
  23893. - in += 1;
  23894. - }
  23895. -}
  23896. -
  23897. -/* Ultra-high-quality version for double images.
  23898. - */
  23899. -template <typename T>
  23900. -static void inline
  23901. -bicubic_notab( void *pout, const VipsPel *pin,
  23902. - const int bands, const int lskip,
  23903. - double x, double y )
  23904. -{
  23905. - T* restrict out = (T *) pout;
  23906. - const T* restrict in = (T *) pin;
  23907. -
  23908. - const int b1 = bands;
  23909. - const int b2 = b1 + b1;
  23910. - const int b3 = b1 + b2;
  23911. -
  23912. - const int l1 = lskip / sizeof( T );
  23913. - const int l2 = l1 + l1;
  23914. - const int l3 = l1 + l2;
  23915. -
  23916. - const int l1_plus_b1 = l1 + b1;
  23917. - const int l1_plus_b2 = l1 + b2;
  23918. - const int l1_plus_b3 = l1 + b3;
  23919. - const int l2_plus_b1 = l2 + b1;
  23920. - const int l2_plus_b2 = l2 + b2;
  23921. - const int l2_plus_b3 = l2 + b3;
  23922. - const int l3_plus_b1 = l3 + b1;
  23923. - const int l3_plus_b2 = l3 + b2;
  23924. - const int l3_plus_b3 = l3 + b3;
  23925. -
  23926. - double cx[4];
  23927. - double cy[4];
  23928. -
  23929. - calculate_coefficients_catmull( x, cx );
  23930. - calculate_coefficients_catmull( y, cy );
  23931. -
  23932. - for( int z = 0; z < bands; z++ ) {
  23933. - const T uno_one = in[0];
  23934. - const T uno_two = in[b1];
  23935. - const T uno_thr = in[b2];
  23936. - const T uno_fou = in[b3];
  23937. -
  23938. - const T dos_one = in[l1];
  23939. - const T dos_two = in[l1_plus_b1];
  23940. - const T dos_thr = in[l1_plus_b2];
  23941. - const T dos_fou = in[l1_plus_b3];
  23942. -
  23943. - const T tre_one = in[l2];
  23944. - const T tre_two = in[l2_plus_b1];
  23945. - const T tre_thr = in[l2_plus_b2];
  23946. - const T tre_fou = in[l2_plus_b3];
  23947. -
  23948. - const T qua_one = in[l3];
  23949. - const T qua_two = in[l3_plus_b1];
  23950. - const T qua_thr = in[l3_plus_b2];
  23951. - const T qua_fou = in[l3_plus_b3];
  23952. -
  23953. - const T bicubic = bicubic_float<T>(
  23954. - uno_one, uno_two, uno_thr, uno_fou,
  23955. - dos_one, dos_two, dos_thr, dos_fou,
  23956. - tre_one, tre_two, tre_thr, tre_fou,
  23957. - qua_one, qua_two, qua_thr, qua_fou,
  23958. - cx, cy );
  23959. -
  23960. - out[z] = bicubic;
  23961. -
  23962. - in += 1;
  23963. - }
  23964. -}
  23965. -
  23966. -static void
  23967. -vips_interpolate_bicubic_interpolate( VipsInterpolate *interpolate,
  23968. - void *out, VipsRegion *in, double x, double y )
  23969. -{
  23970. - /* Find the mask index. We round-to-nearest, so we need to generate
  23971. - * indexes in 0 to VIPS_TRANSFORM_SCALE, 2^n + 1 values. We multiply
  23972. - * by 2 more than we need to, add one, mask, then shift down again to
  23973. - * get the extra range.
  23974. - */
  23975. - const int sx = x * VIPS_TRANSFORM_SCALE * 2;
  23976. - const int sy = y * VIPS_TRANSFORM_SCALE * 2;
  23977. -
  23978. - const int six = sx & (VIPS_TRANSFORM_SCALE * 2 - 1);
  23979. - const int siy = sy & (VIPS_TRANSFORM_SCALE * 2 - 1);
  23980. -
  23981. - const int tx = (six + 1) >> 1;
  23982. - const int ty = (siy + 1) >> 1;
  23983. -
  23984. - /* We know x/y are always positive, so we can just (int) them.
  23985. - */
  23986. - const int ix = (int) x;
  23987. - const int iy = (int) y;
  23988. -
  23989. - /* Back and up one to get the top-left of the 4x4.
  23990. - */
  23991. - const VipsPel *p = VIPS_REGION_ADDR( in, ix - 1, iy - 1 );
  23992. -
  23993. - /* Look up the tables we need.
  23994. - */
  23995. - const int *cxi = vips_bicubic_matrixi[tx];
  23996. - const int *cyi = vips_bicubic_matrixi[ty];
  23997. - const double *cxf = vips_bicubic_matrixf[tx];
  23998. - const double *cyf = vips_bicubic_matrixf[ty];
  23999. -
  24000. - /* Pel size and line size.
  24001. - */
  24002. - const int bands = in->im->Bands;
  24003. - const int lskip = VIPS_REGION_LSKIP( in );
  24004. -
  24005. -#ifdef DEBUG
  24006. - printf( "vips_interpolate_bicubic_interpolate: %g %g\n", x, y );
  24007. - printf( "\tleft=%d, top=%d, width=%d, height=%d\n",
  24008. - ix - 1, iy - 1, 4, 4 );
  24009. - printf( "\tmaskx=%d, masky=%d\n", tx, ty );
  24010. -#endif /*DEBUG*/
  24011. -
  24012. - switch( in->im->BandFmt ) {
  24013. - case VIPS_FORMAT_UCHAR:
  24014. - bicubic_int_tab<unsigned char, 0, UCHAR_MAX>(
  24015. - out, p, bands, lskip,
  24016. - cxi, cyi );
  24017. - /*
  24018. -
  24019. - Handy for benchmarking
  24020. -
  24021. - bicubic_float_tab<unsigned char>(
  24022. - out, p, bands, lskip,
  24023. - cxf, cyf );
  24024. - bicubic_notab<unsigned char>(
  24025. - out, p, bands, lskip,
  24026. - x - ix, y - iy );
  24027. -
  24028. - */
  24029. - break;
  24030. -
  24031. - case VIPS_FORMAT_CHAR:
  24032. - bicubic_int_tab<signed char, SCHAR_MIN, SCHAR_MAX>(
  24033. - out, p, bands, lskip,
  24034. - cxi, cyi );
  24035. - break;
  24036. -
  24037. - case VIPS_FORMAT_USHORT:
  24038. - bicubic_int_tab<unsigned short, 0, USHRT_MAX>(
  24039. - out, p, bands, lskip,
  24040. - cxi, cyi );
  24041. - break;
  24042. -
  24043. - case VIPS_FORMAT_SHORT:
  24044. - bicubic_int_tab<signed short, SHRT_MIN, SHRT_MAX>(
  24045. - out, p, bands, lskip,
  24046. - cxi, cyi );
  24047. - break;
  24048. -
  24049. - case VIPS_FORMAT_UINT:
  24050. - bicubic_float_tab<unsigned int>( out, p, bands, lskip,
  24051. - cxf, cyf );
  24052. - break;
  24053. -
  24054. - case VIPS_FORMAT_INT:
  24055. - bicubic_float_tab<signed int>( out, p, bands, lskip,
  24056. - cxf, cyf );
  24057. - break;
  24058. -
  24059. - case VIPS_FORMAT_FLOAT:
  24060. - bicubic_float_tab<float>( out, p, bands, lskip,
  24061. - cxf, cyf );
  24062. - break;
  24063. -
  24064. - case VIPS_FORMAT_DOUBLE:
  24065. - bicubic_notab<double>( out, p, bands, lskip,
  24066. - x - ix, y - iy );
  24067. - break;
  24068. -
  24069. - case VIPS_FORMAT_COMPLEX:
  24070. - bicubic_float_tab<float>( out, p, bands * 2, lskip,
  24071. - cxf, cyf );
  24072. - break;
  24073. -
  24074. - case VIPS_FORMAT_DPCOMPLEX:
  24075. - bicubic_notab<double>( out, p, bands * 2, lskip,
  24076. - x - ix, y - iy );
  24077. - break;
  24078. -
  24079. - default:
  24080. - break;
  24081. - }
  24082. -}
  24083. -
  24084. -static void
  24085. -vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass )
  24086. -{
  24087. - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( iclass );
  24088. - VipsInterpolateClass *interpolate_class =
  24089. - VIPS_INTERPOLATE_CLASS( iclass );
  24090. -
  24091. - object_class->nickname = "bicubic";
  24092. - object_class->description = _( "Bicubic interpolation (Catmull-Rom)" );
  24093. -
  24094. - interpolate_class->interpolate = vips_interpolate_bicubic_interpolate;
  24095. - interpolate_class->window_size = 4;
  24096. -
  24097. - /* Build the tables of pre-computed coefficients.
  24098. - */
  24099. - for( int x = 0; x < VIPS_TRANSFORM_SCALE + 1; x++ ) {
  24100. - calculate_coefficients_catmull(
  24101. - (float) x / VIPS_TRANSFORM_SCALE,
  24102. - vips_bicubic_matrixf[x] );
  24103. -
  24104. - for( int i = 0; i < 4; i++ )
  24105. - vips_bicubic_matrixi[x][i] =
  24106. - vips_bicubic_matrixf[x][i] *
  24107. - VIPS_INTERPOLATE_SCALE;
  24108. - }
  24109. -}
  24110. -
  24111. -static void
  24112. -vips_interpolate_bicubic_init( VipsInterpolateBicubic *bicubic )
  24113. -{
  24114. -#ifdef DEBUG
  24115. - printf( "vips_interpolate_bicubic_init: " );
  24116. - vips_object_print( VIPS_OBJECT( bicubic ) );
  24117. -#endif /*DEBUG*/
  24118. -
  24119. -}
  24120. -
  24121. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/lbb.cpp vips-7.38.5/libvips/resample/lbb.cpp
  24122. --- vips-7.38.5-vanilla/libvips/resample/lbb.cpp 2014-07-17 23:48:36.232794473 -0400
  24123. +++ vips-7.38.5/libvips/resample/lbb.cpp 1969-12-31 19:00:00.000000000 -0500
  24124. @@ -1,868 +0,0 @@
  24125. -/* lbb (locally bounded bicubic) resampler
  24126. - *
  24127. - * N. Robidoux, C. Racette and J. Cupitt, 23-28/03/2010
  24128. - *
  24129. - * N. Robidoux, 16-19/05/2010
  24130. - *
  24131. - * N. Robidoux, 22/11/2011
  24132. - */
  24133. -
  24134. -/*
  24135. -
  24136. - This file is part of VIPS.
  24137. -
  24138. - VIPS is free software; you can redistribute it and/or modify it
  24139. - under the terms of the GNU Lesser General Public License as
  24140. - published by the Free Software Foundation; either version 2 of the
  24141. - License, or (at your option) any later version.
  24142. -
  24143. - This program is distributed in the hope that it will be useful,
  24144. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  24145. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  24146. - Lesser General Public License for more details.
  24147. -
  24148. - You should have received a copy of the GNU Lesser General Public
  24149. - License along with this program; if not, write to the Free Software
  24150. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  24151. - 02110-1301 USA
  24152. -
  24153. - */
  24154. -
  24155. -/*
  24156. -
  24157. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  24158. -
  24159. - */
  24160. -
  24161. -/*
  24162. - * 2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt.
  24163. - *
  24164. - * N. Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer,
  24165. - * Øyvind Kolås, Minglun Gong, Eric Daoust and Sven Neumann for useful
  24166. - * comments and code.
  24167. - *
  24168. - * C. Racette's image resampling research and programming funded in
  24169. - * part by an NSERC (National Science and Engineering Research Council
  24170. - * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an
  24171. - * NSERC Discovery Grant awarded to Julien Dompierre (grant number
  24172. - * 20-61098) and by N. Robidoux's Laurentian University professional
  24173. - * allowance.
  24174. - */
  24175. -
  24176. -/*
  24177. - * LBB has two versions:
  24178. - *
  24179. - * A "soft" version, which shows a little less staircasing and a
  24180. - * little more haloing, and which is a little more expensive to
  24181. - * compute. We recommend this as the default.
  24182. - *
  24183. - * A "sharp" version, which shows a little more staircasing and a
  24184. - * little less haloing, which is a little cheaper (it uses 6 less
  24185. - * comparisons and 12 less "? :").
  24186. - *
  24187. - * The only difference between the two is that the "soft" versions
  24188. - * uses local minima and maxima computed over 3x3 square blocks, and
  24189. - * the "sharp" version uses local minima and maxima computed over 3x3
  24190. - * crosses.
  24191. - *
  24192. - * If you want to use the "sharp" version, comment out the following
  24193. - * three pre-processor code lines:
  24194. - */
  24195. -/*
  24196. -#ifndef __LBB_CHEAP_H__
  24197. -#define __LBB_CHEAP_H__
  24198. -#endif
  24199. -*/
  24200. -
  24201. -/*
  24202. - * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant
  24203. - * of Catmull-Rom. Images resampled with LBB have much smaller halos
  24204. - * than images resampled with windowed sincs or other interpolatory
  24205. - * cubic spline filters. Specifically, LBB halos are narrower and the
  24206. - * over/undershoot amplitude is smaller. This is accomplished without
  24207. - * significantly affecting the smoothness of the result (compared to
  24208. - * Catmull-Rom).
  24209. - *
  24210. - * Another important property is that the resampled values are
  24211. - * contained within the range of nearby input values. Consequently, no
  24212. - * final clamping is needed to stay "in range" (e.g., 0-255 for
  24213. - * standard 8-bit images).
  24214. - *
  24215. - * LBB was developed by N. Robidoux and C. Racette at the Department
  24216. - * of Mathematics and Computer Science of Laurentian University in the
  24217. - * course of C. Racette's Masters thesis in Computational
  24218. - * Sciences. Preliminary work directly leading to the LBB method and
  24219. - * code was performed by C. Racette and N. Robidoux in the course of
  24220. - * her honours thesis, and by N. Robidoux, A. Turcotte and E. Daoust
  24221. - * during Google Summer of Code 2009 (through two awards made to GIMP
  24222. - * to improve GEGL).
  24223. - *
  24224. - * LBB is a novel method with the following properties:
  24225. - *
  24226. - * --LBB is a Hermite bicubic method: The bicubic surface is defined,
  24227. - * one convex hull of four nearby input points at a time, using four
  24228. - * point values, four x-derivatives, four y-derivatives, and four
  24229. - * cross-derivatives.
  24230. - *
  24231. - * --The stencil for values in a square patch is the usual 4x4.
  24232. - *
  24233. - * --LBB is interpolatory.
  24234. - *
  24235. - * --It is C^1 with continuous cross derivatives.
  24236. - *
  24237. - * --When the limiters are inactive, LBB gives the same result as
  24238. - * Catmull-Rom.
  24239. - *
  24240. - * --When used on binary images, LBB gives results similar to bicubic
  24241. - * Hermite with all first derivatives---but not necessarily the
  24242. - * cross derivatives (this last assertion needs to be double
  24243. - * checked)--at input pixel locations set to zero.
  24244. - *
  24245. - * --The LBB reconstruction is locally bounded: Over each square
  24246. - * patch, the surface is contained between the minimum and the
  24247. - * maximum of the 16 nearest input pixel values.
  24248. - *
  24249. - * --Consequently, the LBB reconstruction is globally bounded between
  24250. - * the very smallest input pixel value and the very largest input
  24251. - * pixel value. It is not necessary to clamp results.
  24252. - *
  24253. - * The LBB method is based on the method of Ken Brodlie, Petros
  24254. - * Mashwama and Sohail Butt for constraining Hermite interpolants
  24255. - * between globally defined planes:
  24256. - *
  24257. - * Visualization of surface data to preserve positivity and other
  24258. - * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages
  24259. - * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C.
  24260. - *
  24261. - * Instead of forcing the reconstructed surface to lie between two
  24262. - * GLOBALLY defined planes, LBB constrains one patch at a time to lie
  24263. - * between LOCALLY defined planes. This is accomplished by
  24264. - * constraining the derivatives (x, y and cross) at each input pixel
  24265. - * location so that if the constraint was applied everywhere the
  24266. - * surface would fit between the min and max of the values at the 9
  24267. - * closest pixel locations. Because this is done with each of the four
  24268. - * pixel locations which define the bicubic patch, this forces the
  24269. - * reconstructed surface to lie between the min and max of the values
  24270. - * at the 16 closest values pixel locations. (Each corner defines its
  24271. - * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is
  24272. - * necessarily above the minimum of the four minima, which happens to
  24273. - * be the minimum over the 4x4. Similarly with the maxima.)
  24274. - *
  24275. - * The above paragraph described the "soft" version of LBB. The
  24276. - * "sharp" version is similar.
  24277. - */
  24278. -
  24279. -#ifdef HAVE_CONFIG_H
  24280. -#include <config.h>
  24281. -#endif /*HAVE_CONFIG_H*/
  24282. -#include <vips/intl.h>
  24283. -
  24284. -#include <stdio.h>
  24285. -#include <stdlib.h>
  24286. -
  24287. -#include <vips/vips.h>
  24288. -#include <vips/internal.h>
  24289. -
  24290. -#include "templates.h"
  24291. -
  24292. -#define VIPS_TYPE_INTERPOLATE_LBB \
  24293. - (vips_interpolate_lbb_get_type())
  24294. -#define VIPS_INTERPOLATE_LBB( obj ) \
  24295. - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
  24296. - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbb ))
  24297. -#define VIPS_INTERPOLATE_LBB_CLASS( klass ) \
  24298. - (G_TYPE_CHECK_CLASS_CAST( (klass), \
  24299. - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass))
  24300. -#define VIPS_IS_INTERPOLATE_LBB( obj ) \
  24301. - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_LBB ))
  24302. -#define VIPS_IS_INTERPOLATE_LBB_CLASS( klass ) \
  24303. - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_LBB ))
  24304. -#define VIPS_INTERPOLATE_LBB_GET_CLASS( obj ) \
  24305. - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
  24306. - VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass ))
  24307. -
  24308. -typedef struct _VipsInterpolateLbb {
  24309. - VipsInterpolate parent_object;
  24310. -
  24311. -} VipsInterpolateLbb;
  24312. -
  24313. -typedef struct _VipsInterpolateLbbClass {
  24314. - VipsInterpolateClass parent_class;
  24315. -
  24316. -} VipsInterpolateLbbClass;
  24317. -
  24318. -/*
  24319. - * Absolute value and sign macros:
  24320. - */
  24321. -#define LBB_ABS(x) ( ((x)>=0.) ? (x) : -(x) )
  24322. -#define LBB_SIGN(x) ( ((x)>=0.) ? 1.0 : -1.0 )
  24323. -/*
  24324. - * MIN and MAX macros set up so that I can put the likely winner in
  24325. - * the first argument (forward branch likely blah blah blah):
  24326. - */
  24327. -#define LBB_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) )
  24328. -#define LBB_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) )
  24329. -
  24330. -static inline double
  24331. -lbbicubic( const double c00,
  24332. - const double c10,
  24333. - const double c01,
  24334. - const double c11,
  24335. - const double c00dx,
  24336. - const double c10dx,
  24337. - const double c01dx,
  24338. - const double c11dx,
  24339. - const double c00dy,
  24340. - const double c10dy,
  24341. - const double c01dy,
  24342. - const double c11dy,
  24343. - const double c00dxdy,
  24344. - const double c10dxdy,
  24345. - const double c01dxdy,
  24346. - const double c11dxdy,
  24347. - const double uno_one,
  24348. - const double uno_two,
  24349. - const double uno_thr,
  24350. - const double uno_fou,
  24351. - const double dos_one,
  24352. - const double dos_two,
  24353. - const double dos_thr,
  24354. - const double dos_fou,
  24355. - const double tre_one,
  24356. - const double tre_two,
  24357. - const double tre_thr,
  24358. - const double tre_fou,
  24359. - const double qua_one,
  24360. - const double qua_two,
  24361. - const double qua_thr,
  24362. - const double qua_fou )
  24363. -{
  24364. - /*
  24365. - * STENCIL (FOOTPRINT) OF INPUT VALUES:
  24366. - *
  24367. - * The stencil of LBB is the same as for any standard Hermite
  24368. - * bicubic (e.g., Catmull-Rom):
  24369. - *
  24370. - * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
  24371. - * = uno_one = uno_two = uno_thr = uno_fou
  24372. - *
  24373. - * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
  24374. - * = dos_one = dos_two = dos_thr = dos_fou
  24375. - * X
  24376. - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
  24377. - * = tre_one = tre_two = tre_thr = tre_fou
  24378. - *
  24379. - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2)
  24380. - * = qua_one = qua_two = qua_thr = qua_fou
  24381. - *
  24382. - * where ix is the (pseudo-)floor of the requested left-to-right
  24383. - * location ("X"), and iy is the floor of the requested up-to-down
  24384. - * location.
  24385. - */
  24386. -
  24387. -#if defined (__LBB_CHEAP_H__)
  24388. - /*
  24389. - * Computation of the four min and four max over 3x3 input data
  24390. - * sub-crosses of the 4x4 input stencil, performed with only 22
  24391. - * comparisons and 28 "? :". If you can figure out how to do this
  24392. - * more efficiently, let us know.
  24393. - *
  24394. - * This is the cheaper (but arguably less desirable in terms of
  24395. - * quality) version of the computation.
  24396. - */
  24397. - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
  24398. - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
  24399. - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
  24400. - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
  24401. - const double m3 = (uno_two <= dos_one) ? uno_two : dos_one ;
  24402. - const double M3 = (uno_two <= dos_one) ? dos_one : uno_two ;
  24403. - const double m4 = (uno_thr <= dos_fou) ? uno_thr : dos_fou ;
  24404. - const double M4 = (uno_thr <= dos_fou) ? dos_fou : uno_thr ;
  24405. - const double m5 = (tre_one <= qua_two) ? tre_one : qua_two ;
  24406. - const double M5 = (tre_one <= qua_two) ? qua_two : tre_one ;
  24407. - const double m6 = (tre_fou <= qua_thr) ? tre_fou : qua_thr ;
  24408. - const double M6 = (tre_fou <= qua_thr) ? qua_thr : tre_fou ;
  24409. - const double m7 = LBB_MIN( m1, tre_two );
  24410. - const double M7 = LBB_MAX( M1, tre_two );
  24411. - const double m8 = LBB_MIN( m1, tre_thr );
  24412. - const double M8 = LBB_MAX( M1, tre_thr );
  24413. - const double m9 = LBB_MIN( m2, dos_two );
  24414. - const double M9 = LBB_MAX( M2, dos_two );
  24415. - const double m10 = LBB_MIN( m2, dos_thr );
  24416. - const double M10 = LBB_MAX( M2, dos_thr );
  24417. - const double min00 = LBB_MIN( m7, m3 );
  24418. - const double max00 = LBB_MAX( M7, M3 );
  24419. - const double min10 = LBB_MIN( m8, m4 );
  24420. - const double max10 = LBB_MAX( M8, M4 );
  24421. - const double min01 = LBB_MIN( m9, m5 );
  24422. - const double max01 = LBB_MAX( M9, M5 );
  24423. - const double min11 = LBB_MIN( m10, m6 );
  24424. - const double max11 = LBB_MAX( M10, M6 );
  24425. -#else
  24426. - /*
  24427. - * Computation of the four min and four max over 3x3 input data
  24428. - * sub-blocks of the 4x4 input stencil, performed with only 28
  24429. - * comparisons and 34 "? :". If you can figure how to do this more
  24430. - * efficiently, let us know.
  24431. - */
  24432. - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
  24433. - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
  24434. - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
  24435. - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
  24436. - const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ;
  24437. - const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ;
  24438. - const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ;
  24439. - const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ;
  24440. - const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ;
  24441. - const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ;
  24442. - const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ;
  24443. - const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ;
  24444. - const double m5 = LBB_MIN( m1, m2 );
  24445. - const double M5 = LBB_MAX( M1, M2 );
  24446. - const double m10 = LBB_MIN( m6, uno_one );
  24447. - const double M10 = LBB_MAX( M6, uno_one );
  24448. - const double m11 = LBB_MIN( m6, qua_one );
  24449. - const double M11 = LBB_MAX( M6, qua_one );
  24450. - const double m12 = LBB_MIN( m7, uno_fou );
  24451. - const double M12 = LBB_MAX( M7, uno_fou );
  24452. - const double m13 = LBB_MIN( m7, qua_fou );
  24453. - const double M13 = LBB_MAX( M7, qua_fou );
  24454. - const double m8 = LBB_MIN( m5, m3 );
  24455. - const double M8 = LBB_MAX( M5, M3 );
  24456. - const double m9 = LBB_MIN( m5, m4 );
  24457. - const double M9 = LBB_MAX( M5, M4 );
  24458. - const double min00 = LBB_MIN( m8, m10 );
  24459. - const double max00 = LBB_MAX( M8, M10 );
  24460. - const double min10 = LBB_MIN( m8, m12 );
  24461. - const double max10 = LBB_MAX( M8, M12 );
  24462. - const double min01 = LBB_MIN( m9, m11 );
  24463. - const double max01 = LBB_MAX( M9, M11 );
  24464. - const double min11 = LBB_MIN( m9, m13 );
  24465. - const double max11 = LBB_MAX( M9, M13 );
  24466. -#endif
  24467. -
  24468. - /*
  24469. - * The remainder of the "per channel" computation involves the
  24470. - * computation of:
  24471. - *
  24472. - * --8 conditional moves,
  24473. - *
  24474. - * --8 signs (in which the sign of zero is unimportant),
  24475. - *
  24476. - * --12 minima of two values,
  24477. - *
  24478. - * --8 maxima of two values,
  24479. - *
  24480. - * --8 absolute values,
  24481. - *
  24482. - * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8
  24483. - * signs, and 8 absolute values. If everything is done with
  24484. - * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved
  24485. - * (because initial min and max can be computed with one flag).
  24486. - *
  24487. - * The "per channel" part of the computation also involves 107
  24488. - * arithmetic operations (54 *, 21 +, 42 -).
  24489. - */
  24490. -
  24491. - /*
  24492. - * Distances to the local min and max:
  24493. - */
  24494. - const double u00 = dos_two - min00;
  24495. - const double v00 = max00 - dos_two;
  24496. - const double u10 = dos_thr - min10;
  24497. - const double v10 = max10 - dos_thr;
  24498. - const double u01 = tre_two - min01;
  24499. - const double v01 = max01 - tre_two;
  24500. - const double u11 = tre_thr - min11;
  24501. - const double v11 = max11 - tre_thr;
  24502. -
  24503. - /*
  24504. - * Initial values of the derivatives computed with centered
  24505. - * differences. Factors of 1/2 are left out because they are folded
  24506. - * in later:
  24507. - */
  24508. - const double dble_dzdx00i = dos_thr - dos_one;
  24509. - const double dble_dzdy11i = qua_thr - dos_thr;
  24510. - const double dble_dzdx10i = dos_fou - dos_two;
  24511. - const double dble_dzdy01i = qua_two - dos_two;
  24512. - const double dble_dzdx01i = tre_thr - tre_one;
  24513. - const double dble_dzdy10i = tre_thr - uno_thr;
  24514. - const double dble_dzdx11i = tre_fou - tre_two;
  24515. - const double dble_dzdy00i = tre_two - uno_two;
  24516. -
  24517. - /*
  24518. - * Signs of the derivatives. The upcoming clamping does not change
  24519. - * them (except if the clamping sends a negative derivative to 0, in
  24520. - * which case the sign does not matter anyway).
  24521. - */
  24522. - const double sign_dzdx00 = LBB_SIGN( dble_dzdx00i );
  24523. - const double sign_dzdx10 = LBB_SIGN( dble_dzdx10i );
  24524. - const double sign_dzdx01 = LBB_SIGN( dble_dzdx01i );
  24525. - const double sign_dzdx11 = LBB_SIGN( dble_dzdx11i );
  24526. -
  24527. - const double sign_dzdy00 = LBB_SIGN( dble_dzdy00i );
  24528. - const double sign_dzdy10 = LBB_SIGN( dble_dzdy10i );
  24529. - const double sign_dzdy01 = LBB_SIGN( dble_dzdy01i );
  24530. - const double sign_dzdy11 = LBB_SIGN( dble_dzdy11i );
  24531. -
  24532. - /*
  24533. - * Initial values of the cross-derivatives. Factors of 1/4 are left
  24534. - * out because folded in later:
  24535. - */
  24536. - const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i;
  24537. - const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i;
  24538. - const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i;
  24539. - const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i;
  24540. -
  24541. - /*
  24542. - * Slope limiters. The key multiplier is 3 but we fold a factor of
  24543. - * 2, hence 6:
  24544. - */
  24545. - const double dble_slopelimit_00 = 6.0 * LBB_MIN( u00, v00 );
  24546. - const double dble_slopelimit_10 = 6.0 * LBB_MIN( u10, v10 );
  24547. - const double dble_slopelimit_01 = 6.0 * LBB_MIN( u01, v01 );
  24548. - const double dble_slopelimit_11 = 6.0 * LBB_MIN( u11, v11 );
  24549. -
  24550. - /*
  24551. - * Clamped first derivatives:
  24552. - */
  24553. - const double dble_dzdx00 =
  24554. - ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 )
  24555. - ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00;
  24556. - const double dble_dzdy00 =
  24557. - ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 )
  24558. - ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00;
  24559. - const double dble_dzdx10 =
  24560. - ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 )
  24561. - ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10;
  24562. - const double dble_dzdy10 =
  24563. - ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 )
  24564. - ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10;
  24565. - const double dble_dzdx01 =
  24566. - ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 )
  24567. - ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01;
  24568. - const double dble_dzdy01 =
  24569. - ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 )
  24570. - ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01;
  24571. - const double dble_dzdx11 =
  24572. - ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 )
  24573. - ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11;
  24574. - const double dble_dzdy11 =
  24575. - ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 )
  24576. - ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11;
  24577. -
  24578. - /*
  24579. - * Sums and differences of first derivatives:
  24580. - */
  24581. - const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 );
  24582. - const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 );
  24583. - const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 );
  24584. - const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 );
  24585. - const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 );
  24586. - const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 );
  24587. - const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 );
  24588. - const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 );
  24589. -
  24590. - /*
  24591. - * Absolute values of the sums:
  24592. - */
  24593. - const double twelve_abs_sum00 = LBB_ABS( twelve_sum00 );
  24594. - const double twelve_abs_sum10 = LBB_ABS( twelve_sum10 );
  24595. - const double twelve_abs_sum01 = LBB_ABS( twelve_sum01 );
  24596. - const double twelve_abs_sum11 = LBB_ABS( twelve_sum11 );
  24597. -
  24598. - /*
  24599. - * Scaled distances to the min:
  24600. - */
  24601. - const double u00_times_36 = 36.0 * u00;
  24602. - const double u10_times_36 = 36.0 * u10;
  24603. - const double u01_times_36 = 36.0 * u01;
  24604. - const double u11_times_36 = 36.0 * u11;
  24605. -
  24606. - /*
  24607. - * First cross-derivative limiter:
  24608. - */
  24609. - const double first_limit00 = twelve_abs_sum00 - u00_times_36;
  24610. - const double first_limit10 = twelve_abs_sum10 - u10_times_36;
  24611. - const double first_limit01 = twelve_abs_sum01 - u01_times_36;
  24612. - const double first_limit11 = twelve_abs_sum11 - u11_times_36;
  24613. -
  24614. - const double quad_d2zdxdy00ii = LBB_MAX( quad_d2zdxdy00i, first_limit00 );
  24615. - const double quad_d2zdxdy10ii = LBB_MAX( quad_d2zdxdy10i, first_limit10 );
  24616. - const double quad_d2zdxdy01ii = LBB_MAX( quad_d2zdxdy01i, first_limit01 );
  24617. - const double quad_d2zdxdy11ii = LBB_MAX( quad_d2zdxdy11i, first_limit11 );
  24618. -
  24619. - /*
  24620. - * Scaled distances to the max:
  24621. - */
  24622. - const double v00_times_36 = 36.0 * v00;
  24623. - const double v10_times_36 = 36.0 * v10;
  24624. - const double v01_times_36 = 36.0 * v01;
  24625. - const double v11_times_36 = 36.0 * v11;
  24626. -
  24627. - /*
  24628. - * Second cross-derivative limiter:
  24629. - */
  24630. - const double second_limit00 = v00_times_36 - twelve_abs_sum00;
  24631. - const double second_limit10 = v10_times_36 - twelve_abs_sum10;
  24632. - const double second_limit01 = v01_times_36 - twelve_abs_sum01;
  24633. - const double second_limit11 = v11_times_36 - twelve_abs_sum11;
  24634. -
  24635. - const double quad_d2zdxdy00iii = LBB_MIN( quad_d2zdxdy00ii, second_limit00 );
  24636. - const double quad_d2zdxdy10iii = LBB_MIN( quad_d2zdxdy10ii, second_limit10 );
  24637. - const double quad_d2zdxdy01iii = LBB_MIN( quad_d2zdxdy01ii, second_limit01 );
  24638. - const double quad_d2zdxdy11iii = LBB_MIN( quad_d2zdxdy11ii, second_limit11 );
  24639. -
  24640. - /*
  24641. - * Absolute values of the differences:
  24642. - */
  24643. - const double twelve_abs_dif00 = LBB_ABS( twelve_dif00 );
  24644. - const double twelve_abs_dif10 = LBB_ABS( twelve_dif10 );
  24645. - const double twelve_abs_dif01 = LBB_ABS( twelve_dif01 );
  24646. - const double twelve_abs_dif11 = LBB_ABS( twelve_dif11 );
  24647. -
  24648. - /*
  24649. - * Third cross-derivative limiter:
  24650. - */
  24651. - const double third_limit00 = twelve_abs_dif00 - v00_times_36;
  24652. - const double third_limit10 = twelve_abs_dif10 - v10_times_36;
  24653. - const double third_limit01 = twelve_abs_dif01 - v01_times_36;
  24654. - const double third_limit11 = twelve_abs_dif11 - v11_times_36;
  24655. -
  24656. - const double quad_d2zdxdy00iiii = LBB_MAX( quad_d2zdxdy00iii, third_limit00);
  24657. - const double quad_d2zdxdy10iiii = LBB_MAX( quad_d2zdxdy10iii, third_limit10);
  24658. - const double quad_d2zdxdy01iiii = LBB_MAX( quad_d2zdxdy01iii, third_limit01);
  24659. - const double quad_d2zdxdy11iiii = LBB_MAX( quad_d2zdxdy11iii, third_limit11);
  24660. -
  24661. - /*
  24662. - * Fourth cross-derivative limiter:
  24663. - */
  24664. - const double fourth_limit00 = u00_times_36 - twelve_abs_dif00;
  24665. - const double fourth_limit10 = u10_times_36 - twelve_abs_dif10;
  24666. - const double fourth_limit01 = u01_times_36 - twelve_abs_dif01;
  24667. - const double fourth_limit11 = u11_times_36 - twelve_abs_dif11;
  24668. -
  24669. - const double quad_d2zdxdy00 = LBB_MIN( quad_d2zdxdy00iiii, fourth_limit00);
  24670. - const double quad_d2zdxdy10 = LBB_MIN( quad_d2zdxdy10iiii, fourth_limit10);
  24671. - const double quad_d2zdxdy01 = LBB_MIN( quad_d2zdxdy01iiii, fourth_limit01);
  24672. - const double quad_d2zdxdy11 = LBB_MIN( quad_d2zdxdy11iiii, fourth_limit11);
  24673. -
  24674. - /*
  24675. - * Part of the result which does not need derivatives:
  24676. - */
  24677. - const double newval1 = c00 * dos_two + c10 * dos_thr +
  24678. - c01 * tre_two + c11 * tre_thr;
  24679. -
  24680. - /*
  24681. - * Twice the part of the result which only needs first derivatives.
  24682. - */
  24683. - const double newval2 = c00dx * dble_dzdx00 + c10dx * dble_dzdx10 +
  24684. - c01dx * dble_dzdx01 + c11dx * dble_dzdx11 +
  24685. - c00dy * dble_dzdy00 + c10dy * dble_dzdy10 +
  24686. - c01dy * dble_dzdy01 + c11dy * dble_dzdy11;
  24687. -
  24688. - /*
  24689. - * Four times the part of the result which only uses cross
  24690. - * derivatives:
  24691. - */
  24692. - const double newval3 = c00dxdy * quad_d2zdxdy00 + c10dxdy * quad_d2zdxdy10 +
  24693. - c01dxdy * quad_d2zdxdy01 + c11dxdy * quad_d2zdxdy11;
  24694. -
  24695. - const double newval = newval1 + .5 * newval2 + .25 * newval3;
  24696. -
  24697. - return newval;
  24698. -}
  24699. -
  24700. -/*
  24701. - * Call lbb with a type conversion operator as a parameter.
  24702. - *
  24703. - * It would be nice to do this with templates but we can't figure out
  24704. - * how to do it cleanly. Suggestions welcome!
  24705. - */
  24706. -#define LBB_CONVERSION( conversion ) \
  24707. - template <typename T> static void inline \
  24708. - lbb_ ## conversion( void* restrict pout, \
  24709. - const VipsPel* restrict pin, \
  24710. - const int bands, \
  24711. - const int lskip, \
  24712. - const double relative_x, \
  24713. - const double relative_y ) \
  24714. - { \
  24715. - T* restrict out = (T *) pout; \
  24716. - \
  24717. - const T* restrict in = (T *) pin; \
  24718. - \
  24719. - const int one_shift = -bands; \
  24720. - const int thr_shift = bands; \
  24721. - const int fou_shift = 2*bands; \
  24722. - \
  24723. - const int uno_two_shift = -lskip; \
  24724. - \
  24725. - const int tre_two_shift = lskip; \
  24726. - const int qua_two_shift = 2*lskip; \
  24727. - \
  24728. - const int uno_one_shift = uno_two_shift + one_shift; \
  24729. - const int dos_one_shift = one_shift; \
  24730. - const int tre_one_shift = tre_two_shift + one_shift; \
  24731. - const int qua_one_shift = qua_two_shift + one_shift; \
  24732. - \
  24733. - const int uno_thr_shift = uno_two_shift + thr_shift; \
  24734. - const int dos_thr_shift = thr_shift; \
  24735. - const int tre_thr_shift = tre_two_shift + thr_shift; \
  24736. - const int qua_thr_shift = qua_two_shift + thr_shift; \
  24737. - \
  24738. - const int uno_fou_shift = uno_two_shift + fou_shift; \
  24739. - const int dos_fou_shift = fou_shift; \
  24740. - const int tre_fou_shift = tre_two_shift + fou_shift; \
  24741. - const int qua_fou_shift = qua_two_shift + fou_shift; \
  24742. - \
  24743. - const double xp1over2 = relative_x; \
  24744. - const double xm1over2 = xp1over2 - 1.0; \
  24745. - const double onepx = 0.5 + xp1over2; \
  24746. - const double onemx = 1.5 - xp1over2; \
  24747. - const double xp1over2sq = xp1over2 * xp1over2; \
  24748. - \
  24749. - const double yp1over2 = relative_y; \
  24750. - const double ym1over2 = yp1over2 - 1.0; \
  24751. - const double onepy = 0.5 + yp1over2; \
  24752. - const double onemy = 1.5 - yp1over2; \
  24753. - const double yp1over2sq = yp1over2 * yp1over2; \
  24754. - \
  24755. - const double xm1over2sq = xm1over2 * xm1over2; \
  24756. - const double ym1over2sq = ym1over2 * ym1over2; \
  24757. - \
  24758. - const double twice1px = onepx + onepx; \
  24759. - const double twice1py = onepy + onepy; \
  24760. - const double twice1mx = onemx + onemx; \
  24761. - const double twice1my = onemy + onemy; \
  24762. - \
  24763. - const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \
  24764. - const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \
  24765. - const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \
  24766. - const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \
  24767. - \
  24768. - const double four_times_1px_times_1py = twice1px * twice1py; \
  24769. - const double four_times_1mx_times_1py = twice1mx * twice1py; \
  24770. - const double twice_xp1over2_times_1py = xp1over2 * twice1py; \
  24771. - const double twice_xm1over2_times_1py = xm1over2 * twice1py; \
  24772. - \
  24773. - const double twice_xm1over2_times_1my = xm1over2 * twice1my; \
  24774. - const double twice_xp1over2_times_1my = xp1over2 * twice1my; \
  24775. - const double four_times_1mx_times_1my = twice1mx * twice1my; \
  24776. - const double four_times_1px_times_1my = twice1px * twice1my; \
  24777. - \
  24778. - const double twice_1px_times_ym1over2 = twice1px * ym1over2; \
  24779. - const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \
  24780. - const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \
  24781. - const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \
  24782. - \
  24783. - const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \
  24784. - const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \
  24785. - const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \
  24786. - const double twice_1px_times_yp1over2 = twice1px * yp1over2; \
  24787. - \
  24788. - const double c00 = \
  24789. - four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \
  24790. - const double c00dx = \
  24791. - twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \
  24792. - const double c00dy = \
  24793. - twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
  24794. - const double c00dxdy = \
  24795. - xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
  24796. - \
  24797. - const double c10 = \
  24798. - four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \
  24799. - const double c10dx = \
  24800. - twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \
  24801. - const double c10dy = \
  24802. - twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
  24803. - const double c10dxdy = \
  24804. - xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
  24805. - \
  24806. - const double c01 = \
  24807. - four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \
  24808. - const double c01dx = \
  24809. - twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \
  24810. - const double c01dy = \
  24811. - twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
  24812. - const double c01dxdy = \
  24813. - xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
  24814. - \
  24815. - const double c11 = \
  24816. - four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \
  24817. - const double c11dx = \
  24818. - twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \
  24819. - const double c11dy = \
  24820. - twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
  24821. - const double c11dxdy = \
  24822. - xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
  24823. - \
  24824. - int band = bands; \
  24825. - \
  24826. - do \
  24827. - { \
  24828. - const double double_result = \
  24829. - lbbicubic( c00, \
  24830. - c10, \
  24831. - c01, \
  24832. - c11, \
  24833. - c00dx, \
  24834. - c10dx, \
  24835. - c01dx, \
  24836. - c11dx, \
  24837. - c00dy, \
  24838. - c10dy, \
  24839. - c01dy, \
  24840. - c11dy, \
  24841. - c00dxdy, \
  24842. - c10dxdy, \
  24843. - c01dxdy, \
  24844. - c11dxdy, \
  24845. - in[ uno_one_shift ], \
  24846. - in[ uno_two_shift ], \
  24847. - in[ uno_thr_shift ], \
  24848. - in[ uno_fou_shift ], \
  24849. - in[ dos_one_shift ], \
  24850. - in[ 0 ], \
  24851. - in[ dos_thr_shift ], \
  24852. - in[ dos_fou_shift ], \
  24853. - in[ tre_one_shift ], \
  24854. - in[ tre_two_shift ], \
  24855. - in[ tre_thr_shift ], \
  24856. - in[ tre_fou_shift ], \
  24857. - in[ qua_one_shift ], \
  24858. - in[ qua_two_shift ], \
  24859. - in[ qua_thr_shift ], \
  24860. - in[ qua_fou_shift ] ); \
  24861. - \
  24862. - const T result = to_ ## conversion<T>( double_result ); \
  24863. - in++; \
  24864. - *out++ = result; \
  24865. - } while (--band); \
  24866. - }
  24867. -
  24868. -LBB_CONVERSION( fptypes )
  24869. -LBB_CONVERSION( withsign )
  24870. -LBB_CONVERSION( nosign )
  24871. -
  24872. -#define CALL( T, conversion ) \
  24873. - lbb_ ## conversion<T>( out, \
  24874. - p, \
  24875. - bands, \
  24876. - lskip, \
  24877. - relative_x, \
  24878. - relative_y );
  24879. -
  24880. -/*
  24881. - * We need C linkage:
  24882. - */
  24883. -extern "C" {
  24884. -G_DEFINE_TYPE( VipsInterpolateLbb, vips_interpolate_lbb,
  24885. - VIPS_TYPE_INTERPOLATE );
  24886. -}
  24887. -
  24888. -static void
  24889. -vips_interpolate_lbb_interpolate( VipsInterpolate* restrict interpolate,
  24890. - void* restrict out,
  24891. - VipsRegion* restrict in,
  24892. - double absolute_x,
  24893. - double absolute_y )
  24894. -{
  24895. - /* absolute_x and absolute_y are always >= 1.0 (see double-check assert
  24896. - * below), so we don't need floor().
  24897. - *
  24898. - * It's 1 not 0 since have a window_offset of 1.
  24899. - */
  24900. - const int ix = (int) absolute_x;
  24901. - const int iy = (int) absolute_y;
  24902. -
  24903. - /*
  24904. - * Move the pointer to (the first band of) the top/left pixel of the
  24905. - * 2x2 group of pixel centers which contains the sampling location
  24906. - * in its convex hull:
  24907. - */
  24908. - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
  24909. -
  24910. - const double relative_x = absolute_x - ix;
  24911. - const double relative_y = absolute_y - iy;
  24912. -
  24913. - /*
  24914. - * VIPS versions of Nicolas's pixel addressing values.
  24915. - */
  24916. - const int lskip = VIPS_REGION_LSKIP( in ) /
  24917. - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
  24918. - /*
  24919. - * Double the bands for complex images to account for the real and
  24920. - * imaginary parts being computed independently:
  24921. - */
  24922. - const int actual_bands = in->im->Bands;
  24923. - const int bands =
  24924. - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
  24925. -
  24926. - /* Confirm that absolute_x and absolute_y are >= 1, see above.
  24927. - */
  24928. - g_assert( absolute_x >= 1.0 );
  24929. - g_assert( absolute_y >= 1.0 );
  24930. -
  24931. - switch( in->im->BandFmt ) {
  24932. - case VIPS_FORMAT_UCHAR:
  24933. - CALL( unsigned char, nosign );
  24934. - break;
  24935. -
  24936. - case VIPS_FORMAT_CHAR:
  24937. - CALL( signed char, withsign );
  24938. - break;
  24939. -
  24940. - case VIPS_FORMAT_USHORT:
  24941. - CALL( unsigned short, nosign );
  24942. - break;
  24943. -
  24944. - case VIPS_FORMAT_SHORT:
  24945. - CALL( signed short, withsign );
  24946. - break;
  24947. -
  24948. - case VIPS_FORMAT_UINT:
  24949. - CALL( unsigned int, nosign );
  24950. - break;
  24951. -
  24952. - case VIPS_FORMAT_INT:
  24953. - CALL( signed int, withsign );
  24954. - break;
  24955. -
  24956. - /*
  24957. - * Complex images are handled by doubling of bands.
  24958. - */
  24959. - case VIPS_FORMAT_FLOAT:
  24960. - case VIPS_FORMAT_COMPLEX:
  24961. - CALL( float, fptypes );
  24962. - break;
  24963. -
  24964. - case VIPS_FORMAT_DOUBLE:
  24965. - case VIPS_FORMAT_DPCOMPLEX:
  24966. - CALL( double, fptypes );
  24967. - break;
  24968. -
  24969. - default:
  24970. - g_assert( 0 );
  24971. - break;
  24972. - }
  24973. -}
  24974. -
  24975. -static void
  24976. -vips_interpolate_lbb_class_init( VipsInterpolateLbbClass *klass )
  24977. -{
  24978. - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
  24979. - VipsInterpolateClass *interpolate_class =
  24980. - VIPS_INTERPOLATE_CLASS( klass );
  24981. -
  24982. - object_class->nickname = "lbb";
  24983. - object_class->description = _( "Reduced halo bicubic" );
  24984. -
  24985. - interpolate_class->interpolate = vips_interpolate_lbb_interpolate;
  24986. - interpolate_class->window_size = 4;
  24987. -}
  24988. -
  24989. -static void
  24990. -vips_interpolate_lbb_init( VipsInterpolateLbb *lbb )
  24991. -{
  24992. -}
  24993. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/Makefile.am vips-7.38.5/libvips/resample/Makefile.am
  24994. --- vips-7.38.5-vanilla/libvips/resample/Makefile.am 2014-07-17 23:48:36.232794473 -0400
  24995. +++ vips-7.38.5/libvips/resample/Makefile.am 2014-07-17 23:49:32.820792979 -0400
  24996. @@ -13,10 +13,6 @@
  24997. shrink.c \
  24998. interpolate.c \
  24999. transform.c \
  25000. - bicubic.cpp \
  25001. - lbb.cpp \
  25002. - nohalo.cpp \
  25003. - vsqbs.cpp \
  25004. templates.h
  25005. else
  25006. @@ -32,10 +28,6 @@
  25007. transform.c
  25008. EXTRA_DIST = \
  25009. - bicubic.cpp \
  25010. - lbb.cpp \
  25011. - nohalo.cpp \
  25012. - vsqbs.cpp \
  25013. templates.h
  25014. endif
  25015. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/Makefile.in vips-7.38.5/libvips/resample/Makefile.in
  25016. --- vips-7.38.5-vanilla/libvips/resample/Makefile.in 2014-07-17 23:48:36.232794473 -0400
  25017. +++ vips-7.38.5/libvips/resample/Makefile.in 2014-07-17 23:49:32.820792979 -0400
  25018. @@ -505,7 +505,7 @@
  25019. }
  25020. libresample.la: $(libresample_la_OBJECTS) $(libresample_la_DEPENDENCIES) $(EXTRA_libresample_la_DEPENDENCIES)
  25021. - $(AM_V_CXXLD)$(CXXLINK) $(libresample_la_OBJECTS) $(libresample_la_LIBADD) $(LIBS)
  25022. + $(AM_V_CXXLD)$(LINK) $(libresample_la_OBJECTS) $(libresample_la_LIBADD) $(LIBS)
  25023. mostlyclean-compile:
  25024. -rm -f *.$(OBJEXT)
  25025. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/nohalo.cpp vips-7.38.5/libvips/resample/nohalo.cpp
  25026. --- vips-7.38.5-vanilla/libvips/resample/nohalo.cpp 2014-07-17 23:48:36.232794473 -0400
  25027. +++ vips-7.38.5/libvips/resample/nohalo.cpp 1969-12-31 19:00:00.000000000 -0500
  25028. @@ -1,1590 +0,0 @@
  25029. -/* nohalo subdivision followed by lbb (locally bounded bicubic)
  25030. - * interpolation resampler
  25031. - *
  25032. - * Nohalo level 1 with bilinear finishing scheme hacked for VIPS by
  25033. - * J. Cupitt based on code by N. Robidoux, 20/1/09
  25034. - *
  25035. - * N. Robidoux and J. Cupitt, 4-17/3/09
  25036. - *
  25037. - * N. Robidoux, 1/4-29/5/2009
  25038. - *
  25039. - * Nohalo level 2 with bilinear finishing scheme by N. Robidoux based
  25040. - * on code by N. Robidoux, A. Turcotte and J. Cupitt, 27/1/2010
  25041. - *
  25042. - * Nohalo level 1 with LBB finishing scheme by N. Robidoux and
  25043. - * C. Racette, 11-18/5/2010
  25044. - */
  25045. -
  25046. -/*
  25047. -
  25048. - This file is part of VIPS.
  25049. -
  25050. - VIPS is free software; you can redistribute it and/or modify it
  25051. - under the terms of the GNU Lesser General Public License as
  25052. - published by the Free Software Foundation; either version 2 of the
  25053. - License, or (at your option) any later version.
  25054. -
  25055. - This program is distributed in the hope that it will be useful,
  25056. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  25057. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  25058. - Lesser General Public License for more details.
  25059. -
  25060. - You should have received a copy of the GNU Lesser General Public
  25061. - License along with this program; if not, write to the Free Software
  25062. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  25063. - 02110-1301 USA
  25064. -
  25065. - */
  25066. -
  25067. -/*
  25068. -
  25069. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  25070. -
  25071. - */
  25072. -
  25073. -/*
  25074. - * 2009-2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt and
  25075. - * Adam Turcotte
  25076. - *
  25077. - * N. Robidoux thanks Geert Jordaens, Ralf Meyer, Øyvind Kolås,
  25078. - * Minglun Gong, Eric Daoust and Sven Neumann for useful comments and
  25079. - * code.
  25080. - *
  25081. - * N. Robidoux's early research on Nohalo funded in part by an NSERC
  25082. - * (National Science and Engineering Research Council of Canada)
  25083. - * Discovery Grant awarded to him (298424--2004).
  25084. - *
  25085. - * C. Racette's image resampling research and programming funded in
  25086. - * part by an NSERC (National Science and Engineering Research Council
  25087. - * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an
  25088. - * NSERC Discovery Grant awarded to Julien Dompierre (grant number
  25089. - * 20-61098) and by N. Robidoux's Laurentian University professional
  25090. - * allowance.
  25091. - *
  25092. - * A. Turcotte's image resampling research on reduced halo funded in
  25093. - * part by an NSERC Alexander Graham Bell Canada Graduate Scholarhip
  25094. - * awarded to him and by a Google Summer of Code 2010 award awarded to
  25095. - * GIMP (Gnu Image Manipulation Program).
  25096. - *
  25097. - * Nohalo with LBB finishing scheme was developed by N. Robidoux and
  25098. - * C. Racette at the Department of Mathematics and Computer Science of
  25099. - * Laurentian University in the course of C. Racette's Masters thesis
  25100. - * in Computational Sciences. Preliminary work on Nohalo and monotone
  25101. - * interpolation was performed by C. Racette and N. Robidoux in the
  25102. - * course of her honours thesis, by N. Robidoux, A. Turcotte and
  25103. - * E. Daoust during Google Summer of Code 2009 (through two awards
  25104. - * made to GIMP to improve GEGL), and, earlier, by N. Robidoux,
  25105. - * A. Turcotte, J. Cupitt, M. Gong and K. Martinez.
  25106. - */
  25107. -
  25108. -/*
  25109. - * Nohalo with LBB as finishing scheme has two versions, which are
  25110. - * only different in the way LBB is implemented:
  25111. - *
  25112. - * A "soft" version, which shows a little less staircasing and a
  25113. - * little more haloing, and which is a little more expensive to
  25114. - * compute. We recommend this as the default.
  25115. - *
  25116. - * A "sharp" version, which shows a little more staircasing and a
  25117. - * little less haloing, and which is a little cheaper (it uses 6
  25118. - * less comparisons and 12 less "? :").
  25119. - *
  25120. - * The only difference between the two is that the "soft" versions
  25121. - * uses local minima and maxima computed over 3x3 square blocks, and
  25122. - * the "sharp" version uses local minima and maxima computed over 3x3
  25123. - * crosses.
  25124. - *
  25125. - * The "sharp" version is (a little) faster. We don't know yet for
  25126. - * sure, but it appears that the "soft" version gives marginally
  25127. - * better results.
  25128. - *
  25129. - * If you want to use the "sharp" (cheaper) version, uncomment the
  25130. - * following three pre-processor code lines:
  25131. - */
  25132. -
  25133. -/*
  25134. -#ifndef __NOHALO_CHEAP_H__
  25135. -#define __NOHALO_CHEAP_H__
  25136. -#endif
  25137. - */
  25138. -
  25139. -/*
  25140. - * ================
  25141. - * NOHALO RESAMPLER
  25142. - * ================
  25143. - *
  25144. - * "Nohalo" is a resampler with a mission: smoothly straightening
  25145. - * oblique lines without undesirable side-effects. In particular,
  25146. - * without much blurring and with no added haloing.
  25147. - *
  25148. - * In this code, one Nohalo subdivision is performed. The
  25149. - * interpolation is finished with LBB (Locally Bounded Bicubic).
  25150. - *
  25151. - * Key properties:
  25152. - *
  25153. - * =======================
  25154. - * Nohalo is interpolatory
  25155. - * =======================
  25156. - *
  25157. - * That is, Nohalo preserves point values: If asked for the value at
  25158. - * the center of an input pixel, the sampler returns the corresponding
  25159. - * value, unchanged. In addition, because Nohalo is continuous, if
  25160. - * asked for a value at a location "very close" to the center of an
  25161. - * input pixel, then the sampler returns a value "very close" to
  25162. - * it. (Nohalo is not smoothing like, say, B-Spline
  25163. - * pseudo-interpolation.)
  25164. - *
  25165. - * ====================================================================
  25166. - * Nohalo subdivision is co-monotone (this is why it's called "no-halo")
  25167. - * ====================================================================
  25168. - *
  25169. - * One consequence of monotonicity is that additional subdivided
  25170. - * values are in the range of the four closest input values, which is
  25171. - * a form of local boundedness. (Note: plain vanilla bilinear and
  25172. - * nearest neighbour are also co-monotone.) LBB is also locally
  25173. - * bounded. Consequently, Nohalo subdivision followed by LBB is
  25174. - * locally bounded. When used as a finishing scheme for Nohalo, the
  25175. - * standard LBB bounds imply that the final interpolated value is in
  25176. - * the range of the nine closest input values. This property is why
  25177. - * there is very little added haloing, even when a finishing scheme
  25178. - * which is not strictly monotone. Another consequence of local
  25179. - * boundedness is that clamping is unnecessary (provided abyss values
  25180. - * are within the range of acceptable values, which is "always" the
  25181. - * case).
  25182. - *
  25183. - * Note: If the abyss policy is an extrapolating one---for example,
  25184. - * linear or bilinear extrapolation---clamping is still unnecessary
  25185. - * UNLESS one attempts to resample outside of the convex hull of the
  25186. - * input pixel positions. Consequence: the "corner" image size
  25187. - * convention does not require clamping when using linear
  25188. - * extrapolation abyss policy when performing image resizing, but the
  25189. - * "center" one does, when upscaling, at locations very close to the
  25190. - * boundary. If computing values at locations outside of the convex
  25191. - * hull of the pixel locations of the input image, nearest neighbour
  25192. - * abyss policy is most likely better anyway, because linear
  25193. - * extrapolation produces "streaks" if positions far outside the
  25194. - * original image boundary are resampled.
  25195. - *
  25196. - * ========================
  25197. - * Nohalo is a local method
  25198. - * ========================
  25199. - *
  25200. - * The interpolated pixel value when using Nohalo subdivision followed
  25201. - * by LBB only depends on the 21 (5x5 minus the four corners) closest
  25202. - * input values.
  25203. - *
  25204. - * ===============================
  25205. - * Nohalo is second order accurate
  25206. - * ===============================
  25207. - *
  25208. - * (Except possibly near the boundary: it is easy to make this
  25209. - * property carry over everywhere but this requires a tuned abyss
  25210. - * policy---linear extrapolation, say---or building the boundary
  25211. - * conditions inside the sampler.) Nohalo+LBB is exact on linear
  25212. - * intensity profiles, meaning that if the input pixel values (in the
  25213. - * stencil) are obtained from a function of the form f(x,y) = a + b*x
  25214. - * + c*y (a, b, c constants), then the computed pixel value is exactly
  25215. - * the value of f(x,y) at the asked-for sampling location. The
  25216. - * boundary condition which is emulated by VIPS through the "extend"
  25217. - * extension of the input image---this corresponds to the nearest
  25218. - * neighbour abyss policy---does NOT make this resampler exact on
  25219. - * linears near the boundary. It does, however, guarantee that no
  25220. - * clamping is required even when resampled values are computed at
  25221. - * positions outside of the extent of the input image (when
  25222. - * extrapolation is required).
  25223. - *
  25224. - * ===================
  25225. - * Nohalo is nonlinear
  25226. - * ===================
  25227. - *
  25228. - * Both Nohalo and LBB are nonlinear, consequently their composition
  25229. - * is nonlinear. In particular, resampling a sum of images may not be
  25230. - * the same as summing the resamples. (This occurs even without taking
  25231. - * into account over and underflow issues: images can only take values
  25232. - * within a banded range, and consequently no sampler is truly
  25233. - * linear.)
  25234. - *
  25235. - * ====================
  25236. - * Weaknesses of Nohalo
  25237. - * ====================
  25238. - *
  25239. - * In some cases, the initial subdivision computation is wasted:
  25240. - *
  25241. - * If a region is bi-chromatic, the nonlinear component of Nohalo
  25242. - * subdivision is zero in the interior of the region, and consequently
  25243. - * Nohalo subdivision boils down to bilinear. For such images, LBB is
  25244. - * probably a better choice.
  25245. - *
  25246. - * =========================
  25247. - * Bibliographical reference
  25248. - * =========================
  25249. - *
  25250. - * For more information about Nohalo (a prototype version with
  25251. - * bilinear finish instead of LBB), see
  25252. - *
  25253. - * CPU, SMP and GPU implementations of Nohalo level 1, a fast
  25254. - * co-convex antialiasing image resampler by Nicolas Robidoux, Minglun
  25255. - * Gong, John Cupitt, Adam Turcotte, and Kirk Martinez, in C3S2E '09:
  25256. - * Proceedings of the 2nd Canadian Conference on Computer Science and
  25257. - * Software Engineering, p. 185--195, ACM, New York, NY, USA, 2009.
  25258. - * http://doi.acm.org/10.1145/1557626.1557657.
  25259. - */
  25260. -
  25261. -/* Uncomment to enable bounds checking for VIPS_REGION_ADDR().
  25262. - */
  25263. -#define DEBUG
  25264. -
  25265. -#ifdef HAVE_CONFIG_H
  25266. -#include <config.h>
  25267. -#endif /*HAVE_CONFIG_H*/
  25268. -#include <vips/intl.h>
  25269. -
  25270. -#include <stdio.h>
  25271. -#include <stdlib.h>
  25272. -
  25273. -#include <vips/vips.h>
  25274. -#include <vips/internal.h>
  25275. -
  25276. -#include "templates.h"
  25277. -
  25278. -#define VIPS_TYPE_INTERPOLATE_NOHALO \
  25279. - (vips_interpolate_nohalo_get_type())
  25280. -#define VIPS_INTERPOLATE_NOHALO( obj ) \
  25281. - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
  25282. - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohalo ))
  25283. -#define VIPS_INTERPOLATE_NOHALO_CLASS( klass ) \
  25284. - (G_TYPE_CHECK_CLASS_CAST( (klass), \
  25285. - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass))
  25286. -#define VIPS_IS_INTERPOLATE_NOHALO( obj ) \
  25287. - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_NOHALO ))
  25288. -#define VIPS_IS_INTERPOLATE_NOHALO_CLASS( klass ) \
  25289. - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_NOHALO ))
  25290. -#define VIPS_INTERPOLATE_NOHALO_GET_CLASS( obj ) \
  25291. - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
  25292. - VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass ))
  25293. -
  25294. -typedef struct _VipsInterpolateNohalo {
  25295. - VipsInterpolate parent_object;
  25296. -
  25297. -} VipsInterpolateNohalo;
  25298. -
  25299. -typedef struct _VipsInterpolateNohaloClass {
  25300. - VipsInterpolateClass parent_class;
  25301. -
  25302. -} VipsInterpolateNohaloClass;
  25303. -
  25304. -/*
  25305. - * NOHALO_MINMOD is an implementation of the minmod function which
  25306. - * only needs two "conditional moves."
  25307. - * NOHALO_MINMOD(a,b,a_times_a,a_times_b) "returns"
  25308. - * minmod(a,b). The macro parameter ("input") a_times_a is assumed to
  25309. - * contain the square of a; a_times_b, the product of a and b.
  25310. - *
  25311. - * For uncompressed natural images in high bit depth (images for which
  25312. - * the slopes a and b are unlikely to be equal to zero or be equal to
  25313. - * each other), or chips with good branch prediction, the following
  25314. - * version of the minmod function may work well:
  25315. - *
  25316. - * ( (a_times_b)>=0. ? ( (a_times_b)<(a_times_a) ? (b) : (a) ) : 0. )
  25317. - *
  25318. - * In this version, the forward branch of the second conditional move
  25319. - * is taken when |b|>|a| and when a*b<0. However, the "else" branch is
  25320. - * taken when a=0 (or when a=b), which is why the above version is not
  25321. - * as effective for images with regions with constant pixel values (or
  25322. - * regions with pixel values which vary linearly or bilinearly) since
  25323. - * we apply minmod to pairs of differences.
  25324. - *
  25325. - * The following version is more suitable for images with flat
  25326. - * (constant) colour areas, since a, which is a pixel difference, will
  25327. - * often be 0, in which case both forward branches are likely. This
  25328. - * may be preferable if "branch flag look ahead" does not work so
  25329. - * well.
  25330. - *
  25331. - * ( (a_times_b)>=0. ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. )
  25332. - *
  25333. - * This last version appears to be slightly better than the former in
  25334. - * speed tests performed on a recent multicore Intel chip, especially
  25335. - * when enlarging a sharp image by a large factor, hence the choice.
  25336. - */
  25337. -#define NOHALO_MINMOD(a,b,a_times_a,a_times_b) \
  25338. - ( ( (a_times_b)>=0. ) ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. )
  25339. -
  25340. -/*
  25341. - * Absolute value and sign macros:
  25342. - */
  25343. -#define NOHALO_ABS(x) ( ((x)>=0.) ? (x) : -(x) )
  25344. -#define NOHALO_SIGN(x) ( ((x)>=0.) ? 1. : -1. )
  25345. -
  25346. -/*
  25347. - * MIN and MAX macros set up so that I can put the likely winner in
  25348. - * the first argument (forward branch likely blah blah blah):
  25349. - */
  25350. -#define NOHALO_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) )
  25351. -#define NOHALO_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) )
  25352. -
  25353. -
  25354. -static void inline
  25355. -nohalo_subdivision (const double uno_two,
  25356. - const double uno_thr,
  25357. - const double uno_fou,
  25358. - const double dos_one,
  25359. - const double dos_two,
  25360. - const double dos_thr,
  25361. - const double dos_fou,
  25362. - const double dos_fiv,
  25363. - const double tre_one,
  25364. - const double tre_two,
  25365. - const double tre_thr,
  25366. - const double tre_fou,
  25367. - const double tre_fiv,
  25368. - const double qua_one,
  25369. - const double qua_two,
  25370. - const double qua_thr,
  25371. - const double qua_fou,
  25372. - const double qua_fiv,
  25373. - const double cin_two,
  25374. - const double cin_thr,
  25375. - const double cin_fou,
  25376. - double* restrict uno_one_1,
  25377. - double* restrict uno_two_1,
  25378. - double* restrict uno_thr_1,
  25379. - double* restrict uno_fou_1,
  25380. - double* restrict dos_one_1,
  25381. - double* restrict dos_two_1,
  25382. - double* restrict dos_thr_1,
  25383. - double* restrict dos_fou_1,
  25384. - double* restrict tre_one_1,
  25385. - double* restrict tre_two_1,
  25386. - double* restrict tre_thr_1,
  25387. - double* restrict tre_fou_1,
  25388. - double* restrict qua_one_1,
  25389. - double* restrict qua_two_1,
  25390. - double* restrict qua_thr_1,
  25391. - double* restrict qua_fou_1)
  25392. -{
  25393. - /*
  25394. - * nohalo_subdivision calculates the missing twelve double density
  25395. - * pixel values, and also returns the "already known" four, so that
  25396. - * the sixteen values which make up the stencil of LBB are
  25397. - * available.
  25398. - */
  25399. - /*
  25400. - * THE STENCIL OF INPUT VALUES:
  25401. - *
  25402. - * Pointer arithmetic is used to implicitly reflect the input
  25403. - * stencil about tre_thr---assumed closer to the sampling location
  25404. - * than other pixels (ties are OK)---in such a way that after
  25405. - * reflection the sampling point is to the bottom right of tre_thr.
  25406. - *
  25407. - * The following code and picture assumes that the stencil reflexion
  25408. - * has already been performed.
  25409. - *
  25410. - * (ix-1,iy-2) (ix,iy-2) (ix+1,iy-2)
  25411. - * =uno_two = uno_thr = uno_fou
  25412. - *
  25413. - *
  25414. - *
  25415. - * (ix-2,iy-1) (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
  25416. - * = dos_one = dos_two = dos_thr = dos_fou = dos_fiv
  25417. - *
  25418. - *
  25419. - *
  25420. - * (ix-2,iy) (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
  25421. - * = tre_one = tre_two = tre_thr = tre_fou = tre_fiv
  25422. - * X
  25423. - *
  25424. - *
  25425. - * (ix-2,iy+1) (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
  25426. - * = qua_one = qua_two = qua_thr = qua_fou = qua_fiv
  25427. - *
  25428. - *
  25429. - *
  25430. - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2)
  25431. - * = cin_two = cin_thr = cin_fou
  25432. - *
  25433. - *
  25434. - * The above input pixel values are the ones needed in order to make
  25435. - * available the following values, needed by LBB:
  25436. - *
  25437. - * uno_one_1 = uno_two_1 = uno_thr_1 = uno_fou_1 =
  25438. - * (ix-1/2,iy-1/2) (ix,iy-1/2) (ix+1/2,iy-1/2) (ix+1,iy-1/2)
  25439. - *
  25440. - *
  25441. - *
  25442. - *
  25443. - * dos_one_1 = dos_two_1 = dos_thr_1 = dos_fou_1 =
  25444. - * (ix-1/2,iy) (ix,iy) (ix+1/2,iy) (ix+1,iy)
  25445. - *
  25446. - * X
  25447. - *
  25448. - *
  25449. - * tre_one_1 = tre_two_1 = tre_thr_1 = tre_fou_1 =
  25450. - * (ix-1/2,iy+1/2) (ix,iy+1/2) (ix+1/2,iy+1/2) (ix+1,iy+1/2)
  25451. - *
  25452. - *
  25453. - *
  25454. - *
  25455. - * qua_one_1 = qua_two_1 = qua_thr_1 = qua_fou_1 =
  25456. - * (ix-1/2,iy+1) (ix,iy+1) (ix+1/2,iy+1) (ix+1,iy+1)
  25457. - *
  25458. - */
  25459. -
  25460. - /*
  25461. - * Computation of the nonlinear slopes: If two consecutive pixel
  25462. - * value differences have the same sign, the smallest one (in
  25463. - * absolute value) is taken to be the corresponding slope; if the
  25464. - * two consecutive pixel value differences don't have the same sign,
  25465. - * the corresponding slope is set to 0.
  25466. - *
  25467. - * In other words: Apply minmod to consecutive differences.
  25468. - */
  25469. - /*
  25470. - * Two vertical simple differences:
  25471. - */
  25472. - const double d_unodos_two = dos_two - uno_two;
  25473. - const double d_dostre_two = tre_two - dos_two;
  25474. - const double d_trequa_two = qua_two - tre_two;
  25475. - const double d_quacin_two = cin_two - qua_two;
  25476. - /*
  25477. - * Thr(ee) vertical differences:
  25478. - */
  25479. - const double d_unodos_thr = dos_thr - uno_thr;
  25480. - const double d_dostre_thr = tre_thr - dos_thr;
  25481. - const double d_trequa_thr = qua_thr - tre_thr;
  25482. - const double d_quacin_thr = cin_thr - qua_thr;
  25483. - /*
  25484. - * Fou(r) vertical differences:
  25485. - */
  25486. - const double d_unodos_fou = dos_fou - uno_fou;
  25487. - const double d_dostre_fou = tre_fou - dos_fou;
  25488. - const double d_trequa_fou = qua_fou - tre_fou;
  25489. - const double d_quacin_fou = cin_fou - qua_fou;
  25490. - /*
  25491. - * Dos horizontal differences:
  25492. - */
  25493. - const double d_dos_onetwo = dos_two - dos_one;
  25494. - const double d_dos_twothr = dos_thr - dos_two;
  25495. - const double d_dos_thrfou = dos_fou - dos_thr;
  25496. - const double d_dos_foufiv = dos_fiv - dos_fou;
  25497. - /*
  25498. - * Tre(s) horizontal differences:
  25499. - */
  25500. - const double d_tre_onetwo = tre_two - tre_one;
  25501. - const double d_tre_twothr = tre_thr - tre_two;
  25502. - const double d_tre_thrfou = tre_fou - tre_thr;
  25503. - const double d_tre_foufiv = tre_fiv - tre_fou;
  25504. - /*
  25505. - * Qua(ttro) horizontal differences:
  25506. - */
  25507. - const double d_qua_onetwo = qua_two - qua_one;
  25508. - const double d_qua_twothr = qua_thr - qua_two;
  25509. - const double d_qua_thrfou = qua_fou - qua_thr;
  25510. - const double d_qua_foufiv = qua_fiv - qua_fou;
  25511. -
  25512. - /*
  25513. - * Recyclable vertical products and squares:
  25514. - */
  25515. - const double d_unodos_times_dostre_two = d_unodos_two * d_dostre_two;
  25516. - const double d_dostre_two_sq = d_dostre_two * d_dostre_two;
  25517. - const double d_dostre_times_trequa_two = d_dostre_two * d_trequa_two;
  25518. - const double d_trequa_times_quacin_two = d_quacin_two * d_trequa_two;
  25519. - const double d_quacin_two_sq = d_quacin_two * d_quacin_two;
  25520. -
  25521. - const double d_unodos_times_dostre_thr = d_unodos_thr * d_dostre_thr;
  25522. - const double d_dostre_thr_sq = d_dostre_thr * d_dostre_thr;
  25523. - const double d_dostre_times_trequa_thr = d_trequa_thr * d_dostre_thr;
  25524. - const double d_trequa_times_quacin_thr = d_trequa_thr * d_quacin_thr;
  25525. - const double d_quacin_thr_sq = d_quacin_thr * d_quacin_thr;
  25526. -
  25527. - const double d_unodos_times_dostre_fou = d_unodos_fou * d_dostre_fou;
  25528. - const double d_dostre_fou_sq = d_dostre_fou * d_dostre_fou;
  25529. - const double d_dostre_times_trequa_fou = d_trequa_fou * d_dostre_fou;
  25530. - const double d_trequa_times_quacin_fou = d_trequa_fou * d_quacin_fou;
  25531. - const double d_quacin_fou_sq = d_quacin_fou * d_quacin_fou;
  25532. - /*
  25533. - * Recyclable horizontal products and squares:
  25534. - */
  25535. - const double d_dos_onetwo_times_twothr = d_dos_onetwo * d_dos_twothr;
  25536. - const double d_dos_twothr_sq = d_dos_twothr * d_dos_twothr;
  25537. - const double d_dos_twothr_times_thrfou = d_dos_twothr * d_dos_thrfou;
  25538. - const double d_dos_thrfou_times_foufiv = d_dos_thrfou * d_dos_foufiv;
  25539. - const double d_dos_foufiv_sq = d_dos_foufiv * d_dos_foufiv;
  25540. -
  25541. - const double d_tre_onetwo_times_twothr = d_tre_onetwo * d_tre_twothr;
  25542. - const double d_tre_twothr_sq = d_tre_twothr * d_tre_twothr;
  25543. - const double d_tre_twothr_times_thrfou = d_tre_thrfou * d_tre_twothr;
  25544. - const double d_tre_thrfou_times_foufiv = d_tre_thrfou * d_tre_foufiv;
  25545. - const double d_tre_foufiv_sq = d_tre_foufiv * d_tre_foufiv;
  25546. -
  25547. - const double d_qua_onetwo_times_twothr = d_qua_onetwo * d_qua_twothr;
  25548. - const double d_qua_twothr_sq = d_qua_twothr * d_qua_twothr;
  25549. - const double d_qua_twothr_times_thrfou = d_qua_thrfou * d_qua_twothr;
  25550. - const double d_qua_thrfou_times_foufiv = d_qua_thrfou * d_qua_foufiv;
  25551. - const double d_qua_foufiv_sq = d_qua_foufiv * d_qua_foufiv;
  25552. -
  25553. - /*
  25554. - * Minmod slopes and first level pixel values:
  25555. - */
  25556. - const double dos_thr_y = NOHALO_MINMOD( d_dostre_thr, d_unodos_thr,
  25557. - d_dostre_thr_sq,
  25558. - d_unodos_times_dostre_thr );
  25559. - const double tre_thr_y = NOHALO_MINMOD( d_dostre_thr, d_trequa_thr,
  25560. - d_dostre_thr_sq,
  25561. - d_dostre_times_trequa_thr );
  25562. -
  25563. - const double newval_uno_two =
  25564. - .5 * ( dos_thr + tre_thr )
  25565. - +
  25566. - .25 * ( dos_thr_y - tre_thr_y );
  25567. -
  25568. - const double qua_thr_y = NOHALO_MINMOD( d_quacin_thr, d_trequa_thr,
  25569. - d_quacin_thr_sq,
  25570. - d_trequa_times_quacin_thr );
  25571. -
  25572. - const double newval_tre_two =
  25573. - .5 * ( tre_thr + qua_thr )
  25574. - +
  25575. - .25 * ( tre_thr_y - qua_thr_y );
  25576. -
  25577. - const double tre_fou_y = NOHALO_MINMOD( d_dostre_fou, d_trequa_fou,
  25578. - d_dostre_fou_sq,
  25579. - d_dostre_times_trequa_fou );
  25580. - const double qua_fou_y = NOHALO_MINMOD( d_quacin_fou, d_trequa_fou,
  25581. - d_quacin_fou_sq,
  25582. - d_trequa_times_quacin_fou );
  25583. -
  25584. - const double newval_tre_fou =
  25585. - .5 * ( tre_fou + qua_fou )
  25586. - +
  25587. - .25 * ( tre_fou_y - qua_fou_y );
  25588. -
  25589. - const double dos_fou_y = NOHALO_MINMOD( d_dostre_fou, d_unodos_fou,
  25590. - d_dostre_fou_sq,
  25591. - d_unodos_times_dostre_fou );
  25592. -
  25593. - const double newval_uno_fou =
  25594. - .5 * ( dos_fou + tre_fou )
  25595. - +
  25596. - .25 * (dos_fou_y - tre_fou_y );
  25597. -
  25598. - const double tre_two_x = NOHALO_MINMOD( d_tre_twothr, d_tre_onetwo,
  25599. - d_tre_twothr_sq,
  25600. - d_tre_onetwo_times_twothr );
  25601. - const double tre_thr_x = NOHALO_MINMOD( d_tre_twothr, d_tre_thrfou,
  25602. - d_tre_twothr_sq,
  25603. - d_tre_twothr_times_thrfou );
  25604. -
  25605. - const double newval_dos_one =
  25606. - .5 * ( tre_two + tre_thr )
  25607. - +
  25608. - .25 * ( tre_two_x - tre_thr_x );
  25609. -
  25610. - const double tre_fou_x = NOHALO_MINMOD( d_tre_foufiv, d_tre_thrfou,
  25611. - d_tre_foufiv_sq,
  25612. - d_tre_thrfou_times_foufiv );
  25613. -
  25614. - const double tre_thr_x_minus_tre_fou_x =
  25615. - tre_thr_x - tre_fou_x;
  25616. -
  25617. - const double newval_dos_thr =
  25618. - .5 * ( tre_thr + tre_fou )
  25619. - +
  25620. - .25 * tre_thr_x_minus_tre_fou_x;
  25621. -
  25622. - const double qua_thr_x = NOHALO_MINMOD( d_qua_twothr, d_qua_thrfou,
  25623. - d_qua_twothr_sq,
  25624. - d_qua_twothr_times_thrfou );
  25625. - const double qua_fou_x = NOHALO_MINMOD( d_qua_foufiv, d_qua_thrfou,
  25626. - d_qua_foufiv_sq,
  25627. - d_qua_thrfou_times_foufiv );
  25628. -
  25629. - const double qua_thr_x_minus_qua_fou_x =
  25630. - qua_thr_x - qua_fou_x;
  25631. -
  25632. - const double newval_qua_thr =
  25633. - .5 * ( qua_thr + qua_fou )
  25634. - +
  25635. - .25 * qua_thr_x_minus_qua_fou_x;
  25636. -
  25637. - const double qua_two_x = NOHALO_MINMOD( d_qua_twothr, d_qua_onetwo,
  25638. - d_qua_twothr_sq,
  25639. - d_qua_onetwo_times_twothr );
  25640. -
  25641. - const double newval_qua_one =
  25642. - .5 * ( qua_two + qua_thr )
  25643. - +
  25644. - .25 * ( qua_two_x - qua_thr_x );
  25645. -
  25646. - const double newval_tre_thr =
  25647. - .125 * ( tre_thr_x_minus_tre_fou_x + qua_thr_x_minus_qua_fou_x )
  25648. - +
  25649. - .5 * ( newval_tre_two + newval_tre_fou );
  25650. -
  25651. - const double dos_thr_x = NOHALO_MINMOD( d_dos_twothr, d_dos_thrfou,
  25652. - d_dos_twothr_sq,
  25653. - d_dos_twothr_times_thrfou );
  25654. - const double dos_fou_x = NOHALO_MINMOD( d_dos_foufiv, d_dos_thrfou,
  25655. - d_dos_foufiv_sq,
  25656. - d_dos_thrfou_times_foufiv );
  25657. -
  25658. - const double newval_uno_thr =
  25659. - .25 * ( dos_fou - tre_thr )
  25660. - +
  25661. - .125 * ( dos_fou_y - tre_fou_y + dos_thr_x - dos_fou_x )
  25662. - +
  25663. - .5 * ( newval_uno_two + newval_dos_thr );
  25664. -
  25665. - const double tre_two_y = NOHALO_MINMOD( d_dostre_two, d_trequa_two,
  25666. - d_dostre_two_sq,
  25667. - d_dostre_times_trequa_two );
  25668. - const double qua_two_y = NOHALO_MINMOD( d_quacin_two, d_trequa_two,
  25669. - d_quacin_two_sq,
  25670. - d_trequa_times_quacin_two );
  25671. -
  25672. - const double newval_tre_one =
  25673. - .25 * ( qua_two - tre_thr )
  25674. - +
  25675. - .125 * ( qua_two_x - qua_thr_x + tre_two_y - qua_two_y )
  25676. - +
  25677. - .5 * ( newval_dos_one + newval_tre_two );
  25678. -
  25679. - const double dos_two_x = NOHALO_MINMOD( d_dos_twothr, d_dos_onetwo,
  25680. - d_dos_twothr_sq,
  25681. - d_dos_onetwo_times_twothr );
  25682. -
  25683. - const double dos_two_y = NOHALO_MINMOD( d_dostre_two, d_unodos_two,
  25684. - d_dostre_two_sq,
  25685. - d_unodos_times_dostre_two );
  25686. -
  25687. - const double newval_uno_one =
  25688. - .25 * ( dos_two + dos_thr + tre_two + tre_thr )
  25689. - +
  25690. - .125 * ( dos_two_x - dos_thr_x + tre_two_x - tre_thr_x
  25691. - +
  25692. - dos_two_y + dos_thr_y - tre_two_y - tre_thr_y );
  25693. -
  25694. - /*
  25695. - * Return the sixteen LBB stencil values:
  25696. - */
  25697. - *uno_one_1 = newval_uno_one;
  25698. - *uno_two_1 = newval_uno_two;
  25699. - *uno_thr_1 = newval_uno_thr;
  25700. - *uno_fou_1 = newval_uno_fou;
  25701. - *dos_one_1 = newval_dos_one;
  25702. - *dos_two_1 = tre_thr;
  25703. - *dos_thr_1 = newval_dos_thr;
  25704. - *dos_fou_1 = tre_fou;
  25705. - *tre_one_1 = newval_tre_one;
  25706. - *tre_two_1 = newval_tre_two;
  25707. - *tre_thr_1 = newval_tre_thr;
  25708. - *tre_fou_1 = newval_tre_fou;
  25709. - *qua_one_1 = newval_qua_one;
  25710. - *qua_two_1 = qua_thr;
  25711. - *qua_thr_1 = newval_qua_thr;
  25712. - *qua_fou_1 = qua_fou;
  25713. -}
  25714. -
  25715. -/*
  25716. - * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant
  25717. - * of Catmull-Rom. Images resampled with LBB have much smaller halos
  25718. - * than images resampled with windowed sincs or other interpolatory
  25719. - * cubic spline filters. Specifically, LBB halos are narrower and the
  25720. - * over/undershoot amplitude is smaller. This is accomplished without
  25721. - * a significant reduction in the smoothness of the result (compared
  25722. - * to Catmull-Rom).
  25723. - *
  25724. - * Another important property is that the resampled values are
  25725. - * contained within the range of nearby input values. Consequently, no
  25726. - * final clamping is needed to stay "in range" (e.g., 0-255 for
  25727. - * standard 8-bit images).
  25728. - *
  25729. - * LBB was developed by N. Robidoux and C. Racette of the Department
  25730. - * of Mathematics and Computer Science of Laurentian University in the
  25731. - * course of C.'s Masters Thesis in Computational Sciences.
  25732. - */
  25733. -
  25734. -/*
  25735. - * LBB is a novel method with the following properties:
  25736. - *
  25737. - * --LBB is a Hermite bicubic method: The bicubic surface is defined,
  25738. - * one convex hull of four nearby input points at a time, using four
  25739. - * point values, four x-derivatives, four y-derivatives, and four
  25740. - * cross-derivatives.
  25741. - *
  25742. - * --The stencil for values in a square patch is the usual 4x4.
  25743. - *
  25744. - * --LBB is interpolatory.
  25745. - *
  25746. - * --It is C^1 with continuous cross derivatives.
  25747. - *
  25748. - * --When the limiters are inactive, LBB gives the same results as
  25749. - * Catmull-Rom.
  25750. - *
  25751. - * --When used on binary images, LBB gives results similar to bicubic
  25752. - * Hermite with all first derivatives---but not necessarily the
  25753. - * cross derivatives--at the input pixel locations set to zero.
  25754. - *
  25755. - * --The LBB reconstruction is locally bounded: Over each square
  25756. - * patch, the surface is contained between the minimum and the
  25757. - * maximum values among the 16 nearest input pixel values (those in
  25758. - * the stencil).
  25759. - *
  25760. - * --Consequently, the LBB reconstruction is globally bounded between
  25761. - * the very smallest input pixel value and the very largest input
  25762. - * pixel value. (It is not necessary to clamp results.)
  25763. - *
  25764. - * The LBB method is based on the method of Ken Brodlie, Petros
  25765. - * Mashwama and Sohail Butt for constraining Hermite interpolants
  25766. - * between globally defined planes:
  25767. - *
  25768. - * Visualization of surface data to preserve positivity and other
  25769. - * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages
  25770. - * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C.
  25771. - *
  25772. - * Instead of forcing the reconstructed surface to lie between two
  25773. - * GLOBALLY defined planes, LBB constrains one patch at a time to lie
  25774. - * between LOCALLY defined planes. This is accomplished by
  25775. - * constraining the derivatives (x, y and cross) at each input pixel
  25776. - * location so that if the constraint was applied everywhere the
  25777. - * surface would fit between the min and max of the values at the 9
  25778. - * closest pixel locations. Because this is done with each of the four
  25779. - * pixel locations which define the bicubic patch, this forces the
  25780. - * reconstructed surface to lie between the min and max of the values
  25781. - * at the 16 closest values pixel locations. (Each corner defines its
  25782. - * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is
  25783. - * necessarily above the minimum of the four minima, which happens to
  25784. - * be the minimum over the 4x4. Similarly with the maxima.)
  25785. - *
  25786. - * The above paragraph described the "soft" version of LBB. The
  25787. - * "sharp" version is similar.
  25788. - */
  25789. -
  25790. -static inline double
  25791. -lbbicubic( const double c00,
  25792. - const double c10,
  25793. - const double c01,
  25794. - const double c11,
  25795. - const double c00dx,
  25796. - const double c10dx,
  25797. - const double c01dx,
  25798. - const double c11dx,
  25799. - const double c00dy,
  25800. - const double c10dy,
  25801. - const double c01dy,
  25802. - const double c11dy,
  25803. - const double c00dxdy,
  25804. - const double c10dxdy,
  25805. - const double c01dxdy,
  25806. - const double c11dxdy,
  25807. - const double uno_one,
  25808. - const double uno_two,
  25809. - const double uno_thr,
  25810. - const double uno_fou,
  25811. - const double dos_one,
  25812. - const double dos_two,
  25813. - const double dos_thr,
  25814. - const double dos_fou,
  25815. - const double tre_one,
  25816. - const double tre_two,
  25817. - const double tre_thr,
  25818. - const double tre_fou,
  25819. - const double qua_one,
  25820. - const double qua_two,
  25821. - const double qua_thr,
  25822. - const double qua_fou )
  25823. -{
  25824. - /*
  25825. - * STENCIL (FOOTPRINT) OF INPUT VALUES:
  25826. - *
  25827. - * The stencil of LBB is the same as for any standard Hermite
  25828. - * bicubic (e.g., Catmull-Rom):
  25829. - *
  25830. - * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1)
  25831. - * = uno_one = uno_two = uno_thr = uno_fou
  25832. - *
  25833. - * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy)
  25834. - * = dos_one = dos_two = dos_thr = dos_fou
  25835. - * X
  25836. - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1)
  25837. - * = tre_one = tre_two = tre_thr = tre_fou
  25838. - *
  25839. - * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2)
  25840. - * = qua_one = qua_two = qua_thr = qua_fou
  25841. - *
  25842. - * where ix is the (pseudo-)floor of the requested left-to-right
  25843. - * location ("X"), and iy is the floor of the requested up-to-down
  25844. - * location.
  25845. - */
  25846. -
  25847. -#if defined (__NOHALO_CHEAP_H__)
  25848. - /*
  25849. - * Computation of the four min and four max over 3x3 input data
  25850. - * sub-crosses of the 4x4 input stencil.
  25851. - *
  25852. - * We exploit the fact that the data comes from the (co-monotone)
  25853. - * method Nohalo so that it is known ahead of time that
  25854. - *
  25855. - * dos_thr is between dos_two and dos_fou
  25856. - *
  25857. - * tre_two is between dos_two and qua_two
  25858. - *
  25859. - * tre_fou is between dos_fou and qua_fou
  25860. - *
  25861. - * qua_thr is between qua_two and qua_fou
  25862. - *
  25863. - * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou
  25864. - *
  25865. - * to minimize the number of flags and conditional moves.
  25866. - *
  25867. - * (The "between" are not strict: "a between b and c" means
  25868. - *
  25869. - * "min(b,c) <= a <= max(b,c)".)
  25870. - *
  25871. - * We have, however, succeeded in eliminating one flag computation
  25872. - * (one comparison) and one use of an intermediate result. See the
  25873. - * two commented out lines below.
  25874. - *
  25875. - * Overall, only 20 comparisons and 28 "? :" are needed (to compute
  25876. - * 4 mins and 4 maxes). If you can figure how to do this more
  25877. - * efficiently, let us know.
  25878. - */
  25879. - const double m1 = (uno_two <= tre_two) ? uno_two : tre_two ;
  25880. - const double M1 = (uno_two <= tre_two) ? tre_two : uno_two ;
  25881. - const double m2 = (dos_thr <= qua_thr) ? dos_thr : qua_thr ;
  25882. - const double M2 = (dos_thr <= qua_thr) ? qua_thr : dos_thr ;
  25883. - const double m3 = (dos_two <= dos_fou) ? dos_two : dos_fou ;
  25884. - const double M3 = (dos_two <= dos_fou) ? dos_fou : dos_two ;
  25885. - const double m4 = (uno_thr <= tre_thr) ? uno_thr : tre_thr ;
  25886. - const double M4 = (uno_thr <= tre_thr) ? tre_thr : uno_thr ;
  25887. - const double m5 = (dos_two <= qua_two) ? dos_two : qua_two ;
  25888. - const double M5 = (dos_two <= qua_two) ? qua_two : dos_two ;
  25889. - const double m6 = (tre_one <= tre_thr) ? tre_one : tre_thr ;
  25890. - const double M6 = (tre_one <= tre_thr) ? tre_thr : tre_one ;
  25891. - const double m7 = (dos_one <= dos_thr) ? dos_one : dos_thr ;
  25892. - const double M7 = (dos_one <= dos_thr) ? dos_thr : dos_one ;
  25893. - const double m8 = (tre_two <= tre_fou) ? tre_two : tre_fou ;
  25894. - const double M8 = (tre_two <= tre_fou) ? tre_fou : tre_two ;
  25895. - const double m9 = NOHALO_MIN( m1, dos_two );
  25896. - const double M9 = NOHALO_MAX( M1, dos_two );
  25897. - const double m10 = NOHALO_MIN( m2, tre_thr );
  25898. - const double M10 = NOHALO_MAX( M2, tre_thr );
  25899. - const double min10 = NOHALO_MIN( m3, m4 );
  25900. - const double max10 = NOHALO_MAX( M3, M4 );
  25901. - const double min01 = NOHALO_MIN( m5, m6 );
  25902. - const double max01 = NOHALO_MAX( M5, M6 );
  25903. - const double min00 = NOHALO_MIN( m9, m7 );
  25904. - const double max00 = NOHALO_MAX( M9, M7 );
  25905. - const double min11 = NOHALO_MIN( m10, m8 );
  25906. - const double max11 = NOHALO_MAX( M10, M8 );
  25907. -#else
  25908. - /*
  25909. - * Computation of the four min and four max over 3x3 input data
  25910. - * sub-blocks of the 4x4 input stencil.
  25911. - *
  25912. - * Surprisingly, we have not succeeded in reducing the number of "?
  25913. - * :" needed by using the fact that the data comes from the
  25914. - * (co-monotone) method Nohalo so that it is known ahead of time
  25915. - * that
  25916. - *
  25917. - * dos_thr is between dos_two and dos_fou
  25918. - *
  25919. - * tre_two is between dos_two and qua_two
  25920. - *
  25921. - * tre_fou is between dos_fou and qua_fou
  25922. - *
  25923. - * qua_thr is between qua_two and qua_fou
  25924. - *
  25925. - * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou
  25926. - *
  25927. - * to minimize the number of flags and conditional moves.
  25928. - *
  25929. - * (The "between" are not strict: "a between b and c" means
  25930. - *
  25931. - * "min(b,c) <= a <= max(b,c)".)
  25932. - *
  25933. - * We have, however, succeeded in eliminating one flag computation
  25934. - * (one comparison) and one use of an intermediate result. See the
  25935. - * two commented out lines below.
  25936. - *
  25937. - * Overall, only 27 comparisons are needed (to compute 4 mins and 4
  25938. - * maxes!). Without the simplification, 28 comparisons would be
  25939. - * used. Either way, the number of "? :" used is 34. If you can
  25940. - * figure how to do this more efficiently, let us know.
  25941. - */
  25942. - const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ;
  25943. - const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ;
  25944. - const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ;
  25945. - const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ;
  25946. - const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ;
  25947. - const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ;
  25948. - const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ;
  25949. - const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ;
  25950. - const double m5 = NOHALO_MIN( m1, m2 );
  25951. - const double M5 = NOHALO_MAX( M1, M2 );
  25952. - const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ;
  25953. - const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ;
  25954. - const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ;
  25955. - const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ;
  25956. - const double m13 = (dos_fou <= qua_fou) ? dos_fou : qua_fou ;
  25957. - const double M13 = (dos_fou <= qua_fou) ? qua_fou : dos_fou ;
  25958. - /*
  25959. - * Because the data comes from Nohalo subdivision, the following two
  25960. - * lines can be replaced by the above, simpler, two lines without
  25961. - * changing the results.
  25962. - *
  25963. - * const double m13 = NOHALO_MIN( m7, qua_fou );
  25964. - * const double M13 = NOHALO_MAX( M7, qua_fou );
  25965. - *
  25966. - * This also allows reodering the comparisons to put space between
  25967. - * the computation of a result and its use.
  25968. - */
  25969. - const double m9 = NOHALO_MIN( m5, m4 );
  25970. - const double M9 = NOHALO_MAX( M5, M4 );
  25971. - const double m11 = NOHALO_MIN( m6, qua_one );
  25972. - const double M11 = NOHALO_MAX( M6, qua_one );
  25973. - const double m10 = NOHALO_MIN( m6, uno_one );
  25974. - const double M10 = NOHALO_MAX( M6, uno_one );
  25975. - const double m8 = NOHALO_MIN( m5, m3 );
  25976. - const double M8 = NOHALO_MAX( M5, M3 );
  25977. - const double m12 = NOHALO_MIN( m7, uno_fou );
  25978. - const double M12 = NOHALO_MAX( M7, uno_fou );
  25979. - const double min11 = NOHALO_MIN( m9, m13 );
  25980. - const double max11 = NOHALO_MAX( M9, M13 );
  25981. - const double min01 = NOHALO_MIN( m9, m11 );
  25982. - const double max01 = NOHALO_MAX( M9, M11 );
  25983. - const double min00 = NOHALO_MIN( m8, m10 );
  25984. - const double max00 = NOHALO_MAX( M8, M10 );
  25985. - const double min10 = NOHALO_MIN( m8, m12 );
  25986. - const double max10 = NOHALO_MAX( M8, M12 );
  25987. -#endif
  25988. -
  25989. - /*
  25990. - * The remainder of the "per channel" computation involves the
  25991. - * computation of:
  25992. - *
  25993. - * --8 conditional moves,
  25994. - *
  25995. - * --8 signs (in which the sign of zero is unimportant),
  25996. - *
  25997. - * --12 minima of two values,
  25998. - *
  25999. - * --8 maxima of two values,
  26000. - *
  26001. - * --8 absolute values,
  26002. - *
  26003. - * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8
  26004. - * signs, and 8 absolute values. If everything is done with
  26005. - * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved
  26006. - * (because initial min and max can be computed with one flag).
  26007. - *
  26008. - * The "per channel" part of the computation also involves 107
  26009. - * arithmetic operations (54 *, 21 +, 42 -).
  26010. - */
  26011. -
  26012. - /*
  26013. - * Distances to the local min and max:
  26014. - */
  26015. - const double u11 = tre_thr - min11;
  26016. - const double v11 = max11 - tre_thr;
  26017. - const double u01 = tre_two - min01;
  26018. - const double v01 = max01 - tre_two;
  26019. - const double u00 = dos_two - min00;
  26020. - const double v00 = max00 - dos_two;
  26021. - const double u10 = dos_thr - min10;
  26022. - const double v10 = max10 - dos_thr;
  26023. -
  26024. - /*
  26025. - * Initial values of the derivatives computed with centered
  26026. - * differences. Factors of 1/2 are left out because they are folded
  26027. - * in later:
  26028. - */
  26029. - const double dble_dzdx00i = dos_thr - dos_one;
  26030. - const double dble_dzdy11i = qua_thr - dos_thr;
  26031. - const double dble_dzdx10i = dos_fou - dos_two;
  26032. - const double dble_dzdy01i = qua_two - dos_two;
  26033. - const double dble_dzdx01i = tre_thr - tre_one;
  26034. - const double dble_dzdy10i = tre_thr - uno_thr;
  26035. - const double dble_dzdx11i = tre_fou - tre_two;
  26036. - const double dble_dzdy00i = tre_two - uno_two;
  26037. -
  26038. - /*
  26039. - * Signs of the derivatives. The upcoming clamping does not change
  26040. - * them (except if the clamping sends a negative derivative to 0, in
  26041. - * which case the sign does not matter anyway).
  26042. - */
  26043. - const double sign_dzdx00 = NOHALO_SIGN( dble_dzdx00i );
  26044. - const double sign_dzdx10 = NOHALO_SIGN( dble_dzdx10i );
  26045. - const double sign_dzdx01 = NOHALO_SIGN( dble_dzdx01i );
  26046. - const double sign_dzdx11 = NOHALO_SIGN( dble_dzdx11i );
  26047. -
  26048. - const double sign_dzdy00 = NOHALO_SIGN( dble_dzdy00i );
  26049. - const double sign_dzdy10 = NOHALO_SIGN( dble_dzdy10i );
  26050. - const double sign_dzdy01 = NOHALO_SIGN( dble_dzdy01i );
  26051. - const double sign_dzdy11 = NOHALO_SIGN( dble_dzdy11i );
  26052. -
  26053. - /*
  26054. - * Initial values of the cross-derivatives. Factors of 1/4 are left
  26055. - * out because folded in later:
  26056. - */
  26057. - const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i;
  26058. - const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i;
  26059. - const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i;
  26060. - const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i;
  26061. -
  26062. - /*
  26063. - * Slope limiters. The key multiplier is 3 but we fold a factor of
  26064. - * 2, hence 6:
  26065. - */
  26066. - const double dble_slopelimit_00 = 6.0 * NOHALO_MIN( u00, v00 );
  26067. - const double dble_slopelimit_10 = 6.0 * NOHALO_MIN( u10, v10 );
  26068. - const double dble_slopelimit_01 = 6.0 * NOHALO_MIN( u01, v01 );
  26069. - const double dble_slopelimit_11 = 6.0 * NOHALO_MIN( u11, v11 );
  26070. -
  26071. - /*
  26072. - * Clamped first derivatives:
  26073. - */
  26074. - const double dble_dzdx00 =
  26075. - ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 )
  26076. - ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00;
  26077. - const double dble_dzdy00 =
  26078. - ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 )
  26079. - ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00;
  26080. - const double dble_dzdx10 =
  26081. - ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 )
  26082. - ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10;
  26083. - const double dble_dzdy10 =
  26084. - ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 )
  26085. - ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10;
  26086. - const double dble_dzdx01 =
  26087. - ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 )
  26088. - ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01;
  26089. - const double dble_dzdy01 =
  26090. - ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 )
  26091. - ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01;
  26092. - const double dble_dzdx11 =
  26093. - ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 )
  26094. - ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11;
  26095. - const double dble_dzdy11 =
  26096. - ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 )
  26097. - ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11;
  26098. -
  26099. - /*
  26100. - * Sums and differences of first derivatives:
  26101. - */
  26102. - const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 );
  26103. - const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 );
  26104. - const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 );
  26105. - const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 );
  26106. - const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 );
  26107. - const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 );
  26108. - const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 );
  26109. - const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 );
  26110. -
  26111. - /*
  26112. - * Absolute values of the sums:
  26113. - */
  26114. - const double twelve_abs_sum00 = NOHALO_ABS( twelve_sum00 );
  26115. - const double twelve_abs_sum10 = NOHALO_ABS( twelve_sum10 );
  26116. - const double twelve_abs_sum01 = NOHALO_ABS( twelve_sum01 );
  26117. - const double twelve_abs_sum11 = NOHALO_ABS( twelve_sum11 );
  26118. -
  26119. - /*
  26120. - * Scaled distances to the min:
  26121. - */
  26122. - const double u00_times_36 = 36.0 * u00;
  26123. - const double u10_times_36 = 36.0 * u10;
  26124. - const double u01_times_36 = 36.0 * u01;
  26125. - const double u11_times_36 = 36.0 * u11;
  26126. -
  26127. - /*
  26128. - * First cross-derivative limiter:
  26129. - */
  26130. - const double first_limit00 = twelve_abs_sum00 - u00_times_36;
  26131. - const double first_limit10 = twelve_abs_sum10 - u10_times_36;
  26132. - const double first_limit01 = twelve_abs_sum01 - u01_times_36;
  26133. - const double first_limit11 = twelve_abs_sum11 - u11_times_36;
  26134. -
  26135. - const double quad_d2zdxdy00ii = NOHALO_MAX( quad_d2zdxdy00i, first_limit00 );
  26136. - const double quad_d2zdxdy10ii = NOHALO_MAX( quad_d2zdxdy10i, first_limit10 );
  26137. - const double quad_d2zdxdy01ii = NOHALO_MAX( quad_d2zdxdy01i, first_limit01 );
  26138. - const double quad_d2zdxdy11ii = NOHALO_MAX( quad_d2zdxdy11i, first_limit11 );
  26139. -
  26140. - /*
  26141. - * Scaled distances to the max:
  26142. - */
  26143. - const double v00_times_36 = 36.0 * v00;
  26144. - const double v10_times_36 = 36.0 * v10;
  26145. - const double v01_times_36 = 36.0 * v01;
  26146. - const double v11_times_36 = 36.0 * v11;
  26147. -
  26148. - /*
  26149. - * Second cross-derivative limiter:
  26150. - */
  26151. - const double second_limit00 = v00_times_36 - twelve_abs_sum00;
  26152. - const double second_limit10 = v10_times_36 - twelve_abs_sum10;
  26153. - const double second_limit01 = v01_times_36 - twelve_abs_sum01;
  26154. - const double second_limit11 = v11_times_36 - twelve_abs_sum11;
  26155. -
  26156. - const double quad_d2zdxdy00iii =
  26157. - NOHALO_MIN( quad_d2zdxdy00ii, second_limit00 );
  26158. - const double quad_d2zdxdy10iii =
  26159. - NOHALO_MIN( quad_d2zdxdy10ii, second_limit10 );
  26160. - const double quad_d2zdxdy01iii =
  26161. - NOHALO_MIN( quad_d2zdxdy01ii, second_limit01 );
  26162. - const double quad_d2zdxdy11iii =
  26163. - NOHALO_MIN( quad_d2zdxdy11ii, second_limit11 );
  26164. -
  26165. - /*
  26166. - * Absolute values of the differences:
  26167. - */
  26168. - const double twelve_abs_dif00 = NOHALO_ABS( twelve_dif00 );
  26169. - const double twelve_abs_dif10 = NOHALO_ABS( twelve_dif10 );
  26170. - const double twelve_abs_dif01 = NOHALO_ABS( twelve_dif01 );
  26171. - const double twelve_abs_dif11 = NOHALO_ABS( twelve_dif11 );
  26172. -
  26173. - /*
  26174. - * Third cross-derivative limiter:
  26175. - */
  26176. - const double third_limit00 = twelve_abs_dif00 - v00_times_36;
  26177. - const double third_limit10 = twelve_abs_dif10 - v10_times_36;
  26178. - const double third_limit01 = twelve_abs_dif01 - v01_times_36;
  26179. - const double third_limit11 = twelve_abs_dif11 - v11_times_36;
  26180. -
  26181. - const double quad_d2zdxdy00iiii =
  26182. - NOHALO_MAX( quad_d2zdxdy00iii, third_limit00);
  26183. - const double quad_d2zdxdy10iiii =
  26184. - NOHALO_MAX( quad_d2zdxdy10iii, third_limit10);
  26185. - const double quad_d2zdxdy01iiii =
  26186. - NOHALO_MAX( quad_d2zdxdy01iii, third_limit01);
  26187. - const double quad_d2zdxdy11iiii =
  26188. - NOHALO_MAX( quad_d2zdxdy11iii, third_limit11);
  26189. -
  26190. - /*
  26191. - * Fourth cross-derivative limiter:
  26192. - */
  26193. - const double fourth_limit00 = u00_times_36 - twelve_abs_dif00;
  26194. - const double fourth_limit10 = u10_times_36 - twelve_abs_dif10;
  26195. - const double fourth_limit01 = u01_times_36 - twelve_abs_dif01;
  26196. - const double fourth_limit11 = u11_times_36 - twelve_abs_dif11;
  26197. -
  26198. - const double quad_d2zdxdy00 = NOHALO_MIN( quad_d2zdxdy00iiii, fourth_limit00);
  26199. - const double quad_d2zdxdy10 = NOHALO_MIN( quad_d2zdxdy10iiii, fourth_limit10);
  26200. - const double quad_d2zdxdy01 = NOHALO_MIN( quad_d2zdxdy01iiii, fourth_limit01);
  26201. - const double quad_d2zdxdy11 = NOHALO_MIN( quad_d2zdxdy11iiii, fourth_limit11);
  26202. -
  26203. - /*
  26204. - * Part of the result which does not need derivatives:
  26205. - */
  26206. - const double newval1 = c00 * dos_two
  26207. - +
  26208. - c10 * dos_thr
  26209. - +
  26210. - c01 * tre_two
  26211. - +
  26212. - c11 * tre_thr;
  26213. -
  26214. - /*
  26215. - * Twice the part of the result which only needs first derivatives.
  26216. - */
  26217. - const double newval2 = c00dx * dble_dzdx00
  26218. - +
  26219. - c10dx * dble_dzdx10
  26220. - +
  26221. - c01dx * dble_dzdx01
  26222. - +
  26223. - c11dx * dble_dzdx11
  26224. - +
  26225. - c00dy * dble_dzdy00
  26226. - +
  26227. - c10dy * dble_dzdy10
  26228. - +
  26229. - c01dy * dble_dzdy01
  26230. - +
  26231. - c11dy * dble_dzdy11;
  26232. -
  26233. - /*
  26234. - * Four times the part of the result which only uses cross
  26235. - * derivatives:
  26236. - */
  26237. - const double newval3 = c00dxdy * quad_d2zdxdy00
  26238. - +
  26239. - c10dxdy * quad_d2zdxdy10
  26240. - +
  26241. - c01dxdy * quad_d2zdxdy01
  26242. - +
  26243. - c11dxdy * quad_d2zdxdy11;
  26244. -
  26245. - const double newval = newval1 + .5 * newval2 + .25 * newval3;
  26246. -
  26247. - return newval;
  26248. -}
  26249. -
  26250. -/*
  26251. - * Call Nohalo+LBB with a careful type conversion as a parameter.
  26252. - *
  26253. - * It would be nice to do this with templates somehow---for one thing
  26254. - * this would allow code comments!---but we can't figure a clean way
  26255. - * to do it.
  26256. - */
  26257. -#define NOHALO_CONVERSION( conversion ) \
  26258. - template <typename T> static void inline \
  26259. - nohalo_ ## conversion( void* restrict pout, \
  26260. - const void* restrict pin, \
  26261. - const int bands, \
  26262. - const int lskip, \
  26263. - const double x_0, \
  26264. - const double y_0 ) \
  26265. - { \
  26266. - T* restrict out = (T *) pout; \
  26267. - \
  26268. - const T* restrict in = (T *) pin; \
  26269. - \
  26270. - \
  26271. - const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \
  26272. - const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \
  26273. - \
  26274. - \
  26275. - const int shift_forw_1_pix = sign_of_x_0 * bands; \
  26276. - const int shift_forw_1_row = sign_of_y_0 * lskip; \
  26277. - \
  26278. - const int shift_back_1_pix = -shift_forw_1_pix; \
  26279. - const int shift_back_1_row = -shift_forw_1_row; \
  26280. - \
  26281. - const int shift_back_2_pix = 2 * shift_back_1_pix; \
  26282. - const int shift_back_2_row = 2 * shift_back_1_row; \
  26283. - const int shift_forw_2_pix = 2 * shift_forw_1_pix; \
  26284. - const int shift_forw_2_row = 2 * shift_forw_1_row; \
  26285. - \
  26286. - \
  26287. - const int uno_two_shift = shift_back_1_pix + shift_back_2_row; \
  26288. - const int uno_thr_shift = shift_back_2_row; \
  26289. - const int uno_fou_shift = shift_forw_1_pix + shift_back_2_row; \
  26290. - \
  26291. - const int dos_one_shift = shift_back_2_pix + shift_back_1_row; \
  26292. - const int dos_two_shift = shift_back_1_pix + shift_back_1_row; \
  26293. - const int dos_thr_shift = shift_back_1_row; \
  26294. - const int dos_fou_shift = shift_forw_1_pix + shift_back_1_row; \
  26295. - const int dos_fiv_shift = shift_forw_2_pix + shift_back_1_row; \
  26296. - \
  26297. - const int tre_one_shift = shift_back_2_pix; \
  26298. - const int tre_two_shift = shift_back_1_pix; \
  26299. - const int tre_thr_shift = 0; \
  26300. - const int tre_fou_shift = shift_forw_1_pix; \
  26301. - const int tre_fiv_shift = shift_forw_2_pix; \
  26302. - \
  26303. - const int qua_one_shift = shift_back_2_pix + shift_forw_1_row; \
  26304. - const int qua_two_shift = shift_back_1_pix + shift_forw_1_row; \
  26305. - const int qua_thr_shift = shift_forw_1_row; \
  26306. - const int qua_fou_shift = shift_forw_1_pix + shift_forw_1_row; \
  26307. - const int qua_fiv_shift = shift_forw_2_pix + shift_forw_1_row; \
  26308. - \
  26309. - const int cin_two_shift = shift_back_1_pix + shift_forw_2_row; \
  26310. - const int cin_thr_shift = shift_forw_2_row; \
  26311. - const int cin_fou_shift = shift_forw_1_pix + shift_forw_2_row; \
  26312. - \
  26313. - \
  26314. - const double xp1over2 = ( 2 * sign_of_x_0 ) * x_0; \
  26315. - const double xm1over2 = xp1over2 - 1.0; \
  26316. - const double onepx = 0.5 + xp1over2; \
  26317. - const double onemx = 1.5 - xp1over2; \
  26318. - const double xp1over2sq = xp1over2 * xp1over2; \
  26319. - \
  26320. - const double yp1over2 = ( 2 * sign_of_y_0 ) * y_0; \
  26321. - const double ym1over2 = yp1over2 - 1.0; \
  26322. - const double onepy = 0.5 + yp1over2; \
  26323. - const double onemy = 1.5 - yp1over2; \
  26324. - const double yp1over2sq = yp1over2 * yp1over2; \
  26325. - \
  26326. - const double xm1over2sq = xm1over2 * xm1over2; \
  26327. - const double ym1over2sq = ym1over2 * ym1over2; \
  26328. - \
  26329. - const double twice1px = onepx + onepx; \
  26330. - const double twice1py = onepy + onepy; \
  26331. - const double twice1mx = onemx + onemx; \
  26332. - const double twice1my = onemy + onemy; \
  26333. - \
  26334. - const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \
  26335. - const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \
  26336. - const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \
  26337. - const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \
  26338. - \
  26339. - const double four_times_1px_times_1py = twice1px * twice1py; \
  26340. - const double four_times_1mx_times_1py = twice1mx * twice1py; \
  26341. - const double twice_xp1over2_times_1py = xp1over2 * twice1py; \
  26342. - const double twice_xm1over2_times_1py = xm1over2 * twice1py; \
  26343. - \
  26344. - const double twice_xm1over2_times_1my = xm1over2 * twice1my; \
  26345. - const double twice_xp1over2_times_1my = xp1over2 * twice1my; \
  26346. - const double four_times_1mx_times_1my = twice1mx * twice1my; \
  26347. - const double four_times_1px_times_1my = twice1px * twice1my; \
  26348. - \
  26349. - const double twice_1px_times_ym1over2 = twice1px * ym1over2; \
  26350. - const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \
  26351. - const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \
  26352. - const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \
  26353. - \
  26354. - const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \
  26355. - const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \
  26356. - const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \
  26357. - const double twice_1px_times_yp1over2 = twice1px * yp1over2; \
  26358. - \
  26359. - \
  26360. - const double c00 = \
  26361. - four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \
  26362. - const double c00dx = \
  26363. - twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \
  26364. - const double c00dy = \
  26365. - twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
  26366. - const double c00dxdy = \
  26367. - xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \
  26368. - \
  26369. - const double c10 = \
  26370. - four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \
  26371. - const double c10dx = \
  26372. - twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \
  26373. - const double c10dy = \
  26374. - twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
  26375. - const double c10dxdy = \
  26376. - xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \
  26377. - \
  26378. - const double c01 = \
  26379. - four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \
  26380. - const double c01dx = \
  26381. - twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \
  26382. - const double c01dy = \
  26383. - twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
  26384. - const double c01dxdy = \
  26385. - xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \
  26386. - \
  26387. - const double c11 = \
  26388. - four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \
  26389. - const double c11dx = \
  26390. - twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \
  26391. - const double c11dy = \
  26392. - twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
  26393. - const double c11dxdy = \
  26394. - xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \
  26395. - \
  26396. - \
  26397. - int band = bands; \
  26398. - \
  26399. - \
  26400. - do \
  26401. - { \
  26402. - double uno_one, uno_two, uno_thr, uno_fou; \
  26403. - double dos_one, dos_two, dos_thr, dos_fou; \
  26404. - double tre_one, tre_two, tre_thr, tre_fou; \
  26405. - double qua_one, qua_two, qua_thr, qua_fou; \
  26406. - \
  26407. - nohalo_subdivision( in[ uno_two_shift ], \
  26408. - in[ uno_thr_shift ], \
  26409. - in[ uno_fou_shift ], \
  26410. - in[ dos_one_shift ], \
  26411. - in[ dos_two_shift ], \
  26412. - in[ dos_thr_shift ], \
  26413. - in[ dos_fou_shift ], \
  26414. - in[ dos_fiv_shift ], \
  26415. - in[ tre_one_shift ], \
  26416. - in[ tre_two_shift ], \
  26417. - in[ tre_thr_shift ], \
  26418. - in[ tre_fou_shift ], \
  26419. - in[ tre_fiv_shift ], \
  26420. - in[ qua_one_shift ], \
  26421. - in[ qua_two_shift ], \
  26422. - in[ qua_thr_shift ], \
  26423. - in[ qua_fou_shift ], \
  26424. - in[ qua_fiv_shift ], \
  26425. - in[ cin_two_shift ], \
  26426. - in[ cin_thr_shift ], \
  26427. - in[ cin_fou_shift ], \
  26428. - &uno_one, \
  26429. - &uno_two, \
  26430. - &uno_thr, \
  26431. - &uno_fou, \
  26432. - &dos_one, \
  26433. - &dos_two, \
  26434. - &dos_thr, \
  26435. - &dos_fou, \
  26436. - &tre_one, \
  26437. - &tre_two, \
  26438. - &tre_thr, \
  26439. - &tre_fou, \
  26440. - &qua_one, \
  26441. - &qua_two, \
  26442. - &qua_thr, \
  26443. - &qua_fou ); \
  26444. - \
  26445. - const double double_result = \
  26446. - lbbicubic( c00, \
  26447. - c10, \
  26448. - c01, \
  26449. - c11, \
  26450. - c00dx, \
  26451. - c10dx, \
  26452. - c01dx, \
  26453. - c11dx, \
  26454. - c00dy, \
  26455. - c10dy, \
  26456. - c01dy, \
  26457. - c11dy, \
  26458. - c00dxdy, \
  26459. - c10dxdy, \
  26460. - c01dxdy, \
  26461. - c11dxdy, \
  26462. - uno_one, \
  26463. - uno_two, \
  26464. - uno_thr, \
  26465. - uno_fou, \
  26466. - dos_one, \
  26467. - dos_two, \
  26468. - dos_thr, \
  26469. - dos_fou, \
  26470. - tre_one, \
  26471. - tre_two, \
  26472. - tre_thr, \
  26473. - tre_fou, \
  26474. - qua_one, \
  26475. - qua_two, \
  26476. - qua_thr, \
  26477. - qua_fou ); \
  26478. - \
  26479. - { \
  26480. - const T result = to_ ## conversion<T>( double_result ); \
  26481. - in++; \
  26482. - *out++ = result; \
  26483. - } \
  26484. - \
  26485. - } while (--band); \
  26486. - }
  26487. -
  26488. -
  26489. -NOHALO_CONVERSION( fptypes )
  26490. -NOHALO_CONVERSION( withsign )
  26491. -NOHALO_CONVERSION( nosign )
  26492. -
  26493. -
  26494. -#define CALL( T, conversion ) \
  26495. - nohalo_ ## conversion<T>( out, \
  26496. - p, \
  26497. - bands, \
  26498. - lskip, \
  26499. - relative_x, \
  26500. - relative_y );
  26501. -
  26502. -
  26503. -/*
  26504. - * We need C linkage:
  26505. - */
  26506. -extern "C" {
  26507. -G_DEFINE_TYPE( VipsInterpolateNohalo, vips_interpolate_nohalo,
  26508. - VIPS_TYPE_INTERPOLATE );
  26509. -}
  26510. -
  26511. -
  26512. -static void
  26513. -vips_interpolate_nohalo_interpolate( VipsInterpolate* restrict interpolate,
  26514. - void* restrict out,
  26515. - VipsRegion* restrict in,
  26516. - double absolute_x,
  26517. - double absolute_y )
  26518. -{
  26519. - /* absolute_x and absolute_y are always >= 2.0 (see double-check assert
  26520. - * below), so we don't need floor().
  26521. - *
  26522. - * It's 2 not 0 since we ask for a window_offset of 2 at the bottom.
  26523. - */
  26524. - const int ix = (int) (absolute_x + 0.5);
  26525. - const int iy = (int) (absolute_y + 0.5);
  26526. -
  26527. - /*
  26528. - * Move the pointer to (the first band of) the top/left pixel of the
  26529. - * 2x2 group of pixel centers which contains the sampling location
  26530. - * in its convex hull:
  26531. - */
  26532. - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
  26533. -
  26534. - const double relative_x = absolute_x - ix;
  26535. - const double relative_y = absolute_y - iy;
  26536. -
  26537. - /*
  26538. - * VIPS versions of Nicolas's pixel addressing values.
  26539. - */
  26540. - const int lskip = VIPS_REGION_LSKIP( in ) /
  26541. - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
  26542. -
  26543. - /*
  26544. - * Double the bands for complex images to account for the real and
  26545. - * imaginary parts being computed independently:
  26546. - */
  26547. - const int actual_bands = in->im->Bands;
  26548. - const int bands =
  26549. - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
  26550. -
  26551. - /* Confirm that absolute_x and absolute_y are >= 2, see above.
  26552. - */
  26553. - g_assert( absolute_x >= 2.0 );
  26554. - g_assert( absolute_y >= 2.0 );
  26555. -
  26556. - switch( in->im->BandFmt ) {
  26557. - case VIPS_FORMAT_UCHAR:
  26558. - CALL( unsigned char, nosign );
  26559. - break;
  26560. -
  26561. - case VIPS_FORMAT_CHAR:
  26562. - CALL( signed char, withsign );
  26563. - break;
  26564. -
  26565. - case VIPS_FORMAT_USHORT:
  26566. - CALL( unsigned short, nosign );
  26567. - break;
  26568. -
  26569. - case VIPS_FORMAT_SHORT:
  26570. - CALL( signed short, withsign );
  26571. - break;
  26572. -
  26573. - case VIPS_FORMAT_UINT:
  26574. - CALL( unsigned int, nosign );
  26575. - break;
  26576. -
  26577. - case VIPS_FORMAT_INT:
  26578. - CALL( signed int, withsign );
  26579. - break;
  26580. -
  26581. - /*
  26582. - * Complex images are handled by doubling of bands.
  26583. - */
  26584. - case VIPS_FORMAT_FLOAT:
  26585. - case VIPS_FORMAT_COMPLEX:
  26586. - CALL( float, fptypes );
  26587. - break;
  26588. -
  26589. - case VIPS_FORMAT_DOUBLE:
  26590. - case VIPS_FORMAT_DPCOMPLEX:
  26591. - CALL( double, fptypes );
  26592. - break;
  26593. -
  26594. - default:
  26595. - g_assert( 0 );
  26596. - break;
  26597. - }
  26598. -}
  26599. -
  26600. -static void
  26601. -vips_interpolate_nohalo_class_init( VipsInterpolateNohaloClass *klass )
  26602. -{
  26603. - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
  26604. - VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass );
  26605. -
  26606. - object_class->nickname = "nohalo";
  26607. - object_class->description =
  26608. - _( "Edge sharpening resampler with halo reduction" );
  26609. -
  26610. - interpolate_class->interpolate = vips_interpolate_nohalo_interpolate;
  26611. - interpolate_class->window_size = 5;
  26612. - interpolate_class->window_offset = 2;
  26613. -}
  26614. -
  26615. -static void
  26616. -vips_interpolate_nohalo_init( VipsInterpolateNohalo *nohalo )
  26617. -{
  26618. -}
  26619. diff -u --recursive --new-file vips-7.38.5-vanilla/libvips/resample/vsqbs.cpp vips-7.38.5/libvips/resample/vsqbs.cpp
  26620. --- vips-7.38.5-vanilla/libvips/resample/vsqbs.cpp 2014-07-17 23:48:36.232794473 -0400
  26621. +++ vips-7.38.5/libvips/resample/vsqbs.cpp 1969-12-31 19:00:00.000000000 -0500
  26622. @@ -1,409 +0,0 @@
  26623. -/* vertex-split subdivision followed by quadratic b-spline smoothing
  26624. - *
  26625. - * C. Racette 23-28/05/2010 based on code by N. Robidoux and J. Cupitt
  26626. - *
  26627. - * N. Robidoux 29-30/05/2010
  26628. - */
  26629. -
  26630. -/*
  26631. -
  26632. - This file is part of VIPS.
  26633. -
  26634. - VIPS is free software; you can redistribute it and/or modify it
  26635. - under the terms of the GNU Lesser General Public License as
  26636. - published by the Free Software Foundation; either version 2 of the
  26637. - License, or (at your option) any later version.
  26638. -
  26639. - This program is distributed in the hope that it will be useful,
  26640. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  26641. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26642. - Lesser General Public License for more details.
  26643. -
  26644. - You should have received a copy of the GNU Lesser General Public
  26645. - License along with this program; if not, write to the Free Software
  26646. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  26647. - 02110-1301 USA
  26648. -
  26649. - */
  26650. -
  26651. -/*
  26652. -
  26653. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  26654. -
  26655. - */
  26656. -
  26657. -/*
  26658. - * 2010 (c) Chantal Racette, Nicolas Robidoux, John Cupitt.
  26659. - *
  26660. - * Nicolas Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer,
  26661. - * Øyvind Kolås, Minglun Gong and Eric Daoust for useful comments and
  26662. - * code.
  26663. - *
  26664. - * Chantal Racette's image resampling research and programming funded
  26665. - * in part by a NSERC Discovery Grant awarded to Julien Dompierre
  26666. - * (20-61098).
  26667. - */
  26668. -
  26669. -/*
  26670. - * Vertex-Split Quadratic B-Splines (VSQBS) is a brand new method
  26671. - * which consists of vertex-split subdivision, a subdivision method
  26672. - * with the (as yet unknown?) property that data which is (locally)
  26673. - * constant on diagonals is subdivided into data which is (locally)
  26674. - * constant on diagonals, followed by quadratic B-Spline smoothing.
  26675. - * Because both methods are linear, their combination can be
  26676. - * implemented as if there is no subdivision.
  26677. - *
  26678. - * At high enlargement ratios, VSQBS is very effective at "masking"
  26679. - * that the original has pixels uniformly distributed on a grid. In
  26680. - * particular, VSQBS produces resamples with only very mild
  26681. - * staircasing. Like cubic B-Spline smoothing, however, VSQBS is not
  26682. - * an interpolatory method. For example, using VSQBS to perform the
  26683. - * identity geometric transformation (enlargement by a scaling factor
  26684. - * equal to 1) on an image does not return the original: VSQBS
  26685. - * effectively smooths out the image with the convolution mask
  26686. - *
  26687. - * 1/8
  26688. - * 1/8 1/2 1/8
  26689. - * 1/8
  26690. - *
  26691. - * which is a fairly moderate blur (although the checkerboard mode is
  26692. - * in its nullspace).
  26693. - *
  26694. - * By blending VSQBS with an interpolatory method (bilinear, say) in a
  26695. - * transformation adaptive environment (current GEGL, for example), it
  26696. - * is quite easy to restore that resampling for identity geometric
  26697. - * transformation is equivalent to the identity, and rotations are not
  26698. - * affected by the above, implicit, blur. Contact N. Robidoux for
  26699. - * details.
  26700. - *
  26701. - * An article on VSQBS is forthcoming.
  26702. - */
  26703. -
  26704. -#ifdef HAVE_CONFIG_H
  26705. -#include <config.h>
  26706. -#endif /*HAVE_CONFIG_H*/
  26707. -#include <vips/intl.h>
  26708. -
  26709. -#include <stdio.h>
  26710. -#include <stdlib.h>
  26711. -
  26712. -#include <vips/vips.h>
  26713. -#include <vips/internal.h>
  26714. -
  26715. -#include "templates.h"
  26716. -
  26717. -#define VIPS_TYPE_INTERPOLATE_VSQBS \
  26718. - (vips_interpolate_vsqbs_get_type())
  26719. -#define VIPS_INTERPOLATE_VSQBS( obj ) \
  26720. - (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
  26721. - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbs ))
  26722. -#define VIPS_INTERPOLATE_VSQBS_CLASS( klass ) \
  26723. - (G_TYPE_CHECK_CLASS_CAST( (klass), \
  26724. - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass))
  26725. -#define VIPS_IS_INTERPOLATE_VSQBS( obj ) \
  26726. - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_VSQBS ))
  26727. -#define VIPS_IS_INTERPOLATE_VSQBS_CLASS( klass ) \
  26728. - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_VSQBS ))
  26729. -#define VIPS_INTERPOLATE_VSQBS_GET_CLASS( obj ) \
  26730. - (G_TYPE_INSTANCE_GET_CLASS( (obj), \
  26731. - VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass ))
  26732. -
  26733. -typedef struct _VipsInterpolateVsqbs {
  26734. - VipsInterpolate parent_object;
  26735. -
  26736. -} VipsInterpolateVsqbs;
  26737. -
  26738. -typedef struct _VipsInterpolateVsqbsClass {
  26739. - VipsInterpolateClass parent_class;
  26740. -
  26741. -} VipsInterpolateVsqbsClass;
  26742. -
  26743. -/*
  26744. - * THE STENCIL OF INPUT VALUES:
  26745. - *
  26746. - * Pointer arithmetic is used to implicitly reflect the input stencil
  26747. - * about dos_two---assumed closer to the sampling location than other
  26748. - * pixels (ties are OK)---in such a way that after reflection the
  26749. - * sampling point is to the bottom right of dos_two.
  26750. - *
  26751. - * The following code and picture assumes that the stencil reflexion
  26752. - * has already been performed. (X is the sampling location.)
  26753. - *
  26754. - *
  26755. - * (ix,iy-1) (ix+1,iy-1)
  26756. - * = uno_two = uno_thr
  26757. - *
  26758. - *
  26759. - *
  26760. - * (ix-1,iy) (ix,iy) (ix+1,iy)
  26761. - * = dos_one = dos_two = dos_thr
  26762. - * X
  26763. - *
  26764. - *
  26765. - * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1)
  26766. - * = tre_one = tre_two = tre_thr
  26767. - *
  26768. - *
  26769. - * The above input pixel values are the ones needed in order to
  26770. - * IMPLICITLY make available the following values, needed by quadratic
  26771. - * B-Splines, which is performed on (shifted) double density data:
  26772. - *
  26773. - *
  26774. - * uno_one_1 = uno_two_1 = uno_thr_1 =
  26775. - * (ix-1/4,iy-1/4) (ix+1/4,iy-1/4) (ix+3/4,iy-1/4)
  26776. - *
  26777. - *
  26778. - *
  26779. - * X or X
  26780. - * dos_one_1 = dos_two_1 = dos_thr_1 =
  26781. - * (ix-1/4,iy+1/4) (ix+1/4,iy+1/4) (ix+3/4,iy+1/4)
  26782. - * or X or X
  26783. - *
  26784. - *
  26785. - *
  26786. - * tre_one_1 = tre_two_1 = tre_thr_1 =
  26787. - * (ix-1/4,iy+3/4) (ix+1/4,iy+3/4) (ix+3/4,iy+3/4)
  26788. - *
  26789. - *
  26790. - * In the coefficient computations, we fix things so that coordinates
  26791. - * are relative to dos_two_1, and so that distances are rescaled so
  26792. - * that double density pixel locations are at a distance of 1.
  26793. - */
  26794. -
  26795. -/*
  26796. - * Call vertex-split + quadratic B-splines with a careful type
  26797. - * conversion as a parameter. (It would be nice to do this with
  26798. - * templates somehow---for one thing this would allow code
  26799. - * comments---but we can't figure a clean way to do it.)
  26800. - */
  26801. -#define VSQBS_CONVERSION( conversion ) \
  26802. - template <typename T> static void inline \
  26803. - vsqbs_ ## conversion( void* restrict pout, \
  26804. - const VipsPel* restrict pin, \
  26805. - const int bands, \
  26806. - const int lskip, \
  26807. - const double x_0, \
  26808. - const double y_0 ) \
  26809. - { \
  26810. - T* restrict out = (T *) pout; \
  26811. - \
  26812. - const T* restrict in = (T *) pin; \
  26813. - \
  26814. - const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \
  26815. - const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \
  26816. - \
  26817. - const int shift_forw_1_pix = sign_of_x_0 * bands; \
  26818. - const int shift_forw_1_row = sign_of_y_0 * lskip; \
  26819. - \
  26820. - const int shift_back_1_pix = -shift_forw_1_pix; \
  26821. - const int shift_back_1_row = -shift_forw_1_row; \
  26822. - \
  26823. - const int uno_two_shift = shift_back_1_row; \
  26824. - const int uno_thr_shift = shift_forw_1_pix + shift_back_1_row; \
  26825. - \
  26826. - const int dos_one_shift = shift_back_1_pix; \
  26827. - const int dos_two_shift = 0; \
  26828. - const int dos_thr_shift = shift_forw_1_pix; \
  26829. - \
  26830. - const int tre_one_shift = shift_back_1_pix + shift_forw_1_row; \
  26831. - const int tre_two_shift = shift_forw_1_row; \
  26832. - const int tre_thr_shift = shift_forw_1_pix + shift_forw_1_row; \
  26833. - \
  26834. - \
  26835. - const double twice_abs_x_0 = ( 2 * sign_of_x_0 ) * x_0; \
  26836. - const double twice_abs_y_0 = ( 2 * sign_of_y_0 ) * y_0; \
  26837. - const double x = twice_abs_x_0 + -0.5; \
  26838. - const double y = twice_abs_y_0 + -0.5; \
  26839. - const double cent = 0.75 - x * x; \
  26840. - const double mid = 0.75 - y * y; \
  26841. - const double left = -0.5 * ( x + cent ) + 0.5; \
  26842. - const double top = -0.5 * ( y + mid ) + 0.5; \
  26843. - const double left_p_cent = left + cent; \
  26844. - const double top_p_mid = top + mid; \
  26845. - const double cent_p_rite = 1.0 - left; \
  26846. - const double mid_p_bot = 1.0 - top; \
  26847. - const double rite = 1.0 - left_p_cent; \
  26848. - const double bot = 1.0 - top_p_mid; \
  26849. - \
  26850. - const double four_c_uno_two = left_p_cent * top; \
  26851. - const double four_c_dos_one = left * top_p_mid; \
  26852. - const double four_c_dos_two = left_p_cent + top_p_mid; \
  26853. - const double four_c_dos_thr = cent_p_rite * top_p_mid + rite; \
  26854. - const double four_c_tre_two = mid_p_bot * left_p_cent + bot; \
  26855. - const double four_c_tre_thr = mid_p_bot * rite + cent_p_rite * bot; \
  26856. - const double four_c_uno_thr = top - four_c_uno_two; \
  26857. - const double four_c_tre_one = left - four_c_dos_one; \
  26858. - \
  26859. - \
  26860. - int band = bands; \
  26861. - \
  26862. - do \
  26863. - { \
  26864. - const double double_result = \
  26865. - ( \
  26866. - ( \
  26867. - ( \
  26868. - four_c_uno_two * in[uno_two_shift] \
  26869. - + \
  26870. - four_c_dos_one * in[dos_one_shift] \
  26871. - ) \
  26872. - + \
  26873. - ( \
  26874. - four_c_dos_two * in[dos_two_shift] \
  26875. - + \
  26876. - four_c_dos_thr * in[dos_thr_shift] \
  26877. - ) \
  26878. - ) \
  26879. - + \
  26880. - ( \
  26881. - ( \
  26882. - four_c_tre_two * in[tre_two_shift] \
  26883. - + \
  26884. - four_c_tre_thr * in[tre_thr_shift] \
  26885. - ) \
  26886. - + \
  26887. - ( \
  26888. - four_c_uno_thr * in[uno_thr_shift] \
  26889. - + \
  26890. - four_c_tre_one * in[tre_one_shift] \
  26891. - ) \
  26892. - ) \
  26893. - ) * 0.25; \
  26894. - \
  26895. - const T result = to_ ## conversion<T>( double_result ); \
  26896. - in++; \
  26897. - *out++ = result; \
  26898. - \
  26899. - } while (--band); \
  26900. - }
  26901. -
  26902. -
  26903. -VSQBS_CONVERSION( fptypes )
  26904. -VSQBS_CONVERSION( withsign )
  26905. -VSQBS_CONVERSION( nosign )
  26906. -
  26907. -
  26908. -#define CALL( T, conversion ) \
  26909. - vsqbs_ ## conversion<T>( out, \
  26910. - p, \
  26911. - bands, \
  26912. - lskip, \
  26913. - relative_x, \
  26914. - relative_y );
  26915. -
  26916. -
  26917. -/*
  26918. - * We need C linkage:
  26919. - */
  26920. -extern "C" {
  26921. - G_DEFINE_TYPE( VipsInterpolateVsqbs, vips_interpolate_vsqbs,
  26922. - VIPS_TYPE_INTERPOLATE );
  26923. -}
  26924. -
  26925. -
  26926. -static void
  26927. -vips_interpolate_vsqbs_interpolate( VipsInterpolate* restrict interpolate,
  26928. - void* restrict out,
  26929. - REGION* restrict in,
  26930. - double absolute_x,
  26931. - double absolute_y )
  26932. -{
  26933. - /* absolute_x and absolute_y are always >= 1.0 (see double-check assert
  26934. - * below), so we don't need floor().
  26935. - *
  26936. - * It's 1 not 0 since we ask for a window_offset of 1 at the bottom.
  26937. - */
  26938. - const int ix = (int) (absolute_x + 0.5);
  26939. - const int iy = (int) (absolute_y + 0.5);
  26940. -
  26941. - /*
  26942. - * Move the pointer to (the first band of) the top/left pixel of the
  26943. - * 2x2 group of pixel centers which contains the sampling location
  26944. - * in its convex hull:
  26945. - */
  26946. - const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy );
  26947. -
  26948. - const double relative_x = absolute_x - ix;
  26949. - const double relative_y = absolute_y - iy;
  26950. -
  26951. - /*
  26952. - * VIPS versions of Nicolas's pixel addressing values.
  26953. - */
  26954. - const int lskip = VIPS_REGION_LSKIP( in ) /
  26955. - VIPS_IMAGE_SIZEOF_ELEMENT( in->im );
  26956. -
  26957. - /*
  26958. - * Double the bands for complex images to account for the real and
  26959. - * imaginary parts being computed independently:
  26960. - */
  26961. - const int actual_bands = in->im->Bands;
  26962. - const int bands =
  26963. - vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands;
  26964. -
  26965. - /* Confirm that absolute_x and absolute_y are >= 1, see above.
  26966. - */
  26967. - g_assert( absolute_x >= 1.0 );
  26968. - g_assert( absolute_y >= 1.0 );
  26969. -
  26970. - switch( in->im->BandFmt ) {
  26971. - case VIPS_FORMAT_UCHAR:
  26972. - CALL( unsigned char, nosign );
  26973. - break;
  26974. -
  26975. - case VIPS_FORMAT_CHAR:
  26976. - CALL( signed char, withsign );
  26977. - break;
  26978. -
  26979. - case VIPS_FORMAT_USHORT:
  26980. - CALL( unsigned short, nosign );
  26981. - break;
  26982. -
  26983. - case VIPS_FORMAT_SHORT:
  26984. - CALL( signed short, withsign );
  26985. - break;
  26986. -
  26987. - case VIPS_FORMAT_UINT:
  26988. - CALL( unsigned int, nosign );
  26989. - break;
  26990. -
  26991. - case VIPS_FORMAT_INT:
  26992. - CALL( signed int, withsign );
  26993. - break;
  26994. -
  26995. - /*
  26996. - * Complex images are handled by doubling bands:
  26997. - */
  26998. - case VIPS_FORMAT_FLOAT:
  26999. - case VIPS_FORMAT_COMPLEX:
  27000. - CALL( float, fptypes );
  27001. - break;
  27002. -
  27003. - case VIPS_FORMAT_DOUBLE:
  27004. - case VIPS_FORMAT_DPCOMPLEX:
  27005. - CALL( double, fptypes );
  27006. - break;
  27007. -
  27008. - default:
  27009. - g_assert( 0 );
  27010. - break;
  27011. - }
  27012. -}
  27013. -
  27014. -static void
  27015. -vips_interpolate_vsqbs_class_init( VipsInterpolateVsqbsClass *klass )
  27016. -{
  27017. - VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass );
  27018. - VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass );
  27019. -
  27020. - object_class->nickname = "vsqbs";
  27021. - object_class->description = _( "B-Splines with antialiasing smoothing" );
  27022. -
  27023. - interpolate_class->interpolate = vips_interpolate_vsqbs_interpolate;
  27024. - interpolate_class->window_size = 3;
  27025. - interpolate_class->window_offset = 1;
  27026. -}
  27027. -
  27028. -static void
  27029. -vips_interpolate_vsqbs_init( VipsInterpolateVsqbs *vsqbs )
  27030. -{
  27031. -}
  27032. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/Makefile.am vips-7.38.5/libvipsCC/include/Makefile.am
  27033. --- vips-7.38.5-vanilla/libvipsCC/include/Makefile.am 2014-07-17 23:48:36.237794473 -0400
  27034. +++ vips-7.38.5/libvipsCC/include/Makefile.am 1969-12-31 19:00:00.000000000 -0500
  27035. @@ -1,2 +0,0 @@
  27036. -
  27037. -SUBDIRS = vips
  27038. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/Makefile.in vips-7.38.5/libvipsCC/include/Makefile.in
  27039. --- vips-7.38.5-vanilla/libvipsCC/include/Makefile.in 2014-07-17 23:48:36.237794473 -0400
  27040. +++ vips-7.38.5/libvipsCC/include/Makefile.in 1969-12-31 19:00:00.000000000 -0500
  27041. @@ -1,719 +0,0 @@
  27042. -# Makefile.in generated by automake 1.13.3 from Makefile.am.
  27043. -# @configure_input@
  27044. -
  27045. -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
  27046. -
  27047. -# This Makefile.in is free software; the Free Software Foundation
  27048. -# gives unlimited permission to copy and/or distribute it,
  27049. -# with or without modifications, as long as this notice is preserved.
  27050. -
  27051. -# This program is distributed in the hope that it will be useful,
  27052. -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  27053. -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  27054. -# PARTICULAR PURPOSE.
  27055. -
  27056. -@SET_MAKE@
  27057. -VPATH = @srcdir@
  27058. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
  27059. -am__make_running_with_option = \
  27060. - case $${target_option-} in \
  27061. - ?) ;; \
  27062. - *) echo "am__make_running_with_option: internal error: invalid" \
  27063. - "target option '$${target_option-}' specified" >&2; \
  27064. - exit 1;; \
  27065. - esac; \
  27066. - has_opt=no; \
  27067. - sane_makeflags=$$MAKEFLAGS; \
  27068. - if $(am__is_gnu_make); then \
  27069. - sane_makeflags=$$MFLAGS; \
  27070. - else \
  27071. - case $$MAKEFLAGS in \
  27072. - *\\[\ \ ]*) \
  27073. - bs=\\; \
  27074. - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  27075. - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  27076. - esac; \
  27077. - fi; \
  27078. - skip_next=no; \
  27079. - strip_trailopt () \
  27080. - { \
  27081. - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  27082. - }; \
  27083. - for flg in $$sane_makeflags; do \
  27084. - test $$skip_next = yes && { skip_next=no; continue; }; \
  27085. - case $$flg in \
  27086. - *=*|--*) continue;; \
  27087. - -*I) strip_trailopt 'I'; skip_next=yes;; \
  27088. - -*I?*) strip_trailopt 'I';; \
  27089. - -*O) strip_trailopt 'O'; skip_next=yes;; \
  27090. - -*O?*) strip_trailopt 'O';; \
  27091. - -*l) strip_trailopt 'l'; skip_next=yes;; \
  27092. - -*l?*) strip_trailopt 'l';; \
  27093. - -[dEDm]) skip_next=yes;; \
  27094. - -[JT]) skip_next=yes;; \
  27095. - esac; \
  27096. - case $$flg in \
  27097. - *$$target_option*) has_opt=yes; break;; \
  27098. - esac; \
  27099. - done; \
  27100. - test $$has_opt = yes
  27101. -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  27102. -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  27103. -pkgdatadir = $(datadir)/@PACKAGE@
  27104. -pkgincludedir = $(includedir)/@PACKAGE@
  27105. -pkglibdir = $(libdir)/@PACKAGE@
  27106. -pkglibexecdir = $(libexecdir)/@PACKAGE@
  27107. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  27108. -install_sh_DATA = $(install_sh) -c -m 644
  27109. -install_sh_PROGRAM = $(install_sh) -c
  27110. -install_sh_SCRIPT = $(install_sh) -c
  27111. -INSTALL_HEADER = $(INSTALL_DATA)
  27112. -transform = $(program_transform_name)
  27113. -NORMAL_INSTALL = :
  27114. -PRE_INSTALL = :
  27115. -POST_INSTALL = :
  27116. -NORMAL_UNINSTALL = :
  27117. -PRE_UNINSTALL = :
  27118. -POST_UNINSTALL = :
  27119. -build_triplet = @build@
  27120. -host_triplet = @host@
  27121. -subdir = libvipsCC/include
  27122. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
  27123. -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  27124. -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
  27125. - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
  27126. - $(top_srcdir)/configure.ac
  27127. -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  27128. - $(ACLOCAL_M4)
  27129. -mkinstalldirs = $(install_sh) -d
  27130. -CONFIG_HEADER = $(top_builddir)/config.h
  27131. -CONFIG_CLEAN_FILES =
  27132. -CONFIG_CLEAN_VPATH_FILES =
  27133. -AM_V_P = $(am__v_P_@AM_V@)
  27134. -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  27135. -am__v_P_0 = false
  27136. -am__v_P_1 = :
  27137. -AM_V_GEN = $(am__v_GEN_@AM_V@)
  27138. -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  27139. -am__v_GEN_0 = @echo " GEN " $@;
  27140. -am__v_GEN_1 =
  27141. -AM_V_at = $(am__v_at_@AM_V@)
  27142. -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  27143. -am__v_at_0 = @
  27144. -am__v_at_1 =
  27145. -SOURCES =
  27146. -DIST_SOURCES =
  27147. -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
  27148. - ctags-recursive dvi-recursive html-recursive info-recursive \
  27149. - install-data-recursive install-dvi-recursive \
  27150. - install-exec-recursive install-html-recursive \
  27151. - install-info-recursive install-pdf-recursive \
  27152. - install-ps-recursive install-recursive installcheck-recursive \
  27153. - installdirs-recursive pdf-recursive ps-recursive \
  27154. - tags-recursive uninstall-recursive
  27155. -am__can_run_installinfo = \
  27156. - case $$AM_UPDATE_INFO_DIR in \
  27157. - n|no|NO) false;; \
  27158. - *) (install-info --version) >/dev/null 2>&1;; \
  27159. - esac
  27160. -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
  27161. - distclean-recursive maintainer-clean-recursive
  27162. -am__recursive_targets = \
  27163. - $(RECURSIVE_TARGETS) \
  27164. - $(RECURSIVE_CLEAN_TARGETS) \
  27165. - $(am__extra_recursive_targets)
  27166. -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
  27167. - distdir
  27168. -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  27169. -# Read a list of newline-separated strings from the standard input,
  27170. -# and print each of them once, without duplicates. Input order is
  27171. -# *not* preserved.
  27172. -am__uniquify_input = $(AWK) '\
  27173. - BEGIN { nonempty = 0; } \
  27174. - { items[$$0] = 1; nonempty = 1; } \
  27175. - END { if (nonempty) { for (i in items) print i; }; } \
  27176. -'
  27177. -# Make sure the list of sources is unique. This is necessary because,
  27178. -# e.g., the same source file might be shared among _SOURCES variables
  27179. -# for different programs/libraries.
  27180. -am__define_uniq_tagged_files = \
  27181. - list='$(am__tagged_files)'; \
  27182. - unique=`for i in $$list; do \
  27183. - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  27184. - done | $(am__uniquify_input)`
  27185. -ETAGS = etags
  27186. -CTAGS = ctags
  27187. -DIST_SUBDIRS = $(SUBDIRS)
  27188. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  27189. -am__relativize = \
  27190. - dir0=`pwd`; \
  27191. - sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  27192. - sed_rest='s,^[^/]*/*,,'; \
  27193. - sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  27194. - sed_butlast='s,/*[^/]*$$,,'; \
  27195. - while test -n "$$dir1"; do \
  27196. - first=`echo "$$dir1" | sed -e "$$sed_first"`; \
  27197. - if test "$$first" != "."; then \
  27198. - if test "$$first" = ".."; then \
  27199. - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
  27200. - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
  27201. - else \
  27202. - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
  27203. - if test "$$first2" = "$$first"; then \
  27204. - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
  27205. - else \
  27206. - dir2="../$$dir2"; \
  27207. - fi; \
  27208. - dir0="$$dir0"/"$$first"; \
  27209. - fi; \
  27210. - fi; \
  27211. - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
  27212. - done; \
  27213. - reldir="$$dir2"
  27214. -ACLOCAL = @ACLOCAL@
  27215. -AMTAR = @AMTAR@
  27216. -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  27217. -AR = @AR@
  27218. -AS = @AS@
  27219. -AUTOCONF = @AUTOCONF@
  27220. -AUTOHEADER = @AUTOHEADER@
  27221. -AUTOMAKE = @AUTOMAKE@
  27222. -AWK = @AWK@
  27223. -CATALOGS = @CATALOGS@
  27224. -CATOBJEXT = @CATOBJEXT@
  27225. -CC = @CC@
  27226. -CCDEPMODE = @CCDEPMODE@
  27227. -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
  27228. -CFITSIO_LIBS = @CFITSIO_LIBS@
  27229. -CFLAGS = @CFLAGS@
  27230. -CPP = @CPP@
  27231. -CPPFLAGS = @CPPFLAGS@
  27232. -CXX = @CXX@
  27233. -CXXCPP = @CXXCPP@
  27234. -CXXDEPMODE = @CXXDEPMODE@
  27235. -CXXFLAGS = @CXXFLAGS@
  27236. -CYGPATH_W = @CYGPATH_W@
  27237. -DATADIRNAME = @DATADIRNAME@
  27238. -DEFS = @DEFS@
  27239. -DEPDIR = @DEPDIR@
  27240. -DLLTOOL = @DLLTOOL@
  27241. -DLLWRAP = @DLLWRAP@
  27242. -DSYMUTIL = @DSYMUTIL@
  27243. -DUMPBIN = @DUMPBIN@
  27244. -ECHO_C = @ECHO_C@
  27245. -ECHO_N = @ECHO_N@
  27246. -ECHO_T = @ECHO_T@
  27247. -EGREP = @EGREP@
  27248. -EXEEXT = @EXEEXT@
  27249. -EXIF_CFLAGS = @EXIF_CFLAGS@
  27250. -EXIF_LIBS = @EXIF_LIBS@
  27251. -FFTW_CFLAGS = @FFTW_CFLAGS@
  27252. -FFTW_LIBS = @FFTW_LIBS@
  27253. -FGREP = @FGREP@
  27254. -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
  27255. -GMOFILES = @GMOFILES@
  27256. -GMSGFMT = @GMSGFMT@
  27257. -GREP = @GREP@
  27258. -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
  27259. -GTHREAD_LIBS = @GTHREAD_LIBS@
  27260. -GTKDOC_CHECK = @GTKDOC_CHECK@
  27261. -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
  27262. -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
  27263. -GTKDOC_MKPDF = @GTKDOC_MKPDF@
  27264. -GTKDOC_REBASE = @GTKDOC_REBASE@
  27265. -HTML_DIR = @HTML_DIR@
  27266. -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
  27267. -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
  27268. -INSTALL = @INSTALL@
  27269. -INSTALL_DATA = @INSTALL_DATA@
  27270. -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  27271. -INSTALL_SCRIPT = @INSTALL_SCRIPT@
  27272. -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  27273. -INSTOBJEXT = @INSTOBJEXT@
  27274. -INTLLIBS = @INTLLIBS@
  27275. -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
  27276. -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
  27277. -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
  27278. -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
  27279. -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
  27280. -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
  27281. -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
  27282. -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
  27283. -JPEG_INCLUDES = @JPEG_INCLUDES@
  27284. -JPEG_LIBS = @JPEG_LIBS@
  27285. -LCMS_CFLAGS = @LCMS_CFLAGS@
  27286. -LCMS_LIBS = @LCMS_LIBS@
  27287. -LD = @LD@
  27288. -LDFLAGS = @LDFLAGS@
  27289. -LIBOBJS = @LIBOBJS@
  27290. -LIBRARY_AGE = @LIBRARY_AGE@
  27291. -LIBRARY_CURRENT = @LIBRARY_CURRENT@
  27292. -LIBRARY_REVISION = @LIBRARY_REVISION@
  27293. -LIBS = @LIBS@
  27294. -LIBTOOL = @LIBTOOL@
  27295. -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
  27296. -LIBWEBP_LIBS = @LIBWEBP_LIBS@
  27297. -LIPO = @LIPO@
  27298. -LN_S = @LN_S@
  27299. -LTLIBOBJS = @LTLIBOBJS@
  27300. -MAGICK_CFLAGS = @MAGICK_CFLAGS@
  27301. -MAGICK_LIBS = @MAGICK_LIBS@
  27302. -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
  27303. -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
  27304. -MAKEINFO = @MAKEINFO@
  27305. -MANIFEST_TOOL = @MANIFEST_TOOL@
  27306. -MATIO_CFLAGS = @MATIO_CFLAGS@
  27307. -MATIO_LIBS = @MATIO_LIBS@
  27308. -MKDIR_P = @MKDIR_P@
  27309. -MKINSTALLDIRS = @MKINSTALLDIRS@
  27310. -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
  27311. -MONOTONIC_LIBS = @MONOTONIC_LIBS@
  27312. -MSGFMT = @MSGFMT@
  27313. -MSGFMT_OPTS = @MSGFMT_OPTS@
  27314. -NM = @NM@
  27315. -NMEDIT = @NMEDIT@
  27316. -OBJDUMP = @OBJDUMP@
  27317. -OBJEXT = @OBJEXT@
  27318. -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
  27319. -OPENEXR_LIBS = @OPENEXR_LIBS@
  27320. -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
  27321. -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
  27322. -ORC_CFLAGS = @ORC_CFLAGS@
  27323. -ORC_LIBS = @ORC_LIBS@
  27324. -OTOOL = @OTOOL@
  27325. -OTOOL64 = @OTOOL64@
  27326. -PACKAGE = @PACKAGE@
  27327. -PACKAGES_USED = @PACKAGES_USED@
  27328. -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  27329. -PACKAGE_NAME = @PACKAGE_NAME@
  27330. -PACKAGE_STRING = @PACKAGE_STRING@
  27331. -PACKAGE_TARNAME = @PACKAGE_TARNAME@
  27332. -PACKAGE_URL = @PACKAGE_URL@
  27333. -PACKAGE_VERSION = @PACKAGE_VERSION@
  27334. -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
  27335. -PANGOFT2_LIBS = @PANGOFT2_LIBS@
  27336. -PATH_SEPARATOR = @PATH_SEPARATOR@
  27337. -PKG_CONFIG = @PKG_CONFIG@
  27338. -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
  27339. -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
  27340. -PNG_CFLAGS = @PNG_CFLAGS@
  27341. -PNG_INCLUDES = @PNG_INCLUDES@
  27342. -PNG_LIBS = @PNG_LIBS@
  27343. -POFILES = @POFILES@
  27344. -POSUB = @POSUB@
  27345. -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
  27346. -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
  27347. -PYTHON = @PYTHON@
  27348. -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
  27349. -PYTHON_INCLUDES = @PYTHON_INCLUDES@
  27350. -PYTHON_PLATFORM = @PYTHON_PLATFORM@
  27351. -PYTHON_PREFIX = @PYTHON_PREFIX@
  27352. -PYTHON_VERSION = @PYTHON_VERSION@
  27353. -RANLIB = @RANLIB@
  27354. -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
  27355. -REQUIRED_LIBS = @REQUIRED_LIBS@
  27356. -SED = @SED@
  27357. -SET_MAKE = @SET_MAKE@
  27358. -SHELL = @SHELL@
  27359. -STRIP = @STRIP@
  27360. -THREADS_CFLAGS = @THREADS_CFLAGS@
  27361. -THREADS_LIBS = @THREADS_LIBS@
  27362. -TIFF_CFLAGS = @TIFF_CFLAGS@
  27363. -TIFF_INCLUDES = @TIFF_INCLUDES@
  27364. -TIFF_LIBS = @TIFF_LIBS@
  27365. -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
  27366. -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
  27367. -USE_NLS = @USE_NLS@
  27368. -VERSION = @VERSION@
  27369. -VIPS_CFLAGS = @VIPS_CFLAGS@
  27370. -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
  27371. -VIPS_EXEEXT = @VIPS_EXEEXT@
  27372. -VIPS_INCLUDES = @VIPS_INCLUDES@
  27373. -VIPS_LIBDIR = @VIPS_LIBDIR@
  27374. -VIPS_LIBS = @VIPS_LIBS@
  27375. -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
  27376. -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
  27377. -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
  27378. -VIPS_VERSION = @VIPS_VERSION@
  27379. -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
  27380. -XGETTEXT = @XGETTEXT@
  27381. -XMKMF = @XMKMF@
  27382. -X_CFLAGS = @X_CFLAGS@
  27383. -X_EXTRA_LIBS = @X_EXTRA_LIBS@
  27384. -X_LIBS = @X_LIBS@
  27385. -X_PRE_LIBS = @X_PRE_LIBS@
  27386. -ZIP_INCLUDES = @ZIP_INCLUDES@
  27387. -ZIP_LIBS = @ZIP_LIBS@
  27388. -abs_builddir = @abs_builddir@
  27389. -abs_srcdir = @abs_srcdir@
  27390. -abs_top_builddir = @abs_top_builddir@
  27391. -abs_top_srcdir = @abs_top_srcdir@
  27392. -ac_ct_AR = @ac_ct_AR@
  27393. -ac_ct_CC = @ac_ct_CC@
  27394. -ac_ct_CXX = @ac_ct_CXX@
  27395. -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  27396. -am__include = @am__include@
  27397. -am__leading_dot = @am__leading_dot@
  27398. -am__quote = @am__quote@
  27399. -am__tar = @am__tar@
  27400. -am__untar = @am__untar@
  27401. -bindir = @bindir@
  27402. -build = @build@
  27403. -build_alias = @build_alias@
  27404. -build_cpu = @build_cpu@
  27405. -build_os = @build_os@
  27406. -build_vendor = @build_vendor@
  27407. -builddir = @builddir@
  27408. -datadir = @datadir@
  27409. -datarootdir = @datarootdir@
  27410. -docdir = @docdir@
  27411. -dvidir = @dvidir@
  27412. -exec_prefix = @exec_prefix@
  27413. -host = @host@
  27414. -host_alias = @host_alias@
  27415. -host_cpu = @host_cpu@
  27416. -host_os = @host_os@
  27417. -host_vendor = @host_vendor@
  27418. -htmldir = @htmldir@
  27419. -includedir = @includedir@
  27420. -infodir = @infodir@
  27421. -install_sh = @install_sh@
  27422. -libdir = @libdir@
  27423. -libexecdir = @libexecdir@
  27424. -localedir = @localedir@
  27425. -localstatedir = @localstatedir@
  27426. -mandir = @mandir@
  27427. -mkdir_p = @mkdir_p@
  27428. -oldincludedir = @oldincludedir@
  27429. -pdfdir = @pdfdir@
  27430. -pkgpyexecdir = @pkgpyexecdir@
  27431. -pkgpythondir = @pkgpythondir@
  27432. -prefix = @prefix@
  27433. -program_transform_name = @program_transform_name@
  27434. -psdir = @psdir@
  27435. -pyexecdir = @pyexecdir@
  27436. -pythondir = @pythondir@
  27437. -sbindir = @sbindir@
  27438. -sharedstatedir = @sharedstatedir@
  27439. -srcdir = @srcdir@
  27440. -sysconfdir = @sysconfdir@
  27441. -target_alias = @target_alias@
  27442. -top_build_prefix = @top_build_prefix@
  27443. -top_builddir = @top_builddir@
  27444. -top_srcdir = @top_srcdir@
  27445. -vips_introspection_sources = @vips_introspection_sources@
  27446. -SUBDIRS = vips
  27447. -all: all-recursive
  27448. -
  27449. -.SUFFIXES:
  27450. -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  27451. - @for dep in $?; do \
  27452. - case '$(am__configure_deps)' in \
  27453. - *$$dep*) \
  27454. - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  27455. - && { if test -f $@; then exit 0; else break; fi; }; \
  27456. - exit 1;; \
  27457. - esac; \
  27458. - done; \
  27459. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/Makefile'; \
  27460. - $(am__cd) $(top_srcdir) && \
  27461. - $(AUTOMAKE) --foreign libvipsCC/include/Makefile
  27462. -.PRECIOUS: Makefile
  27463. -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  27464. - @case '$?' in \
  27465. - *config.status*) \
  27466. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  27467. - *) \
  27468. - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  27469. - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  27470. - esac;
  27471. -
  27472. -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  27473. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  27474. -
  27475. -$(top_srcdir)/configure: $(am__configure_deps)
  27476. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  27477. -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  27478. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  27479. -$(am__aclocal_m4_deps):
  27480. -
  27481. -mostlyclean-libtool:
  27482. - -rm -f *.lo
  27483. -
  27484. -clean-libtool:
  27485. - -rm -rf .libs _libs
  27486. -
  27487. -# This directory's subdirectories are mostly independent; you can cd
  27488. -# into them and run 'make' without going through this Makefile.
  27489. -# To change the values of 'make' variables: instead of editing Makefiles,
  27490. -# (1) if the variable is set in 'config.status', edit 'config.status'
  27491. -# (which will cause the Makefiles to be regenerated when you run 'make');
  27492. -# (2) otherwise, pass the desired values on the 'make' command line.
  27493. -$(am__recursive_targets):
  27494. - @fail=; \
  27495. - if $(am__make_keepgoing); then \
  27496. - failcom='fail=yes'; \
  27497. - else \
  27498. - failcom='exit 1'; \
  27499. - fi; \
  27500. - dot_seen=no; \
  27501. - target=`echo $@ | sed s/-recursive//`; \
  27502. - case "$@" in \
  27503. - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
  27504. - *) list='$(SUBDIRS)' ;; \
  27505. - esac; \
  27506. - for subdir in $$list; do \
  27507. - echo "Making $$target in $$subdir"; \
  27508. - if test "$$subdir" = "."; then \
  27509. - dot_seen=yes; \
  27510. - local_target="$$target-am"; \
  27511. - else \
  27512. - local_target="$$target"; \
  27513. - fi; \
  27514. - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
  27515. - || eval $$failcom; \
  27516. - done; \
  27517. - if test "$$dot_seen" = "no"; then \
  27518. - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
  27519. - fi; test -z "$$fail"
  27520. -
  27521. -ID: $(am__tagged_files)
  27522. - $(am__define_uniq_tagged_files); mkid -fID $$unique
  27523. -tags: tags-recursive
  27524. -TAGS: tags
  27525. -
  27526. -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  27527. - set x; \
  27528. - here=`pwd`; \
  27529. - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
  27530. - include_option=--etags-include; \
  27531. - empty_fix=.; \
  27532. - else \
  27533. - include_option=--include; \
  27534. - empty_fix=; \
  27535. - fi; \
  27536. - list='$(SUBDIRS)'; for subdir in $$list; do \
  27537. - if test "$$subdir" = .; then :; else \
  27538. - test ! -f $$subdir/TAGS || \
  27539. - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
  27540. - fi; \
  27541. - done; \
  27542. - $(am__define_uniq_tagged_files); \
  27543. - shift; \
  27544. - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
  27545. - test -n "$$unique" || unique=$$empty_fix; \
  27546. - if test $$# -gt 0; then \
  27547. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  27548. - "$$@" $$unique; \
  27549. - else \
  27550. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  27551. - $$unique; \
  27552. - fi; \
  27553. - fi
  27554. -ctags: ctags-recursive
  27555. -
  27556. -CTAGS: ctags
  27557. -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  27558. - $(am__define_uniq_tagged_files); \
  27559. - test -z "$(CTAGS_ARGS)$$unique" \
  27560. - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  27561. - $$unique
  27562. -
  27563. -GTAGS:
  27564. - here=`$(am__cd) $(top_builddir) && pwd` \
  27565. - && $(am__cd) $(top_srcdir) \
  27566. - && gtags -i $(GTAGS_ARGS) "$$here"
  27567. -cscopelist: cscopelist-recursive
  27568. -
  27569. -cscopelist-am: $(am__tagged_files)
  27570. - list='$(am__tagged_files)'; \
  27571. - case "$(srcdir)" in \
  27572. - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
  27573. - *) sdir=$(subdir)/$(srcdir) ;; \
  27574. - esac; \
  27575. - for i in $$list; do \
  27576. - if test -f "$$i"; then \
  27577. - echo "$(subdir)/$$i"; \
  27578. - else \
  27579. - echo "$$sdir/$$i"; \
  27580. - fi; \
  27581. - done >> $(top_builddir)/cscope.files
  27582. -
  27583. -distclean-tags:
  27584. - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  27585. -
  27586. -distdir: $(DISTFILES)
  27587. - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  27588. - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  27589. - list='$(DISTFILES)'; \
  27590. - dist_files=`for file in $$list; do echo $$file; done | \
  27591. - sed -e "s|^$$srcdirstrip/||;t" \
  27592. - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  27593. - case $$dist_files in \
  27594. - */*) $(MKDIR_P) `echo "$$dist_files" | \
  27595. - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  27596. - sort -u` ;; \
  27597. - esac; \
  27598. - for file in $$dist_files; do \
  27599. - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  27600. - if test -d $$d/$$file; then \
  27601. - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  27602. - if test -d "$(distdir)/$$file"; then \
  27603. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  27604. - fi; \
  27605. - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  27606. - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  27607. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  27608. - fi; \
  27609. - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  27610. - else \
  27611. - test -f "$(distdir)/$$file" \
  27612. - || cp -p $$d/$$file "$(distdir)/$$file" \
  27613. - || exit 1; \
  27614. - fi; \
  27615. - done
  27616. - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
  27617. - if test "$$subdir" = .; then :; else \
  27618. - $(am__make_dryrun) \
  27619. - || test -d "$(distdir)/$$subdir" \
  27620. - || $(MKDIR_P) "$(distdir)/$$subdir" \
  27621. - || exit 1; \
  27622. - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
  27623. - $(am__relativize); \
  27624. - new_distdir=$$reldir; \
  27625. - dir1=$$subdir; dir2="$(top_distdir)"; \
  27626. - $(am__relativize); \
  27627. - new_top_distdir=$$reldir; \
  27628. - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
  27629. - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
  27630. - ($(am__cd) $$subdir && \
  27631. - $(MAKE) $(AM_MAKEFLAGS) \
  27632. - top_distdir="$$new_top_distdir" \
  27633. - distdir="$$new_distdir" \
  27634. - am__remove_distdir=: \
  27635. - am__skip_length_check=: \
  27636. - am__skip_mode_fix=: \
  27637. - distdir) \
  27638. - || exit 1; \
  27639. - fi; \
  27640. - done
  27641. -check-am: all-am
  27642. -check: check-recursive
  27643. -all-am: Makefile
  27644. -installdirs: installdirs-recursive
  27645. -installdirs-am:
  27646. -install: install-recursive
  27647. -install-exec: install-exec-recursive
  27648. -install-data: install-data-recursive
  27649. -uninstall: uninstall-recursive
  27650. -
  27651. -install-am: all-am
  27652. - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  27653. -
  27654. -installcheck: installcheck-recursive
  27655. -install-strip:
  27656. - if test -z '$(STRIP)'; then \
  27657. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  27658. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  27659. - install; \
  27660. - else \
  27661. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  27662. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  27663. - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  27664. - fi
  27665. -mostlyclean-generic:
  27666. -
  27667. -clean-generic:
  27668. -
  27669. -distclean-generic:
  27670. - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  27671. - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  27672. -
  27673. -maintainer-clean-generic:
  27674. - @echo "This command is intended for maintainers to use"
  27675. - @echo "it deletes files that may require special tools to rebuild."
  27676. -clean: clean-recursive
  27677. -
  27678. -clean-am: clean-generic clean-libtool mostlyclean-am
  27679. -
  27680. -distclean: distclean-recursive
  27681. - -rm -f Makefile
  27682. -distclean-am: clean-am distclean-generic distclean-tags
  27683. -
  27684. -dvi: dvi-recursive
  27685. -
  27686. -dvi-am:
  27687. -
  27688. -html: html-recursive
  27689. -
  27690. -html-am:
  27691. -
  27692. -info: info-recursive
  27693. -
  27694. -info-am:
  27695. -
  27696. -install-data-am:
  27697. -
  27698. -install-dvi: install-dvi-recursive
  27699. -
  27700. -install-dvi-am:
  27701. -
  27702. -install-exec-am:
  27703. -
  27704. -install-html: install-html-recursive
  27705. -
  27706. -install-html-am:
  27707. -
  27708. -install-info: install-info-recursive
  27709. -
  27710. -install-info-am:
  27711. -
  27712. -install-man:
  27713. -
  27714. -install-pdf: install-pdf-recursive
  27715. -
  27716. -install-pdf-am:
  27717. -
  27718. -install-ps: install-ps-recursive
  27719. -
  27720. -install-ps-am:
  27721. -
  27722. -installcheck-am:
  27723. -
  27724. -maintainer-clean: maintainer-clean-recursive
  27725. - -rm -f Makefile
  27726. -maintainer-clean-am: distclean-am maintainer-clean-generic
  27727. -
  27728. -mostlyclean: mostlyclean-recursive
  27729. -
  27730. -mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  27731. -
  27732. -pdf: pdf-recursive
  27733. -
  27734. -pdf-am:
  27735. -
  27736. -ps: ps-recursive
  27737. -
  27738. -ps-am:
  27739. -
  27740. -uninstall-am:
  27741. -
  27742. -.MAKE: $(am__recursive_targets) install-am install-strip
  27743. -
  27744. -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
  27745. - check-am clean clean-generic clean-libtool cscopelist-am ctags \
  27746. - ctags-am distclean distclean-generic distclean-libtool \
  27747. - distclean-tags distdir dvi dvi-am html html-am info info-am \
  27748. - install install-am install-data install-data-am install-dvi \
  27749. - install-dvi-am install-exec install-exec-am install-html \
  27750. - install-html-am install-info install-info-am install-man \
  27751. - install-pdf install-pdf-am install-ps install-ps-am \
  27752. - install-strip installcheck installcheck-am installdirs \
  27753. - installdirs-am maintainer-clean maintainer-clean-generic \
  27754. - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
  27755. - ps ps-am tags tags-am uninstall uninstall-am
  27756. -
  27757. -
  27758. -# Tell versions [3.59,3.63) of GNU make to not export all variables.
  27759. -# Otherwise a system limit (for SysV at least) may be exceeded.
  27760. -.NOEXPORT:
  27761. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.am vips-7.38.5/libvipsCC/include/vips/Makefile.am
  27762. --- vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.am 2014-07-17 23:48:36.237794473 -0400
  27763. +++ vips-7.38.5/libvipsCC/include/vips/Makefile.am 1969-12-31 19:00:00.000000000 -0500
  27764. @@ -1,21 +0,0 @@
  27765. -pkginclude_HEADERS = \
  27766. - VDisplay.h \
  27767. - VError.h \
  27768. - VImage.h \
  27769. - VMask.h \
  27770. - vipscpp.h \
  27771. - vips \
  27772. - vipsc++.h
  27773. -
  27774. -# swap the 'awk' line for this:
  27775. -# awk '{if($$1!="deprecated") print $$1}'` ; \
  27776. -# to not generate the wrappers for deprecated functions
  27777. -vipsc++.h:
  27778. - packages=`vips list packages | \
  27779. - awk '{print $$1}'` ; \
  27780. - echo > vipsc++.h ; \
  27781. - for name in $$packages; do \
  27782. - echo "// headers for package $$name" >> vipsc++.h ; \
  27783. - vips cpph $$name >> vipsc++.h ; \
  27784. - echo >> vipsc++.h ; \
  27785. - done
  27786. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.in vips-7.38.5/libvipsCC/include/vips/Makefile.in
  27787. --- vips-7.38.5-vanilla/libvipsCC/include/vips/Makefile.in 2014-07-17 23:48:36.237794473 -0400
  27788. +++ vips-7.38.5/libvipsCC/include/vips/Makefile.in 1969-12-31 19:00:00.000000000 -0500
  27789. @@ -1,681 +0,0 @@
  27790. -# Makefile.in generated by automake 1.13.3 from Makefile.am.
  27791. -# @configure_input@
  27792. -
  27793. -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
  27794. -
  27795. -# This Makefile.in is free software; the Free Software Foundation
  27796. -# gives unlimited permission to copy and/or distribute it,
  27797. -# with or without modifications, as long as this notice is preserved.
  27798. -
  27799. -# This program is distributed in the hope that it will be useful,
  27800. -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  27801. -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  27802. -# PARTICULAR PURPOSE.
  27803. -
  27804. -@SET_MAKE@
  27805. -
  27806. -VPATH = @srcdir@
  27807. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
  27808. -am__make_running_with_option = \
  27809. - case $${target_option-} in \
  27810. - ?) ;; \
  27811. - *) echo "am__make_running_with_option: internal error: invalid" \
  27812. - "target option '$${target_option-}' specified" >&2; \
  27813. - exit 1;; \
  27814. - esac; \
  27815. - has_opt=no; \
  27816. - sane_makeflags=$$MAKEFLAGS; \
  27817. - if $(am__is_gnu_make); then \
  27818. - sane_makeflags=$$MFLAGS; \
  27819. - else \
  27820. - case $$MAKEFLAGS in \
  27821. - *\\[\ \ ]*) \
  27822. - bs=\\; \
  27823. - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  27824. - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  27825. - esac; \
  27826. - fi; \
  27827. - skip_next=no; \
  27828. - strip_trailopt () \
  27829. - { \
  27830. - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  27831. - }; \
  27832. - for flg in $$sane_makeflags; do \
  27833. - test $$skip_next = yes && { skip_next=no; continue; }; \
  27834. - case $$flg in \
  27835. - *=*|--*) continue;; \
  27836. - -*I) strip_trailopt 'I'; skip_next=yes;; \
  27837. - -*I?*) strip_trailopt 'I';; \
  27838. - -*O) strip_trailopt 'O'; skip_next=yes;; \
  27839. - -*O?*) strip_trailopt 'O';; \
  27840. - -*l) strip_trailopt 'l'; skip_next=yes;; \
  27841. - -*l?*) strip_trailopt 'l';; \
  27842. - -[dEDm]) skip_next=yes;; \
  27843. - -[JT]) skip_next=yes;; \
  27844. - esac; \
  27845. - case $$flg in \
  27846. - *$$target_option*) has_opt=yes; break;; \
  27847. - esac; \
  27848. - done; \
  27849. - test $$has_opt = yes
  27850. -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  27851. -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  27852. -pkgdatadir = $(datadir)/@PACKAGE@
  27853. -pkgincludedir = $(includedir)/@PACKAGE@
  27854. -pkglibdir = $(libdir)/@PACKAGE@
  27855. -pkglibexecdir = $(libexecdir)/@PACKAGE@
  27856. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  27857. -install_sh_DATA = $(install_sh) -c -m 644
  27858. -install_sh_PROGRAM = $(install_sh) -c
  27859. -install_sh_SCRIPT = $(install_sh) -c
  27860. -INSTALL_HEADER = $(INSTALL_DATA)
  27861. -transform = $(program_transform_name)
  27862. -NORMAL_INSTALL = :
  27863. -PRE_INSTALL = :
  27864. -POST_INSTALL = :
  27865. -NORMAL_UNINSTALL = :
  27866. -PRE_UNINSTALL = :
  27867. -POST_UNINSTALL = :
  27868. -build_triplet = @build@
  27869. -host_triplet = @host@
  27870. -subdir = libvipsCC/include/vips
  27871. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  27872. - $(pkginclude_HEADERS)
  27873. -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  27874. -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
  27875. - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
  27876. - $(top_srcdir)/configure.ac
  27877. -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  27878. - $(ACLOCAL_M4)
  27879. -mkinstalldirs = $(install_sh) -d
  27880. -CONFIG_HEADER = $(top_builddir)/config.h
  27881. -CONFIG_CLEAN_FILES =
  27882. -CONFIG_CLEAN_VPATH_FILES =
  27883. -AM_V_P = $(am__v_P_@AM_V@)
  27884. -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  27885. -am__v_P_0 = false
  27886. -am__v_P_1 = :
  27887. -AM_V_GEN = $(am__v_GEN_@AM_V@)
  27888. -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  27889. -am__v_GEN_0 = @echo " GEN " $@;
  27890. -am__v_GEN_1 =
  27891. -AM_V_at = $(am__v_at_@AM_V@)
  27892. -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  27893. -am__v_at_0 = @
  27894. -am__v_at_1 =
  27895. -SOURCES =
  27896. -DIST_SOURCES =
  27897. -am__can_run_installinfo = \
  27898. - case $$AM_UPDATE_INFO_DIR in \
  27899. - n|no|NO) false;; \
  27900. - *) (install-info --version) >/dev/null 2>&1;; \
  27901. - esac
  27902. -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  27903. -am__vpath_adj = case $$p in \
  27904. - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  27905. - *) f=$$p;; \
  27906. - esac;
  27907. -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
  27908. -am__install_max = 40
  27909. -am__nobase_strip_setup = \
  27910. - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
  27911. -am__nobase_strip = \
  27912. - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
  27913. -am__nobase_list = $(am__nobase_strip_setup); \
  27914. - for p in $$list; do echo "$$p $$p"; done | \
  27915. - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  27916. - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
  27917. - if (++n[$$2] == $(am__install_max)) \
  27918. - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
  27919. - END { for (dir in files) print dir, files[dir] }'
  27920. -am__base_list = \
  27921. - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
  27922. - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
  27923. -am__uninstall_files_from_dir = { \
  27924. - test -z "$$files" \
  27925. - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
  27926. - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  27927. - $(am__cd) "$$dir" && rm -f $$files; }; \
  27928. - }
  27929. -am__installdirs = "$(DESTDIR)$(pkgincludedir)"
  27930. -HEADERS = $(pkginclude_HEADERS)
  27931. -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  27932. -# Read a list of newline-separated strings from the standard input,
  27933. -# and print each of them once, without duplicates. Input order is
  27934. -# *not* preserved.
  27935. -am__uniquify_input = $(AWK) '\
  27936. - BEGIN { nonempty = 0; } \
  27937. - { items[$$0] = 1; nonempty = 1; } \
  27938. - END { if (nonempty) { for (i in items) print i; }; } \
  27939. -'
  27940. -# Make sure the list of sources is unique. This is necessary because,
  27941. -# e.g., the same source file might be shared among _SOURCES variables
  27942. -# for different programs/libraries.
  27943. -am__define_uniq_tagged_files = \
  27944. - list='$(am__tagged_files)'; \
  27945. - unique=`for i in $$list; do \
  27946. - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  27947. - done | $(am__uniquify_input)`
  27948. -ETAGS = etags
  27949. -CTAGS = ctags
  27950. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  27951. -ACLOCAL = @ACLOCAL@
  27952. -AMTAR = @AMTAR@
  27953. -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  27954. -AR = @AR@
  27955. -AS = @AS@
  27956. -AUTOCONF = @AUTOCONF@
  27957. -AUTOHEADER = @AUTOHEADER@
  27958. -AUTOMAKE = @AUTOMAKE@
  27959. -AWK = @AWK@
  27960. -CATALOGS = @CATALOGS@
  27961. -CATOBJEXT = @CATOBJEXT@
  27962. -CC = @CC@
  27963. -CCDEPMODE = @CCDEPMODE@
  27964. -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
  27965. -CFITSIO_LIBS = @CFITSIO_LIBS@
  27966. -CFLAGS = @CFLAGS@
  27967. -CPP = @CPP@
  27968. -CPPFLAGS = @CPPFLAGS@
  27969. -CXX = @CXX@
  27970. -CXXCPP = @CXXCPP@
  27971. -CXXDEPMODE = @CXXDEPMODE@
  27972. -CXXFLAGS = @CXXFLAGS@
  27973. -CYGPATH_W = @CYGPATH_W@
  27974. -DATADIRNAME = @DATADIRNAME@
  27975. -DEFS = @DEFS@
  27976. -DEPDIR = @DEPDIR@
  27977. -DLLTOOL = @DLLTOOL@
  27978. -DLLWRAP = @DLLWRAP@
  27979. -DSYMUTIL = @DSYMUTIL@
  27980. -DUMPBIN = @DUMPBIN@
  27981. -ECHO_C = @ECHO_C@
  27982. -ECHO_N = @ECHO_N@
  27983. -ECHO_T = @ECHO_T@
  27984. -EGREP = @EGREP@
  27985. -EXEEXT = @EXEEXT@
  27986. -EXIF_CFLAGS = @EXIF_CFLAGS@
  27987. -EXIF_LIBS = @EXIF_LIBS@
  27988. -FFTW_CFLAGS = @FFTW_CFLAGS@
  27989. -FFTW_LIBS = @FFTW_LIBS@
  27990. -FGREP = @FGREP@
  27991. -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
  27992. -GMOFILES = @GMOFILES@
  27993. -GMSGFMT = @GMSGFMT@
  27994. -GREP = @GREP@
  27995. -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
  27996. -GTHREAD_LIBS = @GTHREAD_LIBS@
  27997. -GTKDOC_CHECK = @GTKDOC_CHECK@
  27998. -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
  27999. -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
  28000. -GTKDOC_MKPDF = @GTKDOC_MKPDF@
  28001. -GTKDOC_REBASE = @GTKDOC_REBASE@
  28002. -HTML_DIR = @HTML_DIR@
  28003. -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
  28004. -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
  28005. -INSTALL = @INSTALL@
  28006. -INSTALL_DATA = @INSTALL_DATA@
  28007. -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  28008. -INSTALL_SCRIPT = @INSTALL_SCRIPT@
  28009. -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  28010. -INSTOBJEXT = @INSTOBJEXT@
  28011. -INTLLIBS = @INTLLIBS@
  28012. -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
  28013. -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
  28014. -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
  28015. -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
  28016. -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
  28017. -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
  28018. -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
  28019. -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
  28020. -JPEG_INCLUDES = @JPEG_INCLUDES@
  28021. -JPEG_LIBS = @JPEG_LIBS@
  28022. -LCMS_CFLAGS = @LCMS_CFLAGS@
  28023. -LCMS_LIBS = @LCMS_LIBS@
  28024. -LD = @LD@
  28025. -LDFLAGS = @LDFLAGS@
  28026. -LIBOBJS = @LIBOBJS@
  28027. -LIBRARY_AGE = @LIBRARY_AGE@
  28028. -LIBRARY_CURRENT = @LIBRARY_CURRENT@
  28029. -LIBRARY_REVISION = @LIBRARY_REVISION@
  28030. -LIBS = @LIBS@
  28031. -LIBTOOL = @LIBTOOL@
  28032. -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
  28033. -LIBWEBP_LIBS = @LIBWEBP_LIBS@
  28034. -LIPO = @LIPO@
  28035. -LN_S = @LN_S@
  28036. -LTLIBOBJS = @LTLIBOBJS@
  28037. -MAGICK_CFLAGS = @MAGICK_CFLAGS@
  28038. -MAGICK_LIBS = @MAGICK_LIBS@
  28039. -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
  28040. -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
  28041. -MAKEINFO = @MAKEINFO@
  28042. -MANIFEST_TOOL = @MANIFEST_TOOL@
  28043. -MATIO_CFLAGS = @MATIO_CFLAGS@
  28044. -MATIO_LIBS = @MATIO_LIBS@
  28045. -MKDIR_P = @MKDIR_P@
  28046. -MKINSTALLDIRS = @MKINSTALLDIRS@
  28047. -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
  28048. -MONOTONIC_LIBS = @MONOTONIC_LIBS@
  28049. -MSGFMT = @MSGFMT@
  28050. -MSGFMT_OPTS = @MSGFMT_OPTS@
  28051. -NM = @NM@
  28052. -NMEDIT = @NMEDIT@
  28053. -OBJDUMP = @OBJDUMP@
  28054. -OBJEXT = @OBJEXT@
  28055. -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
  28056. -OPENEXR_LIBS = @OPENEXR_LIBS@
  28057. -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
  28058. -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
  28059. -ORC_CFLAGS = @ORC_CFLAGS@
  28060. -ORC_LIBS = @ORC_LIBS@
  28061. -OTOOL = @OTOOL@
  28062. -OTOOL64 = @OTOOL64@
  28063. -PACKAGE = @PACKAGE@
  28064. -PACKAGES_USED = @PACKAGES_USED@
  28065. -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  28066. -PACKAGE_NAME = @PACKAGE_NAME@
  28067. -PACKAGE_STRING = @PACKAGE_STRING@
  28068. -PACKAGE_TARNAME = @PACKAGE_TARNAME@
  28069. -PACKAGE_URL = @PACKAGE_URL@
  28070. -PACKAGE_VERSION = @PACKAGE_VERSION@
  28071. -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
  28072. -PANGOFT2_LIBS = @PANGOFT2_LIBS@
  28073. -PATH_SEPARATOR = @PATH_SEPARATOR@
  28074. -PKG_CONFIG = @PKG_CONFIG@
  28075. -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
  28076. -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
  28077. -PNG_CFLAGS = @PNG_CFLAGS@
  28078. -PNG_INCLUDES = @PNG_INCLUDES@
  28079. -PNG_LIBS = @PNG_LIBS@
  28080. -POFILES = @POFILES@
  28081. -POSUB = @POSUB@
  28082. -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
  28083. -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
  28084. -PYTHON = @PYTHON@
  28085. -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
  28086. -PYTHON_INCLUDES = @PYTHON_INCLUDES@
  28087. -PYTHON_PLATFORM = @PYTHON_PLATFORM@
  28088. -PYTHON_PREFIX = @PYTHON_PREFIX@
  28089. -PYTHON_VERSION = @PYTHON_VERSION@
  28090. -RANLIB = @RANLIB@
  28091. -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
  28092. -REQUIRED_LIBS = @REQUIRED_LIBS@
  28093. -SED = @SED@
  28094. -SET_MAKE = @SET_MAKE@
  28095. -SHELL = @SHELL@
  28096. -STRIP = @STRIP@
  28097. -THREADS_CFLAGS = @THREADS_CFLAGS@
  28098. -THREADS_LIBS = @THREADS_LIBS@
  28099. -TIFF_CFLAGS = @TIFF_CFLAGS@
  28100. -TIFF_INCLUDES = @TIFF_INCLUDES@
  28101. -TIFF_LIBS = @TIFF_LIBS@
  28102. -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
  28103. -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
  28104. -USE_NLS = @USE_NLS@
  28105. -VERSION = @VERSION@
  28106. -VIPS_CFLAGS = @VIPS_CFLAGS@
  28107. -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
  28108. -VIPS_EXEEXT = @VIPS_EXEEXT@
  28109. -VIPS_INCLUDES = @VIPS_INCLUDES@
  28110. -VIPS_LIBDIR = @VIPS_LIBDIR@
  28111. -VIPS_LIBS = @VIPS_LIBS@
  28112. -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
  28113. -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
  28114. -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
  28115. -VIPS_VERSION = @VIPS_VERSION@
  28116. -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
  28117. -XGETTEXT = @XGETTEXT@
  28118. -XMKMF = @XMKMF@
  28119. -X_CFLAGS = @X_CFLAGS@
  28120. -X_EXTRA_LIBS = @X_EXTRA_LIBS@
  28121. -X_LIBS = @X_LIBS@
  28122. -X_PRE_LIBS = @X_PRE_LIBS@
  28123. -ZIP_INCLUDES = @ZIP_INCLUDES@
  28124. -ZIP_LIBS = @ZIP_LIBS@
  28125. -abs_builddir = @abs_builddir@
  28126. -abs_srcdir = @abs_srcdir@
  28127. -abs_top_builddir = @abs_top_builddir@
  28128. -abs_top_srcdir = @abs_top_srcdir@
  28129. -ac_ct_AR = @ac_ct_AR@
  28130. -ac_ct_CC = @ac_ct_CC@
  28131. -ac_ct_CXX = @ac_ct_CXX@
  28132. -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  28133. -am__include = @am__include@
  28134. -am__leading_dot = @am__leading_dot@
  28135. -am__quote = @am__quote@
  28136. -am__tar = @am__tar@
  28137. -am__untar = @am__untar@
  28138. -bindir = @bindir@
  28139. -build = @build@
  28140. -build_alias = @build_alias@
  28141. -build_cpu = @build_cpu@
  28142. -build_os = @build_os@
  28143. -build_vendor = @build_vendor@
  28144. -builddir = @builddir@
  28145. -datadir = @datadir@
  28146. -datarootdir = @datarootdir@
  28147. -docdir = @docdir@
  28148. -dvidir = @dvidir@
  28149. -exec_prefix = @exec_prefix@
  28150. -host = @host@
  28151. -host_alias = @host_alias@
  28152. -host_cpu = @host_cpu@
  28153. -host_os = @host_os@
  28154. -host_vendor = @host_vendor@
  28155. -htmldir = @htmldir@
  28156. -includedir = @includedir@
  28157. -infodir = @infodir@
  28158. -install_sh = @install_sh@
  28159. -libdir = @libdir@
  28160. -libexecdir = @libexecdir@
  28161. -localedir = @localedir@
  28162. -localstatedir = @localstatedir@
  28163. -mandir = @mandir@
  28164. -mkdir_p = @mkdir_p@
  28165. -oldincludedir = @oldincludedir@
  28166. -pdfdir = @pdfdir@
  28167. -pkgpyexecdir = @pkgpyexecdir@
  28168. -pkgpythondir = @pkgpythondir@
  28169. -prefix = @prefix@
  28170. -program_transform_name = @program_transform_name@
  28171. -psdir = @psdir@
  28172. -pyexecdir = @pyexecdir@
  28173. -pythondir = @pythondir@
  28174. -sbindir = @sbindir@
  28175. -sharedstatedir = @sharedstatedir@
  28176. -srcdir = @srcdir@
  28177. -sysconfdir = @sysconfdir@
  28178. -target_alias = @target_alias@
  28179. -top_build_prefix = @top_build_prefix@
  28180. -top_builddir = @top_builddir@
  28181. -top_srcdir = @top_srcdir@
  28182. -vips_introspection_sources = @vips_introspection_sources@
  28183. -pkginclude_HEADERS = \
  28184. - VDisplay.h \
  28185. - VError.h \
  28186. - VImage.h \
  28187. - VMask.h \
  28188. - vipscpp.h \
  28189. - vips \
  28190. - vipsc++.h
  28191. -
  28192. -all: all-am
  28193. -
  28194. -.SUFFIXES:
  28195. -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  28196. - @for dep in $?; do \
  28197. - case '$(am__configure_deps)' in \
  28198. - *$$dep*) \
  28199. - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  28200. - && { if test -f $@; then exit 0; else break; fi; }; \
  28201. - exit 1;; \
  28202. - esac; \
  28203. - done; \
  28204. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile'; \
  28205. - $(am__cd) $(top_srcdir) && \
  28206. - $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile
  28207. -.PRECIOUS: Makefile
  28208. -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  28209. - @case '$?' in \
  28210. - *config.status*) \
  28211. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  28212. - *) \
  28213. - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  28214. - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  28215. - esac;
  28216. -
  28217. -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  28218. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  28219. -
  28220. -$(top_srcdir)/configure: $(am__configure_deps)
  28221. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  28222. -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  28223. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  28224. -$(am__aclocal_m4_deps):
  28225. -
  28226. -mostlyclean-libtool:
  28227. - -rm -f *.lo
  28228. -
  28229. -clean-libtool:
  28230. - -rm -rf .libs _libs
  28231. -install-pkgincludeHEADERS: $(pkginclude_HEADERS)
  28232. - @$(NORMAL_INSTALL)
  28233. - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
  28234. - if test -n "$$list"; then \
  28235. - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
  28236. - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
  28237. - fi; \
  28238. - for p in $$list; do \
  28239. - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  28240. - echo "$$d$$p"; \
  28241. - done | $(am__base_list) | \
  28242. - while read files; do \
  28243. - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
  28244. - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
  28245. - done
  28246. -
  28247. -uninstall-pkgincludeHEADERS:
  28248. - @$(NORMAL_UNINSTALL)
  28249. - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
  28250. - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
  28251. - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
  28252. -
  28253. -ID: $(am__tagged_files)
  28254. - $(am__define_uniq_tagged_files); mkid -fID $$unique
  28255. -tags: tags-am
  28256. -TAGS: tags
  28257. -
  28258. -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  28259. - set x; \
  28260. - here=`pwd`; \
  28261. - $(am__define_uniq_tagged_files); \
  28262. - shift; \
  28263. - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
  28264. - test -n "$$unique" || unique=$$empty_fix; \
  28265. - if test $$# -gt 0; then \
  28266. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  28267. - "$$@" $$unique; \
  28268. - else \
  28269. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  28270. - $$unique; \
  28271. - fi; \
  28272. - fi
  28273. -ctags: ctags-am
  28274. -
  28275. -CTAGS: ctags
  28276. -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  28277. - $(am__define_uniq_tagged_files); \
  28278. - test -z "$(CTAGS_ARGS)$$unique" \
  28279. - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  28280. - $$unique
  28281. -
  28282. -GTAGS:
  28283. - here=`$(am__cd) $(top_builddir) && pwd` \
  28284. - && $(am__cd) $(top_srcdir) \
  28285. - && gtags -i $(GTAGS_ARGS) "$$here"
  28286. -cscopelist: cscopelist-am
  28287. -
  28288. -cscopelist-am: $(am__tagged_files)
  28289. - list='$(am__tagged_files)'; \
  28290. - case "$(srcdir)" in \
  28291. - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
  28292. - *) sdir=$(subdir)/$(srcdir) ;; \
  28293. - esac; \
  28294. - for i in $$list; do \
  28295. - if test -f "$$i"; then \
  28296. - echo "$(subdir)/$$i"; \
  28297. - else \
  28298. - echo "$$sdir/$$i"; \
  28299. - fi; \
  28300. - done >> $(top_builddir)/cscope.files
  28301. -
  28302. -distclean-tags:
  28303. - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  28304. -
  28305. -distdir: $(DISTFILES)
  28306. - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  28307. - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  28308. - list='$(DISTFILES)'; \
  28309. - dist_files=`for file in $$list; do echo $$file; done | \
  28310. - sed -e "s|^$$srcdirstrip/||;t" \
  28311. - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  28312. - case $$dist_files in \
  28313. - */*) $(MKDIR_P) `echo "$$dist_files" | \
  28314. - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  28315. - sort -u` ;; \
  28316. - esac; \
  28317. - for file in $$dist_files; do \
  28318. - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  28319. - if test -d $$d/$$file; then \
  28320. - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  28321. - if test -d "$(distdir)/$$file"; then \
  28322. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  28323. - fi; \
  28324. - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  28325. - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  28326. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  28327. - fi; \
  28328. - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  28329. - else \
  28330. - test -f "$(distdir)/$$file" \
  28331. - || cp -p $$d/$$file "$(distdir)/$$file" \
  28332. - || exit 1; \
  28333. - fi; \
  28334. - done
  28335. -check-am: all-am
  28336. -check: check-am
  28337. -all-am: Makefile $(HEADERS)
  28338. -installdirs:
  28339. - for dir in "$(DESTDIR)$(pkgincludedir)"; do \
  28340. - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  28341. - done
  28342. -install: install-am
  28343. -install-exec: install-exec-am
  28344. -install-data: install-data-am
  28345. -uninstall: uninstall-am
  28346. -
  28347. -install-am: all-am
  28348. - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  28349. -
  28350. -installcheck: installcheck-am
  28351. -install-strip:
  28352. - if test -z '$(STRIP)'; then \
  28353. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  28354. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  28355. - install; \
  28356. - else \
  28357. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  28358. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  28359. - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  28360. - fi
  28361. -mostlyclean-generic:
  28362. -
  28363. -clean-generic:
  28364. -
  28365. -distclean-generic:
  28366. - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  28367. - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  28368. -
  28369. -maintainer-clean-generic:
  28370. - @echo "This command is intended for maintainers to use"
  28371. - @echo "it deletes files that may require special tools to rebuild."
  28372. -clean: clean-am
  28373. -
  28374. -clean-am: clean-generic clean-libtool mostlyclean-am
  28375. -
  28376. -distclean: distclean-am
  28377. - -rm -f Makefile
  28378. -distclean-am: clean-am distclean-generic distclean-tags
  28379. -
  28380. -dvi: dvi-am
  28381. -
  28382. -dvi-am:
  28383. -
  28384. -html: html-am
  28385. -
  28386. -html-am:
  28387. -
  28388. -info: info-am
  28389. -
  28390. -info-am:
  28391. -
  28392. -install-data-am: install-pkgincludeHEADERS
  28393. -
  28394. -install-dvi: install-dvi-am
  28395. -
  28396. -install-dvi-am:
  28397. -
  28398. -install-exec-am:
  28399. -
  28400. -install-html: install-html-am
  28401. -
  28402. -install-html-am:
  28403. -
  28404. -install-info: install-info-am
  28405. -
  28406. -install-info-am:
  28407. -
  28408. -install-man:
  28409. -
  28410. -install-pdf: install-pdf-am
  28411. -
  28412. -install-pdf-am:
  28413. -
  28414. -install-ps: install-ps-am
  28415. -
  28416. -install-ps-am:
  28417. -
  28418. -installcheck-am:
  28419. -
  28420. -maintainer-clean: maintainer-clean-am
  28421. - -rm -f Makefile
  28422. -maintainer-clean-am: distclean-am maintainer-clean-generic
  28423. -
  28424. -mostlyclean: mostlyclean-am
  28425. -
  28426. -mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  28427. -
  28428. -pdf: pdf-am
  28429. -
  28430. -pdf-am:
  28431. -
  28432. -ps: ps-am
  28433. -
  28434. -ps-am:
  28435. -
  28436. -uninstall-am: uninstall-pkgincludeHEADERS
  28437. -
  28438. -.MAKE: install-am install-strip
  28439. -
  28440. -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
  28441. - clean-libtool cscopelist-am ctags ctags-am distclean \
  28442. - distclean-generic distclean-libtool distclean-tags distdir dvi \
  28443. - dvi-am html html-am info info-am install install-am \
  28444. - install-data install-data-am install-dvi install-dvi-am \
  28445. - install-exec install-exec-am install-html install-html-am \
  28446. - install-info install-info-am install-man install-pdf \
  28447. - install-pdf-am install-pkgincludeHEADERS install-ps \
  28448. - install-ps-am install-strip installcheck installcheck-am \
  28449. - installdirs maintainer-clean maintainer-clean-generic \
  28450. - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
  28451. - ps ps-am tags tags-am uninstall uninstall-am \
  28452. - uninstall-pkgincludeHEADERS
  28453. -
  28454. -
  28455. -# swap the 'awk' line for this:
  28456. -# awk '{if($$1!="deprecated") print $$1}'` ; \
  28457. -# to not generate the wrappers for deprecated functions
  28458. -vipsc++.h:
  28459. - packages=`vips list packages | \
  28460. - awk '{print $$1}'` ; \
  28461. - echo > vipsc++.h ; \
  28462. - for name in $$packages; do \
  28463. - echo "// headers for package $$name" >> vipsc++.h ; \
  28464. - vips cpph $$name >> vipsc++.h ; \
  28465. - echo >> vipsc++.h ; \
  28466. - done
  28467. -
  28468. -# Tell versions [3.59,3.63) of GNU make to not export all variables.
  28469. -# Otherwise a system limit (for SysV at least) may be exceeded.
  28470. -.NOEXPORT:
  28471. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VDisplay.h vips-7.38.5/libvipsCC/include/vips/VDisplay.h
  28472. --- vips-7.38.5-vanilla/libvipsCC/include/vips/VDisplay.h 2014-07-17 23:48:36.237794473 -0400
  28473. +++ vips-7.38.5/libvipsCC/include/vips/VDisplay.h 1969-12-31 19:00:00.000000000 -0500
  28474. @@ -1,114 +0,0 @@
  28475. -/* VIPS display class.
  28476. - *
  28477. - * Hide details of im_col_display API.
  28478. - */
  28479. -
  28480. -/*
  28481. -
  28482. - This file is part of VIPS.
  28483. -
  28484. - VIPS is free software; you can redistribute it and/or modify
  28485. - it under the terms of the GNU Lesser General Public License as published by
  28486. - the Free Software Foundation; either version 2 of the License, or
  28487. - (at your option) any later version.
  28488. -
  28489. - This program is distributed in the hope that it will be useful,
  28490. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  28491. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28492. - GNU Lesser General Public License for more details.
  28493. -
  28494. - You should have received a copy of the GNU Lesser General Public License
  28495. - along with this program; if not, write to the Free Software
  28496. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  28497. - 02110-1301 USA
  28498. -
  28499. - */
  28500. -
  28501. -/*
  28502. -
  28503. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  28504. -
  28505. - */
  28506. -
  28507. -#ifndef IM_VDISPLAY_H
  28508. -#define IM_VDISPLAY_H
  28509. -
  28510. -/* SWIG includes this file directly rather than going through vipscpp.h ... so
  28511. - * we have to define these macros here as well.
  28512. - */
  28513. -#ifdef SWIG
  28514. -#define VIPS_NAMESPACE_START namespace vips {
  28515. -#define VIPS_NAMESPACE_END }
  28516. -#endif /*SWIG*/
  28517. -
  28518. -/* Wrap pointers to these, but we don't want to import all the old C API. Just
  28519. - * declare them.
  28520. - */
  28521. -extern "C" {
  28522. - struct im_col_display;
  28523. - struct im_col_tab_disp;
  28524. -}
  28525. -
  28526. -VIPS_NAMESPACE_START
  28527. -
  28528. -// Wrapper over im_col_display with ref counting
  28529. -class VDisplay {
  28530. - struct refblock {
  28531. - im_col_display *disp; // im_col_display struct
  28532. - im_col_tab_disp *luts; // luts built from this display
  28533. - int priv; // disp is ours, or system
  28534. - int nrefs; // Refs to us
  28535. -
  28536. - // Invalidate lut
  28537. - void cleanlut();
  28538. -
  28539. - // Break attached stuff
  28540. - void cleanref();
  28541. -
  28542. - // Get ready to write
  28543. - void wready() throw( VError );
  28544. -
  28545. - // Check that luts are up-to-date
  28546. - void cluts() throw( VError );
  28547. -
  28548. - refblock() : disp(0), luts(0), priv(0), nrefs(1) {}
  28549. - ~refblock() { cleanref(); }
  28550. - };
  28551. -
  28552. - refblock *ref;
  28553. -
  28554. -public:
  28555. - enum VDisplayType {
  28556. - BARCO, // Does many corrections for us
  28557. - DUMB // Needs many corrections
  28558. - };
  28559. -
  28560. - // Get named display
  28561. - VDisplay( const char *name ) throw( VError );
  28562. -
  28563. - // Get default display
  28564. - VDisplay();
  28565. -
  28566. - // Copy constructor
  28567. - VDisplay( const VDisplay &a ) { ref = a.ref; ref->nrefs++; }
  28568. -
  28569. - // Assignment
  28570. - VDisplay &operator=( const VDisplay &a );
  28571. -
  28572. - // Destructor
  28573. - virtual ~VDisplay();
  28574. -
  28575. - // The matrix type we use
  28576. - typedef float matrix[3][3];
  28577. -
  28578. - // Extract display pointer
  28579. - void *disp() const { return( ref->disp ); }
  28580. -
  28581. - // Extract luts pointer, rebuilding luts if necessary
  28582. - im_col_tab_disp *luts() const throw( VError )
  28583. - { ref->cluts(); return( ref->luts ); }
  28584. -};
  28585. -
  28586. -VIPS_NAMESPACE_END
  28587. -
  28588. -#endif /*IM_VDISPLAY_H*/
  28589. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VError.h vips-7.38.5/libvipsCC/include/vips/VError.h
  28590. --- vips-7.38.5-vanilla/libvipsCC/include/vips/VError.h 2014-07-17 23:48:36.237794473 -0400
  28591. +++ vips-7.38.5/libvipsCC/include/vips/VError.h 1969-12-31 19:00:00.000000000 -0500
  28592. @@ -1,83 +0,0 @@
  28593. -// Header for error type
  28594. -
  28595. -/*
  28596. -
  28597. - This file is part of VIPS.
  28598. -
  28599. - VIPS is free software; you can redistribute it and/or modify
  28600. - it under the terms of the GNU Lesser General Public License as published by
  28601. - the Free Software Foundation; either version 2 of the License, or
  28602. - (at your option) any later version.
  28603. -
  28604. - This program is distributed in the hope that it will be useful,
  28605. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  28606. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28607. - GNU Lesser General Public License for more details.
  28608. -
  28609. - You should have received a copy of the GNU Lesser General Public License
  28610. - along with this program; if not, write to the Free Software
  28611. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  28612. - 02110-1301 USA
  28613. -
  28614. - */
  28615. -
  28616. -/*
  28617. -
  28618. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  28619. -
  28620. - */
  28621. -
  28622. -#ifndef IM_VERROR_H
  28623. -#define IM_VERROR_H
  28624. -
  28625. -/* SWIG includes this file directly rather than going through vipscpp.h ... so
  28626. - * we have to define these macros here as well.
  28627. - */
  28628. -#ifdef SWIG
  28629. -#define VIPS_NAMESPACE_START namespace vips {
  28630. -#define VIPS_NAMESPACE_END }
  28631. -#endif /*SWIG*/
  28632. -
  28633. -/* Don't include these when parsing for SWIG.
  28634. - */
  28635. -#ifndef SWIG
  28636. -# include <string>
  28637. -# include <iosfwd>
  28638. -# include <exception>
  28639. -#endif /*!SWIG*/
  28640. -
  28641. -VIPS_NAMESPACE_START
  28642. -
  28643. -// Error type
  28644. -class VError : public std::exception {
  28645. - std::string _what;
  28646. -
  28647. -public:
  28648. - VError( std::string what ) : _what( what ) {}
  28649. - VError() {}
  28650. - virtual ~VError() throw() {}
  28651. -
  28652. - // Print message and exit
  28653. - void perror( const char * );
  28654. - void perror();
  28655. -
  28656. - // Append some more text to the message
  28657. - VError &app( std::string txt );
  28658. - VError &app( const int i );
  28659. -
  28660. - // Extract string
  28661. - virtual const char *what() const throw() { return _what.c_str(); }
  28662. - void ostream_print( std::ostream & ) const;
  28663. -};
  28664. -
  28665. -inline std::ostream &operator<<( std::ostream &file, const VError &err )
  28666. -{
  28667. - err.ostream_print( file );
  28668. - return( file );
  28669. -}
  28670. -
  28671. -void verror( std::string str = "" ) throw( VError );
  28672. -
  28673. -VIPS_NAMESPACE_END
  28674. -
  28675. -#endif /*IM_VERROR_H*/
  28676. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VImage.h vips-7.38.5/libvipsCC/include/vips/VImage.h
  28677. --- vips-7.38.5-vanilla/libvipsCC/include/vips/VImage.h 2014-07-17 23:48:36.237794473 -0400
  28678. +++ vips-7.38.5/libvipsCC/include/vips/VImage.h 1969-12-31 19:00:00.000000000 -0500
  28679. @@ -1,457 +0,0 @@
  28680. -// VIPS image wrapper
  28681. -
  28682. -/*
  28683. -
  28684. - This file is part of VIPS.
  28685. -
  28686. - VIPS is free software; you can redistribute it and/or modify
  28687. - it under the terms of the GNU Lesser General Public License as published by
  28688. - the Free Software Foundation; either version 2 of the License, or
  28689. - (at your option) any later version.
  28690. -
  28691. - This program is distributed in the hope that it will be useful,
  28692. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  28693. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28694. - GNU Lesser General Public License for more details.
  28695. -
  28696. - You should have received a copy of the GNU Lesser General Public License
  28697. - along with this program; if not, write to the Free Software
  28698. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  28699. - 02110-1301 USA
  28700. -
  28701. - */
  28702. -
  28703. -/*
  28704. -
  28705. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  28706. -
  28707. - */
  28708. -
  28709. -#ifndef IM_VIMAGE_H
  28710. -#define IM_VIMAGE_H
  28711. -
  28712. -/* SWIG includes this file directly rather than going through vipscpp.h ... so
  28713. - * we have to define these macros here as well.
  28714. - */
  28715. -#ifdef SWIG
  28716. -# define VIPS_NAMESPACE_START namespace vips {
  28717. -# define VIPS_NAMESPACE_END }
  28718. -#endif /*SWIG*/
  28719. -
  28720. -/* Don't include these when parsing for SWIG.
  28721. - */
  28722. -#ifndef SWIG
  28723. -# include <list>
  28724. -# include <complex>
  28725. -# include <vector>
  28726. -#endif /*!SWIG*/
  28727. -
  28728. -/* Wrap pointers to these, but we don't want to import all the old C API. Just
  28729. - * declare them.
  28730. - */
  28731. -extern "C" {
  28732. - struct _VipsImage;
  28733. -
  28734. - /* Needed by Vargv, see below.
  28735. - */
  28736. - struct im__function;
  28737. - typedef void *im__object;
  28738. -}
  28739. -
  28740. -VIPS_NAMESPACE_START
  28741. -
  28742. -/* vips_init() and vips_shutdown as namespaced C++ functions.
  28743. - */
  28744. -bool init( const char *argv0 = "nothing" );
  28745. -void shutdown( void );
  28746. -
  28747. -/* A VIPS callback, our name for im_callback_fn.
  28748. - */
  28749. -typedef int (*VCallback)( void *, void * );
  28750. -
  28751. -/* VIPS image class.
  28752. - *
  28753. - * Slightly tricky: we have two sorts of sharing. Several VImage can share one
  28754. - * refblock (while results are being returned from functions, for example),
  28755. - * and several other refblocks can have IMAGEs which depend upon this IMAGE
  28756. - * for their result.
  28757. - */
  28758. -class VImage {
  28759. - /* We'd like this to be protected so that user subclasses can define
  28760. - * their own member wrappers. But sadly C++ doesn't work like that:
  28761. - * subclasses of VImage can only refer to protected members via
  28762. - * this->, which isn't what we need. Just make it public and hope no
  28763. - * one touches it.
  28764. - */
  28765. -public:
  28766. -/* Doesn't need to be wrapped.
  28767. - */
  28768. -#ifndef SWIG
  28769. - // Count ref etc. in one of these. One for each open VIPS image.
  28770. - struct refblock {
  28771. - _VipsImage *im; // IMAGE pointer
  28772. - int close_on_delete; // Set if we must im_close()
  28773. - int nrefs; // Number of refs to us
  28774. - std::list<refblock*> orefs; // Refs im makes
  28775. -
  28776. - // Construct/destruct
  28777. - refblock();
  28778. - virtual ~refblock() throw( VError );
  28779. -
  28780. - // Add a ref - this (output image) depends upon IMAGE in
  28781. - void addref( refblock *in ) throw( VError );
  28782. -
  28783. - // Remove a ref
  28784. - void removeref() throw( VError );
  28785. -
  28786. - // Debugging
  28787. - void debug_print();
  28788. -
  28789. - // Linked list needs "==" -- use address equivalence
  28790. - friend int operator==( const refblock &left,
  28791. - const refblock &right ) { return( &left == &right ); }
  28792. - };
  28793. -
  28794. - refblock *_ref;
  28795. -#endif /*!SWIG*/
  28796. -
  28797. -public:
  28798. -#ifdef DEBUG
  28799. - /* All the refblocks in the world.
  28800. - */
  28801. - static std::list<refblock*> all_refblock;
  28802. -#endif /*DEBUG*/
  28803. -
  28804. - /* Print all refblocks ... debugging. Compile with DEBUG to enable
  28805. - * this.
  28806. - */
  28807. - static void print_all();
  28808. -
  28809. - /* Typedefs and enums we need.
  28810. - */
  28811. -
  28812. - // Type type
  28813. - enum TType {
  28814. - MULTIBAND = 0,
  28815. - B_W = 1,
  28816. - LUMINACE = 2,
  28817. - XRAY = 3,
  28818. - IR = 4,
  28819. - YUV = 5,
  28820. - RED_ONLY = 6,
  28821. - GREEN_ONLY = 7,
  28822. - BLUE_ONLY = 8,
  28823. - POWER_SPECTRUM = 9,
  28824. - HISTOGRAM = 10,
  28825. - LUT = 11,
  28826. - XYZ = 12,
  28827. - LAB = 13,
  28828. - CMC = 14,
  28829. - CMYK = 15,
  28830. - LABQ = 16,
  28831. - RGB = 17,
  28832. - UCS = 18,
  28833. - LCH = 19,
  28834. - LABS = 21,
  28835. - sRGB = 22,
  28836. - YXY = 23,
  28837. - FOURIER = 24,
  28838. - RGB16 = 25,
  28839. - GREY16 = 26
  28840. - };
  28841. -
  28842. - // Format type
  28843. - enum TBandFmt {
  28844. - FMTNOTSET = -1,
  28845. - FMTUCHAR = 0,
  28846. - FMTCHAR = 1,
  28847. - FMTUSHORT = 2,
  28848. - FMTSHORT = 3,
  28849. - FMTUINT = 4,
  28850. - FMTINT = 5,
  28851. - FMTFLOAT = 6,
  28852. - FMTCOMPLEX = 7,
  28853. - FMTDOUBLE = 8,
  28854. - FMTDPCOMPLEX = 9
  28855. - };
  28856. -
  28857. - // Coding type
  28858. - enum TCoding {
  28859. - NOCODING = 0,
  28860. - COLQUANT = 1,
  28861. - LABPACK = 2,
  28862. - LABPACK_COMPRESSED = 3,
  28863. - RGB_COMPRESSED = 4,
  28864. - LUM_COMPRESSED = 5,
  28865. - RAD = 6
  28866. - };
  28867. -
  28868. - // Compression type
  28869. - enum TCompression {
  28870. - NO_COMPRESSION = 0,
  28871. - TCSF_COMPRESSION = 1,
  28872. - JPEG_COMPRESSION = 2
  28873. - };
  28874. -
  28875. - /* Start of wrappers for iofuncs.
  28876. - */
  28877. -
  28878. - // Plain constructors
  28879. - VImage( const char *name, const char *mode = "rd" ) throw( VError );
  28880. - VImage( void *data, int width, int height,
  28881. - int bands, TBandFmt format ) throw( VError );
  28882. - VImage( _VipsImage *image );
  28883. - VImage() throw( VError );
  28884. -
  28885. - // Convert to a disc file, eg:
  28886. - // VImage fred = VImage::convert2disc( "im_jpeg2vips",
  28887. - // "file.jpg", "temp.v" );
  28888. - // Runs im_jpeg2vips to the temp file, then opens that and returns
  28889. - // it. Useful for opening very large files without using a lot of RAM.
  28890. - // Now superseded by the format API, though that's not yet wrapped in
  28891. - // C++
  28892. - // Also replaced by the new default "rd" mode
  28893. - static VImage convert2disc( const char* convert,
  28894. - const char* in, const char* disc ) throw( VError );
  28895. -
  28896. - // Copy constructor
  28897. - VImage( const VImage &a );
  28898. -
  28899. - // Assignment - delete old ref
  28900. - VImage &operator=( const VImage &a ) throw( VError );
  28901. -
  28902. - // Destructor
  28903. - virtual ~VImage() throw( VError ) { _ref->removeref(); }
  28904. -
  28905. - // Extract underlying IMAGE* pointer
  28906. - _VipsImage *image() const { return( _ref->im ); }
  28907. -
  28908. - // Extract underlying data pointer
  28909. - void *data() const throw( VError );
  28910. -
  28911. - // Write this to another VImage, to a file, or to a mem buffer
  28912. - VImage write( VImage out ) throw( VError );
  28913. - VImage write( const char *name ) throw( VError );
  28914. - VImage write() throw( VError );
  28915. -
  28916. - // Debugging ... print header fields
  28917. - void debug_print();
  28918. -
  28919. - // Projection functions to get header fields
  28920. - int Xsize();
  28921. - int Ysize();
  28922. - int Bands();
  28923. - TBandFmt BandFmt();
  28924. - TCoding Coding();
  28925. - TType Type();
  28926. - float Xres();
  28927. - float Yres();
  28928. - int Length();
  28929. - TCompression Compression();
  28930. - short Level();
  28931. - int Xoffset();
  28932. - int Yoffset();
  28933. -
  28934. - // Derived fields
  28935. - const char *filename();
  28936. - const char *Hist();
  28937. -
  28938. - // metadata
  28939. -#ifndef SWIG
  28940. - // base functionality
  28941. - // we don't wrap GValue, so we can't wrap these for now
  28942. - void meta_set( const char *field, GValue *value ) throw( VError );
  28943. - void meta_get( const char *field, GValue *value_copy ) throw( VError );
  28944. -#endif /*SWIG*/
  28945. -
  28946. - // We can wrap these, fwiw
  28947. - gboolean meta_remove( const char *field );
  28948. - GType meta_get_typeof( const char *field );
  28949. -
  28950. - // convenience functions
  28951. - int meta_get_int( const char *field ) throw( VError );
  28952. - double meta_get_double( const char *field ) throw( VError );
  28953. - const char *meta_get_string( const char *field ) throw( VError );
  28954. - void *meta_get_area( const char *field ) throw( VError );
  28955. - void *meta_get_blob( const char *field, size_t *length )
  28956. - throw( VError );
  28957. -
  28958. - void meta_set( const char *field, int value ) throw( VError );
  28959. - void meta_set( const char *field, double value ) throw( VError );
  28960. - void meta_set( const char *field, const char *value ) throw( VError );
  28961. -
  28962. -#ifndef SWIG
  28963. - // we don't wrap callbacks yet, so we can't wrap these for now
  28964. - void meta_set( const char *field,
  28965. - VCallback free_fn, void *value )
  28966. - throw( VError );
  28967. - void meta_set( const char *field,
  28968. - VCallback free_fn, void *value, size_t length )
  28969. - throw( VError );
  28970. -#endif /*SWIG*/
  28971. -
  28972. - // Set header fields
  28973. - void initdesc( int, int, int, TBandFmt, TCoding, TType,
  28974. - float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
  28975. -
  28976. - /* Insert automatically generated headers.
  28977. - */
  28978. -#include "vipsc++.h"
  28979. -
  28980. -/* No point getting SWIG to wrap these ... we do this by hand later so we can
  28981. - * handle things like "a + 12" correctly.
  28982. - */
  28983. -#ifndef SWIG
  28984. - // And some in-line operator equivalences done by hand
  28985. - friend VImage operator+( VImage a, VImage b ) throw( VError )
  28986. - { return( a.add( b ) ); }
  28987. - friend VImage operator+( double a, VImage b ) throw( VError )
  28988. - { return( b.lin( 1.0, a ) ); }
  28989. - friend VImage operator+( VImage a, double b ) throw( VError )
  28990. - { return( a.lin( 1.0, b ) ); }
  28991. -
  28992. - friend VImage operator-( VImage a, VImage b ) throw( VError )
  28993. - { return( a.subtract( b ) ); }
  28994. - friend VImage operator-( double a, VImage b ) throw( VError )
  28995. - { return( b.lin( -1.0, a ) ); }
  28996. - friend VImage operator-( VImage a, double b ) throw( VError )
  28997. - { return( a.lin( 1.0, -b ) ); }
  28998. -
  28999. - friend VImage operator*( VImage a, VImage b ) throw( VError )
  29000. - { return( a.multiply( b ) ); }
  29001. - friend VImage operator*( double a, VImage b ) throw( VError )
  29002. - { return( b.lin( a, 0.0 ) ); }
  29003. - friend VImage operator*( VImage a, double b ) throw( VError )
  29004. - { return( a.lin( b, 0.0 ) ); }
  29005. -
  29006. - friend VImage operator/( VImage a, VImage b ) throw( VError )
  29007. - { return( a.divide( b ) ); }
  29008. - friend VImage operator/( double a, VImage b ) throw( VError )
  29009. - { return( b.pow( -1.0 ).lin( a, 0.0 ) ); }
  29010. - friend VImage operator/( VImage a, double b ) throw( VError )
  29011. - { return( a.lin( 1.0/b, 0.0 ) ); }
  29012. -
  29013. - friend VImage operator%( VImage a, VImage b ) throw( VError )
  29014. - { return( a.remainder( b ) ); }
  29015. - friend VImage operator%( VImage a, double b ) throw( VError )
  29016. - { return( a.remainder( b ) ); }
  29017. -
  29018. - friend VImage operator<( VImage a, VImage b ) throw( VError )
  29019. - { return( a.less( b ) ); }
  29020. - friend VImage operator<( double a, VImage b ) throw( VError )
  29021. - { return( b.more( a ) ); }
  29022. - friend VImage operator<( VImage a, double b ) throw( VError )
  29023. - { return( a.less( b ) ); }
  29024. -
  29025. - friend VImage operator<=( VImage a, VImage b ) throw( VError )
  29026. - { return( a.lesseq( b ) ); }
  29027. - friend VImage operator<=( double a, VImage b ) throw( VError )
  29028. - { return( b.moreeq( a ) ); }
  29029. - friend VImage operator<=( VImage a, double b ) throw( VError )
  29030. - { return( a.lesseq( b ) ); }
  29031. -
  29032. - friend VImage operator>( VImage a, VImage b ) throw( VError )
  29033. - { return( a.more( b ) ); }
  29034. - friend VImage operator>( double a, VImage b ) throw( VError )
  29035. - { return( b.less( a ) ); }
  29036. - friend VImage operator>( VImage a, double b ) throw( VError )
  29037. - { return( a.more( b ) ); }
  29038. -
  29039. - friend VImage operator>=( VImage a, VImage b ) throw( VError )
  29040. - { return( a.moreeq( b ) ); }
  29041. - friend VImage operator>=( double a, VImage b ) throw( VError )
  29042. - { return( b.lesseq( a ) ); }
  29043. - friend VImage operator>=( VImage a, double b ) throw( VError )
  29044. - { return( a.moreeq( b ) ); }
  29045. -
  29046. - friend VImage operator==( VImage a, VImage b ) throw( VError )
  29047. - { return( a.equal( b ) ); }
  29048. - friend VImage operator==( double a, VImage b ) throw( VError )
  29049. - { return( b.equal( a ) ); }
  29050. - friend VImage operator==( VImage a, double b ) throw( VError )
  29051. - { return( a.equal( b ) ); }
  29052. -
  29053. - friend VImage operator!=( VImage a, VImage b ) throw( VError )
  29054. - { return( a.notequal( b ) ); }
  29055. - friend VImage operator!=( double a, VImage b ) throw( VError )
  29056. - { return( b.notequal( a ) ); }
  29057. - friend VImage operator!=( VImage a, double b ) throw( VError )
  29058. - { return( a.notequal( b ) ); }
  29059. -
  29060. - friend VImage operator&( VImage a, VImage b ) throw( VError )
  29061. - { return( a.andimage( b ) ); }
  29062. - friend VImage operator&( int a, VImage b ) throw( VError )
  29063. - { return( b.andimage( a ) ); }
  29064. - friend VImage operator&( VImage a, int b ) throw( VError )
  29065. - { return( a.andimage( b ) ); }
  29066. -
  29067. - friend VImage operator|( VImage a, VImage b ) throw( VError )
  29068. - { return( a.orimage( b ) ); }
  29069. - friend VImage operator|( int a, VImage b ) throw( VError )
  29070. - { return( b.orimage( a ) ); }
  29071. - friend VImage operator|( VImage a, int b ) throw( VError )
  29072. - { return( a.orimage( b ) ); }
  29073. -
  29074. - friend VImage operator^( VImage a, VImage b ) throw( VError )
  29075. - { return( a.eorimage( b ) ); }
  29076. - friend VImage operator^( int a, VImage b ) throw( VError )
  29077. - { return( b.eorimage( a ) ); }
  29078. - friend VImage operator^( VImage a, int b ) throw( VError )
  29079. - { return( a.eorimage( b ) ); }
  29080. -
  29081. - friend VImage operator<<( VImage a, int b ) throw( VError )
  29082. - { return( a.shiftleft( b ) ); }
  29083. - friend VImage operator>>( VImage a, int b ) throw( VError )
  29084. - { return( a.shiftright( b ) ); }
  29085. -
  29086. - friend VImage operator-( VImage a ) throw( VError )
  29087. - { return( a * -1 ); }
  29088. -
  29089. - // Type conversion: VImage to VDMask and VIMask
  29090. - operator VDMask() throw( VError )
  29091. - { return( this->vips2mask() ); }
  29092. - operator VIMask() throw( VError )
  29093. - { return( VIMask( VDMask( *this ) ) ); }
  29094. -#endif /*!SWIG*/
  29095. -};
  29096. -
  29097. -/* Don't include these when parsing for SWIG.
  29098. - */
  29099. -#ifndef SWIG
  29100. -
  29101. -/* Class wrapping up a vargv. Member function wrappers need this. It needs to
  29102. - * be part of the public API in case people subclass VImage and add their own
  29103. - * members.
  29104. - */
  29105. -class Vargv {
  29106. - // Function we are args to
  29107. - im__function *fn;
  29108. -
  29109. - // Base of object vector
  29110. - im__object *base;
  29111. -
  29112. -public:
  29113. - Vargv( const char *name );
  29114. - ~Vargv();
  29115. -
  29116. - // Reference to element of base
  29117. - im__object &data( int i = 0 ) { return( base[i] ); };
  29118. -
  29119. - // Invoke function
  29120. - void call();
  29121. -};
  29122. -
  29123. -#endif /*!SWIG*/
  29124. -
  29125. -VIPS_NAMESPACE_END
  29126. -
  29127. -// Other VIPS protos we need
  29128. -extern "C" {
  29129. -extern int im_init_world( const char *argv0 );
  29130. -extern void im__print_all();
  29131. -extern void im_col_Lab2XYZ(
  29132. - float, float, float,
  29133. - float *, float *, float * );
  29134. -}
  29135. -
  29136. -#endif /*IM_VIMAGE_H*/
  29137. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vips vips-7.38.5/libvipsCC/include/vips/vips
  29138. --- vips-7.38.5-vanilla/libvipsCC/include/vips/vips 2014-07-17 23:48:36.237794473 -0400
  29139. +++ vips-7.38.5/libvipsCC/include/vips/vips 1969-12-31 19:00:00.000000000 -0500
  29140. @@ -1,110 +0,0 @@
  29141. -// Include file to get all VIPS C++ bindings
  29142. -
  29143. -/*
  29144. -
  29145. - This file is part of VIPS.
  29146. -
  29147. - VIPS is free software; you can redistribute it and/or modify
  29148. - it under the terms of the GNU Lesser General Public License as published by
  29149. - the Free Software Foundation; either version 2 of the License, or
  29150. - (at your option) any later version.
  29151. -
  29152. - This program is distributed in the hope that it will be useful,
  29153. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  29154. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29155. - GNU Lesser General Public License for more details.
  29156. -
  29157. - You should have received a copy of the GNU Lesser General Public License
  29158. - along with this program; if not, write to the Free Software
  29159. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  29160. - 02110-1301 USA
  29161. -
  29162. - */
  29163. -
  29164. -/*
  29165. -
  29166. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  29167. -
  29168. - */
  29169. -
  29170. -#ifndef IM_VIPS
  29171. -#define IM_VIPS
  29172. -
  29173. -#include <vips/version.h>
  29174. -
  29175. -// VImage.h uses GValue for metadata
  29176. -#include <glib-object.h>
  29177. -
  29178. -// If we have already #included the C vips headers, we have to undef a load of
  29179. -// stuff to stop vips's stupid macros messing up our enums
  29180. -#ifdef IM_VIPS_H
  29181. -#ifdef IM_ENABLE_DEPRECATED
  29182. -
  29183. -#undef MULTIBAND
  29184. -#undef B_W
  29185. -#undef LUMINACE
  29186. -#undef XRAY
  29187. -#undef IR
  29188. -#undef YUV
  29189. -#undef RED_ONLY
  29190. -#undef GREEN_ONLY
  29191. -#undef BLUE_ONLY
  29192. -#undef POWER_SPECTRUM
  29193. -#undef HISTOGRAM
  29194. -
  29195. -#undef LUT
  29196. -#undef XYZ
  29197. -#undef LAB
  29198. -#undef CMC
  29199. -#undef CMYK
  29200. -#undef LABQ
  29201. -#undef RGB
  29202. -#undef UCS
  29203. -#undef LCH
  29204. -#undef LABS
  29205. -#undef sRGB
  29206. -
  29207. -#undef FMTNOTSET
  29208. -#undef FMTUCHAR
  29209. -#undef FMTCHAR
  29210. -#undef FMTUSHORT
  29211. -#undef FMTSHORT
  29212. -#undef FMTUINT
  29213. -#undef FMTINT
  29214. -#undef FMTFLOAT
  29215. -#undef FMTCOMPLEX
  29216. -#undef FMTDOUBLE
  29217. -#undef FMTDPCOMPLEX
  29218. -
  29219. -#undef NOCODING
  29220. -#undef COLQUANT
  29221. -#undef LABPACK
  29222. -#undef LABPACK_COMPRESSED
  29223. -#undef RGB_COMPRESSED
  29224. -#undef LUM_COMPRESSED
  29225. -
  29226. -#undef NO_COMPRESSION
  29227. -#undef TCSF_COMPRESSION
  29228. -#undef JPEG_COMPRESSION
  29229. -
  29230. -#endif /*IM_ENABLE_DEPRECATED*/
  29231. -#endif /*IM_VIPS_H*/
  29232. -
  29233. -#ifdef IM_RECT_H
  29234. -#ifdef IM_ENABLE_DEPRECATED
  29235. -
  29236. -#undef right
  29237. -#undef bottom
  29238. -
  29239. -#endif /*IM_ENABLE_DEPRECATED*/
  29240. -#endif /*IM_RECT_H*/
  29241. -
  29242. -#define VIPS_NAMESPACE_START namespace vips {
  29243. -#define VIPS_NAMESPACE_END }
  29244. -
  29245. -#include <vips/VError.h>
  29246. -#include <vips/VDisplay.h>
  29247. -#include <vips/VMask.h>
  29248. -#include <vips/VImage.h>
  29249. -
  29250. -#endif /*IM_VIPS*/
  29251. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vipsc++.h vips-7.38.5/libvipsCC/include/vips/vipsc++.h
  29252. --- vips-7.38.5-vanilla/libvipsCC/include/vips/vipsc++.h 2014-07-17 23:48:36.237794473 -0400
  29253. +++ vips-7.38.5/libvipsCC/include/vips/vipsc++.h 1969-12-31 19:00:00.000000000 -0500
  29254. @@ -1,418 +0,0 @@
  29255. -
  29256. -// headers for package arithmetic
  29257. -// this file automatically generated from
  29258. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29259. -VImage abs() throw( VError );
  29260. -VImage acos() throw( VError );
  29261. -VImage add( VImage add_in2 ) throw( VError );
  29262. -VImage asin() throw( VError );
  29263. -VImage atan() throw( VError );
  29264. -double avg() throw( VError );
  29265. -double point( char* point_interpolate, double point_x, double point_y, int point_band ) throw( VError );
  29266. -double point_bilinear( double point_bilinear_x, double point_bilinear_y, int point_bilinear_band ) throw( VError );
  29267. -VImage bandmean() throw( VError );
  29268. -VImage ceil() throw( VError );
  29269. -VImage cos() throw( VError );
  29270. -VImage cross_phase( VImage cross_phase_in2 ) throw( VError );
  29271. -double deviate() throw( VError );
  29272. -VImage divide( VImage divide_in2 ) throw( VError );
  29273. -VImage exp10() throw( VError );
  29274. -VImage expn( double expn_x ) throw( VError );
  29275. -VImage expn( std::vector<double> expn_v ) throw( VError );
  29276. -VImage exp() throw( VError );
  29277. -VImage floor() throw( VError );
  29278. -VImage invert() throw( VError );
  29279. -VImage lin( double lin_a, double lin_b ) throw( VError );
  29280. -static VImage linreg( std::vector<VImage> linreg_ins, std::vector<double> linreg_xs ) throw( VError );
  29281. -VImage lin( std::vector<double> lin_a, std::vector<double> lin_b ) throw( VError );
  29282. -VImage log10() throw( VError );
  29283. -VImage log() throw( VError );
  29284. -double max() throw( VError );
  29285. -std::complex<double> maxpos() throw( VError );
  29286. -double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out ) throw( VError );
  29287. -VDMask measure( int measure_x, int measure_y, int measure_w, int measure_h, int measure_h_patches, int measure_v_patches ) throw( VError );
  29288. -double min() throw( VError );
  29289. -std::complex<double> minpos() throw( VError );
  29290. -VImage multiply( VImage multiply_in2 ) throw( VError );
  29291. -VImage pow( double pow_x ) throw( VError );
  29292. -VImage pow( std::vector<double> pow_v ) throw( VError );
  29293. -VImage recomb( VDMask recomb_matrix ) throw( VError );
  29294. -VImage remainder( VImage remainder_in2 ) throw( VError );
  29295. -VImage remainder( double remainder_x ) throw( VError );
  29296. -VImage remainder( std::vector<double> remainder_x ) throw( VError );
  29297. -VImage rint() throw( VError );
  29298. -VImage sign() throw( VError );
  29299. -VImage sin() throw( VError );
  29300. -VDMask stats() throw( VError );
  29301. -VImage subtract( VImage subtract_in2 ) throw( VError );
  29302. -VImage tan() throw( VError );
  29303. -
  29304. -// headers for package cimg
  29305. -// this file automatically generated from
  29306. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29307. -VImage greyc( int greyc_iterations, double greyc_amplitude, double greyc_sharpness, double greyc_anisotropy, double greyc_alpha, double greyc_sigma, double greyc_dl, double greyc_da, double greyc_gauss_prec, int greyc_interpolation, int greyc_fast_approx ) throw( VError );
  29308. -VImage greyc_mask( VImage greyc_mask_mask, int greyc_mask_iterations, double greyc_mask_amplitude, double greyc_mask_sharpness, double greyc_mask_anisotropy, double greyc_mask_alpha, double greyc_mask_sigma, double greyc_mask_dl, double greyc_mask_da, double greyc_mask_gauss_prec, int greyc_mask_interpolation, int greyc_mask_fast_approx ) throw( VError );
  29309. -
  29310. -// headers for package colour
  29311. -// this file automatically generated from
  29312. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29313. -VImage LCh2Lab() throw( VError );
  29314. -VImage LCh2UCS() throw( VError );
  29315. -VImage Lab2LCh() throw( VError );
  29316. -VImage Lab2LabQ() throw( VError );
  29317. -VImage Lab2LabS() throw( VError );
  29318. -VImage Lab2UCS() throw( VError );
  29319. -VImage Lab2XYZ() throw( VError );
  29320. -VImage Lab2XYZ_temp( double Lab2XYZ_temp_X0, double Lab2XYZ_temp_Y0, double Lab2XYZ_temp_Z0 ) throw( VError );
  29321. -VImage Lab2disp( VDisplay Lab2disp_disp ) throw( VError );
  29322. -VImage LabQ2LabS() throw( VError );
  29323. -VImage LabQ2Lab() throw( VError );
  29324. -VImage LabQ2XYZ() throw( VError );
  29325. -VImage LabQ2disp( VDisplay LabQ2disp_disp ) throw( VError );
  29326. -VImage LabS2LabQ() throw( VError );
  29327. -VImage LabS2Lab() throw( VError );
  29328. -VImage UCS2LCh() throw( VError );
  29329. -VImage UCS2Lab() throw( VError );
  29330. -VImage UCS2XYZ() throw( VError );
  29331. -VImage XYZ2Lab() throw( VError );
  29332. -VImage XYZ2Lab_temp( double XYZ2Lab_temp_X0, double XYZ2Lab_temp_Y0, double XYZ2Lab_temp_Z0 ) throw( VError );
  29333. -VImage XYZ2UCS() throw( VError );
  29334. -VImage XYZ2Yxy() throw( VError );
  29335. -VImage XYZ2disp( VDisplay XYZ2disp_disp ) throw( VError );
  29336. -VImage XYZ2sRGB() throw( VError );
  29337. -VImage Yxy2XYZ() throw( VError );
  29338. -VImage dE00_fromLab( VImage dE00_fromLab_in2 ) throw( VError );
  29339. -VImage dECMC_fromLab( VImage dECMC_fromLab_in2 ) throw( VError );
  29340. -VImage dECMC_fromdisp( VImage dECMC_fromdisp_in2, VDisplay dECMC_fromdisp_disp ) throw( VError );
  29341. -VImage dE_fromLab( VImage dE_fromLab_in2 ) throw( VError );
  29342. -VImage dE_fromXYZ( VImage dE_fromXYZ_in2 ) throw( VError );
  29343. -VImage dE_fromdisp( VImage dE_fromdisp_in2, VDisplay dE_fromdisp_disp ) throw( VError );
  29344. -VImage disp2Lab( VDisplay disp2Lab_disp ) throw( VError );
  29345. -VImage disp2XYZ( VDisplay disp2XYZ_disp ) throw( VError );
  29346. -VImage float2rad() throw( VError );
  29347. -VImage icc_ac2rc( char* icc_ac2rc_profile ) throw( VError );
  29348. -VImage icc_export_depth( int icc_export_depth_depth, char* icc_export_depth_output_profile, int icc_export_depth_intent ) throw( VError );
  29349. -VImage icc_import( char* icc_import_input_profile, int icc_import_intent ) throw( VError );
  29350. -VImage icc_import_embedded( int icc_import_embedded_intent ) throw( VError );
  29351. -VImage icc_transform( char* icc_transform_input_profile, char* icc_transform_output_profile, int icc_transform_intent ) throw( VError );
  29352. -VImage lab_morph( VDMask lab_morph_greyscale, double lab_morph_L_offset, double lab_morph_L_scale, double lab_morph_a_scale, double lab_morph_b_scale ) throw( VError );
  29353. -VImage rad2float() throw( VError );
  29354. -VImage sRGB2XYZ() throw( VError );
  29355. -
  29356. -// headers for package conversion
  29357. -// this file automatically generated from
  29358. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29359. -static VImage gaussnoise( int gaussnoise_xsize, int gaussnoise_ysize, double gaussnoise_mean, double gaussnoise_sigma ) throw( VError );
  29360. -VImage bandjoin( VImage bandjoin_in2 ) throw( VError );
  29361. -static VImage black( int black_x_size, int black_y_size, int black_bands ) throw( VError );
  29362. -VImage c2amph() throw( VError );
  29363. -VImage c2imag() throw( VError );
  29364. -VImage c2real() throw( VError );
  29365. -VImage c2rect() throw( VError );
  29366. -VImage clip2fmt( int clip2fmt_ofmt ) throw( VError );
  29367. -VImage copy() throw( VError );
  29368. -VImage copy_file() throw( VError );
  29369. -VImage copy_morph( int copy_morph_Bands, int copy_morph_BandFmt, int copy_morph_Coding ) throw( VError );
  29370. -VImage copy_swap() throw( VError );
  29371. -VImage copy_set( int copy_set_Type, double copy_set_Xres, double copy_set_Yres, int copy_set_Xoffset, int copy_set_Yoffset ) throw( VError );
  29372. -VImage extract_area( int extract_area_left, int extract_area_top, int extract_area_width, int extract_area_height ) throw( VError );
  29373. -VImage extract_areabands( int extract_areabands_left, int extract_areabands_top, int extract_areabands_width, int extract_areabands_height, int extract_areabands_band, int extract_areabands_nbands ) throw( VError );
  29374. -VImage extract_band( int extract_band_band ) throw( VError );
  29375. -VImage extract_bands( int extract_bands_band, int extract_bands_nbands ) throw( VError );
  29376. -VImage extract( int extract_left, int extract_top, int extract_width, int extract_height, int extract_band ) throw( VError );
  29377. -VImage falsecolour() throw( VError );
  29378. -VImage fliphor() throw( VError );
  29379. -VImage flipver() throw( VError );
  29380. -static VImage gbandjoin( std::vector<VImage> gbandjoin_in ) throw( VError );
  29381. -VImage grid( int grid_tile_height, int grid_across, int grid_down ) throw( VError );
  29382. -VImage insert( VImage insert_sub, int insert_x, int insert_y ) throw( VError );
  29383. -VImage insert( VImage insert_sub, std::vector<int> insert_x, std::vector<int> insert_y ) throw( VError );
  29384. -VImage insert_noexpand( VImage insert_noexpand_sub, int insert_noexpand_x, int insert_noexpand_y ) throw( VError );
  29385. -VImage embed( int embed_type, int embed_x, int embed_y, int embed_width, int embed_height ) throw( VError );
  29386. -VImage lrjoin( VImage lrjoin_in2 ) throw( VError );
  29387. -VImage msb() throw( VError );
  29388. -VImage msb_band( int msb_band_band ) throw( VError );
  29389. -VImage replicate( int replicate_across, int replicate_down ) throw( VError );
  29390. -VImage ri2c( VImage ri2c_in2 ) throw( VError );
  29391. -VImage rot180() throw( VError );
  29392. -VImage rot270() throw( VError );
  29393. -VImage rot90() throw( VError );
  29394. -VImage scale() throw( VError );
  29395. -VImage scaleps() throw( VError );
  29396. -VImage subsample( int subsample_xshrink, int subsample_yshrink ) throw( VError );
  29397. -char* system( char* system_command ) throw( VError );
  29398. -VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log ) throw( VError );
  29399. -VImage tbjoin( VImage tbjoin_in2 ) throw( VError );
  29400. -static VImage text( char* text_text, char* text_font, int text_width, int text_alignment, int text_dpi ) throw( VError );
  29401. -VImage wrap( int wrap_x, int wrap_y ) throw( VError );
  29402. -VImage zoom( int zoom_xfac, int zoom_yfac ) throw( VError );
  29403. -
  29404. -// headers for package convolution
  29405. -// this file automatically generated from
  29406. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29407. -VImage aconvsep( VDMask aconvsep_matrix, int aconvsep_n_layers ) throw( VError );
  29408. -VImage aconv( VDMask aconv_matrix, int aconv_n_layers, int aconv_cluster ) throw( VError );
  29409. -VImage addgnoise( double addgnoise_sigma ) throw( VError );
  29410. -VImage compass( VIMask compass_matrix ) throw( VError );
  29411. -VImage contrast_surface( int contrast_surface_half_win_size, int contrast_surface_spacing ) throw( VError );
  29412. -VImage conv( VIMask conv_matrix ) throw( VError );
  29413. -VImage conv( VDMask conv_matrix ) throw( VError );
  29414. -VImage convsep( VIMask convsep_matrix ) throw( VError );
  29415. -VImage convsep( VDMask convsep_matrix ) throw( VError );
  29416. -VImage fastcor( VImage fastcor_in2 ) throw( VError );
  29417. -VImage gradcor( VImage gradcor_in2 ) throw( VError );
  29418. -VImage gradient( VIMask gradient_matrix ) throw( VError );
  29419. -VImage grad_x() throw( VError );
  29420. -VImage grad_y() throw( VError );
  29421. -VImage lindetect( VIMask lindetect_matrix ) throw( VError );
  29422. -VImage sharpen( int sharpen_mask_size, double sharpen_x1, double sharpen_y2, double sharpen_y3, double sharpen_m1, double sharpen_m2 ) throw( VError );
  29423. -VImage spcor( VImage spcor_in2 ) throw( VError );
  29424. -
  29425. -// headers for package deprecated
  29426. -// this file automatically generated from
  29427. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29428. -VImage argb2rgba() throw( VError );
  29429. -VImage flood_copy( int flood_copy_start_x, int flood_copy_start_y, std::vector<double> flood_copy_ink ) throw( VError );
  29430. -VImage flood_blob_copy( int flood_blob_copy_start_x, int flood_blob_copy_start_y, std::vector<double> flood_blob_copy_ink ) throw( VError );
  29431. -VImage flood_other_copy( VImage flood_other_copy_mark, int flood_other_copy_start_x, int flood_other_copy_start_y, int flood_other_copy_serial ) throw( VError );
  29432. -VImage clip() throw( VError );
  29433. -VImage c2ps() throw( VError );
  29434. -VImage resize_linear( int resize_linear_X, int resize_linear_Y ) throw( VError );
  29435. -VImage cmulnorm( VImage cmulnorm_in2 ) throw( VError );
  29436. -VImage fav4( VImage fav4_in2, VImage fav4_in3, VImage fav4_in4 ) throw( VError );
  29437. -VImage gadd( double gadd_a, double gadd_b, VImage gadd_in2, double gadd_c ) throw( VError );
  29438. -VImage icc_export( char* icc_export_output_profile, int icc_export_intent ) throw( VError );
  29439. -VImage litecor( VImage litecor_white, int litecor_clip, double litecor_factor ) throw( VError );
  29440. -VImage affine( double affine_a, double affine_b, double affine_c, double affine_d, double affine_dx, double affine_dy, int affine_x, int affine_y, int affine_w, int affine_h ) throw( VError );
  29441. -VImage clip2c() throw( VError );
  29442. -VImage clip2cm() throw( VError );
  29443. -VImage clip2d() throw( VError );
  29444. -VImage clip2dcm() throw( VError );
  29445. -VImage clip2f() throw( VError );
  29446. -VImage clip2i() throw( VError );
  29447. -VImage convsub( VIMask convsub_matrix, int convsub_xskip, int convsub_yskip ) throw( VError );
  29448. -VImage convf( VDMask convf_matrix ) throw( VError );
  29449. -VImage convsepf( VDMask convsepf_matrix ) throw( VError );
  29450. -VImage clip2s() throw( VError );
  29451. -VImage clip2ui() throw( VError );
  29452. -VImage insertplace( VImage insertplace_sub, std::vector<int> insertplace_x, std::vector<int> insertplace_y ) throw( VError );
  29453. -VImage clip2us() throw( VError );
  29454. -VImage slice( double slice_thresh1, double slice_thresh2 ) throw( VError );
  29455. -VImage segment( int& segment_segments ) throw( VError );
  29456. -void line( int line_x1, int line_y1, int line_x2, int line_y2, int line_pelval ) throw( VError );
  29457. -VImage thresh( double thresh_threshold ) throw( VError );
  29458. -VImage convf_raw( VDMask convf_raw_matrix ) throw( VError );
  29459. -VImage conv_raw( VIMask conv_raw_matrix ) throw( VError );
  29460. -VImage contrast_surface_raw( int contrast_surface_raw_half_win_size, int contrast_surface_raw_spacing ) throw( VError );
  29461. -VImage convsepf_raw( VDMask convsepf_raw_matrix ) throw( VError );
  29462. -VImage convsep_raw( VIMask convsep_raw_matrix ) throw( VError );
  29463. -VImage fastcor_raw( VImage fastcor_raw_in2 ) throw( VError );
  29464. -VImage gradcor_raw( VImage gradcor_raw_in2 ) throw( VError );
  29465. -VImage spcor_raw( VImage spcor_raw_in2 ) throw( VError );
  29466. -VImage lhisteq_raw( int lhisteq_raw_width, int lhisteq_raw_height ) throw( VError );
  29467. -VImage stdif_raw( double stdif_raw_a, double stdif_raw_m0, double stdif_raw_b, double stdif_raw_s0, int stdif_raw_xw, int stdif_raw_yw ) throw( VError );
  29468. -VImage rank_raw( int rank_raw_xsize, int rank_raw_ysize, int rank_raw_n ) throw( VError );
  29469. -VImage dilate_raw( VIMask dilate_raw_mask ) throw( VError );
  29470. -VImage erode_raw( VIMask erode_raw_mask ) throw( VError );
  29471. -VImage similarity_area( double similarity_area_a, double similarity_area_b, double similarity_area_dx, double similarity_area_dy, int similarity_area_x, int similarity_area_y, int similarity_area_w, int similarity_area_h ) throw( VError );
  29472. -VImage similarity( double similarity_a, double similarity_b, double similarity_dx, double similarity_dy ) throw( VError );
  29473. -static VImage mask2vips( VDMask mask2vips_input ) throw( VError );
  29474. -VDMask vips2mask() throw( VError );
  29475. -void insertplace( VImage insertplace_sub, int insertplace_x, int insertplace_y ) throw( VError );
  29476. -void circle( int circle_cx, int circle_cy, int circle_radius, int circle_intensity ) throw( VError );
  29477. -VImage andimage( VImage andimage_in2 ) throw( VError );
  29478. -VImage andimage( int andimage_c ) throw( VError );
  29479. -VImage andimage( std::vector<double> andimage_vec ) throw( VError );
  29480. -VImage orimage( VImage orimage_in2 ) throw( VError );
  29481. -VImage orimage( int orimage_c ) throw( VError );
  29482. -VImage orimage( std::vector<double> orimage_vec ) throw( VError );
  29483. -VImage eorimage( VImage eorimage_in2 ) throw( VError );
  29484. -VImage eorimage( int eorimage_c ) throw( VError );
  29485. -VImage eorimage( std::vector<double> eorimage_vec ) throw( VError );
  29486. -VImage shiftleft( std::vector<double> shiftleft_vec ) throw( VError );
  29487. -VImage shiftleft( int shiftleft_c ) throw( VError );
  29488. -VImage shiftright( std::vector<double> shiftright_vec ) throw( VError );
  29489. -VImage shiftright( int shiftright_c ) throw( VError );
  29490. -VImage blend( VImage blend_in1, VImage blend_in2 ) throw( VError );
  29491. -VImage equal( VImage equal_in2 ) throw( VError );
  29492. -VImage equal( std::vector<double> equal_vec ) throw( VError );
  29493. -VImage equal( double equal_c ) throw( VError );
  29494. -VImage ifthenelse( VImage ifthenelse_in1, VImage ifthenelse_in2 ) throw( VError );
  29495. -VImage less( VImage less_in2 ) throw( VError );
  29496. -VImage less( std::vector<double> less_vec ) throw( VError );
  29497. -VImage less( double less_c ) throw( VError );
  29498. -VImage lesseq( VImage lesseq_in2 ) throw( VError );
  29499. -VImage lesseq( std::vector<double> lesseq_vec ) throw( VError );
  29500. -VImage lesseq( double lesseq_c ) throw( VError );
  29501. -VImage more( VImage more_in2 ) throw( VError );
  29502. -VImage more( std::vector<double> more_vec ) throw( VError );
  29503. -VImage more( double more_c ) throw( VError );
  29504. -VImage moreeq( VImage moreeq_in2 ) throw( VError );
  29505. -VImage moreeq( std::vector<double> moreeq_vec ) throw( VError );
  29506. -VImage moreeq( double moreeq_c ) throw( VError );
  29507. -VImage notequal( VImage notequal_in2 ) throw( VError );
  29508. -VImage notequal( std::vector<double> notequal_vec ) throw( VError );
  29509. -VImage notequal( double notequal_c ) throw( VError );
  29510. -VImage quadratic( VImage quadratic_coeff ) throw( VError );
  29511. -
  29512. -// headers for package format
  29513. -// this file automatically generated from
  29514. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29515. -static VImage csv2vips( char* csv2vips_filename ) throw( VError );
  29516. -static VImage fits2vips( char* fits2vips_in ) throw( VError );
  29517. -static VImage jpeg2vips( char* jpeg2vips_in ) throw( VError );
  29518. -static VImage magick2vips( char* magick2vips_in ) throw( VError );
  29519. -static VImage png2vips( char* png2vips_in ) throw( VError );
  29520. -static VImage exr2vips( char* exr2vips_in ) throw( VError );
  29521. -static VImage ppm2vips( char* ppm2vips_filename ) throw( VError );
  29522. -static VImage analyze2vips( char* analyze2vips_filename ) throw( VError );
  29523. -static VImage tiff2vips( char* tiff2vips_in ) throw( VError );
  29524. -void vips2csv( char* vips2csv_filename ) throw( VError );
  29525. -void vips2dz( char* vips2dz_out ) throw( VError );
  29526. -void vips2jpeg( char* vips2jpeg_out ) throw( VError );
  29527. -void vips2mimejpeg( int vips2mimejpeg_qfac ) throw( VError );
  29528. -void vips2png( char* vips2png_out ) throw( VError );
  29529. -void vips2ppm( char* vips2ppm_filename ) throw( VError );
  29530. -void vips2tiff( char* vips2tiff_out ) throw( VError );
  29531. -
  29532. -// headers for package freq_filt
  29533. -// this file automatically generated from
  29534. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29535. -static VImage create_fmask( int create_fmask_width, int create_fmask_height, int create_fmask_type, double create_fmask_p1, double create_fmask_p2, double create_fmask_p3, double create_fmask_p4, double create_fmask_p5 ) throw( VError );
  29536. -VImage disp_ps() throw( VError );
  29537. -VImage flt_image_freq( int flt_image_freq_type, double flt_image_freq_p1, double flt_image_freq_p2, double flt_image_freq_p3, double flt_image_freq_p4, double flt_image_freq_p5 ) throw( VError );
  29538. -static VImage fractsurf( int fractsurf_size, double fractsurf_dimension ) throw( VError );
  29539. -VImage freqflt( VImage freqflt_mask ) throw( VError );
  29540. -VImage fwfft() throw( VError );
  29541. -VImage rotquad() throw( VError );
  29542. -VImage invfft() throw( VError );
  29543. -VImage phasecor_fft( VImage phasecor_fft_in2 ) throw( VError );
  29544. -VImage invfftr() throw( VError );
  29545. -
  29546. -// headers for package histograms_lut
  29547. -// this file automatically generated from
  29548. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29549. -VImage gammacorrect( double gammacorrect_exponent ) throw( VError );
  29550. -VImage heq( int heq_band_number ) throw( VError );
  29551. -VImage hist( int hist_band_number ) throw( VError );
  29552. -VImage histcum() throw( VError );
  29553. -VImage histeq() throw( VError );
  29554. -VImage hist_indexed( VImage hist_indexed_value ) throw( VError );
  29555. -VImage histgr( int histgr_band_number ) throw( VError );
  29556. -VImage histnD( int histnD_bins ) throw( VError );
  29557. -VImage histnorm() throw( VError );
  29558. -VImage histplot() throw( VError );
  29559. -VImage histspec( VImage histspec_ref ) throw( VError );
  29560. -VImage hsp( VImage hsp_ref ) throw( VError );
  29561. -static VImage identity( int identity_nbands ) throw( VError );
  29562. -static VImage identity_ushort( int identity_ushort_nbands, int identity_ushort_size ) throw( VError );
  29563. -int ismonotonic() throw( VError );
  29564. -VImage lhisteq( int lhisteq_width, int lhisteq_height ) throw( VError );
  29565. -int mpercent( double mpercent_percent ) throw( VError );
  29566. -static VImage invertlut( VDMask invertlut_measures, int invertlut_lut_size ) throw( VError );
  29567. -static VImage buildlut( VDMask buildlut_xyes ) throw( VError );
  29568. -VImage maplut( VImage maplut_lut ) throw( VError );
  29569. -VImage project( VImage& project_vout ) throw( VError );
  29570. -VImage stdif( double stdif_a, double stdif_m0, double stdif_b, double stdif_s0, int stdif_xw, int stdif_yw ) throw( VError );
  29571. -VImage tone_analyse( double tone_analyse_Ps, double tone_analyse_Pm, double tone_analyse_Ph, double tone_analyse_S, double tone_analyse_M, double tone_analyse_H ) throw( VError );
  29572. -static VImage tone_build( double tone_build_Lb, double tone_build_Lw, double tone_build_Ps, double tone_build_Pm, double tone_build_Ph, double tone_build_S, double tone_build_M, double tone_build_H ) throw( VError );
  29573. -static VImage tone_build_range( int tone_build_range_in_max, int tone_build_range_out_max, double tone_build_range_Lb, double tone_build_range_Lw, double tone_build_range_Ps, double tone_build_range_Pm, double tone_build_range_Ph, double tone_build_range_S, double tone_build_range_M, double tone_build_range_H ) throw( VError );
  29574. -VImage tone_map( VImage tone_map_lut ) throw( VError );
  29575. -
  29576. -// headers for package inplace
  29577. -// this file automatically generated from
  29578. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29579. -void draw_circle( int draw_circle_cx, int draw_circle_cy, int draw_circle_radius, int draw_circle_fill, std::vector<double> draw_circle_ink ) throw( VError );
  29580. -void draw_rect( int draw_rect_left, int draw_rect_top, int draw_rect_width, int draw_rect_height, int draw_rect_fill, std::vector<double> draw_rect_ink ) throw( VError );
  29581. -void draw_line( int draw_line_x1, int draw_line_y1, int draw_line_x2, int draw_line_y2, std::vector<double> draw_line_ink ) throw( VError );
  29582. -void draw_point( int draw_point_x, int draw_point_y, std::vector<double> draw_point_ink ) throw( VError );
  29583. -void draw_smudge( int draw_smudge_left, int draw_smudge_top, int draw_smudge_width, int draw_smudge_height ) throw( VError );
  29584. -void draw_flood( int draw_flood_x, int draw_flood_y, std::vector<double> draw_flood_ink ) throw( VError );
  29585. -void draw_flood_blob( int draw_flood_blob_x, int draw_flood_blob_y, std::vector<double> draw_flood_blob_ink ) throw( VError );
  29586. -void draw_flood_other( VImage draw_flood_other_test, int draw_flood_other_x, int draw_flood_other_y, int draw_flood_other_serial ) throw( VError );
  29587. -void draw_image( VImage draw_image_sub, int draw_image_x, int draw_image_y ) throw( VError );
  29588. -void draw_mask( VImage draw_mask_mask, int draw_mask_x, int draw_mask_y, std::vector<double> draw_mask_ink ) throw( VError );
  29589. -VImage line( VImage line_mask, VImage line_ink, std::vector<int> line_x1, std::vector<int> line_y1, std::vector<int> line_x2, std::vector<int> line_y2 ) throw( VError );
  29590. -
  29591. -// headers for package iofuncs
  29592. -// this file automatically generated from
  29593. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29594. -static VImage binfile( char* binfile_filename, int binfile_width, int binfile_height, int binfile_bands, int binfile_offset ) throw( VError );
  29595. -VImage cache( int cache_tile_width, int cache_tile_height, int cache_max_tiles ) throw( VError );
  29596. -char* getext() throw( VError );
  29597. -int header_get_typeof( char* header_get_typeof_field ) throw( VError );
  29598. -int header_int( char* header_int_field ) throw( VError );
  29599. -double header_double( char* header_double_field ) throw( VError );
  29600. -char* header_string( char* header_string_field ) throw( VError );
  29601. -char* history_get() throw( VError );
  29602. -void printdesc() throw( VError );
  29603. -
  29604. -// headers for package mask
  29605. -// this file automatically generated from
  29606. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29607. -
  29608. -// headers for package morphology
  29609. -// this file automatically generated from
  29610. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29611. -double cntlines( int cntlines_direction ) throw( VError );
  29612. -VImage dilate( VIMask dilate_mask ) throw( VError );
  29613. -VImage rank( int rank_xsize, int rank_ysize, int rank_n ) throw( VError );
  29614. -static VImage rank_image( std::vector<VImage> rank_image_in, int rank_image_index ) throw( VError );
  29615. -static VImage maxvalue( std::vector<VImage> maxvalue_in ) throw( VError );
  29616. -VImage label_regions( int& label_regions_segments ) throw( VError );
  29617. -VImage zerox( int zerox_flag ) throw( VError );
  29618. -VImage erode( VIMask erode_mask ) throw( VError );
  29619. -VImage profile( int profile_direction ) throw( VError );
  29620. -
  29621. -// headers for package mosaicing
  29622. -// this file automatically generated from
  29623. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29624. -VImage align_bands() throw( VError );
  29625. -double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y ) throw( VError );
  29626. -int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 ) throw( VError );
  29627. -int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 ) throw( VError );
  29628. -VImage global_balance( double global_balance_gamma ) throw( VError );
  29629. -VImage global_balancef( double global_balancef_gamma ) throw( VError );
  29630. -VImage lrmerge( VImage lrmerge_sec, int lrmerge_dx, int lrmerge_dy, int lrmerge_mwidth ) throw( VError );
  29631. -VImage lrmerge1( VImage lrmerge1_sec, int lrmerge1_xr1, int lrmerge1_yr1, int lrmerge1_xs1, int lrmerge1_ys1, int lrmerge1_xr2, int lrmerge1_yr2, int lrmerge1_xs2, int lrmerge1_ys2, int lrmerge1_mwidth ) throw( VError );
  29632. -VImage lrmosaic( VImage lrmosaic_sec, int lrmosaic_bandno, int lrmosaic_xr, int lrmosaic_yr, int lrmosaic_xs, int lrmosaic_ys, int lrmosaic_halfcorrelation, int lrmosaic_halfarea, int lrmosaic_balancetype, int lrmosaic_mwidth ) throw( VError );
  29633. -VImage lrmosaic1( VImage lrmosaic1_sec, int lrmosaic1_bandno, int lrmosaic1_xr1, int lrmosaic1_yr1, int lrmosaic1_xs1, int lrmosaic1_ys1, int lrmosaic1_xr2, int lrmosaic1_yr2, int lrmosaic1_xs2, int lrmosaic1_ys2, int lrmosaic1_halfcorrelation, int lrmosaic1_halfarea, int lrmosaic1_balancetype, int lrmosaic1_mwidth ) throw( VError );
  29634. -VImage match_linear( VImage match_linear_sec, int match_linear_xref1, int match_linear_yref1, int match_linear_xsec1, int match_linear_ysec1, int match_linear_xref2, int match_linear_yref2, int match_linear_xsec2, int match_linear_ysec2 ) throw( VError );
  29635. -VImage match_linear_search( VImage match_linear_search_sec, int match_linear_search_xref1, int match_linear_search_yref1, int match_linear_search_xsec1, int match_linear_search_ysec1, int match_linear_search_xref2, int match_linear_search_yref2, int match_linear_search_xsec2, int match_linear_search_ysec2, int match_linear_search_hwindowsize, int match_linear_search_hsearchsize ) throw( VError );
  29636. -double maxpos_subpel( double& maxpos_subpel_y ) throw( VError );
  29637. -VImage remosaic( char* remosaic_old_str, char* remosaic_new_str ) throw( VError );
  29638. -VImage tbmerge( VImage tbmerge_sec, int tbmerge_dx, int tbmerge_dy, int tbmerge_mwidth ) throw( VError );
  29639. -VImage tbmerge1( VImage tbmerge1_sec, int tbmerge1_xr1, int tbmerge1_yr1, int tbmerge1_xs1, int tbmerge1_ys1, int tbmerge1_xr2, int tbmerge1_yr2, int tbmerge1_xs2, int tbmerge1_ys2, int tbmerge1_mwidth ) throw( VError );
  29640. -VImage tbmosaic( VImage tbmosaic_sec, int tbmosaic_bandno, int tbmosaic_xr, int tbmosaic_yr, int tbmosaic_xs, int tbmosaic_ys, int tbmosaic_halfcorrelation, int tbmosaic_halfarea, int tbmosaic_balancetype, int tbmosaic_mwidth ) throw( VError );
  29641. -VImage tbmosaic1( VImage tbmosaic1_sec, int tbmosaic1_bandno, int tbmosaic1_xr1, int tbmosaic1_yr1, int tbmosaic1_xs1, int tbmosaic1_ys1, int tbmosaic1_xr2, int tbmosaic1_yr2, int tbmosaic1_xs2, int tbmosaic1_ys2, int tbmosaic1_halfcorrelation, int tbmosaic1_halfarea, int tbmosaic1_balancetype, int tbmosaic1_mwidth ) throw( VError );
  29642. -
  29643. -// headers for package other
  29644. -// this file automatically generated from
  29645. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29646. -VImage benchmark() throw( VError );
  29647. -double benchmark2() throw( VError );
  29648. -VImage benchmarkn( int benchmarkn_n ) throw( VError );
  29649. -static VImage eye( int eye_xsize, int eye_ysize, double eye_factor ) throw( VError );
  29650. -static VImage grey( int grey_xsize, int grey_ysize ) throw( VError );
  29651. -static VImage feye( int feye_xsize, int feye_ysize, double feye_factor ) throw( VError );
  29652. -static VImage fgrey( int fgrey_xsize, int fgrey_ysize ) throw( VError );
  29653. -static VImage fzone( int fzone_size ) throw( VError );
  29654. -static VImage make_xy( int make_xy_xsize, int make_xy_ysize ) throw( VError );
  29655. -static VImage sines( int sines_xsize, int sines_ysize, double sines_horfreq, double sines_verfreq ) throw( VError );
  29656. -static VImage zone( int zone_size ) throw( VError );
  29657. -
  29658. -// headers for package resample
  29659. -// this file automatically generated from
  29660. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29661. -VImage rightshift_size( int rightshift_size_xshift, int rightshift_size_yshift, int rightshift_size_band_fmt ) throw( VError );
  29662. -VImage shrink( double shrink_xfac, double shrink_yfac ) throw( VError );
  29663. -VImage stretch3( double stretch3_xdisp, double stretch3_ydisp ) throw( VError );
  29664. -VImage affinei( char* affinei_interpolate, double affinei_a, double affinei_b, double affinei_c, double affinei_d, double affinei_dx, double affinei_dy, int affinei_x, int affinei_y, int affinei_w, int affinei_h ) throw( VError );
  29665. -VImage affinei_all( char* affinei_all_interpolate, double affinei_all_a, double affinei_all_b, double affinei_all_c, double affinei_all_d, double affinei_all_dx, double affinei_all_dy ) throw( VError );
  29666. -
  29667. -// headers for package video
  29668. -// this file automatically generated from
  29669. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  29670. -static VImage video_test( int video_test_brightness, int video_test_error ) throw( VError );
  29671. -static VImage video_v4l1( char* video_v4l1_device, int video_v4l1_channel, int video_v4l1_brightness, int video_v4l1_colour, int video_v4l1_contrast, int video_v4l1_hue, int video_v4l1_ngrabs ) throw( VError );
  29672. -
  29673. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/vipscpp.h vips-7.38.5/libvipsCC/include/vips/vipscpp.h
  29674. --- vips-7.38.5-vanilla/libvipsCC/include/vips/vipscpp.h 2014-07-17 23:48:36.237794473 -0400
  29675. +++ vips-7.38.5/libvipsCC/include/vips/vipscpp.h 1969-12-31 19:00:00.000000000 -0500
  29676. @@ -1,40 +0,0 @@
  29677. -// Include file to get all VIPS C++ bindings
  29678. -
  29679. -/*
  29680. -
  29681. - This file is part of VIPS.
  29682. -
  29683. - VIPS is free software; you can redistribute it and/or modify
  29684. - it under the terms of the GNU Lesser General Public License as published by
  29685. - the Free Software Foundation; either version 2 of the License, or
  29686. - (at your option) any later version.
  29687. -
  29688. - This program is distributed in the hope that it will be useful,
  29689. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  29690. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29691. - GNU Lesser General Public License for more details.
  29692. -
  29693. - You should have received a copy of the GNU Lesser General Public License
  29694. - along with this program; if not, write to the Free Software
  29695. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  29696. - 02110-1301 USA
  29697. -
  29698. - */
  29699. -
  29700. -/*
  29701. -
  29702. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  29703. -
  29704. - */
  29705. -
  29706. -/* This header is just for compatibility with the pre-namespace C++ bindings.
  29707. - */
  29708. -
  29709. -#ifndef IM_VIPSCPP_H
  29710. -#define IM_VIPSCPP_H
  29711. -
  29712. -#include <vips/vips>
  29713. -
  29714. -using namespace vips;
  29715. -
  29716. -#endif /*IM_VIPSCPP_H*/
  29717. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/include/vips/VMask.h vips-7.38.5/libvipsCC/include/vips/VMask.h
  29718. --- vips-7.38.5-vanilla/libvipsCC/include/vips/VMask.h 2014-07-17 23:48:36.237794473 -0400
  29719. +++ vips-7.38.5/libvipsCC/include/vips/VMask.h 1969-12-31 19:00:00.000000000 -0500
  29720. @@ -1,411 +0,0 @@
  29721. -/* VIPS mask class.
  29722. - *
  29723. - * Just like VImage, but we don't need dependency stuff. Instead, have a base
  29724. - * wrapper over *MASK, derive VMaskD and VMaskI from that, and then put
  29725. - * refcounting over all of them.
  29726. - */
  29727. -
  29728. -/*
  29729. -
  29730. - This file is part of VIPS.
  29731. -
  29732. - VIPS is free software; you can redistribute it and/or modify
  29733. - it under the terms of the GNU Lesser General Public License as published by
  29734. - the Free Software Foundation; either version 2 of the License, or
  29735. - (at your option) any later version.
  29736. -
  29737. - This program is distributed in the hope that it will be useful,
  29738. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  29739. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29740. - GNU Lesser General Public License for more details.
  29741. -
  29742. - You should have received a copy of the GNU Lesser General Public License
  29743. - along with this program; if not, write to the Free Software
  29744. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  29745. - 02110-1301 USA
  29746. -
  29747. - */
  29748. -
  29749. -/*
  29750. -
  29751. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  29752. -
  29753. - */
  29754. -
  29755. -#ifndef IM_VMASK_H
  29756. -#define IM_VMASK_H
  29757. -
  29758. -/* SWIG includes this file directly rather than going through vipscpp.h ... so
  29759. - * we have to define these macros here as well.
  29760. - */
  29761. -#ifdef SWIG
  29762. -# define VIPS_NAMESPACE_START namespace vips {
  29763. -# define VIPS_NAMESPACE_END }
  29764. -#endif /*SWIG*/
  29765. -
  29766. -/* Don't include these when parsing for SWIG.
  29767. - */
  29768. -#ifndef SWIG
  29769. -# include <cstdarg>
  29770. -# include <iosfwd>
  29771. -# include <vector>
  29772. -#endif /*!SWIG*/
  29773. -
  29774. -/* Wrap pointers to these, but we don't want to import all the old C API. Just
  29775. - * declare them.
  29776. - */
  29777. -extern "C" {
  29778. - struct im__INTMASK;
  29779. - struct im__DOUBLEMASK;
  29780. -}
  29781. -
  29782. -VIPS_NAMESPACE_START
  29783. -
  29784. -/* This first section is private. Only expose the non-P versions of these
  29785. - * classes later on. Don't need to wrap then in SWIG either.
  29786. - */
  29787. -#ifndef SWIG
  29788. -namespace _private_detail {
  29789. -
  29790. -union MASKUNION {
  29791. - im__INTMASK *iptr;
  29792. - im__DOUBLEMASK *dptr;
  29793. -};
  29794. -
  29795. -// Private wrapper over *MASK - user does not see this
  29796. -class VPMask {
  29797. - friend class VMask;
  29798. -
  29799. -public:
  29800. - // Track type of mask with this
  29801. - enum VMaskType {
  29802. - UNASSIGNED, // Not yet set
  29803. - INT, // mask points to INTMASK
  29804. - DOUBLE // mask points to DOUBLEMASK
  29805. - };
  29806. -
  29807. - MASKUNION data; // Mask pointer - INT or DOUBLE
  29808. - VMaskType type; // Track type too, for safety
  29809. -
  29810. - virtual ~VPMask() {};
  29811. -
  29812. - // Duplicate
  29813. - virtual VPMask *dup() const = 0;
  29814. -
  29815. - // Projection functions to get MASK fields
  29816. - virtual int xsize() const = 0;
  29817. - virtual int ysize() const = 0;
  29818. - virtual const char *filename() const = 0;
  29819. -
  29820. - // Output
  29821. - virtual void ostream_print( std::ostream & ) const = 0;
  29822. -};
  29823. -
  29824. -// Specialise for INTMASK
  29825. -class VPIMask : public VPMask {
  29826. -public:
  29827. - VPIMask( int xsize, int ysize ) throw( VError );
  29828. - VPIMask( int xsize, int ysize, int scale, int offset,
  29829. - std::vector<int> coeff ) throw( VError );
  29830. - VPIMask( const char * )
  29831. - throw( VError );
  29832. - VPIMask( im__INTMASK * );
  29833. - VPIMask();
  29834. - virtual ~VPIMask();
  29835. -
  29836. - VPMask *dup() const throw( VError );
  29837. - void embed( im__INTMASK * ) throw( VError );
  29838. -
  29839. - int xsize() const throw( VError );
  29840. - int ysize() const throw( VError );
  29841. - int scale() const throw( VError );
  29842. - int offset() const throw( VError );
  29843. - const char *filename() const throw( VError );
  29844. -
  29845. - // Output
  29846. - virtual void ostream_print( std::ostream & ) const throw( VError );
  29847. -
  29848. - // Extract start of array of ints
  29849. - int *array() const;
  29850. -};
  29851. -
  29852. -// Specialise for DOUBLEMASK
  29853. -class VPDMask : public VPMask {
  29854. -public:
  29855. - VPDMask( int xsize, int ysize ) throw( VError );
  29856. - VPDMask( int xsize, int ysize,
  29857. - double scale, double offset, std::vector<double> coeff )
  29858. - throw( VError );
  29859. - VPDMask( const char * ) throw( VError );
  29860. - VPDMask( im__DOUBLEMASK * );
  29861. - VPDMask();
  29862. - virtual ~VPDMask();
  29863. -
  29864. - VPMask *dup() const throw( VError );
  29865. - void embed( im__DOUBLEMASK * ) throw( VError );
  29866. -
  29867. - int xsize() const throw( VError );
  29868. - int ysize() const throw( VError );
  29869. - double scale() const throw( VError );
  29870. - double offset() const throw( VError );
  29871. - const char *filename() const throw( VError );
  29872. -
  29873. - // Output
  29874. - virtual void ostream_print( std::ostream & ) const throw( VError );
  29875. -
  29876. - // Extract start of array of doubles
  29877. - double *array() const;
  29878. -};
  29879. -
  29880. -} // end of namespace _private_detail
  29881. -
  29882. -inline std::ostream &operator<<( std::ostream &file,
  29883. - const _private_detail::VPMask &msk )
  29884. -{
  29885. - msk.ostream_print( file );
  29886. - return( file );
  29887. -}
  29888. -
  29889. -#endif /*!SWIG*/
  29890. -
  29891. -// Wrapper over VP?Mask with ref counting
  29892. -class VMask {
  29893. -protected:
  29894. - struct refblock {
  29895. - _private_detail::VPMask *pmask; // Mask: double or int
  29896. - int nrefs; // Refs to us
  29897. -
  29898. - refblock() : pmask(0), nrefs(1) {}
  29899. - virtual ~refblock() { delete pmask; }
  29900. - };
  29901. -
  29902. - refblock *ref;
  29903. -
  29904. - // Make sure this is a private copy of pmask --- dup if nrefs != 1
  29905. - void make_private();
  29906. -
  29907. -public:
  29908. - // Constructor leaves msk uninitialised
  29909. - VMask() { ref = new refblock; }
  29910. -
  29911. - // Copy constructor
  29912. - VMask( const VMask &a ) { ref = a.ref; ref->nrefs++; }
  29913. -
  29914. - // Assignment
  29915. - VMask &operator=( const VMask &a );
  29916. -
  29917. - // Destructor
  29918. - virtual ~VMask();
  29919. -
  29920. - int xsize() const throw( VError )
  29921. - { return( ref->pmask->xsize() ); }
  29922. - int ysize() const throw( VError )
  29923. - { return( ref->pmask->ysize() ); }
  29924. - int size() const throw( VError )
  29925. - { return( xsize() * ysize() ); }
  29926. - const char *filename() const throw( VError )
  29927. - { return( ref->pmask->filename() ); }
  29928. -
  29929. - // Extract underlying type
  29930. - _private_detail::VPMask::VMaskType type() const
  29931. - { return( ref->pmask->type ); }
  29932. -
  29933. - // Extract underlying VIPS pointer
  29934. - _private_detail::MASKUNION mask() const { return( ref->pmask->data ); }
  29935. -
  29936. - void ostream_print( std::ostream & ) const;
  29937. -};
  29938. -
  29939. -inline std::ostream &operator<<( std::ostream &file, const VMask &msk )
  29940. -{
  29941. - msk.ostream_print( file );
  29942. - return( file );
  29943. -}
  29944. -
  29945. -// Need to forward ref these
  29946. -class VDMask;
  29947. -class VImage;
  29948. -
  29949. -// Wrapper over _private_detail::VPIMask with ref counting
  29950. -class VIMask : public VMask {
  29951. -public:
  29952. - VIMask( int xsize, int ysize )
  29953. - {
  29954. - ref->pmask = new _private_detail::VPIMask( xsize, ysize );
  29955. - }
  29956. -
  29957. -/* Don't wrap the varargs constructor. We want Python to use the vector one.
  29958. - */
  29959. -#ifndef SWIG
  29960. - VIMask( int xsize, int ysize, int scale, int offset, ... )
  29961. - {
  29962. - va_list ap;
  29963. - int i;
  29964. - std::vector<int> coeff( xsize * ysize );
  29965. -
  29966. - va_start( ap, offset );
  29967. - for( i = 0; i < xsize * ysize; i++ )
  29968. - coeff[i] = va_arg( ap, int );
  29969. - va_end( ap );
  29970. -
  29971. - ref->pmask = new _private_detail::VPIMask( xsize, ysize,
  29972. - scale, offset, coeff );
  29973. - }
  29974. -#endif /*!SWIG*/
  29975. -
  29976. - VIMask( int xsize, int ysize, int scale, int offset,
  29977. - std::vector<int> coeff )
  29978. - {
  29979. - ref->pmask = new _private_detail::VPIMask( xsize, ysize,
  29980. - scale, offset, coeff );
  29981. - }
  29982. -
  29983. - VIMask( const char *name )
  29984. - {
  29985. - ref->pmask = new _private_detail::VPIMask( name );
  29986. - }
  29987. -
  29988. - // No mask there yet
  29989. - VIMask() {}
  29990. -
  29991. - int scale()
  29992. - {
  29993. - return( ((_private_detail::VPIMask *)ref->pmask)->scale() );
  29994. - }
  29995. -
  29996. - int offset()
  29997. - {
  29998. - return( ((_private_detail::VPIMask *)ref->pmask)->offset() );
  29999. - }
  30000. -
  30001. - // Embed INTMASK in VIMask
  30002. - void embed( im__INTMASK * ) throw( VError );
  30003. -
  30004. - // Overload [] to get linear array subscript.
  30005. - int &operator[]( int ) throw( VError );
  30006. -
  30007. - // Overload () to get matrix subscript.
  30008. - int &operator()( int x, int y ) throw( VError )
  30009. - { return( (*this)[x + y*xsize()] ); }
  30010. -
  30011. - // and as a function call that SWIG can wrap
  30012. - int get( int i ) throw( VError )
  30013. - { return( (*this)[i] ); }
  30014. -
  30015. - // Type conversion: INTMASK->DOUBLEMASK
  30016. - operator VDMask();
  30017. -
  30018. - // Type conversion: INTMASK->image
  30019. - operator VImage();
  30020. -
  30021. - // VIMask build functions
  30022. - static VIMask gauss( double, double ) throw( VError );
  30023. - static VIMask gauss_sep( double, double ) throw( VError );
  30024. - static VIMask log( double, double ) throw( VError );
  30025. -
  30026. - // VIMask manipulation
  30027. - VIMask rotate45() throw( VError );
  30028. - VIMask rotate90() throw( VError );
  30029. -
  30030. - // Arithmetic ... cast to double, and use VDMask funcs. For some
  30031. - // reason, the compiler won't let us do casts to VDImage yet, so no
  30032. - // inlines.
  30033. - VDMask trn() throw( VError );
  30034. - VDMask inv() throw( VError );
  30035. - VDMask cat( VDMask ) throw( VError );
  30036. - VDMask mul( VDMask ) throw( VError );
  30037. -};
  30038. -
  30039. -// Wrapper over _private_detail::VPDMask with ref counting
  30040. -class VDMask : public VMask {
  30041. -public:
  30042. - VDMask( int xsize, int ysize )
  30043. - {
  30044. - ref->pmask = new _private_detail::VPDMask( xsize, ysize );
  30045. - }
  30046. -
  30047. -/* Don't wrap the varargs constructor. We want Python to use the vector one.
  30048. - */
  30049. -#ifndef SWIG
  30050. - VDMask( int xsize, int ysize, double scale, double offset, ... )
  30051. - {
  30052. - va_list ap;
  30053. - int i;
  30054. - std::vector<double> coeff( xsize * ysize );
  30055. -
  30056. - va_start( ap, offset );
  30057. - for( i = 0; i < xsize * ysize; i++ )
  30058. - coeff[i] = va_arg( ap, double );
  30059. - va_end( ap );
  30060. -
  30061. - ref->pmask = new _private_detail::VPDMask( xsize, ysize,
  30062. - scale, offset, coeff );
  30063. - }
  30064. -#endif /*!SWIG*/
  30065. -
  30066. - VDMask( int xsize, int ysize, double scale, double offset,
  30067. - std::vector<double> coeff )
  30068. - {
  30069. - ref->pmask = new _private_detail::VPDMask( xsize, ysize,
  30070. - scale, offset, coeff );
  30071. - }
  30072. -
  30073. - VDMask( const char *name )
  30074. - {
  30075. - ref->pmask = new _private_detail::VPDMask( name );
  30076. - }
  30077. -
  30078. - // No mask yet
  30079. - VDMask() { }
  30080. -
  30081. - // Embed DOUBLEMASK in VDMask
  30082. - void embed( im__DOUBLEMASK * ) throw( VError );
  30083. -
  30084. - double scale() throw( VError )
  30085. - {
  30086. - return( ((_private_detail::VPDMask *)ref->pmask)->scale() );
  30087. - }
  30088. -
  30089. - double offset() throw( VError )
  30090. - {
  30091. - return( ((_private_detail::VPDMask *)ref->pmask)->offset() );
  30092. - }
  30093. -
  30094. - // Overload [] to get linear array subscript.
  30095. - double &operator[]( int ) throw( VError );
  30096. -
  30097. - // Overload () to get matrix subscript.
  30098. - double &operator()( int x, int y ) throw( VError )
  30099. - { return( (*this)[x + y*xsize()] ); }
  30100. -
  30101. - // and as a function call that SWIG can wrap
  30102. - double get( int i ) throw( VError )
  30103. - { return( (*this)[i] ); }
  30104. -
  30105. - // Type conversion: double->int
  30106. - operator VIMask();
  30107. -
  30108. - // Type conversion: DOUBLEMASK->image
  30109. - operator VImage() throw( VError );
  30110. -
  30111. - // VDMask build functions
  30112. - static VDMask gauss( double, double ) throw( VError );
  30113. - static VDMask log( double, double ) throw( VError );
  30114. -
  30115. - // VDMask manipulation
  30116. - VDMask rotate45() throw( VError );
  30117. - VDMask rotate90() throw( VError );
  30118. -
  30119. - // Scale to intmask
  30120. - VIMask scalei() throw( VError );
  30121. -
  30122. - // Simple arithmetic
  30123. - VDMask trn() throw( VError );
  30124. - VDMask inv() throw( VError );
  30125. - VDMask cat( VDMask ) throw( VError );
  30126. - VDMask mul( VDMask ) throw( VError );
  30127. -};
  30128. -
  30129. -VIPS_NAMESPACE_END
  30130. -
  30131. -#endif /*IM_VMASK_H*/
  30132. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/Makefile.am vips-7.38.5/libvipsCC/Makefile.am
  30133. --- vips-7.38.5-vanilla/libvipsCC/Makefile.am 2014-07-17 23:48:36.237794473 -0400
  30134. +++ vips-7.38.5/libvipsCC/Makefile.am 1969-12-31 19:00:00.000000000 -0500
  30135. @@ -1,37 +0,0 @@
  30136. -SUBDIRS = \
  30137. - include
  30138. -
  30139. -AM_CPPFLAGS = \
  30140. - -I$(top_srcdir)/libvips/include \
  30141. - -I$(top_srcdir)/libvipsCC/include \
  30142. - @VIPS_CFLAGS@
  30143. -
  30144. -lib_LTLIBRARIES = libvipsCC.la
  30145. -
  30146. -libvipsCC_la_SOURCES = \
  30147. - VImage.cc \
  30148. - VError.cc \
  30149. - VDisplay.cc \
  30150. - VMask.cc
  30151. -
  30152. -libvipsCC_la_LDFLAGS = \
  30153. - -no-undefined \
  30154. - -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@
  30155. -
  30156. -libvipsCC_la_LIBADD = \
  30157. - $(top_builddir)/libvips/libvips.la @VIPS_LIBS@
  30158. -
  30159. -# swap the 'awk' line for this:
  30160. -# awk '{if($$1!="deprecated") print $$1}'` ; \
  30161. -# to not generate the wrappers for deprecated functions
  30162. -vipsc++.cc:
  30163. - packages=`vips list packages | \
  30164. - awk '{print $$1}'` ; \
  30165. - echo > vipsc++.cc ; \
  30166. - for name in $$packages; do \
  30167. - echo "// bodies for package $$name" >> vipsc++.cc ; \
  30168. - vips cppc $$name >> vipsc++.cc ; \
  30169. - echo >> vipsc++.cc ; \
  30170. - done
  30171. -
  30172. -EXTRA_DIST = vipsc++.cc
  30173. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/Makefile.in vips-7.38.5/libvipsCC/Makefile.in
  30174. --- vips-7.38.5-vanilla/libvipsCC/Makefile.in 2014-07-17 23:48:36.237794473 -0400
  30175. +++ vips-7.38.5/libvipsCC/Makefile.in 1969-12-31 19:00:00.000000000 -0500
  30176. @@ -1,898 +0,0 @@
  30177. -# Makefile.in generated by automake 1.13.3 from Makefile.am.
  30178. -# @configure_input@
  30179. -
  30180. -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
  30181. -
  30182. -# This Makefile.in is free software; the Free Software Foundation
  30183. -# gives unlimited permission to copy and/or distribute it,
  30184. -# with or without modifications, as long as this notice is preserved.
  30185. -
  30186. -# This program is distributed in the hope that it will be useful,
  30187. -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  30188. -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  30189. -# PARTICULAR PURPOSE.
  30190. -
  30191. -@SET_MAKE@
  30192. -
  30193. -VPATH = @srcdir@
  30194. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
  30195. -am__make_running_with_option = \
  30196. - case $${target_option-} in \
  30197. - ?) ;; \
  30198. - *) echo "am__make_running_with_option: internal error: invalid" \
  30199. - "target option '$${target_option-}' specified" >&2; \
  30200. - exit 1;; \
  30201. - esac; \
  30202. - has_opt=no; \
  30203. - sane_makeflags=$$MAKEFLAGS; \
  30204. - if $(am__is_gnu_make); then \
  30205. - sane_makeflags=$$MFLAGS; \
  30206. - else \
  30207. - case $$MAKEFLAGS in \
  30208. - *\\[\ \ ]*) \
  30209. - bs=\\; \
  30210. - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  30211. - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  30212. - esac; \
  30213. - fi; \
  30214. - skip_next=no; \
  30215. - strip_trailopt () \
  30216. - { \
  30217. - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  30218. - }; \
  30219. - for flg in $$sane_makeflags; do \
  30220. - test $$skip_next = yes && { skip_next=no; continue; }; \
  30221. - case $$flg in \
  30222. - *=*|--*) continue;; \
  30223. - -*I) strip_trailopt 'I'; skip_next=yes;; \
  30224. - -*I?*) strip_trailopt 'I';; \
  30225. - -*O) strip_trailopt 'O'; skip_next=yes;; \
  30226. - -*O?*) strip_trailopt 'O';; \
  30227. - -*l) strip_trailopt 'l'; skip_next=yes;; \
  30228. - -*l?*) strip_trailopt 'l';; \
  30229. - -[dEDm]) skip_next=yes;; \
  30230. - -[JT]) skip_next=yes;; \
  30231. - esac; \
  30232. - case $$flg in \
  30233. - *$$target_option*) has_opt=yes; break;; \
  30234. - esac; \
  30235. - done; \
  30236. - test $$has_opt = yes
  30237. -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  30238. -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  30239. -pkgdatadir = $(datadir)/@PACKAGE@
  30240. -pkgincludedir = $(includedir)/@PACKAGE@
  30241. -pkglibdir = $(libdir)/@PACKAGE@
  30242. -pkglibexecdir = $(libexecdir)/@PACKAGE@
  30243. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  30244. -install_sh_DATA = $(install_sh) -c -m 644
  30245. -install_sh_PROGRAM = $(install_sh) -c
  30246. -install_sh_SCRIPT = $(install_sh) -c
  30247. -INSTALL_HEADER = $(INSTALL_DATA)
  30248. -transform = $(program_transform_name)
  30249. -NORMAL_INSTALL = :
  30250. -PRE_INSTALL = :
  30251. -POST_INSTALL = :
  30252. -NORMAL_UNINSTALL = :
  30253. -PRE_UNINSTALL = :
  30254. -POST_UNINSTALL = :
  30255. -build_triplet = @build@
  30256. -host_triplet = @host@
  30257. -subdir = libvipsCC
  30258. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  30259. - $(top_srcdir)/depcomp
  30260. -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  30261. -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
  30262. - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
  30263. - $(top_srcdir)/configure.ac
  30264. -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  30265. - $(ACLOCAL_M4)
  30266. -mkinstalldirs = $(install_sh) -d
  30267. -CONFIG_HEADER = $(top_builddir)/config.h
  30268. -CONFIG_CLEAN_FILES =
  30269. -CONFIG_CLEAN_VPATH_FILES =
  30270. -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  30271. -am__vpath_adj = case $$p in \
  30272. - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  30273. - *) f=$$p;; \
  30274. - esac;
  30275. -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
  30276. -am__install_max = 40
  30277. -am__nobase_strip_setup = \
  30278. - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
  30279. -am__nobase_strip = \
  30280. - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
  30281. -am__nobase_list = $(am__nobase_strip_setup); \
  30282. - for p in $$list; do echo "$$p $$p"; done | \
  30283. - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  30284. - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
  30285. - if (++n[$$2] == $(am__install_max)) \
  30286. - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
  30287. - END { for (dir in files) print dir, files[dir] }'
  30288. -am__base_list = \
  30289. - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
  30290. - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
  30291. -am__uninstall_files_from_dir = { \
  30292. - test -z "$$files" \
  30293. - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
  30294. - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  30295. - $(am__cd) "$$dir" && rm -f $$files; }; \
  30296. - }
  30297. -am__installdirs = "$(DESTDIR)$(libdir)"
  30298. -LTLIBRARIES = $(lib_LTLIBRARIES)
  30299. -libvipsCC_la_DEPENDENCIES = $(top_builddir)/libvips/libvips.la
  30300. -am_libvipsCC_la_OBJECTS = VImage.lo VError.lo VDisplay.lo VMask.lo
  30301. -libvipsCC_la_OBJECTS = $(am_libvipsCC_la_OBJECTS)
  30302. -AM_V_lt = $(am__v_lt_@AM_V@)
  30303. -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
  30304. -am__v_lt_0 = --silent
  30305. -am__v_lt_1 =
  30306. -libvipsCC_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  30307. - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  30308. - $(CXXFLAGS) $(libvipsCC_la_LDFLAGS) $(LDFLAGS) -o $@
  30309. -AM_V_P = $(am__v_P_@AM_V@)
  30310. -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  30311. -am__v_P_0 = false
  30312. -am__v_P_1 = :
  30313. -AM_V_GEN = $(am__v_GEN_@AM_V@)
  30314. -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  30315. -am__v_GEN_0 = @echo " GEN " $@;
  30316. -am__v_GEN_1 =
  30317. -AM_V_at = $(am__v_at_@AM_V@)
  30318. -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  30319. -am__v_at_0 = @
  30320. -am__v_at_1 =
  30321. -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
  30322. -depcomp = $(SHELL) $(top_srcdir)/depcomp
  30323. -am__depfiles_maybe = depfiles
  30324. -am__mv = mv -f
  30325. -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  30326. - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
  30327. -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  30328. - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
  30329. - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
  30330. - $(AM_CXXFLAGS) $(CXXFLAGS)
  30331. -AM_V_CXX = $(am__v_CXX_@AM_V@)
  30332. -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
  30333. -am__v_CXX_0 = @echo " CXX " $@;
  30334. -am__v_CXX_1 =
  30335. -CXXLD = $(CXX)
  30336. -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  30337. - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  30338. - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  30339. -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
  30340. -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
  30341. -am__v_CXXLD_0 = @echo " CXXLD " $@;
  30342. -am__v_CXXLD_1 =
  30343. -SOURCES = $(libvipsCC_la_SOURCES)
  30344. -DIST_SOURCES = $(libvipsCC_la_SOURCES)
  30345. -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
  30346. - ctags-recursive dvi-recursive html-recursive info-recursive \
  30347. - install-data-recursive install-dvi-recursive \
  30348. - install-exec-recursive install-html-recursive \
  30349. - install-info-recursive install-pdf-recursive \
  30350. - install-ps-recursive install-recursive installcheck-recursive \
  30351. - installdirs-recursive pdf-recursive ps-recursive \
  30352. - tags-recursive uninstall-recursive
  30353. -am__can_run_installinfo = \
  30354. - case $$AM_UPDATE_INFO_DIR in \
  30355. - n|no|NO) false;; \
  30356. - *) (install-info --version) >/dev/null 2>&1;; \
  30357. - esac
  30358. -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
  30359. - distclean-recursive maintainer-clean-recursive
  30360. -am__recursive_targets = \
  30361. - $(RECURSIVE_TARGETS) \
  30362. - $(RECURSIVE_CLEAN_TARGETS) \
  30363. - $(am__extra_recursive_targets)
  30364. -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
  30365. - distdir
  30366. -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  30367. -# Read a list of newline-separated strings from the standard input,
  30368. -# and print each of them once, without duplicates. Input order is
  30369. -# *not* preserved.
  30370. -am__uniquify_input = $(AWK) '\
  30371. - BEGIN { nonempty = 0; } \
  30372. - { items[$$0] = 1; nonempty = 1; } \
  30373. - END { if (nonempty) { for (i in items) print i; }; } \
  30374. -'
  30375. -# Make sure the list of sources is unique. This is necessary because,
  30376. -# e.g., the same source file might be shared among _SOURCES variables
  30377. -# for different programs/libraries.
  30378. -am__define_uniq_tagged_files = \
  30379. - list='$(am__tagged_files)'; \
  30380. - unique=`for i in $$list; do \
  30381. - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  30382. - done | $(am__uniquify_input)`
  30383. -ETAGS = etags
  30384. -CTAGS = ctags
  30385. -DIST_SUBDIRS = $(SUBDIRS)
  30386. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  30387. -am__relativize = \
  30388. - dir0=`pwd`; \
  30389. - sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  30390. - sed_rest='s,^[^/]*/*,,'; \
  30391. - sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  30392. - sed_butlast='s,/*[^/]*$$,,'; \
  30393. - while test -n "$$dir1"; do \
  30394. - first=`echo "$$dir1" | sed -e "$$sed_first"`; \
  30395. - if test "$$first" != "."; then \
  30396. - if test "$$first" = ".."; then \
  30397. - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
  30398. - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
  30399. - else \
  30400. - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
  30401. - if test "$$first2" = "$$first"; then \
  30402. - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
  30403. - else \
  30404. - dir2="../$$dir2"; \
  30405. - fi; \
  30406. - dir0="$$dir0"/"$$first"; \
  30407. - fi; \
  30408. - fi; \
  30409. - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
  30410. - done; \
  30411. - reldir="$$dir2"
  30412. -ACLOCAL = @ACLOCAL@
  30413. -AMTAR = @AMTAR@
  30414. -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  30415. -AR = @AR@
  30416. -AS = @AS@
  30417. -AUTOCONF = @AUTOCONF@
  30418. -AUTOHEADER = @AUTOHEADER@
  30419. -AUTOMAKE = @AUTOMAKE@
  30420. -AWK = @AWK@
  30421. -CATALOGS = @CATALOGS@
  30422. -CATOBJEXT = @CATOBJEXT@
  30423. -CC = @CC@
  30424. -CCDEPMODE = @CCDEPMODE@
  30425. -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
  30426. -CFITSIO_LIBS = @CFITSIO_LIBS@
  30427. -CFLAGS = @CFLAGS@
  30428. -CPP = @CPP@
  30429. -CPPFLAGS = @CPPFLAGS@
  30430. -CXX = @CXX@
  30431. -CXXCPP = @CXXCPP@
  30432. -CXXDEPMODE = @CXXDEPMODE@
  30433. -CXXFLAGS = @CXXFLAGS@
  30434. -CYGPATH_W = @CYGPATH_W@
  30435. -DATADIRNAME = @DATADIRNAME@
  30436. -DEFS = @DEFS@
  30437. -DEPDIR = @DEPDIR@
  30438. -DLLTOOL = @DLLTOOL@
  30439. -DLLWRAP = @DLLWRAP@
  30440. -DSYMUTIL = @DSYMUTIL@
  30441. -DUMPBIN = @DUMPBIN@
  30442. -ECHO_C = @ECHO_C@
  30443. -ECHO_N = @ECHO_N@
  30444. -ECHO_T = @ECHO_T@
  30445. -EGREP = @EGREP@
  30446. -EXEEXT = @EXEEXT@
  30447. -EXIF_CFLAGS = @EXIF_CFLAGS@
  30448. -EXIF_LIBS = @EXIF_LIBS@
  30449. -FFTW_CFLAGS = @FFTW_CFLAGS@
  30450. -FFTW_LIBS = @FFTW_LIBS@
  30451. -FGREP = @FGREP@
  30452. -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
  30453. -GMOFILES = @GMOFILES@
  30454. -GMSGFMT = @GMSGFMT@
  30455. -GREP = @GREP@
  30456. -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
  30457. -GTHREAD_LIBS = @GTHREAD_LIBS@
  30458. -GTKDOC_CHECK = @GTKDOC_CHECK@
  30459. -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
  30460. -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
  30461. -GTKDOC_MKPDF = @GTKDOC_MKPDF@
  30462. -GTKDOC_REBASE = @GTKDOC_REBASE@
  30463. -HTML_DIR = @HTML_DIR@
  30464. -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
  30465. -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
  30466. -INSTALL = @INSTALL@
  30467. -INSTALL_DATA = @INSTALL_DATA@
  30468. -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  30469. -INSTALL_SCRIPT = @INSTALL_SCRIPT@
  30470. -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  30471. -INSTOBJEXT = @INSTOBJEXT@
  30472. -INTLLIBS = @INTLLIBS@
  30473. -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
  30474. -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
  30475. -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
  30476. -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
  30477. -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
  30478. -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
  30479. -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
  30480. -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
  30481. -JPEG_INCLUDES = @JPEG_INCLUDES@
  30482. -JPEG_LIBS = @JPEG_LIBS@
  30483. -LCMS_CFLAGS = @LCMS_CFLAGS@
  30484. -LCMS_LIBS = @LCMS_LIBS@
  30485. -LD = @LD@
  30486. -LDFLAGS = @LDFLAGS@
  30487. -LIBOBJS = @LIBOBJS@
  30488. -LIBRARY_AGE = @LIBRARY_AGE@
  30489. -LIBRARY_CURRENT = @LIBRARY_CURRENT@
  30490. -LIBRARY_REVISION = @LIBRARY_REVISION@
  30491. -LIBS = @LIBS@
  30492. -LIBTOOL = @LIBTOOL@
  30493. -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
  30494. -LIBWEBP_LIBS = @LIBWEBP_LIBS@
  30495. -LIPO = @LIPO@
  30496. -LN_S = @LN_S@
  30497. -LTLIBOBJS = @LTLIBOBJS@
  30498. -MAGICK_CFLAGS = @MAGICK_CFLAGS@
  30499. -MAGICK_LIBS = @MAGICK_LIBS@
  30500. -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
  30501. -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
  30502. -MAKEINFO = @MAKEINFO@
  30503. -MANIFEST_TOOL = @MANIFEST_TOOL@
  30504. -MATIO_CFLAGS = @MATIO_CFLAGS@
  30505. -MATIO_LIBS = @MATIO_LIBS@
  30506. -MKDIR_P = @MKDIR_P@
  30507. -MKINSTALLDIRS = @MKINSTALLDIRS@
  30508. -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
  30509. -MONOTONIC_LIBS = @MONOTONIC_LIBS@
  30510. -MSGFMT = @MSGFMT@
  30511. -MSGFMT_OPTS = @MSGFMT_OPTS@
  30512. -NM = @NM@
  30513. -NMEDIT = @NMEDIT@
  30514. -OBJDUMP = @OBJDUMP@
  30515. -OBJEXT = @OBJEXT@
  30516. -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
  30517. -OPENEXR_LIBS = @OPENEXR_LIBS@
  30518. -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
  30519. -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
  30520. -ORC_CFLAGS = @ORC_CFLAGS@
  30521. -ORC_LIBS = @ORC_LIBS@
  30522. -OTOOL = @OTOOL@
  30523. -OTOOL64 = @OTOOL64@
  30524. -PACKAGE = @PACKAGE@
  30525. -PACKAGES_USED = @PACKAGES_USED@
  30526. -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  30527. -PACKAGE_NAME = @PACKAGE_NAME@
  30528. -PACKAGE_STRING = @PACKAGE_STRING@
  30529. -PACKAGE_TARNAME = @PACKAGE_TARNAME@
  30530. -PACKAGE_URL = @PACKAGE_URL@
  30531. -PACKAGE_VERSION = @PACKAGE_VERSION@
  30532. -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
  30533. -PANGOFT2_LIBS = @PANGOFT2_LIBS@
  30534. -PATH_SEPARATOR = @PATH_SEPARATOR@
  30535. -PKG_CONFIG = @PKG_CONFIG@
  30536. -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
  30537. -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
  30538. -PNG_CFLAGS = @PNG_CFLAGS@
  30539. -PNG_INCLUDES = @PNG_INCLUDES@
  30540. -PNG_LIBS = @PNG_LIBS@
  30541. -POFILES = @POFILES@
  30542. -POSUB = @POSUB@
  30543. -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
  30544. -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
  30545. -PYTHON = @PYTHON@
  30546. -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
  30547. -PYTHON_INCLUDES = @PYTHON_INCLUDES@
  30548. -PYTHON_PLATFORM = @PYTHON_PLATFORM@
  30549. -PYTHON_PREFIX = @PYTHON_PREFIX@
  30550. -PYTHON_VERSION = @PYTHON_VERSION@
  30551. -RANLIB = @RANLIB@
  30552. -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
  30553. -REQUIRED_LIBS = @REQUIRED_LIBS@
  30554. -SED = @SED@
  30555. -SET_MAKE = @SET_MAKE@
  30556. -SHELL = @SHELL@
  30557. -STRIP = @STRIP@
  30558. -THREADS_CFLAGS = @THREADS_CFLAGS@
  30559. -THREADS_LIBS = @THREADS_LIBS@
  30560. -TIFF_CFLAGS = @TIFF_CFLAGS@
  30561. -TIFF_INCLUDES = @TIFF_INCLUDES@
  30562. -TIFF_LIBS = @TIFF_LIBS@
  30563. -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
  30564. -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
  30565. -USE_NLS = @USE_NLS@
  30566. -VERSION = @VERSION@
  30567. -VIPS_CFLAGS = @VIPS_CFLAGS@
  30568. -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
  30569. -VIPS_EXEEXT = @VIPS_EXEEXT@
  30570. -VIPS_INCLUDES = @VIPS_INCLUDES@
  30571. -VIPS_LIBDIR = @VIPS_LIBDIR@
  30572. -VIPS_LIBS = @VIPS_LIBS@
  30573. -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
  30574. -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
  30575. -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
  30576. -VIPS_VERSION = @VIPS_VERSION@
  30577. -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
  30578. -XGETTEXT = @XGETTEXT@
  30579. -XMKMF = @XMKMF@
  30580. -X_CFLAGS = @X_CFLAGS@
  30581. -X_EXTRA_LIBS = @X_EXTRA_LIBS@
  30582. -X_LIBS = @X_LIBS@
  30583. -X_PRE_LIBS = @X_PRE_LIBS@
  30584. -ZIP_INCLUDES = @ZIP_INCLUDES@
  30585. -ZIP_LIBS = @ZIP_LIBS@
  30586. -abs_builddir = @abs_builddir@
  30587. -abs_srcdir = @abs_srcdir@
  30588. -abs_top_builddir = @abs_top_builddir@
  30589. -abs_top_srcdir = @abs_top_srcdir@
  30590. -ac_ct_AR = @ac_ct_AR@
  30591. -ac_ct_CC = @ac_ct_CC@
  30592. -ac_ct_CXX = @ac_ct_CXX@
  30593. -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  30594. -am__include = @am__include@
  30595. -am__leading_dot = @am__leading_dot@
  30596. -am__quote = @am__quote@
  30597. -am__tar = @am__tar@
  30598. -am__untar = @am__untar@
  30599. -bindir = @bindir@
  30600. -build = @build@
  30601. -build_alias = @build_alias@
  30602. -build_cpu = @build_cpu@
  30603. -build_os = @build_os@
  30604. -build_vendor = @build_vendor@
  30605. -builddir = @builddir@
  30606. -datadir = @datadir@
  30607. -datarootdir = @datarootdir@
  30608. -docdir = @docdir@
  30609. -dvidir = @dvidir@
  30610. -exec_prefix = @exec_prefix@
  30611. -host = @host@
  30612. -host_alias = @host_alias@
  30613. -host_cpu = @host_cpu@
  30614. -host_os = @host_os@
  30615. -host_vendor = @host_vendor@
  30616. -htmldir = @htmldir@
  30617. -includedir = @includedir@
  30618. -infodir = @infodir@
  30619. -install_sh = @install_sh@
  30620. -libdir = @libdir@
  30621. -libexecdir = @libexecdir@
  30622. -localedir = @localedir@
  30623. -localstatedir = @localstatedir@
  30624. -mandir = @mandir@
  30625. -mkdir_p = @mkdir_p@
  30626. -oldincludedir = @oldincludedir@
  30627. -pdfdir = @pdfdir@
  30628. -pkgpyexecdir = @pkgpyexecdir@
  30629. -pkgpythondir = @pkgpythondir@
  30630. -prefix = @prefix@
  30631. -program_transform_name = @program_transform_name@
  30632. -psdir = @psdir@
  30633. -pyexecdir = @pyexecdir@
  30634. -pythondir = @pythondir@
  30635. -sbindir = @sbindir@
  30636. -sharedstatedir = @sharedstatedir@
  30637. -srcdir = @srcdir@
  30638. -sysconfdir = @sysconfdir@
  30639. -target_alias = @target_alias@
  30640. -top_build_prefix = @top_build_prefix@
  30641. -top_builddir = @top_builddir@
  30642. -top_srcdir = @top_srcdir@
  30643. -vips_introspection_sources = @vips_introspection_sources@
  30644. -SUBDIRS = \
  30645. - include
  30646. -
  30647. -AM_CPPFLAGS = \
  30648. - -I$(top_srcdir)/libvips/include \
  30649. - -I$(top_srcdir)/libvipsCC/include \
  30650. - @VIPS_CFLAGS@
  30651. -
  30652. -lib_LTLIBRARIES = libvipsCC.la
  30653. -libvipsCC_la_SOURCES = \
  30654. - VImage.cc \
  30655. - VError.cc \
  30656. - VDisplay.cc \
  30657. - VMask.cc
  30658. -
  30659. -libvipsCC_la_LDFLAGS = \
  30660. - -no-undefined \
  30661. - -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@
  30662. -
  30663. -libvipsCC_la_LIBADD = \
  30664. - $(top_builddir)/libvips/libvips.la @VIPS_LIBS@
  30665. -
  30666. -EXTRA_DIST = vipsc++.cc
  30667. -all: all-recursive
  30668. -
  30669. -.SUFFIXES:
  30670. -.SUFFIXES: .cc .lo .o .obj
  30671. -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  30672. - @for dep in $?; do \
  30673. - case '$(am__configure_deps)' in \
  30674. - *$$dep*) \
  30675. - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  30676. - && { if test -f $@; then exit 0; else break; fi; }; \
  30677. - exit 1;; \
  30678. - esac; \
  30679. - done; \
  30680. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/Makefile'; \
  30681. - $(am__cd) $(top_srcdir) && \
  30682. - $(AUTOMAKE) --foreign libvipsCC/Makefile
  30683. -.PRECIOUS: Makefile
  30684. -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  30685. - @case '$?' in \
  30686. - *config.status*) \
  30687. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  30688. - *) \
  30689. - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  30690. - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  30691. - esac;
  30692. -
  30693. -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  30694. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  30695. -
  30696. -$(top_srcdir)/configure: $(am__configure_deps)
  30697. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  30698. -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  30699. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  30700. -$(am__aclocal_m4_deps):
  30701. -
  30702. -install-libLTLIBRARIES: $(lib_LTLIBRARIES)
  30703. - @$(NORMAL_INSTALL)
  30704. - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
  30705. - list2=; for p in $$list; do \
  30706. - if test -f $$p; then \
  30707. - list2="$$list2 $$p"; \
  30708. - else :; fi; \
  30709. - done; \
  30710. - test -z "$$list2" || { \
  30711. - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
  30712. - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
  30713. - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
  30714. - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
  30715. - }
  30716. -
  30717. -uninstall-libLTLIBRARIES:
  30718. - @$(NORMAL_UNINSTALL)
  30719. - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
  30720. - for p in $$list; do \
  30721. - $(am__strip_dir) \
  30722. - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
  30723. - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
  30724. - done
  30725. -
  30726. -clean-libLTLIBRARIES:
  30727. - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
  30728. - @list='$(lib_LTLIBRARIES)'; \
  30729. - locs=`for p in $$list; do echo $$p; done | \
  30730. - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
  30731. - sort -u`; \
  30732. - test -z "$$locs" || { \
  30733. - echo rm -f $${locs}; \
  30734. - rm -f $${locs}; \
  30735. - }
  30736. -
  30737. -libvipsCC.la: $(libvipsCC_la_OBJECTS) $(libvipsCC_la_DEPENDENCIES) $(EXTRA_libvipsCC_la_DEPENDENCIES)
  30738. - $(AM_V_CXXLD)$(libvipsCC_la_LINK) -rpath $(libdir) $(libvipsCC_la_OBJECTS) $(libvipsCC_la_LIBADD) $(LIBS)
  30739. -
  30740. -mostlyclean-compile:
  30741. - -rm -f *.$(OBJEXT)
  30742. -
  30743. -distclean-compile:
  30744. - -rm -f *.tab.c
  30745. -
  30746. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VDisplay.Plo@am__quote@
  30747. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VError.Plo@am__quote@
  30748. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VImage.Plo@am__quote@
  30749. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VMask.Plo@am__quote@
  30750. -
  30751. -.cc.o:
  30752. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  30753. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  30754. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  30755. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  30756. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
  30757. -
  30758. -.cc.obj:
  30759. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
  30760. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  30761. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  30762. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  30763. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
  30764. -
  30765. -.cc.lo:
  30766. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  30767. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  30768. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  30769. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  30770. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
  30771. -
  30772. -mostlyclean-libtool:
  30773. - -rm -f *.lo
  30774. -
  30775. -clean-libtool:
  30776. - -rm -rf .libs _libs
  30777. -
  30778. -# This directory's subdirectories are mostly independent; you can cd
  30779. -# into them and run 'make' without going through this Makefile.
  30780. -# To change the values of 'make' variables: instead of editing Makefiles,
  30781. -# (1) if the variable is set in 'config.status', edit 'config.status'
  30782. -# (which will cause the Makefiles to be regenerated when you run 'make');
  30783. -# (2) otherwise, pass the desired values on the 'make' command line.
  30784. -$(am__recursive_targets):
  30785. - @fail=; \
  30786. - if $(am__make_keepgoing); then \
  30787. - failcom='fail=yes'; \
  30788. - else \
  30789. - failcom='exit 1'; \
  30790. - fi; \
  30791. - dot_seen=no; \
  30792. - target=`echo $@ | sed s/-recursive//`; \
  30793. - case "$@" in \
  30794. - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
  30795. - *) list='$(SUBDIRS)' ;; \
  30796. - esac; \
  30797. - for subdir in $$list; do \
  30798. - echo "Making $$target in $$subdir"; \
  30799. - if test "$$subdir" = "."; then \
  30800. - dot_seen=yes; \
  30801. - local_target="$$target-am"; \
  30802. - else \
  30803. - local_target="$$target"; \
  30804. - fi; \
  30805. - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
  30806. - || eval $$failcom; \
  30807. - done; \
  30808. - if test "$$dot_seen" = "no"; then \
  30809. - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
  30810. - fi; test -z "$$fail"
  30811. -
  30812. -ID: $(am__tagged_files)
  30813. - $(am__define_uniq_tagged_files); mkid -fID $$unique
  30814. -tags: tags-recursive
  30815. -TAGS: tags
  30816. -
  30817. -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  30818. - set x; \
  30819. - here=`pwd`; \
  30820. - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
  30821. - include_option=--etags-include; \
  30822. - empty_fix=.; \
  30823. - else \
  30824. - include_option=--include; \
  30825. - empty_fix=; \
  30826. - fi; \
  30827. - list='$(SUBDIRS)'; for subdir in $$list; do \
  30828. - if test "$$subdir" = .; then :; else \
  30829. - test ! -f $$subdir/TAGS || \
  30830. - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
  30831. - fi; \
  30832. - done; \
  30833. - $(am__define_uniq_tagged_files); \
  30834. - shift; \
  30835. - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
  30836. - test -n "$$unique" || unique=$$empty_fix; \
  30837. - if test $$# -gt 0; then \
  30838. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  30839. - "$$@" $$unique; \
  30840. - else \
  30841. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  30842. - $$unique; \
  30843. - fi; \
  30844. - fi
  30845. -ctags: ctags-recursive
  30846. -
  30847. -CTAGS: ctags
  30848. -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  30849. - $(am__define_uniq_tagged_files); \
  30850. - test -z "$(CTAGS_ARGS)$$unique" \
  30851. - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  30852. - $$unique
  30853. -
  30854. -GTAGS:
  30855. - here=`$(am__cd) $(top_builddir) && pwd` \
  30856. - && $(am__cd) $(top_srcdir) \
  30857. - && gtags -i $(GTAGS_ARGS) "$$here"
  30858. -cscopelist: cscopelist-recursive
  30859. -
  30860. -cscopelist-am: $(am__tagged_files)
  30861. - list='$(am__tagged_files)'; \
  30862. - case "$(srcdir)" in \
  30863. - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
  30864. - *) sdir=$(subdir)/$(srcdir) ;; \
  30865. - esac; \
  30866. - for i in $$list; do \
  30867. - if test -f "$$i"; then \
  30868. - echo "$(subdir)/$$i"; \
  30869. - else \
  30870. - echo "$$sdir/$$i"; \
  30871. - fi; \
  30872. - done >> $(top_builddir)/cscope.files
  30873. -
  30874. -distclean-tags:
  30875. - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  30876. -
  30877. -distdir: $(DISTFILES)
  30878. - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  30879. - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  30880. - list='$(DISTFILES)'; \
  30881. - dist_files=`for file in $$list; do echo $$file; done | \
  30882. - sed -e "s|^$$srcdirstrip/||;t" \
  30883. - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  30884. - case $$dist_files in \
  30885. - */*) $(MKDIR_P) `echo "$$dist_files" | \
  30886. - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  30887. - sort -u` ;; \
  30888. - esac; \
  30889. - for file in $$dist_files; do \
  30890. - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  30891. - if test -d $$d/$$file; then \
  30892. - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  30893. - if test -d "$(distdir)/$$file"; then \
  30894. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  30895. - fi; \
  30896. - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  30897. - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  30898. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  30899. - fi; \
  30900. - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  30901. - else \
  30902. - test -f "$(distdir)/$$file" \
  30903. - || cp -p $$d/$$file "$(distdir)/$$file" \
  30904. - || exit 1; \
  30905. - fi; \
  30906. - done
  30907. - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
  30908. - if test "$$subdir" = .; then :; else \
  30909. - $(am__make_dryrun) \
  30910. - || test -d "$(distdir)/$$subdir" \
  30911. - || $(MKDIR_P) "$(distdir)/$$subdir" \
  30912. - || exit 1; \
  30913. - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
  30914. - $(am__relativize); \
  30915. - new_distdir=$$reldir; \
  30916. - dir1=$$subdir; dir2="$(top_distdir)"; \
  30917. - $(am__relativize); \
  30918. - new_top_distdir=$$reldir; \
  30919. - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
  30920. - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
  30921. - ($(am__cd) $$subdir && \
  30922. - $(MAKE) $(AM_MAKEFLAGS) \
  30923. - top_distdir="$$new_top_distdir" \
  30924. - distdir="$$new_distdir" \
  30925. - am__remove_distdir=: \
  30926. - am__skip_length_check=: \
  30927. - am__skip_mode_fix=: \
  30928. - distdir) \
  30929. - || exit 1; \
  30930. - fi; \
  30931. - done
  30932. -check-am: all-am
  30933. -check: check-recursive
  30934. -all-am: Makefile $(LTLIBRARIES)
  30935. -installdirs: installdirs-recursive
  30936. -installdirs-am:
  30937. - for dir in "$(DESTDIR)$(libdir)"; do \
  30938. - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  30939. - done
  30940. -install: install-recursive
  30941. -install-exec: install-exec-recursive
  30942. -install-data: install-data-recursive
  30943. -uninstall: uninstall-recursive
  30944. -
  30945. -install-am: all-am
  30946. - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  30947. -
  30948. -installcheck: installcheck-recursive
  30949. -install-strip:
  30950. - if test -z '$(STRIP)'; then \
  30951. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  30952. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  30953. - install; \
  30954. - else \
  30955. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  30956. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  30957. - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  30958. - fi
  30959. -mostlyclean-generic:
  30960. -
  30961. -clean-generic:
  30962. -
  30963. -distclean-generic:
  30964. - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  30965. - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  30966. -
  30967. -maintainer-clean-generic:
  30968. - @echo "This command is intended for maintainers to use"
  30969. - @echo "it deletes files that may require special tools to rebuild."
  30970. -clean: clean-recursive
  30971. -
  30972. -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
  30973. - mostlyclean-am
  30974. -
  30975. -distclean: distclean-recursive
  30976. - -rm -rf ./$(DEPDIR)
  30977. - -rm -f Makefile
  30978. -distclean-am: clean-am distclean-compile distclean-generic \
  30979. - distclean-tags
  30980. -
  30981. -dvi: dvi-recursive
  30982. -
  30983. -dvi-am:
  30984. -
  30985. -html: html-recursive
  30986. -
  30987. -html-am:
  30988. -
  30989. -info: info-recursive
  30990. -
  30991. -info-am:
  30992. -
  30993. -install-data-am:
  30994. -
  30995. -install-dvi: install-dvi-recursive
  30996. -
  30997. -install-dvi-am:
  30998. -
  30999. -install-exec-am: install-libLTLIBRARIES
  31000. -
  31001. -install-html: install-html-recursive
  31002. -
  31003. -install-html-am:
  31004. -
  31005. -install-info: install-info-recursive
  31006. -
  31007. -install-info-am:
  31008. -
  31009. -install-man:
  31010. -
  31011. -install-pdf: install-pdf-recursive
  31012. -
  31013. -install-pdf-am:
  31014. -
  31015. -install-ps: install-ps-recursive
  31016. -
  31017. -install-ps-am:
  31018. -
  31019. -installcheck-am:
  31020. -
  31021. -maintainer-clean: maintainer-clean-recursive
  31022. - -rm -rf ./$(DEPDIR)
  31023. - -rm -f Makefile
  31024. -maintainer-clean-am: distclean-am maintainer-clean-generic
  31025. -
  31026. -mostlyclean: mostlyclean-recursive
  31027. -
  31028. -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
  31029. - mostlyclean-libtool
  31030. -
  31031. -pdf: pdf-recursive
  31032. -
  31033. -pdf-am:
  31034. -
  31035. -ps: ps-recursive
  31036. -
  31037. -ps-am:
  31038. -
  31039. -uninstall-am: uninstall-libLTLIBRARIES
  31040. -
  31041. -.MAKE: $(am__recursive_targets) install-am install-strip
  31042. -
  31043. -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
  31044. - check-am clean clean-generic clean-libLTLIBRARIES \
  31045. - clean-libtool cscopelist-am ctags ctags-am distclean \
  31046. - distclean-compile distclean-generic distclean-libtool \
  31047. - distclean-tags distdir dvi dvi-am html html-am info info-am \
  31048. - install install-am install-data install-data-am install-dvi \
  31049. - install-dvi-am install-exec install-exec-am install-html \
  31050. - install-html-am install-info install-info-am \
  31051. - install-libLTLIBRARIES install-man install-pdf install-pdf-am \
  31052. - install-ps install-ps-am install-strip installcheck \
  31053. - installcheck-am installdirs installdirs-am maintainer-clean \
  31054. - maintainer-clean-generic mostlyclean mostlyclean-compile \
  31055. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  31056. - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
  31057. -
  31058. -
  31059. -# swap the 'awk' line for this:
  31060. -# awk '{if($$1!="deprecated") print $$1}'` ; \
  31061. -# to not generate the wrappers for deprecated functions
  31062. -vipsc++.cc:
  31063. - packages=`vips list packages | \
  31064. - awk '{print $$1}'` ; \
  31065. - echo > vipsc++.cc ; \
  31066. - for name in $$packages; do \
  31067. - echo "// bodies for package $$name" >> vipsc++.cc ; \
  31068. - vips cppc $$name >> vipsc++.cc ; \
  31069. - echo >> vipsc++.cc ; \
  31070. - done
  31071. -
  31072. -# Tell versions [3.59,3.63) of GNU make to not export all variables.
  31073. -# Otherwise a system limit (for SysV at least) may be exceeded.
  31074. -.NOEXPORT:
  31075. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VDisplay.cc vips-7.38.5/libvipsCC/VDisplay.cc
  31076. --- vips-7.38.5-vanilla/libvipsCC/VDisplay.cc 2014-07-17 23:48:36.237794473 -0400
  31077. +++ vips-7.38.5/libvipsCC/VDisplay.cc 1969-12-31 19:00:00.000000000 -0500
  31078. @@ -1,152 +0,0 @@
  31079. -// Object part of VDisplay class
  31080. -
  31081. -/*
  31082. -
  31083. - Copyright (C) 1991-2001 The National Gallery
  31084. -
  31085. - This program is free software; you can redistribute it and/or modify
  31086. - it under the terms of the GNU Lesser General Public License as published by
  31087. - the Free Software Foundation; either version 2 of the License, or
  31088. - (at your option) any later version.
  31089. -
  31090. - This program is distributed in the hope that it will be useful,
  31091. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  31092. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31093. - GNU Lesser General Public License for more details.
  31094. -
  31095. - You should have received a copy of the GNU Lesser General Public License
  31096. - along with this program; if not, write to the Free Software
  31097. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  31098. - 02110-1301 USA
  31099. -
  31100. - */
  31101. -
  31102. -/*
  31103. -
  31104. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  31105. -
  31106. - */
  31107. -
  31108. -#ifdef HAVE_CONFIG_H
  31109. -#include <config.h>
  31110. -#endif /*HAVE_CONFIG_H*/
  31111. -#include <vips/intl.h>
  31112. -
  31113. -#include <cstdlib>
  31114. -#include <cstring>
  31115. -
  31116. -#include <vips/vips.h>
  31117. -#include <vips/internal.h>
  31118. -
  31119. -#include <vips/vipscpp.h>
  31120. -
  31121. -#ifdef WITH_DMALLOC
  31122. -#include <dmalloc.h>
  31123. -#endif /*WITH_DMALLOC*/
  31124. -
  31125. -VIPS_NAMESPACE_START
  31126. -
  31127. -/* Refcounting stuff first.
  31128. - */
  31129. -
  31130. -// Free an im_col_display
  31131. -static void
  31132. -free_display( im_col_display *d )
  31133. -{
  31134. -}
  31135. -
  31136. -// Dupe an im_col_display
  31137. -static im_col_display *
  31138. -dup_display( im_col_display *in ) throw( VError )
  31139. -{
  31140. - return( in );
  31141. -}
  31142. -
  31143. -// Remove lut
  31144. -void VDisplay::refblock::cleanlut()
  31145. -{
  31146. - if( luts ) {
  31147. - im_free( luts );
  31148. - luts = 0;
  31149. - }
  31150. -}
  31151. -
  31152. -// Remove attached things
  31153. -void VDisplay::refblock::cleanref()
  31154. -{
  31155. - if( disp && priv ) {
  31156. - free_display( disp );
  31157. - disp = 0;
  31158. - priv = 0;
  31159. - }
  31160. - cleanlut();
  31161. -}
  31162. -
  31163. -// Get ready to write to disp
  31164. -void VDisplay::refblock::wready() throw( VError )
  31165. -{
  31166. - cleanlut();
  31167. - if( !priv ) {
  31168. - disp = dup_display( disp );
  31169. - priv = 1;
  31170. - }
  31171. -}
  31172. -
  31173. -// Check that luts are up-to-date
  31174. -void VDisplay::refblock::cluts() throw( VError )
  31175. -{
  31176. -}
  31177. -
  31178. -VDisplay::~VDisplay()
  31179. -{
  31180. - ref->nrefs--;
  31181. - if( !ref->nrefs )
  31182. - delete ref;
  31183. -}
  31184. -
  31185. -VDisplay &VDisplay::operator=( const VDisplay &a )
  31186. -{
  31187. - ref->nrefs--;
  31188. -
  31189. - if( ref->nrefs > 0 )
  31190. - // Need fresh
  31191. - ref = new refblock;
  31192. - else
  31193. - // Recycle old
  31194. - ref->cleanref();
  31195. -
  31196. - ref = a.ref;
  31197. - ref->nrefs++;
  31198. -
  31199. - return( *this );
  31200. -}
  31201. -
  31202. -VDisplay::VDisplay( const char *name ) throw( VError )
  31203. -{
  31204. - // Install display
  31205. - ref = new refblock;
  31206. - ref->disp = NULL;
  31207. -}
  31208. -
  31209. -VDisplay::VDisplay()
  31210. -{
  31211. - // Just use sRGB
  31212. - ref = new refblock;
  31213. - ref->disp = im_col_displays( 7 );
  31214. -}
  31215. -
  31216. -/*
  31217. -
  31218. -Setters and getters. We used to have a lot of code of the form:
  31219. -
  31220. -float &VDisplay::YCW()
  31221. - { ref->wready(); return( ((im_col_display*)ref->disp)->d_YCW ); }
  31222. -
  31223. -This should be split to separate setters/getters so we can exploit const. Too
  31224. -annoying to do this on such a useless class (I'm certain no one used these
  31225. -functions anyway), fix in vips8.
  31226. -
  31227. - */
  31228. -
  31229. -VIPS_NAMESPACE_END
  31230. -
  31231. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VError.cc vips-7.38.5/libvipsCC/VError.cc
  31232. --- vips-7.38.5-vanilla/libvipsCC/VError.cc 2014-07-17 23:48:36.237794473 -0400
  31233. +++ vips-7.38.5/libvipsCC/VError.cc 1969-12-31 19:00:00.000000000 -0500
  31234. @@ -1,100 +0,0 @@
  31235. -// Code for error type
  31236. -
  31237. -/*
  31238. -
  31239. - Copyright (C) 1991-2001 The National Gallery
  31240. -
  31241. - This program is free software; you can redistribute it and/or modify
  31242. - it under the terms of the GNU Lesser General Public License as published by
  31243. - the Free Software Foundation; either version 2 of the License, or
  31244. - (at your option) any later version.
  31245. -
  31246. - This program is distributed in the hope that it will be useful,
  31247. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  31248. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31249. - GNU Lesser General Public License for more details.
  31250. -
  31251. - You should have received a copy of the GNU Lesser General Public License
  31252. - along with this program; if not, write to the Free Software
  31253. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  31254. - 02110-1301 USA
  31255. -
  31256. - */
  31257. -
  31258. -/*
  31259. -
  31260. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  31261. -
  31262. - */
  31263. -
  31264. -#ifdef HAVE_CONFIG_H
  31265. -#include <config.h>
  31266. -#endif /*HAVE_CONFIG_H*/
  31267. -#include <vips/intl.h>
  31268. -
  31269. -#include <cstdio>
  31270. -#include <cstdlib>
  31271. -
  31272. -#include <iostream>
  31273. -
  31274. -#include <vips/vips.h>
  31275. -
  31276. -#include <vips/vipscpp.h>
  31277. -
  31278. -#ifdef WITH_DMALLOC
  31279. -#include <dmalloc.h>
  31280. -#endif /*WITH_DMALLOC*/
  31281. -
  31282. -VIPS_NAMESPACE_START
  31283. -
  31284. -void VError::perror()
  31285. -{
  31286. - std::cerr << _what;
  31287. - exit( 1 );
  31288. -}
  31289. -
  31290. -void VError::perror( const char *name )
  31291. -{
  31292. - std::cerr << name << ": " << _what;
  31293. - exit( 1 );
  31294. -}
  31295. -
  31296. -// Add a new bit to the end of the error buffer
  31297. -VError &VError::app( const int i )
  31298. -{
  31299. - char buf[ 256 ];
  31300. -
  31301. - sprintf( buf, "%d", i );
  31302. - _what += buf;
  31303. -
  31304. - return( *this );
  31305. -}
  31306. -
  31307. -VError &VError::app( std::string txt )
  31308. -{
  31309. - _what += txt;
  31310. -
  31311. - return( *this );
  31312. -};
  31313. -
  31314. -void VError::ostream_print( std::ostream &file ) const
  31315. -{
  31316. - file << _what;
  31317. -}
  31318. -
  31319. -void verror( std::string str ) throw( VError )
  31320. -{
  31321. - VError err;
  31322. -
  31323. - err.app( "VIPS error: " );
  31324. - if( str == "" ) {
  31325. - err.app( im_error_buffer() );
  31326. - im_error_clear();
  31327. - }
  31328. - else
  31329. - err.app( str ).app( "\n" );
  31330. -
  31331. - throw( err );
  31332. -}
  31333. -
  31334. -VIPS_NAMESPACE_END
  31335. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VImage.cc vips-7.38.5/libvipsCC/VImage.cc
  31336. --- vips-7.38.5-vanilla/libvipsCC/VImage.cc 2014-07-17 23:48:36.237794473 -0400
  31337. +++ vips-7.38.5/libvipsCC/VImage.cc 1969-12-31 19:00:00.000000000 -0500
  31338. @@ -1,524 +0,0 @@
  31339. -// Object part of VImage class
  31340. -
  31341. -/*
  31342. -
  31343. - Copyright (C) 1991-2001 The National Gallery
  31344. -
  31345. - This program is free software; you can redistribute it and/or modify
  31346. - it under the terms of the GNU Lesser General Public License as published by
  31347. - the Free Software Foundation; either version 2 of the License, or
  31348. - (at your option) any later version.
  31349. -
  31350. - This program is distributed in the hope that it will be useful,
  31351. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  31352. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31353. - GNU Lesser General Public License for more details.
  31354. -
  31355. - You should have received a copy of the GNU Lesser General Public License
  31356. - along with this program; if not, write to the Free Software
  31357. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  31358. - 02110-1301 USA
  31359. -
  31360. - */
  31361. -
  31362. -/*
  31363. -
  31364. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  31365. -
  31366. - */
  31367. -
  31368. -#ifdef HAVE_CONFIG_H
  31369. -#include <config.h>
  31370. -#endif /*HAVE_CONFIG_H*/
  31371. -#include <vips/intl.h>
  31372. -
  31373. -#include <cstdlib>
  31374. -#include <cstring>
  31375. -#include <cstdio>
  31376. -
  31377. -#include <vips/vips.h>
  31378. -#include <vips/internal.h>
  31379. -#include <vips/debug.h>
  31380. -
  31381. -#include <vips/vipscpp.h>
  31382. -
  31383. -#ifdef WITH_DMALLOC
  31384. -#include <dmalloc.h>
  31385. -#endif /*WITH_DMALLOC*/
  31386. -
  31387. -/*
  31388. -#define DEBUG
  31389. - */
  31390. -
  31391. -VIPS_NAMESPACE_START
  31392. -
  31393. -/* Useful to have these as C++ functions.
  31394. - */
  31395. -bool init( const char *argv0 )
  31396. -{
  31397. - return( vips_init( argv0 ) == 0 );
  31398. -}
  31399. -
  31400. -void shutdown()
  31401. -{
  31402. - vips_shutdown();
  31403. -}
  31404. -
  31405. -void VImage::refblock::debug_print()
  31406. -{
  31407. - std::list<refblock *>::iterator i;
  31408. -
  31409. - printf( "refblock %p:\n", this );
  31410. - printf( " im = %p", im );
  31411. - if( im && im->filename )
  31412. - printf( " (im->filename = \"%s\")", im->filename );
  31413. - printf( "\n" );
  31414. - printf( " close_on_delete = %d\n", close_on_delete );
  31415. - printf( " nrefs (refs to us) = %d\n", nrefs );
  31416. - printf( " orefs (refs we make) = refblocks " );
  31417. - for( i = orefs.begin(); i != orefs.end(); i++ )
  31418. - printf( "%p ", *i );
  31419. - printf( "\n" );
  31420. -}
  31421. -
  31422. -// dump all refblocks for debugging
  31423. -void VImage::print_all()
  31424. -{
  31425. -#ifdef DEBUG
  31426. - std::list<VImage::refblock *>::iterator i;
  31427. -
  31428. - printf( "*** VImage::refblock::print_all() start\n" );
  31429. - for( i = all_refblock.begin(); i != all_refblock.end(); i++ )
  31430. - (*i)->debug_print();
  31431. - printf( "*** VImage::refblock::print_all() end\n" );
  31432. -#endif /*DEBUG*/
  31433. -}
  31434. -
  31435. -// easy call from C version
  31436. -void im__ccp_print_all()
  31437. -{
  31438. - VImage::print_all();
  31439. -}
  31440. -
  31441. -// constructor
  31442. -VImage::refblock::refblock()
  31443. -{
  31444. - im = 0;
  31445. - close_on_delete = 1;
  31446. - nrefs = 1;
  31447. -
  31448. -#ifdef DEBUG
  31449. - all_refblock.push_front( this );
  31450. -#endif /*DEBUG*/
  31451. -}
  31452. -
  31453. -// Add a ref - this (output image) depends upon VipsImage in
  31454. -void VImage::refblock::addref( refblock *in ) throw( VError )
  31455. -{
  31456. - if( this == in )
  31457. - verror( "sanity failure" );
  31458. -
  31459. - in->nrefs++;
  31460. - orefs.push_front( in );
  31461. -}
  31462. -
  31463. -VImage::refblock::~refblock() throw( VError )
  31464. -{
  31465. -#ifdef DEBUG
  31466. - printf( "VImage::refblock::removeref(): death!\n" );
  31467. - debug_print();
  31468. -#endif /*DEBUG*/
  31469. -
  31470. - std::list<refblock *>::iterator i;
  31471. -
  31472. - if( close_on_delete && im ) {
  31473. - if( im_close( im ) )
  31474. - verror();
  31475. - im = 0;
  31476. - }
  31477. -
  31478. - // remove any refs we have ... may trigger other destructs in turn
  31479. - for( i = orefs.begin(); i != orefs.end(); i++ )
  31480. - (*i)->removeref();
  31481. -
  31482. -#ifdef DEBUG
  31483. - all_refblock.remove( this );
  31484. -#endif /*DEBUG*/
  31485. -}
  31486. -
  31487. -// Remove a ref
  31488. -void VImage::refblock::removeref() throw( VError )
  31489. -{
  31490. - nrefs--;
  31491. - if( nrefs < 0 )
  31492. - verror( "too many closes!" );
  31493. - if( nrefs == 0 )
  31494. - delete this;
  31495. -}
  31496. -
  31497. -// Init with name ... mode defaults to "rd"
  31498. -VImage::VImage( const char *name, const char *mode ) throw( VError )
  31499. -{
  31500. - _ref = new refblock;
  31501. -
  31502. - if( !(_ref->im = im_open( name, mode )) )
  31503. - verror();
  31504. - _ref->close_on_delete = 1;
  31505. -
  31506. -#ifdef DEBUG
  31507. - printf( "VImage::VImage( \"%s\", \"%s\" )\n", name, mode );
  31508. - _ref->debug_print();
  31509. -#endif /*DEBUG*/
  31510. -}
  31511. -
  31512. -// Build a VImage from an VipsImage structure
  31513. -VImage::VImage( _VipsImage *in )
  31514. -{
  31515. - _ref = new refblock;
  31516. -
  31517. - _ref->im = in;
  31518. - _ref->close_on_delete = 0;
  31519. -
  31520. -#ifdef DEBUG
  31521. - printf( "VImage::VImage( VipsImage* %p )\n", in );
  31522. - _ref->debug_print();
  31523. -#endif /*DEBUG*/
  31524. -}
  31525. -
  31526. -// Build from memory buffer
  31527. -VImage::VImage( void *buffer, int width, int height,
  31528. - int bands, TBandFmt format ) throw( VError )
  31529. -{
  31530. - _ref = new refblock;
  31531. -
  31532. - if( !(_ref->im = im_image( buffer, width, height,
  31533. - bands, VipsBandFmt( format ) )) )
  31534. - verror();
  31535. - _ref->close_on_delete = 1;
  31536. -
  31537. -#ifdef DEBUG
  31538. - printf( "VImage::VImage( void* %p, %d, %d )\n",
  31539. - buffer, width, height );
  31540. - _ref->debug_print();
  31541. -#endif /*DEBUG*/
  31542. -}
  31543. -
  31544. -// Empty init ... means open intermediate
  31545. -VImage::VImage() throw( VError )
  31546. -{
  31547. - static int id = 0;
  31548. - char filename[256];
  31549. -
  31550. - _ref = new refblock;
  31551. -
  31552. - /* This is not 100% safe if VIPS threading is not implemented on this
  31553. - * platform ... but it doesn't really matter.
  31554. - */
  31555. - g_mutex_lock( im__global_lock );
  31556. - im_snprintf( filename, 256, "intermediate image #%d", id++ );
  31557. - g_mutex_unlock( im__global_lock );
  31558. -
  31559. - if( !(_ref->im = im_open( filename, "p" )) )
  31560. - verror();
  31561. - _ref->close_on_delete = 1;
  31562. -
  31563. -#ifdef DEBUG
  31564. - printf( "VImage::VImage()\n" );
  31565. - _ref->debug_print();
  31566. -#endif /*DEBUG*/
  31567. -}
  31568. -
  31569. -// Copy constructor
  31570. -VImage::VImage( const VImage &a )
  31571. -{
  31572. - _ref = a._ref;
  31573. - _ref->nrefs++;
  31574. -}
  31575. -
  31576. -// Assignment
  31577. -VImage &VImage::operator=( const VImage &a ) throw( VError )
  31578. -{
  31579. - _ref->removeref();
  31580. - _ref = a._ref;
  31581. - _ref->nrefs++;
  31582. -
  31583. - return( *this );
  31584. -}
  31585. -
  31586. -// Extract underlying data pointer
  31587. -void *VImage::data() const throw( VError )
  31588. -{
  31589. - if( im_incheck( _ref->im ) )
  31590. - verror();
  31591. -
  31592. - return( (void *) _ref->im->data );
  31593. -}
  31594. -
  31595. -void VImage::debug_print()
  31596. -{
  31597. - im_printdesc( image() );
  31598. -}
  31599. -
  31600. -// Like jpeg2vips, but convert to a disc file rather than to memory
  31601. -// We can handle huge files without running out of RAM
  31602. -VImage VImage::convert2disc( const char* convert,
  31603. - const char* in, const char* disc ) throw( VError )
  31604. -{
  31605. - VImage out( disc, "w" );
  31606. -
  31607. - Vargv _vec( convert );
  31608. -
  31609. - _vec.data(0) = (im_object) in;
  31610. - _vec.data(1) = out.image();
  31611. - _vec.call();
  31612. -
  31613. - return( out );
  31614. -}
  31615. -
  31616. -// Write this to a VImage
  31617. -VImage VImage::write( VImage out ) throw( VError )
  31618. -{
  31619. - if( im_copy( _ref->im, out._ref->im ) )
  31620. - verror();
  31621. - out._ref->addref( _ref );
  31622. -
  31623. - return( out );
  31624. -}
  31625. -
  31626. -VImage VImage::write( const char *name ) throw( VError )
  31627. -{
  31628. - VImage out( name, "w" );
  31629. -
  31630. - if( im_copy( _ref->im, out._ref->im ) )
  31631. - verror();
  31632. - out._ref->addref( _ref );
  31633. -
  31634. - return( out );
  31635. -}
  31636. -
  31637. -VImage VImage::write() throw( VError )
  31638. -{
  31639. - VImage out( "VImage:w1", "t" );
  31640. -
  31641. - if( im_copy( _ref->im, out._ref->im ) )
  31642. - verror();
  31643. - out._ref->addref( _ref );
  31644. -
  31645. - return( out );
  31646. -}
  31647. -
  31648. -// Projection functions to get header fields
  31649. -int VImage::Xsize() { return( _ref->im->Xsize ); }
  31650. -int VImage::Ysize() { return( _ref->im->Ysize ); }
  31651. -int VImage::Bands() { return( _ref->im->Bands ); }
  31652. -VImage::TBandFmt VImage::BandFmt()
  31653. - { return( (TBandFmt) _ref->im->BandFmt ); }
  31654. -VImage::TCoding VImage::Coding()
  31655. - { return( (TCoding) _ref->im->Coding ); }
  31656. -VImage::TType VImage::Type() { return( (TType) _ref->im->Type ); }
  31657. -float VImage::Xres() { return( _ref->im->Xres ); }
  31658. -float VImage::Yres() { return( _ref->im->Yres ); }
  31659. -int VImage::Length() { return( _ref->im->Length ); }
  31660. -VImage::TCompression VImage::Compression()
  31661. - { return( (TCompression) _ref->im->Compression ); }
  31662. -short VImage::Level() { return( _ref->im->Level ); }
  31663. -int VImage::Xoffset() { return( _ref->im->Xoffset ); }
  31664. -int VImage::Yoffset() { return( _ref->im->Yoffset ); }
  31665. -
  31666. -// Derived fields
  31667. -const char *VImage::filename() { return( _ref->im->filename ); }
  31668. -const char *VImage::Hist() { return( im_history_get( _ref->im ) ); }
  31669. -
  31670. -// metadata
  31671. -
  31672. -// base functionality
  31673. -void VImage::meta_set( const char *field, GValue *value ) throw( VError )
  31674. -{
  31675. - if( im_meta_set( _ref->im, field, value ) )
  31676. - verror();
  31677. -}
  31678. -
  31679. -gboolean VImage::meta_remove( const char *field )
  31680. -{
  31681. - return( im_meta_remove( _ref->im, field ) );
  31682. -}
  31683. -
  31684. -void VImage::meta_get( const char *field, GValue *value_copy ) throw( VError )
  31685. -{
  31686. - if( im_meta_get( _ref->im, field, value_copy ) )
  31687. - verror();
  31688. -}
  31689. -
  31690. -GType VImage::meta_get_typeof( const char *field )
  31691. -{
  31692. - return( im_meta_get_typeof( _ref->im, field ) );
  31693. -}
  31694. -
  31695. -// convenience functions
  31696. -int VImage::meta_get_int( const char *field )
  31697. - throw( VError )
  31698. -{
  31699. - int result;
  31700. -
  31701. - if( im_meta_get_int( _ref->im, field, &result ) )
  31702. - verror();
  31703. -
  31704. - return( result );
  31705. -}
  31706. -
  31707. -double VImage::meta_get_double( const char *field )
  31708. - throw( VError )
  31709. -{
  31710. - double result;
  31711. -
  31712. - if( im_meta_get_double( _ref->im, field, &result ) )
  31713. - verror();
  31714. -
  31715. - return( result );
  31716. -}
  31717. -
  31718. -const char *VImage::meta_get_string( const char *field )
  31719. - throw( VError )
  31720. -{
  31721. - const char *result;
  31722. -
  31723. - if( im_meta_get_string( _ref->im, field, &result ) )
  31724. - verror();
  31725. -
  31726. - return( result );
  31727. -}
  31728. -
  31729. -void *VImage::meta_get_area( const char *field ) throw( VError )
  31730. -{
  31731. - void *result;
  31732. -
  31733. - if( im_meta_get_area( _ref->im, field, &result ) )
  31734. - verror();
  31735. -
  31736. - return( result );
  31737. -}
  31738. -
  31739. -void *VImage::meta_get_blob( const char *field, size_t *length ) throw( VError )
  31740. -{
  31741. - void *result;
  31742. -
  31743. - if( im_meta_get_blob( _ref->im, field, &result, length ) )
  31744. - verror();
  31745. -
  31746. - return( result );
  31747. -}
  31748. -
  31749. -void VImage::meta_set( const char *field, int value )
  31750. - throw( VError )
  31751. -{
  31752. - if( im_meta_set_int( _ref->im, field, value ) )
  31753. - verror();
  31754. -}
  31755. -
  31756. -void VImage::meta_set( const char *field, double value )
  31757. - throw( VError )
  31758. -{
  31759. - if( im_meta_set_double( _ref->im, field, value ) )
  31760. - verror();
  31761. -}
  31762. -
  31763. -void VImage::meta_set( const char *field, const char *value )
  31764. - throw( VError )
  31765. -{
  31766. - if( im_meta_set_string( _ref->im, field, value ) )
  31767. - verror();
  31768. -}
  31769. -
  31770. -void VImage::meta_set( const char *field,
  31771. - VCallback free_fn, void *value )
  31772. - throw( VError )
  31773. -{
  31774. - if( im_meta_set_area( _ref->im, field, free_fn, value ) )
  31775. - verror();
  31776. -}
  31777. -
  31778. -void VImage::meta_set( const char *field,
  31779. - VCallback free_fn, void *value, size_t length )
  31780. - throw( VError )
  31781. -{
  31782. - if( im_meta_set_blob( _ref->im, field, free_fn, value, length ) )
  31783. - verror();
  31784. -}
  31785. -
  31786. -// Set header fields and setbuf() in one go.
  31787. -void VImage::initdesc( int x, int y, int b,
  31788. - TBandFmt f, TCoding c, TType t, float xr, float yr, int xo, int yo )
  31789. - throw( VError )
  31790. -{
  31791. - im_initdesc( _ref->im, x, y, b, 0,
  31792. - VipsBandFmt( f ), VipsCoding( c ), VipsType( t ),
  31793. - xr, yr, xo, yo );
  31794. - if( im_setupout( _ref->im ) )
  31795. - verror();
  31796. -}
  31797. -
  31798. -// Create a Vargv from a name
  31799. -Vargv::Vargv( const char *name )
  31800. -{
  31801. - im_function *f = im_find_function( (char *) name );
  31802. -
  31803. - if( !f )
  31804. - verror();
  31805. -
  31806. - fn = (im__function *) f;
  31807. - base = new im_object[f->argc];
  31808. - if( im_allocate_vargv( f, base ) ) {
  31809. - delete[] base;
  31810. - verror();
  31811. - }
  31812. -}
  31813. -
  31814. -// Destroy a Vargv
  31815. -Vargv::~Vargv()
  31816. -{
  31817. - im_function *f = (im_function *) fn;
  31818. -
  31819. - // free any memory allocated for input vectors
  31820. - // this is the stuff allocated in each function during _object* build,
  31821. - // see vipsc++.cc
  31822. - for( int i = 0; i < f->argc; i++ ) {
  31823. - im_type_desc *ty = f->argv[i].desc;
  31824. -
  31825. - if( !(ty->flags & IM_TYPE_OUTPUT) ) {
  31826. - if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 ||
  31827. - strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 ||
  31828. - strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) {
  31829. - // will work for doublevec and intvec too
  31830. - im_imagevec_object *io =
  31831. - (im_imagevec_object *) base[i];
  31832. -
  31833. - if( io->vec ) {
  31834. - delete[] io->vec;
  31835. - io->vec = NULL;
  31836. - }
  31837. - }
  31838. - else if( strcmp( ty->type, IM_TYPE_INTERPOLATE ) == 0 )
  31839. - g_object_unref( base[i] );
  31840. - }
  31841. - }
  31842. -
  31843. - im_free_vargv( f, base );
  31844. - delete[] base;
  31845. -}
  31846. -
  31847. -// Call the function
  31848. -void
  31849. -Vargv::call()
  31850. -{
  31851. - im_function *f = (im_function *) fn;
  31852. -
  31853. - if( f->disp( base ) )
  31854. - verror();
  31855. -}
  31856. -
  31857. -/* Insert automatically generated wrappers for VIPS image processing
  31858. - * functions.
  31859. - */
  31860. -#include "vipsc++.cc"
  31861. -
  31862. -VIPS_NAMESPACE_END
  31863. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/vipsc++.cc vips-7.38.5/libvipsCC/vipsc++.cc
  31864. --- vips-7.38.5-vanilla/libvipsCC/vipsc++.cc 2014-07-17 23:48:36.237794473 -0400
  31865. +++ vips-7.38.5/libvipsCC/vipsc++.cc 1969-12-31 19:00:00.000000000 -0500
  31866. @@ -1,6202 +0,0 @@
  31867. -
  31868. -// bodies for package arithmetic
  31869. -// this file automatically generated from
  31870. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  31871. -// im_abs: absolute value
  31872. -VImage VImage::abs() throw( VError )
  31873. -{
  31874. - VImage in = *this;
  31875. - VImage out;
  31876. -
  31877. - Vargv _vec( "im_abs" );
  31878. -
  31879. - _vec.data(0) = in.image();
  31880. - _vec.data(1) = out.image();
  31881. - _vec.call();
  31882. - out._ref->addref( in._ref );
  31883. -
  31884. - return( out );
  31885. -}
  31886. -
  31887. -// im_acostra: acos of image (result in degrees)
  31888. -VImage VImage::acos() throw( VError )
  31889. -{
  31890. - VImage in = *this;
  31891. - VImage out;
  31892. -
  31893. - Vargv _vec( "im_acostra" );
  31894. -
  31895. - _vec.data(0) = in.image();
  31896. - _vec.data(1) = out.image();
  31897. - _vec.call();
  31898. - out._ref->addref( in._ref );
  31899. -
  31900. - return( out );
  31901. -}
  31902. -
  31903. -// im_add: add two images
  31904. -VImage VImage::add( VImage in2 ) throw( VError )
  31905. -{
  31906. - VImage in1 = *this;
  31907. - VImage out;
  31908. -
  31909. - Vargv _vec( "im_add" );
  31910. -
  31911. - _vec.data(0) = in1.image();
  31912. - _vec.data(1) = in2.image();
  31913. - _vec.data(2) = out.image();
  31914. - _vec.call();
  31915. - out._ref->addref( in1._ref );
  31916. - out._ref->addref( in2._ref );
  31917. -
  31918. - return( out );
  31919. -}
  31920. -
  31921. -// im_asintra: asin of image (result in degrees)
  31922. -VImage VImage::asin() throw( VError )
  31923. -{
  31924. - VImage in = *this;
  31925. - VImage out;
  31926. -
  31927. - Vargv _vec( "im_asintra" );
  31928. -
  31929. - _vec.data(0) = in.image();
  31930. - _vec.data(1) = out.image();
  31931. - _vec.call();
  31932. - out._ref->addref( in._ref );
  31933. -
  31934. - return( out );
  31935. -}
  31936. -
  31937. -// im_atantra: atan of image (result in degrees)
  31938. -VImage VImage::atan() throw( VError )
  31939. -{
  31940. - VImage in = *this;
  31941. - VImage out;
  31942. -
  31943. - Vargv _vec( "im_atantra" );
  31944. -
  31945. - _vec.data(0) = in.image();
  31946. - _vec.data(1) = out.image();
  31947. - _vec.call();
  31948. - out._ref->addref( in._ref );
  31949. -
  31950. - return( out );
  31951. -}
  31952. -
  31953. -// im_avg: average value of image
  31954. -double VImage::avg() throw( VError )
  31955. -{
  31956. - VImage in = *this;
  31957. - double value;
  31958. -
  31959. - Vargv _vec( "im_avg" );
  31960. -
  31961. - _vec.data(0) = in.image();
  31962. - _vec.call();
  31963. - value = *((double*)_vec.data(1));
  31964. -
  31965. - return( value );
  31966. -}
  31967. -
  31968. -// im_point: interpolate value at single point
  31969. -double VImage::point( char* interpolate, double x, double y, int band ) throw( VError )
  31970. -{
  31971. - VImage in = *this;
  31972. - double out;
  31973. -
  31974. - Vargv _vec( "im_point" );
  31975. -
  31976. - _vec.data(0) = in.image();
  31977. - if( vips__input_interpolate_init( &_vec.data(1), interpolate ) )
  31978. - verror();
  31979. - *((double*) _vec.data(2)) = x;
  31980. - *((double*) _vec.data(3)) = y;
  31981. - *((int*) _vec.data(4)) = band;
  31982. - _vec.call();
  31983. - out = *((double*)_vec.data(5));
  31984. -
  31985. - return( out );
  31986. -}
  31987. -
  31988. -// im_point_bilinear: interpolate value at single point, linearly
  31989. -double VImage::point_bilinear( double x, double y, int band ) throw( VError )
  31990. -{
  31991. - VImage in = *this;
  31992. - double val;
  31993. -
  31994. - Vargv _vec( "im_point_bilinear" );
  31995. -
  31996. - _vec.data(0) = in.image();
  31997. - *((double*) _vec.data(1)) = x;
  31998. - *((double*) _vec.data(2)) = y;
  31999. - *((int*) _vec.data(3)) = band;
  32000. - _vec.call();
  32001. - val = *((double*)_vec.data(4));
  32002. -
  32003. - return( val );
  32004. -}
  32005. -
  32006. -// im_bandmean: average image bands
  32007. -VImage VImage::bandmean() throw( VError )
  32008. -{
  32009. - VImage in = *this;
  32010. - VImage out;
  32011. -
  32012. - Vargv _vec( "im_bandmean" );
  32013. -
  32014. - _vec.data(0) = in.image();
  32015. - _vec.data(1) = out.image();
  32016. - _vec.call();
  32017. - out._ref->addref( in._ref );
  32018. -
  32019. - return( out );
  32020. -}
  32021. -
  32022. -// im_ceil: round to smallest integer value not less than
  32023. -VImage VImage::ceil() throw( VError )
  32024. -{
  32025. - VImage in = *this;
  32026. - VImage out;
  32027. -
  32028. - Vargv _vec( "im_ceil" );
  32029. -
  32030. - _vec.data(0) = in.image();
  32031. - _vec.data(1) = out.image();
  32032. - _vec.call();
  32033. - out._ref->addref( in._ref );
  32034. -
  32035. - return( out );
  32036. -}
  32037. -
  32038. -// im_costra: cos of image (angles in degrees)
  32039. -VImage VImage::cos() throw( VError )
  32040. -{
  32041. - VImage in = *this;
  32042. - VImage out;
  32043. -
  32044. - Vargv _vec( "im_costra" );
  32045. -
  32046. - _vec.data(0) = in.image();
  32047. - _vec.data(1) = out.image();
  32048. - _vec.call();
  32049. - out._ref->addref( in._ref );
  32050. -
  32051. - return( out );
  32052. -}
  32053. -
  32054. -// im_cross_phase: phase of cross power spectrum of two complex images
  32055. -VImage VImage::cross_phase( VImage in2 ) throw( VError )
  32056. -{
  32057. - VImage in1 = *this;
  32058. - VImage out;
  32059. -
  32060. - Vargv _vec( "im_cross_phase" );
  32061. -
  32062. - _vec.data(0) = in1.image();
  32063. - _vec.data(1) = in2.image();
  32064. - _vec.data(2) = out.image();
  32065. - _vec.call();
  32066. - out._ref->addref( in1._ref );
  32067. - out._ref->addref( in2._ref );
  32068. -
  32069. - return( out );
  32070. -}
  32071. -
  32072. -// im_deviate: standard deviation of image
  32073. -double VImage::deviate() throw( VError )
  32074. -{
  32075. - VImage in = *this;
  32076. - double value;
  32077. -
  32078. - Vargv _vec( "im_deviate" );
  32079. -
  32080. - _vec.data(0) = in.image();
  32081. - _vec.call();
  32082. - value = *((double*)_vec.data(1));
  32083. -
  32084. - return( value );
  32085. -}
  32086. -
  32087. -// im_divide: divide two images
  32088. -VImage VImage::divide( VImage in2 ) throw( VError )
  32089. -{
  32090. - VImage in1 = *this;
  32091. - VImage out;
  32092. -
  32093. - Vargv _vec( "im_divide" );
  32094. -
  32095. - _vec.data(0) = in1.image();
  32096. - _vec.data(1) = in2.image();
  32097. - _vec.data(2) = out.image();
  32098. - _vec.call();
  32099. - out._ref->addref( in1._ref );
  32100. - out._ref->addref( in2._ref );
  32101. -
  32102. - return( out );
  32103. -}
  32104. -
  32105. -// im_exp10tra: 10^pel of image
  32106. -VImage VImage::exp10() throw( VError )
  32107. -{
  32108. - VImage in = *this;
  32109. - VImage out;
  32110. -
  32111. - Vargv _vec( "im_exp10tra" );
  32112. -
  32113. - _vec.data(0) = in.image();
  32114. - _vec.data(1) = out.image();
  32115. - _vec.call();
  32116. - out._ref->addref( in._ref );
  32117. -
  32118. - return( out );
  32119. -}
  32120. -
  32121. -// im_expntra: x^pel of image
  32122. -VImage VImage::expn( double x ) throw( VError )
  32123. -{
  32124. - VImage in = *this;
  32125. - VImage out;
  32126. -
  32127. - Vargv _vec( "im_expntra" );
  32128. -
  32129. - _vec.data(0) = in.image();
  32130. - _vec.data(1) = out.image();
  32131. - *((double*) _vec.data(2)) = x;
  32132. - _vec.call();
  32133. - out._ref->addref( in._ref );
  32134. -
  32135. - return( out );
  32136. -}
  32137. -
  32138. -// im_expntra_vec: [x,y,z]^pel of image
  32139. -VImage VImage::expn( std::vector<double> v ) throw( VError )
  32140. -{
  32141. - VImage in = *this;
  32142. - VImage out;
  32143. -
  32144. - Vargv _vec( "im_expntra_vec" );
  32145. -
  32146. - _vec.data(0) = in.image();
  32147. - _vec.data(1) = out.image();
  32148. - ((im_doublevec_object*) _vec.data(2))->n = v.size();
  32149. - ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()];
  32150. - for( unsigned int i = 0; i < v.size(); i++ )
  32151. - ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i];
  32152. - _vec.call();
  32153. - out._ref->addref( in._ref );
  32154. -
  32155. - return( out );
  32156. -}
  32157. -
  32158. -// im_exptra: e^pel of image
  32159. -VImage VImage::exp() throw( VError )
  32160. -{
  32161. - VImage in = *this;
  32162. - VImage out;
  32163. -
  32164. - Vargv _vec( "im_exptra" );
  32165. -
  32166. - _vec.data(0) = in.image();
  32167. - _vec.data(1) = out.image();
  32168. - _vec.call();
  32169. - out._ref->addref( in._ref );
  32170. -
  32171. - return( out );
  32172. -}
  32173. -
  32174. -// im_floor: round to largest integer value not greater than
  32175. -VImage VImage::floor() throw( VError )
  32176. -{
  32177. - VImage in = *this;
  32178. - VImage out;
  32179. -
  32180. - Vargv _vec( "im_floor" );
  32181. -
  32182. - _vec.data(0) = in.image();
  32183. - _vec.data(1) = out.image();
  32184. - _vec.call();
  32185. - out._ref->addref( in._ref );
  32186. -
  32187. - return( out );
  32188. -}
  32189. -
  32190. -// im_invert: photographic negative
  32191. -VImage VImage::invert() throw( VError )
  32192. -{
  32193. - VImage in = *this;
  32194. - VImage out;
  32195. -
  32196. - Vargv _vec( "im_invert" );
  32197. -
  32198. - _vec.data(0) = in.image();
  32199. - _vec.data(1) = out.image();
  32200. - _vec.call();
  32201. - out._ref->addref( in._ref );
  32202. -
  32203. - return( out );
  32204. -}
  32205. -
  32206. -// im_lintra: calculate a*in + b = outfile
  32207. -VImage VImage::lin( double a, double b ) throw( VError )
  32208. -{
  32209. - VImage in = *this;
  32210. - VImage out;
  32211. -
  32212. - Vargv _vec( "im_lintra" );
  32213. -
  32214. - *((double*) _vec.data(0)) = a;
  32215. - _vec.data(1) = in.image();
  32216. - *((double*) _vec.data(2)) = b;
  32217. - _vec.data(3) = out.image();
  32218. - _vec.call();
  32219. - out._ref->addref( in._ref );
  32220. -
  32221. - return( out );
  32222. -}
  32223. -
  32224. -// im_linreg: pixelwise linear regression
  32225. -VImage VImage::linreg( std::vector<VImage> ins, std::vector<double> xs ) throw( VError )
  32226. -{
  32227. - VImage out;
  32228. -
  32229. - Vargv _vec( "im_linreg" );
  32230. -
  32231. - ((im_imagevec_object*) _vec.data(0))->n = ins.size();
  32232. - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[ins.size()];
  32233. - for( unsigned int i = 0; i < ins.size(); i++ )
  32234. - ((im_imagevec_object*) _vec.data(0))->vec[i] = ins[i].image();
  32235. - _vec.data(1) = out.image();
  32236. - ((im_doublevec_object*) _vec.data(2))->n = xs.size();
  32237. - ((im_doublevec_object*) _vec.data(2))->vec = new double[xs.size()];
  32238. - for( unsigned int i = 0; i < xs.size(); i++ )
  32239. - ((im_doublevec_object*) _vec.data(2))->vec[i] = xs[i];
  32240. - _vec.call();
  32241. - for( unsigned int i = 0; i < ins.size(); i++ )
  32242. - out._ref->addref( ins[i]._ref );
  32243. -
  32244. - return( out );
  32245. -}
  32246. -
  32247. -// im_lintra_vec: calculate a*in + b -> out, a and b vectors
  32248. -VImage VImage::lin( std::vector<double> a, std::vector<double> b ) throw( VError )
  32249. -{
  32250. - VImage in = *this;
  32251. - VImage out;
  32252. -
  32253. - Vargv _vec( "im_lintra_vec" );
  32254. -
  32255. - ((im_doublevec_object*) _vec.data(0))->n = a.size();
  32256. - ((im_doublevec_object*) _vec.data(0))->vec = new double[a.size()];
  32257. - for( unsigned int i = 0; i < a.size(); i++ )
  32258. - ((im_doublevec_object*) _vec.data(0))->vec[i] = a[i];
  32259. - _vec.data(1) = in.image();
  32260. - ((im_doublevec_object*) _vec.data(2))->n = b.size();
  32261. - ((im_doublevec_object*) _vec.data(2))->vec = new double[b.size()];
  32262. - for( unsigned int i = 0; i < b.size(); i++ )
  32263. - ((im_doublevec_object*) _vec.data(2))->vec[i] = b[i];
  32264. - _vec.data(3) = out.image();
  32265. - _vec.call();
  32266. - out._ref->addref( in._ref );
  32267. -
  32268. - return( out );
  32269. -}
  32270. -
  32271. -// im_log10tra: log10 of image
  32272. -VImage VImage::log10() throw( VError )
  32273. -{
  32274. - VImage in = *this;
  32275. - VImage out;
  32276. -
  32277. - Vargv _vec( "im_log10tra" );
  32278. -
  32279. - _vec.data(0) = in.image();
  32280. - _vec.data(1) = out.image();
  32281. - _vec.call();
  32282. - out._ref->addref( in._ref );
  32283. -
  32284. - return( out );
  32285. -}
  32286. -
  32287. -// im_logtra: ln of image
  32288. -VImage VImage::log() throw( VError )
  32289. -{
  32290. - VImage in = *this;
  32291. - VImage out;
  32292. -
  32293. - Vargv _vec( "im_logtra" );
  32294. -
  32295. - _vec.data(0) = in.image();
  32296. - _vec.data(1) = out.image();
  32297. - _vec.call();
  32298. - out._ref->addref( in._ref );
  32299. -
  32300. - return( out );
  32301. -}
  32302. -
  32303. -// im_max: maximum value of image
  32304. -double VImage::max() throw( VError )
  32305. -{
  32306. - VImage in = *this;
  32307. - double value;
  32308. -
  32309. - Vargv _vec( "im_max" );
  32310. -
  32311. - _vec.data(0) = in.image();
  32312. - _vec.call();
  32313. - value = *((double*)_vec.data(1));
  32314. -
  32315. - return( value );
  32316. -}
  32317. -
  32318. -// im_maxpos: position of maximum value of image
  32319. -std::complex<double> VImage::maxpos() throw( VError )
  32320. -{
  32321. - VImage in = *this;
  32322. - std::complex<double> position;
  32323. -
  32324. - Vargv _vec( "im_maxpos" );
  32325. -
  32326. - _vec.data(0) = in.image();
  32327. - _vec.call();
  32328. - position = *((std::complex<double>*)_vec.data(1));
  32329. -
  32330. - return( position );
  32331. -}
  32332. -
  32333. -// im_maxpos_avg: position of maximum value of image, averaging in case of draw
  32334. -double VImage::maxpos_avg( double& y, double& out ) throw( VError )
  32335. -{
  32336. - VImage in = *this;
  32337. - double x;
  32338. -
  32339. - Vargv _vec( "im_maxpos_avg" );
  32340. -
  32341. - _vec.data(0) = in.image();
  32342. - _vec.call();
  32343. - x = *((double*)_vec.data(1));
  32344. - y = *((double*)_vec.data(2));
  32345. - out = *((double*)_vec.data(3));
  32346. -
  32347. - return( x );
  32348. -}
  32349. -
  32350. -// im_measure: measure averages of a grid of patches
  32351. -VDMask VImage::measure( int x, int y, int w, int h, int h_patches, int v_patches ) throw( VError )
  32352. -{
  32353. - VImage in = *this;
  32354. - VDMask mask;
  32355. -
  32356. - Vargv _vec( "im_measure" );
  32357. -
  32358. - _vec.data(0) = in.image();
  32359. - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
  32360. - *((int*) _vec.data(2)) = x;
  32361. - *((int*) _vec.data(3)) = y;
  32362. - *((int*) _vec.data(4)) = w;
  32363. - *((int*) _vec.data(5)) = h;
  32364. - *((int*) _vec.data(6)) = h_patches;
  32365. - *((int*) _vec.data(7)) = v_patches;
  32366. - _vec.call();
  32367. - mask.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
  32368. -
  32369. - return( mask );
  32370. -}
  32371. -
  32372. -// im_min: minimum value of image
  32373. -double VImage::min() throw( VError )
  32374. -{
  32375. - VImage in = *this;
  32376. - double value;
  32377. -
  32378. - Vargv _vec( "im_min" );
  32379. -
  32380. - _vec.data(0) = in.image();
  32381. - _vec.call();
  32382. - value = *((double*)_vec.data(1));
  32383. -
  32384. - return( value );
  32385. -}
  32386. -
  32387. -// im_minpos: position of minimum value of image
  32388. -std::complex<double> VImage::minpos() throw( VError )
  32389. -{
  32390. - VImage in = *this;
  32391. - std::complex<double> position;
  32392. -
  32393. - Vargv _vec( "im_minpos" );
  32394. -
  32395. - _vec.data(0) = in.image();
  32396. - _vec.call();
  32397. - position = *((std::complex<double>*)_vec.data(1));
  32398. -
  32399. - return( position );
  32400. -}
  32401. -
  32402. -// im_multiply: multiply two images
  32403. -VImage VImage::multiply( VImage in2 ) throw( VError )
  32404. -{
  32405. - VImage in1 = *this;
  32406. - VImage out;
  32407. -
  32408. - Vargv _vec( "im_multiply" );
  32409. -
  32410. - _vec.data(0) = in1.image();
  32411. - _vec.data(1) = in2.image();
  32412. - _vec.data(2) = out.image();
  32413. - _vec.call();
  32414. - out._ref->addref( in1._ref );
  32415. - out._ref->addref( in2._ref );
  32416. -
  32417. - return( out );
  32418. -}
  32419. -
  32420. -// im_powtra: pel^x of image
  32421. -VImage VImage::pow( double x ) throw( VError )
  32422. -{
  32423. - VImage in = *this;
  32424. - VImage out;
  32425. -
  32426. - Vargv _vec( "im_powtra" );
  32427. -
  32428. - _vec.data(0) = in.image();
  32429. - _vec.data(1) = out.image();
  32430. - *((double*) _vec.data(2)) = x;
  32431. - _vec.call();
  32432. - out._ref->addref( in._ref );
  32433. -
  32434. - return( out );
  32435. -}
  32436. -
  32437. -// im_powtra_vec: pel^[x,y,z] of image
  32438. -VImage VImage::pow( std::vector<double> v ) throw( VError )
  32439. -{
  32440. - VImage in = *this;
  32441. - VImage out;
  32442. -
  32443. - Vargv _vec( "im_powtra_vec" );
  32444. -
  32445. - _vec.data(0) = in.image();
  32446. - _vec.data(1) = out.image();
  32447. - ((im_doublevec_object*) _vec.data(2))->n = v.size();
  32448. - ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()];
  32449. - for( unsigned int i = 0; i < v.size(); i++ )
  32450. - ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i];
  32451. - _vec.call();
  32452. - out._ref->addref( in._ref );
  32453. -
  32454. - return( out );
  32455. -}
  32456. -
  32457. -// im_recomb: linear recombination with mask
  32458. -VImage VImage::recomb( VDMask matrix ) throw( VError )
  32459. -{
  32460. - VImage in = *this;
  32461. - VImage out;
  32462. -
  32463. - Vargv _vec( "im_recomb" );
  32464. -
  32465. - _vec.data(0) = in.image();
  32466. - _vec.data(1) = out.image();
  32467. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  32468. - _vec.call();
  32469. - out._ref->addref( in._ref );
  32470. -
  32471. - return( out );
  32472. -}
  32473. -
  32474. -// im_remainder: remainder after integer division
  32475. -VImage VImage::remainder( VImage in2 ) throw( VError )
  32476. -{
  32477. - VImage in1 = *this;
  32478. - VImage out;
  32479. -
  32480. - Vargv _vec( "im_remainder" );
  32481. -
  32482. - _vec.data(0) = in1.image();
  32483. - _vec.data(1) = in2.image();
  32484. - _vec.data(2) = out.image();
  32485. - _vec.call();
  32486. - out._ref->addref( in1._ref );
  32487. - out._ref->addref( in2._ref );
  32488. -
  32489. - return( out );
  32490. -}
  32491. -
  32492. -// im_remainderconst: remainder after integer division by a constant
  32493. -VImage VImage::remainder( double x ) throw( VError )
  32494. -{
  32495. - VImage in = *this;
  32496. - VImage out;
  32497. -
  32498. - Vargv _vec( "im_remainderconst" );
  32499. -
  32500. - _vec.data(0) = in.image();
  32501. - _vec.data(1) = out.image();
  32502. - *((double*) _vec.data(2)) = x;
  32503. - _vec.call();
  32504. - out._ref->addref( in._ref );
  32505. -
  32506. - return( out );
  32507. -}
  32508. -
  32509. -// im_remainder_vec: remainder after integer division by a vector of constants
  32510. -VImage VImage::remainder( std::vector<double> x ) throw( VError )
  32511. -{
  32512. - VImage in = *this;
  32513. - VImage out;
  32514. -
  32515. - Vargv _vec( "im_remainder_vec" );
  32516. -
  32517. - _vec.data(0) = in.image();
  32518. - _vec.data(1) = out.image();
  32519. - ((im_doublevec_object*) _vec.data(2))->n = x.size();
  32520. - ((im_doublevec_object*) _vec.data(2))->vec = new double[x.size()];
  32521. - for( unsigned int i = 0; i < x.size(); i++ )
  32522. - ((im_doublevec_object*) _vec.data(2))->vec[i] = x[i];
  32523. - _vec.call();
  32524. - out._ref->addref( in._ref );
  32525. -
  32526. - return( out );
  32527. -}
  32528. -
  32529. -// im_rint: round to nearest integer value
  32530. -VImage VImage::rint() throw( VError )
  32531. -{
  32532. - VImage in = *this;
  32533. - VImage out;
  32534. -
  32535. - Vargv _vec( "im_rint" );
  32536. -
  32537. - _vec.data(0) = in.image();
  32538. - _vec.data(1) = out.image();
  32539. - _vec.call();
  32540. - out._ref->addref( in._ref );
  32541. -
  32542. - return( out );
  32543. -}
  32544. -
  32545. -// im_sign: unit vector in direction of value
  32546. -VImage VImage::sign() throw( VError )
  32547. -{
  32548. - VImage in = *this;
  32549. - VImage out;
  32550. -
  32551. - Vargv _vec( "im_sign" );
  32552. -
  32553. - _vec.data(0) = in.image();
  32554. - _vec.data(1) = out.image();
  32555. - _vec.call();
  32556. - out._ref->addref( in._ref );
  32557. -
  32558. - return( out );
  32559. -}
  32560. -
  32561. -// im_sintra: sin of image (angles in degrees)
  32562. -VImage VImage::sin() throw( VError )
  32563. -{
  32564. - VImage in = *this;
  32565. - VImage out;
  32566. -
  32567. - Vargv _vec( "im_sintra" );
  32568. -
  32569. - _vec.data(0) = in.image();
  32570. - _vec.data(1) = out.image();
  32571. - _vec.call();
  32572. - out._ref->addref( in._ref );
  32573. -
  32574. - return( out );
  32575. -}
  32576. -
  32577. -// im_stats: many image statistics in one pass
  32578. -VDMask VImage::stats() throw( VError )
  32579. -{
  32580. - VImage in = *this;
  32581. - VDMask statistics;
  32582. -
  32583. - Vargv _vec( "im_stats" );
  32584. -
  32585. - _vec.data(0) = in.image();
  32586. - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
  32587. - _vec.call();
  32588. - statistics.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
  32589. -
  32590. - return( statistics );
  32591. -}
  32592. -
  32593. -// im_subtract: subtract two images
  32594. -VImage VImage::subtract( VImage in2 ) throw( VError )
  32595. -{
  32596. - VImage in1 = *this;
  32597. - VImage out;
  32598. -
  32599. - Vargv _vec( "im_subtract" );
  32600. -
  32601. - _vec.data(0) = in1.image();
  32602. - _vec.data(1) = in2.image();
  32603. - _vec.data(2) = out.image();
  32604. - _vec.call();
  32605. - out._ref->addref( in1._ref );
  32606. - out._ref->addref( in2._ref );
  32607. -
  32608. - return( out );
  32609. -}
  32610. -
  32611. -// im_tantra: tan of image (angles in degrees)
  32612. -VImage VImage::tan() throw( VError )
  32613. -{
  32614. - VImage in = *this;
  32615. - VImage out;
  32616. -
  32617. - Vargv _vec( "im_tantra" );
  32618. -
  32619. - _vec.data(0) = in.image();
  32620. - _vec.data(1) = out.image();
  32621. - _vec.call();
  32622. - out._ref->addref( in._ref );
  32623. -
  32624. - return( out );
  32625. -}
  32626. -
  32627. -
  32628. -// bodies for package cimg
  32629. -// this file automatically generated from
  32630. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  32631. -// im_greyc: noise-removing filter
  32632. -VImage VImage::greyc( int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError )
  32633. -{
  32634. - VImage src = *this;
  32635. - VImage dst;
  32636. -
  32637. - Vargv _vec( "im_greyc" );
  32638. -
  32639. - _vec.data(0) = src.image();
  32640. - _vec.data(1) = dst.image();
  32641. - *((int*) _vec.data(2)) = iterations;
  32642. - *((double*) _vec.data(3)) = amplitude;
  32643. - *((double*) _vec.data(4)) = sharpness;
  32644. - *((double*) _vec.data(5)) = anisotropy;
  32645. - *((double*) _vec.data(6)) = alpha;
  32646. - *((double*) _vec.data(7)) = sigma;
  32647. - *((double*) _vec.data(8)) = dl;
  32648. - *((double*) _vec.data(9)) = da;
  32649. - *((double*) _vec.data(10)) = gauss_prec;
  32650. - *((int*) _vec.data(11)) = interpolation;
  32651. - *((int*) _vec.data(12)) = fast_approx;
  32652. - _vec.call();
  32653. - dst._ref->addref( src._ref );
  32654. -
  32655. - return( dst );
  32656. -}
  32657. -
  32658. -// im_greyc_mask: noise-removing filter, with a mask
  32659. -VImage VImage::greyc_mask( VImage mask, int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError )
  32660. -{
  32661. - VImage src = *this;
  32662. - VImage dst;
  32663. -
  32664. - Vargv _vec( "im_greyc_mask" );
  32665. -
  32666. - _vec.data(0) = src.image();
  32667. - _vec.data(1) = dst.image();
  32668. - _vec.data(2) = mask.image();
  32669. - *((int*) _vec.data(3)) = iterations;
  32670. - *((double*) _vec.data(4)) = amplitude;
  32671. - *((double*) _vec.data(5)) = sharpness;
  32672. - *((double*) _vec.data(6)) = anisotropy;
  32673. - *((double*) _vec.data(7)) = alpha;
  32674. - *((double*) _vec.data(8)) = sigma;
  32675. - *((double*) _vec.data(9)) = dl;
  32676. - *((double*) _vec.data(10)) = da;
  32677. - *((double*) _vec.data(11)) = gauss_prec;
  32678. - *((int*) _vec.data(12)) = interpolation;
  32679. - *((int*) _vec.data(13)) = fast_approx;
  32680. - _vec.call();
  32681. - dst._ref->addref( src._ref );
  32682. - dst._ref->addref( mask._ref );
  32683. -
  32684. - return( dst );
  32685. -}
  32686. -
  32687. -
  32688. -// bodies for package colour
  32689. -// this file automatically generated from
  32690. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  32691. -// im_LCh2Lab: convert LCh to Lab
  32692. -VImage VImage::LCh2Lab() throw( VError )
  32693. -{
  32694. - VImage in = *this;
  32695. - VImage out;
  32696. -
  32697. - Vargv _vec( "im_LCh2Lab" );
  32698. -
  32699. - _vec.data(0) = in.image();
  32700. - _vec.data(1) = out.image();
  32701. - _vec.call();
  32702. - out._ref->addref( in._ref );
  32703. -
  32704. - return( out );
  32705. -}
  32706. -
  32707. -// im_LCh2UCS: convert LCh to UCS
  32708. -VImage VImage::LCh2UCS() throw( VError )
  32709. -{
  32710. - VImage in = *this;
  32711. - VImage out;
  32712. -
  32713. - Vargv _vec( "im_LCh2UCS" );
  32714. -
  32715. - _vec.data(0) = in.image();
  32716. - _vec.data(1) = out.image();
  32717. - _vec.call();
  32718. - out._ref->addref( in._ref );
  32719. -
  32720. - return( out );
  32721. -}
  32722. -
  32723. -// im_Lab2LCh: convert Lab to LCh
  32724. -VImage VImage::Lab2LCh() throw( VError )
  32725. -{
  32726. - VImage in = *this;
  32727. - VImage out;
  32728. -
  32729. - Vargv _vec( "im_Lab2LCh" );
  32730. -
  32731. - _vec.data(0) = in.image();
  32732. - _vec.data(1) = out.image();
  32733. - _vec.call();
  32734. - out._ref->addref( in._ref );
  32735. -
  32736. - return( out );
  32737. -}
  32738. -
  32739. -// im_Lab2LabQ: convert Lab to LabQ
  32740. -VImage VImage::Lab2LabQ() throw( VError )
  32741. -{
  32742. - VImage in = *this;
  32743. - VImage out;
  32744. -
  32745. - Vargv _vec( "im_Lab2LabQ" );
  32746. -
  32747. - _vec.data(0) = in.image();
  32748. - _vec.data(1) = out.image();
  32749. - _vec.call();
  32750. - out._ref->addref( in._ref );
  32751. -
  32752. - return( out );
  32753. -}
  32754. -
  32755. -// im_Lab2LabS: convert Lab to LabS
  32756. -VImage VImage::Lab2LabS() throw( VError )
  32757. -{
  32758. - VImage in = *this;
  32759. - VImage out;
  32760. -
  32761. - Vargv _vec( "im_Lab2LabS" );
  32762. -
  32763. - _vec.data(0) = in.image();
  32764. - _vec.data(1) = out.image();
  32765. - _vec.call();
  32766. - out._ref->addref( in._ref );
  32767. -
  32768. - return( out );
  32769. -}
  32770. -
  32771. -// im_Lab2UCS: convert Lab to UCS
  32772. -VImage VImage::Lab2UCS() throw( VError )
  32773. -{
  32774. - VImage in = *this;
  32775. - VImage out;
  32776. -
  32777. - Vargv _vec( "im_Lab2UCS" );
  32778. -
  32779. - _vec.data(0) = in.image();
  32780. - _vec.data(1) = out.image();
  32781. - _vec.call();
  32782. - out._ref->addref( in._ref );
  32783. -
  32784. - return( out );
  32785. -}
  32786. -
  32787. -// im_Lab2XYZ: convert D65 Lab to XYZ
  32788. -VImage VImage::Lab2XYZ() throw( VError )
  32789. -{
  32790. - VImage in = *this;
  32791. - VImage out;
  32792. -
  32793. - Vargv _vec( "im_Lab2XYZ" );
  32794. -
  32795. - _vec.data(0) = in.image();
  32796. - _vec.data(1) = out.image();
  32797. - _vec.call();
  32798. - out._ref->addref( in._ref );
  32799. -
  32800. - return( out );
  32801. -}
  32802. -
  32803. -// im_Lab2XYZ_temp: convert Lab to XYZ, with a specified colour temperature
  32804. -VImage VImage::Lab2XYZ_temp( double X0, double Y0, double Z0 ) throw( VError )
  32805. -{
  32806. - VImage in = *this;
  32807. - VImage out;
  32808. -
  32809. - Vargv _vec( "im_Lab2XYZ_temp" );
  32810. -
  32811. - _vec.data(0) = in.image();
  32812. - _vec.data(1) = out.image();
  32813. - *((double*) _vec.data(2)) = X0;
  32814. - *((double*) _vec.data(3)) = Y0;
  32815. - *((double*) _vec.data(4)) = Z0;
  32816. - _vec.call();
  32817. - out._ref->addref( in._ref );
  32818. -
  32819. - return( out );
  32820. -}
  32821. -
  32822. -// im_Lab2disp: convert Lab to displayable
  32823. -VImage VImage::Lab2disp( VDisplay disp ) throw( VError )
  32824. -{
  32825. - VImage in = *this;
  32826. - VImage out;
  32827. -
  32828. - Vargv _vec( "im_Lab2disp" );
  32829. -
  32830. - _vec.data(0) = in.image();
  32831. - _vec.data(1) = out.image();
  32832. - _vec.data(2) = disp.disp();
  32833. - _vec.call();
  32834. - out._ref->addref( in._ref );
  32835. -
  32836. - return( out );
  32837. -}
  32838. -
  32839. -// im_LabQ2LabS: convert LabQ to LabS
  32840. -VImage VImage::LabQ2LabS() throw( VError )
  32841. -{
  32842. - VImage in = *this;
  32843. - VImage out;
  32844. -
  32845. - Vargv _vec( "im_LabQ2LabS" );
  32846. -
  32847. - _vec.data(0) = in.image();
  32848. - _vec.data(1) = out.image();
  32849. - _vec.call();
  32850. - out._ref->addref( in._ref );
  32851. -
  32852. - return( out );
  32853. -}
  32854. -
  32855. -// im_LabQ2Lab: convert LabQ to Lab
  32856. -VImage VImage::LabQ2Lab() throw( VError )
  32857. -{
  32858. - VImage in = *this;
  32859. - VImage out;
  32860. -
  32861. - Vargv _vec( "im_LabQ2Lab" );
  32862. -
  32863. - _vec.data(0) = in.image();
  32864. - _vec.data(1) = out.image();
  32865. - _vec.call();
  32866. - out._ref->addref( in._ref );
  32867. -
  32868. - return( out );
  32869. -}
  32870. -
  32871. -// im_LabQ2XYZ: convert LabQ to XYZ
  32872. -VImage VImage::LabQ2XYZ() throw( VError )
  32873. -{
  32874. - VImage in = *this;
  32875. - VImage out;
  32876. -
  32877. - Vargv _vec( "im_LabQ2XYZ" );
  32878. -
  32879. - _vec.data(0) = in.image();
  32880. - _vec.data(1) = out.image();
  32881. - _vec.call();
  32882. - out._ref->addref( in._ref );
  32883. -
  32884. - return( out );
  32885. -}
  32886. -
  32887. -// im_LabQ2disp: convert LabQ to displayable
  32888. -VImage VImage::LabQ2disp( VDisplay disp ) throw( VError )
  32889. -{
  32890. - VImage in = *this;
  32891. - VImage out;
  32892. -
  32893. - Vargv _vec( "im_LabQ2disp" );
  32894. -
  32895. - _vec.data(0) = in.image();
  32896. - _vec.data(1) = out.image();
  32897. - _vec.data(2) = disp.disp();
  32898. - _vec.call();
  32899. - out._ref->addref( in._ref );
  32900. -
  32901. - return( out );
  32902. -}
  32903. -
  32904. -// im_LabS2LabQ: convert LabS to LabQ
  32905. -VImage VImage::LabS2LabQ() throw( VError )
  32906. -{
  32907. - VImage in = *this;
  32908. - VImage out;
  32909. -
  32910. - Vargv _vec( "im_LabS2LabQ" );
  32911. -
  32912. - _vec.data(0) = in.image();
  32913. - _vec.data(1) = out.image();
  32914. - _vec.call();
  32915. - out._ref->addref( in._ref );
  32916. -
  32917. - return( out );
  32918. -}
  32919. -
  32920. -// im_LabS2Lab: convert LabS to Lab
  32921. -VImage VImage::LabS2Lab() throw( VError )
  32922. -{
  32923. - VImage in = *this;
  32924. - VImage out;
  32925. -
  32926. - Vargv _vec( "im_LabS2Lab" );
  32927. -
  32928. - _vec.data(0) = in.image();
  32929. - _vec.data(1) = out.image();
  32930. - _vec.call();
  32931. - out._ref->addref( in._ref );
  32932. -
  32933. - return( out );
  32934. -}
  32935. -
  32936. -// im_UCS2LCh: convert UCS to LCh
  32937. -VImage VImage::UCS2LCh() throw( VError )
  32938. -{
  32939. - VImage in = *this;
  32940. - VImage out;
  32941. -
  32942. - Vargv _vec( "im_UCS2LCh" );
  32943. -
  32944. - _vec.data(0) = in.image();
  32945. - _vec.data(1) = out.image();
  32946. - _vec.call();
  32947. - out._ref->addref( in._ref );
  32948. -
  32949. - return( out );
  32950. -}
  32951. -
  32952. -// im_UCS2Lab: convert UCS to Lab
  32953. -VImage VImage::UCS2Lab() throw( VError )
  32954. -{
  32955. - VImage in = *this;
  32956. - VImage out;
  32957. -
  32958. - Vargv _vec( "im_UCS2Lab" );
  32959. -
  32960. - _vec.data(0) = in.image();
  32961. - _vec.data(1) = out.image();
  32962. - _vec.call();
  32963. - out._ref->addref( in._ref );
  32964. -
  32965. - return( out );
  32966. -}
  32967. -
  32968. -// im_UCS2XYZ: convert UCS to XYZ
  32969. -VImage VImage::UCS2XYZ() throw( VError )
  32970. -{
  32971. - VImage in = *this;
  32972. - VImage out;
  32973. -
  32974. - Vargv _vec( "im_UCS2XYZ" );
  32975. -
  32976. - _vec.data(0) = in.image();
  32977. - _vec.data(1) = out.image();
  32978. - _vec.call();
  32979. - out._ref->addref( in._ref );
  32980. -
  32981. - return( out );
  32982. -}
  32983. -
  32984. -// im_XYZ2Lab: convert D65 XYZ to Lab
  32985. -VImage VImage::XYZ2Lab() throw( VError )
  32986. -{
  32987. - VImage in = *this;
  32988. - VImage out;
  32989. -
  32990. - Vargv _vec( "im_XYZ2Lab" );
  32991. -
  32992. - _vec.data(0) = in.image();
  32993. - _vec.data(1) = out.image();
  32994. - _vec.call();
  32995. - out._ref->addref( in._ref );
  32996. -
  32997. - return( out );
  32998. -}
  32999. -
  33000. -// im_XYZ2Lab_temp: convert XYZ to Lab, with a specified colour temperature
  33001. -VImage VImage::XYZ2Lab_temp( double X0, double Y0, double Z0 ) throw( VError )
  33002. -{
  33003. - VImage in = *this;
  33004. - VImage out;
  33005. -
  33006. - Vargv _vec( "im_XYZ2Lab_temp" );
  33007. -
  33008. - _vec.data(0) = in.image();
  33009. - _vec.data(1) = out.image();
  33010. - *((double*) _vec.data(2)) = X0;
  33011. - *((double*) _vec.data(3)) = Y0;
  33012. - *((double*) _vec.data(4)) = Z0;
  33013. - _vec.call();
  33014. - out._ref->addref( in._ref );
  33015. -
  33016. - return( out );
  33017. -}
  33018. -
  33019. -// im_XYZ2UCS: convert XYZ to UCS
  33020. -VImage VImage::XYZ2UCS() throw( VError )
  33021. -{
  33022. - VImage in = *this;
  33023. - VImage out;
  33024. -
  33025. - Vargv _vec( "im_XYZ2UCS" );
  33026. -
  33027. - _vec.data(0) = in.image();
  33028. - _vec.data(1) = out.image();
  33029. - _vec.call();
  33030. - out._ref->addref( in._ref );
  33031. -
  33032. - return( out );
  33033. -}
  33034. -
  33035. -// im_XYZ2Yxy: convert XYZ to Yxy
  33036. -VImage VImage::XYZ2Yxy() throw( VError )
  33037. -{
  33038. - VImage in = *this;
  33039. - VImage out;
  33040. -
  33041. - Vargv _vec( "im_XYZ2Yxy" );
  33042. -
  33043. - _vec.data(0) = in.image();
  33044. - _vec.data(1) = out.image();
  33045. - _vec.call();
  33046. - out._ref->addref( in._ref );
  33047. -
  33048. - return( out );
  33049. -}
  33050. -
  33051. -// im_XYZ2disp: convert XYZ to displayble
  33052. -VImage VImage::XYZ2disp( VDisplay disp ) throw( VError )
  33053. -{
  33054. - VImage in = *this;
  33055. - VImage out;
  33056. -
  33057. - Vargv _vec( "im_XYZ2disp" );
  33058. -
  33059. - _vec.data(0) = in.image();
  33060. - _vec.data(1) = out.image();
  33061. - _vec.data(2) = disp.disp();
  33062. - _vec.call();
  33063. - out._ref->addref( in._ref );
  33064. -
  33065. - return( out );
  33066. -}
  33067. -
  33068. -// im_XYZ2sRGB: convert XYZ to sRGB
  33069. -VImage VImage::XYZ2sRGB() throw( VError )
  33070. -{
  33071. - VImage in = *this;
  33072. - VImage out;
  33073. -
  33074. - Vargv _vec( "im_XYZ2sRGB" );
  33075. -
  33076. - _vec.data(0) = in.image();
  33077. - _vec.data(1) = out.image();
  33078. - _vec.call();
  33079. - out._ref->addref( in._ref );
  33080. -
  33081. - return( out );
  33082. -}
  33083. -
  33084. -// im_Yxy2XYZ: convert Yxy to XYZ
  33085. -VImage VImage::Yxy2XYZ() throw( VError )
  33086. -{
  33087. - VImage in = *this;
  33088. - VImage out;
  33089. -
  33090. - Vargv _vec( "im_Yxy2XYZ" );
  33091. -
  33092. - _vec.data(0) = in.image();
  33093. - _vec.data(1) = out.image();
  33094. - _vec.call();
  33095. - out._ref->addref( in._ref );
  33096. -
  33097. - return( out );
  33098. -}
  33099. -
  33100. -// im_dE00_fromLab: calculate delta-E CIE2000 for two Lab images
  33101. -VImage VImage::dE00_fromLab( VImage in2 ) throw( VError )
  33102. -{
  33103. - VImage in1 = *this;
  33104. - VImage out;
  33105. -
  33106. - Vargv _vec( "im_dE00_fromLab" );
  33107. -
  33108. - _vec.data(0) = in1.image();
  33109. - _vec.data(1) = in2.image();
  33110. - _vec.data(2) = out.image();
  33111. - _vec.call();
  33112. - out._ref->addref( in1._ref );
  33113. - out._ref->addref( in2._ref );
  33114. -
  33115. - return( out );
  33116. -}
  33117. -
  33118. -// im_dECMC_fromLab: calculate delta-E CMC(1:1) for two Lab images
  33119. -VImage VImage::dECMC_fromLab( VImage in2 ) throw( VError )
  33120. -{
  33121. - VImage in1 = *this;
  33122. - VImage out;
  33123. -
  33124. - Vargv _vec( "im_dECMC_fromLab" );
  33125. -
  33126. - _vec.data(0) = in1.image();
  33127. - _vec.data(1) = in2.image();
  33128. - _vec.data(2) = out.image();
  33129. - _vec.call();
  33130. - out._ref->addref( in1._ref );
  33131. - out._ref->addref( in2._ref );
  33132. -
  33133. - return( out );
  33134. -}
  33135. -
  33136. -// im_dECMC_fromdisp: calculate delta-E CMC(1:1) for two displayable images
  33137. -VImage VImage::dECMC_fromdisp( VImage in2, VDisplay disp ) throw( VError )
  33138. -{
  33139. - VImage in1 = *this;
  33140. - VImage out;
  33141. -
  33142. - Vargv _vec( "im_dECMC_fromdisp" );
  33143. -
  33144. - _vec.data(0) = in1.image();
  33145. - _vec.data(1) = in2.image();
  33146. - _vec.data(2) = out.image();
  33147. - _vec.data(3) = disp.disp();
  33148. - _vec.call();
  33149. - out._ref->addref( in1._ref );
  33150. - out._ref->addref( in2._ref );
  33151. -
  33152. - return( out );
  33153. -}
  33154. -
  33155. -// im_dE_fromLab: calculate delta-E for two Lab images
  33156. -VImage VImage::dE_fromLab( VImage in2 ) throw( VError )
  33157. -{
  33158. - VImage in1 = *this;
  33159. - VImage out;
  33160. -
  33161. - Vargv _vec( "im_dE_fromLab" );
  33162. -
  33163. - _vec.data(0) = in1.image();
  33164. - _vec.data(1) = in2.image();
  33165. - _vec.data(2) = out.image();
  33166. - _vec.call();
  33167. - out._ref->addref( in1._ref );
  33168. - out._ref->addref( in2._ref );
  33169. -
  33170. - return( out );
  33171. -}
  33172. -
  33173. -// im_dE_fromXYZ: calculate delta-E for two XYZ images
  33174. -VImage VImage::dE_fromXYZ( VImage in2 ) throw( VError )
  33175. -{
  33176. - VImage in1 = *this;
  33177. - VImage out;
  33178. -
  33179. - Vargv _vec( "im_dE_fromXYZ" );
  33180. -
  33181. - _vec.data(0) = in1.image();
  33182. - _vec.data(1) = in2.image();
  33183. - _vec.data(2) = out.image();
  33184. - _vec.call();
  33185. - out._ref->addref( in1._ref );
  33186. - out._ref->addref( in2._ref );
  33187. -
  33188. - return( out );
  33189. -}
  33190. -
  33191. -// im_dE_fromdisp: calculate delta-E for two displayable images
  33192. -VImage VImage::dE_fromdisp( VImage in2, VDisplay disp ) throw( VError )
  33193. -{
  33194. - VImage in1 = *this;
  33195. - VImage out;
  33196. -
  33197. - Vargv _vec( "im_dE_fromdisp" );
  33198. -
  33199. - _vec.data(0) = in1.image();
  33200. - _vec.data(1) = in2.image();
  33201. - _vec.data(2) = out.image();
  33202. - _vec.data(3) = disp.disp();
  33203. - _vec.call();
  33204. - out._ref->addref( in1._ref );
  33205. - out._ref->addref( in2._ref );
  33206. -
  33207. - return( out );
  33208. -}
  33209. -
  33210. -// im_disp2Lab: convert displayable to Lab
  33211. -VImage VImage::disp2Lab( VDisplay disp ) throw( VError )
  33212. -{
  33213. - VImage in = *this;
  33214. - VImage out;
  33215. -
  33216. - Vargv _vec( "im_disp2Lab" );
  33217. -
  33218. - _vec.data(0) = in.image();
  33219. - _vec.data(1) = out.image();
  33220. - _vec.data(2) = disp.disp();
  33221. - _vec.call();
  33222. - out._ref->addref( in._ref );
  33223. -
  33224. - return( out );
  33225. -}
  33226. -
  33227. -// im_disp2XYZ: convert displayable to XYZ
  33228. -VImage VImage::disp2XYZ( VDisplay disp ) throw( VError )
  33229. -{
  33230. - VImage in = *this;
  33231. - VImage out;
  33232. -
  33233. - Vargv _vec( "im_disp2XYZ" );
  33234. -
  33235. - _vec.data(0) = in.image();
  33236. - _vec.data(1) = out.image();
  33237. - _vec.data(2) = disp.disp();
  33238. - _vec.call();
  33239. - out._ref->addref( in._ref );
  33240. -
  33241. - return( out );
  33242. -}
  33243. -
  33244. -// im_float2rad: convert float to Radiance packed
  33245. -VImage VImage::float2rad() throw( VError )
  33246. -{
  33247. - VImage in = *this;
  33248. - VImage out;
  33249. -
  33250. - Vargv _vec( "im_float2rad" );
  33251. -
  33252. - _vec.data(0) = in.image();
  33253. - _vec.data(1) = out.image();
  33254. - _vec.call();
  33255. - out._ref->addref( in._ref );
  33256. -
  33257. - return( out );
  33258. -}
  33259. -
  33260. -// im_icc_ac2rc: convert LAB from AC to RC using an ICC profile
  33261. -VImage VImage::icc_ac2rc( char* profile ) throw( VError )
  33262. -{
  33263. - VImage in = *this;
  33264. - VImage out;
  33265. -
  33266. - Vargv _vec( "im_icc_ac2rc" );
  33267. -
  33268. - _vec.data(0) = in.image();
  33269. - _vec.data(1) = out.image();
  33270. - _vec.data(2) = (im_object) profile;
  33271. - _vec.call();
  33272. - out._ref->addref( in._ref );
  33273. -
  33274. - return( out );
  33275. -}
  33276. -
  33277. -// im_icc_export_depth: convert a float LAB to device space with an ICC profile
  33278. -VImage VImage::icc_export_depth( int depth, char* output_profile, int intent ) throw( VError )
  33279. -{
  33280. - VImage in = *this;
  33281. - VImage out;
  33282. -
  33283. - Vargv _vec( "im_icc_export_depth" );
  33284. -
  33285. - _vec.data(0) = in.image();
  33286. - _vec.data(1) = out.image();
  33287. - *((int*) _vec.data(2)) = depth;
  33288. - _vec.data(3) = (im_object) output_profile;
  33289. - *((int*) _vec.data(4)) = intent;
  33290. - _vec.call();
  33291. - out._ref->addref( in._ref );
  33292. -
  33293. - return( out );
  33294. -}
  33295. -
  33296. -// im_icc_import: convert a device image to float LAB with an ICC profile
  33297. -VImage VImage::icc_import( char* input_profile, int intent ) throw( VError )
  33298. -{
  33299. - VImage in = *this;
  33300. - VImage out;
  33301. -
  33302. - Vargv _vec( "im_icc_import" );
  33303. -
  33304. - _vec.data(0) = in.image();
  33305. - _vec.data(1) = out.image();
  33306. - _vec.data(2) = (im_object) input_profile;
  33307. - *((int*) _vec.data(3)) = intent;
  33308. - _vec.call();
  33309. - out._ref->addref( in._ref );
  33310. -
  33311. - return( out );
  33312. -}
  33313. -
  33314. -// im_icc_import_embedded: convert a device image to float LAB using the embedded profile
  33315. -VImage VImage::icc_import_embedded( int intent ) throw( VError )
  33316. -{
  33317. - VImage in = *this;
  33318. - VImage out;
  33319. -
  33320. - Vargv _vec( "im_icc_import_embedded" );
  33321. -
  33322. - _vec.data(0) = in.image();
  33323. - _vec.data(1) = out.image();
  33324. - *((int*) _vec.data(2)) = intent;
  33325. - _vec.call();
  33326. - out._ref->addref( in._ref );
  33327. -
  33328. - return( out );
  33329. -}
  33330. -
  33331. -// im_icc_transform: convert between two device images with a pair of ICC profiles
  33332. -VImage VImage::icc_transform( char* input_profile, char* output_profile, int intent ) throw( VError )
  33333. -{
  33334. - VImage in = *this;
  33335. - VImage out;
  33336. -
  33337. - Vargv _vec( "im_icc_transform" );
  33338. -
  33339. - _vec.data(0) = in.image();
  33340. - _vec.data(1) = out.image();
  33341. - _vec.data(2) = (im_object) input_profile;
  33342. - _vec.data(3) = (im_object) output_profile;
  33343. - *((int*) _vec.data(4)) = intent;
  33344. - _vec.call();
  33345. - out._ref->addref( in._ref );
  33346. -
  33347. - return( out );
  33348. -}
  33349. -
  33350. -// im_lab_morph: morph colourspace of a LAB image
  33351. -VImage VImage::lab_morph( VDMask greyscale, double L_offset, double L_scale, double a_scale, double b_scale ) throw( VError )
  33352. -{
  33353. - VImage in = *this;
  33354. - VImage out;
  33355. -
  33356. - Vargv _vec( "im_lab_morph" );
  33357. -
  33358. - _vec.data(0) = in.image();
  33359. - _vec.data(1) = out.image();
  33360. - ((im_mask_object*) _vec.data(2))->mask = greyscale.mask().dptr;
  33361. - *((double*) _vec.data(3)) = L_offset;
  33362. - *((double*) _vec.data(4)) = L_scale;
  33363. - *((double*) _vec.data(5)) = a_scale;
  33364. - *((double*) _vec.data(6)) = b_scale;
  33365. - _vec.call();
  33366. - out._ref->addref( in._ref );
  33367. -
  33368. - return( out );
  33369. -}
  33370. -
  33371. -// im_rad2float: convert Radiance packed to float
  33372. -VImage VImage::rad2float() throw( VError )
  33373. -{
  33374. - VImage in = *this;
  33375. - VImage out;
  33376. -
  33377. - Vargv _vec( "im_rad2float" );
  33378. -
  33379. - _vec.data(0) = in.image();
  33380. - _vec.data(1) = out.image();
  33381. - _vec.call();
  33382. - out._ref->addref( in._ref );
  33383. -
  33384. - return( out );
  33385. -}
  33386. -
  33387. -// im_sRGB2XYZ: convert sRGB to XYZ
  33388. -VImage VImage::sRGB2XYZ() throw( VError )
  33389. -{
  33390. - VImage in = *this;
  33391. - VImage out;
  33392. -
  33393. - Vargv _vec( "im_sRGB2XYZ" );
  33394. -
  33395. - _vec.data(0) = in.image();
  33396. - _vec.data(1) = out.image();
  33397. - _vec.call();
  33398. - out._ref->addref( in._ref );
  33399. -
  33400. - return( out );
  33401. -}
  33402. -
  33403. -
  33404. -// bodies for package conversion
  33405. -// this file automatically generated from
  33406. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  33407. -// im_gaussnoise: generate image of gaussian noise with specified statistics
  33408. -VImage VImage::gaussnoise( int xsize, int ysize, double mean, double sigma ) throw( VError )
  33409. -{
  33410. - VImage out;
  33411. -
  33412. - Vargv _vec( "im_gaussnoise" );
  33413. -
  33414. - _vec.data(0) = out.image();
  33415. - *((int*) _vec.data(1)) = xsize;
  33416. - *((int*) _vec.data(2)) = ysize;
  33417. - *((double*) _vec.data(3)) = mean;
  33418. - *((double*) _vec.data(4)) = sigma;
  33419. - _vec.call();
  33420. -
  33421. - return( out );
  33422. -}
  33423. -
  33424. -// im_bandjoin: bandwise join of two images
  33425. -VImage VImage::bandjoin( VImage in2 ) throw( VError )
  33426. -{
  33427. - VImage in1 = *this;
  33428. - VImage out;
  33429. -
  33430. - Vargv _vec( "im_bandjoin" );
  33431. -
  33432. - _vec.data(0) = in1.image();
  33433. - _vec.data(1) = in2.image();
  33434. - _vec.data(2) = out.image();
  33435. - _vec.call();
  33436. - out._ref->addref( in1._ref );
  33437. - out._ref->addref( in2._ref );
  33438. -
  33439. - return( out );
  33440. -}
  33441. -
  33442. -// im_black: generate black image
  33443. -VImage VImage::black( int x_size, int y_size, int bands ) throw( VError )
  33444. -{
  33445. - VImage output;
  33446. -
  33447. - Vargv _vec( "im_black" );
  33448. -
  33449. - _vec.data(0) = output.image();
  33450. - *((int*) _vec.data(1)) = x_size;
  33451. - *((int*) _vec.data(2)) = y_size;
  33452. - *((int*) _vec.data(3)) = bands;
  33453. - _vec.call();
  33454. -
  33455. - return( output );
  33456. -}
  33457. -
  33458. -// im_c2amph: convert real and imaginary to phase and amplitude
  33459. -VImage VImage::c2amph() throw( VError )
  33460. -{
  33461. - VImage in = *this;
  33462. - VImage out;
  33463. -
  33464. - Vargv _vec( "im_c2amph" );
  33465. -
  33466. - _vec.data(0) = in.image();
  33467. - _vec.data(1) = out.image();
  33468. - _vec.call();
  33469. - out._ref->addref( in._ref );
  33470. -
  33471. - return( out );
  33472. -}
  33473. -
  33474. -// im_c2imag: extract imaginary part of complex image
  33475. -VImage VImage::c2imag() throw( VError )
  33476. -{
  33477. - VImage in = *this;
  33478. - VImage out;
  33479. -
  33480. - Vargv _vec( "im_c2imag" );
  33481. -
  33482. - _vec.data(0) = in.image();
  33483. - _vec.data(1) = out.image();
  33484. - _vec.call();
  33485. - out._ref->addref( in._ref );
  33486. -
  33487. - return( out );
  33488. -}
  33489. -
  33490. -// im_c2real: extract real part of complex image
  33491. -VImage VImage::c2real() throw( VError )
  33492. -{
  33493. - VImage in = *this;
  33494. - VImage out;
  33495. -
  33496. - Vargv _vec( "im_c2real" );
  33497. -
  33498. - _vec.data(0) = in.image();
  33499. - _vec.data(1) = out.image();
  33500. - _vec.call();
  33501. - out._ref->addref( in._ref );
  33502. -
  33503. - return( out );
  33504. -}
  33505. -
  33506. -// im_c2rect: convert phase and amplitude to real and imaginary
  33507. -VImage VImage::c2rect() throw( VError )
  33508. -{
  33509. - VImage in = *this;
  33510. - VImage out;
  33511. -
  33512. - Vargv _vec( "im_c2rect" );
  33513. -
  33514. - _vec.data(0) = in.image();
  33515. - _vec.data(1) = out.image();
  33516. - _vec.call();
  33517. - out._ref->addref( in._ref );
  33518. -
  33519. - return( out );
  33520. -}
  33521. -
  33522. -// im_clip2fmt: convert image format to ofmt
  33523. -VImage VImage::clip2fmt( int ofmt ) throw( VError )
  33524. -{
  33525. - VImage in = *this;
  33526. - VImage out;
  33527. -
  33528. - Vargv _vec( "im_clip2fmt" );
  33529. -
  33530. - _vec.data(0) = in.image();
  33531. - _vec.data(1) = out.image();
  33532. - *((int*) _vec.data(2)) = ofmt;
  33533. - _vec.call();
  33534. - out._ref->addref( in._ref );
  33535. -
  33536. - return( out );
  33537. -}
  33538. -
  33539. -// im_copy: copy image
  33540. -VImage VImage::copy() throw( VError )
  33541. -{
  33542. - VImage in = *this;
  33543. - VImage out;
  33544. -
  33545. - Vargv _vec( "im_copy" );
  33546. -
  33547. - _vec.data(0) = in.image();
  33548. - _vec.data(1) = out.image();
  33549. - _vec.call();
  33550. - out._ref->addref( in._ref );
  33551. -
  33552. - return( out );
  33553. -}
  33554. -
  33555. -// im_copy_file: copy image to a file and return that
  33556. -VImage VImage::copy_file() throw( VError )
  33557. -{
  33558. - VImage in = *this;
  33559. - VImage out;
  33560. -
  33561. - Vargv _vec( "im_copy_file" );
  33562. -
  33563. - _vec.data(0) = in.image();
  33564. - _vec.data(1) = out.image();
  33565. - _vec.call();
  33566. - out._ref->addref( in._ref );
  33567. -
  33568. - return( out );
  33569. -}
  33570. -
  33571. -// im_copy_morph: copy image, setting pixel layout
  33572. -VImage VImage::copy_morph( int Bands, int BandFmt, int Coding ) throw( VError )
  33573. -{
  33574. - VImage input = *this;
  33575. - VImage output;
  33576. -
  33577. - Vargv _vec( "im_copy_morph" );
  33578. -
  33579. - _vec.data(0) = input.image();
  33580. - _vec.data(1) = output.image();
  33581. - *((int*) _vec.data(2)) = Bands;
  33582. - *((int*) _vec.data(3)) = BandFmt;
  33583. - *((int*) _vec.data(4)) = Coding;
  33584. - _vec.call();
  33585. - output._ref->addref( input._ref );
  33586. -
  33587. - return( output );
  33588. -}
  33589. -
  33590. -// im_copy_swap: copy image, swapping byte order
  33591. -VImage VImage::copy_swap() throw( VError )
  33592. -{
  33593. - VImage in = *this;
  33594. - VImage out;
  33595. -
  33596. - Vargv _vec( "im_copy_swap" );
  33597. -
  33598. - _vec.data(0) = in.image();
  33599. - _vec.data(1) = out.image();
  33600. - _vec.call();
  33601. - out._ref->addref( in._ref );
  33602. -
  33603. - return( out );
  33604. -}
  33605. -
  33606. -// im_copy_set: copy image, setting informational fields
  33607. -VImage VImage::copy_set( int Type, double Xres, double Yres, int Xoffset, int Yoffset ) throw( VError )
  33608. -{
  33609. - VImage input = *this;
  33610. - VImage output;
  33611. -
  33612. - Vargv _vec( "im_copy_set" );
  33613. -
  33614. - _vec.data(0) = input.image();
  33615. - _vec.data(1) = output.image();
  33616. - *((int*) _vec.data(2)) = Type;
  33617. - *((double*) _vec.data(3)) = Xres;
  33618. - *((double*) _vec.data(4)) = Yres;
  33619. - *((int*) _vec.data(5)) = Xoffset;
  33620. - *((int*) _vec.data(6)) = Yoffset;
  33621. - _vec.call();
  33622. - output._ref->addref( input._ref );
  33623. -
  33624. - return( output );
  33625. -}
  33626. -
  33627. -// im_extract_area: extract area
  33628. -VImage VImage::extract_area( int left, int top, int width, int height ) throw( VError )
  33629. -{
  33630. - VImage input = *this;
  33631. - VImage output;
  33632. -
  33633. - Vargv _vec( "im_extract_area" );
  33634. -
  33635. - _vec.data(0) = input.image();
  33636. - _vec.data(1) = output.image();
  33637. - *((int*) _vec.data(2)) = left;
  33638. - *((int*) _vec.data(3)) = top;
  33639. - *((int*) _vec.data(4)) = width;
  33640. - *((int*) _vec.data(5)) = height;
  33641. - _vec.call();
  33642. - output._ref->addref( input._ref );
  33643. -
  33644. - return( output );
  33645. -}
  33646. -
  33647. -// im_extract_areabands: extract area and bands
  33648. -VImage VImage::extract_areabands( int left, int top, int width, int height, int band, int nbands ) throw( VError )
  33649. -{
  33650. - VImage input = *this;
  33651. - VImage output;
  33652. -
  33653. - Vargv _vec( "im_extract_areabands" );
  33654. -
  33655. - _vec.data(0) = input.image();
  33656. - _vec.data(1) = output.image();
  33657. - *((int*) _vec.data(2)) = left;
  33658. - *((int*) _vec.data(3)) = top;
  33659. - *((int*) _vec.data(4)) = width;
  33660. - *((int*) _vec.data(5)) = height;
  33661. - *((int*) _vec.data(6)) = band;
  33662. - *((int*) _vec.data(7)) = nbands;
  33663. - _vec.call();
  33664. - output._ref->addref( input._ref );
  33665. -
  33666. - return( output );
  33667. -}
  33668. -
  33669. -// im_extract_band: extract band
  33670. -VImage VImage::extract_band( int band ) throw( VError )
  33671. -{
  33672. - VImage input = *this;
  33673. - VImage output;
  33674. -
  33675. - Vargv _vec( "im_extract_band" );
  33676. -
  33677. - _vec.data(0) = input.image();
  33678. - _vec.data(1) = output.image();
  33679. - *((int*) _vec.data(2)) = band;
  33680. - _vec.call();
  33681. - output._ref->addref( input._ref );
  33682. -
  33683. - return( output );
  33684. -}
  33685. -
  33686. -// im_extract_bands: extract several bands
  33687. -VImage VImage::extract_bands( int band, int nbands ) throw( VError )
  33688. -{
  33689. - VImage input = *this;
  33690. - VImage output;
  33691. -
  33692. - Vargv _vec( "im_extract_bands" );
  33693. -
  33694. - _vec.data(0) = input.image();
  33695. - _vec.data(1) = output.image();
  33696. - *((int*) _vec.data(2)) = band;
  33697. - *((int*) _vec.data(3)) = nbands;
  33698. - _vec.call();
  33699. - output._ref->addref( input._ref );
  33700. -
  33701. - return( output );
  33702. -}
  33703. -
  33704. -// im_extract: extract area/band
  33705. -VImage VImage::extract( int left, int top, int width, int height, int band ) throw( VError )
  33706. -{
  33707. - VImage input = *this;
  33708. - VImage output;
  33709. -
  33710. - Vargv _vec( "im_extract" );
  33711. -
  33712. - _vec.data(0) = input.image();
  33713. - _vec.data(1) = output.image();
  33714. - *((int*) _vec.data(2)) = left;
  33715. - *((int*) _vec.data(3)) = top;
  33716. - *((int*) _vec.data(4)) = width;
  33717. - *((int*) _vec.data(5)) = height;
  33718. - *((int*) _vec.data(6)) = band;
  33719. - _vec.call();
  33720. - output._ref->addref( input._ref );
  33721. -
  33722. - return( output );
  33723. -}
  33724. -
  33725. -// im_falsecolour: turn luminance changes into chrominance changes
  33726. -VImage VImage::falsecolour() throw( VError )
  33727. -{
  33728. - VImage in = *this;
  33729. - VImage out;
  33730. -
  33731. - Vargv _vec( "im_falsecolour" );
  33732. -
  33733. - _vec.data(0) = in.image();
  33734. - _vec.data(1) = out.image();
  33735. - _vec.call();
  33736. - out._ref->addref( in._ref );
  33737. -
  33738. - return( out );
  33739. -}
  33740. -
  33741. -// im_fliphor: flip image left-right
  33742. -VImage VImage::fliphor() throw( VError )
  33743. -{
  33744. - VImage in = *this;
  33745. - VImage out;
  33746. -
  33747. - Vargv _vec( "im_fliphor" );
  33748. -
  33749. - _vec.data(0) = in.image();
  33750. - _vec.data(1) = out.image();
  33751. - _vec.call();
  33752. - out._ref->addref( in._ref );
  33753. -
  33754. - return( out );
  33755. -}
  33756. -
  33757. -// im_flipver: flip image top-bottom
  33758. -VImage VImage::flipver() throw( VError )
  33759. -{
  33760. - VImage in = *this;
  33761. - VImage out;
  33762. -
  33763. - Vargv _vec( "im_flipver" );
  33764. -
  33765. - _vec.data(0) = in.image();
  33766. - _vec.data(1) = out.image();
  33767. - _vec.call();
  33768. - out._ref->addref( in._ref );
  33769. -
  33770. - return( out );
  33771. -}
  33772. -
  33773. -// im_gbandjoin: bandwise join of many images
  33774. -VImage VImage::gbandjoin( std::vector<VImage> in ) throw( VError )
  33775. -{
  33776. - VImage out;
  33777. -
  33778. - Vargv _vec( "im_gbandjoin" );
  33779. -
  33780. - ((im_imagevec_object*) _vec.data(0))->n = in.size();
  33781. - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
  33782. - for( unsigned int i = 0; i < in.size(); i++ )
  33783. - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
  33784. - _vec.data(1) = out.image();
  33785. - _vec.call();
  33786. - for( unsigned int i = 0; i < in.size(); i++ )
  33787. - out._ref->addref( in[i]._ref );
  33788. -
  33789. - return( out );
  33790. -}
  33791. -
  33792. -// im_grid: chop a tall thin image into a grid of images
  33793. -VImage VImage::grid( int tile_height, int across, int down ) throw( VError )
  33794. -{
  33795. - VImage input = *this;
  33796. - VImage output;
  33797. -
  33798. - Vargv _vec( "im_grid" );
  33799. -
  33800. - _vec.data(0) = input.image();
  33801. - _vec.data(1) = output.image();
  33802. - *((int*) _vec.data(2)) = tile_height;
  33803. - *((int*) _vec.data(3)) = across;
  33804. - *((int*) _vec.data(4)) = down;
  33805. - _vec.call();
  33806. - output._ref->addref( input._ref );
  33807. -
  33808. - return( output );
  33809. -}
  33810. -
  33811. -// im_insert: insert sub-image into main image at position
  33812. -VImage VImage::insert( VImage sub, int x, int y ) throw( VError )
  33813. -{
  33814. - VImage in = *this;
  33815. - VImage out;
  33816. -
  33817. - Vargv _vec( "im_insert" );
  33818. -
  33819. - _vec.data(0) = in.image();
  33820. - _vec.data(1) = sub.image();
  33821. - _vec.data(2) = out.image();
  33822. - *((int*) _vec.data(3)) = x;
  33823. - *((int*) _vec.data(4)) = y;
  33824. - _vec.call();
  33825. - out._ref->addref( in._ref );
  33826. - out._ref->addref( sub._ref );
  33827. -
  33828. - return( out );
  33829. -}
  33830. -
  33831. -// im_insertset: insert sub into main at every position in x, y
  33832. -VImage VImage::insert( VImage sub, std::vector<int> x, std::vector<int> y ) throw( VError )
  33833. -{
  33834. - VImage main = *this;
  33835. - VImage out;
  33836. -
  33837. - Vargv _vec( "im_insertset" );
  33838. -
  33839. - _vec.data(0) = main.image();
  33840. - _vec.data(1) = sub.image();
  33841. - _vec.data(2) = out.image();
  33842. - ((im_intvec_object*) _vec.data(3))->n = x.size();
  33843. - ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()];
  33844. - for( unsigned int i = 0; i < x.size(); i++ )
  33845. - ((im_intvec_object*) _vec.data(3))->vec[i] = x[i];
  33846. - ((im_intvec_object*) _vec.data(4))->n = y.size();
  33847. - ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()];
  33848. - for( unsigned int i = 0; i < y.size(); i++ )
  33849. - ((im_intvec_object*) _vec.data(4))->vec[i] = y[i];
  33850. - _vec.call();
  33851. -
  33852. - return( out );
  33853. -}
  33854. -
  33855. -// im_insert_noexpand: insert sub-image into main image at position, no expansion
  33856. -VImage VImage::insert_noexpand( VImage sub, int x, int y ) throw( VError )
  33857. -{
  33858. - VImage in = *this;
  33859. - VImage out;
  33860. -
  33861. - Vargv _vec( "im_insert_noexpand" );
  33862. -
  33863. - _vec.data(0) = in.image();
  33864. - _vec.data(1) = sub.image();
  33865. - _vec.data(2) = out.image();
  33866. - *((int*) _vec.data(3)) = x;
  33867. - *((int*) _vec.data(4)) = y;
  33868. - _vec.call();
  33869. - out._ref->addref( in._ref );
  33870. - out._ref->addref( sub._ref );
  33871. -
  33872. - return( out );
  33873. -}
  33874. -
  33875. -// im_embed: embed in within a set of borders
  33876. -VImage VImage::embed( int type, int x, int y, int width, int height ) throw( VError )
  33877. -{
  33878. - VImage in = *this;
  33879. - VImage out;
  33880. -
  33881. - Vargv _vec( "im_embed" );
  33882. -
  33883. - _vec.data(0) = in.image();
  33884. - _vec.data(1) = out.image();
  33885. - *((int*) _vec.data(2)) = type;
  33886. - *((int*) _vec.data(3)) = x;
  33887. - *((int*) _vec.data(4)) = y;
  33888. - *((int*) _vec.data(5)) = width;
  33889. - *((int*) _vec.data(6)) = height;
  33890. - _vec.call();
  33891. - out._ref->addref( in._ref );
  33892. -
  33893. - return( out );
  33894. -}
  33895. -
  33896. -// im_lrjoin: join two images left-right
  33897. -VImage VImage::lrjoin( VImage in2 ) throw( VError )
  33898. -{
  33899. - VImage in1 = *this;
  33900. - VImage out;
  33901. -
  33902. - Vargv _vec( "im_lrjoin" );
  33903. -
  33904. - _vec.data(0) = in1.image();
  33905. - _vec.data(1) = in2.image();
  33906. - _vec.data(2) = out.image();
  33907. - _vec.call();
  33908. - out._ref->addref( in1._ref );
  33909. - out._ref->addref( in2._ref );
  33910. -
  33911. - return( out );
  33912. -}
  33913. -
  33914. -// im_msb: convert to uchar by discarding bits
  33915. -VImage VImage::msb() throw( VError )
  33916. -{
  33917. - VImage in = *this;
  33918. - VImage out;
  33919. -
  33920. - Vargv _vec( "im_msb" );
  33921. -
  33922. - _vec.data(0) = in.image();
  33923. - _vec.data(1) = out.image();
  33924. - _vec.call();
  33925. - out._ref->addref( in._ref );
  33926. -
  33927. - return( out );
  33928. -}
  33929. -
  33930. -// im_msb_band: convert to single band uchar by discarding bits
  33931. -VImage VImage::msb_band( int band ) throw( VError )
  33932. -{
  33933. - VImage in = *this;
  33934. - VImage out;
  33935. -
  33936. - Vargv _vec( "im_msb_band" );
  33937. -
  33938. - _vec.data(0) = in.image();
  33939. - _vec.data(1) = out.image();
  33940. - *((int*) _vec.data(2)) = band;
  33941. - _vec.call();
  33942. - out._ref->addref( in._ref );
  33943. -
  33944. - return( out );
  33945. -}
  33946. -
  33947. -// im_replicate: replicate an image horizontally and vertically
  33948. -VImage VImage::replicate( int across, int down ) throw( VError )
  33949. -{
  33950. - VImage input = *this;
  33951. - VImage output;
  33952. -
  33953. - Vargv _vec( "im_replicate" );
  33954. -
  33955. - _vec.data(0) = input.image();
  33956. - _vec.data(1) = output.image();
  33957. - *((int*) _vec.data(2)) = across;
  33958. - *((int*) _vec.data(3)) = down;
  33959. - _vec.call();
  33960. - output._ref->addref( input._ref );
  33961. -
  33962. - return( output );
  33963. -}
  33964. -
  33965. -// im_ri2c: join two non-complex images to form complex
  33966. -VImage VImage::ri2c( VImage in2 ) throw( VError )
  33967. -{
  33968. - VImage in1 = *this;
  33969. - VImage out;
  33970. -
  33971. - Vargv _vec( "im_ri2c" );
  33972. -
  33973. - _vec.data(0) = in1.image();
  33974. - _vec.data(1) = in2.image();
  33975. - _vec.data(2) = out.image();
  33976. - _vec.call();
  33977. - out._ref->addref( in1._ref );
  33978. - out._ref->addref( in2._ref );
  33979. -
  33980. - return( out );
  33981. -}
  33982. -
  33983. -// im_rot180: rotate image 180 degrees
  33984. -VImage VImage::rot180() throw( VError )
  33985. -{
  33986. - VImage in = *this;
  33987. - VImage out;
  33988. -
  33989. - Vargv _vec( "im_rot180" );
  33990. -
  33991. - _vec.data(0) = in.image();
  33992. - _vec.data(1) = out.image();
  33993. - _vec.call();
  33994. - out._ref->addref( in._ref );
  33995. -
  33996. - return( out );
  33997. -}
  33998. -
  33999. -// im_rot270: rotate image 270 degrees clockwise
  34000. -VImage VImage::rot270() throw( VError )
  34001. -{
  34002. - VImage in = *this;
  34003. - VImage out;
  34004. -
  34005. - Vargv _vec( "im_rot270" );
  34006. -
  34007. - _vec.data(0) = in.image();
  34008. - _vec.data(1) = out.image();
  34009. - _vec.call();
  34010. - out._ref->addref( in._ref );
  34011. -
  34012. - return( out );
  34013. -}
  34014. -
  34015. -// im_rot90: rotate image 90 degrees clockwise
  34016. -VImage VImage::rot90() throw( VError )
  34017. -{
  34018. - VImage in = *this;
  34019. - VImage out;
  34020. -
  34021. - Vargv _vec( "im_rot90" );
  34022. -
  34023. - _vec.data(0) = in.image();
  34024. - _vec.data(1) = out.image();
  34025. - _vec.call();
  34026. - out._ref->addref( in._ref );
  34027. -
  34028. - return( out );
  34029. -}
  34030. -
  34031. -// im_scale: scale image linearly to fit range 0-255
  34032. -VImage VImage::scale() throw( VError )
  34033. -{
  34034. - VImage in = *this;
  34035. - VImage out;
  34036. -
  34037. - Vargv _vec( "im_scale" );
  34038. -
  34039. - _vec.data(0) = in.image();
  34040. - _vec.data(1) = out.image();
  34041. - _vec.call();
  34042. - out._ref->addref( in._ref );
  34043. -
  34044. - return( out );
  34045. -}
  34046. -
  34047. -// im_scaleps: logarithmic scale of image to fit range 0-255
  34048. -VImage VImage::scaleps() throw( VError )
  34049. -{
  34050. - VImage in = *this;
  34051. - VImage out;
  34052. -
  34053. - Vargv _vec( "im_scaleps" );
  34054. -
  34055. - _vec.data(0) = in.image();
  34056. - _vec.data(1) = out.image();
  34057. - _vec.call();
  34058. -
  34059. - return( out );
  34060. -}
  34061. -
  34062. -// im_subsample: subsample image by integer factors
  34063. -VImage VImage::subsample( int xshrink, int yshrink ) throw( VError )
  34064. -{
  34065. - VImage in = *this;
  34066. - VImage out;
  34067. -
  34068. - Vargv _vec( "im_subsample" );
  34069. -
  34070. - _vec.data(0) = in.image();
  34071. - _vec.data(1) = out.image();
  34072. - *((int*) _vec.data(2)) = xshrink;
  34073. - *((int*) _vec.data(3)) = yshrink;
  34074. - _vec.call();
  34075. - out._ref->addref( in._ref );
  34076. -
  34077. - return( out );
  34078. -}
  34079. -
  34080. -// im_system: run command on image
  34081. -char* VImage::system( char* command ) throw( VError )
  34082. -{
  34083. - VImage im = *this;
  34084. - char* output;
  34085. -
  34086. - Vargv _vec( "im_system" );
  34087. -
  34088. - _vec.data(0) = im.image();
  34089. - _vec.data(1) = (im_object) command;
  34090. - _vec.call();
  34091. - output = (char*) _vec.data(2);
  34092. -
  34093. - return( output );
  34094. -}
  34095. -
  34096. -// im_system_image: run command on image, with image output
  34097. -VImage VImage::system_image( char* in_format, char* out_format, char* command, char*& log ) throw( VError )
  34098. -{
  34099. - VImage in = *this;
  34100. - VImage out;
  34101. -
  34102. - Vargv _vec( "im_system_image" );
  34103. -
  34104. - _vec.data(0) = in.image();
  34105. - _vec.data(1) = out.image();
  34106. - _vec.data(2) = (im_object) in_format;
  34107. - _vec.data(3) = (im_object) out_format;
  34108. - _vec.data(4) = (im_object) command;
  34109. - _vec.call();
  34110. - log = (char*) _vec.data(5);
  34111. -
  34112. - return( out );
  34113. -}
  34114. -
  34115. -// im_tbjoin: join two images top-bottom
  34116. -VImage VImage::tbjoin( VImage in2 ) throw( VError )
  34117. -{
  34118. - VImage in1 = *this;
  34119. - VImage out;
  34120. -
  34121. - Vargv _vec( "im_tbjoin" );
  34122. -
  34123. - _vec.data(0) = in1.image();
  34124. - _vec.data(1) = in2.image();
  34125. - _vec.data(2) = out.image();
  34126. - _vec.call();
  34127. - out._ref->addref( in1._ref );
  34128. - out._ref->addref( in2._ref );
  34129. -
  34130. - return( out );
  34131. -}
  34132. -
  34133. -// im_text: generate text image
  34134. -VImage VImage::text( char* text, char* font, int width, int alignment, int dpi ) throw( VError )
  34135. -{
  34136. - VImage out;
  34137. -
  34138. - Vargv _vec( "im_text" );
  34139. -
  34140. - _vec.data(0) = out.image();
  34141. - _vec.data(1) = (im_object) text;
  34142. - _vec.data(2) = (im_object) font;
  34143. - *((int*) _vec.data(3)) = width;
  34144. - *((int*) _vec.data(4)) = alignment;
  34145. - *((int*) _vec.data(5)) = dpi;
  34146. - _vec.call();
  34147. -
  34148. - return( out );
  34149. -}
  34150. -
  34151. -// im_wrap: shift image origin, wrapping at sides
  34152. -VImage VImage::wrap( int x, int y ) throw( VError )
  34153. -{
  34154. - VImage in = *this;
  34155. - VImage out;
  34156. -
  34157. - Vargv _vec( "im_wrap" );
  34158. -
  34159. - _vec.data(0) = in.image();
  34160. - _vec.data(1) = out.image();
  34161. - *((int*) _vec.data(2)) = x;
  34162. - *((int*) _vec.data(3)) = y;
  34163. - _vec.call();
  34164. - out._ref->addref( in._ref );
  34165. -
  34166. - return( out );
  34167. -}
  34168. -
  34169. -// im_zoom: simple zoom of an image by integer factors
  34170. -VImage VImage::zoom( int xfac, int yfac ) throw( VError )
  34171. -{
  34172. - VImage input = *this;
  34173. - VImage output;
  34174. -
  34175. - Vargv _vec( "im_zoom" );
  34176. -
  34177. - _vec.data(0) = input.image();
  34178. - _vec.data(1) = output.image();
  34179. - *((int*) _vec.data(2)) = xfac;
  34180. - *((int*) _vec.data(3)) = yfac;
  34181. - _vec.call();
  34182. - output._ref->addref( input._ref );
  34183. -
  34184. - return( output );
  34185. -}
  34186. -
  34187. -
  34188. -// bodies for package convolution
  34189. -// this file automatically generated from
  34190. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  34191. -// im_aconvsep: approximate separable convolution
  34192. -VImage VImage::aconvsep( VDMask matrix, int n_layers ) throw( VError )
  34193. -{
  34194. - VImage in = *this;
  34195. - VImage out;
  34196. -
  34197. - Vargv _vec( "im_aconvsep" );
  34198. -
  34199. - _vec.data(0) = in.image();
  34200. - _vec.data(1) = out.image();
  34201. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34202. - *((int*) _vec.data(3)) = n_layers;
  34203. - _vec.call();
  34204. - out._ref->addref( in._ref );
  34205. -
  34206. - return( out );
  34207. -}
  34208. -
  34209. -// im_aconv: approximate convolution
  34210. -VImage VImage::aconv( VDMask matrix, int n_layers, int cluster ) throw( VError )
  34211. -{
  34212. - VImage in = *this;
  34213. - VImage out;
  34214. -
  34215. - Vargv _vec( "im_aconv" );
  34216. -
  34217. - _vec.data(0) = in.image();
  34218. - _vec.data(1) = out.image();
  34219. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34220. - *((int*) _vec.data(3)) = n_layers;
  34221. - *((int*) _vec.data(4)) = cluster;
  34222. - _vec.call();
  34223. - out._ref->addref( in._ref );
  34224. -
  34225. - return( out );
  34226. -}
  34227. -
  34228. -// im_addgnoise: add gaussian noise with mean 0 and std. dev. sigma
  34229. -VImage VImage::addgnoise( double sigma ) throw( VError )
  34230. -{
  34231. - VImage in = *this;
  34232. - VImage out;
  34233. -
  34234. - Vargv _vec( "im_addgnoise" );
  34235. -
  34236. - _vec.data(0) = in.image();
  34237. - _vec.data(1) = out.image();
  34238. - *((double*) _vec.data(2)) = sigma;
  34239. - _vec.call();
  34240. - out._ref->addref( in._ref );
  34241. -
  34242. - return( out );
  34243. -}
  34244. -
  34245. -// im_compass: convolve with 8-way rotating integer mask
  34246. -VImage VImage::compass( VIMask matrix ) throw( VError )
  34247. -{
  34248. - VImage in = *this;
  34249. - VImage out;
  34250. -
  34251. - Vargv _vec( "im_compass" );
  34252. -
  34253. - _vec.data(0) = in.image();
  34254. - _vec.data(1) = out.image();
  34255. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34256. - _vec.call();
  34257. - out._ref->addref( in._ref );
  34258. -
  34259. - return( out );
  34260. -}
  34261. -
  34262. -// im_contrast_surface: find high-contrast points in an image
  34263. -VImage VImage::contrast_surface( int half_win_size, int spacing ) throw( VError )
  34264. -{
  34265. - VImage in = *this;
  34266. - VImage out;
  34267. -
  34268. - Vargv _vec( "im_contrast_surface" );
  34269. -
  34270. - _vec.data(0) = in.image();
  34271. - _vec.data(1) = out.image();
  34272. - *((int*) _vec.data(2)) = half_win_size;
  34273. - *((int*) _vec.data(3)) = spacing;
  34274. - _vec.call();
  34275. - out._ref->addref( in._ref );
  34276. -
  34277. - return( out );
  34278. -}
  34279. -
  34280. -// im_conv: convolve
  34281. -VImage VImage::conv( VIMask matrix ) throw( VError )
  34282. -{
  34283. - VImage in = *this;
  34284. - VImage out;
  34285. -
  34286. - Vargv _vec( "im_conv" );
  34287. -
  34288. - _vec.data(0) = in.image();
  34289. - _vec.data(1) = out.image();
  34290. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34291. - _vec.call();
  34292. - out._ref->addref( in._ref );
  34293. -
  34294. - return( out );
  34295. -}
  34296. -
  34297. -// im_conv_f: convolve, with DOUBLEMASK
  34298. -VImage VImage::conv( VDMask matrix ) throw( VError )
  34299. -{
  34300. - VImage in = *this;
  34301. - VImage out;
  34302. -
  34303. - Vargv _vec( "im_conv_f" );
  34304. -
  34305. - _vec.data(0) = in.image();
  34306. - _vec.data(1) = out.image();
  34307. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34308. - _vec.call();
  34309. - out._ref->addref( in._ref );
  34310. -
  34311. - return( out );
  34312. -}
  34313. -
  34314. -// im_convsep: seperable convolution
  34315. -VImage VImage::convsep( VIMask matrix ) throw( VError )
  34316. -{
  34317. - VImage in = *this;
  34318. - VImage out;
  34319. -
  34320. - Vargv _vec( "im_convsep" );
  34321. -
  34322. - _vec.data(0) = in.image();
  34323. - _vec.data(1) = out.image();
  34324. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34325. - _vec.call();
  34326. - out._ref->addref( in._ref );
  34327. -
  34328. - return( out );
  34329. -}
  34330. -
  34331. -// im_convsep_f: seperable convolution, with DOUBLEMASK
  34332. -VImage VImage::convsep( VDMask matrix ) throw( VError )
  34333. -{
  34334. - VImage in = *this;
  34335. - VImage out;
  34336. -
  34337. - Vargv _vec( "im_convsep_f" );
  34338. -
  34339. - _vec.data(0) = in.image();
  34340. - _vec.data(1) = out.image();
  34341. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34342. - _vec.call();
  34343. - out._ref->addref( in._ref );
  34344. -
  34345. - return( out );
  34346. -}
  34347. -
  34348. -// im_fastcor: fast correlate in2 within in1
  34349. -VImage VImage::fastcor( VImage in2 ) throw( VError )
  34350. -{
  34351. - VImage in1 = *this;
  34352. - VImage out;
  34353. -
  34354. - Vargv _vec( "im_fastcor" );
  34355. -
  34356. - _vec.data(0) = in1.image();
  34357. - _vec.data(1) = in2.image();
  34358. - _vec.data(2) = out.image();
  34359. - _vec.call();
  34360. - out._ref->addref( in1._ref );
  34361. - out._ref->addref( in2._ref );
  34362. -
  34363. - return( out );
  34364. -}
  34365. -
  34366. -// im_gradcor: non-normalised correlation of gradient of in2 within in1
  34367. -VImage VImage::gradcor( VImage in2 ) throw( VError )
  34368. -{
  34369. - VImage in1 = *this;
  34370. - VImage out;
  34371. -
  34372. - Vargv _vec( "im_gradcor" );
  34373. -
  34374. - _vec.data(0) = in1.image();
  34375. - _vec.data(1) = in2.image();
  34376. - _vec.data(2) = out.image();
  34377. - _vec.call();
  34378. - out._ref->addref( in1._ref );
  34379. - out._ref->addref( in2._ref );
  34380. -
  34381. - return( out );
  34382. -}
  34383. -
  34384. -// im_gradient: convolve with 2-way rotating mask
  34385. -VImage VImage::gradient( VIMask matrix ) throw( VError )
  34386. -{
  34387. - VImage in = *this;
  34388. - VImage out;
  34389. -
  34390. - Vargv _vec( "im_gradient" );
  34391. -
  34392. - _vec.data(0) = in.image();
  34393. - _vec.data(1) = out.image();
  34394. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34395. - _vec.call();
  34396. - out._ref->addref( in._ref );
  34397. -
  34398. - return( out );
  34399. -}
  34400. -
  34401. -// im_grad_x: horizontal difference image
  34402. -VImage VImage::grad_x() throw( VError )
  34403. -{
  34404. - VImage in = *this;
  34405. - VImage out;
  34406. -
  34407. - Vargv _vec( "im_grad_x" );
  34408. -
  34409. - _vec.data(0) = in.image();
  34410. - _vec.data(1) = out.image();
  34411. - _vec.call();
  34412. - out._ref->addref( in._ref );
  34413. -
  34414. - return( out );
  34415. -}
  34416. -
  34417. -// im_grad_y: vertical difference image
  34418. -VImage VImage::grad_y() throw( VError )
  34419. -{
  34420. - VImage in = *this;
  34421. - VImage out;
  34422. -
  34423. - Vargv _vec( "im_grad_y" );
  34424. -
  34425. - _vec.data(0) = in.image();
  34426. - _vec.data(1) = out.image();
  34427. - _vec.call();
  34428. - out._ref->addref( in._ref );
  34429. -
  34430. - return( out );
  34431. -}
  34432. -
  34433. -// im_lindetect: convolve with 4-way rotating mask
  34434. -VImage VImage::lindetect( VIMask matrix ) throw( VError )
  34435. -{
  34436. - VImage in = *this;
  34437. - VImage out;
  34438. -
  34439. - Vargv _vec( "im_lindetect" );
  34440. -
  34441. - _vec.data(0) = in.image();
  34442. - _vec.data(1) = out.image();
  34443. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34444. - _vec.call();
  34445. - out._ref->addref( in._ref );
  34446. -
  34447. - return( out );
  34448. -}
  34449. -
  34450. -// im_sharpen: sharpen high frequencies of L channel of LabQ
  34451. -VImage VImage::sharpen( int mask_size, double x1, double y2, double y3, double m1, double m2 ) throw( VError )
  34452. -{
  34453. - VImage in = *this;
  34454. - VImage out;
  34455. -
  34456. - Vargv _vec( "im_sharpen" );
  34457. -
  34458. - _vec.data(0) = in.image();
  34459. - _vec.data(1) = out.image();
  34460. - *((int*) _vec.data(2)) = mask_size;
  34461. - *((double*) _vec.data(3)) = x1;
  34462. - *((double*) _vec.data(4)) = y2;
  34463. - *((double*) _vec.data(5)) = y3;
  34464. - *((double*) _vec.data(6)) = m1;
  34465. - *((double*) _vec.data(7)) = m2;
  34466. - _vec.call();
  34467. - out._ref->addref( in._ref );
  34468. -
  34469. - return( out );
  34470. -}
  34471. -
  34472. -// im_spcor: normalised correlation of in2 within in1
  34473. -VImage VImage::spcor( VImage in2 ) throw( VError )
  34474. -{
  34475. - VImage in1 = *this;
  34476. - VImage out;
  34477. -
  34478. - Vargv _vec( "im_spcor" );
  34479. -
  34480. - _vec.data(0) = in1.image();
  34481. - _vec.data(1) = in2.image();
  34482. - _vec.data(2) = out.image();
  34483. - _vec.call();
  34484. - out._ref->addref( in1._ref );
  34485. - out._ref->addref( in2._ref );
  34486. -
  34487. - return( out );
  34488. -}
  34489. -
  34490. -
  34491. -// bodies for package deprecated
  34492. -// this file automatically generated from
  34493. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  34494. -// im_argb2rgba: convert pre-multipled argb to png-style rgba
  34495. -VImage VImage::argb2rgba() throw( VError )
  34496. -{
  34497. - VImage in = *this;
  34498. - VImage out;
  34499. -
  34500. - Vargv _vec( "im_argb2rgba" );
  34501. -
  34502. - _vec.data(0) = in.image();
  34503. - _vec.data(1) = out.image();
  34504. - _vec.call();
  34505. - out._ref->addref( in._ref );
  34506. -
  34507. - return( out );
  34508. -}
  34509. -
  34510. -// im_flood_copy: flood with ink from start_x, start_y while pixel == start pixel
  34511. -VImage VImage::flood_copy( int start_x, int start_y, std::vector<double> ink ) throw( VError )
  34512. -{
  34513. - VImage in = *this;
  34514. - VImage out;
  34515. -
  34516. - Vargv _vec( "im_flood_copy" );
  34517. -
  34518. - _vec.data(0) = in.image();
  34519. - _vec.data(1) = out.image();
  34520. - *((int*) _vec.data(2)) = start_x;
  34521. - *((int*) _vec.data(3)) = start_y;
  34522. - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
  34523. - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
  34524. - for( unsigned int i = 0; i < ink.size(); i++ )
  34525. - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
  34526. - _vec.call();
  34527. -
  34528. - return( out );
  34529. -}
  34530. -
  34531. -// im_flood_blob_copy: flood with ink from start_x, start_y while pixel == start pixel
  34532. -VImage VImage::flood_blob_copy( int start_x, int start_y, std::vector<double> ink ) throw( VError )
  34533. -{
  34534. - VImage in = *this;
  34535. - VImage out;
  34536. -
  34537. - Vargv _vec( "im_flood_blob_copy" );
  34538. -
  34539. - _vec.data(0) = in.image();
  34540. - _vec.data(1) = out.image();
  34541. - *((int*) _vec.data(2)) = start_x;
  34542. - *((int*) _vec.data(3)) = start_y;
  34543. - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
  34544. - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
  34545. - for( unsigned int i = 0; i < ink.size(); i++ )
  34546. - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
  34547. - _vec.call();
  34548. -
  34549. - return( out );
  34550. -}
  34551. -
  34552. -// im_flood_other_copy: flood mark with serial from start_x, start_y while pixel == start pixel
  34553. -VImage VImage::flood_other_copy( VImage mark, int start_x, int start_y, int serial ) throw( VError )
  34554. -{
  34555. - VImage test = *this;
  34556. - VImage out;
  34557. -
  34558. - Vargv _vec( "im_flood_other_copy" );
  34559. -
  34560. - _vec.data(0) = test.image();
  34561. - _vec.data(1) = mark.image();
  34562. - _vec.data(2) = out.image();
  34563. - *((int*) _vec.data(3)) = start_x;
  34564. - *((int*) _vec.data(4)) = start_y;
  34565. - *((int*) _vec.data(5)) = serial;
  34566. - _vec.call();
  34567. -
  34568. - return( out );
  34569. -}
  34570. -
  34571. -// im_clip: convert to unsigned 8-bit integer
  34572. -VImage VImage::clip() throw( VError )
  34573. -{
  34574. - VImage in = *this;
  34575. - VImage out;
  34576. -
  34577. - Vargv _vec( "im_clip" );
  34578. -
  34579. - _vec.data(0) = in.image();
  34580. - _vec.data(1) = out.image();
  34581. - _vec.call();
  34582. - out._ref->addref( in._ref );
  34583. -
  34584. - return( out );
  34585. -}
  34586. -
  34587. -// im_c2ps: find power spectrum of complex image
  34588. -VImage VImage::c2ps() throw( VError )
  34589. -{
  34590. - VImage in = *this;
  34591. - VImage out;
  34592. -
  34593. - Vargv _vec( "im_c2ps" );
  34594. -
  34595. - _vec.data(0) = in.image();
  34596. - _vec.data(1) = out.image();
  34597. - _vec.call();
  34598. - out._ref->addref( in._ref );
  34599. -
  34600. - return( out );
  34601. -}
  34602. -
  34603. -// im_resize_linear: resize to X by Y pixels with linear interpolation
  34604. -VImage VImage::resize_linear( int X, int Y ) throw( VError )
  34605. -{
  34606. - VImage in = *this;
  34607. - VImage out;
  34608. -
  34609. - Vargv _vec( "im_resize_linear" );
  34610. -
  34611. - _vec.data(0) = in.image();
  34612. - _vec.data(1) = out.image();
  34613. - *((int*) _vec.data(2)) = X;
  34614. - *((int*) _vec.data(3)) = Y;
  34615. - _vec.call();
  34616. -
  34617. - return( out );
  34618. -}
  34619. -
  34620. -// im_cmulnorm: multiply two complex images, normalising output
  34621. -VImage VImage::cmulnorm( VImage in2 ) throw( VError )
  34622. -{
  34623. - VImage in1 = *this;
  34624. - VImage out;
  34625. -
  34626. - Vargv _vec( "im_cmulnorm" );
  34627. -
  34628. - _vec.data(0) = in1.image();
  34629. - _vec.data(1) = in2.image();
  34630. - _vec.data(2) = out.image();
  34631. - _vec.call();
  34632. - out._ref->addref( in1._ref );
  34633. - out._ref->addref( in2._ref );
  34634. -
  34635. - return( out );
  34636. -}
  34637. -
  34638. -// im_fav4: average of 4 images
  34639. -VImage VImage::fav4( VImage in2, VImage in3, VImage in4 ) throw( VError )
  34640. -{
  34641. - VImage in1 = *this;
  34642. - VImage out;
  34643. -
  34644. - Vargv _vec( "im_fav4" );
  34645. -
  34646. - _vec.data(0) = in1.image();
  34647. - _vec.data(1) = in2.image();
  34648. - _vec.data(2) = in3.image();
  34649. - _vec.data(3) = in4.image();
  34650. - _vec.data(4) = out.image();
  34651. - _vec.call();
  34652. -
  34653. - return( out );
  34654. -}
  34655. -
  34656. -// im_gadd: calculate a*in1 + b*in2 + c = outfile
  34657. -VImage VImage::gadd( double a, double b, VImage in2, double c ) throw( VError )
  34658. -{
  34659. - VImage in1 = *this;
  34660. - VImage out;
  34661. -
  34662. - Vargv _vec( "im_gadd" );
  34663. -
  34664. - *((double*) _vec.data(0)) = a;
  34665. - _vec.data(1) = in1.image();
  34666. - *((double*) _vec.data(2)) = b;
  34667. - _vec.data(3) = in2.image();
  34668. - *((double*) _vec.data(4)) = c;
  34669. - _vec.data(5) = out.image();
  34670. - _vec.call();
  34671. -
  34672. - return( out );
  34673. -}
  34674. -
  34675. -// im_icc_export: convert a float LAB to an 8-bit device image with an ICC profile
  34676. -VImage VImage::icc_export( char* output_profile, int intent ) throw( VError )
  34677. -{
  34678. - VImage in = *this;
  34679. - VImage out;
  34680. -
  34681. - Vargv _vec( "im_icc_export" );
  34682. -
  34683. - _vec.data(0) = in.image();
  34684. - _vec.data(1) = out.image();
  34685. - _vec.data(2) = (im_object) output_profile;
  34686. - *((int*) _vec.data(3)) = intent;
  34687. - _vec.call();
  34688. - out._ref->addref( in._ref );
  34689. -
  34690. - return( out );
  34691. -}
  34692. -
  34693. -// im_litecor: calculate max(white)*factor*(in/white), if clip == 1
  34694. -VImage VImage::litecor( VImage white, int clip, double factor ) throw( VError )
  34695. -{
  34696. - VImage in = *this;
  34697. - VImage out;
  34698. -
  34699. - Vargv _vec( "im_litecor" );
  34700. -
  34701. - _vec.data(0) = in.image();
  34702. - _vec.data(1) = white.image();
  34703. - _vec.data(2) = out.image();
  34704. - *((int*) _vec.data(3)) = clip;
  34705. - *((double*) _vec.data(4)) = factor;
  34706. - _vec.call();
  34707. -
  34708. - return( out );
  34709. -}
  34710. -
  34711. -// im_affine: affine transform
  34712. -VImage VImage::affine( double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError )
  34713. -{
  34714. - VImage in = *this;
  34715. - VImage out;
  34716. -
  34717. - Vargv _vec( "im_affine" );
  34718. -
  34719. - _vec.data(0) = in.image();
  34720. - _vec.data(1) = out.image();
  34721. - *((double*) _vec.data(2)) = a;
  34722. - *((double*) _vec.data(3)) = b;
  34723. - *((double*) _vec.data(4)) = c;
  34724. - *((double*) _vec.data(5)) = d;
  34725. - *((double*) _vec.data(6)) = dx;
  34726. - *((double*) _vec.data(7)) = dy;
  34727. - *((int*) _vec.data(8)) = x;
  34728. - *((int*) _vec.data(9)) = y;
  34729. - *((int*) _vec.data(10)) = w;
  34730. - *((int*) _vec.data(11)) = h;
  34731. - _vec.call();
  34732. - out._ref->addref( in._ref );
  34733. -
  34734. - return( out );
  34735. -}
  34736. -
  34737. -// im_clip2c: convert to signed 8-bit integer
  34738. -VImage VImage::clip2c() throw( VError )
  34739. -{
  34740. - VImage in = *this;
  34741. - VImage out;
  34742. -
  34743. - Vargv _vec( "im_clip2c" );
  34744. -
  34745. - _vec.data(0) = in.image();
  34746. - _vec.data(1) = out.image();
  34747. - _vec.call();
  34748. - out._ref->addref( in._ref );
  34749. -
  34750. - return( out );
  34751. -}
  34752. -
  34753. -// im_clip2cm: convert to complex
  34754. -VImage VImage::clip2cm() throw( VError )
  34755. -{
  34756. - VImage in = *this;
  34757. - VImage out;
  34758. -
  34759. - Vargv _vec( "im_clip2cm" );
  34760. -
  34761. - _vec.data(0) = in.image();
  34762. - _vec.data(1) = out.image();
  34763. - _vec.call();
  34764. - out._ref->addref( in._ref );
  34765. -
  34766. - return( out );
  34767. -}
  34768. -
  34769. -// im_clip2d: convert to double-precision float
  34770. -VImage VImage::clip2d() throw( VError )
  34771. -{
  34772. - VImage in = *this;
  34773. - VImage out;
  34774. -
  34775. - Vargv _vec( "im_clip2d" );
  34776. -
  34777. - _vec.data(0) = in.image();
  34778. - _vec.data(1) = out.image();
  34779. - _vec.call();
  34780. - out._ref->addref( in._ref );
  34781. -
  34782. - return( out );
  34783. -}
  34784. -
  34785. -// im_clip2dcm: convert to double complex
  34786. -VImage VImage::clip2dcm() throw( VError )
  34787. -{
  34788. - VImage in = *this;
  34789. - VImage out;
  34790. -
  34791. - Vargv _vec( "im_clip2dcm" );
  34792. -
  34793. - _vec.data(0) = in.image();
  34794. - _vec.data(1) = out.image();
  34795. - _vec.call();
  34796. - out._ref->addref( in._ref );
  34797. -
  34798. - return( out );
  34799. -}
  34800. -
  34801. -// im_clip2f: convert to single-precision float
  34802. -VImage VImage::clip2f() throw( VError )
  34803. -{
  34804. - VImage in = *this;
  34805. - VImage out;
  34806. -
  34807. - Vargv _vec( "im_clip2f" );
  34808. -
  34809. - _vec.data(0) = in.image();
  34810. - _vec.data(1) = out.image();
  34811. - _vec.call();
  34812. - out._ref->addref( in._ref );
  34813. -
  34814. - return( out );
  34815. -}
  34816. -
  34817. -// im_clip2i: convert to signed 32-bit integer
  34818. -VImage VImage::clip2i() throw( VError )
  34819. -{
  34820. - VImage in = *this;
  34821. - VImage out;
  34822. -
  34823. - Vargv _vec( "im_clip2i" );
  34824. -
  34825. - _vec.data(0) = in.image();
  34826. - _vec.data(1) = out.image();
  34827. - _vec.call();
  34828. - out._ref->addref( in._ref );
  34829. -
  34830. - return( out );
  34831. -}
  34832. -
  34833. -// im_convsub: convolve uchar to uchar, sub-sampling by xskip, yskip
  34834. -VImage VImage::convsub( VIMask matrix, int xskip, int yskip ) throw( VError )
  34835. -{
  34836. - VImage in = *this;
  34837. - VImage out;
  34838. -
  34839. - Vargv _vec( "im_convsub" );
  34840. -
  34841. - _vec.data(0) = in.image();
  34842. - _vec.data(1) = out.image();
  34843. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  34844. - *((int*) _vec.data(3)) = xskip;
  34845. - *((int*) _vec.data(4)) = yskip;
  34846. - _vec.call();
  34847. -
  34848. - return( out );
  34849. -}
  34850. -
  34851. -// im_convf: convolve, with DOUBLEMASK
  34852. -VImage VImage::convf( VDMask matrix ) throw( VError )
  34853. -{
  34854. - VImage in = *this;
  34855. - VImage out;
  34856. -
  34857. - Vargv _vec( "im_convf" );
  34858. -
  34859. - _vec.data(0) = in.image();
  34860. - _vec.data(1) = out.image();
  34861. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34862. - _vec.call();
  34863. - out._ref->addref( in._ref );
  34864. -
  34865. - return( out );
  34866. -}
  34867. -
  34868. -// im_convsepf: seperable convolution, with DOUBLEMASK
  34869. -VImage VImage::convsepf( VDMask matrix ) throw( VError )
  34870. -{
  34871. - VImage in = *this;
  34872. - VImage out;
  34873. -
  34874. - Vargv _vec( "im_convsepf" );
  34875. -
  34876. - _vec.data(0) = in.image();
  34877. - _vec.data(1) = out.image();
  34878. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  34879. - _vec.call();
  34880. - out._ref->addref( in._ref );
  34881. -
  34882. - return( out );
  34883. -}
  34884. -
  34885. -// im_clip2s: convert to signed 16-bit integer
  34886. -VImage VImage::clip2s() throw( VError )
  34887. -{
  34888. - VImage in = *this;
  34889. - VImage out;
  34890. -
  34891. - Vargv _vec( "im_clip2s" );
  34892. -
  34893. - _vec.data(0) = in.image();
  34894. - _vec.data(1) = out.image();
  34895. - _vec.call();
  34896. - out._ref->addref( in._ref );
  34897. -
  34898. - return( out );
  34899. -}
  34900. -
  34901. -// im_clip2ui: convert to unsigned 32-bit integer
  34902. -VImage VImage::clip2ui() throw( VError )
  34903. -{
  34904. - VImage in = *this;
  34905. - VImage out;
  34906. -
  34907. - Vargv _vec( "im_clip2ui" );
  34908. -
  34909. - _vec.data(0) = in.image();
  34910. - _vec.data(1) = out.image();
  34911. - _vec.call();
  34912. - out._ref->addref( in._ref );
  34913. -
  34914. - return( out );
  34915. -}
  34916. -
  34917. -// im_insertplaceset: insert sub into main at every position in x, y
  34918. -VImage VImage::insertplace( VImage sub, std::vector<int> x, std::vector<int> y ) throw( VError )
  34919. -{
  34920. - VImage main = *this;
  34921. - VImage out;
  34922. -
  34923. - Vargv _vec( "im_insertplaceset" );
  34924. -
  34925. - _vec.data(0) = main.image();
  34926. - _vec.data(1) = sub.image();
  34927. - _vec.data(2) = out.image();
  34928. - ((im_intvec_object*) _vec.data(3))->n = x.size();
  34929. - ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()];
  34930. - for( unsigned int i = 0; i < x.size(); i++ )
  34931. - ((im_intvec_object*) _vec.data(3))->vec[i] = x[i];
  34932. - ((im_intvec_object*) _vec.data(4))->n = y.size();
  34933. - ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()];
  34934. - for( unsigned int i = 0; i < y.size(); i++ )
  34935. - ((im_intvec_object*) _vec.data(4))->vec[i] = y[i];
  34936. - _vec.call();
  34937. -
  34938. - return( out );
  34939. -}
  34940. -
  34941. -// im_clip2us: convert to unsigned 16-bit integer
  34942. -VImage VImage::clip2us() throw( VError )
  34943. -{
  34944. - VImage in = *this;
  34945. - VImage out;
  34946. -
  34947. - Vargv _vec( "im_clip2us" );
  34948. -
  34949. - _vec.data(0) = in.image();
  34950. - _vec.data(1) = out.image();
  34951. - _vec.call();
  34952. - out._ref->addref( in._ref );
  34953. -
  34954. - return( out );
  34955. -}
  34956. -
  34957. -// im_slice: slice an image using two thresholds
  34958. -VImage VImage::slice( double thresh1, double thresh2 ) throw( VError )
  34959. -{
  34960. - VImage input = *this;
  34961. - VImage output;
  34962. -
  34963. - Vargv _vec( "im_slice" );
  34964. -
  34965. - _vec.data(0) = input.image();
  34966. - _vec.data(1) = output.image();
  34967. - *((double*) _vec.data(2)) = thresh1;
  34968. - *((double*) _vec.data(3)) = thresh2;
  34969. - _vec.call();
  34970. -
  34971. - return( output );
  34972. -}
  34973. -
  34974. -// im_segment: number continuous regions in an image
  34975. -VImage VImage::segment( int& segments ) throw( VError )
  34976. -{
  34977. - VImage test = *this;
  34978. - VImage mask;
  34979. -
  34980. - Vargv _vec( "im_segment" );
  34981. -
  34982. - _vec.data(0) = test.image();
  34983. - _vec.data(1) = mask.image();
  34984. - _vec.call();
  34985. - segments = *((int*)_vec.data(2));
  34986. -
  34987. - return( mask );
  34988. -}
  34989. -
  34990. -// im_line: draw line between points (x1,y1) and (x2,y2)
  34991. -void VImage::line( int x1, int y1, int x2, int y2, int pelval ) throw( VError )
  34992. -{
  34993. - VImage im = *this;
  34994. - Vargv _vec( "im_line" );
  34995. -
  34996. - _vec.data(0) = im.image();
  34997. - *((int*) _vec.data(1)) = x1;
  34998. - *((int*) _vec.data(2)) = y1;
  34999. - *((int*) _vec.data(3)) = x2;
  35000. - *((int*) _vec.data(4)) = y2;
  35001. - *((int*) _vec.data(5)) = pelval;
  35002. - _vec.call();
  35003. -}
  35004. -
  35005. -// im_thresh: slice an image at a threshold
  35006. -VImage VImage::thresh( double threshold ) throw( VError )
  35007. -{
  35008. - VImage input = *this;
  35009. - VImage output;
  35010. -
  35011. - Vargv _vec( "im_thresh" );
  35012. -
  35013. - _vec.data(0) = input.image();
  35014. - _vec.data(1) = output.image();
  35015. - *((double*) _vec.data(2)) = threshold;
  35016. - _vec.call();
  35017. -
  35018. - return( output );
  35019. -}
  35020. -
  35021. -// im_convf_raw: convolve, with DOUBLEMASK, no border
  35022. -VImage VImage::convf_raw( VDMask matrix ) throw( VError )
  35023. -{
  35024. - VImage in = *this;
  35025. - VImage out;
  35026. -
  35027. - Vargv _vec( "im_convf_raw" );
  35028. -
  35029. - _vec.data(0) = in.image();
  35030. - _vec.data(1) = out.image();
  35031. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  35032. - _vec.call();
  35033. - out._ref->addref( in._ref );
  35034. -
  35035. - return( out );
  35036. -}
  35037. -
  35038. -// im_conv_raw: convolve, no border
  35039. -VImage VImage::conv_raw( VIMask matrix ) throw( VError )
  35040. -{
  35041. - VImage in = *this;
  35042. - VImage out;
  35043. -
  35044. - Vargv _vec( "im_conv_raw" );
  35045. -
  35046. - _vec.data(0) = in.image();
  35047. - _vec.data(1) = out.image();
  35048. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  35049. - _vec.call();
  35050. - out._ref->addref( in._ref );
  35051. -
  35052. - return( out );
  35053. -}
  35054. -
  35055. -// im_contrast_surface_raw: find high-contrast points in an image
  35056. -VImage VImage::contrast_surface_raw( int half_win_size, int spacing ) throw( VError )
  35057. -{
  35058. - VImage in = *this;
  35059. - VImage out;
  35060. -
  35061. - Vargv _vec( "im_contrast_surface_raw" );
  35062. -
  35063. - _vec.data(0) = in.image();
  35064. - _vec.data(1) = out.image();
  35065. - *((int*) _vec.data(2)) = half_win_size;
  35066. - *((int*) _vec.data(3)) = spacing;
  35067. - _vec.call();
  35068. - out._ref->addref( in._ref );
  35069. -
  35070. - return( out );
  35071. -}
  35072. -
  35073. -// im_convsepf_raw: seperable convolution, with DOUBLEMASK, no border
  35074. -VImage VImage::convsepf_raw( VDMask matrix ) throw( VError )
  35075. -{
  35076. - VImage in = *this;
  35077. - VImage out;
  35078. -
  35079. - Vargv _vec( "im_convsepf_raw" );
  35080. -
  35081. - _vec.data(0) = in.image();
  35082. - _vec.data(1) = out.image();
  35083. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr;
  35084. - _vec.call();
  35085. - out._ref->addref( in._ref );
  35086. -
  35087. - return( out );
  35088. -}
  35089. -
  35090. -// im_convsep_raw: seperable convolution, no border
  35091. -VImage VImage::convsep_raw( VIMask matrix ) throw( VError )
  35092. -{
  35093. - VImage in = *this;
  35094. - VImage out;
  35095. -
  35096. - Vargv _vec( "im_convsep_raw" );
  35097. -
  35098. - _vec.data(0) = in.image();
  35099. - _vec.data(1) = out.image();
  35100. - ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr;
  35101. - _vec.call();
  35102. - out._ref->addref( in._ref );
  35103. -
  35104. - return( out );
  35105. -}
  35106. -
  35107. -// im_fastcor_raw: fast correlate in2 within in1, no border
  35108. -VImage VImage::fastcor_raw( VImage in2 ) throw( VError )
  35109. -{
  35110. - VImage in1 = *this;
  35111. - VImage out;
  35112. -
  35113. - Vargv _vec( "im_fastcor_raw" );
  35114. -
  35115. - _vec.data(0) = in1.image();
  35116. - _vec.data(1) = in2.image();
  35117. - _vec.data(2) = out.image();
  35118. - _vec.call();
  35119. - out._ref->addref( in1._ref );
  35120. - out._ref->addref( in2._ref );
  35121. -
  35122. - return( out );
  35123. -}
  35124. -
  35125. -// im_gradcor_raw: non-normalised correlation of gradient of in2 within in1, no padding
  35126. -VImage VImage::gradcor_raw( VImage in2 ) throw( VError )
  35127. -{
  35128. - VImage in1 = *this;
  35129. - VImage out;
  35130. -
  35131. - Vargv _vec( "im_gradcor_raw" );
  35132. -
  35133. - _vec.data(0) = in1.image();
  35134. - _vec.data(1) = in2.image();
  35135. - _vec.data(2) = out.image();
  35136. - _vec.call();
  35137. - out._ref->addref( in1._ref );
  35138. - out._ref->addref( in2._ref );
  35139. -
  35140. - return( out );
  35141. -}
  35142. -
  35143. -// im_spcor_raw: normalised correlation of in2 within in1, no black padding
  35144. -VImage VImage::spcor_raw( VImage in2 ) throw( VError )
  35145. -{
  35146. - VImage in1 = *this;
  35147. - VImage out;
  35148. -
  35149. - Vargv _vec( "im_spcor_raw" );
  35150. -
  35151. - _vec.data(0) = in1.image();
  35152. - _vec.data(1) = in2.image();
  35153. - _vec.data(2) = out.image();
  35154. - _vec.call();
  35155. - out._ref->addref( in1._ref );
  35156. - out._ref->addref( in2._ref );
  35157. -
  35158. - return( out );
  35159. -}
  35160. -
  35161. -// im_lhisteq_raw: local histogram equalisation, no border
  35162. -VImage VImage::lhisteq_raw( int width, int height ) throw( VError )
  35163. -{
  35164. - VImage in = *this;
  35165. - VImage out;
  35166. -
  35167. - Vargv _vec( "im_lhisteq_raw" );
  35168. -
  35169. - _vec.data(0) = in.image();
  35170. - _vec.data(1) = out.image();
  35171. - *((int*) _vec.data(2)) = width;
  35172. - *((int*) _vec.data(3)) = height;
  35173. - _vec.call();
  35174. - out._ref->addref( in._ref );
  35175. -
  35176. - return( out );
  35177. -}
  35178. -
  35179. -// im_stdif_raw: statistical differencing, no border
  35180. -VImage VImage::stdif_raw( double a, double m0, double b, double s0, int xw, int yw ) throw( VError )
  35181. -{
  35182. - VImage in = *this;
  35183. - VImage out;
  35184. -
  35185. - Vargv _vec( "im_stdif_raw" );
  35186. -
  35187. - _vec.data(0) = in.image();
  35188. - _vec.data(1) = out.image();
  35189. - *((double*) _vec.data(2)) = a;
  35190. - *((double*) _vec.data(3)) = m0;
  35191. - *((double*) _vec.data(4)) = b;
  35192. - *((double*) _vec.data(5)) = s0;
  35193. - *((int*) _vec.data(6)) = xw;
  35194. - *((int*) _vec.data(7)) = yw;
  35195. - _vec.call();
  35196. - out._ref->addref( in._ref );
  35197. -
  35198. - return( out );
  35199. -}
  35200. -
  35201. -// im_rank_raw: rank filter nth element of xsize/ysize window, no border
  35202. -VImage VImage::rank_raw( int xsize, int ysize, int n ) throw( VError )
  35203. -{
  35204. - VImage in = *this;
  35205. - VImage out;
  35206. -
  35207. - Vargv _vec( "im_rank_raw" );
  35208. -
  35209. - _vec.data(0) = in.image();
  35210. - _vec.data(1) = out.image();
  35211. - *((int*) _vec.data(2)) = xsize;
  35212. - *((int*) _vec.data(3)) = ysize;
  35213. - *((int*) _vec.data(4)) = n;
  35214. - _vec.call();
  35215. - out._ref->addref( in._ref );
  35216. -
  35217. - return( out );
  35218. -}
  35219. -
  35220. -// im_dilate_raw: dilate image with mask
  35221. -VImage VImage::dilate_raw( VIMask mask ) throw( VError )
  35222. -{
  35223. - VImage in = *this;
  35224. - VImage out;
  35225. -
  35226. - Vargv _vec( "im_dilate_raw" );
  35227. -
  35228. - _vec.data(0) = in.image();
  35229. - _vec.data(1) = out.image();
  35230. - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
  35231. - _vec.call();
  35232. - out._ref->addref( in._ref );
  35233. -
  35234. - return( out );
  35235. -}
  35236. -
  35237. -// im_erode_raw: erode image with mask
  35238. -VImage VImage::erode_raw( VIMask mask ) throw( VError )
  35239. -{
  35240. - VImage in = *this;
  35241. - VImage out;
  35242. -
  35243. - Vargv _vec( "im_erode_raw" );
  35244. -
  35245. - _vec.data(0) = in.image();
  35246. - _vec.data(1) = out.image();
  35247. - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
  35248. - _vec.call();
  35249. - out._ref->addref( in._ref );
  35250. -
  35251. - return( out );
  35252. -}
  35253. -
  35254. -// im_similarity_area: output area xywh of similarity transformation
  35255. -VImage VImage::similarity_area( double a, double b, double dx, double dy, int x, int y, int w, int h ) throw( VError )
  35256. -{
  35257. - VImage in = *this;
  35258. - VImage out;
  35259. -
  35260. - Vargv _vec( "im_similarity_area" );
  35261. -
  35262. - _vec.data(0) = in.image();
  35263. - _vec.data(1) = out.image();
  35264. - *((double*) _vec.data(2)) = a;
  35265. - *((double*) _vec.data(3)) = b;
  35266. - *((double*) _vec.data(4)) = dx;
  35267. - *((double*) _vec.data(5)) = dy;
  35268. - *((int*) _vec.data(6)) = x;
  35269. - *((int*) _vec.data(7)) = y;
  35270. - *((int*) _vec.data(8)) = w;
  35271. - *((int*) _vec.data(9)) = h;
  35272. - _vec.call();
  35273. - out._ref->addref( in._ref );
  35274. -
  35275. - return( out );
  35276. -}
  35277. -
  35278. -// im_similarity: similarity transformation
  35279. -VImage VImage::similarity( double a, double b, double dx, double dy ) throw( VError )
  35280. -{
  35281. - VImage in = *this;
  35282. - VImage out;
  35283. -
  35284. - Vargv _vec( "im_similarity" );
  35285. -
  35286. - _vec.data(0) = in.image();
  35287. - _vec.data(1) = out.image();
  35288. - *((double*) _vec.data(2)) = a;
  35289. - *((double*) _vec.data(3)) = b;
  35290. - *((double*) _vec.data(4)) = dx;
  35291. - *((double*) _vec.data(5)) = dy;
  35292. - _vec.call();
  35293. - out._ref->addref( in._ref );
  35294. -
  35295. - return( out );
  35296. -}
  35297. -
  35298. -// im_mask2vips: convert DOUBLEMASK to VIPS image
  35299. -VImage VImage::mask2vips( VDMask input ) throw( VError )
  35300. -{
  35301. - VImage output;
  35302. -
  35303. - Vargv _vec( "im_mask2vips" );
  35304. -
  35305. - ((im_mask_object*) _vec.data(0))->mask = input.mask().dptr;
  35306. - _vec.data(1) = output.image();
  35307. - _vec.call();
  35308. -
  35309. - return( output );
  35310. -}
  35311. -
  35312. -// im_vips2mask: convert VIPS image to DOUBLEMASK
  35313. -VDMask VImage::vips2mask() throw( VError )
  35314. -{
  35315. - VImage input = *this;
  35316. - VDMask output;
  35317. -
  35318. - Vargv _vec( "im_vips2mask" );
  35319. -
  35320. - _vec.data(0) = input.image();
  35321. - ((im_mask_object*) _vec.data(1))->name = (char*)"noname";
  35322. - _vec.call();
  35323. - output.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask );
  35324. -
  35325. - return( output );
  35326. -}
  35327. -
  35328. -// im_insertplace: draw image sub inside image main at position (x,y)
  35329. -void VImage::insertplace( VImage sub, int x, int y ) throw( VError )
  35330. -{
  35331. - VImage main = *this;
  35332. - Vargv _vec( "im_insertplace" );
  35333. -
  35334. - _vec.data(0) = main.image();
  35335. - _vec.data(1) = sub.image();
  35336. - *((int*) _vec.data(2)) = x;
  35337. - *((int*) _vec.data(3)) = y;
  35338. - _vec.call();
  35339. -}
  35340. -
  35341. -// im_circle: plot circle on image
  35342. -void VImage::circle( int cx, int cy, int radius, int intensity ) throw( VError )
  35343. -{
  35344. - VImage image = *this;
  35345. - Vargv _vec( "im_circle" );
  35346. -
  35347. - _vec.data(0) = image.image();
  35348. - *((int*) _vec.data(1)) = cx;
  35349. - *((int*) _vec.data(2)) = cy;
  35350. - *((int*) _vec.data(3)) = radius;
  35351. - *((int*) _vec.data(4)) = intensity;
  35352. - _vec.call();
  35353. -}
  35354. -
  35355. -// im_andimage: bitwise and of two images
  35356. -VImage VImage::andimage( VImage in2 ) throw( VError )
  35357. -{
  35358. - VImage in1 = *this;
  35359. - VImage out;
  35360. -
  35361. - Vargv _vec( "im_andimage" );
  35362. -
  35363. - _vec.data(0) = in1.image();
  35364. - _vec.data(1) = in2.image();
  35365. - _vec.data(2) = out.image();
  35366. - _vec.call();
  35367. - out._ref->addref( in1._ref );
  35368. - out._ref->addref( in2._ref );
  35369. -
  35370. - return( out );
  35371. -}
  35372. -
  35373. -// im_andimageconst: bitwise and of an image with a constant
  35374. -VImage VImage::andimage( int c ) throw( VError )
  35375. -{
  35376. - VImage in1 = *this;
  35377. - VImage out;
  35378. -
  35379. - Vargv _vec( "im_andimageconst" );
  35380. -
  35381. - _vec.data(0) = in1.image();
  35382. - _vec.data(1) = out.image();
  35383. - *((int*) _vec.data(2)) = c;
  35384. - _vec.call();
  35385. - out._ref->addref( in1._ref );
  35386. -
  35387. - return( out );
  35388. -}
  35389. -
  35390. -// im_andimage_vec: bitwise and of an image with a vector constant
  35391. -VImage VImage::andimage( std::vector<double> vec ) throw( VError )
  35392. -{
  35393. - VImage in = *this;
  35394. - VImage out;
  35395. -
  35396. - Vargv _vec( "im_andimage_vec" );
  35397. -
  35398. - _vec.data(0) = in.image();
  35399. - _vec.data(1) = out.image();
  35400. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35401. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35402. - for( unsigned int i = 0; i < vec.size(); i++ )
  35403. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35404. - _vec.call();
  35405. - out._ref->addref( in._ref );
  35406. -
  35407. - return( out );
  35408. -}
  35409. -
  35410. -// im_orimage: bitwise or of two images
  35411. -VImage VImage::orimage( VImage in2 ) throw( VError )
  35412. -{
  35413. - VImage in1 = *this;
  35414. - VImage out;
  35415. -
  35416. - Vargv _vec( "im_orimage" );
  35417. -
  35418. - _vec.data(0) = in1.image();
  35419. - _vec.data(1) = in2.image();
  35420. - _vec.data(2) = out.image();
  35421. - _vec.call();
  35422. - out._ref->addref( in1._ref );
  35423. - out._ref->addref( in2._ref );
  35424. -
  35425. - return( out );
  35426. -}
  35427. -
  35428. -// im_orimageconst: bitwise or of an image with a constant
  35429. -VImage VImage::orimage( int c ) throw( VError )
  35430. -{
  35431. - VImage in1 = *this;
  35432. - VImage out;
  35433. -
  35434. - Vargv _vec( "im_orimageconst" );
  35435. -
  35436. - _vec.data(0) = in1.image();
  35437. - _vec.data(1) = out.image();
  35438. - *((int*) _vec.data(2)) = c;
  35439. - _vec.call();
  35440. - out._ref->addref( in1._ref );
  35441. -
  35442. - return( out );
  35443. -}
  35444. -
  35445. -// im_orimage_vec: bitwise or of an image with a vector constant
  35446. -VImage VImage::orimage( std::vector<double> vec ) throw( VError )
  35447. -{
  35448. - VImage in = *this;
  35449. - VImage out;
  35450. -
  35451. - Vargv _vec( "im_orimage_vec" );
  35452. -
  35453. - _vec.data(0) = in.image();
  35454. - _vec.data(1) = out.image();
  35455. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35456. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35457. - for( unsigned int i = 0; i < vec.size(); i++ )
  35458. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35459. - _vec.call();
  35460. - out._ref->addref( in._ref );
  35461. -
  35462. - return( out );
  35463. -}
  35464. -
  35465. -// im_eorimage: bitwise eor of two images
  35466. -VImage VImage::eorimage( VImage in2 ) throw( VError )
  35467. -{
  35468. - VImage in1 = *this;
  35469. - VImage out;
  35470. -
  35471. - Vargv _vec( "im_eorimage" );
  35472. -
  35473. - _vec.data(0) = in1.image();
  35474. - _vec.data(1) = in2.image();
  35475. - _vec.data(2) = out.image();
  35476. - _vec.call();
  35477. - out._ref->addref( in1._ref );
  35478. - out._ref->addref( in2._ref );
  35479. -
  35480. - return( out );
  35481. -}
  35482. -
  35483. -// im_eorimageconst: bitwise eor of an image with a constant
  35484. -VImage VImage::eorimage( int c ) throw( VError )
  35485. -{
  35486. - VImage in1 = *this;
  35487. - VImage out;
  35488. -
  35489. - Vargv _vec( "im_eorimageconst" );
  35490. -
  35491. - _vec.data(0) = in1.image();
  35492. - _vec.data(1) = out.image();
  35493. - *((int*) _vec.data(2)) = c;
  35494. - _vec.call();
  35495. - out._ref->addref( in1._ref );
  35496. -
  35497. - return( out );
  35498. -}
  35499. -
  35500. -// im_eorimage_vec: bitwise eor of an image with a vector constant
  35501. -VImage VImage::eorimage( std::vector<double> vec ) throw( VError )
  35502. -{
  35503. - VImage in = *this;
  35504. - VImage out;
  35505. -
  35506. - Vargv _vec( "im_eorimage_vec" );
  35507. -
  35508. - _vec.data(0) = in.image();
  35509. - _vec.data(1) = out.image();
  35510. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35511. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35512. - for( unsigned int i = 0; i < vec.size(); i++ )
  35513. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35514. - _vec.call();
  35515. - out._ref->addref( in._ref );
  35516. -
  35517. - return( out );
  35518. -}
  35519. -
  35520. -// im_shiftleft_vec: shift image array bits to left
  35521. -VImage VImage::shiftleft( std::vector<double> vec ) throw( VError )
  35522. -{
  35523. - VImage in = *this;
  35524. - VImage out;
  35525. -
  35526. - Vargv _vec( "im_shiftleft_vec" );
  35527. -
  35528. - _vec.data(0) = in.image();
  35529. - _vec.data(1) = out.image();
  35530. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35531. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35532. - for( unsigned int i = 0; i < vec.size(); i++ )
  35533. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35534. - _vec.call();
  35535. - out._ref->addref( in._ref );
  35536. -
  35537. - return( out );
  35538. -}
  35539. -
  35540. -// im_shiftleft: shift image n bits to left
  35541. -VImage VImage::shiftleft( int c ) throw( VError )
  35542. -{
  35543. - VImage in1 = *this;
  35544. - VImage out;
  35545. -
  35546. - Vargv _vec( "im_shiftleft" );
  35547. -
  35548. - _vec.data(0) = in1.image();
  35549. - _vec.data(1) = out.image();
  35550. - *((int*) _vec.data(2)) = c;
  35551. - _vec.call();
  35552. - out._ref->addref( in1._ref );
  35553. -
  35554. - return( out );
  35555. -}
  35556. -
  35557. -// im_shiftright_vec: shift image array bits to right
  35558. -VImage VImage::shiftright( std::vector<double> vec ) throw( VError )
  35559. -{
  35560. - VImage in = *this;
  35561. - VImage out;
  35562. -
  35563. - Vargv _vec( "im_shiftright_vec" );
  35564. -
  35565. - _vec.data(0) = in.image();
  35566. - _vec.data(1) = out.image();
  35567. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35568. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35569. - for( unsigned int i = 0; i < vec.size(); i++ )
  35570. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35571. - _vec.call();
  35572. - out._ref->addref( in._ref );
  35573. -
  35574. - return( out );
  35575. -}
  35576. -
  35577. -// im_shiftright: shift integer image n bits to right
  35578. -VImage VImage::shiftright( int c ) throw( VError )
  35579. -{
  35580. - VImage in1 = *this;
  35581. - VImage out;
  35582. -
  35583. - Vargv _vec( "im_shiftright" );
  35584. -
  35585. - _vec.data(0) = in1.image();
  35586. - _vec.data(1) = out.image();
  35587. - *((int*) _vec.data(2)) = c;
  35588. - _vec.call();
  35589. - out._ref->addref( in1._ref );
  35590. -
  35591. - return( out );
  35592. -}
  35593. -
  35594. -// im_blend: use cond image to blend between images in1 and in2
  35595. -VImage VImage::blend( VImage in1, VImage in2 ) throw( VError )
  35596. -{
  35597. - VImage cond = *this;
  35598. - VImage out;
  35599. -
  35600. - Vargv _vec( "im_blend" );
  35601. -
  35602. - _vec.data(0) = cond.image();
  35603. - _vec.data(1) = in1.image();
  35604. - _vec.data(2) = in2.image();
  35605. - _vec.data(3) = out.image();
  35606. - _vec.call();
  35607. - out._ref->addref( cond._ref );
  35608. - out._ref->addref( in1._ref );
  35609. - out._ref->addref( in2._ref );
  35610. -
  35611. - return( out );
  35612. -}
  35613. -
  35614. -// im_equal: two images equal in value
  35615. -VImage VImage::equal( VImage in2 ) throw( VError )
  35616. -{
  35617. - VImage in1 = *this;
  35618. - VImage out;
  35619. -
  35620. - Vargv _vec( "im_equal" );
  35621. -
  35622. - _vec.data(0) = in1.image();
  35623. - _vec.data(1) = in2.image();
  35624. - _vec.data(2) = out.image();
  35625. - _vec.call();
  35626. - out._ref->addref( in1._ref );
  35627. - out._ref->addref( in2._ref );
  35628. -
  35629. - return( out );
  35630. -}
  35631. -
  35632. -// im_equal_vec: image equals doublevec
  35633. -VImage VImage::equal( std::vector<double> vec ) throw( VError )
  35634. -{
  35635. - VImage in = *this;
  35636. - VImage out;
  35637. -
  35638. - Vargv _vec( "im_equal_vec" );
  35639. -
  35640. - _vec.data(0) = in.image();
  35641. - _vec.data(1) = out.image();
  35642. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35643. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35644. - for( unsigned int i = 0; i < vec.size(); i++ )
  35645. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35646. - _vec.call();
  35647. - out._ref->addref( in._ref );
  35648. -
  35649. - return( out );
  35650. -}
  35651. -
  35652. -// im_equalconst: image equals const
  35653. -VImage VImage::equal( double c ) throw( VError )
  35654. -{
  35655. - VImage in1 = *this;
  35656. - VImage out;
  35657. -
  35658. - Vargv _vec( "im_equalconst" );
  35659. -
  35660. - _vec.data(0) = in1.image();
  35661. - _vec.data(1) = out.image();
  35662. - *((double*) _vec.data(2)) = c;
  35663. - _vec.call();
  35664. - out._ref->addref( in1._ref );
  35665. -
  35666. - return( out );
  35667. -}
  35668. -
  35669. -// im_ifthenelse: use cond image to choose pels from image in1 or in2
  35670. -VImage VImage::ifthenelse( VImage in1, VImage in2 ) throw( VError )
  35671. -{
  35672. - VImage cond = *this;
  35673. - VImage out;
  35674. -
  35675. - Vargv _vec( "im_ifthenelse" );
  35676. -
  35677. - _vec.data(0) = cond.image();
  35678. - _vec.data(1) = in1.image();
  35679. - _vec.data(2) = in2.image();
  35680. - _vec.data(3) = out.image();
  35681. - _vec.call();
  35682. - out._ref->addref( cond._ref );
  35683. - out._ref->addref( in1._ref );
  35684. - out._ref->addref( in2._ref );
  35685. -
  35686. - return( out );
  35687. -}
  35688. -
  35689. -// im_less: in1 less than in2 in value
  35690. -VImage VImage::less( VImage in2 ) throw( VError )
  35691. -{
  35692. - VImage in1 = *this;
  35693. - VImage out;
  35694. -
  35695. - Vargv _vec( "im_less" );
  35696. -
  35697. - _vec.data(0) = in1.image();
  35698. - _vec.data(1) = in2.image();
  35699. - _vec.data(2) = out.image();
  35700. - _vec.call();
  35701. - out._ref->addref( in1._ref );
  35702. - out._ref->addref( in2._ref );
  35703. -
  35704. - return( out );
  35705. -}
  35706. -
  35707. -// im_less_vec: in less than doublevec
  35708. -VImage VImage::less( std::vector<double> vec ) throw( VError )
  35709. -{
  35710. - VImage in = *this;
  35711. - VImage out;
  35712. -
  35713. - Vargv _vec( "im_less_vec" );
  35714. -
  35715. - _vec.data(0) = in.image();
  35716. - _vec.data(1) = out.image();
  35717. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35718. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35719. - for( unsigned int i = 0; i < vec.size(); i++ )
  35720. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35721. - _vec.call();
  35722. - out._ref->addref( in._ref );
  35723. -
  35724. - return( out );
  35725. -}
  35726. -
  35727. -// im_lessconst: in less than const
  35728. -VImage VImage::less( double c ) throw( VError )
  35729. -{
  35730. - VImage in1 = *this;
  35731. - VImage out;
  35732. -
  35733. - Vargv _vec( "im_lessconst" );
  35734. -
  35735. - _vec.data(0) = in1.image();
  35736. - _vec.data(1) = out.image();
  35737. - *((double*) _vec.data(2)) = c;
  35738. - _vec.call();
  35739. - out._ref->addref( in1._ref );
  35740. -
  35741. - return( out );
  35742. -}
  35743. -
  35744. -// im_lesseq: in1 less than or equal to in2 in value
  35745. -VImage VImage::lesseq( VImage in2 ) throw( VError )
  35746. -{
  35747. - VImage in1 = *this;
  35748. - VImage out;
  35749. -
  35750. - Vargv _vec( "im_lesseq" );
  35751. -
  35752. - _vec.data(0) = in1.image();
  35753. - _vec.data(1) = in2.image();
  35754. - _vec.data(2) = out.image();
  35755. - _vec.call();
  35756. - out._ref->addref( in1._ref );
  35757. - out._ref->addref( in2._ref );
  35758. -
  35759. - return( out );
  35760. -}
  35761. -
  35762. -// im_lesseq_vec: in less than or equal to doublevec
  35763. -VImage VImage::lesseq( std::vector<double> vec ) throw( VError )
  35764. -{
  35765. - VImage in = *this;
  35766. - VImage out;
  35767. -
  35768. - Vargv _vec( "im_lesseq_vec" );
  35769. -
  35770. - _vec.data(0) = in.image();
  35771. - _vec.data(1) = out.image();
  35772. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35773. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35774. - for( unsigned int i = 0; i < vec.size(); i++ )
  35775. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35776. - _vec.call();
  35777. - out._ref->addref( in._ref );
  35778. -
  35779. - return( out );
  35780. -}
  35781. -
  35782. -// im_lesseqconst: in less than or equal to const
  35783. -VImage VImage::lesseq( double c ) throw( VError )
  35784. -{
  35785. - VImage in1 = *this;
  35786. - VImage out;
  35787. -
  35788. - Vargv _vec( "im_lesseqconst" );
  35789. -
  35790. - _vec.data(0) = in1.image();
  35791. - _vec.data(1) = out.image();
  35792. - *((double*) _vec.data(2)) = c;
  35793. - _vec.call();
  35794. - out._ref->addref( in1._ref );
  35795. -
  35796. - return( out );
  35797. -}
  35798. -
  35799. -// im_more: in1 more than in2 in value
  35800. -VImage VImage::more( VImage in2 ) throw( VError )
  35801. -{
  35802. - VImage in1 = *this;
  35803. - VImage out;
  35804. -
  35805. - Vargv _vec( "im_more" );
  35806. -
  35807. - _vec.data(0) = in1.image();
  35808. - _vec.data(1) = in2.image();
  35809. - _vec.data(2) = out.image();
  35810. - _vec.call();
  35811. - out._ref->addref( in1._ref );
  35812. - out._ref->addref( in2._ref );
  35813. -
  35814. - return( out );
  35815. -}
  35816. -
  35817. -// im_more_vec: in more than doublevec
  35818. -VImage VImage::more( std::vector<double> vec ) throw( VError )
  35819. -{
  35820. - VImage in = *this;
  35821. - VImage out;
  35822. -
  35823. - Vargv _vec( "im_more_vec" );
  35824. -
  35825. - _vec.data(0) = in.image();
  35826. - _vec.data(1) = out.image();
  35827. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35828. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35829. - for( unsigned int i = 0; i < vec.size(); i++ )
  35830. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35831. - _vec.call();
  35832. - out._ref->addref( in._ref );
  35833. -
  35834. - return( out );
  35835. -}
  35836. -
  35837. -// im_moreconst: in more than const
  35838. -VImage VImage::more( double c ) throw( VError )
  35839. -{
  35840. - VImage in1 = *this;
  35841. - VImage out;
  35842. -
  35843. - Vargv _vec( "im_moreconst" );
  35844. -
  35845. - _vec.data(0) = in1.image();
  35846. - _vec.data(1) = out.image();
  35847. - *((double*) _vec.data(2)) = c;
  35848. - _vec.call();
  35849. - out._ref->addref( in1._ref );
  35850. -
  35851. - return( out );
  35852. -}
  35853. -
  35854. -// im_moreeq: in1 more than or equal to in2 in value
  35855. -VImage VImage::moreeq( VImage in2 ) throw( VError )
  35856. -{
  35857. - VImage in1 = *this;
  35858. - VImage out;
  35859. -
  35860. - Vargv _vec( "im_moreeq" );
  35861. -
  35862. - _vec.data(0) = in1.image();
  35863. - _vec.data(1) = in2.image();
  35864. - _vec.data(2) = out.image();
  35865. - _vec.call();
  35866. - out._ref->addref( in1._ref );
  35867. - out._ref->addref( in2._ref );
  35868. -
  35869. - return( out );
  35870. -}
  35871. -
  35872. -// im_moreeq_vec: in more than or equal to doublevec
  35873. -VImage VImage::moreeq( std::vector<double> vec ) throw( VError )
  35874. -{
  35875. - VImage in = *this;
  35876. - VImage out;
  35877. -
  35878. - Vargv _vec( "im_moreeq_vec" );
  35879. -
  35880. - _vec.data(0) = in.image();
  35881. - _vec.data(1) = out.image();
  35882. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35883. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35884. - for( unsigned int i = 0; i < vec.size(); i++ )
  35885. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35886. - _vec.call();
  35887. - out._ref->addref( in._ref );
  35888. -
  35889. - return( out );
  35890. -}
  35891. -
  35892. -// im_moreeqconst: in more than or equal to const
  35893. -VImage VImage::moreeq( double c ) throw( VError )
  35894. -{
  35895. - VImage in1 = *this;
  35896. - VImage out;
  35897. -
  35898. - Vargv _vec( "im_moreeqconst" );
  35899. -
  35900. - _vec.data(0) = in1.image();
  35901. - _vec.data(1) = out.image();
  35902. - *((double*) _vec.data(2)) = c;
  35903. - _vec.call();
  35904. - out._ref->addref( in1._ref );
  35905. -
  35906. - return( out );
  35907. -}
  35908. -
  35909. -// im_notequal: two images not equal in value
  35910. -VImage VImage::notequal( VImage in2 ) throw( VError )
  35911. -{
  35912. - VImage in1 = *this;
  35913. - VImage out;
  35914. -
  35915. - Vargv _vec( "im_notequal" );
  35916. -
  35917. - _vec.data(0) = in1.image();
  35918. - _vec.data(1) = in2.image();
  35919. - _vec.data(2) = out.image();
  35920. - _vec.call();
  35921. - out._ref->addref( in1._ref );
  35922. - out._ref->addref( in2._ref );
  35923. -
  35924. - return( out );
  35925. -}
  35926. -
  35927. -// im_notequal_vec: image does not equal doublevec
  35928. -VImage VImage::notequal( std::vector<double> vec ) throw( VError )
  35929. -{
  35930. - VImage in = *this;
  35931. - VImage out;
  35932. -
  35933. - Vargv _vec( "im_notequal_vec" );
  35934. -
  35935. - _vec.data(0) = in.image();
  35936. - _vec.data(1) = out.image();
  35937. - ((im_doublevec_object*) _vec.data(2))->n = vec.size();
  35938. - ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()];
  35939. - for( unsigned int i = 0; i < vec.size(); i++ )
  35940. - ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i];
  35941. - _vec.call();
  35942. - out._ref->addref( in._ref );
  35943. -
  35944. - return( out );
  35945. -}
  35946. -
  35947. -// im_notequalconst: image does not equal const
  35948. -VImage VImage::notequal( double c ) throw( VError )
  35949. -{
  35950. - VImage in1 = *this;
  35951. - VImage out;
  35952. -
  35953. - Vargv _vec( "im_notequalconst" );
  35954. -
  35955. - _vec.data(0) = in1.image();
  35956. - _vec.data(1) = out.image();
  35957. - *((double*) _vec.data(2)) = c;
  35958. - _vec.call();
  35959. - out._ref->addref( in1._ref );
  35960. -
  35961. - return( out );
  35962. -}
  35963. -
  35964. -// im_quadratic: transform via quadratic
  35965. -VImage VImage::quadratic( VImage coeff ) throw( VError )
  35966. -{
  35967. - VImage in = *this;
  35968. - VImage out;
  35969. -
  35970. - Vargv _vec( "im_quadratic" );
  35971. -
  35972. - _vec.data(0) = in.image();
  35973. - _vec.data(1) = out.image();
  35974. - _vec.data(2) = coeff.image();
  35975. - _vec.call();
  35976. - out._ref->addref( in._ref );
  35977. - out._ref->addref( coeff._ref );
  35978. -
  35979. - return( out );
  35980. -}
  35981. -
  35982. -
  35983. -// bodies for package format
  35984. -// this file automatically generated from
  35985. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  35986. -// im_csv2vips: read a file in csv format
  35987. -VImage VImage::csv2vips( char* filename ) throw( VError )
  35988. -{
  35989. - VImage im;
  35990. -
  35991. - Vargv _vec( "im_csv2vips" );
  35992. -
  35993. - _vec.data(0) = (im_object) filename;
  35994. - _vec.data(1) = im.image();
  35995. - _vec.call();
  35996. -
  35997. - return( im );
  35998. -}
  35999. -
  36000. -// im_fits2vips: convert from fits
  36001. -VImage VImage::fits2vips( char* in ) throw( VError )
  36002. -{
  36003. - VImage out;
  36004. -
  36005. - Vargv _vec( "im_fits2vips" );
  36006. -
  36007. - _vec.data(0) = (im_object) in;
  36008. - _vec.data(1) = out.image();
  36009. - _vec.call();
  36010. -
  36011. - return( out );
  36012. -}
  36013. -
  36014. -// im_jpeg2vips: convert from jpeg
  36015. -VImage VImage::jpeg2vips( char* in ) throw( VError )
  36016. -{
  36017. - VImage out;
  36018. -
  36019. - Vargv _vec( "im_jpeg2vips" );
  36020. -
  36021. - _vec.data(0) = (im_object) in;
  36022. - _vec.data(1) = out.image();
  36023. - _vec.call();
  36024. -
  36025. - return( out );
  36026. -}
  36027. -
  36028. -// im_magick2vips: load file with libMagick
  36029. -VImage VImage::magick2vips( char* in ) throw( VError )
  36030. -{
  36031. - VImage out;
  36032. -
  36033. - Vargv _vec( "im_magick2vips" );
  36034. -
  36035. - _vec.data(0) = (im_object) in;
  36036. - _vec.data(1) = out.image();
  36037. - _vec.call();
  36038. -
  36039. - return( out );
  36040. -}
  36041. -
  36042. -// im_png2vips: convert PNG file to VIPS image
  36043. -VImage VImage::png2vips( char* in ) throw( VError )
  36044. -{
  36045. - VImage out;
  36046. -
  36047. - Vargv _vec( "im_png2vips" );
  36048. -
  36049. - _vec.data(0) = (im_object) in;
  36050. - _vec.data(1) = out.image();
  36051. - _vec.call();
  36052. -
  36053. - return( out );
  36054. -}
  36055. -
  36056. -// im_exr2vips: convert an OpenEXR file to VIPS
  36057. -VImage VImage::exr2vips( char* in ) throw( VError )
  36058. -{
  36059. - VImage out;
  36060. -
  36061. - Vargv _vec( "im_exr2vips" );
  36062. -
  36063. - _vec.data(0) = (im_object) in;
  36064. - _vec.data(1) = out.image();
  36065. - _vec.call();
  36066. -
  36067. - return( out );
  36068. -}
  36069. -
  36070. -// im_ppm2vips: read a file in pbm/pgm/ppm format
  36071. -VImage VImage::ppm2vips( char* filename ) throw( VError )
  36072. -{
  36073. - VImage im;
  36074. -
  36075. - Vargv _vec( "im_ppm2vips" );
  36076. -
  36077. - _vec.data(0) = (im_object) filename;
  36078. - _vec.data(1) = im.image();
  36079. - _vec.call();
  36080. -
  36081. - return( im );
  36082. -}
  36083. -
  36084. -// im_analyze2vips: read a file in analyze format
  36085. -VImage VImage::analyze2vips( char* filename ) throw( VError )
  36086. -{
  36087. - VImage im;
  36088. -
  36089. - Vargv _vec( "im_analyze2vips" );
  36090. -
  36091. - _vec.data(0) = (im_object) filename;
  36092. - _vec.data(1) = im.image();
  36093. - _vec.call();
  36094. -
  36095. - return( im );
  36096. -}
  36097. -
  36098. -// im_tiff2vips: convert TIFF file to VIPS image
  36099. -VImage VImage::tiff2vips( char* in ) throw( VError )
  36100. -{
  36101. - VImage out;
  36102. -
  36103. - Vargv _vec( "im_tiff2vips" );
  36104. -
  36105. - _vec.data(0) = (im_object) in;
  36106. - _vec.data(1) = out.image();
  36107. - _vec.call();
  36108. -
  36109. - return( out );
  36110. -}
  36111. -
  36112. -// im_vips2csv: write an image in csv format
  36113. -void VImage::vips2csv( char* filename ) throw( VError )
  36114. -{
  36115. - VImage in = *this;
  36116. - Vargv _vec( "im_vips2csv" );
  36117. -
  36118. - _vec.data(0) = in.image();
  36119. - _vec.data(1) = (im_object) filename;
  36120. - _vec.call();
  36121. -}
  36122. -
  36123. -// im_vips2dz: save as deepzoom
  36124. -void VImage::vips2dz( char* out ) throw( VError )
  36125. -{
  36126. - VImage in = *this;
  36127. - Vargv _vec( "im_vips2dz" );
  36128. -
  36129. - _vec.data(0) = in.image();
  36130. - _vec.data(1) = (im_object) out;
  36131. - _vec.call();
  36132. -}
  36133. -
  36134. -// im_vips2jpeg: convert to jpeg
  36135. -void VImage::vips2jpeg( char* out ) throw( VError )
  36136. -{
  36137. - VImage in = *this;
  36138. - Vargv _vec( "im_vips2jpeg" );
  36139. -
  36140. - _vec.data(0) = in.image();
  36141. - _vec.data(1) = (im_object) out;
  36142. - _vec.call();
  36143. -}
  36144. -
  36145. -// im_vips2mimejpeg: convert to jpeg as mime type on stdout
  36146. -void VImage::vips2mimejpeg( int qfac ) throw( VError )
  36147. -{
  36148. - VImage in = *this;
  36149. - Vargv _vec( "im_vips2mimejpeg" );
  36150. -
  36151. - _vec.data(0) = in.image();
  36152. - *((int*) _vec.data(1)) = qfac;
  36153. - _vec.call();
  36154. -}
  36155. -
  36156. -// im_vips2png: convert VIPS image to PNG file
  36157. -void VImage::vips2png( char* out ) throw( VError )
  36158. -{
  36159. - VImage in = *this;
  36160. - Vargv _vec( "im_vips2png" );
  36161. -
  36162. - _vec.data(0) = in.image();
  36163. - _vec.data(1) = (im_object) out;
  36164. - _vec.call();
  36165. -}
  36166. -
  36167. -// im_vips2ppm: write a file in pbm/pgm/ppm format
  36168. -void VImage::vips2ppm( char* filename ) throw( VError )
  36169. -{
  36170. - VImage im = *this;
  36171. - Vargv _vec( "im_vips2ppm" );
  36172. -
  36173. - _vec.data(0) = im.image();
  36174. - _vec.data(1) = (im_object) filename;
  36175. - _vec.call();
  36176. -}
  36177. -
  36178. -// im_vips2tiff: convert VIPS image to TIFF file
  36179. -void VImage::vips2tiff( char* out ) throw( VError )
  36180. -{
  36181. - VImage in = *this;
  36182. - Vargv _vec( "im_vips2tiff" );
  36183. -
  36184. - _vec.data(0) = in.image();
  36185. - _vec.data(1) = (im_object) out;
  36186. - _vec.call();
  36187. -}
  36188. -
  36189. -
  36190. -// bodies for package freq_filt
  36191. -// this file automatically generated from
  36192. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  36193. -// im_create_fmask: create frequency domain filter mask
  36194. -VImage VImage::create_fmask( int width, int height, int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError )
  36195. -{
  36196. - VImage out;
  36197. -
  36198. - Vargv _vec( "im_create_fmask" );
  36199. -
  36200. - _vec.data(0) = out.image();
  36201. - *((int*) _vec.data(1)) = width;
  36202. - *((int*) _vec.data(2)) = height;
  36203. - *((int*) _vec.data(3)) = type;
  36204. - *((double*) _vec.data(4)) = p1;
  36205. - *((double*) _vec.data(5)) = p2;
  36206. - *((double*) _vec.data(6)) = p3;
  36207. - *((double*) _vec.data(7)) = p4;
  36208. - *((double*) _vec.data(8)) = p5;
  36209. - _vec.call();
  36210. -
  36211. - return( out );
  36212. -}
  36213. -
  36214. -// im_disp_ps: make displayable power spectrum
  36215. -VImage VImage::disp_ps() throw( VError )
  36216. -{
  36217. - VImage in = *this;
  36218. - VImage out;
  36219. -
  36220. - Vargv _vec( "im_disp_ps" );
  36221. -
  36222. - _vec.data(0) = in.image();
  36223. - _vec.data(1) = out.image();
  36224. - _vec.call();
  36225. -
  36226. - return( out );
  36227. -}
  36228. -
  36229. -// im_flt_image_freq: frequency domain filter image
  36230. -VImage VImage::flt_image_freq( int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError )
  36231. -{
  36232. - VImage in = *this;
  36233. - VImage out;
  36234. -
  36235. - Vargv _vec( "im_flt_image_freq" );
  36236. -
  36237. - _vec.data(0) = in.image();
  36238. - _vec.data(1) = out.image();
  36239. - *((int*) _vec.data(2)) = type;
  36240. - *((double*) _vec.data(3)) = p1;
  36241. - *((double*) _vec.data(4)) = p2;
  36242. - *((double*) _vec.data(5)) = p3;
  36243. - *((double*) _vec.data(6)) = p4;
  36244. - *((double*) _vec.data(7)) = p5;
  36245. - _vec.call();
  36246. -
  36247. - return( out );
  36248. -}
  36249. -
  36250. -// im_fractsurf: generate a fractal surface of given dimension
  36251. -VImage VImage::fractsurf( int size, double dimension ) throw( VError )
  36252. -{
  36253. - VImage out;
  36254. -
  36255. - Vargv _vec( "im_fractsurf" );
  36256. -
  36257. - _vec.data(0) = out.image();
  36258. - *((int*) _vec.data(1)) = size;
  36259. - *((double*) _vec.data(2)) = dimension;
  36260. - _vec.call();
  36261. -
  36262. - return( out );
  36263. -}
  36264. -
  36265. -// im_freqflt: frequency-domain filter of in with mask
  36266. -VImage VImage::freqflt( VImage mask ) throw( VError )
  36267. -{
  36268. - VImage in = *this;
  36269. - VImage out;
  36270. -
  36271. - Vargv _vec( "im_freqflt" );
  36272. -
  36273. - _vec.data(0) = in.image();
  36274. - _vec.data(1) = mask.image();
  36275. - _vec.data(2) = out.image();
  36276. - _vec.call();
  36277. -
  36278. - return( out );
  36279. -}
  36280. -
  36281. -// im_fwfft: forward fast-fourier transform
  36282. -VImage VImage::fwfft() throw( VError )
  36283. -{
  36284. - VImage in = *this;
  36285. - VImage out;
  36286. -
  36287. - Vargv _vec( "im_fwfft" );
  36288. -
  36289. - _vec.data(0) = in.image();
  36290. - _vec.data(1) = out.image();
  36291. - _vec.call();
  36292. -
  36293. - return( out );
  36294. -}
  36295. -
  36296. -// im_rotquad: rotate image quadrants to move origin to centre
  36297. -VImage VImage::rotquad() throw( VError )
  36298. -{
  36299. - VImage in = *this;
  36300. - VImage out;
  36301. -
  36302. - Vargv _vec( "im_rotquad" );
  36303. -
  36304. - _vec.data(0) = in.image();
  36305. - _vec.data(1) = out.image();
  36306. - _vec.call();
  36307. -
  36308. - return( out );
  36309. -}
  36310. -
  36311. -// im_invfft: inverse fast-fourier transform
  36312. -VImage VImage::invfft() throw( VError )
  36313. -{
  36314. - VImage in = *this;
  36315. - VImage out;
  36316. -
  36317. - Vargv _vec( "im_invfft" );
  36318. -
  36319. - _vec.data(0) = in.image();
  36320. - _vec.data(1) = out.image();
  36321. - _vec.call();
  36322. -
  36323. - return( out );
  36324. -}
  36325. -
  36326. -// im_phasecor_fft: non-normalised correlation of gradient of in2 within in1
  36327. -VImage VImage::phasecor_fft( VImage in2 ) throw( VError )
  36328. -{
  36329. - VImage in1 = *this;
  36330. - VImage out;
  36331. -
  36332. - Vargv _vec( "im_phasecor_fft" );
  36333. -
  36334. - _vec.data(0) = in1.image();
  36335. - _vec.data(1) = in2.image();
  36336. - _vec.data(2) = out.image();
  36337. - _vec.call();
  36338. -
  36339. - return( out );
  36340. -}
  36341. -
  36342. -// im_invfftr: real part of inverse fast-fourier transform
  36343. -VImage VImage::invfftr() throw( VError )
  36344. -{
  36345. - VImage in = *this;
  36346. - VImage out;
  36347. -
  36348. - Vargv _vec( "im_invfftr" );
  36349. -
  36350. - _vec.data(0) = in.image();
  36351. - _vec.data(1) = out.image();
  36352. - _vec.call();
  36353. -
  36354. - return( out );
  36355. -}
  36356. -
  36357. -
  36358. -// bodies for package histograms_lut
  36359. -// this file automatically generated from
  36360. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  36361. -// im_gammacorrect: gamma-correct image
  36362. -VImage VImage::gammacorrect( double exponent ) throw( VError )
  36363. -{
  36364. - VImage in = *this;
  36365. - VImage out;
  36366. -
  36367. - Vargv _vec( "im_gammacorrect" );
  36368. -
  36369. - _vec.data(0) = in.image();
  36370. - _vec.data(1) = out.image();
  36371. - *((double*) _vec.data(2)) = exponent;
  36372. - _vec.call();
  36373. - out._ref->addref( in._ref );
  36374. -
  36375. - return( out );
  36376. -}
  36377. -
  36378. -// im_heq: histogram-equalise image
  36379. -VImage VImage::heq( int band_number ) throw( VError )
  36380. -{
  36381. - VImage in = *this;
  36382. - VImage out;
  36383. -
  36384. - Vargv _vec( "im_heq" );
  36385. -
  36386. - _vec.data(0) = in.image();
  36387. - _vec.data(1) = out.image();
  36388. - *((int*) _vec.data(2)) = band_number;
  36389. - _vec.call();
  36390. - out._ref->addref( in._ref );
  36391. -
  36392. - return( out );
  36393. -}
  36394. -
  36395. -// im_hist: find and graph histogram of image
  36396. -VImage VImage::hist( int band_number ) throw( VError )
  36397. -{
  36398. - VImage in = *this;
  36399. - VImage out;
  36400. -
  36401. - Vargv _vec( "im_hist" );
  36402. -
  36403. - _vec.data(0) = in.image();
  36404. - _vec.data(1) = out.image();
  36405. - *((int*) _vec.data(2)) = band_number;
  36406. - _vec.call();
  36407. - out._ref->addref( in._ref );
  36408. -
  36409. - return( out );
  36410. -}
  36411. -
  36412. -// im_histcum: turn histogram to cumulative histogram
  36413. -VImage VImage::histcum() throw( VError )
  36414. -{
  36415. - VImage in = *this;
  36416. - VImage out;
  36417. -
  36418. - Vargv _vec( "im_histcum" );
  36419. -
  36420. - _vec.data(0) = in.image();
  36421. - _vec.data(1) = out.image();
  36422. - _vec.call();
  36423. - out._ref->addref( in._ref );
  36424. -
  36425. - return( out );
  36426. -}
  36427. -
  36428. -// im_histeq: form histogram equalistion LUT
  36429. -VImage VImage::histeq() throw( VError )
  36430. -{
  36431. - VImage in = *this;
  36432. - VImage out;
  36433. -
  36434. - Vargv _vec( "im_histeq" );
  36435. -
  36436. - _vec.data(0) = in.image();
  36437. - _vec.data(1) = out.image();
  36438. - _vec.call();
  36439. - out._ref->addref( in._ref );
  36440. -
  36441. - return( out );
  36442. -}
  36443. -
  36444. -// im_hist_indexed: make a histogram with an index image
  36445. -VImage VImage::hist_indexed( VImage value ) throw( VError )
  36446. -{
  36447. - VImage index = *this;
  36448. - VImage out;
  36449. -
  36450. - Vargv _vec( "im_hist_indexed" );
  36451. -
  36452. - _vec.data(0) = index.image();
  36453. - _vec.data(1) = value.image();
  36454. - _vec.data(2) = out.image();
  36455. - _vec.call();
  36456. - out._ref->addref( index._ref );
  36457. - out._ref->addref( value._ref );
  36458. -
  36459. - return( out );
  36460. -}
  36461. -
  36462. -// im_histgr: find histogram of image
  36463. -VImage VImage::histgr( int band_number ) throw( VError )
  36464. -{
  36465. - VImage in = *this;
  36466. - VImage out;
  36467. -
  36468. - Vargv _vec( "im_histgr" );
  36469. -
  36470. - _vec.data(0) = in.image();
  36471. - _vec.data(1) = out.image();
  36472. - *((int*) _vec.data(2)) = band_number;
  36473. - _vec.call();
  36474. -
  36475. - return( out );
  36476. -}
  36477. -
  36478. -// im_histnD: find 1D, 2D or 3D histogram of image
  36479. -VImage VImage::histnD( int bins ) throw( VError )
  36480. -{
  36481. - VImage in = *this;
  36482. - VImage out;
  36483. -
  36484. - Vargv _vec( "im_histnD" );
  36485. -
  36486. - _vec.data(0) = in.image();
  36487. - _vec.data(1) = out.image();
  36488. - *((int*) _vec.data(2)) = bins;
  36489. - _vec.call();
  36490. -
  36491. - return( out );
  36492. -}
  36493. -
  36494. -// im_histnorm: form normalised histogram
  36495. -VImage VImage::histnorm() throw( VError )
  36496. -{
  36497. - VImage in = *this;
  36498. - VImage out;
  36499. -
  36500. - Vargv _vec( "im_histnorm" );
  36501. -
  36502. - _vec.data(0) = in.image();
  36503. - _vec.data(1) = out.image();
  36504. - _vec.call();
  36505. - out._ref->addref( in._ref );
  36506. -
  36507. - return( out );
  36508. -}
  36509. -
  36510. -// im_histplot: plot graph of histogram
  36511. -VImage VImage::histplot() throw( VError )
  36512. -{
  36513. - VImage in = *this;
  36514. - VImage out;
  36515. -
  36516. - Vargv _vec( "im_histplot" );
  36517. -
  36518. - _vec.data(0) = in.image();
  36519. - _vec.data(1) = out.image();
  36520. - _vec.call();
  36521. - out._ref->addref( in._ref );
  36522. -
  36523. - return( out );
  36524. -}
  36525. -
  36526. -// im_histspec: find histogram which will make pdf of in match ref
  36527. -VImage VImage::histspec( VImage ref ) throw( VError )
  36528. -{
  36529. - VImage in = *this;
  36530. - VImage out;
  36531. -
  36532. - Vargv _vec( "im_histspec" );
  36533. -
  36534. - _vec.data(0) = in.image();
  36535. - _vec.data(1) = ref.image();
  36536. - _vec.data(2) = out.image();
  36537. - _vec.call();
  36538. -
  36539. - return( out );
  36540. -}
  36541. -
  36542. -// im_hsp: match stats of in to stats of ref
  36543. -VImage VImage::hsp( VImage ref ) throw( VError )
  36544. -{
  36545. - VImage in = *this;
  36546. - VImage out;
  36547. -
  36548. - Vargv _vec( "im_hsp" );
  36549. -
  36550. - _vec.data(0) = in.image();
  36551. - _vec.data(1) = ref.image();
  36552. - _vec.data(2) = out.image();
  36553. - _vec.call();
  36554. -
  36555. - return( out );
  36556. -}
  36557. -
  36558. -// im_identity: generate identity histogram
  36559. -VImage VImage::identity( int nbands ) throw( VError )
  36560. -{
  36561. - VImage out;
  36562. -
  36563. - Vargv _vec( "im_identity" );
  36564. -
  36565. - _vec.data(0) = out.image();
  36566. - *((int*) _vec.data(1)) = nbands;
  36567. - _vec.call();
  36568. -
  36569. - return( out );
  36570. -}
  36571. -
  36572. -// im_identity_ushort: generate ushort identity histogram
  36573. -VImage VImage::identity_ushort( int nbands, int size ) throw( VError )
  36574. -{
  36575. - VImage out;
  36576. -
  36577. - Vargv _vec( "im_identity_ushort" );
  36578. -
  36579. - _vec.data(0) = out.image();
  36580. - *((int*) _vec.data(1)) = nbands;
  36581. - *((int*) _vec.data(2)) = size;
  36582. - _vec.call();
  36583. -
  36584. - return( out );
  36585. -}
  36586. -
  36587. -// im_ismonotonic: test LUT for monotonicity
  36588. -int VImage::ismonotonic() throw( VError )
  36589. -{
  36590. - VImage lut = *this;
  36591. - int mono;
  36592. -
  36593. - Vargv _vec( "im_ismonotonic" );
  36594. -
  36595. - _vec.data(0) = lut.image();
  36596. - _vec.call();
  36597. - mono = *((int*)_vec.data(1));
  36598. -
  36599. - return( mono );
  36600. -}
  36601. -
  36602. -// im_lhisteq: local histogram equalisation
  36603. -VImage VImage::lhisteq( int width, int height ) throw( VError )
  36604. -{
  36605. - VImage in = *this;
  36606. - VImage out;
  36607. -
  36608. - Vargv _vec( "im_lhisteq" );
  36609. -
  36610. - _vec.data(0) = in.image();
  36611. - _vec.data(1) = out.image();
  36612. - *((int*) _vec.data(2)) = width;
  36613. - *((int*) _vec.data(3)) = height;
  36614. - _vec.call();
  36615. - out._ref->addref( in._ref );
  36616. -
  36617. - return( out );
  36618. -}
  36619. -
  36620. -// im_mpercent: find threshold above which there are percent values
  36621. -int VImage::mpercent( double percent ) throw( VError )
  36622. -{
  36623. - VImage in = *this;
  36624. - int thresh;
  36625. -
  36626. - Vargv _vec( "im_mpercent" );
  36627. -
  36628. - _vec.data(0) = in.image();
  36629. - *((double*) _vec.data(1)) = percent;
  36630. - _vec.call();
  36631. - thresh = *((int*)_vec.data(2));
  36632. -
  36633. - return( thresh );
  36634. -}
  36635. -
  36636. -// im_invertlut: generate correction table from set of measures
  36637. -VImage VImage::invertlut( VDMask measures, int lut_size ) throw( VError )
  36638. -{
  36639. - VImage lut;
  36640. -
  36641. - Vargv _vec( "im_invertlut" );
  36642. -
  36643. - ((im_mask_object*) _vec.data(0))->mask = measures.mask().dptr;
  36644. - _vec.data(1) = lut.image();
  36645. - *((int*) _vec.data(2)) = lut_size;
  36646. - _vec.call();
  36647. -
  36648. - return( lut );
  36649. -}
  36650. -
  36651. -// im_buildlut: generate LUT table from set of x/y positions
  36652. -VImage VImage::buildlut( VDMask xyes ) throw( VError )
  36653. -{
  36654. - VImage lut;
  36655. -
  36656. - Vargv _vec( "im_buildlut" );
  36657. -
  36658. - ((im_mask_object*) _vec.data(0))->mask = xyes.mask().dptr;
  36659. - _vec.data(1) = lut.image();
  36660. - _vec.call();
  36661. -
  36662. - return( lut );
  36663. -}
  36664. -
  36665. -// im_maplut: map image through LUT
  36666. -VImage VImage::maplut( VImage lut ) throw( VError )
  36667. -{
  36668. - VImage in = *this;
  36669. - VImage out;
  36670. -
  36671. - Vargv _vec( "im_maplut" );
  36672. -
  36673. - _vec.data(0) = in.image();
  36674. - _vec.data(1) = out.image();
  36675. - _vec.data(2) = lut.image();
  36676. - _vec.call();
  36677. - out._ref->addref( in._ref );
  36678. - out._ref->addref( lut._ref );
  36679. -
  36680. - return( out );
  36681. -}
  36682. -
  36683. -// im_project: find horizontal and vertical projections of an image
  36684. -VImage VImage::project( VImage& vout ) throw( VError )
  36685. -{
  36686. - VImage in = *this;
  36687. - VImage hout;
  36688. -
  36689. - Vargv _vec( "im_project" );
  36690. -
  36691. - _vec.data(0) = in.image();
  36692. - _vec.data(1) = hout.image();
  36693. - _vec.data(2) = vout.image();
  36694. - _vec.call();
  36695. -
  36696. - return( hout );
  36697. -}
  36698. -
  36699. -// im_stdif: statistical differencing
  36700. -VImage VImage::stdif( double a, double m0, double b, double s0, int xw, int yw ) throw( VError )
  36701. -{
  36702. - VImage in = *this;
  36703. - VImage out;
  36704. -
  36705. - Vargv _vec( "im_stdif" );
  36706. -
  36707. - _vec.data(0) = in.image();
  36708. - _vec.data(1) = out.image();
  36709. - *((double*) _vec.data(2)) = a;
  36710. - *((double*) _vec.data(3)) = m0;
  36711. - *((double*) _vec.data(4)) = b;
  36712. - *((double*) _vec.data(5)) = s0;
  36713. - *((int*) _vec.data(6)) = xw;
  36714. - *((int*) _vec.data(7)) = yw;
  36715. - _vec.call();
  36716. - out._ref->addref( in._ref );
  36717. -
  36718. - return( out );
  36719. -}
  36720. -
  36721. -// im_tone_analyse: analyse in and create LUT for tone adjustment
  36722. -VImage VImage::tone_analyse( double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
  36723. -{
  36724. - VImage in = *this;
  36725. - VImage hist;
  36726. -
  36727. - Vargv _vec( "im_tone_analyse" );
  36728. -
  36729. - _vec.data(0) = in.image();
  36730. - _vec.data(1) = hist.image();
  36731. - *((double*) _vec.data(2)) = Ps;
  36732. - *((double*) _vec.data(3)) = Pm;
  36733. - *((double*) _vec.data(4)) = Ph;
  36734. - *((double*) _vec.data(5)) = S;
  36735. - *((double*) _vec.data(6)) = M;
  36736. - *((double*) _vec.data(7)) = H;
  36737. - _vec.call();
  36738. -
  36739. - return( hist );
  36740. -}
  36741. -
  36742. -// im_tone_build: create LUT for tone adjustment of LabS images
  36743. -VImage VImage::tone_build( double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
  36744. -{
  36745. - VImage hist;
  36746. -
  36747. - Vargv _vec( "im_tone_build" );
  36748. -
  36749. - _vec.data(0) = hist.image();
  36750. - *((double*) _vec.data(1)) = Lb;
  36751. - *((double*) _vec.data(2)) = Lw;
  36752. - *((double*) _vec.data(3)) = Ps;
  36753. - *((double*) _vec.data(4)) = Pm;
  36754. - *((double*) _vec.data(5)) = Ph;
  36755. - *((double*) _vec.data(6)) = S;
  36756. - *((double*) _vec.data(7)) = M;
  36757. - *((double*) _vec.data(8)) = H;
  36758. - _vec.call();
  36759. -
  36760. - return( hist );
  36761. -}
  36762. -
  36763. -// im_tone_build_range: create LUT for tone adjustment
  36764. -VImage VImage::tone_build_range( int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError )
  36765. -{
  36766. - VImage hist;
  36767. -
  36768. - Vargv _vec( "im_tone_build_range" );
  36769. -
  36770. - _vec.data(0) = hist.image();
  36771. - *((int*) _vec.data(1)) = in_max;
  36772. - *((int*) _vec.data(2)) = out_max;
  36773. - *((double*) _vec.data(3)) = Lb;
  36774. - *((double*) _vec.data(4)) = Lw;
  36775. - *((double*) _vec.data(5)) = Ps;
  36776. - *((double*) _vec.data(6)) = Pm;
  36777. - *((double*) _vec.data(7)) = Ph;
  36778. - *((double*) _vec.data(8)) = S;
  36779. - *((double*) _vec.data(9)) = M;
  36780. - *((double*) _vec.data(10)) = H;
  36781. - _vec.call();
  36782. -
  36783. - return( hist );
  36784. -}
  36785. -
  36786. -// im_tone_map: map L channel of LabS or LabQ image through LUT
  36787. -VImage VImage::tone_map( VImage lut ) throw( VError )
  36788. -{
  36789. - VImage in = *this;
  36790. - VImage out;
  36791. -
  36792. - Vargv _vec( "im_tone_map" );
  36793. -
  36794. - _vec.data(0) = in.image();
  36795. - _vec.data(1) = out.image();
  36796. - _vec.data(2) = lut.image();
  36797. - _vec.call();
  36798. - out._ref->addref( in._ref );
  36799. - out._ref->addref( lut._ref );
  36800. -
  36801. - return( out );
  36802. -}
  36803. -
  36804. -
  36805. -// bodies for package inplace
  36806. -// this file automatically generated from
  36807. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  36808. -// im_draw_circle: draw circle on image
  36809. -void VImage::draw_circle( int cx, int cy, int radius, int fill, std::vector<double> ink ) throw( VError )
  36810. -{
  36811. - VImage image = *this;
  36812. - Vargv _vec( "im_draw_circle" );
  36813. -
  36814. - _vec.data(0) = image.image();
  36815. - *((int*) _vec.data(1)) = cx;
  36816. - *((int*) _vec.data(2)) = cy;
  36817. - *((int*) _vec.data(3)) = radius;
  36818. - *((int*) _vec.data(4)) = fill;
  36819. - ((im_doublevec_object*) _vec.data(5))->n = ink.size();
  36820. - ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()];
  36821. - for( unsigned int i = 0; i < ink.size(); i++ )
  36822. - ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i];
  36823. - _vec.call();
  36824. -}
  36825. -
  36826. -// im_draw_rect: draw rect on image
  36827. -void VImage::draw_rect( int left, int top, int width, int height, int fill, std::vector<double> ink ) throw( VError )
  36828. -{
  36829. - VImage image = *this;
  36830. - Vargv _vec( "im_draw_rect" );
  36831. -
  36832. - _vec.data(0) = image.image();
  36833. - *((int*) _vec.data(1)) = left;
  36834. - *((int*) _vec.data(2)) = top;
  36835. - *((int*) _vec.data(3)) = width;
  36836. - *((int*) _vec.data(4)) = height;
  36837. - *((int*) _vec.data(5)) = fill;
  36838. - ((im_doublevec_object*) _vec.data(6))->n = ink.size();
  36839. - ((im_doublevec_object*) _vec.data(6))->vec = new double[ink.size()];
  36840. - for( unsigned int i = 0; i < ink.size(); i++ )
  36841. - ((im_doublevec_object*) _vec.data(6))->vec[i] = ink[i];
  36842. - _vec.call();
  36843. -}
  36844. -
  36845. -// im_draw_line: draw line on image
  36846. -void VImage::draw_line( int x1, int y1, int x2, int y2, std::vector<double> ink ) throw( VError )
  36847. -{
  36848. - VImage image = *this;
  36849. - Vargv _vec( "im_draw_line" );
  36850. -
  36851. - _vec.data(0) = image.image();
  36852. - *((int*) _vec.data(1)) = x1;
  36853. - *((int*) _vec.data(2)) = y1;
  36854. - *((int*) _vec.data(3)) = x2;
  36855. - *((int*) _vec.data(4)) = y2;
  36856. - ((im_doublevec_object*) _vec.data(5))->n = ink.size();
  36857. - ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()];
  36858. - for( unsigned int i = 0; i < ink.size(); i++ )
  36859. - ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i];
  36860. - _vec.call();
  36861. -}
  36862. -
  36863. -// im_draw_point: draw point on image
  36864. -void VImage::draw_point( int x, int y, std::vector<double> ink ) throw( VError )
  36865. -{
  36866. - VImage image = *this;
  36867. - Vargv _vec( "im_draw_point" );
  36868. -
  36869. - _vec.data(0) = image.image();
  36870. - *((int*) _vec.data(1)) = x;
  36871. - *((int*) _vec.data(2)) = y;
  36872. - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
  36873. - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
  36874. - for( unsigned int i = 0; i < ink.size(); i++ )
  36875. - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
  36876. - _vec.call();
  36877. -}
  36878. -
  36879. -// im_draw_smudge: smudge part of an image
  36880. -void VImage::draw_smudge( int left, int top, int width, int height ) throw( VError )
  36881. -{
  36882. - VImage image = *this;
  36883. - Vargv _vec( "im_draw_smudge" );
  36884. -
  36885. - _vec.data(0) = image.image();
  36886. - *((int*) _vec.data(1)) = left;
  36887. - *((int*) _vec.data(2)) = top;
  36888. - *((int*) _vec.data(3)) = width;
  36889. - *((int*) _vec.data(4)) = height;
  36890. - _vec.call();
  36891. -}
  36892. -
  36893. -// im_draw_flood: flood with ink from x, y while pixel != ink
  36894. -void VImage::draw_flood( int x, int y, std::vector<double> ink ) throw( VError )
  36895. -{
  36896. - VImage image = *this;
  36897. - Vargv _vec( "im_draw_flood" );
  36898. -
  36899. - _vec.data(0) = image.image();
  36900. - *((int*) _vec.data(1)) = x;
  36901. - *((int*) _vec.data(2)) = y;
  36902. - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
  36903. - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
  36904. - for( unsigned int i = 0; i < ink.size(); i++ )
  36905. - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
  36906. - _vec.call();
  36907. -}
  36908. -
  36909. -// im_draw_flood_blob: flood with ink from x, y while pixel == start
  36910. -void VImage::draw_flood_blob( int x, int y, std::vector<double> ink ) throw( VError )
  36911. -{
  36912. - VImage image = *this;
  36913. - Vargv _vec( "im_draw_flood_blob" );
  36914. -
  36915. - _vec.data(0) = image.image();
  36916. - *((int*) _vec.data(1)) = x;
  36917. - *((int*) _vec.data(2)) = y;
  36918. - ((im_doublevec_object*) _vec.data(3))->n = ink.size();
  36919. - ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()];
  36920. - for( unsigned int i = 0; i < ink.size(); i++ )
  36921. - ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i];
  36922. - _vec.call();
  36923. -}
  36924. -
  36925. -// im_draw_flood_other: flood image with serial from x, y while pixel == start
  36926. -void VImage::draw_flood_other( VImage test, int x, int y, int serial ) throw( VError )
  36927. -{
  36928. - VImage image = *this;
  36929. - Vargv _vec( "im_draw_flood_other" );
  36930. -
  36931. - _vec.data(0) = image.image();
  36932. - _vec.data(1) = test.image();
  36933. - *((int*) _vec.data(2)) = x;
  36934. - *((int*) _vec.data(3)) = y;
  36935. - *((int*) _vec.data(4)) = serial;
  36936. - _vec.call();
  36937. -}
  36938. -
  36939. -// im_draw_image: draw image sub inside image main at position (x,y)
  36940. -void VImage::draw_image( VImage sub, int x, int y ) throw( VError )
  36941. -{
  36942. - VImage image = *this;
  36943. - Vargv _vec( "im_draw_image" );
  36944. -
  36945. - _vec.data(0) = image.image();
  36946. - _vec.data(1) = sub.image();
  36947. - *((int*) _vec.data(2)) = x;
  36948. - *((int*) _vec.data(3)) = y;
  36949. - _vec.call();
  36950. -}
  36951. -
  36952. -// im_draw_mask: draw mask sub inside image main at position (x,y)
  36953. -void VImage::draw_mask( VImage mask, int x, int y, std::vector<double> ink ) throw( VError )
  36954. -{
  36955. - VImage image = *this;
  36956. - Vargv _vec( "im_draw_mask" );
  36957. -
  36958. - _vec.data(0) = image.image();
  36959. - _vec.data(1) = mask.image();
  36960. - *((int*) _vec.data(2)) = x;
  36961. - *((int*) _vec.data(3)) = y;
  36962. - ((im_doublevec_object*) _vec.data(4))->n = ink.size();
  36963. - ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()];
  36964. - for( unsigned int i = 0; i < ink.size(); i++ )
  36965. - ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i];
  36966. - _vec.call();
  36967. -}
  36968. -
  36969. -// im_lineset: draw line between points (x1,y1) and (x2,y2)
  36970. -VImage VImage::line( VImage mask, VImage ink, std::vector<int> x1, std::vector<int> y1, std::vector<int> x2, std::vector<int> y2 ) throw( VError )
  36971. -{
  36972. - VImage in = *this;
  36973. - VImage out;
  36974. -
  36975. - Vargv _vec( "im_lineset" );
  36976. -
  36977. - _vec.data(0) = in.image();
  36978. - _vec.data(1) = out.image();
  36979. - _vec.data(2) = mask.image();
  36980. - _vec.data(3) = ink.image();
  36981. - ((im_intvec_object*) _vec.data(4))->n = x1.size();
  36982. - ((im_intvec_object*) _vec.data(4))->vec = new int[x1.size()];
  36983. - for( unsigned int i = 0; i < x1.size(); i++ )
  36984. - ((im_intvec_object*) _vec.data(4))->vec[i] = x1[i];
  36985. - ((im_intvec_object*) _vec.data(5))->n = y1.size();
  36986. - ((im_intvec_object*) _vec.data(5))->vec = new int[y1.size()];
  36987. - for( unsigned int i = 0; i < y1.size(); i++ )
  36988. - ((im_intvec_object*) _vec.data(5))->vec[i] = y1[i];
  36989. - ((im_intvec_object*) _vec.data(6))->n = x2.size();
  36990. - ((im_intvec_object*) _vec.data(6))->vec = new int[x2.size()];
  36991. - for( unsigned int i = 0; i < x2.size(); i++ )
  36992. - ((im_intvec_object*) _vec.data(6))->vec[i] = x2[i];
  36993. - ((im_intvec_object*) _vec.data(7))->n = y2.size();
  36994. - ((im_intvec_object*) _vec.data(7))->vec = new int[y2.size()];
  36995. - for( unsigned int i = 0; i < y2.size(); i++ )
  36996. - ((im_intvec_object*) _vec.data(7))->vec[i] = y2[i];
  36997. - _vec.call();
  36998. -
  36999. - return( out );
  37000. -}
  37001. -
  37002. -
  37003. -// bodies for package iofuncs
  37004. -// this file automatically generated from
  37005. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37006. -// im_binfile: open a headerless binary file
  37007. -VImage VImage::binfile( char* filename, int width, int height, int bands, int offset ) throw( VError )
  37008. -{
  37009. - VImage out;
  37010. -
  37011. - Vargv _vec( "im_binfile" );
  37012. -
  37013. - _vec.data(0) = (im_object) filename;
  37014. - _vec.data(1) = out.image();
  37015. - *((int*) _vec.data(2)) = width;
  37016. - *((int*) _vec.data(3)) = height;
  37017. - *((int*) _vec.data(4)) = bands;
  37018. - *((int*) _vec.data(5)) = offset;
  37019. - _vec.call();
  37020. -
  37021. - return( out );
  37022. -}
  37023. -
  37024. -// im_cache: cache results of an operation
  37025. -VImage VImage::cache( int tile_width, int tile_height, int max_tiles ) throw( VError )
  37026. -{
  37027. - VImage in = *this;
  37028. - VImage out;
  37029. -
  37030. - Vargv _vec( "im_cache" );
  37031. -
  37032. - _vec.data(0) = in.image();
  37033. - _vec.data(1) = out.image();
  37034. - *((int*) _vec.data(2)) = tile_width;
  37035. - *((int*) _vec.data(3)) = tile_height;
  37036. - *((int*) _vec.data(4)) = max_tiles;
  37037. - _vec.call();
  37038. -
  37039. - return( out );
  37040. -}
  37041. -
  37042. -// im_getext: return the image metadata XML as a string
  37043. -char* VImage::getext() throw( VError )
  37044. -{
  37045. - VImage image = *this;
  37046. - char* history;
  37047. -
  37048. - Vargv _vec( "im_getext" );
  37049. -
  37050. - _vec.data(0) = image.image();
  37051. - _vec.call();
  37052. - history = (char*) _vec.data(1);
  37053. -
  37054. - return( history );
  37055. -}
  37056. -
  37057. -// im_header_get_typeof: return field type
  37058. -int VImage::header_get_typeof( char* field ) throw( VError )
  37059. -{
  37060. - VImage image = *this;
  37061. - int gtype;
  37062. -
  37063. - Vargv _vec( "im_header_get_typeof" );
  37064. -
  37065. - _vec.data(0) = (im_object) field;
  37066. - _vec.data(1) = image.image();
  37067. - _vec.call();
  37068. - gtype = *((int*)_vec.data(2));
  37069. -
  37070. - return( gtype );
  37071. -}
  37072. -
  37073. -// im_header_int: extract int fields from header
  37074. -int VImage::header_int( char* field ) throw( VError )
  37075. -{
  37076. - VImage image = *this;
  37077. - int value;
  37078. -
  37079. - Vargv _vec( "im_header_int" );
  37080. -
  37081. - _vec.data(0) = (im_object) field;
  37082. - _vec.data(1) = image.image();
  37083. - _vec.call();
  37084. - value = *((int*)_vec.data(2));
  37085. -
  37086. - return( value );
  37087. -}
  37088. -
  37089. -// im_header_double: extract double fields from header
  37090. -double VImage::header_double( char* field ) throw( VError )
  37091. -{
  37092. - VImage image = *this;
  37093. - double value;
  37094. -
  37095. - Vargv _vec( "im_header_double" );
  37096. -
  37097. - _vec.data(0) = (im_object) field;
  37098. - _vec.data(1) = image.image();
  37099. - _vec.call();
  37100. - value = *((double*)_vec.data(2));
  37101. -
  37102. - return( value );
  37103. -}
  37104. -
  37105. -// im_header_string: extract fields from headers as strings
  37106. -char* VImage::header_string( char* field ) throw( VError )
  37107. -{
  37108. - VImage image = *this;
  37109. - char* value;
  37110. -
  37111. - Vargv _vec( "im_header_string" );
  37112. -
  37113. - _vec.data(0) = (im_object) field;
  37114. - _vec.data(1) = image.image();
  37115. - _vec.call();
  37116. - value = (char*) _vec.data(2);
  37117. -
  37118. - return( value );
  37119. -}
  37120. -
  37121. -// im_history_get: return the image history as a string
  37122. -char* VImage::history_get() throw( VError )
  37123. -{
  37124. - VImage image = *this;
  37125. - char* history;
  37126. -
  37127. - Vargv _vec( "im_history_get" );
  37128. -
  37129. - _vec.data(0) = image.image();
  37130. - _vec.call();
  37131. - history = (char*) _vec.data(1);
  37132. -
  37133. - return( history );
  37134. -}
  37135. -
  37136. -// im_printdesc: print an image header to stdout
  37137. -void VImage::printdesc() throw( VError )
  37138. -{
  37139. - VImage image = *this;
  37140. - Vargv _vec( "im_printdesc" );
  37141. -
  37142. - _vec.data(0) = image.image();
  37143. - _vec.call();
  37144. -}
  37145. -
  37146. -
  37147. -// bodies for package mask
  37148. -// this file automatically generated from
  37149. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37150. -
  37151. -// bodies for package morphology
  37152. -// this file automatically generated from
  37153. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37154. -// im_cntlines: count horizontal or vertical lines
  37155. -double VImage::cntlines( int direction ) throw( VError )
  37156. -{
  37157. - VImage in = *this;
  37158. - double nlines;
  37159. -
  37160. - Vargv _vec( "im_cntlines" );
  37161. -
  37162. - _vec.data(0) = in.image();
  37163. - *((int*) _vec.data(2)) = direction;
  37164. - _vec.call();
  37165. - nlines = *((double*)_vec.data(1));
  37166. -
  37167. - return( nlines );
  37168. -}
  37169. -
  37170. -// im_dilate: dilate image with mask, adding a black border
  37171. -VImage VImage::dilate( VIMask mask ) throw( VError )
  37172. -{
  37173. - VImage in = *this;
  37174. - VImage out;
  37175. -
  37176. - Vargv _vec( "im_dilate" );
  37177. -
  37178. - _vec.data(0) = in.image();
  37179. - _vec.data(1) = out.image();
  37180. - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
  37181. - _vec.call();
  37182. - out._ref->addref( in._ref );
  37183. -
  37184. - return( out );
  37185. -}
  37186. -
  37187. -// im_rank: rank filter nth element of xsize/ysize window
  37188. -VImage VImage::rank( int xsize, int ysize, int n ) throw( VError )
  37189. -{
  37190. - VImage in = *this;
  37191. - VImage out;
  37192. -
  37193. - Vargv _vec( "im_rank" );
  37194. -
  37195. - _vec.data(0) = in.image();
  37196. - _vec.data(1) = out.image();
  37197. - *((int*) _vec.data(2)) = xsize;
  37198. - *((int*) _vec.data(3)) = ysize;
  37199. - *((int*) _vec.data(4)) = n;
  37200. - _vec.call();
  37201. - out._ref->addref( in._ref );
  37202. -
  37203. - return( out );
  37204. -}
  37205. -
  37206. -// im_rank_image: point-wise pixel rank
  37207. -VImage VImage::rank_image( std::vector<VImage> in, int index ) throw( VError )
  37208. -{
  37209. - VImage out;
  37210. -
  37211. - Vargv _vec( "im_rank_image" );
  37212. -
  37213. - ((im_imagevec_object*) _vec.data(0))->n = in.size();
  37214. - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
  37215. - for( unsigned int i = 0; i < in.size(); i++ )
  37216. - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
  37217. - _vec.data(1) = out.image();
  37218. - *((int*) _vec.data(2)) = index;
  37219. - _vec.call();
  37220. - for( unsigned int i = 0; i < in.size(); i++ )
  37221. - out._ref->addref( in[i]._ref );
  37222. -
  37223. - return( out );
  37224. -}
  37225. -
  37226. -// im_maxvalue: point-wise maximum value
  37227. -VImage VImage::maxvalue( std::vector<VImage> in ) throw( VError )
  37228. -{
  37229. - VImage out;
  37230. -
  37231. - Vargv _vec( "im_maxvalue" );
  37232. -
  37233. - ((im_imagevec_object*) _vec.data(0))->n = in.size();
  37234. - ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()];
  37235. - for( unsigned int i = 0; i < in.size(); i++ )
  37236. - ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image();
  37237. - _vec.data(1) = out.image();
  37238. - _vec.call();
  37239. - for( unsigned int i = 0; i < in.size(); i++ )
  37240. - out._ref->addref( in[i]._ref );
  37241. -
  37242. - return( out );
  37243. -}
  37244. -
  37245. -// im_label_regions: number continuous regions in an image
  37246. -VImage VImage::label_regions( int& segments ) throw( VError )
  37247. -{
  37248. - VImage test = *this;
  37249. - VImage mask;
  37250. -
  37251. - Vargv _vec( "im_label_regions" );
  37252. -
  37253. - _vec.data(0) = test.image();
  37254. - _vec.data(1) = mask.image();
  37255. - _vec.call();
  37256. - segments = *((int*)_vec.data(2));
  37257. -
  37258. - return( mask );
  37259. -}
  37260. -
  37261. -// im_zerox: find +ve or -ve zero crossings in image
  37262. -VImage VImage::zerox( int flag ) throw( VError )
  37263. -{
  37264. - VImage in = *this;
  37265. - VImage out;
  37266. -
  37267. - Vargv _vec( "im_zerox" );
  37268. -
  37269. - _vec.data(0) = in.image();
  37270. - _vec.data(1) = out.image();
  37271. - *((int*) _vec.data(2)) = flag;
  37272. - _vec.call();
  37273. - out._ref->addref( in._ref );
  37274. -
  37275. - return( out );
  37276. -}
  37277. -
  37278. -// im_erode: erode image with mask, adding a black border
  37279. -VImage VImage::erode( VIMask mask ) throw( VError )
  37280. -{
  37281. - VImage in = *this;
  37282. - VImage out;
  37283. -
  37284. - Vargv _vec( "im_erode" );
  37285. -
  37286. - _vec.data(0) = in.image();
  37287. - _vec.data(1) = out.image();
  37288. - ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr;
  37289. - _vec.call();
  37290. - out._ref->addref( in._ref );
  37291. -
  37292. - return( out );
  37293. -}
  37294. -
  37295. -// im_profile: find first horizontal/vertical edge
  37296. -VImage VImage::profile( int direction ) throw( VError )
  37297. -{
  37298. - VImage in = *this;
  37299. - VImage out;
  37300. -
  37301. - Vargv _vec( "im_profile" );
  37302. -
  37303. - _vec.data(0) = in.image();
  37304. - _vec.data(1) = out.image();
  37305. - *((int*) _vec.data(2)) = direction;
  37306. - _vec.call();
  37307. -
  37308. - return( out );
  37309. -}
  37310. -
  37311. -
  37312. -// bodies for package mosaicing
  37313. -// this file automatically generated from
  37314. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37315. -// im_align_bands: align the bands of an image
  37316. -VImage VImage::align_bands() throw( VError )
  37317. -{
  37318. - VImage in = *this;
  37319. - VImage out;
  37320. -
  37321. - Vargv _vec( "im_align_bands" );
  37322. -
  37323. - _vec.data(0) = in.image();
  37324. - _vec.data(1) = out.image();
  37325. - _vec.call();
  37326. -
  37327. - return( out );
  37328. -}
  37329. -
  37330. -// im_correl: search area around sec for match for area around ref
  37331. -double VImage::correl( VImage sec, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int& x, int& y ) throw( VError )
  37332. -{
  37333. - VImage ref = *this;
  37334. - double correlation;
  37335. -
  37336. - Vargv _vec( "im_correl" );
  37337. -
  37338. - _vec.data(0) = ref.image();
  37339. - _vec.data(1) = sec.image();
  37340. - *((int*) _vec.data(2)) = xref;
  37341. - *((int*) _vec.data(3)) = yref;
  37342. - *((int*) _vec.data(4)) = xsec;
  37343. - *((int*) _vec.data(5)) = ysec;
  37344. - *((int*) _vec.data(6)) = hwindowsize;
  37345. - *((int*) _vec.data(7)) = hsearchsize;
  37346. - _vec.call();
  37347. - correlation = *((double*)_vec.data(8));
  37348. - x = *((int*)_vec.data(9));
  37349. - y = *((int*)_vec.data(10));
  37350. -
  37351. - return( correlation );
  37352. -}
  37353. -
  37354. -// im__find_lroverlap: search for left-right overlap of ref and sec
  37355. -int VImage::_find_lroverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError )
  37356. -{
  37357. - VImage ref = *this;
  37358. - int dx0;
  37359. -
  37360. - Vargv _vec( "im__find_lroverlap" );
  37361. -
  37362. - _vec.data(0) = ref.image();
  37363. - _vec.data(1) = sec.image();
  37364. - *((int*) _vec.data(2)) = bandno;
  37365. - *((int*) _vec.data(3)) = xr;
  37366. - *((int*) _vec.data(4)) = yr;
  37367. - *((int*) _vec.data(5)) = xs;
  37368. - *((int*) _vec.data(6)) = ys;
  37369. - *((int*) _vec.data(7)) = halfcorrelation;
  37370. - *((int*) _vec.data(8)) = halfarea;
  37371. - _vec.call();
  37372. - dx0 = *((int*)_vec.data(9));
  37373. - dy0 = *((int*)_vec.data(10));
  37374. - scale1 = *((double*)_vec.data(11));
  37375. - angle1 = *((double*)_vec.data(12));
  37376. - dx1 = *((double*)_vec.data(13));
  37377. - dy1 = *((double*)_vec.data(14));
  37378. -
  37379. - return( dx0 );
  37380. -}
  37381. -
  37382. -// im__find_tboverlap: search for top-bottom overlap of ref and sec
  37383. -int VImage::_find_tboverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError )
  37384. -{
  37385. - VImage ref = *this;
  37386. - int dx0;
  37387. -
  37388. - Vargv _vec( "im__find_tboverlap" );
  37389. -
  37390. - _vec.data(0) = ref.image();
  37391. - _vec.data(1) = sec.image();
  37392. - *((int*) _vec.data(2)) = bandno;
  37393. - *((int*) _vec.data(3)) = xr;
  37394. - *((int*) _vec.data(4)) = yr;
  37395. - *((int*) _vec.data(5)) = xs;
  37396. - *((int*) _vec.data(6)) = ys;
  37397. - *((int*) _vec.data(7)) = halfcorrelation;
  37398. - *((int*) _vec.data(8)) = halfarea;
  37399. - _vec.call();
  37400. - dx0 = *((int*)_vec.data(9));
  37401. - dy0 = *((int*)_vec.data(10));
  37402. - scale1 = *((double*)_vec.data(11));
  37403. - angle1 = *((double*)_vec.data(12));
  37404. - dx1 = *((double*)_vec.data(13));
  37405. - dy1 = *((double*)_vec.data(14));
  37406. -
  37407. - return( dx0 );
  37408. -}
  37409. -
  37410. -// im_global_balance: automatically rebuild mosaic with balancing
  37411. -VImage VImage::global_balance( double gamma ) throw( VError )
  37412. -{
  37413. - VImage in = *this;
  37414. - VImage out;
  37415. -
  37416. - Vargv _vec( "im_global_balance" );
  37417. -
  37418. - _vec.data(0) = in.image();
  37419. - _vec.data(1) = out.image();
  37420. - *((double*) _vec.data(2)) = gamma;
  37421. - _vec.call();
  37422. - out._ref->addref( in._ref );
  37423. -
  37424. - return( out );
  37425. -}
  37426. -
  37427. -// im_global_balancef: automatically rebuild mosaic with balancing, float output
  37428. -VImage VImage::global_balancef( double gamma ) throw( VError )
  37429. -{
  37430. - VImage in = *this;
  37431. - VImage out;
  37432. -
  37433. - Vargv _vec( "im_global_balancef" );
  37434. -
  37435. - _vec.data(0) = in.image();
  37436. - _vec.data(1) = out.image();
  37437. - *((double*) _vec.data(2)) = gamma;
  37438. - _vec.call();
  37439. - out._ref->addref( in._ref );
  37440. -
  37441. - return( out );
  37442. -}
  37443. -
  37444. -// im_lrmerge: left-right merge of in1 and in2
  37445. -VImage VImage::lrmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError )
  37446. -{
  37447. - VImage ref = *this;
  37448. - VImage out;
  37449. -
  37450. - Vargv _vec( "im_lrmerge" );
  37451. -
  37452. - _vec.data(0) = ref.image();
  37453. - _vec.data(1) = sec.image();
  37454. - _vec.data(2) = out.image();
  37455. - *((int*) _vec.data(3)) = dx;
  37456. - *((int*) _vec.data(4)) = dy;
  37457. - *((int*) _vec.data(5)) = mwidth;
  37458. - _vec.call();
  37459. - out._ref->addref( ref._ref );
  37460. - out._ref->addref( sec._ref );
  37461. -
  37462. - return( out );
  37463. -}
  37464. -
  37465. -// im_lrmerge1: first-order left-right merge of ref and sec
  37466. -VImage VImage::lrmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError )
  37467. -{
  37468. - VImage ref = *this;
  37469. - VImage out;
  37470. -
  37471. - Vargv _vec( "im_lrmerge1" );
  37472. -
  37473. - _vec.data(0) = ref.image();
  37474. - _vec.data(1) = sec.image();
  37475. - _vec.data(2) = out.image();
  37476. - *((int*) _vec.data(3)) = xr1;
  37477. - *((int*) _vec.data(4)) = yr1;
  37478. - *((int*) _vec.data(5)) = xs1;
  37479. - *((int*) _vec.data(6)) = ys1;
  37480. - *((int*) _vec.data(7)) = xr2;
  37481. - *((int*) _vec.data(8)) = yr2;
  37482. - *((int*) _vec.data(9)) = xs2;
  37483. - *((int*) _vec.data(10)) = ys2;
  37484. - *((int*) _vec.data(11)) = mwidth;
  37485. - _vec.call();
  37486. - out._ref->addref( ref._ref );
  37487. - out._ref->addref( sec._ref );
  37488. -
  37489. - return( out );
  37490. -}
  37491. -
  37492. -// im_lrmosaic: left-right mosaic of ref and sec
  37493. -VImage VImage::lrmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
  37494. -{
  37495. - VImage ref = *this;
  37496. - VImage out;
  37497. -
  37498. - Vargv _vec( "im_lrmosaic" );
  37499. -
  37500. - _vec.data(0) = ref.image();
  37501. - _vec.data(1) = sec.image();
  37502. - _vec.data(2) = out.image();
  37503. - *((int*) _vec.data(3)) = bandno;
  37504. - *((int*) _vec.data(4)) = xr;
  37505. - *((int*) _vec.data(5)) = yr;
  37506. - *((int*) _vec.data(6)) = xs;
  37507. - *((int*) _vec.data(7)) = ys;
  37508. - *((int*) _vec.data(8)) = halfcorrelation;
  37509. - *((int*) _vec.data(9)) = halfarea;
  37510. - *((int*) _vec.data(10)) = balancetype;
  37511. - *((int*) _vec.data(11)) = mwidth;
  37512. - _vec.call();
  37513. - out._ref->addref( ref._ref );
  37514. - out._ref->addref( sec._ref );
  37515. -
  37516. - return( out );
  37517. -}
  37518. -
  37519. -// im_lrmosaic1: first-order left-right mosaic of ref and sec
  37520. -VImage VImage::lrmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
  37521. -{
  37522. - VImage ref = *this;
  37523. - VImage out;
  37524. -
  37525. - Vargv _vec( "im_lrmosaic1" );
  37526. -
  37527. - _vec.data(0) = ref.image();
  37528. - _vec.data(1) = sec.image();
  37529. - _vec.data(2) = out.image();
  37530. - *((int*) _vec.data(3)) = bandno;
  37531. - *((int*) _vec.data(4)) = xr1;
  37532. - *((int*) _vec.data(5)) = yr1;
  37533. - *((int*) _vec.data(6)) = xs1;
  37534. - *((int*) _vec.data(7)) = ys1;
  37535. - *((int*) _vec.data(8)) = xr2;
  37536. - *((int*) _vec.data(9)) = yr2;
  37537. - *((int*) _vec.data(10)) = xs2;
  37538. - *((int*) _vec.data(11)) = ys2;
  37539. - *((int*) _vec.data(12)) = halfcorrelation;
  37540. - *((int*) _vec.data(13)) = halfarea;
  37541. - *((int*) _vec.data(14)) = balancetype;
  37542. - *((int*) _vec.data(15)) = mwidth;
  37543. - _vec.call();
  37544. - out._ref->addref( ref._ref );
  37545. - out._ref->addref( sec._ref );
  37546. -
  37547. - return( out );
  37548. -}
  37549. -
  37550. -// im_match_linear: resample ref so that tie-points match
  37551. -VImage VImage::match_linear( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2 ) throw( VError )
  37552. -{
  37553. - VImage ref = *this;
  37554. - VImage out;
  37555. -
  37556. - Vargv _vec( "im_match_linear" );
  37557. -
  37558. - _vec.data(0) = ref.image();
  37559. - _vec.data(1) = sec.image();
  37560. - _vec.data(2) = out.image();
  37561. - *((int*) _vec.data(3)) = xref1;
  37562. - *((int*) _vec.data(4)) = yref1;
  37563. - *((int*) _vec.data(5)) = xsec1;
  37564. - *((int*) _vec.data(6)) = ysec1;
  37565. - *((int*) _vec.data(7)) = xref2;
  37566. - *((int*) _vec.data(8)) = yref2;
  37567. - *((int*) _vec.data(9)) = xsec2;
  37568. - *((int*) _vec.data(10)) = ysec2;
  37569. - _vec.call();
  37570. - out._ref->addref( ref._ref );
  37571. - out._ref->addref( sec._ref );
  37572. -
  37573. - return( out );
  37574. -}
  37575. -
  37576. -// im_match_linear_search: search sec, then resample so that tie-points match
  37577. -VImage VImage::match_linear_search( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2, int hwindowsize, int hsearchsize ) throw( VError )
  37578. -{
  37579. - VImage ref = *this;
  37580. - VImage out;
  37581. -
  37582. - Vargv _vec( "im_match_linear_search" );
  37583. -
  37584. - _vec.data(0) = ref.image();
  37585. - _vec.data(1) = sec.image();
  37586. - _vec.data(2) = out.image();
  37587. - *((int*) _vec.data(3)) = xref1;
  37588. - *((int*) _vec.data(4)) = yref1;
  37589. - *((int*) _vec.data(5)) = xsec1;
  37590. - *((int*) _vec.data(6)) = ysec1;
  37591. - *((int*) _vec.data(7)) = xref2;
  37592. - *((int*) _vec.data(8)) = yref2;
  37593. - *((int*) _vec.data(9)) = xsec2;
  37594. - *((int*) _vec.data(10)) = ysec2;
  37595. - *((int*) _vec.data(11)) = hwindowsize;
  37596. - *((int*) _vec.data(12)) = hsearchsize;
  37597. - _vec.call();
  37598. - out._ref->addref( ref._ref );
  37599. - out._ref->addref( sec._ref );
  37600. -
  37601. - return( out );
  37602. -}
  37603. -
  37604. -// im_maxpos_subpel: subpixel position of maximum of (phase correlation) image
  37605. -double VImage::maxpos_subpel( double& y ) throw( VError )
  37606. -{
  37607. - VImage im = *this;
  37608. - double x;
  37609. -
  37610. - Vargv _vec( "im_maxpos_subpel" );
  37611. -
  37612. - _vec.data(0) = im.image();
  37613. - _vec.call();
  37614. - x = *((double*)_vec.data(1));
  37615. - y = *((double*)_vec.data(2));
  37616. -
  37617. - return( x );
  37618. -}
  37619. -
  37620. -// im_remosaic: automatically rebuild mosaic with new files
  37621. -VImage VImage::remosaic( char* old_str, char* new_str ) throw( VError )
  37622. -{
  37623. - VImage in = *this;
  37624. - VImage out;
  37625. -
  37626. - Vargv _vec( "im_remosaic" );
  37627. -
  37628. - _vec.data(0) = in.image();
  37629. - _vec.data(1) = out.image();
  37630. - _vec.data(2) = (im_object) old_str;
  37631. - _vec.data(3) = (im_object) new_str;
  37632. - _vec.call();
  37633. - out._ref->addref( in._ref );
  37634. -
  37635. - return( out );
  37636. -}
  37637. -
  37638. -// im_tbmerge: top-bottom merge of in1 and in2
  37639. -VImage VImage::tbmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError )
  37640. -{
  37641. - VImage ref = *this;
  37642. - VImage out;
  37643. -
  37644. - Vargv _vec( "im_tbmerge" );
  37645. -
  37646. - _vec.data(0) = ref.image();
  37647. - _vec.data(1) = sec.image();
  37648. - _vec.data(2) = out.image();
  37649. - *((int*) _vec.data(3)) = dx;
  37650. - *((int*) _vec.data(4)) = dy;
  37651. - *((int*) _vec.data(5)) = mwidth;
  37652. - _vec.call();
  37653. - out._ref->addref( ref._ref );
  37654. - out._ref->addref( sec._ref );
  37655. -
  37656. - return( out );
  37657. -}
  37658. -
  37659. -// im_tbmerge1: first-order top-bottom merge of in1 and in2
  37660. -VImage VImage::tbmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError )
  37661. -{
  37662. - VImage ref = *this;
  37663. - VImage out;
  37664. -
  37665. - Vargv _vec( "im_tbmerge1" );
  37666. -
  37667. - _vec.data(0) = ref.image();
  37668. - _vec.data(1) = sec.image();
  37669. - _vec.data(2) = out.image();
  37670. - *((int*) _vec.data(3)) = xr1;
  37671. - *((int*) _vec.data(4)) = yr1;
  37672. - *((int*) _vec.data(5)) = xs1;
  37673. - *((int*) _vec.data(6)) = ys1;
  37674. - *((int*) _vec.data(7)) = xr2;
  37675. - *((int*) _vec.data(8)) = yr2;
  37676. - *((int*) _vec.data(9)) = xs2;
  37677. - *((int*) _vec.data(10)) = ys2;
  37678. - *((int*) _vec.data(11)) = mwidth;
  37679. - _vec.call();
  37680. - out._ref->addref( ref._ref );
  37681. - out._ref->addref( sec._ref );
  37682. -
  37683. - return( out );
  37684. -}
  37685. -
  37686. -// im_tbmosaic: top-bottom mosaic of in1 and in2
  37687. -VImage VImage::tbmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
  37688. -{
  37689. - VImage ref = *this;
  37690. - VImage out;
  37691. -
  37692. - Vargv _vec( "im_tbmosaic" );
  37693. -
  37694. - _vec.data(0) = ref.image();
  37695. - _vec.data(1) = sec.image();
  37696. - _vec.data(2) = out.image();
  37697. - *((int*) _vec.data(3)) = bandno;
  37698. - *((int*) _vec.data(4)) = xr;
  37699. - *((int*) _vec.data(5)) = yr;
  37700. - *((int*) _vec.data(6)) = xs;
  37701. - *((int*) _vec.data(7)) = ys;
  37702. - *((int*) _vec.data(8)) = halfcorrelation;
  37703. - *((int*) _vec.data(9)) = halfarea;
  37704. - *((int*) _vec.data(10)) = balancetype;
  37705. - *((int*) _vec.data(11)) = mwidth;
  37706. - _vec.call();
  37707. - out._ref->addref( ref._ref );
  37708. - out._ref->addref( sec._ref );
  37709. -
  37710. - return( out );
  37711. -}
  37712. -
  37713. -// im_tbmosaic1: first-order top-bottom mosaic of ref and sec
  37714. -VImage VImage::tbmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError )
  37715. -{
  37716. - VImage ref = *this;
  37717. - VImage out;
  37718. -
  37719. - Vargv _vec( "im_tbmosaic1" );
  37720. -
  37721. - _vec.data(0) = ref.image();
  37722. - _vec.data(1) = sec.image();
  37723. - _vec.data(2) = out.image();
  37724. - *((int*) _vec.data(3)) = bandno;
  37725. - *((int*) _vec.data(4)) = xr1;
  37726. - *((int*) _vec.data(5)) = yr1;
  37727. - *((int*) _vec.data(6)) = xs1;
  37728. - *((int*) _vec.data(7)) = ys1;
  37729. - *((int*) _vec.data(8)) = xr2;
  37730. - *((int*) _vec.data(9)) = yr2;
  37731. - *((int*) _vec.data(10)) = xs2;
  37732. - *((int*) _vec.data(11)) = ys2;
  37733. - *((int*) _vec.data(12)) = halfcorrelation;
  37734. - *((int*) _vec.data(13)) = halfarea;
  37735. - *((int*) _vec.data(14)) = balancetype;
  37736. - *((int*) _vec.data(15)) = mwidth;
  37737. - _vec.call();
  37738. - out._ref->addref( ref._ref );
  37739. - out._ref->addref( sec._ref );
  37740. -
  37741. - return( out );
  37742. -}
  37743. -
  37744. -
  37745. -// bodies for package other
  37746. -// this file automatically generated from
  37747. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37748. -// im_benchmark: do something complicated for testing
  37749. -VImage VImage::benchmark() throw( VError )
  37750. -{
  37751. - VImage in = *this;
  37752. - VImage out;
  37753. -
  37754. - Vargv _vec( "im_benchmark" );
  37755. -
  37756. - _vec.data(0) = in.image();
  37757. - _vec.data(1) = out.image();
  37758. - _vec.call();
  37759. - out._ref->addref( in._ref );
  37760. -
  37761. - return( out );
  37762. -}
  37763. -
  37764. -// im_benchmark2: do something complicated for testing
  37765. -double VImage::benchmark2() throw( VError )
  37766. -{
  37767. - VImage in = *this;
  37768. - double value;
  37769. -
  37770. - Vargv _vec( "im_benchmark2" );
  37771. -
  37772. - _vec.data(0) = in.image();
  37773. - _vec.call();
  37774. - value = *((double*)_vec.data(1));
  37775. -
  37776. - return( value );
  37777. -}
  37778. -
  37779. -// im_benchmarkn: do something complicated for testing
  37780. -VImage VImage::benchmarkn( int n ) throw( VError )
  37781. -{
  37782. - VImage in = *this;
  37783. - VImage out;
  37784. -
  37785. - Vargv _vec( "im_benchmarkn" );
  37786. -
  37787. - _vec.data(0) = in.image();
  37788. - _vec.data(1) = out.image();
  37789. - *((int*) _vec.data(2)) = n;
  37790. - _vec.call();
  37791. - out._ref->addref( in._ref );
  37792. -
  37793. - return( out );
  37794. -}
  37795. -
  37796. -// im_eye: generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image
  37797. -VImage VImage::eye( int xsize, int ysize, double factor ) throw( VError )
  37798. -{
  37799. - VImage out;
  37800. -
  37801. - Vargv _vec( "im_eye" );
  37802. -
  37803. - _vec.data(0) = out.image();
  37804. - *((int*) _vec.data(1)) = xsize;
  37805. - *((int*) _vec.data(2)) = ysize;
  37806. - *((double*) _vec.data(3)) = factor;
  37807. - _vec.call();
  37808. -
  37809. - return( out );
  37810. -}
  37811. -
  37812. -// im_grey: generate IM_BANDFMT_UCHAR [0,255] grey scale image
  37813. -VImage VImage::grey( int xsize, int ysize ) throw( VError )
  37814. -{
  37815. - VImage out;
  37816. -
  37817. - Vargv _vec( "im_grey" );
  37818. -
  37819. - _vec.data(0) = out.image();
  37820. - *((int*) _vec.data(1)) = xsize;
  37821. - *((int*) _vec.data(2)) = ysize;
  37822. - _vec.call();
  37823. -
  37824. - return( out );
  37825. -}
  37826. -
  37827. -// im_feye: generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image
  37828. -VImage VImage::feye( int xsize, int ysize, double factor ) throw( VError )
  37829. -{
  37830. - VImage out;
  37831. -
  37832. - Vargv _vec( "im_feye" );
  37833. -
  37834. - _vec.data(0) = out.image();
  37835. - *((int*) _vec.data(1)) = xsize;
  37836. - *((int*) _vec.data(2)) = ysize;
  37837. - *((double*) _vec.data(3)) = factor;
  37838. - _vec.call();
  37839. -
  37840. - return( out );
  37841. -}
  37842. -
  37843. -// im_fgrey: generate IM_BANDFMT_FLOAT [0,1] grey scale image
  37844. -VImage VImage::fgrey( int xsize, int ysize ) throw( VError )
  37845. -{
  37846. - VImage out;
  37847. -
  37848. - Vargv _vec( "im_fgrey" );
  37849. -
  37850. - _vec.data(0) = out.image();
  37851. - *((int*) _vec.data(1)) = xsize;
  37852. - *((int*) _vec.data(2)) = ysize;
  37853. - _vec.call();
  37854. -
  37855. - return( out );
  37856. -}
  37857. -
  37858. -// im_fzone: generate IM_BANDFMT_FLOAT [-1,1] zone plate image
  37859. -VImage VImage::fzone( int size ) throw( VError )
  37860. -{
  37861. - VImage out;
  37862. -
  37863. - Vargv _vec( "im_fzone" );
  37864. -
  37865. - _vec.data(0) = out.image();
  37866. - *((int*) _vec.data(1)) = size;
  37867. - _vec.call();
  37868. -
  37869. - return( out );
  37870. -}
  37871. -
  37872. -// im_make_xy: generate image with pixel value equal to coordinate
  37873. -VImage VImage::make_xy( int xsize, int ysize ) throw( VError )
  37874. -{
  37875. - VImage out;
  37876. -
  37877. - Vargv _vec( "im_make_xy" );
  37878. -
  37879. - _vec.data(0) = out.image();
  37880. - *((int*) _vec.data(1)) = xsize;
  37881. - *((int*) _vec.data(2)) = ysize;
  37882. - _vec.call();
  37883. -
  37884. - return( out );
  37885. -}
  37886. -
  37887. -// im_sines: generate 2D sine image
  37888. -VImage VImage::sines( int xsize, int ysize, double horfreq, double verfreq ) throw( VError )
  37889. -{
  37890. - VImage out;
  37891. -
  37892. - Vargv _vec( "im_sines" );
  37893. -
  37894. - _vec.data(0) = out.image();
  37895. - *((int*) _vec.data(1)) = xsize;
  37896. - *((int*) _vec.data(2)) = ysize;
  37897. - *((double*) _vec.data(3)) = horfreq;
  37898. - *((double*) _vec.data(4)) = verfreq;
  37899. - _vec.call();
  37900. -
  37901. - return( out );
  37902. -}
  37903. -
  37904. -// im_zone: generate IM_BANDFMT_UCHAR [0,255] zone plate image
  37905. -VImage VImage::zone( int size ) throw( VError )
  37906. -{
  37907. - VImage out;
  37908. -
  37909. - Vargv _vec( "im_zone" );
  37910. -
  37911. - _vec.data(0) = out.image();
  37912. - *((int*) _vec.data(1)) = size;
  37913. - _vec.call();
  37914. -
  37915. - return( out );
  37916. -}
  37917. -
  37918. -
  37919. -// bodies for package resample
  37920. -// this file automatically generated from
  37921. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  37922. -// im_rightshift_size: decrease size by a power-of-two factor
  37923. -VImage VImage::rightshift_size( int xshift, int yshift, int band_fmt ) throw( VError )
  37924. -{
  37925. - VImage in = *this;
  37926. - VImage out;
  37927. -
  37928. - Vargv _vec( "im_rightshift_size" );
  37929. -
  37930. - _vec.data(0) = in.image();
  37931. - _vec.data(1) = out.image();
  37932. - *((int*) _vec.data(2)) = xshift;
  37933. - *((int*) _vec.data(3)) = yshift;
  37934. - *((int*) _vec.data(4)) = band_fmt;
  37935. - _vec.call();
  37936. - out._ref->addref( in._ref );
  37937. -
  37938. - return( out );
  37939. -}
  37940. -
  37941. -// im_shrink: shrink image by xfac, yfac times
  37942. -VImage VImage::shrink( double xfac, double yfac ) throw( VError )
  37943. -{
  37944. - VImage in = *this;
  37945. - VImage out;
  37946. -
  37947. - Vargv _vec( "im_shrink" );
  37948. -
  37949. - _vec.data(0) = in.image();
  37950. - _vec.data(1) = out.image();
  37951. - *((double*) _vec.data(2)) = xfac;
  37952. - *((double*) _vec.data(3)) = yfac;
  37953. - _vec.call();
  37954. - out._ref->addref( in._ref );
  37955. -
  37956. - return( out );
  37957. -}
  37958. -
  37959. -// im_stretch3: stretch 3%, sub-pixel displace by xdisp/ydisp
  37960. -VImage VImage::stretch3( double xdisp, double ydisp ) throw( VError )
  37961. -{
  37962. - VImage in = *this;
  37963. - VImage out;
  37964. -
  37965. - Vargv _vec( "im_stretch3" );
  37966. -
  37967. - _vec.data(0) = in.image();
  37968. - _vec.data(1) = out.image();
  37969. - *((double*) _vec.data(2)) = xdisp;
  37970. - *((double*) _vec.data(3)) = ydisp;
  37971. - _vec.call();
  37972. - out._ref->addref( in._ref );
  37973. -
  37974. - return( out );
  37975. -}
  37976. -
  37977. -// im_affinei: affine transform
  37978. -VImage VImage::affinei( char* interpolate, double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError )
  37979. -{
  37980. - VImage in = *this;
  37981. - VImage out;
  37982. -
  37983. - Vargv _vec( "im_affinei" );
  37984. -
  37985. - _vec.data(0) = in.image();
  37986. - _vec.data(1) = out.image();
  37987. - if( vips__input_interpolate_init( &_vec.data(2), interpolate ) )
  37988. - verror();
  37989. - *((double*) _vec.data(3)) = a;
  37990. - *((double*) _vec.data(4)) = b;
  37991. - *((double*) _vec.data(5)) = c;
  37992. - *((double*) _vec.data(6)) = d;
  37993. - *((double*) _vec.data(7)) = dx;
  37994. - *((double*) _vec.data(8)) = dy;
  37995. - *((int*) _vec.data(9)) = x;
  37996. - *((int*) _vec.data(10)) = y;
  37997. - *((int*) _vec.data(11)) = w;
  37998. - *((int*) _vec.data(12)) = h;
  37999. - _vec.call();
  38000. - out._ref->addref( in._ref );
  38001. -
  38002. - return( out );
  38003. -}
  38004. -
  38005. -// im_affinei_all: affine transform of whole image
  38006. -VImage VImage::affinei_all( char* interpolate, double a, double b, double c, double d, double dx, double dy ) throw( VError )
  38007. -{
  38008. - VImage in = *this;
  38009. - VImage out;
  38010. -
  38011. - Vargv _vec( "im_affinei_all" );
  38012. -
  38013. - _vec.data(0) = in.image();
  38014. - _vec.data(1) = out.image();
  38015. - if( vips__input_interpolate_init( &_vec.data(2), interpolate ) )
  38016. - verror();
  38017. - *((double*) _vec.data(3)) = a;
  38018. - *((double*) _vec.data(4)) = b;
  38019. - *((double*) _vec.data(5)) = c;
  38020. - *((double*) _vec.data(6)) = d;
  38021. - *((double*) _vec.data(7)) = dx;
  38022. - *((double*) _vec.data(8)) = dy;
  38023. - _vec.call();
  38024. - out._ref->addref( in._ref );
  38025. -
  38026. - return( out );
  38027. -}
  38028. -
  38029. -
  38030. -// bodies for package video
  38031. -// this file automatically generated from
  38032. -// VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013
  38033. -// im_video_test: test video grabber
  38034. -VImage VImage::video_test( int brightness, int error ) throw( VError )
  38035. -{
  38036. - VImage out;
  38037. -
  38038. - Vargv _vec( "im_video_test" );
  38039. -
  38040. - _vec.data(0) = out.image();
  38041. - *((int*) _vec.data(1)) = brightness;
  38042. - *((int*) _vec.data(2)) = error;
  38043. - _vec.call();
  38044. -
  38045. - return( out );
  38046. -}
  38047. -
  38048. -// im_video_v4l1: grab a video frame with v4l1
  38049. -VImage VImage::video_v4l1( char* device, int channel, int brightness, int colour, int contrast, int hue, int ngrabs ) throw( VError )
  38050. -{
  38051. - VImage out;
  38052. -
  38053. - Vargv _vec( "im_video_v4l1" );
  38054. -
  38055. - _vec.data(0) = out.image();
  38056. - _vec.data(1) = (im_object) device;
  38057. - *((int*) _vec.data(2)) = channel;
  38058. - *((int*) _vec.data(3)) = brightness;
  38059. - *((int*) _vec.data(4)) = colour;
  38060. - *((int*) _vec.data(5)) = contrast;
  38061. - *((int*) _vec.data(6)) = hue;
  38062. - *((int*) _vec.data(7)) = ngrabs;
  38063. - _vec.call();
  38064. -
  38065. - return( out );
  38066. -}
  38067. -
  38068. -
  38069. diff -u --recursive --new-file vips-7.38.5-vanilla/libvipsCC/VMask.cc vips-7.38.5/libvipsCC/VMask.cc
  38070. --- vips-7.38.5-vanilla/libvipsCC/VMask.cc 2014-07-17 23:48:36.237794473 -0400
  38071. +++ vips-7.38.5/libvipsCC/VMask.cc 1969-12-31 19:00:00.000000000 -0500
  38072. @@ -1,662 +0,0 @@
  38073. -// Object part of VMask class
  38074. -
  38075. -/*
  38076. -
  38077. - Copyright (C) 1991-2001 The National Gallery
  38078. -
  38079. - This program is free software; you can redistribute it and/or modify
  38080. - it under the terms of the GNU Lesser General Public License as published by
  38081. - the Free Software Foundation; either version 2 of the License, or
  38082. - (at your option) any later version.
  38083. -
  38084. - This program is distributed in the hope that it will be useful,
  38085. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  38086. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38087. - GNU Lesser General Public License for more details.
  38088. -
  38089. - You should have received a copy of the GNU Lesser General Public License
  38090. - along with this program; if not, write to the Free Software
  38091. - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  38092. - 02110-1301 USA
  38093. -
  38094. - */
  38095. -
  38096. -/*
  38097. -
  38098. - These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  38099. -
  38100. - */
  38101. -
  38102. -#ifdef HAVE_CONFIG_H
  38103. -#include <config.h>
  38104. -#endif /*HAVE_CONFIG_H*/
  38105. -#include <vips/intl.h>
  38106. -
  38107. -#include <cstdlib>
  38108. -#include <cmath>
  38109. -
  38110. -#include <vips/vips.h>
  38111. -
  38112. -#include <vips/vipscpp.h>
  38113. -
  38114. -#ifdef WITH_DMALLOC
  38115. -#include <dmalloc.h>
  38116. -#endif /*WITH_DMALLOC*/
  38117. -
  38118. -VIPS_NAMESPACE_START
  38119. -
  38120. -/* Functions for VMask - refcounting layer over VPMask.
  38121. - */
  38122. -
  38123. -VMask::~VMask()
  38124. -{
  38125. - ref->nrefs--;
  38126. - if( !ref->nrefs )
  38127. - delete ref;
  38128. -}
  38129. -
  38130. -VMask &VMask::operator=( const VMask &a )
  38131. -{
  38132. - // Loosing ref to LHS
  38133. - ref->nrefs--;
  38134. -
  38135. - if( ref->nrefs > 0 )
  38136. - // Need fresh refblock
  38137. - ref = new refblock;
  38138. - else
  38139. - // Recycle old refblock
  38140. - delete ref->pmask;
  38141. -
  38142. - // LHS now points to RHS
  38143. - ref = a.ref;
  38144. - ref->nrefs++;
  38145. -
  38146. - return( *this );
  38147. -}
  38148. -
  38149. -// Make sure this is a private copy of pmask --- dup if nrefs != 1
  38150. -void VMask::make_private()
  38151. -{
  38152. - if( ref->nrefs > 1 ) {
  38153. - // Make fresh refblock
  38154. - refblock *ref2 = new refblock;
  38155. -
  38156. - // And copy the mask
  38157. - ref2->pmask = ref->pmask->dup();
  38158. - ref->nrefs--;
  38159. - ref = ref2;
  38160. - }
  38161. -}
  38162. -
  38163. -void VMask::ostream_print( std::ostream &file ) const
  38164. -{
  38165. - file << *(ref->pmask);
  38166. -}
  38167. -
  38168. -// Embed INTMASK in VIMask
  38169. -void VIMask::embed( INTMASK *i ) throw( VError )
  38170. -{
  38171. - if( ref->pmask )
  38172. - verror( "embed: VIMask not empty" );
  38173. - ref->pmask = new _private_detail::VPIMask( i );
  38174. -}
  38175. -
  38176. -// Type conversions: implicit INTMASK to DOUBLEMASK
  38177. -VIMask::operator VDMask()
  38178. -{
  38179. - VDMask out( xsize(), ysize() );
  38180. -
  38181. - out.mask().dptr->scale = scale();
  38182. - out.mask().dptr->offset = offset();
  38183. -
  38184. - for( int i = 0; i < size(); i++ )
  38185. - out[i] = (*this)[i];
  38186. -
  38187. - return( out );
  38188. -}
  38189. -
  38190. -
  38191. -// Forward ref of VImage class
  38192. -class VImage;
  38193. -
  38194. -// Type conversions: implicit DOUBLEMASK to INTMASK
  38195. -VDMask::operator VIMask()
  38196. -{
  38197. - VIMask out( xsize(), ysize() );
  38198. -
  38199. - out.mask().iptr->scale = int( scale() );
  38200. - out.mask().iptr->offset = int( offset() );
  38201. -
  38202. - for( int i = 0; i < size(); i++ )
  38203. - out[i] = (int) rint( (*this)[i] );
  38204. -
  38205. - return( out );
  38206. -}
  38207. -
  38208. -// Type conversions: implicit DOUBLEMASK to VImage
  38209. -VDMask::operator VImage() throw( VError )
  38210. -{
  38211. - VImage out;
  38212. -
  38213. - if( im_mask2vips( mask().dptr, out.image() ) )
  38214. - verror();
  38215. -
  38216. - return( out );
  38217. -}
  38218. -
  38219. -// ... and INTMASK to VImage
  38220. -VIMask::operator VImage() { return( VImage( VDMask( *this ) ) ); }
  38221. -
  38222. -// Embed DOUBLEMASK in VDMask
  38223. -void VDMask::embed( DOUBLEMASK *i ) throw( VError )
  38224. -{
  38225. - if( ref->pmask )
  38226. - verror( "embed: VDMask not empty" );
  38227. - ref->pmask = new _private_detail::VPDMask( i );
  38228. -}
  38229. -
  38230. -/* Functions for P*Mask - layer over im_*_*mask() functions.
  38231. - */
  38232. -
  38233. -// Create empty imask
  38234. -_private_detail::VPIMask::VPIMask( int xsize, int ysize ) throw( VError )
  38235. -{
  38236. - if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) )
  38237. - verror();
  38238. - type = _private_detail::VPMask::INT;
  38239. -}
  38240. -
  38241. -// Init from vector
  38242. -_private_detail::VPIMask::VPIMask( int xsize, int ysize,
  38243. - int scale, int offset, std::vector<int> coeff )
  38244. - throw( VError )
  38245. -{
  38246. - int i;
  38247. -
  38248. - if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) )
  38249. - verror();
  38250. - type = _private_detail::VPMask::INT;
  38251. -
  38252. - data.iptr->scale = scale;
  38253. - data.iptr->offset = offset;
  38254. - for( i = 0; i < xsize * ysize; i++ )
  38255. - data.iptr->coeff[i] = coeff[i];
  38256. -}
  38257. -
  38258. -// Create from filename
  38259. -_private_detail::VPIMask::VPIMask( const char *name ) throw( VError )
  38260. -{
  38261. - if( !(data.iptr = im_read_imask( (char *) name )) )
  38262. - verror();
  38263. - type = _private_detail::VPMask::INT;
  38264. -}
  38265. -
  38266. -// Create from existing INTMASK
  38267. -_private_detail::VPIMask::VPIMask( INTMASK *imask )
  38268. -{
  38269. - data.iptr = imask;
  38270. - type = _private_detail::VPMask::INT;
  38271. -}
  38272. -
  38273. -// Create empty
  38274. -_private_detail::VPIMask::VPIMask()
  38275. -{
  38276. - data.iptr = 0;
  38277. - type = _private_detail::VPMask::UNASSIGNED;
  38278. -}
  38279. -
  38280. -_private_detail::VPIMask::~VPIMask()
  38281. -{
  38282. - if( data.iptr ) {
  38283. - im_free_imask( data.iptr );
  38284. - data.iptr = 0;
  38285. - type = _private_detail::VPMask::UNASSIGNED;
  38286. - }
  38287. -}
  38288. -
  38289. -// Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us.
  38290. -// Return as a VPMask tho'.
  38291. -_private_detail::VPMask *_private_detail::VPIMask::dup() const throw( VError )
  38292. -{
  38293. - _private_detail::VPIMask *out = new _private_detail::VPIMask();
  38294. -
  38295. - INTMASK *msk;
  38296. - if( !(msk = im_dup_imask( data.iptr, "VPIMask::dup" )) ) {
  38297. - delete out;
  38298. - verror();
  38299. - }
  38300. - out->embed( msk );
  38301. -
  38302. - return( out );
  38303. -}
  38304. -
  38305. -// Insert INTMASK pointer
  38306. -void _private_detail::VPIMask::embed( INTMASK *msk ) throw( VError )
  38307. -{
  38308. - if( type != _private_detail::VPMask::UNASSIGNED )
  38309. - verror( "VPIMask::embed: VPIMask not empty" );
  38310. -
  38311. - data.iptr = msk;
  38312. - type = _private_detail::VPMask::INT;
  38313. -}
  38314. -
  38315. -int _private_detail::VPIMask::xsize() const throw( VError )
  38316. -{
  38317. - if( !data.iptr )
  38318. - verror( "xsize: mask not set" );
  38319. -
  38320. - return( data.iptr->xsize );
  38321. -}
  38322. -
  38323. -int _private_detail::VPIMask::ysize() const throw( VError )
  38324. -{
  38325. - if( !data.iptr )
  38326. - verror( "ysize: mask not set" );
  38327. -
  38328. - return( data.iptr->ysize );
  38329. -}
  38330. -
  38331. -int _private_detail::VPIMask::scale() const throw( VError )
  38332. -{
  38333. - if( !data.iptr )
  38334. - verror( "scale: mask not set" );
  38335. -
  38336. - return( data.iptr->scale );
  38337. -}
  38338. -
  38339. -int _private_detail::VPIMask::offset() const throw( VError )
  38340. -{
  38341. - if( !data.iptr )
  38342. - verror( "offset: mask not set" );
  38343. -
  38344. - return( data.iptr->offset );
  38345. -}
  38346. -
  38347. -const char *_private_detail::VPIMask::filename() const throw( VError )
  38348. -{
  38349. - if( !data.iptr )
  38350. - verror( "filename: mask not set" );
  38351. -
  38352. - return( data.iptr->filename );
  38353. -}
  38354. -
  38355. -void _private_detail::VPIMask::ostream_print( std::ostream &file ) const
  38356. - throw( VError )
  38357. -{
  38358. - if( !data.iptr )
  38359. - verror( "internal error #7447234" );
  38360. -
  38361. - int i, j;
  38362. - int *p = data.iptr->coeff;
  38363. -
  38364. - file << this->xsize() << "\t" << this->ysize() << "\t";
  38365. - file << this->scale() << "\t" << this->offset() << "\n";
  38366. -
  38367. - for( i = 0; i < this->ysize(); i++ ) {
  38368. - for( j = 0; j < this->xsize(); j++ )
  38369. - file << *p++ << "\t";
  38370. -
  38371. - file << "\n";
  38372. - }
  38373. -}
  38374. -
  38375. -// Extract start of int array
  38376. -int *_private_detail::VPIMask::array() const
  38377. -{
  38378. - return( data.iptr->coeff );
  38379. -}
  38380. -
  38381. -// Create empty dmask
  38382. -_private_detail::VPDMask::VPDMask( int xsize, int ysize ) throw( VError )
  38383. -{
  38384. - if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) )
  38385. - verror();
  38386. - type = _private_detail::VPMask::DOUBLE;
  38387. -}
  38388. -
  38389. -// Create from vector
  38390. -_private_detail::VPDMask::VPDMask( int xsize, int ysize,
  38391. - double scale, double offset, std::vector<double> coeff ) throw( VError )
  38392. -{
  38393. - int i;
  38394. -
  38395. - if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) )
  38396. - verror();
  38397. - type = _private_detail::VPMask::DOUBLE;
  38398. -
  38399. - data.dptr->scale = scale;
  38400. - data.dptr->offset = offset;
  38401. - for( i = 0; i < xsize * ysize; i++ )
  38402. - data.dptr->coeff[i] = coeff[i];
  38403. -}
  38404. -
  38405. -// Create from filename
  38406. -_private_detail::VPDMask::VPDMask( const char *name ) throw( VError )
  38407. -{
  38408. - if( !(data.dptr = im_read_dmask( (char *) name )) )
  38409. - verror();
  38410. - type = _private_detail::VPMask::DOUBLE;
  38411. -}
  38412. -
  38413. -// Create empty
  38414. -_private_detail::VPDMask::VPDMask()
  38415. -{
  38416. - data.dptr = 0;
  38417. - type = _private_detail::VPMask::UNASSIGNED;
  38418. -}
  38419. -
  38420. -// Create from existing DOUBLEMASK
  38421. -_private_detail::VPDMask::VPDMask( DOUBLEMASK *dmask )
  38422. -{
  38423. - data.dptr = dmask;
  38424. - type = _private_detail::VPMask::DOUBLE;
  38425. -}
  38426. -
  38427. -_private_detail::VPDMask::~VPDMask()
  38428. -{
  38429. - if( data.dptr ) {
  38430. - im_free_dmask( data.dptr );
  38431. - data.dptr = 0;
  38432. - type = _private_detail::VPMask::UNASSIGNED;
  38433. - }
  38434. -}
  38435. -
  38436. -// Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us.
  38437. -// Return as a VPMask tho'.
  38438. -_private_detail::VPMask *_private_detail::VPDMask::dup() const throw( VError )
  38439. -{
  38440. - _private_detail::VPDMask *out = new _private_detail::VPDMask();
  38441. -
  38442. - DOUBLEMASK *msk;
  38443. - if( !(msk = im_dup_dmask( data.dptr, "VPDMask::dup" )) ) {
  38444. - delete out;
  38445. - verror();
  38446. - }
  38447. - out->embed( msk );
  38448. -
  38449. - return( out );
  38450. -}
  38451. -
  38452. -// Insert DOUBLEMASK pointer
  38453. -void _private_detail::VPDMask::embed( DOUBLEMASK *msk ) throw( VError )
  38454. -{
  38455. - if( type != _private_detail::VPMask::UNASSIGNED )
  38456. - verror( "VPDMask::embed: VPDMask not empty" );
  38457. -
  38458. - data.dptr = msk;
  38459. - type = _private_detail::VPMask::DOUBLE;
  38460. -}
  38461. -
  38462. -int _private_detail::VPDMask::xsize() const throw( VError )
  38463. -{
  38464. - if( !data.dptr )
  38465. - verror( "xsize: mask not set" );
  38466. -
  38467. - return( data.dptr->xsize );
  38468. -}
  38469. -
  38470. -int _private_detail::VPDMask::ysize() const throw( VError )
  38471. -{
  38472. - if( !data.dptr )
  38473. - verror( "ysize: mask not set" );
  38474. -
  38475. - return( data.dptr->ysize );
  38476. -}
  38477. -
  38478. -double _private_detail::VPDMask::scale() const throw( VError )
  38479. -{
  38480. - if( !data.dptr )
  38481. - verror( "scale: mask not set" );
  38482. -
  38483. - return( data.dptr->scale );
  38484. -}
  38485. -
  38486. -double _private_detail::VPDMask::offset() const throw( VError )
  38487. -{
  38488. - if( !data.dptr )
  38489. - verror( "offset: mask not set" );
  38490. -
  38491. - return( data.dptr->offset );
  38492. -}
  38493. -
  38494. -const char *_private_detail::VPDMask::filename() const throw( VError )
  38495. -{
  38496. - if( !data.dptr )
  38497. - verror( "filename: mask not set" );
  38498. -
  38499. - return( data.dptr->filename );
  38500. -}
  38501. -
  38502. -void _private_detail::VPDMask::ostream_print( std::ostream &file ) const
  38503. - throw( VError )
  38504. -{
  38505. - if( !data.dptr )
  38506. - verror( "internal error #7447234" );
  38507. -
  38508. - int i, j;
  38509. - double *p = data.dptr->coeff;
  38510. -
  38511. - file << this->xsize() << "\t" << this->ysize() << "\t";
  38512. - file << this->scale() << "\t" << this->offset() << "\n";
  38513. -
  38514. - for( i = 0; i < this->ysize(); i++ ) {
  38515. - for( j = 0; j < this->xsize(); j++ )
  38516. - file << *p++ << "\t";
  38517. -
  38518. - file << "\n";
  38519. - }
  38520. -}
  38521. -
  38522. -// Extract data pointer
  38523. -double *_private_detail::VPDMask::array() const
  38524. -{
  38525. - return( data.dptr->coeff );
  38526. -}
  38527. -
  38528. -// Build functions
  38529. -VIMask VIMask::gauss( double sig, double minamp ) throw( VError )
  38530. -{
  38531. - VIMask out;
  38532. - INTMASK *msk;
  38533. -
  38534. - if( !(msk = im_gauss_imask( "VIMask::gauss", sig, minamp )) )
  38535. - verror();
  38536. - out.embed( msk );
  38537. -
  38538. - return( out );
  38539. -}
  38540. -
  38541. -VIMask VIMask::gauss_sep( double sig, double minamp ) throw( VError )
  38542. -{
  38543. - VIMask out;
  38544. - INTMASK *msk;
  38545. -
  38546. - if( !(msk = im_gauss_imask_sep( "VIMask::gauss", sig, minamp )) )
  38547. - verror();
  38548. - out.embed( msk );
  38549. -
  38550. - return( out );
  38551. -}
  38552. -
  38553. -VDMask VDMask::gauss( double sig, double minamp ) throw( VError )
  38554. -{
  38555. - VDMask out;
  38556. - DOUBLEMASK *msk;
  38557. -
  38558. - if( !(msk = im_gauss_dmask( "VDMask::gauss", sig, minamp )) )
  38559. - verror();
  38560. - out.embed( msk );
  38561. -
  38562. - return( out );
  38563. -}
  38564. -
  38565. -VIMask VIMask::log( double sig, double minamp ) throw( VError )
  38566. -{
  38567. - VIMask out;
  38568. - INTMASK *msk;
  38569. -
  38570. - if( !(msk = im_log_imask( "VIMask::log", sig, minamp )) )
  38571. - verror();
  38572. - out.embed( msk );
  38573. -
  38574. - return( out );
  38575. -}
  38576. -
  38577. -VDMask VDMask::log( double sig, double minamp ) throw( VError )
  38578. -{
  38579. - VDMask out;
  38580. - DOUBLEMASK *msk;
  38581. -
  38582. - if( !(msk = im_log_dmask( "VDMask::log", sig, minamp )) )
  38583. - verror();
  38584. - out.embed( msk );
  38585. -
  38586. - return( out );
  38587. -}
  38588. -
  38589. -// Manipulation functions
  38590. -VIMask VIMask::rotate45() throw( VError )
  38591. -{
  38592. - VIMask out;
  38593. - INTMASK *msk;
  38594. -
  38595. - if( !(msk = im_rotate_imask45( mask().iptr, "VIMask::rotate45" )) )
  38596. - verror();
  38597. - out.embed( msk );
  38598. -
  38599. - return( out );
  38600. -}
  38601. -
  38602. -VIMask VIMask::rotate90() throw( VError )
  38603. -{
  38604. - VIMask out;
  38605. - INTMASK *msk;
  38606. -
  38607. - if( !(msk = im_rotate_imask90( mask().iptr, "VIMask::rotate90" )) )
  38608. - verror();
  38609. - out.embed( msk );
  38610. -
  38611. - return( out );
  38612. -}
  38613. -
  38614. -VDMask VDMask::rotate45() throw( VError )
  38615. -{
  38616. - VDMask out;
  38617. - DOUBLEMASK *msk;
  38618. -
  38619. - if( !(msk = im_rotate_dmask45( mask().dptr, "VDMask::rotate45" )) )
  38620. - verror();
  38621. - out.embed( msk );
  38622. -
  38623. - return( out );
  38624. -}
  38625. -
  38626. -VDMask VDMask::rotate90() throw( VError )
  38627. -{
  38628. - VDMask out;
  38629. - DOUBLEMASK *msk;
  38630. -
  38631. - if( !(msk = im_rotate_dmask90( mask().dptr, "VDMask::rotate90" )) )
  38632. - verror();
  38633. - out.embed( msk );
  38634. -
  38635. - return( out );
  38636. -}
  38637. -
  38638. -VDMask VDMask::trn() throw( VError )
  38639. -{
  38640. - VDMask out;
  38641. - DOUBLEMASK *msk;
  38642. -
  38643. - if( !(msk = im_mattrn( mask().dptr, "VDMask::trn" )) )
  38644. - verror();
  38645. - out.embed( msk );
  38646. -
  38647. - return( out );
  38648. -}
  38649. -
  38650. -VDMask VDMask::inv() throw( VError )
  38651. -{
  38652. - VDMask out;
  38653. - DOUBLEMASK *msk;
  38654. -
  38655. - if( !(msk = im_matinv( mask().dptr, "VDMask::inv" )) )
  38656. - verror();
  38657. - out.embed( msk );
  38658. -
  38659. - return( out );
  38660. -}
  38661. -
  38662. -VDMask VDMask::mul( VDMask m ) throw( VError )
  38663. -{
  38664. - VDMask out;
  38665. - DOUBLEMASK *msk;
  38666. -
  38667. - if( !(msk = im_matmul( mask().dptr, m.mask().dptr, "VDMask::mul" )) )
  38668. - verror();
  38669. - out.embed( msk );
  38670. -
  38671. - return( out );
  38672. -}
  38673. -
  38674. -VDMask VDMask::cat( VDMask m ) throw( VError )
  38675. -{
  38676. - VDMask out;
  38677. - DOUBLEMASK *msk;
  38678. -
  38679. - if( !(msk = im_matcat( mask().dptr, m.mask().dptr, "VDMask::cat" )) )
  38680. - verror();
  38681. - out.embed( msk );
  38682. -
  38683. - return( out );
  38684. -}
  38685. -
  38686. -VIMask VDMask::scalei() throw( VError )
  38687. -{
  38688. - VIMask out;
  38689. - INTMASK *msk;
  38690. -
  38691. - if( !(msk = im_scale_dmask( mask().dptr, "VDMask::scalei" )) )
  38692. - verror();
  38693. - out.embed( msk );
  38694. -
  38695. - return( out );
  38696. -}
  38697. -
  38698. -// Arithmetic on a VIMask ... just cast and use VDMask
  38699. -VDMask VIMask::trn() throw( VError )
  38700. - { return( ((VDMask)*this).trn() ); }
  38701. -VDMask VIMask::inv() throw( VError )
  38702. - { return( ((VDMask)*this).inv() ); }
  38703. -VDMask VIMask::cat( VDMask a ) throw( VError )
  38704. - { return( ((VDMask)*this).cat( a ) ); }
  38705. -VDMask VIMask::mul( VDMask a ) throw( VError )
  38706. - { return( ((VDMask)*this).mul( a ) ); }
  38707. -
  38708. -// Overload [] to get linear array subscript.
  38709. -// Our caller may write to the result, so make sure we have a private
  38710. -// copy.
  38711. -// Involves function call, slow anyway, so do range checking
  38712. -int &VIMask::operator[]( int x ) throw( VError )
  38713. -{
  38714. - if( ref->nrefs != 1 )
  38715. - make_private();
  38716. -
  38717. - if( x > size() )
  38718. - verror( "VIMask::operator[]: subscript out of range" );
  38719. -
  38720. - return( ((_private_detail::VPIMask *)ref->pmask)->array()[x] );
  38721. -}
  38722. -
  38723. -double &VDMask::operator[]( int x ) throw( VError )
  38724. -{
  38725. - if( ref->nrefs != 1 )
  38726. - make_private();
  38727. -
  38728. - if( x > size() )
  38729. - verror( "VDMask::operator[]: subscript out of range" );
  38730. -
  38731. - return( ((_private_detail::VPDMask *)ref->pmask)->array()[x] );
  38732. -}
  38733. -
  38734. -VIPS_NAMESPACE_END
  38735. diff -u --recursive --new-file vips-7.38.5-vanilla/Makefile.am vips-7.38.5/Makefile.am
  38736. --- vips-7.38.5-vanilla/Makefile.am 2014-07-17 23:48:36.206794473 -0400
  38737. +++ vips-7.38.5/Makefile.am 2014-07-17 23:49:32.827792979 -0400
  38738. @@ -1,23 +1,9 @@
  38739. -# turn off libvipsCC if C++ is disabled
  38740. -if ENABLE_CXX
  38741. -C_COMPILE_DIR = libvipsCC
  38742. -C_DIST_DIR =
  38743. -C_PKGCONFIG = vipsCC.pc
  38744. -
  38745. -# turn on Python if we can (requires C++)
  38746. -if HAVE_PYTHON
  38747. -P_COMPILE_DIR = swig
  38748. -P_DIST_DIR =
  38749. -endif
  38750. -
  38751. -else
  38752. C_COMPILE_DIR =
  38753. -C_DIST_DIR = libvipsCC
  38754. +C_DIST_DIR =
  38755. C_PKGCONFIG =
  38756. P_COMPILE_DIR =
  38757. P_DIST_DIR = swig
  38758. -endif
  38759. SUBDIRS = \
  38760. libvips \
  38761. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/Makefile.am vips-7.38.5/swig/Makefile.am
  38762. --- vips-7.38.5-vanilla/swig/Makefile.am 2014-07-17 23:48:36.206794473 -0400
  38763. +++ vips-7.38.5/swig/Makefile.am 2014-07-17 23:49:32.827792979 -0400
  38764. @@ -1,5 +1,2 @@
  38765. -SUBDIRS = \
  38766. - vipsCC
  38767. -
  38768. EXTRA_DIST = \
  38769. test
  38770. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/__init__.py vips-7.38.5/swig/vipsCC/__init__.py
  38771. --- vips-7.38.5-vanilla/swig/vipsCC/__init__.py 2014-07-17 23:48:36.208794473 -0400
  38772. +++ vips-7.38.5/swig/vipsCC/__init__.py 1969-12-31 19:00:00.000000000 -0500
  38773. @@ -1 +0,0 @@
  38774. -__all__=["VImage","VMask","VError","VDisplay"]
  38775. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/Makefile.am vips-7.38.5/swig/vipsCC/Makefile.am
  38776. --- vips-7.38.5-vanilla/swig/vipsCC/Makefile.am 2014-07-17 23:48:36.208794473 -0400
  38777. +++ vips-7.38.5/swig/vipsCC/Makefile.am 1969-12-31 19:00:00.000000000 -0500
  38778. @@ -1,58 +0,0 @@
  38779. -# Let make substitute the value of PYTHON_INCLUDES rather than auto*
  38780. -# this makes it easier to support multiple python installs
  38781. -AM_CPPFLAGS = \
  38782. - -I${top_srcdir}/libvips/include \
  38783. - -I${top_srcdir}/libvipsCC/include \
  38784. - @VIPS_CFLAGS@ \
  38785. - @VIPS_INCLUDES@ \
  38786. - $(PYTHON_INCLUDES)
  38787. -
  38788. -# we install to a directory inside the python area, since we are a module
  38789. -vipsccdir = $(pyexecdir)/vipsCC
  38790. -
  38791. -vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
  38792. -
  38793. -# I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't
  38794. -# get it to work, how annoying
  38795. -# FIXME at some point
  38796. -#
  38797. -# need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside
  38798. -# class definitions
  38799. -vimagemodule.cxx: VImage.i
  38800. - cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h
  38801. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  38802. -
  38803. -vdisplaymodule.cxx: VDisplay.i
  38804. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  38805. -verrormodule.cxx: VError.i
  38806. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  38807. -vmaskmodule.cxx: VMask.i
  38808. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  38809. -
  38810. -vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la
  38811. -
  38812. -# maybe there's a clever way to avoid repeating the link stuff 4 times
  38813. -# vimagemodule uses the C API as well, so it needs libvips too
  38814. -vimagemodule_la_LDFLAGS = -module -avoid-version
  38815. -vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS)
  38816. -nodist_vimagemodule_la_SOURCES = vimagemodule.cxx
  38817. -
  38818. -vdisplaymodule_la_LDFLAGS = -module -avoid-version
  38819. -vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  38820. -nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx
  38821. -
  38822. -verrormodule_la_LDFLAGS = -module -avoid-version
  38823. -verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  38824. -nodist_verrormodule_la_SOURCES = verrormodule.cxx
  38825. -
  38826. -vmaskmodule_la_LDFLAGS = -module -avoid-version
  38827. -vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  38828. -nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
  38829. -
  38830. -CLEANFILES = VImage.h
  38831. -
  38832. -EXTRA_DIST = \
  38833. - VImage.i VDisplay.i VError.i VMask.i __init__.py \
  38834. - vimagemodule.cxx \
  38835. - verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
  38836. - VImage.py VDisplay.py VError.py VMask.py
  38837. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/Makefile.in vips-7.38.5/swig/vipsCC/Makefile.in
  38838. --- vips-7.38.5-vanilla/swig/vipsCC/Makefile.in 2014-07-17 23:48:36.208794473 -0400
  38839. +++ vips-7.38.5/swig/vipsCC/Makefile.in 1969-12-31 19:00:00.000000000 -0500
  38840. @@ -1,895 +0,0 @@
  38841. -# Makefile.in generated by automake 1.13.3 from Makefile.am.
  38842. -# @configure_input@
  38843. -
  38844. -# Copyright (C) 1994-2013 Free Software Foundation, Inc.
  38845. -
  38846. -# This Makefile.in is free software; the Free Software Foundation
  38847. -# gives unlimited permission to copy and/or distribute it,
  38848. -# with or without modifications, as long as this notice is preserved.
  38849. -
  38850. -# This program is distributed in the hope that it will be useful,
  38851. -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  38852. -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  38853. -# PARTICULAR PURPOSE.
  38854. -
  38855. -@SET_MAKE@
  38856. -
  38857. -VPATH = @srcdir@
  38858. -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
  38859. -am__make_running_with_option = \
  38860. - case $${target_option-} in \
  38861. - ?) ;; \
  38862. - *) echo "am__make_running_with_option: internal error: invalid" \
  38863. - "target option '$${target_option-}' specified" >&2; \
  38864. - exit 1;; \
  38865. - esac; \
  38866. - has_opt=no; \
  38867. - sane_makeflags=$$MAKEFLAGS; \
  38868. - if $(am__is_gnu_make); then \
  38869. - sane_makeflags=$$MFLAGS; \
  38870. - else \
  38871. - case $$MAKEFLAGS in \
  38872. - *\\[\ \ ]*) \
  38873. - bs=\\; \
  38874. - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  38875. - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  38876. - esac; \
  38877. - fi; \
  38878. - skip_next=no; \
  38879. - strip_trailopt () \
  38880. - { \
  38881. - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  38882. - }; \
  38883. - for flg in $$sane_makeflags; do \
  38884. - test $$skip_next = yes && { skip_next=no; continue; }; \
  38885. - case $$flg in \
  38886. - *=*|--*) continue;; \
  38887. - -*I) strip_trailopt 'I'; skip_next=yes;; \
  38888. - -*I?*) strip_trailopt 'I';; \
  38889. - -*O) strip_trailopt 'O'; skip_next=yes;; \
  38890. - -*O?*) strip_trailopt 'O';; \
  38891. - -*l) strip_trailopt 'l'; skip_next=yes;; \
  38892. - -*l?*) strip_trailopt 'l';; \
  38893. - -[dEDm]) skip_next=yes;; \
  38894. - -[JT]) skip_next=yes;; \
  38895. - esac; \
  38896. - case $$flg in \
  38897. - *$$target_option*) has_opt=yes; break;; \
  38898. - esac; \
  38899. - done; \
  38900. - test $$has_opt = yes
  38901. -am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  38902. -am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  38903. -pkgdatadir = $(datadir)/@PACKAGE@
  38904. -pkgincludedir = $(includedir)/@PACKAGE@
  38905. -pkglibdir = $(libdir)/@PACKAGE@
  38906. -pkglibexecdir = $(libexecdir)/@PACKAGE@
  38907. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  38908. -install_sh_DATA = $(install_sh) -c -m 644
  38909. -install_sh_PROGRAM = $(install_sh) -c
  38910. -install_sh_SCRIPT = $(install_sh) -c
  38911. -INSTALL_HEADER = $(INSTALL_DATA)
  38912. -transform = $(program_transform_name)
  38913. -NORMAL_INSTALL = :
  38914. -PRE_INSTALL = :
  38915. -POST_INSTALL = :
  38916. -NORMAL_UNINSTALL = :
  38917. -PRE_UNINSTALL = :
  38918. -POST_UNINSTALL = :
  38919. -build_triplet = @build@
  38920. -host_triplet = @host@
  38921. -subdir = swig/vipsCC
  38922. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  38923. - $(top_srcdir)/depcomp $(vipscc_PYTHON) \
  38924. - $(top_srcdir)/py-compile
  38925. -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  38926. -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
  38927. - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \
  38928. - $(top_srcdir)/configure.ac
  38929. -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  38930. - $(ACLOCAL_M4)
  38931. -mkinstalldirs = $(install_sh) -d
  38932. -CONFIG_HEADER = $(top_builddir)/config.h
  38933. -CONFIG_CLEAN_FILES =
  38934. -CONFIG_CLEAN_VPATH_FILES =
  38935. -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  38936. -am__vpath_adj = case $$p in \
  38937. - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  38938. - *) f=$$p;; \
  38939. - esac;
  38940. -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
  38941. -am__install_max = 40
  38942. -am__nobase_strip_setup = \
  38943. - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
  38944. -am__nobase_strip = \
  38945. - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
  38946. -am__nobase_list = $(am__nobase_strip_setup); \
  38947. - for p in $$list; do echo "$$p $$p"; done | \
  38948. - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  38949. - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
  38950. - if (++n[$$2] == $(am__install_max)) \
  38951. - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
  38952. - END { for (dir in files) print dir, files[dir] }'
  38953. -am__base_list = \
  38954. - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
  38955. - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
  38956. -am__uninstall_files_from_dir = { \
  38957. - test -z "$$files" \
  38958. - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
  38959. - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  38960. - $(am__cd) "$$dir" && rm -f $$files; }; \
  38961. - }
  38962. -am__installdirs = "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)"
  38963. -LTLIBRARIES = $(vipscc_LTLIBRARIES)
  38964. -am__DEPENDENCIES_1 =
  38965. -vdisplaymodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
  38966. - $(am__DEPENDENCIES_1)
  38967. -nodist_vdisplaymodule_la_OBJECTS = vdisplaymodule.lo
  38968. -vdisplaymodule_la_OBJECTS = $(nodist_vdisplaymodule_la_OBJECTS)
  38969. -AM_V_lt = $(am__v_lt_@AM_V@)
  38970. -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
  38971. -am__v_lt_0 = --silent
  38972. -am__v_lt_1 =
  38973. -vdisplaymodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
  38974. - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
  38975. - $(AM_CXXFLAGS) $(CXXFLAGS) $(vdisplaymodule_la_LDFLAGS) \
  38976. - $(LDFLAGS) -o $@
  38977. -verrormodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
  38978. - $(am__DEPENDENCIES_1)
  38979. -nodist_verrormodule_la_OBJECTS = verrormodule.lo
  38980. -verrormodule_la_OBJECTS = $(nodist_verrormodule_la_OBJECTS)
  38981. -verrormodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
  38982. - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
  38983. - $(AM_CXXFLAGS) $(CXXFLAGS) $(verrormodule_la_LDFLAGS) \
  38984. - $(LDFLAGS) -o $@
  38985. -vimagemodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
  38986. - ../../libvips/libvips.la $(am__DEPENDENCIES_1)
  38987. -nodist_vimagemodule_la_OBJECTS = vimagemodule.lo
  38988. -vimagemodule_la_OBJECTS = $(nodist_vimagemodule_la_OBJECTS)
  38989. -vimagemodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
  38990. - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
  38991. - $(AM_CXXFLAGS) $(CXXFLAGS) $(vimagemodule_la_LDFLAGS) \
  38992. - $(LDFLAGS) -o $@
  38993. -vmaskmodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \
  38994. - $(am__DEPENDENCIES_1)
  38995. -nodist_vmaskmodule_la_OBJECTS = vmaskmodule.lo
  38996. -vmaskmodule_la_OBJECTS = $(nodist_vmaskmodule_la_OBJECTS)
  38997. -vmaskmodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
  38998. - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
  38999. - $(AM_CXXFLAGS) $(CXXFLAGS) $(vmaskmodule_la_LDFLAGS) \
  39000. - $(LDFLAGS) -o $@
  39001. -AM_V_P = $(am__v_P_@AM_V@)
  39002. -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  39003. -am__v_P_0 = false
  39004. -am__v_P_1 = :
  39005. -AM_V_GEN = $(am__v_GEN_@AM_V@)
  39006. -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  39007. -am__v_GEN_0 = @echo " GEN " $@;
  39008. -am__v_GEN_1 =
  39009. -AM_V_at = $(am__v_at_@AM_V@)
  39010. -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  39011. -am__v_at_0 = @
  39012. -am__v_at_1 =
  39013. -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
  39014. -depcomp = $(SHELL) $(top_srcdir)/depcomp
  39015. -am__depfiles_maybe = depfiles
  39016. -am__mv = mv -f
  39017. -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  39018. - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
  39019. -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  39020. - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
  39021. - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
  39022. - $(AM_CXXFLAGS) $(CXXFLAGS)
  39023. -AM_V_CXX = $(am__v_CXX_@AM_V@)
  39024. -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
  39025. -am__v_CXX_0 = @echo " CXX " $@;
  39026. -am__v_CXX_1 =
  39027. -CXXLD = $(CXX)
  39028. -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  39029. - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  39030. - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  39031. -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
  39032. -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
  39033. -am__v_CXXLD_0 = @echo " CXXLD " $@;
  39034. -am__v_CXXLD_1 =
  39035. -SOURCES = $(nodist_vdisplaymodule_la_SOURCES) \
  39036. - $(nodist_verrormodule_la_SOURCES) \
  39037. - $(nodist_vimagemodule_la_SOURCES) \
  39038. - $(nodist_vmaskmodule_la_SOURCES)
  39039. -DIST_SOURCES =
  39040. -am__can_run_installinfo = \
  39041. - case $$AM_UPDATE_INFO_DIR in \
  39042. - n|no|NO) false;; \
  39043. - *) (install-info --version) >/dev/null 2>&1;; \
  39044. - esac
  39045. -am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
  39046. -am__pep3147_tweak = \
  39047. - sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
  39048. -py_compile = $(top_srcdir)/py-compile
  39049. -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  39050. -# Read a list of newline-separated strings from the standard input,
  39051. -# and print each of them once, without duplicates. Input order is
  39052. -# *not* preserved.
  39053. -am__uniquify_input = $(AWK) '\
  39054. - BEGIN { nonempty = 0; } \
  39055. - { items[$$0] = 1; nonempty = 1; } \
  39056. - END { if (nonempty) { for (i in items) print i; }; } \
  39057. -'
  39058. -# Make sure the list of sources is unique. This is necessary because,
  39059. -# e.g., the same source file might be shared among _SOURCES variables
  39060. -# for different programs/libraries.
  39061. -am__define_uniq_tagged_files = \
  39062. - list='$(am__tagged_files)'; \
  39063. - unique=`for i in $$list; do \
  39064. - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  39065. - done | $(am__uniquify_input)`
  39066. -ETAGS = etags
  39067. -CTAGS = ctags
  39068. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  39069. -ACLOCAL = @ACLOCAL@
  39070. -AMTAR = @AMTAR@
  39071. -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  39072. -AR = @AR@
  39073. -AS = @AS@
  39074. -AUTOCONF = @AUTOCONF@
  39075. -AUTOHEADER = @AUTOHEADER@
  39076. -AUTOMAKE = @AUTOMAKE@
  39077. -AWK = @AWK@
  39078. -CATALOGS = @CATALOGS@
  39079. -CATOBJEXT = @CATOBJEXT@
  39080. -CC = @CC@
  39081. -CCDEPMODE = @CCDEPMODE@
  39082. -CFITSIO_CFLAGS = @CFITSIO_CFLAGS@
  39083. -CFITSIO_LIBS = @CFITSIO_LIBS@
  39084. -CFLAGS = @CFLAGS@
  39085. -CPP = @CPP@
  39086. -CPPFLAGS = @CPPFLAGS@
  39087. -CXX = @CXX@
  39088. -CXXCPP = @CXXCPP@
  39089. -CXXDEPMODE = @CXXDEPMODE@
  39090. -CXXFLAGS = @CXXFLAGS@
  39091. -CYGPATH_W = @CYGPATH_W@
  39092. -DATADIRNAME = @DATADIRNAME@
  39093. -DEFS = @DEFS@
  39094. -DEPDIR = @DEPDIR@
  39095. -DLLTOOL = @DLLTOOL@
  39096. -DLLWRAP = @DLLWRAP@
  39097. -DSYMUTIL = @DSYMUTIL@
  39098. -DUMPBIN = @DUMPBIN@
  39099. -ECHO_C = @ECHO_C@
  39100. -ECHO_N = @ECHO_N@
  39101. -ECHO_T = @ECHO_T@
  39102. -EGREP = @EGREP@
  39103. -EXEEXT = @EXEEXT@
  39104. -EXIF_CFLAGS = @EXIF_CFLAGS@
  39105. -EXIF_LIBS = @EXIF_LIBS@
  39106. -FFTW_CFLAGS = @FFTW_CFLAGS@
  39107. -FFTW_LIBS = @FFTW_LIBS@
  39108. -FGREP = @FGREP@
  39109. -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
  39110. -GMOFILES = @GMOFILES@
  39111. -GMSGFMT = @GMSGFMT@
  39112. -GREP = @GREP@
  39113. -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
  39114. -GTHREAD_LIBS = @GTHREAD_LIBS@
  39115. -GTKDOC_CHECK = @GTKDOC_CHECK@
  39116. -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
  39117. -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
  39118. -GTKDOC_MKPDF = @GTKDOC_MKPDF@
  39119. -GTKDOC_REBASE = @GTKDOC_REBASE@
  39120. -HTML_DIR = @HTML_DIR@
  39121. -IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@
  39122. -IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@
  39123. -INSTALL = @INSTALL@
  39124. -INSTALL_DATA = @INSTALL_DATA@
  39125. -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  39126. -INSTALL_SCRIPT = @INSTALL_SCRIPT@
  39127. -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  39128. -INSTOBJEXT = @INSTOBJEXT@
  39129. -INTLLIBS = @INTLLIBS@
  39130. -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
  39131. -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
  39132. -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
  39133. -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
  39134. -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
  39135. -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
  39136. -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
  39137. -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
  39138. -JPEG_INCLUDES = @JPEG_INCLUDES@
  39139. -JPEG_LIBS = @JPEG_LIBS@
  39140. -LCMS_CFLAGS = @LCMS_CFLAGS@
  39141. -LCMS_LIBS = @LCMS_LIBS@
  39142. -LD = @LD@
  39143. -LDFLAGS = @LDFLAGS@
  39144. -LIBOBJS = @LIBOBJS@
  39145. -LIBRARY_AGE = @LIBRARY_AGE@
  39146. -LIBRARY_CURRENT = @LIBRARY_CURRENT@
  39147. -LIBRARY_REVISION = @LIBRARY_REVISION@
  39148. -LIBS = @LIBS@
  39149. -LIBTOOL = @LIBTOOL@
  39150. -LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@
  39151. -LIBWEBP_LIBS = @LIBWEBP_LIBS@
  39152. -LIPO = @LIPO@
  39153. -LN_S = @LN_S@
  39154. -LTLIBOBJS = @LTLIBOBJS@
  39155. -MAGICK_CFLAGS = @MAGICK_CFLAGS@
  39156. -MAGICK_LIBS = @MAGICK_LIBS@
  39157. -MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@
  39158. -MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@
  39159. -MAKEINFO = @MAKEINFO@
  39160. -MANIFEST_TOOL = @MANIFEST_TOOL@
  39161. -MATIO_CFLAGS = @MATIO_CFLAGS@
  39162. -MATIO_LIBS = @MATIO_LIBS@
  39163. -MKDIR_P = @MKDIR_P@
  39164. -MKINSTALLDIRS = @MKINSTALLDIRS@
  39165. -MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@
  39166. -MONOTONIC_LIBS = @MONOTONIC_LIBS@
  39167. -MSGFMT = @MSGFMT@
  39168. -MSGFMT_OPTS = @MSGFMT_OPTS@
  39169. -NM = @NM@
  39170. -NMEDIT = @NMEDIT@
  39171. -OBJDUMP = @OBJDUMP@
  39172. -OBJEXT = @OBJEXT@
  39173. -OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
  39174. -OPENEXR_LIBS = @OPENEXR_LIBS@
  39175. -OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@
  39176. -OPENSLIDE_LIBS = @OPENSLIDE_LIBS@
  39177. -ORC_CFLAGS = @ORC_CFLAGS@
  39178. -ORC_LIBS = @ORC_LIBS@
  39179. -OTOOL = @OTOOL@
  39180. -OTOOL64 = @OTOOL64@
  39181. -PACKAGE = @PACKAGE@
  39182. -PACKAGES_USED = @PACKAGES_USED@
  39183. -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  39184. -PACKAGE_NAME = @PACKAGE_NAME@
  39185. -PACKAGE_STRING = @PACKAGE_STRING@
  39186. -PACKAGE_TARNAME = @PACKAGE_TARNAME@
  39187. -PACKAGE_URL = @PACKAGE_URL@
  39188. -PACKAGE_VERSION = @PACKAGE_VERSION@
  39189. -PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
  39190. -PANGOFT2_LIBS = @PANGOFT2_LIBS@
  39191. -PATH_SEPARATOR = @PATH_SEPARATOR@
  39192. -PKG_CONFIG = @PKG_CONFIG@
  39193. -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
  39194. -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
  39195. -PNG_CFLAGS = @PNG_CFLAGS@
  39196. -PNG_INCLUDES = @PNG_INCLUDES@
  39197. -PNG_LIBS = @PNG_LIBS@
  39198. -POFILES = @POFILES@
  39199. -POSUB = @POSUB@
  39200. -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
  39201. -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
  39202. -PYTHON = @PYTHON@
  39203. -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
  39204. -PYTHON_INCLUDES = @PYTHON_INCLUDES@
  39205. -PYTHON_PLATFORM = @PYTHON_PLATFORM@
  39206. -PYTHON_PREFIX = @PYTHON_PREFIX@
  39207. -PYTHON_VERSION = @PYTHON_VERSION@
  39208. -RANLIB = @RANLIB@
  39209. -REQUIRED_CFLAGS = @REQUIRED_CFLAGS@
  39210. -REQUIRED_LIBS = @REQUIRED_LIBS@
  39211. -SED = @SED@
  39212. -SET_MAKE = @SET_MAKE@
  39213. -SHELL = @SHELL@
  39214. -STRIP = @STRIP@
  39215. -THREADS_CFLAGS = @THREADS_CFLAGS@
  39216. -THREADS_LIBS = @THREADS_LIBS@
  39217. -TIFF_CFLAGS = @TIFF_CFLAGS@
  39218. -TIFF_INCLUDES = @TIFF_INCLUDES@
  39219. -TIFF_LIBS = @TIFF_LIBS@
  39220. -TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@
  39221. -TYPE_INIT_LIBS = @TYPE_INIT_LIBS@
  39222. -USE_NLS = @USE_NLS@
  39223. -VERSION = @VERSION@
  39224. -VIPS_CFLAGS = @VIPS_CFLAGS@
  39225. -VIPS_CXX_LIBS = @VIPS_CXX_LIBS@
  39226. -VIPS_EXEEXT = @VIPS_EXEEXT@
  39227. -VIPS_INCLUDES = @VIPS_INCLUDES@
  39228. -VIPS_LIBDIR = @VIPS_LIBDIR@
  39229. -VIPS_LIBS = @VIPS_LIBS@
  39230. -VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@
  39231. -VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@
  39232. -VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@
  39233. -VIPS_VERSION = @VIPS_VERSION@
  39234. -VIPS_VERSION_STRING = @VIPS_VERSION_STRING@
  39235. -XGETTEXT = @XGETTEXT@
  39236. -XMKMF = @XMKMF@
  39237. -X_CFLAGS = @X_CFLAGS@
  39238. -X_EXTRA_LIBS = @X_EXTRA_LIBS@
  39239. -X_LIBS = @X_LIBS@
  39240. -X_PRE_LIBS = @X_PRE_LIBS@
  39241. -ZIP_INCLUDES = @ZIP_INCLUDES@
  39242. -ZIP_LIBS = @ZIP_LIBS@
  39243. -abs_builddir = @abs_builddir@
  39244. -abs_srcdir = @abs_srcdir@
  39245. -abs_top_builddir = @abs_top_builddir@
  39246. -abs_top_srcdir = @abs_top_srcdir@
  39247. -ac_ct_AR = @ac_ct_AR@
  39248. -ac_ct_CC = @ac_ct_CC@
  39249. -ac_ct_CXX = @ac_ct_CXX@
  39250. -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  39251. -am__include = @am__include@
  39252. -am__leading_dot = @am__leading_dot@
  39253. -am__quote = @am__quote@
  39254. -am__tar = @am__tar@
  39255. -am__untar = @am__untar@
  39256. -bindir = @bindir@
  39257. -build = @build@
  39258. -build_alias = @build_alias@
  39259. -build_cpu = @build_cpu@
  39260. -build_os = @build_os@
  39261. -build_vendor = @build_vendor@
  39262. -builddir = @builddir@
  39263. -datadir = @datadir@
  39264. -datarootdir = @datarootdir@
  39265. -docdir = @docdir@
  39266. -dvidir = @dvidir@
  39267. -exec_prefix = @exec_prefix@
  39268. -host = @host@
  39269. -host_alias = @host_alias@
  39270. -host_cpu = @host_cpu@
  39271. -host_os = @host_os@
  39272. -host_vendor = @host_vendor@
  39273. -htmldir = @htmldir@
  39274. -includedir = @includedir@
  39275. -infodir = @infodir@
  39276. -install_sh = @install_sh@
  39277. -libdir = @libdir@
  39278. -libexecdir = @libexecdir@
  39279. -localedir = @localedir@
  39280. -localstatedir = @localstatedir@
  39281. -mandir = @mandir@
  39282. -mkdir_p = @mkdir_p@
  39283. -oldincludedir = @oldincludedir@
  39284. -pdfdir = @pdfdir@
  39285. -pkgpyexecdir = @pkgpyexecdir@
  39286. -pkgpythondir = @pkgpythondir@
  39287. -prefix = @prefix@
  39288. -program_transform_name = @program_transform_name@
  39289. -psdir = @psdir@
  39290. -pyexecdir = @pyexecdir@
  39291. -pythondir = @pythondir@
  39292. -sbindir = @sbindir@
  39293. -sharedstatedir = @sharedstatedir@
  39294. -srcdir = @srcdir@
  39295. -sysconfdir = @sysconfdir@
  39296. -target_alias = @target_alias@
  39297. -top_build_prefix = @top_build_prefix@
  39298. -top_builddir = @top_builddir@
  39299. -top_srcdir = @top_srcdir@
  39300. -vips_introspection_sources = @vips_introspection_sources@
  39301. -
  39302. -# Let make substitute the value of PYTHON_INCLUDES rather than auto*
  39303. -# this makes it easier to support multiple python installs
  39304. -AM_CPPFLAGS = \
  39305. - -I${top_srcdir}/libvips/include \
  39306. - -I${top_srcdir}/libvipsCC/include \
  39307. - @VIPS_CFLAGS@ \
  39308. - @VIPS_INCLUDES@ \
  39309. - $(PYTHON_INCLUDES)
  39310. -
  39311. -
  39312. -# we install to a directory inside the python area, since we are a module
  39313. -vipsccdir = $(pyexecdir)/vipsCC
  39314. -vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
  39315. -vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la
  39316. -
  39317. -# maybe there's a clever way to avoid repeating the link stuff 4 times
  39318. -# vimagemodule uses the C API as well, so it needs libvips too
  39319. -vimagemodule_la_LDFLAGS = -module -avoid-version
  39320. -vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS)
  39321. -nodist_vimagemodule_la_SOURCES = vimagemodule.cxx
  39322. -vdisplaymodule_la_LDFLAGS = -module -avoid-version
  39323. -vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  39324. -nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx
  39325. -verrormodule_la_LDFLAGS = -module -avoid-version
  39326. -verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  39327. -nodist_verrormodule_la_SOURCES = verrormodule.cxx
  39328. -vmaskmodule_la_LDFLAGS = -module -avoid-version
  39329. -vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS)
  39330. -nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
  39331. -CLEANFILES = VImage.h
  39332. -EXTRA_DIST = \
  39333. - VImage.i VDisplay.i VError.i VMask.i __init__.py \
  39334. - vimagemodule.cxx \
  39335. - verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
  39336. - VImage.py VDisplay.py VError.py VMask.py
  39337. -
  39338. -all: all-am
  39339. -
  39340. -.SUFFIXES:
  39341. -.SUFFIXES: .cxx .lo .o .obj
  39342. -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  39343. - @for dep in $?; do \
  39344. - case '$(am__configure_deps)' in \
  39345. - *$$dep*) \
  39346. - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  39347. - && { if test -f $@; then exit 0; else break; fi; }; \
  39348. - exit 1;; \
  39349. - esac; \
  39350. - done; \
  39351. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign swig/vipsCC/Makefile'; \
  39352. - $(am__cd) $(top_srcdir) && \
  39353. - $(AUTOMAKE) --foreign swig/vipsCC/Makefile
  39354. -.PRECIOUS: Makefile
  39355. -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  39356. - @case '$?' in \
  39357. - *config.status*) \
  39358. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  39359. - *) \
  39360. - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  39361. - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  39362. - esac;
  39363. -
  39364. -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  39365. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  39366. -
  39367. -$(top_srcdir)/configure: $(am__configure_deps)
  39368. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  39369. -$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  39370. - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  39371. -$(am__aclocal_m4_deps):
  39372. -
  39373. -install-vipsccLTLIBRARIES: $(vipscc_LTLIBRARIES)
  39374. - @$(NORMAL_INSTALL)
  39375. - @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \
  39376. - list2=; for p in $$list; do \
  39377. - if test -f $$p; then \
  39378. - list2="$$list2 $$p"; \
  39379. - else :; fi; \
  39380. - done; \
  39381. - test -z "$$list2" || { \
  39382. - echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \
  39383. - $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \
  39384. - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(vipsccdir)'"; \
  39385. - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(vipsccdir)"; \
  39386. - }
  39387. -
  39388. -uninstall-vipsccLTLIBRARIES:
  39389. - @$(NORMAL_UNINSTALL)
  39390. - @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \
  39391. - for p in $$list; do \
  39392. - $(am__strip_dir) \
  39393. - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(vipsccdir)/$$f'"; \
  39394. - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(vipsccdir)/$$f"; \
  39395. - done
  39396. -
  39397. -clean-vipsccLTLIBRARIES:
  39398. - -test -z "$(vipscc_LTLIBRARIES)" || rm -f $(vipscc_LTLIBRARIES)
  39399. - @list='$(vipscc_LTLIBRARIES)'; \
  39400. - locs=`for p in $$list; do echo $$p; done | \
  39401. - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
  39402. - sort -u`; \
  39403. - test -z "$$locs" || { \
  39404. - echo rm -f $${locs}; \
  39405. - rm -f $${locs}; \
  39406. - }
  39407. -
  39408. -vdisplaymodule.la: $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_DEPENDENCIES) $(EXTRA_vdisplaymodule_la_DEPENDENCIES)
  39409. - $(AM_V_CXXLD)$(vdisplaymodule_la_LINK) -rpath $(vipsccdir) $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_LIBADD) $(LIBS)
  39410. -
  39411. -verrormodule.la: $(verrormodule_la_OBJECTS) $(verrormodule_la_DEPENDENCIES) $(EXTRA_verrormodule_la_DEPENDENCIES)
  39412. - $(AM_V_CXXLD)$(verrormodule_la_LINK) -rpath $(vipsccdir) $(verrormodule_la_OBJECTS) $(verrormodule_la_LIBADD) $(LIBS)
  39413. -
  39414. -vimagemodule.la: $(vimagemodule_la_OBJECTS) $(vimagemodule_la_DEPENDENCIES) $(EXTRA_vimagemodule_la_DEPENDENCIES)
  39415. - $(AM_V_CXXLD)$(vimagemodule_la_LINK) -rpath $(vipsccdir) $(vimagemodule_la_OBJECTS) $(vimagemodule_la_LIBADD) $(LIBS)
  39416. -
  39417. -vmaskmodule.la: $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_DEPENDENCIES) $(EXTRA_vmaskmodule_la_DEPENDENCIES)
  39418. - $(AM_V_CXXLD)$(vmaskmodule_la_LINK) -rpath $(vipsccdir) $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_LIBADD) $(LIBS)
  39419. -
  39420. -mostlyclean-compile:
  39421. - -rm -f *.$(OBJEXT)
  39422. -
  39423. -distclean-compile:
  39424. - -rm -f *.tab.c
  39425. -
  39426. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdisplaymodule.Plo@am__quote@
  39427. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verrormodule.Plo@am__quote@
  39428. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vimagemodule.Plo@am__quote@
  39429. -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmaskmodule.Plo@am__quote@
  39430. -
  39431. -.cxx.o:
  39432. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  39433. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  39434. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  39435. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  39436. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
  39437. -
  39438. -.cxx.obj:
  39439. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
  39440. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  39441. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  39442. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  39443. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
  39444. -
  39445. -.cxx.lo:
  39446. -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
  39447. -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  39448. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  39449. -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  39450. -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
  39451. -
  39452. -mostlyclean-libtool:
  39453. - -rm -f *.lo
  39454. -
  39455. -clean-libtool:
  39456. - -rm -rf .libs _libs
  39457. -install-vipsccPYTHON: $(vipscc_PYTHON)
  39458. - @$(NORMAL_INSTALL)
  39459. - @list='$(vipscc_PYTHON)'; dlist=; list2=; test -n "$(vipsccdir)" || list=; \
  39460. - if test -n "$$list"; then \
  39461. - echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \
  39462. - $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \
  39463. - fi; \
  39464. - for p in $$list; do \
  39465. - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
  39466. - if test -f $$b$$p; then \
  39467. - $(am__strip_dir) \
  39468. - dlist="$$dlist $$f"; \
  39469. - list2="$$list2 $$b$$p"; \
  39470. - else :; fi; \
  39471. - done; \
  39472. - for file in $$list2; do echo $$file; done | $(am__base_list) | \
  39473. - while read files; do \
  39474. - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vipsccdir)'"; \
  39475. - $(INSTALL_DATA) $$files "$(DESTDIR)$(vipsccdir)" || exit $$?; \
  39476. - done || exit $$?; \
  39477. - if test -n "$$dlist"; then \
  39478. - $(am__py_compile) --destdir "$(DESTDIR)" \
  39479. - --basedir "$(vipsccdir)" $$dlist; \
  39480. - else :; fi
  39481. -
  39482. -uninstall-vipsccPYTHON:
  39483. - @$(NORMAL_UNINSTALL)
  39484. - @list='$(vipscc_PYTHON)'; test -n "$(vipsccdir)" || list=; \
  39485. - py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
  39486. - test -n "$$py_files" || exit 0; \
  39487. - dir='$(DESTDIR)$(vipsccdir)'; \
  39488. - pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
  39489. - pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
  39490. - py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
  39491. - echo "$$py_files_pep3147";\
  39492. - pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
  39493. - pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
  39494. - st=0; \
  39495. - for files in \
  39496. - "$$py_files" \
  39497. - "$$pyc_files" \
  39498. - "$$pyo_files" \
  39499. - "$$pyc_files_pep3147" \
  39500. - "$$pyo_files_pep3147" \
  39501. - ; do \
  39502. - $(am__uninstall_files_from_dir) || st=$$?; \
  39503. - done; \
  39504. - exit $$st
  39505. -
  39506. -ID: $(am__tagged_files)
  39507. - $(am__define_uniq_tagged_files); mkid -fID $$unique
  39508. -tags: tags-am
  39509. -TAGS: tags
  39510. -
  39511. -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  39512. - set x; \
  39513. - here=`pwd`; \
  39514. - $(am__define_uniq_tagged_files); \
  39515. - shift; \
  39516. - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
  39517. - test -n "$$unique" || unique=$$empty_fix; \
  39518. - if test $$# -gt 0; then \
  39519. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  39520. - "$$@" $$unique; \
  39521. - else \
  39522. - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  39523. - $$unique; \
  39524. - fi; \
  39525. - fi
  39526. -ctags: ctags-am
  39527. -
  39528. -CTAGS: ctags
  39529. -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
  39530. - $(am__define_uniq_tagged_files); \
  39531. - test -z "$(CTAGS_ARGS)$$unique" \
  39532. - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  39533. - $$unique
  39534. -
  39535. -GTAGS:
  39536. - here=`$(am__cd) $(top_builddir) && pwd` \
  39537. - && $(am__cd) $(top_srcdir) \
  39538. - && gtags -i $(GTAGS_ARGS) "$$here"
  39539. -cscopelist: cscopelist-am
  39540. -
  39541. -cscopelist-am: $(am__tagged_files)
  39542. - list='$(am__tagged_files)'; \
  39543. - case "$(srcdir)" in \
  39544. - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
  39545. - *) sdir=$(subdir)/$(srcdir) ;; \
  39546. - esac; \
  39547. - for i in $$list; do \
  39548. - if test -f "$$i"; then \
  39549. - echo "$(subdir)/$$i"; \
  39550. - else \
  39551. - echo "$$sdir/$$i"; \
  39552. - fi; \
  39553. - done >> $(top_builddir)/cscope.files
  39554. -
  39555. -distclean-tags:
  39556. - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  39557. -
  39558. -distdir: $(DISTFILES)
  39559. - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  39560. - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  39561. - list='$(DISTFILES)'; \
  39562. - dist_files=`for file in $$list; do echo $$file; done | \
  39563. - sed -e "s|^$$srcdirstrip/||;t" \
  39564. - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  39565. - case $$dist_files in \
  39566. - */*) $(MKDIR_P) `echo "$$dist_files" | \
  39567. - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  39568. - sort -u` ;; \
  39569. - esac; \
  39570. - for file in $$dist_files; do \
  39571. - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  39572. - if test -d $$d/$$file; then \
  39573. - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  39574. - if test -d "$(distdir)/$$file"; then \
  39575. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  39576. - fi; \
  39577. - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  39578. - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  39579. - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  39580. - fi; \
  39581. - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  39582. - else \
  39583. - test -f "$(distdir)/$$file" \
  39584. - || cp -p $$d/$$file "$(distdir)/$$file" \
  39585. - || exit 1; \
  39586. - fi; \
  39587. - done
  39588. -check-am: all-am
  39589. -check: check-am
  39590. -all-am: Makefile $(LTLIBRARIES)
  39591. -installdirs:
  39592. - for dir in "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)"; do \
  39593. - test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  39594. - done
  39595. -install: install-am
  39596. -install-exec: install-exec-am
  39597. -install-data: install-data-am
  39598. -uninstall: uninstall-am
  39599. -
  39600. -install-am: all-am
  39601. - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  39602. -
  39603. -installcheck: installcheck-am
  39604. -install-strip:
  39605. - if test -z '$(STRIP)'; then \
  39606. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  39607. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  39608. - install; \
  39609. - else \
  39610. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  39611. - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  39612. - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  39613. - fi
  39614. -mostlyclean-generic:
  39615. -
  39616. -clean-generic:
  39617. - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  39618. -
  39619. -distclean-generic:
  39620. - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  39621. - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  39622. -
  39623. -maintainer-clean-generic:
  39624. - @echo "This command is intended for maintainers to use"
  39625. - @echo "it deletes files that may require special tools to rebuild."
  39626. -clean: clean-am
  39627. -
  39628. -clean-am: clean-generic clean-libtool clean-vipsccLTLIBRARIES \
  39629. - mostlyclean-am
  39630. -
  39631. -distclean: distclean-am
  39632. - -rm -rf ./$(DEPDIR)
  39633. - -rm -f Makefile
  39634. -distclean-am: clean-am distclean-compile distclean-generic \
  39635. - distclean-tags
  39636. -
  39637. -dvi: dvi-am
  39638. -
  39639. -dvi-am:
  39640. -
  39641. -html: html-am
  39642. -
  39643. -html-am:
  39644. -
  39645. -info: info-am
  39646. -
  39647. -info-am:
  39648. -
  39649. -install-data-am: install-vipsccLTLIBRARIES install-vipsccPYTHON
  39650. -
  39651. -install-dvi: install-dvi-am
  39652. -
  39653. -install-dvi-am:
  39654. -
  39655. -install-exec-am:
  39656. -
  39657. -install-html: install-html-am
  39658. -
  39659. -install-html-am:
  39660. -
  39661. -install-info: install-info-am
  39662. -
  39663. -install-info-am:
  39664. -
  39665. -install-man:
  39666. -
  39667. -install-pdf: install-pdf-am
  39668. -
  39669. -install-pdf-am:
  39670. -
  39671. -install-ps: install-ps-am
  39672. -
  39673. -install-ps-am:
  39674. -
  39675. -installcheck-am:
  39676. -
  39677. -maintainer-clean: maintainer-clean-am
  39678. - -rm -rf ./$(DEPDIR)
  39679. - -rm -f Makefile
  39680. -maintainer-clean-am: distclean-am maintainer-clean-generic
  39681. -
  39682. -mostlyclean: mostlyclean-am
  39683. -
  39684. -mostlyclean-am: mostlyclean-compile mostlyclean-generic \
  39685. - mostlyclean-libtool
  39686. -
  39687. -pdf: pdf-am
  39688. -
  39689. -pdf-am:
  39690. -
  39691. -ps: ps-am
  39692. -
  39693. -ps-am:
  39694. -
  39695. -uninstall-am: uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON
  39696. -
  39697. -.MAKE: install-am install-strip
  39698. -
  39699. -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
  39700. - clean-libtool clean-vipsccLTLIBRARIES cscopelist-am ctags \
  39701. - ctags-am distclean distclean-compile distclean-generic \
  39702. - distclean-libtool distclean-tags distdir dvi dvi-am html \
  39703. - html-am info info-am install install-am install-data \
  39704. - install-data-am install-dvi install-dvi-am install-exec \
  39705. - install-exec-am install-html install-html-am install-info \
  39706. - install-info-am install-man install-pdf install-pdf-am \
  39707. - install-ps install-ps-am install-strip \
  39708. - install-vipsccLTLIBRARIES install-vipsccPYTHON installcheck \
  39709. - installcheck-am installdirs maintainer-clean \
  39710. - maintainer-clean-generic mostlyclean mostlyclean-compile \
  39711. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  39712. - tags tags-am uninstall uninstall-am \
  39713. - uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON
  39714. -
  39715. -
  39716. -# I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't
  39717. -# get it to work, how annoying
  39718. -# FIXME at some point
  39719. -#
  39720. -# need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside
  39721. -# class definitions
  39722. -vimagemodule.cxx: VImage.i
  39723. - cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h
  39724. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  39725. -
  39726. -vdisplaymodule.cxx: VDisplay.i
  39727. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  39728. -verrormodule.cxx: VError.i
  39729. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  39730. -vmaskmodule.cxx: VMask.i
  39731. - swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $<
  39732. -
  39733. -# Tell versions [3.59,3.63) of GNU make to not export all variables.
  39734. -# Otherwise a system limit (for SysV at least) may be exceeded.
  39735. -.NOEXPORT:
  39736. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VDisplay.i vips-7.38.5/swig/vipsCC/VDisplay.i
  39737. --- vips-7.38.5-vanilla/swig/vipsCC/VDisplay.i 2014-07-17 23:48:36.208794473 -0400
  39738. +++ vips-7.38.5/swig/vipsCC/VDisplay.i 1969-12-31 19:00:00.000000000 -0500
  39739. @@ -1,15 +0,0 @@
  39740. -/* SWIG interface file for VDisplay.
  39741. - */
  39742. -
  39743. -%module VDisplay
  39744. -%{
  39745. -#include <vips/vipscpp.h>
  39746. -%}
  39747. -
  39748. -%import "VError.i"
  39749. -
  39750. -/* Need to override assignment to get refcounting working.
  39751. - */
  39752. -%rename(__assign__) *::operator=;
  39753. -
  39754. -%include vips/VDisplay.h
  39755. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vdisplaymodule.cxx vips-7.38.5/swig/vipsCC/vdisplaymodule.cxx
  39756. --- vips-7.38.5-vanilla/swig/vipsCC/vdisplaymodule.cxx 2014-07-17 23:48:36.211794473 -0400
  39757. +++ vips-7.38.5/swig/vipsCC/vdisplaymodule.cxx 1969-12-31 19:00:00.000000000 -0500
  39758. @@ -1,4117 +0,0 @@
  39759. -/* ----------------------------------------------------------------------------
  39760. - * This file was automatically generated by SWIG (http://www.swig.org).
  39761. - * Version 2.0.10
  39762. - *
  39763. - * This file is not intended to be easily readable and contains a number of
  39764. - * coding conventions designed to improve portability and efficiency. Do not make
  39765. - * changes to this file unless you know what you are doing--modify the SWIG
  39766. - * interface file instead.
  39767. - * ----------------------------------------------------------------------------- */
  39768. -
  39769. -#define SWIGPYTHON
  39770. -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  39771. -
  39772. -
  39773. -#ifdef __cplusplus
  39774. -/* SwigValueWrapper is described in swig.swg */
  39775. -template<typename T> class SwigValueWrapper {
  39776. - struct SwigMovePointer {
  39777. - T *ptr;
  39778. - SwigMovePointer(T *p) : ptr(p) { }
  39779. - ~SwigMovePointer() { delete ptr; }
  39780. - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  39781. - } pointer;
  39782. - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  39783. - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  39784. -public:
  39785. - SwigValueWrapper() : pointer(0) { }
  39786. - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  39787. - operator T&() const { return *pointer.ptr; }
  39788. - T *operator&() { return pointer.ptr; }
  39789. -};
  39790. -
  39791. -template <typename T> T SwigValueInit() {
  39792. - return T();
  39793. -}
  39794. -#endif
  39795. -
  39796. -/* -----------------------------------------------------------------------------
  39797. - * This section contains generic SWIG labels for method/variable
  39798. - * declarations/attributes, and other compiler dependent labels.
  39799. - * ----------------------------------------------------------------------------- */
  39800. -
  39801. -/* template workaround for compilers that cannot correctly implement the C++ standard */
  39802. -#ifndef SWIGTEMPLATEDISAMBIGUATOR
  39803. -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  39804. -# define SWIGTEMPLATEDISAMBIGUATOR template
  39805. -# elif defined(__HP_aCC)
  39806. -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  39807. -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  39808. -# define SWIGTEMPLATEDISAMBIGUATOR template
  39809. -# else
  39810. -# define SWIGTEMPLATEDISAMBIGUATOR
  39811. -# endif
  39812. -#endif
  39813. -
  39814. -/* inline attribute */
  39815. -#ifndef SWIGINLINE
  39816. -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  39817. -# define SWIGINLINE inline
  39818. -# else
  39819. -# define SWIGINLINE
  39820. -# endif
  39821. -#endif
  39822. -
  39823. -/* attribute recognised by some compilers to avoid 'unused' warnings */
  39824. -#ifndef SWIGUNUSED
  39825. -# if defined(__GNUC__)
  39826. -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  39827. -# define SWIGUNUSED __attribute__ ((__unused__))
  39828. -# else
  39829. -# define SWIGUNUSED
  39830. -# endif
  39831. -# elif defined(__ICC)
  39832. -# define SWIGUNUSED __attribute__ ((__unused__))
  39833. -# else
  39834. -# define SWIGUNUSED
  39835. -# endif
  39836. -#endif
  39837. -
  39838. -#ifndef SWIG_MSC_UNSUPPRESS_4505
  39839. -# if defined(_MSC_VER)
  39840. -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
  39841. -# endif
  39842. -#endif
  39843. -
  39844. -#ifndef SWIGUNUSEDPARM
  39845. -# ifdef __cplusplus
  39846. -# define SWIGUNUSEDPARM(p)
  39847. -# else
  39848. -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
  39849. -# endif
  39850. -#endif
  39851. -
  39852. -/* internal SWIG method */
  39853. -#ifndef SWIGINTERN
  39854. -# define SWIGINTERN static SWIGUNUSED
  39855. -#endif
  39856. -
  39857. -/* internal inline SWIG method */
  39858. -#ifndef SWIGINTERNINLINE
  39859. -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  39860. -#endif
  39861. -
  39862. -/* exporting methods */
  39863. -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  39864. -# ifndef GCC_HASCLASSVISIBILITY
  39865. -# define GCC_HASCLASSVISIBILITY
  39866. -# endif
  39867. -#endif
  39868. -
  39869. -#ifndef SWIGEXPORT
  39870. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  39871. -# if defined(STATIC_LINKED)
  39872. -# define SWIGEXPORT
  39873. -# else
  39874. -# define SWIGEXPORT __declspec(dllexport)
  39875. -# endif
  39876. -# else
  39877. -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  39878. -# define SWIGEXPORT __attribute__ ((visibility("default")))
  39879. -# else
  39880. -# define SWIGEXPORT
  39881. -# endif
  39882. -# endif
  39883. -#endif
  39884. -
  39885. -/* calling conventions for Windows */
  39886. -#ifndef SWIGSTDCALL
  39887. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  39888. -# define SWIGSTDCALL __stdcall
  39889. -# else
  39890. -# define SWIGSTDCALL
  39891. -# endif
  39892. -#endif
  39893. -
  39894. -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  39895. -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  39896. -# define _CRT_SECURE_NO_DEPRECATE
  39897. -#endif
  39898. -
  39899. -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  39900. -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  39901. -# define _SCL_SECURE_NO_DEPRECATE
  39902. -#endif
  39903. -
  39904. -
  39905. -
  39906. -/* Python.h has to appear first */
  39907. -#include <Python.h>
  39908. -
  39909. -/* -----------------------------------------------------------------------------
  39910. - * swigrun.swg
  39911. - *
  39912. - * This file contains generic C API SWIG runtime support for pointer
  39913. - * type checking.
  39914. - * ----------------------------------------------------------------------------- */
  39915. -
  39916. -/* This should only be incremented when either the layout of swig_type_info changes,
  39917. - or for whatever reason, the runtime changes incompatibly */
  39918. -#define SWIG_RUNTIME_VERSION "4"
  39919. -
  39920. -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  39921. -#ifdef SWIG_TYPE_TABLE
  39922. -# define SWIG_QUOTE_STRING(x) #x
  39923. -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  39924. -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  39925. -#else
  39926. -# define SWIG_TYPE_TABLE_NAME
  39927. -#endif
  39928. -
  39929. -/*
  39930. - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  39931. - creating a static or dynamic library from the SWIG runtime code.
  39932. - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  39933. -
  39934. - But only do this if strictly necessary, ie, if you have problems
  39935. - with your compiler or suchlike.
  39936. -*/
  39937. -
  39938. -#ifndef SWIGRUNTIME
  39939. -# define SWIGRUNTIME SWIGINTERN
  39940. -#endif
  39941. -
  39942. -#ifndef SWIGRUNTIMEINLINE
  39943. -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  39944. -#endif
  39945. -
  39946. -/* Generic buffer size */
  39947. -#ifndef SWIG_BUFFER_SIZE
  39948. -# define SWIG_BUFFER_SIZE 1024
  39949. -#endif
  39950. -
  39951. -/* Flags for pointer conversions */
  39952. -#define SWIG_POINTER_DISOWN 0x1
  39953. -#define SWIG_CAST_NEW_MEMORY 0x2
  39954. -
  39955. -/* Flags for new pointer objects */
  39956. -#define SWIG_POINTER_OWN 0x1
  39957. -
  39958. -
  39959. -/*
  39960. - Flags/methods for returning states.
  39961. -
  39962. - The SWIG conversion methods, as ConvertPtr, return an integer
  39963. - that tells if the conversion was successful or not. And if not,
  39964. - an error code can be returned (see swigerrors.swg for the codes).
  39965. -
  39966. - Use the following macros/flags to set or process the returning
  39967. - states.
  39968. -
  39969. - In old versions of SWIG, code such as the following was usually written:
  39970. -
  39971. - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  39972. - // success code
  39973. - } else {
  39974. - //fail code
  39975. - }
  39976. -
  39977. - Now you can be more explicit:
  39978. -
  39979. - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  39980. - if (SWIG_IsOK(res)) {
  39981. - // success code
  39982. - } else {
  39983. - // fail code
  39984. - }
  39985. -
  39986. - which is the same really, but now you can also do
  39987. -
  39988. - Type *ptr;
  39989. - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  39990. - if (SWIG_IsOK(res)) {
  39991. - // success code
  39992. - if (SWIG_IsNewObj(res) {
  39993. - ...
  39994. - delete *ptr;
  39995. - } else {
  39996. - ...
  39997. - }
  39998. - } else {
  39999. - // fail code
  40000. - }
  40001. -
  40002. - I.e., now SWIG_ConvertPtr can return new objects and you can
  40003. - identify the case and take care of the deallocation. Of course that
  40004. - also requires SWIG_ConvertPtr to return new result values, such as
  40005. -
  40006. - int SWIG_ConvertPtr(obj, ptr,...) {
  40007. - if (<obj is ok>) {
  40008. - if (<need new object>) {
  40009. - *ptr = <ptr to new allocated object>;
  40010. - return SWIG_NEWOBJ;
  40011. - } else {
  40012. - *ptr = <ptr to old object>;
  40013. - return SWIG_OLDOBJ;
  40014. - }
  40015. - } else {
  40016. - return SWIG_BADOBJ;
  40017. - }
  40018. - }
  40019. -
  40020. - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  40021. - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  40022. - SWIG errors code.
  40023. -
  40024. - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  40025. - allows to return the 'cast rank', for example, if you have this
  40026. -
  40027. - int food(double)
  40028. - int fooi(int);
  40029. -
  40030. - and you call
  40031. -
  40032. - food(1) // cast rank '1' (1 -> 1.0)
  40033. - fooi(1) // cast rank '0'
  40034. -
  40035. - just use the SWIG_AddCast()/SWIG_CheckState()
  40036. -*/
  40037. -
  40038. -#define SWIG_OK (0)
  40039. -#define SWIG_ERROR (-1)
  40040. -#define SWIG_IsOK(r) (r >= 0)
  40041. -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  40042. -
  40043. -/* The CastRankLimit says how many bits are used for the cast rank */
  40044. -#define SWIG_CASTRANKLIMIT (1 << 8)
  40045. -/* The NewMask denotes the object was created (using new/malloc) */
  40046. -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  40047. -/* The TmpMask is for in/out typemaps that use temporal objects */
  40048. -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  40049. -/* Simple returning values */
  40050. -#define SWIG_BADOBJ (SWIG_ERROR)
  40051. -#define SWIG_OLDOBJ (SWIG_OK)
  40052. -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  40053. -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  40054. -/* Check, add and del mask methods */
  40055. -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  40056. -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  40057. -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  40058. -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  40059. -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  40060. -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  40061. -
  40062. -/* Cast-Rank Mode */
  40063. -#if defined(SWIG_CASTRANK_MODE)
  40064. -# ifndef SWIG_TypeRank
  40065. -# define SWIG_TypeRank unsigned long
  40066. -# endif
  40067. -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  40068. -# define SWIG_MAXCASTRANK (2)
  40069. -# endif
  40070. -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  40071. -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  40072. -SWIGINTERNINLINE int SWIG_AddCast(int r) {
  40073. - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  40074. -}
  40075. -SWIGINTERNINLINE int SWIG_CheckState(int r) {
  40076. - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  40077. -}
  40078. -#else /* no cast-rank mode */
  40079. -# define SWIG_AddCast(r) (r)
  40080. -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  40081. -#endif
  40082. -
  40083. -
  40084. -#include <string.h>
  40085. -
  40086. -#ifdef __cplusplus
  40087. -extern "C" {
  40088. -#endif
  40089. -
  40090. -typedef void *(*swig_converter_func)(void *, int *);
  40091. -typedef struct swig_type_info *(*swig_dycast_func)(void **);
  40092. -
  40093. -/* Structure to store information on one type */
  40094. -typedef struct swig_type_info {
  40095. - const char *name; /* mangled name of this type */
  40096. - const char *str; /* human readable name of this type */
  40097. - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  40098. - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  40099. - void *clientdata; /* language specific type data */
  40100. - int owndata; /* flag if the structure owns the clientdata */
  40101. -} swig_type_info;
  40102. -
  40103. -/* Structure to store a type and conversion function used for casting */
  40104. -typedef struct swig_cast_info {
  40105. - swig_type_info *type; /* pointer to type that is equivalent to this type */
  40106. - swig_converter_func converter; /* function to cast the void pointers */
  40107. - struct swig_cast_info *next; /* pointer to next cast in linked list */
  40108. - struct swig_cast_info *prev; /* pointer to the previous cast */
  40109. -} swig_cast_info;
  40110. -
  40111. -/* Structure used to store module information
  40112. - * Each module generates one structure like this, and the runtime collects
  40113. - * all of these structures and stores them in a circularly linked list.*/
  40114. -typedef struct swig_module_info {
  40115. - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  40116. - size_t size; /* Number of types in this module */
  40117. - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  40118. - swig_type_info **type_initial; /* Array of initially generated type structures */
  40119. - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  40120. - void *clientdata; /* Language specific module data */
  40121. -} swig_module_info;
  40122. -
  40123. -/*
  40124. - Compare two type names skipping the space characters, therefore
  40125. - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  40126. -
  40127. - Return 0 when the two name types are equivalent, as in
  40128. - strncmp, but skipping ' '.
  40129. -*/
  40130. -SWIGRUNTIME int
  40131. -SWIG_TypeNameComp(const char *f1, const char *l1,
  40132. - const char *f2, const char *l2) {
  40133. - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  40134. - while ((*f1 == ' ') && (f1 != l1)) ++f1;
  40135. - while ((*f2 == ' ') && (f2 != l2)) ++f2;
  40136. - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  40137. - }
  40138. - return (int)((l1 - f1) - (l2 - f2));
  40139. -}
  40140. -
  40141. -/*
  40142. - Check type equivalence in a name list like <name1>|<name2>|...
  40143. - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  40144. -*/
  40145. -SWIGRUNTIME int
  40146. -SWIG_TypeCmp(const char *nb, const char *tb) {
  40147. - int equiv = 1;
  40148. - const char* te = tb + strlen(tb);
  40149. - const char* ne = nb;
  40150. - while (equiv != 0 && *ne) {
  40151. - for (nb = ne; *ne; ++ne) {
  40152. - if (*ne == '|') break;
  40153. - }
  40154. - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  40155. - if (*ne) ++ne;
  40156. - }
  40157. - return equiv;
  40158. -}
  40159. -
  40160. -/*
  40161. - Check type equivalence in a name list like <name1>|<name2>|...
  40162. - Return 0 if not equal, 1 if equal
  40163. -*/
  40164. -SWIGRUNTIME int
  40165. -SWIG_TypeEquiv(const char *nb, const char *tb) {
  40166. - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  40167. -}
  40168. -
  40169. -/*
  40170. - Check the typename
  40171. -*/
  40172. -SWIGRUNTIME swig_cast_info *
  40173. -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  40174. - if (ty) {
  40175. - swig_cast_info *iter = ty->cast;
  40176. - while (iter) {
  40177. - if (strcmp(iter->type->name, c) == 0) {
  40178. - if (iter == ty->cast)
  40179. - return iter;
  40180. - /* Move iter to the top of the linked list */
  40181. - iter->prev->next = iter->next;
  40182. - if (iter->next)
  40183. - iter->next->prev = iter->prev;
  40184. - iter->next = ty->cast;
  40185. - iter->prev = 0;
  40186. - if (ty->cast) ty->cast->prev = iter;
  40187. - ty->cast = iter;
  40188. - return iter;
  40189. - }
  40190. - iter = iter->next;
  40191. - }
  40192. - }
  40193. - return 0;
  40194. -}
  40195. -
  40196. -/*
  40197. - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  40198. -*/
  40199. -SWIGRUNTIME swig_cast_info *
  40200. -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  40201. - if (ty) {
  40202. - swig_cast_info *iter = ty->cast;
  40203. - while (iter) {
  40204. - if (iter->type == from) {
  40205. - if (iter == ty->cast)
  40206. - return iter;
  40207. - /* Move iter to the top of the linked list */
  40208. - iter->prev->next = iter->next;
  40209. - if (iter->next)
  40210. - iter->next->prev = iter->prev;
  40211. - iter->next = ty->cast;
  40212. - iter->prev = 0;
  40213. - if (ty->cast) ty->cast->prev = iter;
  40214. - ty->cast = iter;
  40215. - return iter;
  40216. - }
  40217. - iter = iter->next;
  40218. - }
  40219. - }
  40220. - return 0;
  40221. -}
  40222. -
  40223. -/*
  40224. - Cast a pointer up an inheritance hierarchy
  40225. -*/
  40226. -SWIGRUNTIMEINLINE void *
  40227. -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  40228. - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  40229. -}
  40230. -
  40231. -/*
  40232. - Dynamic pointer casting. Down an inheritance hierarchy
  40233. -*/
  40234. -SWIGRUNTIME swig_type_info *
  40235. -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  40236. - swig_type_info *lastty = ty;
  40237. - if (!ty || !ty->dcast) return ty;
  40238. - while (ty && (ty->dcast)) {
  40239. - ty = (*ty->dcast)(ptr);
  40240. - if (ty) lastty = ty;
  40241. - }
  40242. - return lastty;
  40243. -}
  40244. -
  40245. -/*
  40246. - Return the name associated with this type
  40247. -*/
  40248. -SWIGRUNTIMEINLINE const char *
  40249. -SWIG_TypeName(const swig_type_info *ty) {
  40250. - return ty->name;
  40251. -}
  40252. -
  40253. -/*
  40254. - Return the pretty name associated with this type,
  40255. - that is an unmangled type name in a form presentable to the user.
  40256. -*/
  40257. -SWIGRUNTIME const char *
  40258. -SWIG_TypePrettyName(const swig_type_info *type) {
  40259. - /* The "str" field contains the equivalent pretty names of the
  40260. - type, separated by vertical-bar characters. We choose
  40261. - to print the last name, as it is often (?) the most
  40262. - specific. */
  40263. - if (!type) return NULL;
  40264. - if (type->str != NULL) {
  40265. - const char *last_name = type->str;
  40266. - const char *s;
  40267. - for (s = type->str; *s; s++)
  40268. - if (*s == '|') last_name = s+1;
  40269. - return last_name;
  40270. - }
  40271. - else
  40272. - return type->name;
  40273. -}
  40274. -
  40275. -/*
  40276. - Set the clientdata field for a type
  40277. -*/
  40278. -SWIGRUNTIME void
  40279. -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  40280. - swig_cast_info *cast = ti->cast;
  40281. - /* if (ti->clientdata == clientdata) return; */
  40282. - ti->clientdata = clientdata;
  40283. -
  40284. - while (cast) {
  40285. - if (!cast->converter) {
  40286. - swig_type_info *tc = cast->type;
  40287. - if (!tc->clientdata) {
  40288. - SWIG_TypeClientData(tc, clientdata);
  40289. - }
  40290. - }
  40291. - cast = cast->next;
  40292. - }
  40293. -}
  40294. -SWIGRUNTIME void
  40295. -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  40296. - SWIG_TypeClientData(ti, clientdata);
  40297. - ti->owndata = 1;
  40298. -}
  40299. -
  40300. -/*
  40301. - Search for a swig_type_info structure only by mangled name
  40302. - Search is a O(log #types)
  40303. -
  40304. - We start searching at module start, and finish searching when start == end.
  40305. - Note: if start == end at the beginning of the function, we go all the way around
  40306. - the circular list.
  40307. -*/
  40308. -SWIGRUNTIME swig_type_info *
  40309. -SWIG_MangledTypeQueryModule(swig_module_info *start,
  40310. - swig_module_info *end,
  40311. - const char *name) {
  40312. - swig_module_info *iter = start;
  40313. - do {
  40314. - if (iter->size) {
  40315. - register size_t l = 0;
  40316. - register size_t r = iter->size - 1;
  40317. - do {
  40318. - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  40319. - register size_t i = (l + r) >> 1;
  40320. - const char *iname = iter->types[i]->name;
  40321. - if (iname) {
  40322. - register int compare = strcmp(name, iname);
  40323. - if (compare == 0) {
  40324. - return iter->types[i];
  40325. - } else if (compare < 0) {
  40326. - if (i) {
  40327. - r = i - 1;
  40328. - } else {
  40329. - break;
  40330. - }
  40331. - } else if (compare > 0) {
  40332. - l = i + 1;
  40333. - }
  40334. - } else {
  40335. - break; /* should never happen */
  40336. - }
  40337. - } while (l <= r);
  40338. - }
  40339. - iter = iter->next;
  40340. - } while (iter != end);
  40341. - return 0;
  40342. -}
  40343. -
  40344. -/*
  40345. - Search for a swig_type_info structure for either a mangled name or a human readable name.
  40346. - It first searches the mangled names of the types, which is a O(log #types)
  40347. - If a type is not found it then searches the human readable names, which is O(#types).
  40348. -
  40349. - We start searching at module start, and finish searching when start == end.
  40350. - Note: if start == end at the beginning of the function, we go all the way around
  40351. - the circular list.
  40352. -*/
  40353. -SWIGRUNTIME swig_type_info *
  40354. -SWIG_TypeQueryModule(swig_module_info *start,
  40355. - swig_module_info *end,
  40356. - const char *name) {
  40357. - /* STEP 1: Search the name field using binary search */
  40358. - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  40359. - if (ret) {
  40360. - return ret;
  40361. - } else {
  40362. - /* STEP 2: If the type hasn't been found, do a complete search
  40363. - of the str field (the human readable name) */
  40364. - swig_module_info *iter = start;
  40365. - do {
  40366. - register size_t i = 0;
  40367. - for (; i < iter->size; ++i) {
  40368. - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  40369. - return iter->types[i];
  40370. - }
  40371. - iter = iter->next;
  40372. - } while (iter != end);
  40373. - }
  40374. -
  40375. - /* neither found a match */
  40376. - return 0;
  40377. -}
  40378. -
  40379. -/*
  40380. - Pack binary data into a string
  40381. -*/
  40382. -SWIGRUNTIME char *
  40383. -SWIG_PackData(char *c, void *ptr, size_t sz) {
  40384. - static const char hex[17] = "0123456789abcdef";
  40385. - register const unsigned char *u = (unsigned char *) ptr;
  40386. - register const unsigned char *eu = u + sz;
  40387. - for (; u != eu; ++u) {
  40388. - register unsigned char uu = *u;
  40389. - *(c++) = hex[(uu & 0xf0) >> 4];
  40390. - *(c++) = hex[uu & 0xf];
  40391. - }
  40392. - return c;
  40393. -}
  40394. -
  40395. -/*
  40396. - Unpack binary data from a string
  40397. -*/
  40398. -SWIGRUNTIME const char *
  40399. -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  40400. - register unsigned char *u = (unsigned char *) ptr;
  40401. - register const unsigned char *eu = u + sz;
  40402. - for (; u != eu; ++u) {
  40403. - register char d = *(c++);
  40404. - register unsigned char uu;
  40405. - if ((d >= '0') && (d <= '9'))
  40406. - uu = ((d - '0') << 4);
  40407. - else if ((d >= 'a') && (d <= 'f'))
  40408. - uu = ((d - ('a'-10)) << 4);
  40409. - else
  40410. - return (char *) 0;
  40411. - d = *(c++);
  40412. - if ((d >= '0') && (d <= '9'))
  40413. - uu |= (d - '0');
  40414. - else if ((d >= 'a') && (d <= 'f'))
  40415. - uu |= (d - ('a'-10));
  40416. - else
  40417. - return (char *) 0;
  40418. - *u = uu;
  40419. - }
  40420. - return c;
  40421. -}
  40422. -
  40423. -/*
  40424. - Pack 'void *' into a string buffer.
  40425. -*/
  40426. -SWIGRUNTIME char *
  40427. -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  40428. - char *r = buff;
  40429. - if ((2*sizeof(void *) + 2) > bsz) return 0;
  40430. - *(r++) = '_';
  40431. - r = SWIG_PackData(r,&ptr,sizeof(void *));
  40432. - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  40433. - strcpy(r,name);
  40434. - return buff;
  40435. -}
  40436. -
  40437. -SWIGRUNTIME const char *
  40438. -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  40439. - if (*c != '_') {
  40440. - if (strcmp(c,"NULL") == 0) {
  40441. - *ptr = (void *) 0;
  40442. - return name;
  40443. - } else {
  40444. - return 0;
  40445. - }
  40446. - }
  40447. - return SWIG_UnpackData(++c,ptr,sizeof(void *));
  40448. -}
  40449. -
  40450. -SWIGRUNTIME char *
  40451. -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  40452. - char *r = buff;
  40453. - size_t lname = (name ? strlen(name) : 0);
  40454. - if ((2*sz + 2 + lname) > bsz) return 0;
  40455. - *(r++) = '_';
  40456. - r = SWIG_PackData(r,ptr,sz);
  40457. - if (lname) {
  40458. - strncpy(r,name,lname+1);
  40459. - } else {
  40460. - *r = 0;
  40461. - }
  40462. - return buff;
  40463. -}
  40464. -
  40465. -SWIGRUNTIME const char *
  40466. -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  40467. - if (*c != '_') {
  40468. - if (strcmp(c,"NULL") == 0) {
  40469. - memset(ptr,0,sz);
  40470. - return name;
  40471. - } else {
  40472. - return 0;
  40473. - }
  40474. - }
  40475. - return SWIG_UnpackData(++c,ptr,sz);
  40476. -}
  40477. -
  40478. -#ifdef __cplusplus
  40479. -}
  40480. -#endif
  40481. -
  40482. -/* Errors in SWIG */
  40483. -#define SWIG_UnknownError -1
  40484. -#define SWIG_IOError -2
  40485. -#define SWIG_RuntimeError -3
  40486. -#define SWIG_IndexError -4
  40487. -#define SWIG_TypeError -5
  40488. -#define SWIG_DivisionByZero -6
  40489. -#define SWIG_OverflowError -7
  40490. -#define SWIG_SyntaxError -8
  40491. -#define SWIG_ValueError -9
  40492. -#define SWIG_SystemError -10
  40493. -#define SWIG_AttributeError -11
  40494. -#define SWIG_MemoryError -12
  40495. -#define SWIG_NullReferenceError -13
  40496. -
  40497. -
  40498. -
  40499. -/* Compatibility macros for Python 3 */
  40500. -#if PY_VERSION_HEX >= 0x03000000
  40501. -
  40502. -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  40503. -#define PyInt_Check(x) PyLong_Check(x)
  40504. -#define PyInt_AsLong(x) PyLong_AsLong(x)
  40505. -#define PyInt_FromLong(x) PyLong_FromLong(x)
  40506. -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  40507. -#define PyString_Check(name) PyBytes_Check(name)
  40508. -#define PyString_FromString(x) PyUnicode_FromString(x)
  40509. -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  40510. -#define PyString_AsString(str) PyBytes_AsString(str)
  40511. -#define PyString_Size(str) PyBytes_Size(str)
  40512. -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  40513. -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  40514. -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  40515. -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  40516. -
  40517. -#endif
  40518. -
  40519. -#ifndef Py_TYPE
  40520. -# define Py_TYPE(op) ((op)->ob_type)
  40521. -#endif
  40522. -
  40523. -/* SWIG APIs for compatibility of both Python 2 & 3 */
  40524. -
  40525. -#if PY_VERSION_HEX >= 0x03000000
  40526. -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  40527. -#else
  40528. -# define SWIG_Python_str_FromFormat PyString_FromFormat
  40529. -#endif
  40530. -
  40531. -
  40532. -/* Warning: This function will allocate a new string in Python 3,
  40533. - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  40534. - */
  40535. -SWIGINTERN char*
  40536. -SWIG_Python_str_AsChar(PyObject *str)
  40537. -{
  40538. -#if PY_VERSION_HEX >= 0x03000000
  40539. - char *cstr;
  40540. - char *newstr;
  40541. - Py_ssize_t len;
  40542. - str = PyUnicode_AsUTF8String(str);
  40543. - PyBytes_AsStringAndSize(str, &cstr, &len);
  40544. - newstr = (char *) malloc(len+1);
  40545. - memcpy(newstr, cstr, len+1);
  40546. - Py_XDECREF(str);
  40547. - return newstr;
  40548. -#else
  40549. - return PyString_AsString(str);
  40550. -#endif
  40551. -}
  40552. -
  40553. -#if PY_VERSION_HEX >= 0x03000000
  40554. -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  40555. -#else
  40556. -# define SWIG_Python_str_DelForPy3(x)
  40557. -#endif
  40558. -
  40559. -
  40560. -SWIGINTERN PyObject*
  40561. -SWIG_Python_str_FromChar(const char *c)
  40562. -{
  40563. -#if PY_VERSION_HEX >= 0x03000000
  40564. - return PyUnicode_FromString(c);
  40565. -#else
  40566. - return PyString_FromString(c);
  40567. -#endif
  40568. -}
  40569. -
  40570. -/* Add PyOS_snprintf for old Pythons */
  40571. -#if PY_VERSION_HEX < 0x02020000
  40572. -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
  40573. -# define PyOS_snprintf _snprintf
  40574. -# else
  40575. -# define PyOS_snprintf snprintf
  40576. -# endif
  40577. -#endif
  40578. -
  40579. -/* A crude PyString_FromFormat implementation for old Pythons */
  40580. -#if PY_VERSION_HEX < 0x02020000
  40581. -
  40582. -#ifndef SWIG_PYBUFFER_SIZE
  40583. -# define SWIG_PYBUFFER_SIZE 1024
  40584. -#endif
  40585. -
  40586. -static PyObject *
  40587. -PyString_FromFormat(const char *fmt, ...) {
  40588. - va_list ap;
  40589. - char buf[SWIG_PYBUFFER_SIZE * 2];
  40590. - int res;
  40591. - va_start(ap, fmt);
  40592. - res = vsnprintf(buf, sizeof(buf), fmt, ap);
  40593. - va_end(ap);
  40594. - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
  40595. -}
  40596. -#endif
  40597. -
  40598. -/* Add PyObject_Del for old Pythons */
  40599. -#if PY_VERSION_HEX < 0x01060000
  40600. -# define PyObject_Del(op) PyMem_DEL((op))
  40601. -#endif
  40602. -#ifndef PyObject_DEL
  40603. -# define PyObject_DEL PyObject_Del
  40604. -#endif
  40605. -
  40606. -/* A crude PyExc_StopIteration exception for old Pythons */
  40607. -#if PY_VERSION_HEX < 0x02020000
  40608. -# ifndef PyExc_StopIteration
  40609. -# define PyExc_StopIteration PyExc_RuntimeError
  40610. -# endif
  40611. -# ifndef PyObject_GenericGetAttr
  40612. -# define PyObject_GenericGetAttr 0
  40613. -# endif
  40614. -#endif
  40615. -
  40616. -/* Py_NotImplemented is defined in 2.1 and up. */
  40617. -#if PY_VERSION_HEX < 0x02010000
  40618. -# ifndef Py_NotImplemented
  40619. -# define Py_NotImplemented PyExc_RuntimeError
  40620. -# endif
  40621. -#endif
  40622. -
  40623. -/* A crude PyString_AsStringAndSize implementation for old Pythons */
  40624. -#if PY_VERSION_HEX < 0x02010000
  40625. -# ifndef PyString_AsStringAndSize
  40626. -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
  40627. -# endif
  40628. -#endif
  40629. -
  40630. -/* PySequence_Size for old Pythons */
  40631. -#if PY_VERSION_HEX < 0x02000000
  40632. -# ifndef PySequence_Size
  40633. -# define PySequence_Size PySequence_Length
  40634. -# endif
  40635. -#endif
  40636. -
  40637. -/* PyBool_FromLong for old Pythons */
  40638. -#if PY_VERSION_HEX < 0x02030000
  40639. -static
  40640. -PyObject *PyBool_FromLong(long ok)
  40641. -{
  40642. - PyObject *result = ok ? Py_True : Py_False;
  40643. - Py_INCREF(result);
  40644. - return result;
  40645. -}
  40646. -#endif
  40647. -
  40648. -/* Py_ssize_t for old Pythons */
  40649. -/* This code is as recommended by: */
  40650. -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
  40651. -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
  40652. -typedef int Py_ssize_t;
  40653. -# define PY_SSIZE_T_MAX INT_MAX
  40654. -# define PY_SSIZE_T_MIN INT_MIN
  40655. -typedef inquiry lenfunc;
  40656. -typedef intargfunc ssizeargfunc;
  40657. -typedef intintargfunc ssizessizeargfunc;
  40658. -typedef intobjargproc ssizeobjargproc;
  40659. -typedef intintobjargproc ssizessizeobjargproc;
  40660. -typedef getreadbufferproc readbufferproc;
  40661. -typedef getwritebufferproc writebufferproc;
  40662. -typedef getsegcountproc segcountproc;
  40663. -typedef getcharbufferproc charbufferproc;
  40664. -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  40665. -{
  40666. - long result = 0;
  40667. - PyObject *i = PyNumber_Int(x);
  40668. - if (i) {
  40669. - result = PyInt_AsLong(i);
  40670. - Py_DECREF(i);
  40671. - }
  40672. - return result;
  40673. -}
  40674. -#endif
  40675. -
  40676. -#if PY_VERSION_HEX < 0x02050000
  40677. -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
  40678. -#endif
  40679. -
  40680. -#if PY_VERSION_HEX < 0x02040000
  40681. -#define Py_VISIT(op) \
  40682. - do { \
  40683. - if (op) { \
  40684. - int vret = visit((op), arg); \
  40685. - if (vret) \
  40686. - return vret; \
  40687. - } \
  40688. - } while (0)
  40689. -#endif
  40690. -
  40691. -#if PY_VERSION_HEX < 0x02030000
  40692. -typedef struct {
  40693. - PyTypeObject type;
  40694. - PyNumberMethods as_number;
  40695. - PyMappingMethods as_mapping;
  40696. - PySequenceMethods as_sequence;
  40697. - PyBufferProcs as_buffer;
  40698. - PyObject *name, *slots;
  40699. -} PyHeapTypeObject;
  40700. -#endif
  40701. -
  40702. -#if PY_VERSION_HEX < 0x02030000
  40703. -typedef destructor freefunc;
  40704. -#endif
  40705. -
  40706. -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
  40707. - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
  40708. - (PY_MAJOR_VERSION > 3))
  40709. -# define SWIGPY_USE_CAPSULE
  40710. -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  40711. -#endif
  40712. -
  40713. -#if PY_VERSION_HEX < 0x03020000
  40714. -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  40715. -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  40716. -#endif
  40717. -
  40718. -/* -----------------------------------------------------------------------------
  40719. - * error manipulation
  40720. - * ----------------------------------------------------------------------------- */
  40721. -
  40722. -SWIGRUNTIME PyObject*
  40723. -SWIG_Python_ErrorType(int code) {
  40724. - PyObject* type = 0;
  40725. - switch(code) {
  40726. - case SWIG_MemoryError:
  40727. - type = PyExc_MemoryError;
  40728. - break;
  40729. - case SWIG_IOError:
  40730. - type = PyExc_IOError;
  40731. - break;
  40732. - case SWIG_RuntimeError:
  40733. - type = PyExc_RuntimeError;
  40734. - break;
  40735. - case SWIG_IndexError:
  40736. - type = PyExc_IndexError;
  40737. - break;
  40738. - case SWIG_TypeError:
  40739. - type = PyExc_TypeError;
  40740. - break;
  40741. - case SWIG_DivisionByZero:
  40742. - type = PyExc_ZeroDivisionError;
  40743. - break;
  40744. - case SWIG_OverflowError:
  40745. - type = PyExc_OverflowError;
  40746. - break;
  40747. - case SWIG_SyntaxError:
  40748. - type = PyExc_SyntaxError;
  40749. - break;
  40750. - case SWIG_ValueError:
  40751. - type = PyExc_ValueError;
  40752. - break;
  40753. - case SWIG_SystemError:
  40754. - type = PyExc_SystemError;
  40755. - break;
  40756. - case SWIG_AttributeError:
  40757. - type = PyExc_AttributeError;
  40758. - break;
  40759. - default:
  40760. - type = PyExc_RuntimeError;
  40761. - }
  40762. - return type;
  40763. -}
  40764. -
  40765. -
  40766. -SWIGRUNTIME void
  40767. -SWIG_Python_AddErrorMsg(const char* mesg)
  40768. -{
  40769. - PyObject *type = 0;
  40770. - PyObject *value = 0;
  40771. - PyObject *traceback = 0;
  40772. -
  40773. - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  40774. - if (value) {
  40775. - char *tmp;
  40776. - PyObject *old_str = PyObject_Str(value);
  40777. - PyErr_Clear();
  40778. - Py_XINCREF(type);
  40779. -
  40780. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  40781. - SWIG_Python_str_DelForPy3(tmp);
  40782. - Py_DECREF(old_str);
  40783. - Py_DECREF(value);
  40784. - } else {
  40785. - PyErr_SetString(PyExc_RuntimeError, mesg);
  40786. - }
  40787. -}
  40788. -
  40789. -#if defined(SWIG_PYTHON_NO_THREADS)
  40790. -# if defined(SWIG_PYTHON_THREADS)
  40791. -# undef SWIG_PYTHON_THREADS
  40792. -# endif
  40793. -#endif
  40794. -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  40795. -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  40796. -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
  40797. -# define SWIG_PYTHON_USE_GIL
  40798. -# endif
  40799. -# endif
  40800. -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  40801. -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
  40802. -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  40803. -# endif
  40804. -# ifdef __cplusplus /* C++ code */
  40805. - class SWIG_Python_Thread_Block {
  40806. - bool status;
  40807. - PyGILState_STATE state;
  40808. - public:
  40809. - void end() { if (status) { PyGILState_Release(state); status = false;} }
  40810. - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  40811. - ~SWIG_Python_Thread_Block() { end(); }
  40812. - };
  40813. - class SWIG_Python_Thread_Allow {
  40814. - bool status;
  40815. - PyThreadState *save;
  40816. - public:
  40817. - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  40818. - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  40819. - ~SWIG_Python_Thread_Allow() { end(); }
  40820. - };
  40821. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  40822. -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  40823. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  40824. -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  40825. -# else /* C code */
  40826. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  40827. -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  40828. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  40829. -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  40830. -# endif
  40831. -# else /* Old thread way, not implemented, user must provide it */
  40832. -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  40833. -# define SWIG_PYTHON_INITIALIZE_THREADS
  40834. -# endif
  40835. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  40836. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  40837. -# endif
  40838. -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  40839. -# define SWIG_PYTHON_THREAD_END_BLOCK
  40840. -# endif
  40841. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  40842. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  40843. -# endif
  40844. -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  40845. -# define SWIG_PYTHON_THREAD_END_ALLOW
  40846. -# endif
  40847. -# endif
  40848. -#else /* No thread support */
  40849. -# define SWIG_PYTHON_INITIALIZE_THREADS
  40850. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  40851. -# define SWIG_PYTHON_THREAD_END_BLOCK
  40852. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  40853. -# define SWIG_PYTHON_THREAD_END_ALLOW
  40854. -#endif
  40855. -
  40856. -/* -----------------------------------------------------------------------------
  40857. - * Python API portion that goes into the runtime
  40858. - * ----------------------------------------------------------------------------- */
  40859. -
  40860. -#ifdef __cplusplus
  40861. -extern "C" {
  40862. -#endif
  40863. -
  40864. -/* -----------------------------------------------------------------------------
  40865. - * Constant declarations
  40866. - * ----------------------------------------------------------------------------- */
  40867. -
  40868. -/* Constant Types */
  40869. -#define SWIG_PY_POINTER 4
  40870. -#define SWIG_PY_BINARY 5
  40871. -
  40872. -/* Constant information structure */
  40873. -typedef struct swig_const_info {
  40874. - int type;
  40875. - char *name;
  40876. - long lvalue;
  40877. - double dvalue;
  40878. - void *pvalue;
  40879. - swig_type_info **ptype;
  40880. -} swig_const_info;
  40881. -
  40882. -
  40883. -/* -----------------------------------------------------------------------------
  40884. - * Wrapper of PyInstanceMethod_New() used in Python 3
  40885. - * It is exported to the generated module, used for -fastproxy
  40886. - * ----------------------------------------------------------------------------- */
  40887. -#if PY_VERSION_HEX >= 0x03000000
  40888. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
  40889. -{
  40890. - return PyInstanceMethod_New(func);
  40891. -}
  40892. -#else
  40893. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
  40894. -{
  40895. - return NULL;
  40896. -}
  40897. -#endif
  40898. -
  40899. -#ifdef __cplusplus
  40900. -}
  40901. -#endif
  40902. -
  40903. -
  40904. -/* -----------------------------------------------------------------------------
  40905. - * pyrun.swg
  40906. - *
  40907. - * This file contains the runtime support for Python modules
  40908. - * and includes code for managing global variables and pointer
  40909. - * type checking.
  40910. - *
  40911. - * ----------------------------------------------------------------------------- */
  40912. -
  40913. -/* Common SWIG API */
  40914. -
  40915. -/* for raw pointers */
  40916. -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  40917. -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  40918. -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  40919. -
  40920. -#ifdef SWIGPYTHON_BUILTIN
  40921. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  40922. -#else
  40923. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  40924. -#endif
  40925. -
  40926. -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  40927. -
  40928. -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  40929. -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  40930. -#define swig_owntype int
  40931. -
  40932. -/* for raw packed data */
  40933. -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  40934. -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  40935. -
  40936. -/* for class or struct pointers */
  40937. -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  40938. -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  40939. -
  40940. -/* for C or C++ function pointers */
  40941. -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  40942. -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  40943. -
  40944. -/* for C++ member pointers, ie, member methods */
  40945. -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  40946. -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  40947. -
  40948. -
  40949. -/* Runtime API */
  40950. -
  40951. -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  40952. -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  40953. -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  40954. -
  40955. -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  40956. -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  40957. -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  40958. -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  40959. -#define SWIG_fail goto fail
  40960. -
  40961. -
  40962. -/* Runtime API implementation */
  40963. -
  40964. -/* Error manipulation */
  40965. -
  40966. -SWIGINTERN void
  40967. -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  40968. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  40969. - PyErr_SetObject(errtype, obj);
  40970. - Py_DECREF(obj);
  40971. - SWIG_PYTHON_THREAD_END_BLOCK;
  40972. -}
  40973. -
  40974. -SWIGINTERN void
  40975. -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  40976. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  40977. - PyErr_SetString(errtype, msg);
  40978. - SWIG_PYTHON_THREAD_END_BLOCK;
  40979. -}
  40980. -
  40981. -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  40982. -
  40983. -/* Set a constant value */
  40984. -
  40985. -#if defined(SWIGPYTHON_BUILTIN)
  40986. -
  40987. -SWIGINTERN void
  40988. -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  40989. - PyObject *s = PyString_InternFromString(key);
  40990. - PyList_Append(seq, s);
  40991. - Py_DECREF(s);
  40992. -}
  40993. -
  40994. -SWIGINTERN void
  40995. -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  40996. -#if PY_VERSION_HEX < 0x02030000
  40997. - PyDict_SetItemString(d, (char *)name, obj);
  40998. -#else
  40999. - PyDict_SetItemString(d, name, obj);
  41000. -#endif
  41001. - Py_DECREF(obj);
  41002. - if (public_interface)
  41003. - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  41004. -}
  41005. -
  41006. -#else
  41007. -
  41008. -SWIGINTERN void
  41009. -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  41010. -#if PY_VERSION_HEX < 0x02030000
  41011. - PyDict_SetItemString(d, (char *)name, obj);
  41012. -#else
  41013. - PyDict_SetItemString(d, name, obj);
  41014. -#endif
  41015. - Py_DECREF(obj);
  41016. -}
  41017. -
  41018. -#endif
  41019. -
  41020. -/* Append a value to the result obj */
  41021. -
  41022. -SWIGINTERN PyObject*
  41023. -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  41024. -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  41025. - if (!result) {
  41026. - result = obj;
  41027. - } else if (result == Py_None) {
  41028. - Py_DECREF(result);
  41029. - result = obj;
  41030. - } else {
  41031. - if (!PyList_Check(result)) {
  41032. - PyObject *o2 = result;
  41033. - result = PyList_New(1);
  41034. - PyList_SetItem(result, 0, o2);
  41035. - }
  41036. - PyList_Append(result,obj);
  41037. - Py_DECREF(obj);
  41038. - }
  41039. - return result;
  41040. -#else
  41041. - PyObject* o2;
  41042. - PyObject* o3;
  41043. - if (!result) {
  41044. - result = obj;
  41045. - } else if (result == Py_None) {
  41046. - Py_DECREF(result);
  41047. - result = obj;
  41048. - } else {
  41049. - if (!PyTuple_Check(result)) {
  41050. - o2 = result;
  41051. - result = PyTuple_New(1);
  41052. - PyTuple_SET_ITEM(result, 0, o2);
  41053. - }
  41054. - o3 = PyTuple_New(1);
  41055. - PyTuple_SET_ITEM(o3, 0, obj);
  41056. - o2 = result;
  41057. - result = PySequence_Concat(o2, o3);
  41058. - Py_DECREF(o2);
  41059. - Py_DECREF(o3);
  41060. - }
  41061. - return result;
  41062. -#endif
  41063. -}
  41064. -
  41065. -/* Unpack the argument tuple */
  41066. -
  41067. -SWIGINTERN int
  41068. -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  41069. -{
  41070. - if (!args) {
  41071. - if (!min && !max) {
  41072. - return 1;
  41073. - } else {
  41074. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  41075. - name, (min == max ? "" : "at least "), (int)min);
  41076. - return 0;
  41077. - }
  41078. - }
  41079. - if (!PyTuple_Check(args)) {
  41080. - if (min <= 1 && max >= 1) {
  41081. - register int i;
  41082. - objs[0] = args;
  41083. - for (i = 1; i < max; ++i) {
  41084. - objs[i] = 0;
  41085. - }
  41086. - return 2;
  41087. - }
  41088. - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  41089. - return 0;
  41090. - } else {
  41091. - register Py_ssize_t l = PyTuple_GET_SIZE(args);
  41092. - if (l < min) {
  41093. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  41094. - name, (min == max ? "" : "at least "), (int)min, (int)l);
  41095. - return 0;
  41096. - } else if (l > max) {
  41097. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  41098. - name, (min == max ? "" : "at most "), (int)max, (int)l);
  41099. - return 0;
  41100. - } else {
  41101. - register int i;
  41102. - for (i = 0; i < l; ++i) {
  41103. - objs[i] = PyTuple_GET_ITEM(args, i);
  41104. - }
  41105. - for (; l < max; ++l) {
  41106. - objs[l] = 0;
  41107. - }
  41108. - return i + 1;
  41109. - }
  41110. - }
  41111. -}
  41112. -
  41113. -/* A functor is a function object with one single object argument */
  41114. -#if PY_VERSION_HEX >= 0x02020000
  41115. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  41116. -#else
  41117. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
  41118. -#endif
  41119. -
  41120. -/*
  41121. - Helper for static pointer initialization for both C and C++ code, for example
  41122. - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  41123. -*/
  41124. -#ifdef __cplusplus
  41125. -#define SWIG_STATIC_POINTER(var) var
  41126. -#else
  41127. -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  41128. -#endif
  41129. -
  41130. -/* -----------------------------------------------------------------------------
  41131. - * Pointer declarations
  41132. - * ----------------------------------------------------------------------------- */
  41133. -
  41134. -/* Flags for new pointer objects */
  41135. -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  41136. -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  41137. -
  41138. -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  41139. -
  41140. -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  41141. -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  41142. -
  41143. -#ifdef __cplusplus
  41144. -extern "C" {
  41145. -#endif
  41146. -
  41147. -/* How to access Py_None */
  41148. -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  41149. -# ifndef SWIG_PYTHON_NO_BUILD_NONE
  41150. -# ifndef SWIG_PYTHON_BUILD_NONE
  41151. -# define SWIG_PYTHON_BUILD_NONE
  41152. -# endif
  41153. -# endif
  41154. -#endif
  41155. -
  41156. -#ifdef SWIG_PYTHON_BUILD_NONE
  41157. -# ifdef Py_None
  41158. -# undef Py_None
  41159. -# define Py_None SWIG_Py_None()
  41160. -# endif
  41161. -SWIGRUNTIMEINLINE PyObject *
  41162. -_SWIG_Py_None(void)
  41163. -{
  41164. - PyObject *none = Py_BuildValue((char*)"");
  41165. - Py_DECREF(none);
  41166. - return none;
  41167. -}
  41168. -SWIGRUNTIME PyObject *
  41169. -SWIG_Py_None(void)
  41170. -{
  41171. - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  41172. - return none;
  41173. -}
  41174. -#endif
  41175. -
  41176. -/* The python void return value */
  41177. -
  41178. -SWIGRUNTIMEINLINE PyObject *
  41179. -SWIG_Py_Void(void)
  41180. -{
  41181. - PyObject *none = Py_None;
  41182. - Py_INCREF(none);
  41183. - return none;
  41184. -}
  41185. -
  41186. -/* SwigPyClientData */
  41187. -
  41188. -typedef struct {
  41189. - PyObject *klass;
  41190. - PyObject *newraw;
  41191. - PyObject *newargs;
  41192. - PyObject *destroy;
  41193. - int delargs;
  41194. - int implicitconv;
  41195. - PyTypeObject *pytype;
  41196. -} SwigPyClientData;
  41197. -
  41198. -SWIGRUNTIMEINLINE int
  41199. -SWIG_Python_CheckImplicit(swig_type_info *ty)
  41200. -{
  41201. - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  41202. - return data ? data->implicitconv : 0;
  41203. -}
  41204. -
  41205. -SWIGRUNTIMEINLINE PyObject *
  41206. -SWIG_Python_ExceptionType(swig_type_info *desc) {
  41207. - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  41208. - PyObject *klass = data ? data->klass : 0;
  41209. - return (klass ? klass : PyExc_RuntimeError);
  41210. -}
  41211. -
  41212. -
  41213. -SWIGRUNTIME SwigPyClientData *
  41214. -SwigPyClientData_New(PyObject* obj)
  41215. -{
  41216. - if (!obj) {
  41217. - return 0;
  41218. - } else {
  41219. - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  41220. - /* the klass element */
  41221. - data->klass = obj;
  41222. - Py_INCREF(data->klass);
  41223. - /* the newraw method and newargs arguments used to create a new raw instance */
  41224. - if (PyClass_Check(obj)) {
  41225. - data->newraw = 0;
  41226. - data->newargs = obj;
  41227. - Py_INCREF(obj);
  41228. - } else {
  41229. -#if (PY_VERSION_HEX < 0x02020000)
  41230. - data->newraw = 0;
  41231. -#else
  41232. - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
  41233. -#endif
  41234. - if (data->newraw) {
  41235. - Py_INCREF(data->newraw);
  41236. - data->newargs = PyTuple_New(1);
  41237. - PyTuple_SetItem(data->newargs, 0, obj);
  41238. - } else {
  41239. - data->newargs = obj;
  41240. - }
  41241. - Py_INCREF(data->newargs);
  41242. - }
  41243. - /* the destroy method, aka as the C++ delete method */
  41244. - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
  41245. - if (PyErr_Occurred()) {
  41246. - PyErr_Clear();
  41247. - data->destroy = 0;
  41248. - }
  41249. - if (data->destroy) {
  41250. - int flags;
  41251. - Py_INCREF(data->destroy);
  41252. - flags = PyCFunction_GET_FLAGS(data->destroy);
  41253. -#ifdef METH_O
  41254. - data->delargs = !(flags & (METH_O));
  41255. -#else
  41256. - data->delargs = 0;
  41257. -#endif
  41258. - } else {
  41259. - data->delargs = 0;
  41260. - }
  41261. - data->implicitconv = 0;
  41262. - data->pytype = 0;
  41263. - return data;
  41264. - }
  41265. -}
  41266. -
  41267. -SWIGRUNTIME void
  41268. -SwigPyClientData_Del(SwigPyClientData *data) {
  41269. - Py_XDECREF(data->newraw);
  41270. - Py_XDECREF(data->newargs);
  41271. - Py_XDECREF(data->destroy);
  41272. -}
  41273. -
  41274. -/* =============== SwigPyObject =====================*/
  41275. -
  41276. -typedef struct {
  41277. - PyObject_HEAD
  41278. - void *ptr;
  41279. - swig_type_info *ty;
  41280. - int own;
  41281. - PyObject *next;
  41282. -#ifdef SWIGPYTHON_BUILTIN
  41283. - PyObject *dict;
  41284. -#endif
  41285. -} SwigPyObject;
  41286. -
  41287. -SWIGRUNTIME PyObject *
  41288. -SwigPyObject_long(SwigPyObject *v)
  41289. -{
  41290. - return PyLong_FromVoidPtr(v->ptr);
  41291. -}
  41292. -
  41293. -SWIGRUNTIME PyObject *
  41294. -SwigPyObject_format(const char* fmt, SwigPyObject *v)
  41295. -{
  41296. - PyObject *res = NULL;
  41297. - PyObject *args = PyTuple_New(1);
  41298. - if (args) {
  41299. - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  41300. - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  41301. - if (ofmt) {
  41302. -#if PY_VERSION_HEX >= 0x03000000
  41303. - res = PyUnicode_Format(ofmt,args);
  41304. -#else
  41305. - res = PyString_Format(ofmt,args);
  41306. -#endif
  41307. - Py_DECREF(ofmt);
  41308. - }
  41309. - Py_DECREF(args);
  41310. - }
  41311. - }
  41312. - return res;
  41313. -}
  41314. -
  41315. -SWIGRUNTIME PyObject *
  41316. -SwigPyObject_oct(SwigPyObject *v)
  41317. -{
  41318. - return SwigPyObject_format("%o",v);
  41319. -}
  41320. -
  41321. -SWIGRUNTIME PyObject *
  41322. -SwigPyObject_hex(SwigPyObject *v)
  41323. -{
  41324. - return SwigPyObject_format("%x",v);
  41325. -}
  41326. -
  41327. -SWIGRUNTIME PyObject *
  41328. -#ifdef METH_NOARGS
  41329. -SwigPyObject_repr(SwigPyObject *v)
  41330. -#else
  41331. -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  41332. -#endif
  41333. -{
  41334. - const char *name = SWIG_TypePrettyName(v->ty);
  41335. - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  41336. - if (v->next) {
  41337. -# ifdef METH_NOARGS
  41338. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  41339. -# else
  41340. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
  41341. -# endif
  41342. -# if PY_VERSION_HEX >= 0x03000000
  41343. - PyObject *joined = PyUnicode_Concat(repr, nrep);
  41344. - Py_DecRef(repr);
  41345. - Py_DecRef(nrep);
  41346. - repr = joined;
  41347. -# else
  41348. - PyString_ConcatAndDel(&repr,nrep);
  41349. -# endif
  41350. - }
  41351. - return repr;
  41352. -}
  41353. -
  41354. -SWIGRUNTIME int
  41355. -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  41356. -{
  41357. - char *str;
  41358. -#ifdef METH_NOARGS
  41359. - PyObject *repr = SwigPyObject_repr(v);
  41360. -#else
  41361. - PyObject *repr = SwigPyObject_repr(v, NULL);
  41362. -#endif
  41363. - if (repr) {
  41364. - str = SWIG_Python_str_AsChar(repr);
  41365. - fputs(str, fp);
  41366. - SWIG_Python_str_DelForPy3(str);
  41367. - Py_DECREF(repr);
  41368. - return 0;
  41369. - } else {
  41370. - return 1;
  41371. - }
  41372. -}
  41373. -
  41374. -SWIGRUNTIME PyObject *
  41375. -SwigPyObject_str(SwigPyObject *v)
  41376. -{
  41377. - char result[SWIG_BUFFER_SIZE];
  41378. - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
  41379. - SWIG_Python_str_FromChar(result) : 0;
  41380. -}
  41381. -
  41382. -SWIGRUNTIME int
  41383. -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  41384. -{
  41385. - void *i = v->ptr;
  41386. - void *j = w->ptr;
  41387. - return (i < j) ? -1 : ((i > j) ? 1 : 0);
  41388. -}
  41389. -
  41390. -/* Added for Python 3.x, would it also be useful for Python 2.x? */
  41391. -SWIGRUNTIME PyObject*
  41392. -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  41393. -{
  41394. - PyObject* res;
  41395. - if( op != Py_EQ && op != Py_NE ) {
  41396. - Py_INCREF(Py_NotImplemented);
  41397. - return Py_NotImplemented;
  41398. - }
  41399. - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  41400. - return res;
  41401. -}
  41402. -
  41403. -
  41404. -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  41405. -
  41406. -#ifdef SWIGPYTHON_BUILTIN
  41407. -static swig_type_info *SwigPyObject_stype = 0;
  41408. -SWIGRUNTIME PyTypeObject*
  41409. -SwigPyObject_type(void) {
  41410. - SwigPyClientData *cd;
  41411. - assert(SwigPyObject_stype);
  41412. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  41413. - assert(cd);
  41414. - assert(cd->pytype);
  41415. - return cd->pytype;
  41416. -}
  41417. -#else
  41418. -SWIGRUNTIME PyTypeObject*
  41419. -SwigPyObject_type(void) {
  41420. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  41421. - return type;
  41422. -}
  41423. -#endif
  41424. -
  41425. -SWIGRUNTIMEINLINE int
  41426. -SwigPyObject_Check(PyObject *op) {
  41427. -#ifdef SWIGPYTHON_BUILTIN
  41428. - PyTypeObject *target_tp = SwigPyObject_type();
  41429. - if (PyType_IsSubtype(op->ob_type, target_tp))
  41430. - return 1;
  41431. - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  41432. -#else
  41433. - return (Py_TYPE(op) == SwigPyObject_type())
  41434. - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  41435. -#endif
  41436. -}
  41437. -
  41438. -SWIGRUNTIME PyObject *
  41439. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  41440. -
  41441. -SWIGRUNTIME void
  41442. -SwigPyObject_dealloc(PyObject *v)
  41443. -{
  41444. - SwigPyObject *sobj = (SwigPyObject *) v;
  41445. - PyObject *next = sobj->next;
  41446. - if (sobj->own == SWIG_POINTER_OWN) {
  41447. - swig_type_info *ty = sobj->ty;
  41448. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  41449. - PyObject *destroy = data ? data->destroy : 0;
  41450. - if (destroy) {
  41451. - /* destroy is always a VARARGS method */
  41452. - PyObject *res;
  41453. - if (data->delargs) {
  41454. - /* we need to create a temporary object to carry the destroy operation */
  41455. - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  41456. - res = SWIG_Python_CallFunctor(destroy, tmp);
  41457. - Py_DECREF(tmp);
  41458. - } else {
  41459. - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  41460. - PyObject *mself = PyCFunction_GET_SELF(destroy);
  41461. - res = ((*meth)(mself, v));
  41462. - }
  41463. - Py_XDECREF(res);
  41464. - }
  41465. -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  41466. - else {
  41467. - const char *name = SWIG_TypePrettyName(ty);
  41468. - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  41469. - }
  41470. -#endif
  41471. - }
  41472. - Py_XDECREF(next);
  41473. - PyObject_DEL(v);
  41474. -}
  41475. -
  41476. -SWIGRUNTIME PyObject*
  41477. -SwigPyObject_append(PyObject* v, PyObject* next)
  41478. -{
  41479. - SwigPyObject *sobj = (SwigPyObject *) v;
  41480. -#ifndef METH_O
  41481. - PyObject *tmp = 0;
  41482. - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  41483. - next = tmp;
  41484. -#endif
  41485. - if (!SwigPyObject_Check(next)) {
  41486. - return NULL;
  41487. - }
  41488. - sobj->next = next;
  41489. - Py_INCREF(next);
  41490. - return SWIG_Py_Void();
  41491. -}
  41492. -
  41493. -SWIGRUNTIME PyObject*
  41494. -#ifdef METH_NOARGS
  41495. -SwigPyObject_next(PyObject* v)
  41496. -#else
  41497. -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  41498. -#endif
  41499. -{
  41500. - SwigPyObject *sobj = (SwigPyObject *) v;
  41501. - if (sobj->next) {
  41502. - Py_INCREF(sobj->next);
  41503. - return sobj->next;
  41504. - } else {
  41505. - return SWIG_Py_Void();
  41506. - }
  41507. -}
  41508. -
  41509. -SWIGINTERN PyObject*
  41510. -#ifdef METH_NOARGS
  41511. -SwigPyObject_disown(PyObject *v)
  41512. -#else
  41513. -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  41514. -#endif
  41515. -{
  41516. - SwigPyObject *sobj = (SwigPyObject *)v;
  41517. - sobj->own = 0;
  41518. - return SWIG_Py_Void();
  41519. -}
  41520. -
  41521. -SWIGINTERN PyObject*
  41522. -#ifdef METH_NOARGS
  41523. -SwigPyObject_acquire(PyObject *v)
  41524. -#else
  41525. -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  41526. -#endif
  41527. -{
  41528. - SwigPyObject *sobj = (SwigPyObject *)v;
  41529. - sobj->own = SWIG_POINTER_OWN;
  41530. - return SWIG_Py_Void();
  41531. -}
  41532. -
  41533. -SWIGINTERN PyObject*
  41534. -SwigPyObject_own(PyObject *v, PyObject *args)
  41535. -{
  41536. - PyObject *val = 0;
  41537. -#if (PY_VERSION_HEX < 0x02020000)
  41538. - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
  41539. -#elif (PY_VERSION_HEX < 0x02050000)
  41540. - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
  41541. -#else
  41542. - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
  41543. -#endif
  41544. - {
  41545. - return NULL;
  41546. - }
  41547. - else
  41548. - {
  41549. - SwigPyObject *sobj = (SwigPyObject *)v;
  41550. - PyObject *obj = PyBool_FromLong(sobj->own);
  41551. - if (val) {
  41552. -#ifdef METH_NOARGS
  41553. - if (PyObject_IsTrue(val)) {
  41554. - SwigPyObject_acquire(v);
  41555. - } else {
  41556. - SwigPyObject_disown(v);
  41557. - }
  41558. -#else
  41559. - if (PyObject_IsTrue(val)) {
  41560. - SwigPyObject_acquire(v,args);
  41561. - } else {
  41562. - SwigPyObject_disown(v,args);
  41563. - }
  41564. -#endif
  41565. - }
  41566. - return obj;
  41567. - }
  41568. -}
  41569. -
  41570. -#ifdef METH_O
  41571. -static PyMethodDef
  41572. -swigobject_methods[] = {
  41573. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
  41574. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
  41575. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  41576. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
  41577. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
  41578. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
  41579. - {0, 0, 0, 0}
  41580. -};
  41581. -#else
  41582. -static PyMethodDef
  41583. -swigobject_methods[] = {
  41584. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
  41585. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
  41586. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  41587. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
  41588. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
  41589. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
  41590. - {0, 0, 0, 0}
  41591. -};
  41592. -#endif
  41593. -
  41594. -#if PY_VERSION_HEX < 0x02020000
  41595. -SWIGINTERN PyObject *
  41596. -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
  41597. -{
  41598. - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
  41599. -}
  41600. -#endif
  41601. -
  41602. -SWIGRUNTIME PyTypeObject*
  41603. -SwigPyObject_TypeOnce(void) {
  41604. - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  41605. -
  41606. - static PyNumberMethods SwigPyObject_as_number = {
  41607. - (binaryfunc)0, /*nb_add*/
  41608. - (binaryfunc)0, /*nb_subtract*/
  41609. - (binaryfunc)0, /*nb_multiply*/
  41610. - /* nb_divide removed in Python 3 */
  41611. -#if PY_VERSION_HEX < 0x03000000
  41612. - (binaryfunc)0, /*nb_divide*/
  41613. -#endif
  41614. - (binaryfunc)0, /*nb_remainder*/
  41615. - (binaryfunc)0, /*nb_divmod*/
  41616. - (ternaryfunc)0,/*nb_power*/
  41617. - (unaryfunc)0, /*nb_negative*/
  41618. - (unaryfunc)0, /*nb_positive*/
  41619. - (unaryfunc)0, /*nb_absolute*/
  41620. - (inquiry)0, /*nb_nonzero*/
  41621. - 0, /*nb_invert*/
  41622. - 0, /*nb_lshift*/
  41623. - 0, /*nb_rshift*/
  41624. - 0, /*nb_and*/
  41625. - 0, /*nb_xor*/
  41626. - 0, /*nb_or*/
  41627. -#if PY_VERSION_HEX < 0x03000000
  41628. - 0, /*nb_coerce*/
  41629. -#endif
  41630. - (unaryfunc)SwigPyObject_long, /*nb_int*/
  41631. -#if PY_VERSION_HEX < 0x03000000
  41632. - (unaryfunc)SwigPyObject_long, /*nb_long*/
  41633. -#else
  41634. - 0, /*nb_reserved*/
  41635. -#endif
  41636. - (unaryfunc)0, /*nb_float*/
  41637. -#if PY_VERSION_HEX < 0x03000000
  41638. - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  41639. - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  41640. -#endif
  41641. -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  41642. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  41643. -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
  41644. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  41645. -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
  41646. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
  41647. -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
  41648. - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
  41649. -#endif
  41650. - };
  41651. -
  41652. - static PyTypeObject swigpyobject_type;
  41653. - static int type_init = 0;
  41654. - if (!type_init) {
  41655. - const PyTypeObject tmp = {
  41656. - /* PyObject header changed in Python 3 */
  41657. -#if PY_VERSION_HEX >= 0x03000000
  41658. - PyVarObject_HEAD_INIT(NULL, 0)
  41659. -#else
  41660. - PyObject_HEAD_INIT(NULL)
  41661. - 0, /* ob_size */
  41662. -#endif
  41663. - (char *)"SwigPyObject", /* tp_name */
  41664. - sizeof(SwigPyObject), /* tp_basicsize */
  41665. - 0, /* tp_itemsize */
  41666. - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  41667. - (printfunc)SwigPyObject_print, /* tp_print */
  41668. -#if PY_VERSION_HEX < 0x02020000
  41669. - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
  41670. -#else
  41671. - (getattrfunc)0, /* tp_getattr */
  41672. -#endif
  41673. - (setattrfunc)0, /* tp_setattr */
  41674. -#if PY_VERSION_HEX >= 0x03000000
  41675. - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  41676. -#else
  41677. - (cmpfunc)SwigPyObject_compare, /* tp_compare */
  41678. -#endif
  41679. - (reprfunc)SwigPyObject_repr, /* tp_repr */
  41680. - &SwigPyObject_as_number, /* tp_as_number */
  41681. - 0, /* tp_as_sequence */
  41682. - 0, /* tp_as_mapping */
  41683. - (hashfunc)0, /* tp_hash */
  41684. - (ternaryfunc)0, /* tp_call */
  41685. - (reprfunc)SwigPyObject_str, /* tp_str */
  41686. - PyObject_GenericGetAttr, /* tp_getattro */
  41687. - 0, /* tp_setattro */
  41688. - 0, /* tp_as_buffer */
  41689. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  41690. - swigobject_doc, /* tp_doc */
  41691. - 0, /* tp_traverse */
  41692. - 0, /* tp_clear */
  41693. - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  41694. - 0, /* tp_weaklistoffset */
  41695. -#if PY_VERSION_HEX >= 0x02020000
  41696. - 0, /* tp_iter */
  41697. - 0, /* tp_iternext */
  41698. - swigobject_methods, /* tp_methods */
  41699. - 0, /* tp_members */
  41700. - 0, /* tp_getset */
  41701. - 0, /* tp_base */
  41702. - 0, /* tp_dict */
  41703. - 0, /* tp_descr_get */
  41704. - 0, /* tp_descr_set */
  41705. - 0, /* tp_dictoffset */
  41706. - 0, /* tp_init */
  41707. - 0, /* tp_alloc */
  41708. - 0, /* tp_new */
  41709. - 0, /* tp_free */
  41710. - 0, /* tp_is_gc */
  41711. - 0, /* tp_bases */
  41712. - 0, /* tp_mro */
  41713. - 0, /* tp_cache */
  41714. - 0, /* tp_subclasses */
  41715. - 0, /* tp_weaklist */
  41716. -#endif
  41717. -#if PY_VERSION_HEX >= 0x02030000
  41718. - 0, /* tp_del */
  41719. -#endif
  41720. -#if PY_VERSION_HEX >= 0x02060000
  41721. - 0, /* tp_version */
  41722. -#endif
  41723. -#ifdef COUNT_ALLOCS
  41724. - 0,0,0,0 /* tp_alloc -> tp_next */
  41725. -#endif
  41726. - };
  41727. - swigpyobject_type = tmp;
  41728. - type_init = 1;
  41729. -#if PY_VERSION_HEX < 0x02020000
  41730. - swigpyobject_type.ob_type = &PyType_Type;
  41731. -#else
  41732. - if (PyType_Ready(&swigpyobject_type) < 0)
  41733. - return NULL;
  41734. -#endif
  41735. - }
  41736. - return &swigpyobject_type;
  41737. -}
  41738. -
  41739. -SWIGRUNTIME PyObject *
  41740. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  41741. -{
  41742. - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  41743. - if (sobj) {
  41744. - sobj->ptr = ptr;
  41745. - sobj->ty = ty;
  41746. - sobj->own = own;
  41747. - sobj->next = 0;
  41748. - }
  41749. - return (PyObject *)sobj;
  41750. -}
  41751. -
  41752. -/* -----------------------------------------------------------------------------
  41753. - * Implements a simple Swig Packed type, and use it instead of string
  41754. - * ----------------------------------------------------------------------------- */
  41755. -
  41756. -typedef struct {
  41757. - PyObject_HEAD
  41758. - void *pack;
  41759. - swig_type_info *ty;
  41760. - size_t size;
  41761. -} SwigPyPacked;
  41762. -
  41763. -SWIGRUNTIME int
  41764. -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  41765. -{
  41766. - char result[SWIG_BUFFER_SIZE];
  41767. - fputs("<Swig Packed ", fp);
  41768. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  41769. - fputs("at ", fp);
  41770. - fputs(result, fp);
  41771. - }
  41772. - fputs(v->ty->name,fp);
  41773. - fputs(">", fp);
  41774. - return 0;
  41775. -}
  41776. -
  41777. -SWIGRUNTIME PyObject *
  41778. -SwigPyPacked_repr(SwigPyPacked *v)
  41779. -{
  41780. - char result[SWIG_BUFFER_SIZE];
  41781. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  41782. - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  41783. - } else {
  41784. - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  41785. - }
  41786. -}
  41787. -
  41788. -SWIGRUNTIME PyObject *
  41789. -SwigPyPacked_str(SwigPyPacked *v)
  41790. -{
  41791. - char result[SWIG_BUFFER_SIZE];
  41792. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  41793. - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  41794. - } else {
  41795. - return SWIG_Python_str_FromChar(v->ty->name);
  41796. - }
  41797. -}
  41798. -
  41799. -SWIGRUNTIME int
  41800. -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  41801. -{
  41802. - size_t i = v->size;
  41803. - size_t j = w->size;
  41804. - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  41805. - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  41806. -}
  41807. -
  41808. -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  41809. -
  41810. -SWIGRUNTIME PyTypeObject*
  41811. -SwigPyPacked_type(void) {
  41812. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  41813. - return type;
  41814. -}
  41815. -
  41816. -SWIGRUNTIMEINLINE int
  41817. -SwigPyPacked_Check(PyObject *op) {
  41818. - return ((op)->ob_type == SwigPyPacked_TypeOnce())
  41819. - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  41820. -}
  41821. -
  41822. -SWIGRUNTIME void
  41823. -SwigPyPacked_dealloc(PyObject *v)
  41824. -{
  41825. - if (SwigPyPacked_Check(v)) {
  41826. - SwigPyPacked *sobj = (SwigPyPacked *) v;
  41827. - free(sobj->pack);
  41828. - }
  41829. - PyObject_DEL(v);
  41830. -}
  41831. -
  41832. -SWIGRUNTIME PyTypeObject*
  41833. -SwigPyPacked_TypeOnce(void) {
  41834. - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  41835. - static PyTypeObject swigpypacked_type;
  41836. - static int type_init = 0;
  41837. - if (!type_init) {
  41838. - const PyTypeObject tmp = {
  41839. - /* PyObject header changed in Python 3 */
  41840. -#if PY_VERSION_HEX>=0x03000000
  41841. - PyVarObject_HEAD_INIT(NULL, 0)
  41842. -#else
  41843. - PyObject_HEAD_INIT(NULL)
  41844. - 0, /* ob_size */
  41845. -#endif
  41846. - (char *)"SwigPyPacked", /* tp_name */
  41847. - sizeof(SwigPyPacked), /* tp_basicsize */
  41848. - 0, /* tp_itemsize */
  41849. - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  41850. - (printfunc)SwigPyPacked_print, /* tp_print */
  41851. - (getattrfunc)0, /* tp_getattr */
  41852. - (setattrfunc)0, /* tp_setattr */
  41853. -#if PY_VERSION_HEX>=0x03000000
  41854. - 0, /* tp_reserved in 3.0.1 */
  41855. -#else
  41856. - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  41857. -#endif
  41858. - (reprfunc)SwigPyPacked_repr, /* tp_repr */
  41859. - 0, /* tp_as_number */
  41860. - 0, /* tp_as_sequence */
  41861. - 0, /* tp_as_mapping */
  41862. - (hashfunc)0, /* tp_hash */
  41863. - (ternaryfunc)0, /* tp_call */
  41864. - (reprfunc)SwigPyPacked_str, /* tp_str */
  41865. - PyObject_GenericGetAttr, /* tp_getattro */
  41866. - 0, /* tp_setattro */
  41867. - 0, /* tp_as_buffer */
  41868. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  41869. - swigpacked_doc, /* tp_doc */
  41870. - 0, /* tp_traverse */
  41871. - 0, /* tp_clear */
  41872. - 0, /* tp_richcompare */
  41873. - 0, /* tp_weaklistoffset */
  41874. -#if PY_VERSION_HEX >= 0x02020000
  41875. - 0, /* tp_iter */
  41876. - 0, /* tp_iternext */
  41877. - 0, /* tp_methods */
  41878. - 0, /* tp_members */
  41879. - 0, /* tp_getset */
  41880. - 0, /* tp_base */
  41881. - 0, /* tp_dict */
  41882. - 0, /* tp_descr_get */
  41883. - 0, /* tp_descr_set */
  41884. - 0, /* tp_dictoffset */
  41885. - 0, /* tp_init */
  41886. - 0, /* tp_alloc */
  41887. - 0, /* tp_new */
  41888. - 0, /* tp_free */
  41889. - 0, /* tp_is_gc */
  41890. - 0, /* tp_bases */
  41891. - 0, /* tp_mro */
  41892. - 0, /* tp_cache */
  41893. - 0, /* tp_subclasses */
  41894. - 0, /* tp_weaklist */
  41895. -#endif
  41896. -#if PY_VERSION_HEX >= 0x02030000
  41897. - 0, /* tp_del */
  41898. -#endif
  41899. -#if PY_VERSION_HEX >= 0x02060000
  41900. - 0, /* tp_version */
  41901. -#endif
  41902. -#ifdef COUNT_ALLOCS
  41903. - 0,0,0,0 /* tp_alloc -> tp_next */
  41904. -#endif
  41905. - };
  41906. - swigpypacked_type = tmp;
  41907. - type_init = 1;
  41908. -#if PY_VERSION_HEX < 0x02020000
  41909. - swigpypacked_type.ob_type = &PyType_Type;
  41910. -#else
  41911. - if (PyType_Ready(&swigpypacked_type) < 0)
  41912. - return NULL;
  41913. -#endif
  41914. - }
  41915. - return &swigpypacked_type;
  41916. -}
  41917. -
  41918. -SWIGRUNTIME PyObject *
  41919. -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  41920. -{
  41921. - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  41922. - if (sobj) {
  41923. - void *pack = malloc(size);
  41924. - if (pack) {
  41925. - memcpy(pack, ptr, size);
  41926. - sobj->pack = pack;
  41927. - sobj->ty = ty;
  41928. - sobj->size = size;
  41929. - } else {
  41930. - PyObject_DEL((PyObject *) sobj);
  41931. - sobj = 0;
  41932. - }
  41933. - }
  41934. - return (PyObject *) sobj;
  41935. -}
  41936. -
  41937. -SWIGRUNTIME swig_type_info *
  41938. -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  41939. -{
  41940. - if (SwigPyPacked_Check(obj)) {
  41941. - SwigPyPacked *sobj = (SwigPyPacked *)obj;
  41942. - if (sobj->size != size) return 0;
  41943. - memcpy(ptr, sobj->pack, size);
  41944. - return sobj->ty;
  41945. - } else {
  41946. - return 0;
  41947. - }
  41948. -}
  41949. -
  41950. -/* -----------------------------------------------------------------------------
  41951. - * pointers/data manipulation
  41952. - * ----------------------------------------------------------------------------- */
  41953. -
  41954. -SWIGRUNTIMEINLINE PyObject *
  41955. -_SWIG_This(void)
  41956. -{
  41957. - return SWIG_Python_str_FromChar("this");
  41958. -}
  41959. -
  41960. -static PyObject *swig_this = NULL;
  41961. -
  41962. -SWIGRUNTIME PyObject *
  41963. -SWIG_This(void)
  41964. -{
  41965. - if (swig_this == NULL)
  41966. - swig_this = _SWIG_This();
  41967. - return swig_this;
  41968. -}
  41969. -
  41970. -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  41971. -
  41972. -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
  41973. -#if PY_VERSION_HEX>=0x03000000
  41974. -#define SWIG_PYTHON_SLOW_GETSET_THIS
  41975. -#endif
  41976. -
  41977. -SWIGRUNTIME SwigPyObject *
  41978. -SWIG_Python_GetSwigThis(PyObject *pyobj)
  41979. -{
  41980. - PyObject *obj;
  41981. -
  41982. - if (SwigPyObject_Check(pyobj))
  41983. - return (SwigPyObject *) pyobj;
  41984. -
  41985. -#ifdef SWIGPYTHON_BUILTIN
  41986. - (void)obj;
  41987. -# ifdef PyWeakref_CheckProxy
  41988. - if (PyWeakref_CheckProxy(pyobj)) {
  41989. - pyobj = PyWeakref_GET_OBJECT(pyobj);
  41990. - if (pyobj && SwigPyObject_Check(pyobj))
  41991. - return (SwigPyObject*) pyobj;
  41992. - }
  41993. -# endif
  41994. - return NULL;
  41995. -#else
  41996. -
  41997. - obj = 0;
  41998. -
  41999. -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  42000. - if (PyInstance_Check(pyobj)) {
  42001. - obj = _PyInstance_Lookup(pyobj, SWIG_This());
  42002. - } else {
  42003. - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  42004. - if (dictptr != NULL) {
  42005. - PyObject *dict = *dictptr;
  42006. - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  42007. - } else {
  42008. -#ifdef PyWeakref_CheckProxy
  42009. - if (PyWeakref_CheckProxy(pyobj)) {
  42010. - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  42011. - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  42012. - }
  42013. -#endif
  42014. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  42015. - if (obj) {
  42016. - Py_DECREF(obj);
  42017. - } else {
  42018. - if (PyErr_Occurred()) PyErr_Clear();
  42019. - return 0;
  42020. - }
  42021. - }
  42022. - }
  42023. -#else
  42024. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  42025. - if (obj) {
  42026. - Py_DECREF(obj);
  42027. - } else {
  42028. - if (PyErr_Occurred()) PyErr_Clear();
  42029. - return 0;
  42030. - }
  42031. -#endif
  42032. - if (obj && !SwigPyObject_Check(obj)) {
  42033. - /* a PyObject is called 'this', try to get the 'real this'
  42034. - SwigPyObject from it */
  42035. - return SWIG_Python_GetSwigThis(obj);
  42036. - }
  42037. - return (SwigPyObject *)obj;
  42038. -#endif
  42039. -}
  42040. -
  42041. -/* Acquire a pointer value */
  42042. -
  42043. -SWIGRUNTIME int
  42044. -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  42045. - if (own == SWIG_POINTER_OWN) {
  42046. - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  42047. - if (sobj) {
  42048. - int oldown = sobj->own;
  42049. - sobj->own = own;
  42050. - return oldown;
  42051. - }
  42052. - }
  42053. - return 0;
  42054. -}
  42055. -
  42056. -/* Convert a pointer value */
  42057. -
  42058. -SWIGRUNTIME int
  42059. -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  42060. - int res;
  42061. - SwigPyObject *sobj;
  42062. -
  42063. - if (!obj)
  42064. - return SWIG_ERROR;
  42065. - if (obj == Py_None) {
  42066. - if (ptr)
  42067. - *ptr = 0;
  42068. - return SWIG_OK;
  42069. - }
  42070. -
  42071. - res = SWIG_ERROR;
  42072. -
  42073. - sobj = SWIG_Python_GetSwigThis(obj);
  42074. - if (own)
  42075. - *own = 0;
  42076. - while (sobj) {
  42077. - void *vptr = sobj->ptr;
  42078. - if (ty) {
  42079. - swig_type_info *to = sobj->ty;
  42080. - if (to == ty) {
  42081. - /* no type cast needed */
  42082. - if (ptr) *ptr = vptr;
  42083. - break;
  42084. - } else {
  42085. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  42086. - if (!tc) {
  42087. - sobj = (SwigPyObject *)sobj->next;
  42088. - } else {
  42089. - if (ptr) {
  42090. - int newmemory = 0;
  42091. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  42092. - if (newmemory == SWIG_CAST_NEW_MEMORY) {
  42093. - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  42094. - if (own)
  42095. - *own = *own | SWIG_CAST_NEW_MEMORY;
  42096. - }
  42097. - }
  42098. - break;
  42099. - }
  42100. - }
  42101. - } else {
  42102. - if (ptr) *ptr = vptr;
  42103. - break;
  42104. - }
  42105. - }
  42106. - if (sobj) {
  42107. - if (own)
  42108. - *own = *own | sobj->own;
  42109. - if (flags & SWIG_POINTER_DISOWN) {
  42110. - sobj->own = 0;
  42111. - }
  42112. - res = SWIG_OK;
  42113. - } else {
  42114. - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
  42115. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  42116. - if (data && !data->implicitconv) {
  42117. - PyObject *klass = data->klass;
  42118. - if (klass) {
  42119. - PyObject *impconv;
  42120. - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  42121. - impconv = SWIG_Python_CallFunctor(klass, obj);
  42122. - data->implicitconv = 0;
  42123. - if (PyErr_Occurred()) {
  42124. - PyErr_Clear();
  42125. - impconv = 0;
  42126. - }
  42127. - if (impconv) {
  42128. - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  42129. - if (iobj) {
  42130. - void *vptr;
  42131. - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  42132. - if (SWIG_IsOK(res)) {
  42133. - if (ptr) {
  42134. - *ptr = vptr;
  42135. - /* transfer the ownership to 'ptr' */
  42136. - iobj->own = 0;
  42137. - res = SWIG_AddCast(res);
  42138. - res = SWIG_AddNewMask(res);
  42139. - } else {
  42140. - res = SWIG_AddCast(res);
  42141. - }
  42142. - }
  42143. - }
  42144. - Py_DECREF(impconv);
  42145. - }
  42146. - }
  42147. - }
  42148. - }
  42149. - }
  42150. - return res;
  42151. -}
  42152. -
  42153. -/* Convert a function ptr value */
  42154. -
  42155. -SWIGRUNTIME int
  42156. -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  42157. - if (!PyCFunction_Check(obj)) {
  42158. - return SWIG_ConvertPtr(obj, ptr, ty, 0);
  42159. - } else {
  42160. - void *vptr = 0;
  42161. -
  42162. - /* here we get the method pointer for callbacks */
  42163. - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  42164. - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  42165. - if (desc)
  42166. - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  42167. - if (!desc)
  42168. - return SWIG_ERROR;
  42169. - if (ty) {
  42170. - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
  42171. - if (tc) {
  42172. - int newmemory = 0;
  42173. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  42174. - assert(!newmemory); /* newmemory handling not yet implemented */
  42175. - } else {
  42176. - return SWIG_ERROR;
  42177. - }
  42178. - } else {
  42179. - *ptr = vptr;
  42180. - }
  42181. - return SWIG_OK;
  42182. - }
  42183. -}
  42184. -
  42185. -/* Convert a packed value value */
  42186. -
  42187. -SWIGRUNTIME int
  42188. -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  42189. - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  42190. - if (!to) return SWIG_ERROR;
  42191. - if (ty) {
  42192. - if (to != ty) {
  42193. - /* check type cast? */
  42194. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  42195. - if (!tc) return SWIG_ERROR;
  42196. - }
  42197. - }
  42198. - return SWIG_OK;
  42199. -}
  42200. -
  42201. -/* -----------------------------------------------------------------------------
  42202. - * Create a new pointer object
  42203. - * ----------------------------------------------------------------------------- */
  42204. -
  42205. -/*
  42206. - Create a new instance object, without calling __init__, and set the
  42207. - 'this' attribute.
  42208. -*/
  42209. -
  42210. -SWIGRUNTIME PyObject*
  42211. -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  42212. -{
  42213. -#if (PY_VERSION_HEX >= 0x02020000)
  42214. - PyObject *inst = 0;
  42215. - PyObject *newraw = data->newraw;
  42216. - if (newraw) {
  42217. - inst = PyObject_Call(newraw, data->newargs, NULL);
  42218. - if (inst) {
  42219. -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  42220. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  42221. - if (dictptr != NULL) {
  42222. - PyObject *dict = *dictptr;
  42223. - if (dict == NULL) {
  42224. - dict = PyDict_New();
  42225. - *dictptr = dict;
  42226. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  42227. - }
  42228. - }
  42229. -#else
  42230. - PyObject *key = SWIG_This();
  42231. - PyObject_SetAttr(inst, key, swig_this);
  42232. -#endif
  42233. - }
  42234. - } else {
  42235. -#if PY_VERSION_HEX >= 0x03000000
  42236. - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
  42237. - if (inst) {
  42238. - PyObject_SetAttr(inst, SWIG_This(), swig_this);
  42239. - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  42240. - }
  42241. -#else
  42242. - PyObject *dict = PyDict_New();
  42243. - if (dict) {
  42244. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  42245. - inst = PyInstance_NewRaw(data->newargs, dict);
  42246. - Py_DECREF(dict);
  42247. - }
  42248. -#endif
  42249. - }
  42250. - return inst;
  42251. -#else
  42252. -#if (PY_VERSION_HEX >= 0x02010000)
  42253. - PyObject *inst = 0;
  42254. - PyObject *dict = PyDict_New();
  42255. - if (dict) {
  42256. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  42257. - inst = PyInstance_NewRaw(data->newargs, dict);
  42258. - Py_DECREF(dict);
  42259. - }
  42260. - return (PyObject *) inst;
  42261. -#else
  42262. - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  42263. - if (inst == NULL) {
  42264. - return NULL;
  42265. - }
  42266. - inst->in_class = (PyClassObject *)data->newargs;
  42267. - Py_INCREF(inst->in_class);
  42268. - inst->in_dict = PyDict_New();
  42269. - if (inst->in_dict == NULL) {
  42270. - Py_DECREF(inst);
  42271. - return NULL;
  42272. - }
  42273. -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  42274. - inst->in_weakreflist = NULL;
  42275. -#endif
  42276. -#ifdef Py_TPFLAGS_GC
  42277. - PyObject_GC_Init(inst);
  42278. -#endif
  42279. - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  42280. - return (PyObject *) inst;
  42281. -#endif
  42282. -#endif
  42283. -}
  42284. -
  42285. -SWIGRUNTIME void
  42286. -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  42287. -{
  42288. - PyObject *dict;
  42289. -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  42290. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  42291. - if (dictptr != NULL) {
  42292. - dict = *dictptr;
  42293. - if (dict == NULL) {
  42294. - dict = PyDict_New();
  42295. - *dictptr = dict;
  42296. - }
  42297. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  42298. - return;
  42299. - }
  42300. -#endif
  42301. - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  42302. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  42303. - Py_DECREF(dict);
  42304. -}
  42305. -
  42306. -
  42307. -SWIGINTERN PyObject *
  42308. -SWIG_Python_InitShadowInstance(PyObject *args) {
  42309. - PyObject *obj[2];
  42310. - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  42311. - return NULL;
  42312. - } else {
  42313. - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  42314. - if (sthis) {
  42315. - SwigPyObject_append((PyObject*) sthis, obj[1]);
  42316. - } else {
  42317. - SWIG_Python_SetSwigThis(obj[0], obj[1]);
  42318. - }
  42319. - return SWIG_Py_Void();
  42320. - }
  42321. -}
  42322. -
  42323. -/* Create a new pointer object */
  42324. -
  42325. -SWIGRUNTIME PyObject *
  42326. -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  42327. - SwigPyClientData *clientdata;
  42328. - PyObject * robj;
  42329. - int own;
  42330. -
  42331. - if (!ptr)
  42332. - return SWIG_Py_Void();
  42333. -
  42334. - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  42335. - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  42336. - if (clientdata && clientdata->pytype) {
  42337. - SwigPyObject *newobj;
  42338. - if (flags & SWIG_BUILTIN_TP_INIT) {
  42339. - newobj = (SwigPyObject*) self;
  42340. - if (newobj->ptr) {
  42341. - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  42342. - while (newobj->next)
  42343. - newobj = (SwigPyObject *) newobj->next;
  42344. - newobj->next = next_self;
  42345. - newobj = (SwigPyObject *)next_self;
  42346. - }
  42347. - } else {
  42348. - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  42349. - }
  42350. - if (newobj) {
  42351. - newobj->ptr = ptr;
  42352. - newobj->ty = type;
  42353. - newobj->own = own;
  42354. - newobj->next = 0;
  42355. -#ifdef SWIGPYTHON_BUILTIN
  42356. - newobj->dict = 0;
  42357. -#endif
  42358. - return (PyObject*) newobj;
  42359. - }
  42360. - return SWIG_Py_Void();
  42361. - }
  42362. -
  42363. - assert(!(flags & SWIG_BUILTIN_TP_INIT));
  42364. -
  42365. - robj = SwigPyObject_New(ptr, type, own);
  42366. - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  42367. - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  42368. - Py_DECREF(robj);
  42369. - robj = inst;
  42370. - }
  42371. - return robj;
  42372. -}
  42373. -
  42374. -/* Create a new packed object */
  42375. -
  42376. -SWIGRUNTIMEINLINE PyObject *
  42377. -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  42378. - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  42379. -}
  42380. -
  42381. -/* -----------------------------------------------------------------------------*
  42382. - * Get type list
  42383. - * -----------------------------------------------------------------------------*/
  42384. -
  42385. -#ifdef SWIG_LINK_RUNTIME
  42386. -void *SWIG_ReturnGlobalTypeList(void *);
  42387. -#endif
  42388. -
  42389. -SWIGRUNTIME swig_module_info *
  42390. -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  42391. - static void *type_pointer = (void *)0;
  42392. - /* first check if module already created */
  42393. - if (!type_pointer) {
  42394. -#ifdef SWIG_LINK_RUNTIME
  42395. - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  42396. -#else
  42397. -# ifdef SWIGPY_USE_CAPSULE
  42398. - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  42399. -# else
  42400. - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
  42401. - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
  42402. -# endif
  42403. - if (PyErr_Occurred()) {
  42404. - PyErr_Clear();
  42405. - type_pointer = (void *)0;
  42406. - }
  42407. -#endif
  42408. - }
  42409. - return (swig_module_info *) type_pointer;
  42410. -}
  42411. -
  42412. -#if PY_MAJOR_VERSION < 2
  42413. -/* PyModule_AddObject function was introduced in Python 2.0. The following function
  42414. - is copied out of Python/modsupport.c in python version 2.3.4 */
  42415. -SWIGINTERN int
  42416. -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
  42417. -{
  42418. - PyObject *dict;
  42419. - if (!PyModule_Check(m)) {
  42420. - PyErr_SetString(PyExc_TypeError,
  42421. - "PyModule_AddObject() needs module as first arg");
  42422. - return SWIG_ERROR;
  42423. - }
  42424. - if (!o) {
  42425. - PyErr_SetString(PyExc_TypeError,
  42426. - "PyModule_AddObject() needs non-NULL value");
  42427. - return SWIG_ERROR;
  42428. - }
  42429. -
  42430. - dict = PyModule_GetDict(m);
  42431. - if (dict == NULL) {
  42432. - /* Internal error -- modules must have a dict! */
  42433. - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
  42434. - PyModule_GetName(m));
  42435. - return SWIG_ERROR;
  42436. - }
  42437. - if (PyDict_SetItemString(dict, name, o))
  42438. - return SWIG_ERROR;
  42439. - Py_DECREF(o);
  42440. - return SWIG_OK;
  42441. -}
  42442. -#endif
  42443. -
  42444. -SWIGRUNTIME void
  42445. -#ifdef SWIGPY_USE_CAPSULE
  42446. -SWIG_Python_DestroyModule(PyObject *obj)
  42447. -#else
  42448. -SWIG_Python_DestroyModule(void *vptr)
  42449. -#endif
  42450. -{
  42451. -#ifdef SWIGPY_USE_CAPSULE
  42452. - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  42453. -#else
  42454. - swig_module_info *swig_module = (swig_module_info *) vptr;
  42455. -#endif
  42456. - swig_type_info **types = swig_module->types;
  42457. - size_t i;
  42458. - for (i =0; i < swig_module->size; ++i) {
  42459. - swig_type_info *ty = types[i];
  42460. - if (ty->owndata) {
  42461. - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  42462. - if (data) SwigPyClientData_Del(data);
  42463. - }
  42464. - }
  42465. - Py_DECREF(SWIG_This());
  42466. - swig_this = NULL;
  42467. -}
  42468. -
  42469. -SWIGRUNTIME void
  42470. -SWIG_Python_SetModule(swig_module_info *swig_module) {
  42471. -#if PY_VERSION_HEX >= 0x03000000
  42472. - /* Add a dummy module object into sys.modules */
  42473. - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  42474. -#else
  42475. - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  42476. - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  42477. -#endif
  42478. -#ifdef SWIGPY_USE_CAPSULE
  42479. - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  42480. - if (pointer && module) {
  42481. - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  42482. - } else {
  42483. - Py_XDECREF(pointer);
  42484. - }
  42485. -#else
  42486. - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  42487. - if (pointer && module) {
  42488. - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  42489. - } else {
  42490. - Py_XDECREF(pointer);
  42491. - }
  42492. -#endif
  42493. -}
  42494. -
  42495. -/* The python cached type query */
  42496. -SWIGRUNTIME PyObject *
  42497. -SWIG_Python_TypeCache(void) {
  42498. - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  42499. - return cache;
  42500. -}
  42501. -
  42502. -SWIGRUNTIME swig_type_info *
  42503. -SWIG_Python_TypeQuery(const char *type)
  42504. -{
  42505. - PyObject *cache = SWIG_Python_TypeCache();
  42506. - PyObject *key = SWIG_Python_str_FromChar(type);
  42507. - PyObject *obj = PyDict_GetItem(cache, key);
  42508. - swig_type_info *descriptor;
  42509. - if (obj) {
  42510. -#ifdef SWIGPY_USE_CAPSULE
  42511. - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  42512. -#else
  42513. - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
  42514. -#endif
  42515. - } else {
  42516. - swig_module_info *swig_module = SWIG_GetModule(0);
  42517. - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  42518. - if (descriptor) {
  42519. -#ifdef SWIGPY_USE_CAPSULE
  42520. - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  42521. -#else
  42522. - obj = PyCObject_FromVoidPtr(descriptor, NULL);
  42523. -#endif
  42524. - PyDict_SetItem(cache, key, obj);
  42525. - Py_DECREF(obj);
  42526. - }
  42527. - }
  42528. - Py_DECREF(key);
  42529. - return descriptor;
  42530. -}
  42531. -
  42532. -/*
  42533. - For backward compatibility only
  42534. -*/
  42535. -#define SWIG_POINTER_EXCEPTION 0
  42536. -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  42537. -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  42538. -
  42539. -SWIGRUNTIME int
  42540. -SWIG_Python_AddErrMesg(const char* mesg, int infront)
  42541. -{
  42542. - if (PyErr_Occurred()) {
  42543. - PyObject *type = 0;
  42544. - PyObject *value = 0;
  42545. - PyObject *traceback = 0;
  42546. - PyErr_Fetch(&type, &value, &traceback);
  42547. - if (value) {
  42548. - char *tmp;
  42549. - PyObject *old_str = PyObject_Str(value);
  42550. - Py_XINCREF(type);
  42551. - PyErr_Clear();
  42552. - if (infront) {
  42553. - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
  42554. - } else {
  42555. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  42556. - }
  42557. - SWIG_Python_str_DelForPy3(tmp);
  42558. - Py_DECREF(old_str);
  42559. - }
  42560. - return 1;
  42561. - } else {
  42562. - return 0;
  42563. - }
  42564. -}
  42565. -
  42566. -SWIGRUNTIME int
  42567. -SWIG_Python_ArgFail(int argnum)
  42568. -{
  42569. - if (PyErr_Occurred()) {
  42570. - /* add information about failing argument */
  42571. - char mesg[256];
  42572. - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  42573. - return SWIG_Python_AddErrMesg(mesg, 1);
  42574. - } else {
  42575. - return 0;
  42576. - }
  42577. -}
  42578. -
  42579. -SWIGRUNTIMEINLINE const char *
  42580. -SwigPyObject_GetDesc(PyObject *self)
  42581. -{
  42582. - SwigPyObject *v = (SwigPyObject *)self;
  42583. - swig_type_info *ty = v ? v->ty : 0;
  42584. - return ty ? ty->str : "";
  42585. -}
  42586. -
  42587. -SWIGRUNTIME void
  42588. -SWIG_Python_TypeError(const char *type, PyObject *obj)
  42589. -{
  42590. - if (type) {
  42591. -#if defined(SWIG_COBJECT_TYPES)
  42592. - if (obj && SwigPyObject_Check(obj)) {
  42593. - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  42594. - if (otype) {
  42595. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  42596. - type, otype);
  42597. - return;
  42598. - }
  42599. - } else
  42600. -#endif
  42601. - {
  42602. - const char *otype = (obj ? obj->ob_type->tp_name : 0);
  42603. - if (otype) {
  42604. - PyObject *str = PyObject_Str(obj);
  42605. - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  42606. - if (cstr) {
  42607. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  42608. - type, otype, cstr);
  42609. - SWIG_Python_str_DelForPy3(cstr);
  42610. - } else {
  42611. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  42612. - type, otype);
  42613. - }
  42614. - Py_XDECREF(str);
  42615. - return;
  42616. - }
  42617. - }
  42618. - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  42619. - } else {
  42620. - PyErr_Format(PyExc_TypeError, "unexpected type is received");
  42621. - }
  42622. -}
  42623. -
  42624. -
  42625. -/* Convert a pointer value, signal an exception on a type mismatch */
  42626. -SWIGRUNTIME void *
  42627. -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  42628. - void *result;
  42629. - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  42630. - PyErr_Clear();
  42631. -#if SWIG_POINTER_EXCEPTION
  42632. - if (flags) {
  42633. - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  42634. - SWIG_Python_ArgFail(argnum);
  42635. - }
  42636. -#endif
  42637. - }
  42638. - return result;
  42639. -}
  42640. -
  42641. -#ifdef SWIGPYTHON_BUILTIN
  42642. -SWIGRUNTIME int
  42643. -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  42644. - PyTypeObject *tp = obj->ob_type;
  42645. - PyObject *descr;
  42646. - PyObject *encoded_name;
  42647. - descrsetfunc f;
  42648. - int res;
  42649. -
  42650. -# ifdef Py_USING_UNICODE
  42651. - if (PyString_Check(name)) {
  42652. - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  42653. - if (!name)
  42654. - return -1;
  42655. - } else if (!PyUnicode_Check(name))
  42656. -# else
  42657. - if (!PyString_Check(name))
  42658. -# endif
  42659. - {
  42660. - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  42661. - return -1;
  42662. - } else {
  42663. - Py_INCREF(name);
  42664. - }
  42665. -
  42666. - if (!tp->tp_dict) {
  42667. - if (PyType_Ready(tp) < 0)
  42668. - goto done;
  42669. - }
  42670. -
  42671. - res = -1;
  42672. - descr = _PyType_Lookup(tp, name);
  42673. - f = NULL;
  42674. - if (descr != NULL)
  42675. - f = descr->ob_type->tp_descr_set;
  42676. - if (!f) {
  42677. - if (PyString_Check(name)) {
  42678. - encoded_name = name;
  42679. - Py_INCREF(name);
  42680. - } else {
  42681. - encoded_name = PyUnicode_AsUTF8String(name);
  42682. - }
  42683. - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  42684. - Py_DECREF(encoded_name);
  42685. - } else {
  42686. - res = f(descr, obj, value);
  42687. - }
  42688. -
  42689. - done:
  42690. - Py_DECREF(name);
  42691. - return res;
  42692. -}
  42693. -#endif
  42694. -
  42695. -
  42696. -#ifdef __cplusplus
  42697. -}
  42698. -#endif
  42699. -
  42700. -
  42701. -
  42702. -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  42703. -
  42704. -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  42705. -
  42706. -
  42707. -
  42708. -/* -------- TYPES TABLE (BEGIN) -------- */
  42709. -
  42710. -#define SWIGTYPE_p_char swig_types[0]
  42711. -#define SWIGTYPE_p_im_col_tab_disp swig_types[1]
  42712. -#define SWIGTYPE_p_matrix swig_types[2]
  42713. -#define SWIGTYPE_p_vips__VDisplay swig_types[3]
  42714. -#define SWIGTYPE_p_vips__VError swig_types[4]
  42715. -#define SWIGTYPE_p_void swig_types[5]
  42716. -static swig_type_info *swig_types[7];
  42717. -static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
  42718. -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  42719. -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  42720. -
  42721. -/* -------- TYPES TABLE (END) -------- */
  42722. -
  42723. -#if (PY_VERSION_HEX <= 0x02000000)
  42724. -# if !defined(SWIG_PYTHON_CLASSIC)
  42725. -# error "This python version requires swig to be run with the '-classic' option"
  42726. -# endif
  42727. -#endif
  42728. -
  42729. -/*-----------------------------------------------
  42730. - @(target):= vdisplaymodule.so
  42731. - ------------------------------------------------*/
  42732. -#if PY_VERSION_HEX >= 0x03000000
  42733. -# define SWIG_init PyInit_vdisplaymodule
  42734. -
  42735. -#else
  42736. -# define SWIG_init initvdisplaymodule
  42737. -
  42738. -#endif
  42739. -#define SWIG_name "vdisplaymodule"
  42740. -
  42741. -#define SWIGVERSION 0x020010
  42742. -#define SWIG_VERSION SWIGVERSION
  42743. -
  42744. -
  42745. -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  42746. -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  42747. -
  42748. -
  42749. -#include <stdexcept>
  42750. -
  42751. -
  42752. -namespace swig {
  42753. - class SwigPtr_PyObject {
  42754. - protected:
  42755. - PyObject *_obj;
  42756. -
  42757. - public:
  42758. - SwigPtr_PyObject() :_obj(0)
  42759. - {
  42760. - }
  42761. -
  42762. - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
  42763. - {
  42764. - Py_XINCREF(_obj);
  42765. - }
  42766. -
  42767. - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
  42768. - {
  42769. - if (initial_ref) {
  42770. - Py_XINCREF(_obj);
  42771. - }
  42772. - }
  42773. -
  42774. - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
  42775. - {
  42776. - Py_XINCREF(item._obj);
  42777. - Py_XDECREF(_obj);
  42778. - _obj = item._obj;
  42779. - return *this;
  42780. - }
  42781. -
  42782. - ~SwigPtr_PyObject()
  42783. - {
  42784. - Py_XDECREF(_obj);
  42785. - }
  42786. -
  42787. - operator PyObject *() const
  42788. - {
  42789. - return _obj;
  42790. - }
  42791. -
  42792. - PyObject *operator->() const
  42793. - {
  42794. - return _obj;
  42795. - }
  42796. - };
  42797. -}
  42798. -
  42799. -
  42800. -namespace swig {
  42801. - struct SwigVar_PyObject : SwigPtr_PyObject {
  42802. - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
  42803. -
  42804. - SwigVar_PyObject & operator = (PyObject* obj)
  42805. - {
  42806. - Py_XDECREF(_obj);
  42807. - _obj = obj;
  42808. - return *this;
  42809. - }
  42810. - };
  42811. -}
  42812. -
  42813. -
  42814. -#include <vips/vipscpp.h>
  42815. -
  42816. -
  42817. -SWIGINTERNINLINE PyObject*
  42818. - SWIG_From_int (int value)
  42819. -{
  42820. - return PyInt_FromLong((long) value);
  42821. -}
  42822. -
  42823. -
  42824. -SWIGINTERN swig_type_info*
  42825. -SWIG_pchar_descriptor(void)
  42826. -{
  42827. - static int init = 0;
  42828. - static swig_type_info* info = 0;
  42829. - if (!init) {
  42830. - info = SWIG_TypeQuery("_p_char");
  42831. - init = 1;
  42832. - }
  42833. - return info;
  42834. -}
  42835. -
  42836. -
  42837. -SWIGINTERN int
  42838. -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  42839. -{
  42840. -#if PY_VERSION_HEX>=0x03000000
  42841. - if (PyUnicode_Check(obj))
  42842. -#else
  42843. - if (PyString_Check(obj))
  42844. -#endif
  42845. - {
  42846. - char *cstr; Py_ssize_t len;
  42847. -#if PY_VERSION_HEX>=0x03000000
  42848. - if (!alloc && cptr) {
  42849. - /* We can't allow converting without allocation, since the internal
  42850. - representation of string in Python 3 is UCS-2/UCS-4 but we require
  42851. - a UTF-8 representation.
  42852. - TODO(bhy) More detailed explanation */
  42853. - return SWIG_RuntimeError;
  42854. - }
  42855. - obj = PyUnicode_AsUTF8String(obj);
  42856. - PyBytes_AsStringAndSize(obj, &cstr, &len);
  42857. - if(alloc) *alloc = SWIG_NEWOBJ;
  42858. -#else
  42859. - PyString_AsStringAndSize(obj, &cstr, &len);
  42860. -#endif
  42861. - if (cptr) {
  42862. - if (alloc) {
  42863. - /*
  42864. - In python the user should not be able to modify the inner
  42865. - string representation. To warranty that, if you define
  42866. - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
  42867. - buffer is always returned.
  42868. -
  42869. - The default behavior is just to return the pointer value,
  42870. - so, be careful.
  42871. - */
  42872. -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
  42873. - if (*alloc != SWIG_OLDOBJ)
  42874. -#else
  42875. - if (*alloc == SWIG_NEWOBJ)
  42876. -#endif
  42877. - {
  42878. - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
  42879. - *alloc = SWIG_NEWOBJ;
  42880. - }
  42881. - else {
  42882. - *cptr = cstr;
  42883. - *alloc = SWIG_OLDOBJ;
  42884. - }
  42885. - } else {
  42886. - #if PY_VERSION_HEX>=0x03000000
  42887. - assert(0); /* Should never reach here in Python 3 */
  42888. - #endif
  42889. - *cptr = SWIG_Python_str_AsChar(obj);
  42890. - }
  42891. - }
  42892. - if (psize) *psize = len + 1;
  42893. -#if PY_VERSION_HEX>=0x03000000
  42894. - Py_XDECREF(obj);
  42895. -#endif
  42896. - return SWIG_OK;
  42897. - } else {
  42898. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  42899. - if (pchar_descriptor) {
  42900. - void* vptr = 0;
  42901. - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  42902. - if (cptr) *cptr = (char *) vptr;
  42903. - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  42904. - if (alloc) *alloc = SWIG_OLDOBJ;
  42905. - return SWIG_OK;
  42906. - }
  42907. - }
  42908. - }
  42909. - return SWIG_TypeError;
  42910. -}
  42911. -
  42912. -
  42913. -
  42914. -
  42915. -#ifdef __cplusplus
  42916. -extern "C" {
  42917. -#endif
  42918. -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  42919. - PyObject *resultobj = 0;
  42920. - char *arg1 = (char *) 0 ;
  42921. - int res1 ;
  42922. - char *buf1 = 0 ;
  42923. - int alloc1 = 0 ;
  42924. - PyObject * obj0 = 0 ;
  42925. - vips::VDisplay *result = 0 ;
  42926. -
  42927. - if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail;
  42928. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  42929. - if (!SWIG_IsOK(res1)) {
  42930. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "char const *""'");
  42931. - }
  42932. - arg1 = reinterpret_cast< char * >(buf1);
  42933. - try {
  42934. - result = (vips::VDisplay *)new vips::VDisplay((char const *)arg1);
  42935. - }
  42936. - catch(vips::VError &_e) {
  42937. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  42938. - }
  42939. -
  42940. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
  42941. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  42942. - return resultobj;
  42943. -fail:
  42944. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  42945. - return NULL;
  42946. -}
  42947. -
  42948. -
  42949. -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  42950. - PyObject *resultobj = 0;
  42951. - vips::VDisplay *result = 0 ;
  42952. -
  42953. - if (!PyArg_ParseTuple(args,(char *)":new_VDisplay")) SWIG_fail;
  42954. - result = (vips::VDisplay *)new vips::VDisplay();
  42955. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
  42956. - return resultobj;
  42957. -fail:
  42958. - return NULL;
  42959. -}
  42960. -
  42961. -
  42962. -SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  42963. - PyObject *resultobj = 0;
  42964. - vips::VDisplay *arg1 = 0 ;
  42965. - void *argp1 = 0 ;
  42966. - int res1 = 0 ;
  42967. - PyObject * obj0 = 0 ;
  42968. - vips::VDisplay *result = 0 ;
  42969. -
  42970. - if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail;
  42971. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  42972. - if (!SWIG_IsOK(res1)) {
  42973. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'");
  42974. - }
  42975. - if (!argp1) {
  42976. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'");
  42977. - }
  42978. - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
  42979. - result = (vips::VDisplay *)new vips::VDisplay((vips::VDisplay const &)*arg1);
  42980. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 );
  42981. - return resultobj;
  42982. -fail:
  42983. - return NULL;
  42984. -}
  42985. -
  42986. -
  42987. -SWIGINTERN PyObject *_wrap_new_VDisplay(PyObject *self, PyObject *args) {
  42988. - int argc;
  42989. - PyObject *argv[2];
  42990. - int ii;
  42991. -
  42992. - if (!PyTuple_Check(args)) SWIG_fail;
  42993. - argc = args ? (int)PyObject_Length(args) : 0;
  42994. - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
  42995. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  42996. - }
  42997. - if (argc == 0) {
  42998. - return _wrap_new_VDisplay__SWIG_1(self, args);
  42999. - }
  43000. - if (argc == 1) {
  43001. - int _v;
  43002. - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VDisplay, 0);
  43003. - _v = SWIG_CheckState(res);
  43004. - if (_v) {
  43005. - return _wrap_new_VDisplay__SWIG_2(self, args);
  43006. - }
  43007. - }
  43008. - if (argc == 1) {
  43009. - int _v;
  43010. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  43011. - _v = SWIG_CheckState(res);
  43012. - if (_v) {
  43013. - return _wrap_new_VDisplay__SWIG_0(self, args);
  43014. - }
  43015. - }
  43016. -
  43017. -fail:
  43018. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDisplay'.\n"
  43019. - " Possible C/C++ prototypes are:\n"
  43020. - " vips::VDisplay::VDisplay(char const *)\n"
  43021. - " vips::VDisplay::VDisplay()\n"
  43022. - " vips::VDisplay::VDisplay(vips::VDisplay const &)\n");
  43023. - return 0;
  43024. -}
  43025. -
  43026. -
  43027. -SWIGINTERN PyObject *_wrap_VDisplay___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  43028. - PyObject *resultobj = 0;
  43029. - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
  43030. - vips::VDisplay *arg2 = 0 ;
  43031. - void *argp1 = 0 ;
  43032. - int res1 = 0 ;
  43033. - void *argp2 = 0 ;
  43034. - int res2 = 0 ;
  43035. - PyObject * obj0 = 0 ;
  43036. - PyObject * obj1 = 0 ;
  43037. - vips::VDisplay *result = 0 ;
  43038. -
  43039. - if (!PyArg_ParseTuple(args,(char *)"OO:VDisplay___assign__",&obj0,&obj1)) SWIG_fail;
  43040. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
  43041. - if (!SWIG_IsOK(res1)) {
  43042. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay___assign__" "', argument " "1"" of type '" "vips::VDisplay *""'");
  43043. - }
  43044. - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
  43045. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  43046. - if (!SWIG_IsOK(res2)) {
  43047. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'");
  43048. - }
  43049. - if (!argp2) {
  43050. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'");
  43051. - }
  43052. - arg2 = reinterpret_cast< vips::VDisplay * >(argp2);
  43053. - result = (vips::VDisplay *) &(arg1)->operator =((vips::VDisplay const &)*arg2);
  43054. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, 0 | 0 );
  43055. - return resultobj;
  43056. -fail:
  43057. - return NULL;
  43058. -}
  43059. -
  43060. -
  43061. -SWIGINTERN PyObject *_wrap_delete_VDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  43062. - PyObject *resultobj = 0;
  43063. - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
  43064. - void *argp1 = 0 ;
  43065. - int res1 = 0 ;
  43066. - PyObject * obj0 = 0 ;
  43067. -
  43068. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VDisplay",&obj0)) SWIG_fail;
  43069. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_DISOWN | 0 );
  43070. - if (!SWIG_IsOK(res1)) {
  43071. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDisplay" "', argument " "1"" of type '" "vips::VDisplay *""'");
  43072. - }
  43073. - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
  43074. - delete arg1;
  43075. - resultobj = SWIG_Py_Void();
  43076. - return resultobj;
  43077. -fail:
  43078. - return NULL;
  43079. -}
  43080. -
  43081. -
  43082. -SWIGINTERN PyObject *_wrap_VDisplay_disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  43083. - PyObject *resultobj = 0;
  43084. - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
  43085. - void *argp1 = 0 ;
  43086. - int res1 = 0 ;
  43087. - PyObject * obj0 = 0 ;
  43088. - void *result = 0 ;
  43089. -
  43090. - if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_disp",&obj0)) SWIG_fail;
  43091. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
  43092. - if (!SWIG_IsOK(res1)) {
  43093. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_disp" "', argument " "1"" of type '" "vips::VDisplay const *""'");
  43094. - }
  43095. - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
  43096. - result = (void *)((vips::VDisplay const *)arg1)->disp();
  43097. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
  43098. - return resultobj;
  43099. -fail:
  43100. - return NULL;
  43101. -}
  43102. -
  43103. -
  43104. -SWIGINTERN PyObject *_wrap_VDisplay_luts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  43105. - PyObject *resultobj = 0;
  43106. - vips::VDisplay *arg1 = (vips::VDisplay *) 0 ;
  43107. - void *argp1 = 0 ;
  43108. - int res1 = 0 ;
  43109. - PyObject * obj0 = 0 ;
  43110. - im_col_tab_disp *result = 0 ;
  43111. -
  43112. - if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_luts",&obj0)) SWIG_fail;
  43113. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 );
  43114. - if (!SWIG_IsOK(res1)) {
  43115. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_luts" "', argument " "1"" of type '" "vips::VDisplay const *""'");
  43116. - }
  43117. - arg1 = reinterpret_cast< vips::VDisplay * >(argp1);
  43118. - try {
  43119. - result = (im_col_tab_disp *)((vips::VDisplay const *)arg1)->luts();
  43120. - }
  43121. - catch(vips::VError &_e) {
  43122. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  43123. - }
  43124. -
  43125. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_im_col_tab_disp, 0 | 0 );
  43126. - return resultobj;
  43127. -fail:
  43128. - return NULL;
  43129. -}
  43130. -
  43131. -
  43132. -SWIGINTERN PyObject *VDisplay_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  43133. - PyObject *obj;
  43134. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  43135. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDisplay, SWIG_NewClientData(obj));
  43136. - return SWIG_Py_Void();
  43137. -}
  43138. -
  43139. -static PyMethodDef SwigMethods[] = {
  43140. - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
  43141. - { (char *)"new_VDisplay", _wrap_new_VDisplay, METH_VARARGS, NULL},
  43142. - { (char *)"VDisplay___assign__", _wrap_VDisplay___assign__, METH_VARARGS, NULL},
  43143. - { (char *)"delete_VDisplay", _wrap_delete_VDisplay, METH_VARARGS, NULL},
  43144. - { (char *)"VDisplay_disp", _wrap_VDisplay_disp, METH_VARARGS, NULL},
  43145. - { (char *)"VDisplay_luts", _wrap_VDisplay_luts, METH_VARARGS, NULL},
  43146. - { (char *)"VDisplay_swigregister", VDisplay_swigregister, METH_VARARGS, NULL},
  43147. - { NULL, NULL, 0, NULL }
  43148. -};
  43149. -
  43150. -
  43151. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  43152. -
  43153. -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  43154. -static swig_type_info _swigt__p_im_col_tab_disp = {"_p_im_col_tab_disp", "im_col_tab_disp *", 0, 0, (void*)0, 0};
  43155. -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
  43156. -static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0};
  43157. -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
  43158. -static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
  43159. -
  43160. -static swig_type_info *swig_type_initial[] = {
  43161. - &_swigt__p_char,
  43162. - &_swigt__p_im_col_tab_disp,
  43163. - &_swigt__p_matrix,
  43164. - &_swigt__p_vips__VDisplay,
  43165. - &_swigt__p_vips__VError,
  43166. - &_swigt__p_void,
  43167. -};
  43168. -
  43169. -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  43170. -static swig_cast_info _swigc__p_im_col_tab_disp[] = { {&_swigt__p_im_col_tab_disp, 0, 0, 0},{0, 0, 0, 0}};
  43171. -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
  43172. -static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}};
  43173. -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
  43174. -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
  43175. -
  43176. -static swig_cast_info *swig_cast_initial[] = {
  43177. - _swigc__p_char,
  43178. - _swigc__p_im_col_tab_disp,
  43179. - _swigc__p_matrix,
  43180. - _swigc__p_vips__VDisplay,
  43181. - _swigc__p_vips__VError,
  43182. - _swigc__p_void,
  43183. -};
  43184. -
  43185. -
  43186. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  43187. -
  43188. -static swig_const_info swig_const_table[] = {
  43189. -{0, 0, 0, 0.0, 0, 0}};
  43190. -
  43191. -#ifdef __cplusplus
  43192. -}
  43193. -#endif
  43194. -/* -----------------------------------------------------------------------------
  43195. - * Type initialization:
  43196. - * This problem is tough by the requirement that no dynamic
  43197. - * memory is used. Also, since swig_type_info structures store pointers to
  43198. - * swig_cast_info structures and swig_cast_info structures store pointers back
  43199. - * to swig_type_info structures, we need some lookup code at initialization.
  43200. - * The idea is that swig generates all the structures that are needed.
  43201. - * The runtime then collects these partially filled structures.
  43202. - * The SWIG_InitializeModule function takes these initial arrays out of
  43203. - * swig_module, and does all the lookup, filling in the swig_module.types
  43204. - * array with the correct data and linking the correct swig_cast_info
  43205. - * structures together.
  43206. - *
  43207. - * The generated swig_type_info structures are assigned staticly to an initial
  43208. - * array. We just loop through that array, and handle each type individually.
  43209. - * First we lookup if this type has been already loaded, and if so, use the
  43210. - * loaded structure instead of the generated one. Then we have to fill in the
  43211. - * cast linked list. The cast data is initially stored in something like a
  43212. - * two-dimensional array. Each row corresponds to a type (there are the same
  43213. - * number of rows as there are in the swig_type_initial array). Each entry in
  43214. - * a column is one of the swig_cast_info structures for that type.
  43215. - * The cast_initial array is actually an array of arrays, because each row has
  43216. - * a variable number of columns. So to actually build the cast linked list,
  43217. - * we find the array of casts associated with the type, and loop through it
  43218. - * adding the casts to the list. The one last trick we need to do is making
  43219. - * sure the type pointer in the swig_cast_info struct is correct.
  43220. - *
  43221. - * First off, we lookup the cast->type name to see if it is already loaded.
  43222. - * There are three cases to handle:
  43223. - * 1) If the cast->type has already been loaded AND the type we are adding
  43224. - * casting info to has not been loaded (it is in this module), THEN we
  43225. - * replace the cast->type pointer with the type pointer that has already
  43226. - * been loaded.
  43227. - * 2) If BOTH types (the one we are adding casting info to, and the
  43228. - * cast->type) are loaded, THEN the cast info has already been loaded by
  43229. - * the previous module so we just ignore it.
  43230. - * 3) Finally, if cast->type has not already been loaded, then we add that
  43231. - * swig_cast_info to the linked list (because the cast->type) pointer will
  43232. - * be correct.
  43233. - * ----------------------------------------------------------------------------- */
  43234. -
  43235. -#ifdef __cplusplus
  43236. -extern "C" {
  43237. -#if 0
  43238. -} /* c-mode */
  43239. -#endif
  43240. -#endif
  43241. -
  43242. -#if 0
  43243. -#define SWIGRUNTIME_DEBUG
  43244. -#endif
  43245. -
  43246. -
  43247. -SWIGRUNTIME void
  43248. -SWIG_InitializeModule(void *clientdata) {
  43249. - size_t i;
  43250. - swig_module_info *module_head, *iter;
  43251. - int found, init;
  43252. -
  43253. - /* check to see if the circular list has been setup, if not, set it up */
  43254. - if (swig_module.next==0) {
  43255. - /* Initialize the swig_module */
  43256. - swig_module.type_initial = swig_type_initial;
  43257. - swig_module.cast_initial = swig_cast_initial;
  43258. - swig_module.next = &swig_module;
  43259. - init = 1;
  43260. - } else {
  43261. - init = 0;
  43262. - }
  43263. -
  43264. - /* Try and load any already created modules */
  43265. - module_head = SWIG_GetModule(clientdata);
  43266. - if (!module_head) {
  43267. - /* This is the first module loaded for this interpreter */
  43268. - /* so set the swig module into the interpreter */
  43269. - SWIG_SetModule(clientdata, &swig_module);
  43270. - module_head = &swig_module;
  43271. - } else {
  43272. - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  43273. - found=0;
  43274. - iter=module_head;
  43275. - do {
  43276. - if (iter==&swig_module) {
  43277. - found=1;
  43278. - break;
  43279. - }
  43280. - iter=iter->next;
  43281. - } while (iter!= module_head);
  43282. -
  43283. - /* if the is found in the list, then all is done and we may leave */
  43284. - if (found) return;
  43285. - /* otherwise we must add out module into the list */
  43286. - swig_module.next = module_head->next;
  43287. - module_head->next = &swig_module;
  43288. - }
  43289. -
  43290. - /* When multiple interpeters are used, a module could have already been initialized in
  43291. - a different interpreter, but not yet have a pointer in this interpreter.
  43292. - In this case, we do not want to continue adding types... everything should be
  43293. - set up already */
  43294. - if (init == 0) return;
  43295. -
  43296. - /* Now work on filling in swig_module.types */
  43297. -#ifdef SWIGRUNTIME_DEBUG
  43298. - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  43299. -#endif
  43300. - for (i = 0; i < swig_module.size; ++i) {
  43301. - swig_type_info *type = 0;
  43302. - swig_type_info *ret;
  43303. - swig_cast_info *cast;
  43304. -
  43305. -#ifdef SWIGRUNTIME_DEBUG
  43306. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  43307. -#endif
  43308. -
  43309. - /* if there is another module already loaded */
  43310. - if (swig_module.next != &swig_module) {
  43311. - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  43312. - }
  43313. - if (type) {
  43314. - /* Overwrite clientdata field */
  43315. -#ifdef SWIGRUNTIME_DEBUG
  43316. - printf("SWIG_InitializeModule: found type %s\n", type->name);
  43317. -#endif
  43318. - if (swig_module.type_initial[i]->clientdata) {
  43319. - type->clientdata = swig_module.type_initial[i]->clientdata;
  43320. -#ifdef SWIGRUNTIME_DEBUG
  43321. - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  43322. -#endif
  43323. - }
  43324. - } else {
  43325. - type = swig_module.type_initial[i];
  43326. - }
  43327. -
  43328. - /* Insert casting types */
  43329. - cast = swig_module.cast_initial[i];
  43330. - while (cast->type) {
  43331. - /* Don't need to add information already in the list */
  43332. - ret = 0;
  43333. -#ifdef SWIGRUNTIME_DEBUG
  43334. - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  43335. -#endif
  43336. - if (swig_module.next != &swig_module) {
  43337. - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  43338. -#ifdef SWIGRUNTIME_DEBUG
  43339. - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  43340. -#endif
  43341. - }
  43342. - if (ret) {
  43343. - if (type == swig_module.type_initial[i]) {
  43344. -#ifdef SWIGRUNTIME_DEBUG
  43345. - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  43346. -#endif
  43347. - cast->type = ret;
  43348. - ret = 0;
  43349. - } else {
  43350. - /* Check for casting already in the list */
  43351. - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  43352. -#ifdef SWIGRUNTIME_DEBUG
  43353. - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  43354. -#endif
  43355. - if (!ocast) ret = 0;
  43356. - }
  43357. - }
  43358. -
  43359. - if (!ret) {
  43360. -#ifdef SWIGRUNTIME_DEBUG
  43361. - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  43362. -#endif
  43363. - if (type->cast) {
  43364. - type->cast->prev = cast;
  43365. - cast->next = type->cast;
  43366. - }
  43367. - type->cast = cast;
  43368. - }
  43369. - cast++;
  43370. - }
  43371. - /* Set entry in modules->types array equal to the type */
  43372. - swig_module.types[i] = type;
  43373. - }
  43374. - swig_module.types[i] = 0;
  43375. -
  43376. -#ifdef SWIGRUNTIME_DEBUG
  43377. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  43378. - for (i = 0; i < swig_module.size; ++i) {
  43379. - int j = 0;
  43380. - swig_cast_info *cast = swig_module.cast_initial[i];
  43381. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  43382. - while (cast->type) {
  43383. - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  43384. - cast++;
  43385. - ++j;
  43386. - }
  43387. - printf("---- Total casts: %d\n",j);
  43388. - }
  43389. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  43390. -#endif
  43391. -}
  43392. -
  43393. -/* This function will propagate the clientdata field of type to
  43394. -* any new swig_type_info structures that have been added into the list
  43395. -* of equivalent types. It is like calling
  43396. -* SWIG_TypeClientData(type, clientdata) a second time.
  43397. -*/
  43398. -SWIGRUNTIME void
  43399. -SWIG_PropagateClientData(void) {
  43400. - size_t i;
  43401. - swig_cast_info *equiv;
  43402. - static int init_run = 0;
  43403. -
  43404. - if (init_run) return;
  43405. - init_run = 1;
  43406. -
  43407. - for (i = 0; i < swig_module.size; i++) {
  43408. - if (swig_module.types[i]->clientdata) {
  43409. - equiv = swig_module.types[i]->cast;
  43410. - while (equiv) {
  43411. - if (!equiv->converter) {
  43412. - if (equiv->type && !equiv->type->clientdata)
  43413. - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  43414. - }
  43415. - equiv = equiv->next;
  43416. - }
  43417. - }
  43418. - }
  43419. -}
  43420. -
  43421. -#ifdef __cplusplus
  43422. -#if 0
  43423. -{
  43424. - /* c-mode */
  43425. -#endif
  43426. -}
  43427. -#endif
  43428. -
  43429. -
  43430. -
  43431. -#ifdef __cplusplus
  43432. -extern "C" {
  43433. -#endif
  43434. -
  43435. - /* Python-specific SWIG API */
  43436. -#define SWIG_newvarlink() SWIG_Python_newvarlink()
  43437. -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  43438. -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  43439. -
  43440. - /* -----------------------------------------------------------------------------
  43441. - * global variable support code.
  43442. - * ----------------------------------------------------------------------------- */
  43443. -
  43444. - typedef struct swig_globalvar {
  43445. - char *name; /* Name of global variable */
  43446. - PyObject *(*get_attr)(void); /* Return the current value */
  43447. - int (*set_attr)(PyObject *); /* Set the value */
  43448. - struct swig_globalvar *next;
  43449. - } swig_globalvar;
  43450. -
  43451. - typedef struct swig_varlinkobject {
  43452. - PyObject_HEAD
  43453. - swig_globalvar *vars;
  43454. - } swig_varlinkobject;
  43455. -
  43456. - SWIGINTERN PyObject *
  43457. - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  43458. -#if PY_VERSION_HEX >= 0x03000000
  43459. - return PyUnicode_InternFromString("<Swig global variables>");
  43460. -#else
  43461. - return PyString_FromString("<Swig global variables>");
  43462. -#endif
  43463. - }
  43464. -
  43465. - SWIGINTERN PyObject *
  43466. - swig_varlink_str(swig_varlinkobject *v) {
  43467. -#if PY_VERSION_HEX >= 0x03000000
  43468. - PyObject *str = PyUnicode_InternFromString("(");
  43469. - PyObject *tail;
  43470. - PyObject *joined;
  43471. - swig_globalvar *var;
  43472. - for (var = v->vars; var; var=var->next) {
  43473. - tail = PyUnicode_FromString(var->name);
  43474. - joined = PyUnicode_Concat(str, tail);
  43475. - Py_DecRef(str);
  43476. - Py_DecRef(tail);
  43477. - str = joined;
  43478. - if (var->next) {
  43479. - tail = PyUnicode_InternFromString(", ");
  43480. - joined = PyUnicode_Concat(str, tail);
  43481. - Py_DecRef(str);
  43482. - Py_DecRef(tail);
  43483. - str = joined;
  43484. - }
  43485. - }
  43486. - tail = PyUnicode_InternFromString(")");
  43487. - joined = PyUnicode_Concat(str, tail);
  43488. - Py_DecRef(str);
  43489. - Py_DecRef(tail);
  43490. - str = joined;
  43491. -#else
  43492. - PyObject *str = PyString_FromString("(");
  43493. - swig_globalvar *var;
  43494. - for (var = v->vars; var; var=var->next) {
  43495. - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  43496. - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  43497. - }
  43498. - PyString_ConcatAndDel(&str,PyString_FromString(")"));
  43499. -#endif
  43500. - return str;
  43501. - }
  43502. -
  43503. - SWIGINTERN int
  43504. - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
  43505. - char *tmp;
  43506. - PyObject *str = swig_varlink_str(v);
  43507. - fprintf(fp,"Swig global variables ");
  43508. - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
  43509. - SWIG_Python_str_DelForPy3(tmp);
  43510. - Py_DECREF(str);
  43511. - return 0;
  43512. - }
  43513. -
  43514. - SWIGINTERN void
  43515. - swig_varlink_dealloc(swig_varlinkobject *v) {
  43516. - swig_globalvar *var = v->vars;
  43517. - while (var) {
  43518. - swig_globalvar *n = var->next;
  43519. - free(var->name);
  43520. - free(var);
  43521. - var = n;
  43522. - }
  43523. - }
  43524. -
  43525. - SWIGINTERN PyObject *
  43526. - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  43527. - PyObject *res = NULL;
  43528. - swig_globalvar *var = v->vars;
  43529. - while (var) {
  43530. - if (strcmp(var->name,n) == 0) {
  43531. - res = (*var->get_attr)();
  43532. - break;
  43533. - }
  43534. - var = var->next;
  43535. - }
  43536. - if (res == NULL && !PyErr_Occurred()) {
  43537. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  43538. - }
  43539. - return res;
  43540. - }
  43541. -
  43542. - SWIGINTERN int
  43543. - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  43544. - int res = 1;
  43545. - swig_globalvar *var = v->vars;
  43546. - while (var) {
  43547. - if (strcmp(var->name,n) == 0) {
  43548. - res = (*var->set_attr)(p);
  43549. - break;
  43550. - }
  43551. - var = var->next;
  43552. - }
  43553. - if (res == 1 && !PyErr_Occurred()) {
  43554. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  43555. - }
  43556. - return res;
  43557. - }
  43558. -
  43559. - SWIGINTERN PyTypeObject*
  43560. - swig_varlink_type(void) {
  43561. - static char varlink__doc__[] = "Swig var link object";
  43562. - static PyTypeObject varlink_type;
  43563. - static int type_init = 0;
  43564. - if (!type_init) {
  43565. - const PyTypeObject tmp = {
  43566. - /* PyObject header changed in Python 3 */
  43567. -#if PY_VERSION_HEX >= 0x03000000
  43568. - PyVarObject_HEAD_INIT(NULL, 0)
  43569. -#else
  43570. - PyObject_HEAD_INIT(NULL)
  43571. - 0, /* ob_size */
  43572. -#endif
  43573. - (char *)"swigvarlink", /* tp_name */
  43574. - sizeof(swig_varlinkobject), /* tp_basicsize */
  43575. - 0, /* tp_itemsize */
  43576. - (destructor) swig_varlink_dealloc, /* tp_dealloc */
  43577. - (printfunc) swig_varlink_print, /* tp_print */
  43578. - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  43579. - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  43580. - 0, /* tp_compare */
  43581. - (reprfunc) swig_varlink_repr, /* tp_repr */
  43582. - 0, /* tp_as_number */
  43583. - 0, /* tp_as_sequence */
  43584. - 0, /* tp_as_mapping */
  43585. - 0, /* tp_hash */
  43586. - 0, /* tp_call */
  43587. - (reprfunc) swig_varlink_str, /* tp_str */
  43588. - 0, /* tp_getattro */
  43589. - 0, /* tp_setattro */
  43590. - 0, /* tp_as_buffer */
  43591. - 0, /* tp_flags */
  43592. - varlink__doc__, /* tp_doc */
  43593. - 0, /* tp_traverse */
  43594. - 0, /* tp_clear */
  43595. - 0, /* tp_richcompare */
  43596. - 0, /* tp_weaklistoffset */
  43597. -#if PY_VERSION_HEX >= 0x02020000
  43598. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  43599. -#endif
  43600. -#if PY_VERSION_HEX >= 0x02030000
  43601. - 0, /* tp_del */
  43602. -#endif
  43603. -#if PY_VERSION_HEX >= 0x02060000
  43604. - 0, /* tp_version */
  43605. -#endif
  43606. -#ifdef COUNT_ALLOCS
  43607. - 0,0,0,0 /* tp_alloc -> tp_next */
  43608. -#endif
  43609. - };
  43610. - varlink_type = tmp;
  43611. - type_init = 1;
  43612. -#if PY_VERSION_HEX < 0x02020000
  43613. - varlink_type.ob_type = &PyType_Type;
  43614. -#else
  43615. - if (PyType_Ready(&varlink_type) < 0)
  43616. - return NULL;
  43617. -#endif
  43618. - }
  43619. - return &varlink_type;
  43620. - }
  43621. -
  43622. - /* Create a variable linking object for use later */
  43623. - SWIGINTERN PyObject *
  43624. - SWIG_Python_newvarlink(void) {
  43625. - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  43626. - if (result) {
  43627. - result->vars = 0;
  43628. - }
  43629. - return ((PyObject*) result);
  43630. - }
  43631. -
  43632. - SWIGINTERN void
  43633. - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  43634. - swig_varlinkobject *v = (swig_varlinkobject *) p;
  43635. - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  43636. - if (gv) {
  43637. - size_t size = strlen(name)+1;
  43638. - gv->name = (char *)malloc(size);
  43639. - if (gv->name) {
  43640. - strncpy(gv->name,name,size);
  43641. - gv->get_attr = get_attr;
  43642. - gv->set_attr = set_attr;
  43643. - gv->next = v->vars;
  43644. - }
  43645. - }
  43646. - v->vars = gv;
  43647. - }
  43648. -
  43649. - SWIGINTERN PyObject *
  43650. - SWIG_globals(void) {
  43651. - static PyObject *_SWIG_globals = 0;
  43652. - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
  43653. - return _SWIG_globals;
  43654. - }
  43655. -
  43656. - /* -----------------------------------------------------------------------------
  43657. - * constants/methods manipulation
  43658. - * ----------------------------------------------------------------------------- */
  43659. -
  43660. - /* Install Constants */
  43661. - SWIGINTERN void
  43662. - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  43663. - PyObject *obj = 0;
  43664. - size_t i;
  43665. - for (i = 0; constants[i].type; ++i) {
  43666. - switch(constants[i].type) {
  43667. - case SWIG_PY_POINTER:
  43668. - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  43669. - break;
  43670. - case SWIG_PY_BINARY:
  43671. - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  43672. - break;
  43673. - default:
  43674. - obj = 0;
  43675. - break;
  43676. - }
  43677. - if (obj) {
  43678. - PyDict_SetItemString(d, constants[i].name, obj);
  43679. - Py_DECREF(obj);
  43680. - }
  43681. - }
  43682. - }
  43683. -
  43684. - /* -----------------------------------------------------------------------------*/
  43685. - /* Fix SwigMethods to carry the callback ptrs when needed */
  43686. - /* -----------------------------------------------------------------------------*/
  43687. -
  43688. - SWIGINTERN void
  43689. - SWIG_Python_FixMethods(PyMethodDef *methods,
  43690. - swig_const_info *const_table,
  43691. - swig_type_info **types,
  43692. - swig_type_info **types_initial) {
  43693. - size_t i;
  43694. - for (i = 0; methods[i].ml_name; ++i) {
  43695. - const char *c = methods[i].ml_doc;
  43696. - if (c && (c = strstr(c, "swig_ptr: "))) {
  43697. - int j;
  43698. - swig_const_info *ci = 0;
  43699. - const char *name = c + 10;
  43700. - for (j = 0; const_table[j].type; ++j) {
  43701. - if (strncmp(const_table[j].name, name,
  43702. - strlen(const_table[j].name)) == 0) {
  43703. - ci = &(const_table[j]);
  43704. - break;
  43705. - }
  43706. - }
  43707. - if (ci) {
  43708. - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  43709. - if (ptr) {
  43710. - size_t shift = (ci->ptype) - types;
  43711. - swig_type_info *ty = types_initial[shift];
  43712. - size_t ldoc = (c - methods[i].ml_doc);
  43713. - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  43714. - char *ndoc = (char*)malloc(ldoc + lptr + 10);
  43715. - if (ndoc) {
  43716. - char *buff = ndoc;
  43717. - strncpy(buff, methods[i].ml_doc, ldoc);
  43718. - buff += ldoc;
  43719. - strncpy(buff, "swig_ptr: ", 10);
  43720. - buff += 10;
  43721. - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  43722. - methods[i].ml_doc = ndoc;
  43723. - }
  43724. - }
  43725. - }
  43726. - }
  43727. - }
  43728. - }
  43729. -
  43730. -#ifdef __cplusplus
  43731. -}
  43732. -#endif
  43733. -
  43734. -/* -----------------------------------------------------------------------------*
  43735. - * Partial Init method
  43736. - * -----------------------------------------------------------------------------*/
  43737. -
  43738. -#ifdef __cplusplus
  43739. -extern "C"
  43740. -#endif
  43741. -
  43742. -SWIGEXPORT
  43743. -#if PY_VERSION_HEX >= 0x03000000
  43744. -PyObject*
  43745. -#else
  43746. -void
  43747. -#endif
  43748. -SWIG_init(void) {
  43749. - PyObject *m, *d, *md;
  43750. -#if PY_VERSION_HEX >= 0x03000000
  43751. - static struct PyModuleDef SWIG_module = {
  43752. -# if PY_VERSION_HEX >= 0x03020000
  43753. - PyModuleDef_HEAD_INIT,
  43754. -# else
  43755. - {
  43756. - PyObject_HEAD_INIT(NULL)
  43757. - NULL, /* m_init */
  43758. - 0, /* m_index */
  43759. - NULL, /* m_copy */
  43760. - },
  43761. -# endif
  43762. - (char *) SWIG_name,
  43763. - NULL,
  43764. - -1,
  43765. - SwigMethods,
  43766. - NULL,
  43767. - NULL,
  43768. - NULL,
  43769. - NULL
  43770. - };
  43771. -#endif
  43772. -
  43773. -#if defined(SWIGPYTHON_BUILTIN)
  43774. - static SwigPyClientData SwigPyObject_clientdata = {
  43775. - 0, 0, 0, 0, 0, 0, 0
  43776. - };
  43777. - static PyGetSetDef this_getset_def = {
  43778. - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  43779. - };
  43780. - static SwigPyGetSet thisown_getset_closure = {
  43781. - (PyCFunction) SwigPyObject_own,
  43782. - (PyCFunction) SwigPyObject_own
  43783. - };
  43784. - static PyGetSetDef thisown_getset_def = {
  43785. - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  43786. - };
  43787. - PyObject *metatype_args;
  43788. - PyTypeObject *builtin_pytype;
  43789. - int builtin_base_count;
  43790. - swig_type_info *builtin_basetype;
  43791. - PyObject *tuple;
  43792. - PyGetSetDescrObject *static_getset;
  43793. - PyTypeObject *metatype;
  43794. - SwigPyClientData *cd;
  43795. - PyObject *public_interface, *public_symbol;
  43796. - PyObject *this_descr;
  43797. - PyObject *thisown_descr;
  43798. - int i;
  43799. -
  43800. - (void)builtin_pytype;
  43801. - (void)builtin_base_count;
  43802. - (void)builtin_basetype;
  43803. - (void)tuple;
  43804. - (void)static_getset;
  43805. -
  43806. - /* metatype is used to implement static member variables. */
  43807. - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  43808. - assert(metatype_args);
  43809. - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  43810. - assert(metatype);
  43811. - Py_DECREF(metatype_args);
  43812. - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  43813. - assert(PyType_Ready(metatype) >= 0);
  43814. -#endif
  43815. -
  43816. - /* Fix SwigMethods to carry the callback ptrs when needed */
  43817. - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  43818. -
  43819. -#if PY_VERSION_HEX >= 0x03000000
  43820. - m = PyModule_Create(&SWIG_module);
  43821. -#else
  43822. - m = Py_InitModule((char *) SWIG_name, SwigMethods);
  43823. -#endif
  43824. - md = d = PyModule_GetDict(m);
  43825. - (void)md;
  43826. -
  43827. - SWIG_InitializeModule(0);
  43828. -
  43829. -#ifdef SWIGPYTHON_BUILTIN
  43830. - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  43831. - assert(SwigPyObject_stype);
  43832. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  43833. - if (!cd) {
  43834. - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  43835. - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  43836. - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
  43837. - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  43838. -# if PY_VERSION_HEX >= 0x03000000
  43839. - return NULL;
  43840. -# else
  43841. - return;
  43842. -# endif
  43843. - }
  43844. -
  43845. - /* All objects have a 'this' attribute */
  43846. - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  43847. - (void)this_descr;
  43848. -
  43849. - /* All objects have a 'thisown' attribute */
  43850. - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  43851. - (void)thisown_descr;
  43852. -
  43853. - public_interface = PyList_New(0);
  43854. - public_symbol = 0;
  43855. - (void)public_symbol;
  43856. -
  43857. - PyDict_SetItemString(md, "__all__", public_interface);
  43858. - Py_DECREF(public_interface);
  43859. - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  43860. - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  43861. - for (i = 0; swig_const_table[i].name != 0; ++i)
  43862. - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  43863. -#endif
  43864. -
  43865. - SWIG_InstallConstants(d,swig_const_table);
  43866. -
  43867. - SWIG_Python_SetConstant(d, "VDisplay_BARCO",SWIG_From_int(static_cast< int >(vips::VDisplay::BARCO)));
  43868. - SWIG_Python_SetConstant(d, "VDisplay_DUMB",SWIG_From_int(static_cast< int >(vips::VDisplay::DUMB)));
  43869. -#if PY_VERSION_HEX >= 0x03000000
  43870. - return m;
  43871. -#else
  43872. - return;
  43873. -#endif
  43874. -}
  43875. -
  43876. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VDisplay.py vips-7.38.5/swig/vipsCC/VDisplay.py
  43877. --- vips-7.38.5-vanilla/swig/vipsCC/VDisplay.py 2014-07-17 23:48:36.211794473 -0400
  43878. +++ vips-7.38.5/swig/vipsCC/VDisplay.py 1969-12-31 19:00:00.000000000 -0500
  43879. @@ -1,93 +0,0 @@
  43880. -# This file was automatically generated by SWIG (http://www.swig.org).
  43881. -# Version 2.0.10
  43882. -#
  43883. -# Do not make changes to this file unless you know what you are doing--modify
  43884. -# the SWIG interface file instead.
  43885. -
  43886. -
  43887. -
  43888. -from sys import version_info
  43889. -if version_info >= (2,6,0):
  43890. - def swig_import_helper():
  43891. - from os.path import dirname
  43892. - import imp
  43893. - fp = None
  43894. - try:
  43895. - fp, pathname, description = imp.find_module('vdisplaymodule', [dirname(__file__)])
  43896. - except ImportError:
  43897. - import vdisplaymodule
  43898. - return vdisplaymodule
  43899. - if fp is not None:
  43900. - try:
  43901. - _mod = imp.load_module('vdisplaymodule', fp, pathname, description)
  43902. - finally:
  43903. - fp.close()
  43904. - return _mod
  43905. - vdisplaymodule = swig_import_helper()
  43906. - del swig_import_helper
  43907. -else:
  43908. - import vdisplaymodule
  43909. -del version_info
  43910. -try:
  43911. - _swig_property = property
  43912. -except NameError:
  43913. - pass # Python < 2.2 doesn't have 'property'.
  43914. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
  43915. - if (name == "thisown"): return self.this.own(value)
  43916. - if (name == "this"):
  43917. - if type(value).__name__ == 'SwigPyObject':
  43918. - self.__dict__[name] = value
  43919. - return
  43920. - method = class_type.__swig_setmethods__.get(name,None)
  43921. - if method: return method(self,value)
  43922. - if (not static):
  43923. - self.__dict__[name] = value
  43924. - else:
  43925. - raise AttributeError("You cannot add attributes to %s" % self)
  43926. -
  43927. -def _swig_setattr(self,class_type,name,value):
  43928. - return _swig_setattr_nondynamic(self,class_type,name,value,0)
  43929. -
  43930. -def _swig_getattr(self,class_type,name):
  43931. - if (name == "thisown"): return self.this.own()
  43932. - method = class_type.__swig_getmethods__.get(name,None)
  43933. - if method: return method(self)
  43934. - raise AttributeError(name)
  43935. -
  43936. -def _swig_repr(self):
  43937. - try: strthis = "proxy of " + self.this.__repr__()
  43938. - except: strthis = ""
  43939. - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  43940. -
  43941. -try:
  43942. - _object = object
  43943. - _newclass = 1
  43944. -except AttributeError:
  43945. - class _object : pass
  43946. - _newclass = 0
  43947. -
  43948. -
  43949. -import VError
  43950. -class VDisplay(_object):
  43951. - __swig_setmethods__ = {}
  43952. - __setattr__ = lambda self, name, value: _swig_setattr(self, VDisplay, name, value)
  43953. - __swig_getmethods__ = {}
  43954. - __getattr__ = lambda self, name: _swig_getattr(self, VDisplay, name)
  43955. - __repr__ = _swig_repr
  43956. - BARCO = vdisplaymodule.VDisplay_BARCO
  43957. - DUMB = vdisplaymodule.VDisplay_DUMB
  43958. - def __init__(self, *args):
  43959. - this = vdisplaymodule.new_VDisplay(*args)
  43960. - try: self.this.append(this)
  43961. - except: self.this = this
  43962. - def __assign__(self, *args): return vdisplaymodule.VDisplay___assign__(self, *args)
  43963. - __swig_destroy__ = vdisplaymodule.delete_VDisplay
  43964. - __del__ = lambda self : None;
  43965. - def disp(self): return vdisplaymodule.VDisplay_disp(self)
  43966. - def luts(self): return vdisplaymodule.VDisplay_luts(self)
  43967. -VDisplay_swigregister = vdisplaymodule.VDisplay_swigregister
  43968. -VDisplay_swigregister(VDisplay)
  43969. -
  43970. -# This file is compatible with both classic and new-style classes.
  43971. -
  43972. -
  43973. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VError.i vips-7.38.5/swig/vipsCC/VError.i
  43974. --- vips-7.38.5-vanilla/swig/vipsCC/VError.i 2014-07-17 23:48:36.209794473 -0400
  43975. +++ vips-7.38.5/swig/vipsCC/VError.i 1969-12-31 19:00:00.000000000 -0500
  43976. @@ -1,19 +0,0 @@
  43977. -/* SWIG interface file for VError.
  43978. - */
  43979. -
  43980. -%module VError
  43981. -%{
  43982. -#include <vips/vipscpp.h>
  43983. -%}
  43984. -
  43985. -%include "std_except.i"
  43986. -%include "std_string.i"
  43987. -
  43988. -%include vips/VError.h
  43989. -
  43990. -%extend vips::VError {
  43991. - const char *__str__ () {
  43992. - return $self->what ();
  43993. - }
  43994. -}
  43995. -
  43996. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/verrormodule.cxx vips-7.38.5/swig/vipsCC/verrormodule.cxx
  43997. --- vips-7.38.5-vanilla/swig/vipsCC/verrormodule.cxx 2014-07-17 23:48:36.211794473 -0400
  43998. +++ vips-7.38.5/swig/vipsCC/verrormodule.cxx 1969-12-31 19:00:00.000000000 -0500
  43999. @@ -1,4593 +0,0 @@
  44000. -/* ----------------------------------------------------------------------------
  44001. - * This file was automatically generated by SWIG (http://www.swig.org).
  44002. - * Version 2.0.10
  44003. - *
  44004. - * This file is not intended to be easily readable and contains a number of
  44005. - * coding conventions designed to improve portability and efficiency. Do not make
  44006. - * changes to this file unless you know what you are doing--modify the SWIG
  44007. - * interface file instead.
  44008. - * ----------------------------------------------------------------------------- */
  44009. -
  44010. -#define SWIGPYTHON
  44011. -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  44012. -
  44013. -
  44014. -#ifdef __cplusplus
  44015. -/* SwigValueWrapper is described in swig.swg */
  44016. -template<typename T> class SwigValueWrapper {
  44017. - struct SwigMovePointer {
  44018. - T *ptr;
  44019. - SwigMovePointer(T *p) : ptr(p) { }
  44020. - ~SwigMovePointer() { delete ptr; }
  44021. - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  44022. - } pointer;
  44023. - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  44024. - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  44025. -public:
  44026. - SwigValueWrapper() : pointer(0) { }
  44027. - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  44028. - operator T&() const { return *pointer.ptr; }
  44029. - T *operator&() { return pointer.ptr; }
  44030. -};
  44031. -
  44032. -template <typename T> T SwigValueInit() {
  44033. - return T();
  44034. -}
  44035. -#endif
  44036. -
  44037. -/* -----------------------------------------------------------------------------
  44038. - * This section contains generic SWIG labels for method/variable
  44039. - * declarations/attributes, and other compiler dependent labels.
  44040. - * ----------------------------------------------------------------------------- */
  44041. -
  44042. -/* template workaround for compilers that cannot correctly implement the C++ standard */
  44043. -#ifndef SWIGTEMPLATEDISAMBIGUATOR
  44044. -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  44045. -# define SWIGTEMPLATEDISAMBIGUATOR template
  44046. -# elif defined(__HP_aCC)
  44047. -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  44048. -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  44049. -# define SWIGTEMPLATEDISAMBIGUATOR template
  44050. -# else
  44051. -# define SWIGTEMPLATEDISAMBIGUATOR
  44052. -# endif
  44053. -#endif
  44054. -
  44055. -/* inline attribute */
  44056. -#ifndef SWIGINLINE
  44057. -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  44058. -# define SWIGINLINE inline
  44059. -# else
  44060. -# define SWIGINLINE
  44061. -# endif
  44062. -#endif
  44063. -
  44064. -/* attribute recognised by some compilers to avoid 'unused' warnings */
  44065. -#ifndef SWIGUNUSED
  44066. -# if defined(__GNUC__)
  44067. -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  44068. -# define SWIGUNUSED __attribute__ ((__unused__))
  44069. -# else
  44070. -# define SWIGUNUSED
  44071. -# endif
  44072. -# elif defined(__ICC)
  44073. -# define SWIGUNUSED __attribute__ ((__unused__))
  44074. -# else
  44075. -# define SWIGUNUSED
  44076. -# endif
  44077. -#endif
  44078. -
  44079. -#ifndef SWIG_MSC_UNSUPPRESS_4505
  44080. -# if defined(_MSC_VER)
  44081. -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
  44082. -# endif
  44083. -#endif
  44084. -
  44085. -#ifndef SWIGUNUSEDPARM
  44086. -# ifdef __cplusplus
  44087. -# define SWIGUNUSEDPARM(p)
  44088. -# else
  44089. -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
  44090. -# endif
  44091. -#endif
  44092. -
  44093. -/* internal SWIG method */
  44094. -#ifndef SWIGINTERN
  44095. -# define SWIGINTERN static SWIGUNUSED
  44096. -#endif
  44097. -
  44098. -/* internal inline SWIG method */
  44099. -#ifndef SWIGINTERNINLINE
  44100. -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  44101. -#endif
  44102. -
  44103. -/* exporting methods */
  44104. -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  44105. -# ifndef GCC_HASCLASSVISIBILITY
  44106. -# define GCC_HASCLASSVISIBILITY
  44107. -# endif
  44108. -#endif
  44109. -
  44110. -#ifndef SWIGEXPORT
  44111. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  44112. -# if defined(STATIC_LINKED)
  44113. -# define SWIGEXPORT
  44114. -# else
  44115. -# define SWIGEXPORT __declspec(dllexport)
  44116. -# endif
  44117. -# else
  44118. -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  44119. -# define SWIGEXPORT __attribute__ ((visibility("default")))
  44120. -# else
  44121. -# define SWIGEXPORT
  44122. -# endif
  44123. -# endif
  44124. -#endif
  44125. -
  44126. -/* calling conventions for Windows */
  44127. -#ifndef SWIGSTDCALL
  44128. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  44129. -# define SWIGSTDCALL __stdcall
  44130. -# else
  44131. -# define SWIGSTDCALL
  44132. -# endif
  44133. -#endif
  44134. -
  44135. -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  44136. -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  44137. -# define _CRT_SECURE_NO_DEPRECATE
  44138. -#endif
  44139. -
  44140. -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  44141. -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  44142. -# define _SCL_SECURE_NO_DEPRECATE
  44143. -#endif
  44144. -
  44145. -
  44146. -
  44147. -/* Python.h has to appear first */
  44148. -#include <Python.h>
  44149. -
  44150. -/* -----------------------------------------------------------------------------
  44151. - * swigrun.swg
  44152. - *
  44153. - * This file contains generic C API SWIG runtime support for pointer
  44154. - * type checking.
  44155. - * ----------------------------------------------------------------------------- */
  44156. -
  44157. -/* This should only be incremented when either the layout of swig_type_info changes,
  44158. - or for whatever reason, the runtime changes incompatibly */
  44159. -#define SWIG_RUNTIME_VERSION "4"
  44160. -
  44161. -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  44162. -#ifdef SWIG_TYPE_TABLE
  44163. -# define SWIG_QUOTE_STRING(x) #x
  44164. -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  44165. -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  44166. -#else
  44167. -# define SWIG_TYPE_TABLE_NAME
  44168. -#endif
  44169. -
  44170. -/*
  44171. - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  44172. - creating a static or dynamic library from the SWIG runtime code.
  44173. - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  44174. -
  44175. - But only do this if strictly necessary, ie, if you have problems
  44176. - with your compiler or suchlike.
  44177. -*/
  44178. -
  44179. -#ifndef SWIGRUNTIME
  44180. -# define SWIGRUNTIME SWIGINTERN
  44181. -#endif
  44182. -
  44183. -#ifndef SWIGRUNTIMEINLINE
  44184. -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  44185. -#endif
  44186. -
  44187. -/* Generic buffer size */
  44188. -#ifndef SWIG_BUFFER_SIZE
  44189. -# define SWIG_BUFFER_SIZE 1024
  44190. -#endif
  44191. -
  44192. -/* Flags for pointer conversions */
  44193. -#define SWIG_POINTER_DISOWN 0x1
  44194. -#define SWIG_CAST_NEW_MEMORY 0x2
  44195. -
  44196. -/* Flags for new pointer objects */
  44197. -#define SWIG_POINTER_OWN 0x1
  44198. -
  44199. -
  44200. -/*
  44201. - Flags/methods for returning states.
  44202. -
  44203. - The SWIG conversion methods, as ConvertPtr, return an integer
  44204. - that tells if the conversion was successful or not. And if not,
  44205. - an error code can be returned (see swigerrors.swg for the codes).
  44206. -
  44207. - Use the following macros/flags to set or process the returning
  44208. - states.
  44209. -
  44210. - In old versions of SWIG, code such as the following was usually written:
  44211. -
  44212. - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  44213. - // success code
  44214. - } else {
  44215. - //fail code
  44216. - }
  44217. -
  44218. - Now you can be more explicit:
  44219. -
  44220. - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  44221. - if (SWIG_IsOK(res)) {
  44222. - // success code
  44223. - } else {
  44224. - // fail code
  44225. - }
  44226. -
  44227. - which is the same really, but now you can also do
  44228. -
  44229. - Type *ptr;
  44230. - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  44231. - if (SWIG_IsOK(res)) {
  44232. - // success code
  44233. - if (SWIG_IsNewObj(res) {
  44234. - ...
  44235. - delete *ptr;
  44236. - } else {
  44237. - ...
  44238. - }
  44239. - } else {
  44240. - // fail code
  44241. - }
  44242. -
  44243. - I.e., now SWIG_ConvertPtr can return new objects and you can
  44244. - identify the case and take care of the deallocation. Of course that
  44245. - also requires SWIG_ConvertPtr to return new result values, such as
  44246. -
  44247. - int SWIG_ConvertPtr(obj, ptr,...) {
  44248. - if (<obj is ok>) {
  44249. - if (<need new object>) {
  44250. - *ptr = <ptr to new allocated object>;
  44251. - return SWIG_NEWOBJ;
  44252. - } else {
  44253. - *ptr = <ptr to old object>;
  44254. - return SWIG_OLDOBJ;
  44255. - }
  44256. - } else {
  44257. - return SWIG_BADOBJ;
  44258. - }
  44259. - }
  44260. -
  44261. - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  44262. - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  44263. - SWIG errors code.
  44264. -
  44265. - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  44266. - allows to return the 'cast rank', for example, if you have this
  44267. -
  44268. - int food(double)
  44269. - int fooi(int);
  44270. -
  44271. - and you call
  44272. -
  44273. - food(1) // cast rank '1' (1 -> 1.0)
  44274. - fooi(1) // cast rank '0'
  44275. -
  44276. - just use the SWIG_AddCast()/SWIG_CheckState()
  44277. -*/
  44278. -
  44279. -#define SWIG_OK (0)
  44280. -#define SWIG_ERROR (-1)
  44281. -#define SWIG_IsOK(r) (r >= 0)
  44282. -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  44283. -
  44284. -/* The CastRankLimit says how many bits are used for the cast rank */
  44285. -#define SWIG_CASTRANKLIMIT (1 << 8)
  44286. -/* The NewMask denotes the object was created (using new/malloc) */
  44287. -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  44288. -/* The TmpMask is for in/out typemaps that use temporal objects */
  44289. -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  44290. -/* Simple returning values */
  44291. -#define SWIG_BADOBJ (SWIG_ERROR)
  44292. -#define SWIG_OLDOBJ (SWIG_OK)
  44293. -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  44294. -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  44295. -/* Check, add and del mask methods */
  44296. -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  44297. -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  44298. -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  44299. -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  44300. -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  44301. -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  44302. -
  44303. -/* Cast-Rank Mode */
  44304. -#if defined(SWIG_CASTRANK_MODE)
  44305. -# ifndef SWIG_TypeRank
  44306. -# define SWIG_TypeRank unsigned long
  44307. -# endif
  44308. -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  44309. -# define SWIG_MAXCASTRANK (2)
  44310. -# endif
  44311. -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  44312. -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  44313. -SWIGINTERNINLINE int SWIG_AddCast(int r) {
  44314. - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  44315. -}
  44316. -SWIGINTERNINLINE int SWIG_CheckState(int r) {
  44317. - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  44318. -}
  44319. -#else /* no cast-rank mode */
  44320. -# define SWIG_AddCast(r) (r)
  44321. -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  44322. -#endif
  44323. -
  44324. -
  44325. -#include <string.h>
  44326. -
  44327. -#ifdef __cplusplus
  44328. -extern "C" {
  44329. -#endif
  44330. -
  44331. -typedef void *(*swig_converter_func)(void *, int *);
  44332. -typedef struct swig_type_info *(*swig_dycast_func)(void **);
  44333. -
  44334. -/* Structure to store information on one type */
  44335. -typedef struct swig_type_info {
  44336. - const char *name; /* mangled name of this type */
  44337. - const char *str; /* human readable name of this type */
  44338. - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  44339. - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  44340. - void *clientdata; /* language specific type data */
  44341. - int owndata; /* flag if the structure owns the clientdata */
  44342. -} swig_type_info;
  44343. -
  44344. -/* Structure to store a type and conversion function used for casting */
  44345. -typedef struct swig_cast_info {
  44346. - swig_type_info *type; /* pointer to type that is equivalent to this type */
  44347. - swig_converter_func converter; /* function to cast the void pointers */
  44348. - struct swig_cast_info *next; /* pointer to next cast in linked list */
  44349. - struct swig_cast_info *prev; /* pointer to the previous cast */
  44350. -} swig_cast_info;
  44351. -
  44352. -/* Structure used to store module information
  44353. - * Each module generates one structure like this, and the runtime collects
  44354. - * all of these structures and stores them in a circularly linked list.*/
  44355. -typedef struct swig_module_info {
  44356. - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  44357. - size_t size; /* Number of types in this module */
  44358. - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  44359. - swig_type_info **type_initial; /* Array of initially generated type structures */
  44360. - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  44361. - void *clientdata; /* Language specific module data */
  44362. -} swig_module_info;
  44363. -
  44364. -/*
  44365. - Compare two type names skipping the space characters, therefore
  44366. - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  44367. -
  44368. - Return 0 when the two name types are equivalent, as in
  44369. - strncmp, but skipping ' '.
  44370. -*/
  44371. -SWIGRUNTIME int
  44372. -SWIG_TypeNameComp(const char *f1, const char *l1,
  44373. - const char *f2, const char *l2) {
  44374. - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  44375. - while ((*f1 == ' ') && (f1 != l1)) ++f1;
  44376. - while ((*f2 == ' ') && (f2 != l2)) ++f2;
  44377. - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  44378. - }
  44379. - return (int)((l1 - f1) - (l2 - f2));
  44380. -}
  44381. -
  44382. -/*
  44383. - Check type equivalence in a name list like <name1>|<name2>|...
  44384. - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  44385. -*/
  44386. -SWIGRUNTIME int
  44387. -SWIG_TypeCmp(const char *nb, const char *tb) {
  44388. - int equiv = 1;
  44389. - const char* te = tb + strlen(tb);
  44390. - const char* ne = nb;
  44391. - while (equiv != 0 && *ne) {
  44392. - for (nb = ne; *ne; ++ne) {
  44393. - if (*ne == '|') break;
  44394. - }
  44395. - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  44396. - if (*ne) ++ne;
  44397. - }
  44398. - return equiv;
  44399. -}
  44400. -
  44401. -/*
  44402. - Check type equivalence in a name list like <name1>|<name2>|...
  44403. - Return 0 if not equal, 1 if equal
  44404. -*/
  44405. -SWIGRUNTIME int
  44406. -SWIG_TypeEquiv(const char *nb, const char *tb) {
  44407. - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  44408. -}
  44409. -
  44410. -/*
  44411. - Check the typename
  44412. -*/
  44413. -SWIGRUNTIME swig_cast_info *
  44414. -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  44415. - if (ty) {
  44416. - swig_cast_info *iter = ty->cast;
  44417. - while (iter) {
  44418. - if (strcmp(iter->type->name, c) == 0) {
  44419. - if (iter == ty->cast)
  44420. - return iter;
  44421. - /* Move iter to the top of the linked list */
  44422. - iter->prev->next = iter->next;
  44423. - if (iter->next)
  44424. - iter->next->prev = iter->prev;
  44425. - iter->next = ty->cast;
  44426. - iter->prev = 0;
  44427. - if (ty->cast) ty->cast->prev = iter;
  44428. - ty->cast = iter;
  44429. - return iter;
  44430. - }
  44431. - iter = iter->next;
  44432. - }
  44433. - }
  44434. - return 0;
  44435. -}
  44436. -
  44437. -/*
  44438. - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  44439. -*/
  44440. -SWIGRUNTIME swig_cast_info *
  44441. -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  44442. - if (ty) {
  44443. - swig_cast_info *iter = ty->cast;
  44444. - while (iter) {
  44445. - if (iter->type == from) {
  44446. - if (iter == ty->cast)
  44447. - return iter;
  44448. - /* Move iter to the top of the linked list */
  44449. - iter->prev->next = iter->next;
  44450. - if (iter->next)
  44451. - iter->next->prev = iter->prev;
  44452. - iter->next = ty->cast;
  44453. - iter->prev = 0;
  44454. - if (ty->cast) ty->cast->prev = iter;
  44455. - ty->cast = iter;
  44456. - return iter;
  44457. - }
  44458. - iter = iter->next;
  44459. - }
  44460. - }
  44461. - return 0;
  44462. -}
  44463. -
  44464. -/*
  44465. - Cast a pointer up an inheritance hierarchy
  44466. -*/
  44467. -SWIGRUNTIMEINLINE void *
  44468. -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  44469. - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  44470. -}
  44471. -
  44472. -/*
  44473. - Dynamic pointer casting. Down an inheritance hierarchy
  44474. -*/
  44475. -SWIGRUNTIME swig_type_info *
  44476. -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  44477. - swig_type_info *lastty = ty;
  44478. - if (!ty || !ty->dcast) return ty;
  44479. - while (ty && (ty->dcast)) {
  44480. - ty = (*ty->dcast)(ptr);
  44481. - if (ty) lastty = ty;
  44482. - }
  44483. - return lastty;
  44484. -}
  44485. -
  44486. -/*
  44487. - Return the name associated with this type
  44488. -*/
  44489. -SWIGRUNTIMEINLINE const char *
  44490. -SWIG_TypeName(const swig_type_info *ty) {
  44491. - return ty->name;
  44492. -}
  44493. -
  44494. -/*
  44495. - Return the pretty name associated with this type,
  44496. - that is an unmangled type name in a form presentable to the user.
  44497. -*/
  44498. -SWIGRUNTIME const char *
  44499. -SWIG_TypePrettyName(const swig_type_info *type) {
  44500. - /* The "str" field contains the equivalent pretty names of the
  44501. - type, separated by vertical-bar characters. We choose
  44502. - to print the last name, as it is often (?) the most
  44503. - specific. */
  44504. - if (!type) return NULL;
  44505. - if (type->str != NULL) {
  44506. - const char *last_name = type->str;
  44507. - const char *s;
  44508. - for (s = type->str; *s; s++)
  44509. - if (*s == '|') last_name = s+1;
  44510. - return last_name;
  44511. - }
  44512. - else
  44513. - return type->name;
  44514. -}
  44515. -
  44516. -/*
  44517. - Set the clientdata field for a type
  44518. -*/
  44519. -SWIGRUNTIME void
  44520. -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  44521. - swig_cast_info *cast = ti->cast;
  44522. - /* if (ti->clientdata == clientdata) return; */
  44523. - ti->clientdata = clientdata;
  44524. -
  44525. - while (cast) {
  44526. - if (!cast->converter) {
  44527. - swig_type_info *tc = cast->type;
  44528. - if (!tc->clientdata) {
  44529. - SWIG_TypeClientData(tc, clientdata);
  44530. - }
  44531. - }
  44532. - cast = cast->next;
  44533. - }
  44534. -}
  44535. -SWIGRUNTIME void
  44536. -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  44537. - SWIG_TypeClientData(ti, clientdata);
  44538. - ti->owndata = 1;
  44539. -}
  44540. -
  44541. -/*
  44542. - Search for a swig_type_info structure only by mangled name
  44543. - Search is a O(log #types)
  44544. -
  44545. - We start searching at module start, and finish searching when start == end.
  44546. - Note: if start == end at the beginning of the function, we go all the way around
  44547. - the circular list.
  44548. -*/
  44549. -SWIGRUNTIME swig_type_info *
  44550. -SWIG_MangledTypeQueryModule(swig_module_info *start,
  44551. - swig_module_info *end,
  44552. - const char *name) {
  44553. - swig_module_info *iter = start;
  44554. - do {
  44555. - if (iter->size) {
  44556. - register size_t l = 0;
  44557. - register size_t r = iter->size - 1;
  44558. - do {
  44559. - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  44560. - register size_t i = (l + r) >> 1;
  44561. - const char *iname = iter->types[i]->name;
  44562. - if (iname) {
  44563. - register int compare = strcmp(name, iname);
  44564. - if (compare == 0) {
  44565. - return iter->types[i];
  44566. - } else if (compare < 0) {
  44567. - if (i) {
  44568. - r = i - 1;
  44569. - } else {
  44570. - break;
  44571. - }
  44572. - } else if (compare > 0) {
  44573. - l = i + 1;
  44574. - }
  44575. - } else {
  44576. - break; /* should never happen */
  44577. - }
  44578. - } while (l <= r);
  44579. - }
  44580. - iter = iter->next;
  44581. - } while (iter != end);
  44582. - return 0;
  44583. -}
  44584. -
  44585. -/*
  44586. - Search for a swig_type_info structure for either a mangled name or a human readable name.
  44587. - It first searches the mangled names of the types, which is a O(log #types)
  44588. - If a type is not found it then searches the human readable names, which is O(#types).
  44589. -
  44590. - We start searching at module start, and finish searching when start == end.
  44591. - Note: if start == end at the beginning of the function, we go all the way around
  44592. - the circular list.
  44593. -*/
  44594. -SWIGRUNTIME swig_type_info *
  44595. -SWIG_TypeQueryModule(swig_module_info *start,
  44596. - swig_module_info *end,
  44597. - const char *name) {
  44598. - /* STEP 1: Search the name field using binary search */
  44599. - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  44600. - if (ret) {
  44601. - return ret;
  44602. - } else {
  44603. - /* STEP 2: If the type hasn't been found, do a complete search
  44604. - of the str field (the human readable name) */
  44605. - swig_module_info *iter = start;
  44606. - do {
  44607. - register size_t i = 0;
  44608. - for (; i < iter->size; ++i) {
  44609. - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  44610. - return iter->types[i];
  44611. - }
  44612. - iter = iter->next;
  44613. - } while (iter != end);
  44614. - }
  44615. -
  44616. - /* neither found a match */
  44617. - return 0;
  44618. -}
  44619. -
  44620. -/*
  44621. - Pack binary data into a string
  44622. -*/
  44623. -SWIGRUNTIME char *
  44624. -SWIG_PackData(char *c, void *ptr, size_t sz) {
  44625. - static const char hex[17] = "0123456789abcdef";
  44626. - register const unsigned char *u = (unsigned char *) ptr;
  44627. - register const unsigned char *eu = u + sz;
  44628. - for (; u != eu; ++u) {
  44629. - register unsigned char uu = *u;
  44630. - *(c++) = hex[(uu & 0xf0) >> 4];
  44631. - *(c++) = hex[uu & 0xf];
  44632. - }
  44633. - return c;
  44634. -}
  44635. -
  44636. -/*
  44637. - Unpack binary data from a string
  44638. -*/
  44639. -SWIGRUNTIME const char *
  44640. -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  44641. - register unsigned char *u = (unsigned char *) ptr;
  44642. - register const unsigned char *eu = u + sz;
  44643. - for (; u != eu; ++u) {
  44644. - register char d = *(c++);
  44645. - register unsigned char uu;
  44646. - if ((d >= '0') && (d <= '9'))
  44647. - uu = ((d - '0') << 4);
  44648. - else if ((d >= 'a') && (d <= 'f'))
  44649. - uu = ((d - ('a'-10)) << 4);
  44650. - else
  44651. - return (char *) 0;
  44652. - d = *(c++);
  44653. - if ((d >= '0') && (d <= '9'))
  44654. - uu |= (d - '0');
  44655. - else if ((d >= 'a') && (d <= 'f'))
  44656. - uu |= (d - ('a'-10));
  44657. - else
  44658. - return (char *) 0;
  44659. - *u = uu;
  44660. - }
  44661. - return c;
  44662. -}
  44663. -
  44664. -/*
  44665. - Pack 'void *' into a string buffer.
  44666. -*/
  44667. -SWIGRUNTIME char *
  44668. -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  44669. - char *r = buff;
  44670. - if ((2*sizeof(void *) + 2) > bsz) return 0;
  44671. - *(r++) = '_';
  44672. - r = SWIG_PackData(r,&ptr,sizeof(void *));
  44673. - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  44674. - strcpy(r,name);
  44675. - return buff;
  44676. -}
  44677. -
  44678. -SWIGRUNTIME const char *
  44679. -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  44680. - if (*c != '_') {
  44681. - if (strcmp(c,"NULL") == 0) {
  44682. - *ptr = (void *) 0;
  44683. - return name;
  44684. - } else {
  44685. - return 0;
  44686. - }
  44687. - }
  44688. - return SWIG_UnpackData(++c,ptr,sizeof(void *));
  44689. -}
  44690. -
  44691. -SWIGRUNTIME char *
  44692. -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  44693. - char *r = buff;
  44694. - size_t lname = (name ? strlen(name) : 0);
  44695. - if ((2*sz + 2 + lname) > bsz) return 0;
  44696. - *(r++) = '_';
  44697. - r = SWIG_PackData(r,ptr,sz);
  44698. - if (lname) {
  44699. - strncpy(r,name,lname+1);
  44700. - } else {
  44701. - *r = 0;
  44702. - }
  44703. - return buff;
  44704. -}
  44705. -
  44706. -SWIGRUNTIME const char *
  44707. -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  44708. - if (*c != '_') {
  44709. - if (strcmp(c,"NULL") == 0) {
  44710. - memset(ptr,0,sz);
  44711. - return name;
  44712. - } else {
  44713. - return 0;
  44714. - }
  44715. - }
  44716. - return SWIG_UnpackData(++c,ptr,sz);
  44717. -}
  44718. -
  44719. -#ifdef __cplusplus
  44720. -}
  44721. -#endif
  44722. -
  44723. -/* Errors in SWIG */
  44724. -#define SWIG_UnknownError -1
  44725. -#define SWIG_IOError -2
  44726. -#define SWIG_RuntimeError -3
  44727. -#define SWIG_IndexError -4
  44728. -#define SWIG_TypeError -5
  44729. -#define SWIG_DivisionByZero -6
  44730. -#define SWIG_OverflowError -7
  44731. -#define SWIG_SyntaxError -8
  44732. -#define SWIG_ValueError -9
  44733. -#define SWIG_SystemError -10
  44734. -#define SWIG_AttributeError -11
  44735. -#define SWIG_MemoryError -12
  44736. -#define SWIG_NullReferenceError -13
  44737. -
  44738. -
  44739. -
  44740. -/* Compatibility macros for Python 3 */
  44741. -#if PY_VERSION_HEX >= 0x03000000
  44742. -
  44743. -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  44744. -#define PyInt_Check(x) PyLong_Check(x)
  44745. -#define PyInt_AsLong(x) PyLong_AsLong(x)
  44746. -#define PyInt_FromLong(x) PyLong_FromLong(x)
  44747. -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  44748. -#define PyString_Check(name) PyBytes_Check(name)
  44749. -#define PyString_FromString(x) PyUnicode_FromString(x)
  44750. -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  44751. -#define PyString_AsString(str) PyBytes_AsString(str)
  44752. -#define PyString_Size(str) PyBytes_Size(str)
  44753. -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  44754. -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  44755. -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  44756. -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  44757. -
  44758. -#endif
  44759. -
  44760. -#ifndef Py_TYPE
  44761. -# define Py_TYPE(op) ((op)->ob_type)
  44762. -#endif
  44763. -
  44764. -/* SWIG APIs for compatibility of both Python 2 & 3 */
  44765. -
  44766. -#if PY_VERSION_HEX >= 0x03000000
  44767. -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  44768. -#else
  44769. -# define SWIG_Python_str_FromFormat PyString_FromFormat
  44770. -#endif
  44771. -
  44772. -
  44773. -/* Warning: This function will allocate a new string in Python 3,
  44774. - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  44775. - */
  44776. -SWIGINTERN char*
  44777. -SWIG_Python_str_AsChar(PyObject *str)
  44778. -{
  44779. -#if PY_VERSION_HEX >= 0x03000000
  44780. - char *cstr;
  44781. - char *newstr;
  44782. - Py_ssize_t len;
  44783. - str = PyUnicode_AsUTF8String(str);
  44784. - PyBytes_AsStringAndSize(str, &cstr, &len);
  44785. - newstr = (char *) malloc(len+1);
  44786. - memcpy(newstr, cstr, len+1);
  44787. - Py_XDECREF(str);
  44788. - return newstr;
  44789. -#else
  44790. - return PyString_AsString(str);
  44791. -#endif
  44792. -}
  44793. -
  44794. -#if PY_VERSION_HEX >= 0x03000000
  44795. -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  44796. -#else
  44797. -# define SWIG_Python_str_DelForPy3(x)
  44798. -#endif
  44799. -
  44800. -
  44801. -SWIGINTERN PyObject*
  44802. -SWIG_Python_str_FromChar(const char *c)
  44803. -{
  44804. -#if PY_VERSION_HEX >= 0x03000000
  44805. - return PyUnicode_FromString(c);
  44806. -#else
  44807. - return PyString_FromString(c);
  44808. -#endif
  44809. -}
  44810. -
  44811. -/* Add PyOS_snprintf for old Pythons */
  44812. -#if PY_VERSION_HEX < 0x02020000
  44813. -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
  44814. -# define PyOS_snprintf _snprintf
  44815. -# else
  44816. -# define PyOS_snprintf snprintf
  44817. -# endif
  44818. -#endif
  44819. -
  44820. -/* A crude PyString_FromFormat implementation for old Pythons */
  44821. -#if PY_VERSION_HEX < 0x02020000
  44822. -
  44823. -#ifndef SWIG_PYBUFFER_SIZE
  44824. -# define SWIG_PYBUFFER_SIZE 1024
  44825. -#endif
  44826. -
  44827. -static PyObject *
  44828. -PyString_FromFormat(const char *fmt, ...) {
  44829. - va_list ap;
  44830. - char buf[SWIG_PYBUFFER_SIZE * 2];
  44831. - int res;
  44832. - va_start(ap, fmt);
  44833. - res = vsnprintf(buf, sizeof(buf), fmt, ap);
  44834. - va_end(ap);
  44835. - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
  44836. -}
  44837. -#endif
  44838. -
  44839. -/* Add PyObject_Del for old Pythons */
  44840. -#if PY_VERSION_HEX < 0x01060000
  44841. -# define PyObject_Del(op) PyMem_DEL((op))
  44842. -#endif
  44843. -#ifndef PyObject_DEL
  44844. -# define PyObject_DEL PyObject_Del
  44845. -#endif
  44846. -
  44847. -/* A crude PyExc_StopIteration exception for old Pythons */
  44848. -#if PY_VERSION_HEX < 0x02020000
  44849. -# ifndef PyExc_StopIteration
  44850. -# define PyExc_StopIteration PyExc_RuntimeError
  44851. -# endif
  44852. -# ifndef PyObject_GenericGetAttr
  44853. -# define PyObject_GenericGetAttr 0
  44854. -# endif
  44855. -#endif
  44856. -
  44857. -/* Py_NotImplemented is defined in 2.1 and up. */
  44858. -#if PY_VERSION_HEX < 0x02010000
  44859. -# ifndef Py_NotImplemented
  44860. -# define Py_NotImplemented PyExc_RuntimeError
  44861. -# endif
  44862. -#endif
  44863. -
  44864. -/* A crude PyString_AsStringAndSize implementation for old Pythons */
  44865. -#if PY_VERSION_HEX < 0x02010000
  44866. -# ifndef PyString_AsStringAndSize
  44867. -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
  44868. -# endif
  44869. -#endif
  44870. -
  44871. -/* PySequence_Size for old Pythons */
  44872. -#if PY_VERSION_HEX < 0x02000000
  44873. -# ifndef PySequence_Size
  44874. -# define PySequence_Size PySequence_Length
  44875. -# endif
  44876. -#endif
  44877. -
  44878. -/* PyBool_FromLong for old Pythons */
  44879. -#if PY_VERSION_HEX < 0x02030000
  44880. -static
  44881. -PyObject *PyBool_FromLong(long ok)
  44882. -{
  44883. - PyObject *result = ok ? Py_True : Py_False;
  44884. - Py_INCREF(result);
  44885. - return result;
  44886. -}
  44887. -#endif
  44888. -
  44889. -/* Py_ssize_t for old Pythons */
  44890. -/* This code is as recommended by: */
  44891. -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
  44892. -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
  44893. -typedef int Py_ssize_t;
  44894. -# define PY_SSIZE_T_MAX INT_MAX
  44895. -# define PY_SSIZE_T_MIN INT_MIN
  44896. -typedef inquiry lenfunc;
  44897. -typedef intargfunc ssizeargfunc;
  44898. -typedef intintargfunc ssizessizeargfunc;
  44899. -typedef intobjargproc ssizeobjargproc;
  44900. -typedef intintobjargproc ssizessizeobjargproc;
  44901. -typedef getreadbufferproc readbufferproc;
  44902. -typedef getwritebufferproc writebufferproc;
  44903. -typedef getsegcountproc segcountproc;
  44904. -typedef getcharbufferproc charbufferproc;
  44905. -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  44906. -{
  44907. - long result = 0;
  44908. - PyObject *i = PyNumber_Int(x);
  44909. - if (i) {
  44910. - result = PyInt_AsLong(i);
  44911. - Py_DECREF(i);
  44912. - }
  44913. - return result;
  44914. -}
  44915. -#endif
  44916. -
  44917. -#if PY_VERSION_HEX < 0x02050000
  44918. -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
  44919. -#endif
  44920. -
  44921. -#if PY_VERSION_HEX < 0x02040000
  44922. -#define Py_VISIT(op) \
  44923. - do { \
  44924. - if (op) { \
  44925. - int vret = visit((op), arg); \
  44926. - if (vret) \
  44927. - return vret; \
  44928. - } \
  44929. - } while (0)
  44930. -#endif
  44931. -
  44932. -#if PY_VERSION_HEX < 0x02030000
  44933. -typedef struct {
  44934. - PyTypeObject type;
  44935. - PyNumberMethods as_number;
  44936. - PyMappingMethods as_mapping;
  44937. - PySequenceMethods as_sequence;
  44938. - PyBufferProcs as_buffer;
  44939. - PyObject *name, *slots;
  44940. -} PyHeapTypeObject;
  44941. -#endif
  44942. -
  44943. -#if PY_VERSION_HEX < 0x02030000
  44944. -typedef destructor freefunc;
  44945. -#endif
  44946. -
  44947. -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
  44948. - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
  44949. - (PY_MAJOR_VERSION > 3))
  44950. -# define SWIGPY_USE_CAPSULE
  44951. -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  44952. -#endif
  44953. -
  44954. -#if PY_VERSION_HEX < 0x03020000
  44955. -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  44956. -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  44957. -#endif
  44958. -
  44959. -/* -----------------------------------------------------------------------------
  44960. - * error manipulation
  44961. - * ----------------------------------------------------------------------------- */
  44962. -
  44963. -SWIGRUNTIME PyObject*
  44964. -SWIG_Python_ErrorType(int code) {
  44965. - PyObject* type = 0;
  44966. - switch(code) {
  44967. - case SWIG_MemoryError:
  44968. - type = PyExc_MemoryError;
  44969. - break;
  44970. - case SWIG_IOError:
  44971. - type = PyExc_IOError;
  44972. - break;
  44973. - case SWIG_RuntimeError:
  44974. - type = PyExc_RuntimeError;
  44975. - break;
  44976. - case SWIG_IndexError:
  44977. - type = PyExc_IndexError;
  44978. - break;
  44979. - case SWIG_TypeError:
  44980. - type = PyExc_TypeError;
  44981. - break;
  44982. - case SWIG_DivisionByZero:
  44983. - type = PyExc_ZeroDivisionError;
  44984. - break;
  44985. - case SWIG_OverflowError:
  44986. - type = PyExc_OverflowError;
  44987. - break;
  44988. - case SWIG_SyntaxError:
  44989. - type = PyExc_SyntaxError;
  44990. - break;
  44991. - case SWIG_ValueError:
  44992. - type = PyExc_ValueError;
  44993. - break;
  44994. - case SWIG_SystemError:
  44995. - type = PyExc_SystemError;
  44996. - break;
  44997. - case SWIG_AttributeError:
  44998. - type = PyExc_AttributeError;
  44999. - break;
  45000. - default:
  45001. - type = PyExc_RuntimeError;
  45002. - }
  45003. - return type;
  45004. -}
  45005. -
  45006. -
  45007. -SWIGRUNTIME void
  45008. -SWIG_Python_AddErrorMsg(const char* mesg)
  45009. -{
  45010. - PyObject *type = 0;
  45011. - PyObject *value = 0;
  45012. - PyObject *traceback = 0;
  45013. -
  45014. - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  45015. - if (value) {
  45016. - char *tmp;
  45017. - PyObject *old_str = PyObject_Str(value);
  45018. - PyErr_Clear();
  45019. - Py_XINCREF(type);
  45020. -
  45021. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  45022. - SWIG_Python_str_DelForPy3(tmp);
  45023. - Py_DECREF(old_str);
  45024. - Py_DECREF(value);
  45025. - } else {
  45026. - PyErr_SetString(PyExc_RuntimeError, mesg);
  45027. - }
  45028. -}
  45029. -
  45030. -#if defined(SWIG_PYTHON_NO_THREADS)
  45031. -# if defined(SWIG_PYTHON_THREADS)
  45032. -# undef SWIG_PYTHON_THREADS
  45033. -# endif
  45034. -#endif
  45035. -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  45036. -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  45037. -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
  45038. -# define SWIG_PYTHON_USE_GIL
  45039. -# endif
  45040. -# endif
  45041. -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  45042. -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
  45043. -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  45044. -# endif
  45045. -# ifdef __cplusplus /* C++ code */
  45046. - class SWIG_Python_Thread_Block {
  45047. - bool status;
  45048. - PyGILState_STATE state;
  45049. - public:
  45050. - void end() { if (status) { PyGILState_Release(state); status = false;} }
  45051. - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  45052. - ~SWIG_Python_Thread_Block() { end(); }
  45053. - };
  45054. - class SWIG_Python_Thread_Allow {
  45055. - bool status;
  45056. - PyThreadState *save;
  45057. - public:
  45058. - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  45059. - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  45060. - ~SWIG_Python_Thread_Allow() { end(); }
  45061. - };
  45062. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  45063. -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  45064. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  45065. -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  45066. -# else /* C code */
  45067. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  45068. -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  45069. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  45070. -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  45071. -# endif
  45072. -# else /* Old thread way, not implemented, user must provide it */
  45073. -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  45074. -# define SWIG_PYTHON_INITIALIZE_THREADS
  45075. -# endif
  45076. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  45077. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  45078. -# endif
  45079. -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  45080. -# define SWIG_PYTHON_THREAD_END_BLOCK
  45081. -# endif
  45082. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  45083. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  45084. -# endif
  45085. -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  45086. -# define SWIG_PYTHON_THREAD_END_ALLOW
  45087. -# endif
  45088. -# endif
  45089. -#else /* No thread support */
  45090. -# define SWIG_PYTHON_INITIALIZE_THREADS
  45091. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  45092. -# define SWIG_PYTHON_THREAD_END_BLOCK
  45093. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  45094. -# define SWIG_PYTHON_THREAD_END_ALLOW
  45095. -#endif
  45096. -
  45097. -/* -----------------------------------------------------------------------------
  45098. - * Python API portion that goes into the runtime
  45099. - * ----------------------------------------------------------------------------- */
  45100. -
  45101. -#ifdef __cplusplus
  45102. -extern "C" {
  45103. -#endif
  45104. -
  45105. -/* -----------------------------------------------------------------------------
  45106. - * Constant declarations
  45107. - * ----------------------------------------------------------------------------- */
  45108. -
  45109. -/* Constant Types */
  45110. -#define SWIG_PY_POINTER 4
  45111. -#define SWIG_PY_BINARY 5
  45112. -
  45113. -/* Constant information structure */
  45114. -typedef struct swig_const_info {
  45115. - int type;
  45116. - char *name;
  45117. - long lvalue;
  45118. - double dvalue;
  45119. - void *pvalue;
  45120. - swig_type_info **ptype;
  45121. -} swig_const_info;
  45122. -
  45123. -
  45124. -/* -----------------------------------------------------------------------------
  45125. - * Wrapper of PyInstanceMethod_New() used in Python 3
  45126. - * It is exported to the generated module, used for -fastproxy
  45127. - * ----------------------------------------------------------------------------- */
  45128. -#if PY_VERSION_HEX >= 0x03000000
  45129. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
  45130. -{
  45131. - return PyInstanceMethod_New(func);
  45132. -}
  45133. -#else
  45134. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
  45135. -{
  45136. - return NULL;
  45137. -}
  45138. -#endif
  45139. -
  45140. -#ifdef __cplusplus
  45141. -}
  45142. -#endif
  45143. -
  45144. -
  45145. -/* -----------------------------------------------------------------------------
  45146. - * pyrun.swg
  45147. - *
  45148. - * This file contains the runtime support for Python modules
  45149. - * and includes code for managing global variables and pointer
  45150. - * type checking.
  45151. - *
  45152. - * ----------------------------------------------------------------------------- */
  45153. -
  45154. -/* Common SWIG API */
  45155. -
  45156. -/* for raw pointers */
  45157. -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  45158. -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  45159. -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  45160. -
  45161. -#ifdef SWIGPYTHON_BUILTIN
  45162. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  45163. -#else
  45164. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  45165. -#endif
  45166. -
  45167. -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  45168. -
  45169. -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  45170. -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  45171. -#define swig_owntype int
  45172. -
  45173. -/* for raw packed data */
  45174. -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  45175. -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  45176. -
  45177. -/* for class or struct pointers */
  45178. -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  45179. -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  45180. -
  45181. -/* for C or C++ function pointers */
  45182. -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  45183. -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  45184. -
  45185. -/* for C++ member pointers, ie, member methods */
  45186. -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  45187. -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  45188. -
  45189. -
  45190. -/* Runtime API */
  45191. -
  45192. -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  45193. -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  45194. -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  45195. -
  45196. -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  45197. -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  45198. -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  45199. -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  45200. -#define SWIG_fail goto fail
  45201. -
  45202. -
  45203. -/* Runtime API implementation */
  45204. -
  45205. -/* Error manipulation */
  45206. -
  45207. -SWIGINTERN void
  45208. -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  45209. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  45210. - PyErr_SetObject(errtype, obj);
  45211. - Py_DECREF(obj);
  45212. - SWIG_PYTHON_THREAD_END_BLOCK;
  45213. -}
  45214. -
  45215. -SWIGINTERN void
  45216. -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  45217. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  45218. - PyErr_SetString(errtype, msg);
  45219. - SWIG_PYTHON_THREAD_END_BLOCK;
  45220. -}
  45221. -
  45222. -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  45223. -
  45224. -/* Set a constant value */
  45225. -
  45226. -#if defined(SWIGPYTHON_BUILTIN)
  45227. -
  45228. -SWIGINTERN void
  45229. -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  45230. - PyObject *s = PyString_InternFromString(key);
  45231. - PyList_Append(seq, s);
  45232. - Py_DECREF(s);
  45233. -}
  45234. -
  45235. -SWIGINTERN void
  45236. -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  45237. -#if PY_VERSION_HEX < 0x02030000
  45238. - PyDict_SetItemString(d, (char *)name, obj);
  45239. -#else
  45240. - PyDict_SetItemString(d, name, obj);
  45241. -#endif
  45242. - Py_DECREF(obj);
  45243. - if (public_interface)
  45244. - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  45245. -}
  45246. -
  45247. -#else
  45248. -
  45249. -SWIGINTERN void
  45250. -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  45251. -#if PY_VERSION_HEX < 0x02030000
  45252. - PyDict_SetItemString(d, (char *)name, obj);
  45253. -#else
  45254. - PyDict_SetItemString(d, name, obj);
  45255. -#endif
  45256. - Py_DECREF(obj);
  45257. -}
  45258. -
  45259. -#endif
  45260. -
  45261. -/* Append a value to the result obj */
  45262. -
  45263. -SWIGINTERN PyObject*
  45264. -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  45265. -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  45266. - if (!result) {
  45267. - result = obj;
  45268. - } else if (result == Py_None) {
  45269. - Py_DECREF(result);
  45270. - result = obj;
  45271. - } else {
  45272. - if (!PyList_Check(result)) {
  45273. - PyObject *o2 = result;
  45274. - result = PyList_New(1);
  45275. - PyList_SetItem(result, 0, o2);
  45276. - }
  45277. - PyList_Append(result,obj);
  45278. - Py_DECREF(obj);
  45279. - }
  45280. - return result;
  45281. -#else
  45282. - PyObject* o2;
  45283. - PyObject* o3;
  45284. - if (!result) {
  45285. - result = obj;
  45286. - } else if (result == Py_None) {
  45287. - Py_DECREF(result);
  45288. - result = obj;
  45289. - } else {
  45290. - if (!PyTuple_Check(result)) {
  45291. - o2 = result;
  45292. - result = PyTuple_New(1);
  45293. - PyTuple_SET_ITEM(result, 0, o2);
  45294. - }
  45295. - o3 = PyTuple_New(1);
  45296. - PyTuple_SET_ITEM(o3, 0, obj);
  45297. - o2 = result;
  45298. - result = PySequence_Concat(o2, o3);
  45299. - Py_DECREF(o2);
  45300. - Py_DECREF(o3);
  45301. - }
  45302. - return result;
  45303. -#endif
  45304. -}
  45305. -
  45306. -/* Unpack the argument tuple */
  45307. -
  45308. -SWIGINTERN int
  45309. -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  45310. -{
  45311. - if (!args) {
  45312. - if (!min && !max) {
  45313. - return 1;
  45314. - } else {
  45315. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  45316. - name, (min == max ? "" : "at least "), (int)min);
  45317. - return 0;
  45318. - }
  45319. - }
  45320. - if (!PyTuple_Check(args)) {
  45321. - if (min <= 1 && max >= 1) {
  45322. - register int i;
  45323. - objs[0] = args;
  45324. - for (i = 1; i < max; ++i) {
  45325. - objs[i] = 0;
  45326. - }
  45327. - return 2;
  45328. - }
  45329. - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  45330. - return 0;
  45331. - } else {
  45332. - register Py_ssize_t l = PyTuple_GET_SIZE(args);
  45333. - if (l < min) {
  45334. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  45335. - name, (min == max ? "" : "at least "), (int)min, (int)l);
  45336. - return 0;
  45337. - } else if (l > max) {
  45338. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  45339. - name, (min == max ? "" : "at most "), (int)max, (int)l);
  45340. - return 0;
  45341. - } else {
  45342. - register int i;
  45343. - for (i = 0; i < l; ++i) {
  45344. - objs[i] = PyTuple_GET_ITEM(args, i);
  45345. - }
  45346. - for (; l < max; ++l) {
  45347. - objs[l] = 0;
  45348. - }
  45349. - return i + 1;
  45350. - }
  45351. - }
  45352. -}
  45353. -
  45354. -/* A functor is a function object with one single object argument */
  45355. -#if PY_VERSION_HEX >= 0x02020000
  45356. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  45357. -#else
  45358. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
  45359. -#endif
  45360. -
  45361. -/*
  45362. - Helper for static pointer initialization for both C and C++ code, for example
  45363. - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  45364. -*/
  45365. -#ifdef __cplusplus
  45366. -#define SWIG_STATIC_POINTER(var) var
  45367. -#else
  45368. -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  45369. -#endif
  45370. -
  45371. -/* -----------------------------------------------------------------------------
  45372. - * Pointer declarations
  45373. - * ----------------------------------------------------------------------------- */
  45374. -
  45375. -/* Flags for new pointer objects */
  45376. -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  45377. -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  45378. -
  45379. -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  45380. -
  45381. -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  45382. -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  45383. -
  45384. -#ifdef __cplusplus
  45385. -extern "C" {
  45386. -#endif
  45387. -
  45388. -/* How to access Py_None */
  45389. -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  45390. -# ifndef SWIG_PYTHON_NO_BUILD_NONE
  45391. -# ifndef SWIG_PYTHON_BUILD_NONE
  45392. -# define SWIG_PYTHON_BUILD_NONE
  45393. -# endif
  45394. -# endif
  45395. -#endif
  45396. -
  45397. -#ifdef SWIG_PYTHON_BUILD_NONE
  45398. -# ifdef Py_None
  45399. -# undef Py_None
  45400. -# define Py_None SWIG_Py_None()
  45401. -# endif
  45402. -SWIGRUNTIMEINLINE PyObject *
  45403. -_SWIG_Py_None(void)
  45404. -{
  45405. - PyObject *none = Py_BuildValue((char*)"");
  45406. - Py_DECREF(none);
  45407. - return none;
  45408. -}
  45409. -SWIGRUNTIME PyObject *
  45410. -SWIG_Py_None(void)
  45411. -{
  45412. - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  45413. - return none;
  45414. -}
  45415. -#endif
  45416. -
  45417. -/* The python void return value */
  45418. -
  45419. -SWIGRUNTIMEINLINE PyObject *
  45420. -SWIG_Py_Void(void)
  45421. -{
  45422. - PyObject *none = Py_None;
  45423. - Py_INCREF(none);
  45424. - return none;
  45425. -}
  45426. -
  45427. -/* SwigPyClientData */
  45428. -
  45429. -typedef struct {
  45430. - PyObject *klass;
  45431. - PyObject *newraw;
  45432. - PyObject *newargs;
  45433. - PyObject *destroy;
  45434. - int delargs;
  45435. - int implicitconv;
  45436. - PyTypeObject *pytype;
  45437. -} SwigPyClientData;
  45438. -
  45439. -SWIGRUNTIMEINLINE int
  45440. -SWIG_Python_CheckImplicit(swig_type_info *ty)
  45441. -{
  45442. - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  45443. - return data ? data->implicitconv : 0;
  45444. -}
  45445. -
  45446. -SWIGRUNTIMEINLINE PyObject *
  45447. -SWIG_Python_ExceptionType(swig_type_info *desc) {
  45448. - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  45449. - PyObject *klass = data ? data->klass : 0;
  45450. - return (klass ? klass : PyExc_RuntimeError);
  45451. -}
  45452. -
  45453. -
  45454. -SWIGRUNTIME SwigPyClientData *
  45455. -SwigPyClientData_New(PyObject* obj)
  45456. -{
  45457. - if (!obj) {
  45458. - return 0;
  45459. - } else {
  45460. - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  45461. - /* the klass element */
  45462. - data->klass = obj;
  45463. - Py_INCREF(data->klass);
  45464. - /* the newraw method and newargs arguments used to create a new raw instance */
  45465. - if (PyClass_Check(obj)) {
  45466. - data->newraw = 0;
  45467. - data->newargs = obj;
  45468. - Py_INCREF(obj);
  45469. - } else {
  45470. -#if (PY_VERSION_HEX < 0x02020000)
  45471. - data->newraw = 0;
  45472. -#else
  45473. - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
  45474. -#endif
  45475. - if (data->newraw) {
  45476. - Py_INCREF(data->newraw);
  45477. - data->newargs = PyTuple_New(1);
  45478. - PyTuple_SetItem(data->newargs, 0, obj);
  45479. - } else {
  45480. - data->newargs = obj;
  45481. - }
  45482. - Py_INCREF(data->newargs);
  45483. - }
  45484. - /* the destroy method, aka as the C++ delete method */
  45485. - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
  45486. - if (PyErr_Occurred()) {
  45487. - PyErr_Clear();
  45488. - data->destroy = 0;
  45489. - }
  45490. - if (data->destroy) {
  45491. - int flags;
  45492. - Py_INCREF(data->destroy);
  45493. - flags = PyCFunction_GET_FLAGS(data->destroy);
  45494. -#ifdef METH_O
  45495. - data->delargs = !(flags & (METH_O));
  45496. -#else
  45497. - data->delargs = 0;
  45498. -#endif
  45499. - } else {
  45500. - data->delargs = 0;
  45501. - }
  45502. - data->implicitconv = 0;
  45503. - data->pytype = 0;
  45504. - return data;
  45505. - }
  45506. -}
  45507. -
  45508. -SWIGRUNTIME void
  45509. -SwigPyClientData_Del(SwigPyClientData *data) {
  45510. - Py_XDECREF(data->newraw);
  45511. - Py_XDECREF(data->newargs);
  45512. - Py_XDECREF(data->destroy);
  45513. -}
  45514. -
  45515. -/* =============== SwigPyObject =====================*/
  45516. -
  45517. -typedef struct {
  45518. - PyObject_HEAD
  45519. - void *ptr;
  45520. - swig_type_info *ty;
  45521. - int own;
  45522. - PyObject *next;
  45523. -#ifdef SWIGPYTHON_BUILTIN
  45524. - PyObject *dict;
  45525. -#endif
  45526. -} SwigPyObject;
  45527. -
  45528. -SWIGRUNTIME PyObject *
  45529. -SwigPyObject_long(SwigPyObject *v)
  45530. -{
  45531. - return PyLong_FromVoidPtr(v->ptr);
  45532. -}
  45533. -
  45534. -SWIGRUNTIME PyObject *
  45535. -SwigPyObject_format(const char* fmt, SwigPyObject *v)
  45536. -{
  45537. - PyObject *res = NULL;
  45538. - PyObject *args = PyTuple_New(1);
  45539. - if (args) {
  45540. - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  45541. - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  45542. - if (ofmt) {
  45543. -#if PY_VERSION_HEX >= 0x03000000
  45544. - res = PyUnicode_Format(ofmt,args);
  45545. -#else
  45546. - res = PyString_Format(ofmt,args);
  45547. -#endif
  45548. - Py_DECREF(ofmt);
  45549. - }
  45550. - Py_DECREF(args);
  45551. - }
  45552. - }
  45553. - return res;
  45554. -}
  45555. -
  45556. -SWIGRUNTIME PyObject *
  45557. -SwigPyObject_oct(SwigPyObject *v)
  45558. -{
  45559. - return SwigPyObject_format("%o",v);
  45560. -}
  45561. -
  45562. -SWIGRUNTIME PyObject *
  45563. -SwigPyObject_hex(SwigPyObject *v)
  45564. -{
  45565. - return SwigPyObject_format("%x",v);
  45566. -}
  45567. -
  45568. -SWIGRUNTIME PyObject *
  45569. -#ifdef METH_NOARGS
  45570. -SwigPyObject_repr(SwigPyObject *v)
  45571. -#else
  45572. -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  45573. -#endif
  45574. -{
  45575. - const char *name = SWIG_TypePrettyName(v->ty);
  45576. - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  45577. - if (v->next) {
  45578. -# ifdef METH_NOARGS
  45579. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  45580. -# else
  45581. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
  45582. -# endif
  45583. -# if PY_VERSION_HEX >= 0x03000000
  45584. - PyObject *joined = PyUnicode_Concat(repr, nrep);
  45585. - Py_DecRef(repr);
  45586. - Py_DecRef(nrep);
  45587. - repr = joined;
  45588. -# else
  45589. - PyString_ConcatAndDel(&repr,nrep);
  45590. -# endif
  45591. - }
  45592. - return repr;
  45593. -}
  45594. -
  45595. -SWIGRUNTIME int
  45596. -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  45597. -{
  45598. - char *str;
  45599. -#ifdef METH_NOARGS
  45600. - PyObject *repr = SwigPyObject_repr(v);
  45601. -#else
  45602. - PyObject *repr = SwigPyObject_repr(v, NULL);
  45603. -#endif
  45604. - if (repr) {
  45605. - str = SWIG_Python_str_AsChar(repr);
  45606. - fputs(str, fp);
  45607. - SWIG_Python_str_DelForPy3(str);
  45608. - Py_DECREF(repr);
  45609. - return 0;
  45610. - } else {
  45611. - return 1;
  45612. - }
  45613. -}
  45614. -
  45615. -SWIGRUNTIME PyObject *
  45616. -SwigPyObject_str(SwigPyObject *v)
  45617. -{
  45618. - char result[SWIG_BUFFER_SIZE];
  45619. - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
  45620. - SWIG_Python_str_FromChar(result) : 0;
  45621. -}
  45622. -
  45623. -SWIGRUNTIME int
  45624. -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  45625. -{
  45626. - void *i = v->ptr;
  45627. - void *j = w->ptr;
  45628. - return (i < j) ? -1 : ((i > j) ? 1 : 0);
  45629. -}
  45630. -
  45631. -/* Added for Python 3.x, would it also be useful for Python 2.x? */
  45632. -SWIGRUNTIME PyObject*
  45633. -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  45634. -{
  45635. - PyObject* res;
  45636. - if( op != Py_EQ && op != Py_NE ) {
  45637. - Py_INCREF(Py_NotImplemented);
  45638. - return Py_NotImplemented;
  45639. - }
  45640. - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  45641. - return res;
  45642. -}
  45643. -
  45644. -
  45645. -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  45646. -
  45647. -#ifdef SWIGPYTHON_BUILTIN
  45648. -static swig_type_info *SwigPyObject_stype = 0;
  45649. -SWIGRUNTIME PyTypeObject*
  45650. -SwigPyObject_type(void) {
  45651. - SwigPyClientData *cd;
  45652. - assert(SwigPyObject_stype);
  45653. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  45654. - assert(cd);
  45655. - assert(cd->pytype);
  45656. - return cd->pytype;
  45657. -}
  45658. -#else
  45659. -SWIGRUNTIME PyTypeObject*
  45660. -SwigPyObject_type(void) {
  45661. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  45662. - return type;
  45663. -}
  45664. -#endif
  45665. -
  45666. -SWIGRUNTIMEINLINE int
  45667. -SwigPyObject_Check(PyObject *op) {
  45668. -#ifdef SWIGPYTHON_BUILTIN
  45669. - PyTypeObject *target_tp = SwigPyObject_type();
  45670. - if (PyType_IsSubtype(op->ob_type, target_tp))
  45671. - return 1;
  45672. - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  45673. -#else
  45674. - return (Py_TYPE(op) == SwigPyObject_type())
  45675. - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  45676. -#endif
  45677. -}
  45678. -
  45679. -SWIGRUNTIME PyObject *
  45680. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  45681. -
  45682. -SWIGRUNTIME void
  45683. -SwigPyObject_dealloc(PyObject *v)
  45684. -{
  45685. - SwigPyObject *sobj = (SwigPyObject *) v;
  45686. - PyObject *next = sobj->next;
  45687. - if (sobj->own == SWIG_POINTER_OWN) {
  45688. - swig_type_info *ty = sobj->ty;
  45689. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  45690. - PyObject *destroy = data ? data->destroy : 0;
  45691. - if (destroy) {
  45692. - /* destroy is always a VARARGS method */
  45693. - PyObject *res;
  45694. - if (data->delargs) {
  45695. - /* we need to create a temporary object to carry the destroy operation */
  45696. - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  45697. - res = SWIG_Python_CallFunctor(destroy, tmp);
  45698. - Py_DECREF(tmp);
  45699. - } else {
  45700. - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  45701. - PyObject *mself = PyCFunction_GET_SELF(destroy);
  45702. - res = ((*meth)(mself, v));
  45703. - }
  45704. - Py_XDECREF(res);
  45705. - }
  45706. -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  45707. - else {
  45708. - const char *name = SWIG_TypePrettyName(ty);
  45709. - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  45710. - }
  45711. -#endif
  45712. - }
  45713. - Py_XDECREF(next);
  45714. - PyObject_DEL(v);
  45715. -}
  45716. -
  45717. -SWIGRUNTIME PyObject*
  45718. -SwigPyObject_append(PyObject* v, PyObject* next)
  45719. -{
  45720. - SwigPyObject *sobj = (SwigPyObject *) v;
  45721. -#ifndef METH_O
  45722. - PyObject *tmp = 0;
  45723. - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  45724. - next = tmp;
  45725. -#endif
  45726. - if (!SwigPyObject_Check(next)) {
  45727. - return NULL;
  45728. - }
  45729. - sobj->next = next;
  45730. - Py_INCREF(next);
  45731. - return SWIG_Py_Void();
  45732. -}
  45733. -
  45734. -SWIGRUNTIME PyObject*
  45735. -#ifdef METH_NOARGS
  45736. -SwigPyObject_next(PyObject* v)
  45737. -#else
  45738. -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  45739. -#endif
  45740. -{
  45741. - SwigPyObject *sobj = (SwigPyObject *) v;
  45742. - if (sobj->next) {
  45743. - Py_INCREF(sobj->next);
  45744. - return sobj->next;
  45745. - } else {
  45746. - return SWIG_Py_Void();
  45747. - }
  45748. -}
  45749. -
  45750. -SWIGINTERN PyObject*
  45751. -#ifdef METH_NOARGS
  45752. -SwigPyObject_disown(PyObject *v)
  45753. -#else
  45754. -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  45755. -#endif
  45756. -{
  45757. - SwigPyObject *sobj = (SwigPyObject *)v;
  45758. - sobj->own = 0;
  45759. - return SWIG_Py_Void();
  45760. -}
  45761. -
  45762. -SWIGINTERN PyObject*
  45763. -#ifdef METH_NOARGS
  45764. -SwigPyObject_acquire(PyObject *v)
  45765. -#else
  45766. -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  45767. -#endif
  45768. -{
  45769. - SwigPyObject *sobj = (SwigPyObject *)v;
  45770. - sobj->own = SWIG_POINTER_OWN;
  45771. - return SWIG_Py_Void();
  45772. -}
  45773. -
  45774. -SWIGINTERN PyObject*
  45775. -SwigPyObject_own(PyObject *v, PyObject *args)
  45776. -{
  45777. - PyObject *val = 0;
  45778. -#if (PY_VERSION_HEX < 0x02020000)
  45779. - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
  45780. -#elif (PY_VERSION_HEX < 0x02050000)
  45781. - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
  45782. -#else
  45783. - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
  45784. -#endif
  45785. - {
  45786. - return NULL;
  45787. - }
  45788. - else
  45789. - {
  45790. - SwigPyObject *sobj = (SwigPyObject *)v;
  45791. - PyObject *obj = PyBool_FromLong(sobj->own);
  45792. - if (val) {
  45793. -#ifdef METH_NOARGS
  45794. - if (PyObject_IsTrue(val)) {
  45795. - SwigPyObject_acquire(v);
  45796. - } else {
  45797. - SwigPyObject_disown(v);
  45798. - }
  45799. -#else
  45800. - if (PyObject_IsTrue(val)) {
  45801. - SwigPyObject_acquire(v,args);
  45802. - } else {
  45803. - SwigPyObject_disown(v,args);
  45804. - }
  45805. -#endif
  45806. - }
  45807. - return obj;
  45808. - }
  45809. -}
  45810. -
  45811. -#ifdef METH_O
  45812. -static PyMethodDef
  45813. -swigobject_methods[] = {
  45814. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
  45815. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
  45816. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  45817. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
  45818. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
  45819. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
  45820. - {0, 0, 0, 0}
  45821. -};
  45822. -#else
  45823. -static PyMethodDef
  45824. -swigobject_methods[] = {
  45825. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
  45826. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
  45827. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  45828. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
  45829. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
  45830. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
  45831. - {0, 0, 0, 0}
  45832. -};
  45833. -#endif
  45834. -
  45835. -#if PY_VERSION_HEX < 0x02020000
  45836. -SWIGINTERN PyObject *
  45837. -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
  45838. -{
  45839. - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
  45840. -}
  45841. -#endif
  45842. -
  45843. -SWIGRUNTIME PyTypeObject*
  45844. -SwigPyObject_TypeOnce(void) {
  45845. - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  45846. -
  45847. - static PyNumberMethods SwigPyObject_as_number = {
  45848. - (binaryfunc)0, /*nb_add*/
  45849. - (binaryfunc)0, /*nb_subtract*/
  45850. - (binaryfunc)0, /*nb_multiply*/
  45851. - /* nb_divide removed in Python 3 */
  45852. -#if PY_VERSION_HEX < 0x03000000
  45853. - (binaryfunc)0, /*nb_divide*/
  45854. -#endif
  45855. - (binaryfunc)0, /*nb_remainder*/
  45856. - (binaryfunc)0, /*nb_divmod*/
  45857. - (ternaryfunc)0,/*nb_power*/
  45858. - (unaryfunc)0, /*nb_negative*/
  45859. - (unaryfunc)0, /*nb_positive*/
  45860. - (unaryfunc)0, /*nb_absolute*/
  45861. - (inquiry)0, /*nb_nonzero*/
  45862. - 0, /*nb_invert*/
  45863. - 0, /*nb_lshift*/
  45864. - 0, /*nb_rshift*/
  45865. - 0, /*nb_and*/
  45866. - 0, /*nb_xor*/
  45867. - 0, /*nb_or*/
  45868. -#if PY_VERSION_HEX < 0x03000000
  45869. - 0, /*nb_coerce*/
  45870. -#endif
  45871. - (unaryfunc)SwigPyObject_long, /*nb_int*/
  45872. -#if PY_VERSION_HEX < 0x03000000
  45873. - (unaryfunc)SwigPyObject_long, /*nb_long*/
  45874. -#else
  45875. - 0, /*nb_reserved*/
  45876. -#endif
  45877. - (unaryfunc)0, /*nb_float*/
  45878. -#if PY_VERSION_HEX < 0x03000000
  45879. - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  45880. - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  45881. -#endif
  45882. -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  45883. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  45884. -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
  45885. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  45886. -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
  45887. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
  45888. -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
  45889. - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
  45890. -#endif
  45891. - };
  45892. -
  45893. - static PyTypeObject swigpyobject_type;
  45894. - static int type_init = 0;
  45895. - if (!type_init) {
  45896. - const PyTypeObject tmp = {
  45897. - /* PyObject header changed in Python 3 */
  45898. -#if PY_VERSION_HEX >= 0x03000000
  45899. - PyVarObject_HEAD_INIT(NULL, 0)
  45900. -#else
  45901. - PyObject_HEAD_INIT(NULL)
  45902. - 0, /* ob_size */
  45903. -#endif
  45904. - (char *)"SwigPyObject", /* tp_name */
  45905. - sizeof(SwigPyObject), /* tp_basicsize */
  45906. - 0, /* tp_itemsize */
  45907. - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  45908. - (printfunc)SwigPyObject_print, /* tp_print */
  45909. -#if PY_VERSION_HEX < 0x02020000
  45910. - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
  45911. -#else
  45912. - (getattrfunc)0, /* tp_getattr */
  45913. -#endif
  45914. - (setattrfunc)0, /* tp_setattr */
  45915. -#if PY_VERSION_HEX >= 0x03000000
  45916. - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  45917. -#else
  45918. - (cmpfunc)SwigPyObject_compare, /* tp_compare */
  45919. -#endif
  45920. - (reprfunc)SwigPyObject_repr, /* tp_repr */
  45921. - &SwigPyObject_as_number, /* tp_as_number */
  45922. - 0, /* tp_as_sequence */
  45923. - 0, /* tp_as_mapping */
  45924. - (hashfunc)0, /* tp_hash */
  45925. - (ternaryfunc)0, /* tp_call */
  45926. - (reprfunc)SwigPyObject_str, /* tp_str */
  45927. - PyObject_GenericGetAttr, /* tp_getattro */
  45928. - 0, /* tp_setattro */
  45929. - 0, /* tp_as_buffer */
  45930. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  45931. - swigobject_doc, /* tp_doc */
  45932. - 0, /* tp_traverse */
  45933. - 0, /* tp_clear */
  45934. - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  45935. - 0, /* tp_weaklistoffset */
  45936. -#if PY_VERSION_HEX >= 0x02020000
  45937. - 0, /* tp_iter */
  45938. - 0, /* tp_iternext */
  45939. - swigobject_methods, /* tp_methods */
  45940. - 0, /* tp_members */
  45941. - 0, /* tp_getset */
  45942. - 0, /* tp_base */
  45943. - 0, /* tp_dict */
  45944. - 0, /* tp_descr_get */
  45945. - 0, /* tp_descr_set */
  45946. - 0, /* tp_dictoffset */
  45947. - 0, /* tp_init */
  45948. - 0, /* tp_alloc */
  45949. - 0, /* tp_new */
  45950. - 0, /* tp_free */
  45951. - 0, /* tp_is_gc */
  45952. - 0, /* tp_bases */
  45953. - 0, /* tp_mro */
  45954. - 0, /* tp_cache */
  45955. - 0, /* tp_subclasses */
  45956. - 0, /* tp_weaklist */
  45957. -#endif
  45958. -#if PY_VERSION_HEX >= 0x02030000
  45959. - 0, /* tp_del */
  45960. -#endif
  45961. -#if PY_VERSION_HEX >= 0x02060000
  45962. - 0, /* tp_version */
  45963. -#endif
  45964. -#ifdef COUNT_ALLOCS
  45965. - 0,0,0,0 /* tp_alloc -> tp_next */
  45966. -#endif
  45967. - };
  45968. - swigpyobject_type = tmp;
  45969. - type_init = 1;
  45970. -#if PY_VERSION_HEX < 0x02020000
  45971. - swigpyobject_type.ob_type = &PyType_Type;
  45972. -#else
  45973. - if (PyType_Ready(&swigpyobject_type) < 0)
  45974. - return NULL;
  45975. -#endif
  45976. - }
  45977. - return &swigpyobject_type;
  45978. -}
  45979. -
  45980. -SWIGRUNTIME PyObject *
  45981. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  45982. -{
  45983. - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  45984. - if (sobj) {
  45985. - sobj->ptr = ptr;
  45986. - sobj->ty = ty;
  45987. - sobj->own = own;
  45988. - sobj->next = 0;
  45989. - }
  45990. - return (PyObject *)sobj;
  45991. -}
  45992. -
  45993. -/* -----------------------------------------------------------------------------
  45994. - * Implements a simple Swig Packed type, and use it instead of string
  45995. - * ----------------------------------------------------------------------------- */
  45996. -
  45997. -typedef struct {
  45998. - PyObject_HEAD
  45999. - void *pack;
  46000. - swig_type_info *ty;
  46001. - size_t size;
  46002. -} SwigPyPacked;
  46003. -
  46004. -SWIGRUNTIME int
  46005. -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  46006. -{
  46007. - char result[SWIG_BUFFER_SIZE];
  46008. - fputs("<Swig Packed ", fp);
  46009. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  46010. - fputs("at ", fp);
  46011. - fputs(result, fp);
  46012. - }
  46013. - fputs(v->ty->name,fp);
  46014. - fputs(">", fp);
  46015. - return 0;
  46016. -}
  46017. -
  46018. -SWIGRUNTIME PyObject *
  46019. -SwigPyPacked_repr(SwigPyPacked *v)
  46020. -{
  46021. - char result[SWIG_BUFFER_SIZE];
  46022. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  46023. - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  46024. - } else {
  46025. - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  46026. - }
  46027. -}
  46028. -
  46029. -SWIGRUNTIME PyObject *
  46030. -SwigPyPacked_str(SwigPyPacked *v)
  46031. -{
  46032. - char result[SWIG_BUFFER_SIZE];
  46033. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  46034. - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  46035. - } else {
  46036. - return SWIG_Python_str_FromChar(v->ty->name);
  46037. - }
  46038. -}
  46039. -
  46040. -SWIGRUNTIME int
  46041. -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  46042. -{
  46043. - size_t i = v->size;
  46044. - size_t j = w->size;
  46045. - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  46046. - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  46047. -}
  46048. -
  46049. -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  46050. -
  46051. -SWIGRUNTIME PyTypeObject*
  46052. -SwigPyPacked_type(void) {
  46053. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  46054. - return type;
  46055. -}
  46056. -
  46057. -SWIGRUNTIMEINLINE int
  46058. -SwigPyPacked_Check(PyObject *op) {
  46059. - return ((op)->ob_type == SwigPyPacked_TypeOnce())
  46060. - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  46061. -}
  46062. -
  46063. -SWIGRUNTIME void
  46064. -SwigPyPacked_dealloc(PyObject *v)
  46065. -{
  46066. - if (SwigPyPacked_Check(v)) {
  46067. - SwigPyPacked *sobj = (SwigPyPacked *) v;
  46068. - free(sobj->pack);
  46069. - }
  46070. - PyObject_DEL(v);
  46071. -}
  46072. -
  46073. -SWIGRUNTIME PyTypeObject*
  46074. -SwigPyPacked_TypeOnce(void) {
  46075. - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  46076. - static PyTypeObject swigpypacked_type;
  46077. - static int type_init = 0;
  46078. - if (!type_init) {
  46079. - const PyTypeObject tmp = {
  46080. - /* PyObject header changed in Python 3 */
  46081. -#if PY_VERSION_HEX>=0x03000000
  46082. - PyVarObject_HEAD_INIT(NULL, 0)
  46083. -#else
  46084. - PyObject_HEAD_INIT(NULL)
  46085. - 0, /* ob_size */
  46086. -#endif
  46087. - (char *)"SwigPyPacked", /* tp_name */
  46088. - sizeof(SwigPyPacked), /* tp_basicsize */
  46089. - 0, /* tp_itemsize */
  46090. - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  46091. - (printfunc)SwigPyPacked_print, /* tp_print */
  46092. - (getattrfunc)0, /* tp_getattr */
  46093. - (setattrfunc)0, /* tp_setattr */
  46094. -#if PY_VERSION_HEX>=0x03000000
  46095. - 0, /* tp_reserved in 3.0.1 */
  46096. -#else
  46097. - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  46098. -#endif
  46099. - (reprfunc)SwigPyPacked_repr, /* tp_repr */
  46100. - 0, /* tp_as_number */
  46101. - 0, /* tp_as_sequence */
  46102. - 0, /* tp_as_mapping */
  46103. - (hashfunc)0, /* tp_hash */
  46104. - (ternaryfunc)0, /* tp_call */
  46105. - (reprfunc)SwigPyPacked_str, /* tp_str */
  46106. - PyObject_GenericGetAttr, /* tp_getattro */
  46107. - 0, /* tp_setattro */
  46108. - 0, /* tp_as_buffer */
  46109. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  46110. - swigpacked_doc, /* tp_doc */
  46111. - 0, /* tp_traverse */
  46112. - 0, /* tp_clear */
  46113. - 0, /* tp_richcompare */
  46114. - 0, /* tp_weaklistoffset */
  46115. -#if PY_VERSION_HEX >= 0x02020000
  46116. - 0, /* tp_iter */
  46117. - 0, /* tp_iternext */
  46118. - 0, /* tp_methods */
  46119. - 0, /* tp_members */
  46120. - 0, /* tp_getset */
  46121. - 0, /* tp_base */
  46122. - 0, /* tp_dict */
  46123. - 0, /* tp_descr_get */
  46124. - 0, /* tp_descr_set */
  46125. - 0, /* tp_dictoffset */
  46126. - 0, /* tp_init */
  46127. - 0, /* tp_alloc */
  46128. - 0, /* tp_new */
  46129. - 0, /* tp_free */
  46130. - 0, /* tp_is_gc */
  46131. - 0, /* tp_bases */
  46132. - 0, /* tp_mro */
  46133. - 0, /* tp_cache */
  46134. - 0, /* tp_subclasses */
  46135. - 0, /* tp_weaklist */
  46136. -#endif
  46137. -#if PY_VERSION_HEX >= 0x02030000
  46138. - 0, /* tp_del */
  46139. -#endif
  46140. -#if PY_VERSION_HEX >= 0x02060000
  46141. - 0, /* tp_version */
  46142. -#endif
  46143. -#ifdef COUNT_ALLOCS
  46144. - 0,0,0,0 /* tp_alloc -> tp_next */
  46145. -#endif
  46146. - };
  46147. - swigpypacked_type = tmp;
  46148. - type_init = 1;
  46149. -#if PY_VERSION_HEX < 0x02020000
  46150. - swigpypacked_type.ob_type = &PyType_Type;
  46151. -#else
  46152. - if (PyType_Ready(&swigpypacked_type) < 0)
  46153. - return NULL;
  46154. -#endif
  46155. - }
  46156. - return &swigpypacked_type;
  46157. -}
  46158. -
  46159. -SWIGRUNTIME PyObject *
  46160. -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  46161. -{
  46162. - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  46163. - if (sobj) {
  46164. - void *pack = malloc(size);
  46165. - if (pack) {
  46166. - memcpy(pack, ptr, size);
  46167. - sobj->pack = pack;
  46168. - sobj->ty = ty;
  46169. - sobj->size = size;
  46170. - } else {
  46171. - PyObject_DEL((PyObject *) sobj);
  46172. - sobj = 0;
  46173. - }
  46174. - }
  46175. - return (PyObject *) sobj;
  46176. -}
  46177. -
  46178. -SWIGRUNTIME swig_type_info *
  46179. -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  46180. -{
  46181. - if (SwigPyPacked_Check(obj)) {
  46182. - SwigPyPacked *sobj = (SwigPyPacked *)obj;
  46183. - if (sobj->size != size) return 0;
  46184. - memcpy(ptr, sobj->pack, size);
  46185. - return sobj->ty;
  46186. - } else {
  46187. - return 0;
  46188. - }
  46189. -}
  46190. -
  46191. -/* -----------------------------------------------------------------------------
  46192. - * pointers/data manipulation
  46193. - * ----------------------------------------------------------------------------- */
  46194. -
  46195. -SWIGRUNTIMEINLINE PyObject *
  46196. -_SWIG_This(void)
  46197. -{
  46198. - return SWIG_Python_str_FromChar("this");
  46199. -}
  46200. -
  46201. -static PyObject *swig_this = NULL;
  46202. -
  46203. -SWIGRUNTIME PyObject *
  46204. -SWIG_This(void)
  46205. -{
  46206. - if (swig_this == NULL)
  46207. - swig_this = _SWIG_This();
  46208. - return swig_this;
  46209. -}
  46210. -
  46211. -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  46212. -
  46213. -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
  46214. -#if PY_VERSION_HEX>=0x03000000
  46215. -#define SWIG_PYTHON_SLOW_GETSET_THIS
  46216. -#endif
  46217. -
  46218. -SWIGRUNTIME SwigPyObject *
  46219. -SWIG_Python_GetSwigThis(PyObject *pyobj)
  46220. -{
  46221. - PyObject *obj;
  46222. -
  46223. - if (SwigPyObject_Check(pyobj))
  46224. - return (SwigPyObject *) pyobj;
  46225. -
  46226. -#ifdef SWIGPYTHON_BUILTIN
  46227. - (void)obj;
  46228. -# ifdef PyWeakref_CheckProxy
  46229. - if (PyWeakref_CheckProxy(pyobj)) {
  46230. - pyobj = PyWeakref_GET_OBJECT(pyobj);
  46231. - if (pyobj && SwigPyObject_Check(pyobj))
  46232. - return (SwigPyObject*) pyobj;
  46233. - }
  46234. -# endif
  46235. - return NULL;
  46236. -#else
  46237. -
  46238. - obj = 0;
  46239. -
  46240. -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  46241. - if (PyInstance_Check(pyobj)) {
  46242. - obj = _PyInstance_Lookup(pyobj, SWIG_This());
  46243. - } else {
  46244. - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  46245. - if (dictptr != NULL) {
  46246. - PyObject *dict = *dictptr;
  46247. - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  46248. - } else {
  46249. -#ifdef PyWeakref_CheckProxy
  46250. - if (PyWeakref_CheckProxy(pyobj)) {
  46251. - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  46252. - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  46253. - }
  46254. -#endif
  46255. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  46256. - if (obj) {
  46257. - Py_DECREF(obj);
  46258. - } else {
  46259. - if (PyErr_Occurred()) PyErr_Clear();
  46260. - return 0;
  46261. - }
  46262. - }
  46263. - }
  46264. -#else
  46265. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  46266. - if (obj) {
  46267. - Py_DECREF(obj);
  46268. - } else {
  46269. - if (PyErr_Occurred()) PyErr_Clear();
  46270. - return 0;
  46271. - }
  46272. -#endif
  46273. - if (obj && !SwigPyObject_Check(obj)) {
  46274. - /* a PyObject is called 'this', try to get the 'real this'
  46275. - SwigPyObject from it */
  46276. - return SWIG_Python_GetSwigThis(obj);
  46277. - }
  46278. - return (SwigPyObject *)obj;
  46279. -#endif
  46280. -}
  46281. -
  46282. -/* Acquire a pointer value */
  46283. -
  46284. -SWIGRUNTIME int
  46285. -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  46286. - if (own == SWIG_POINTER_OWN) {
  46287. - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  46288. - if (sobj) {
  46289. - int oldown = sobj->own;
  46290. - sobj->own = own;
  46291. - return oldown;
  46292. - }
  46293. - }
  46294. - return 0;
  46295. -}
  46296. -
  46297. -/* Convert a pointer value */
  46298. -
  46299. -SWIGRUNTIME int
  46300. -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  46301. - int res;
  46302. - SwigPyObject *sobj;
  46303. -
  46304. - if (!obj)
  46305. - return SWIG_ERROR;
  46306. - if (obj == Py_None) {
  46307. - if (ptr)
  46308. - *ptr = 0;
  46309. - return SWIG_OK;
  46310. - }
  46311. -
  46312. - res = SWIG_ERROR;
  46313. -
  46314. - sobj = SWIG_Python_GetSwigThis(obj);
  46315. - if (own)
  46316. - *own = 0;
  46317. - while (sobj) {
  46318. - void *vptr = sobj->ptr;
  46319. - if (ty) {
  46320. - swig_type_info *to = sobj->ty;
  46321. - if (to == ty) {
  46322. - /* no type cast needed */
  46323. - if (ptr) *ptr = vptr;
  46324. - break;
  46325. - } else {
  46326. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  46327. - if (!tc) {
  46328. - sobj = (SwigPyObject *)sobj->next;
  46329. - } else {
  46330. - if (ptr) {
  46331. - int newmemory = 0;
  46332. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  46333. - if (newmemory == SWIG_CAST_NEW_MEMORY) {
  46334. - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  46335. - if (own)
  46336. - *own = *own | SWIG_CAST_NEW_MEMORY;
  46337. - }
  46338. - }
  46339. - break;
  46340. - }
  46341. - }
  46342. - } else {
  46343. - if (ptr) *ptr = vptr;
  46344. - break;
  46345. - }
  46346. - }
  46347. - if (sobj) {
  46348. - if (own)
  46349. - *own = *own | sobj->own;
  46350. - if (flags & SWIG_POINTER_DISOWN) {
  46351. - sobj->own = 0;
  46352. - }
  46353. - res = SWIG_OK;
  46354. - } else {
  46355. - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
  46356. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  46357. - if (data && !data->implicitconv) {
  46358. - PyObject *klass = data->klass;
  46359. - if (klass) {
  46360. - PyObject *impconv;
  46361. - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  46362. - impconv = SWIG_Python_CallFunctor(klass, obj);
  46363. - data->implicitconv = 0;
  46364. - if (PyErr_Occurred()) {
  46365. - PyErr_Clear();
  46366. - impconv = 0;
  46367. - }
  46368. - if (impconv) {
  46369. - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  46370. - if (iobj) {
  46371. - void *vptr;
  46372. - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  46373. - if (SWIG_IsOK(res)) {
  46374. - if (ptr) {
  46375. - *ptr = vptr;
  46376. - /* transfer the ownership to 'ptr' */
  46377. - iobj->own = 0;
  46378. - res = SWIG_AddCast(res);
  46379. - res = SWIG_AddNewMask(res);
  46380. - } else {
  46381. - res = SWIG_AddCast(res);
  46382. - }
  46383. - }
  46384. - }
  46385. - Py_DECREF(impconv);
  46386. - }
  46387. - }
  46388. - }
  46389. - }
  46390. - }
  46391. - return res;
  46392. -}
  46393. -
  46394. -/* Convert a function ptr value */
  46395. -
  46396. -SWIGRUNTIME int
  46397. -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  46398. - if (!PyCFunction_Check(obj)) {
  46399. - return SWIG_ConvertPtr(obj, ptr, ty, 0);
  46400. - } else {
  46401. - void *vptr = 0;
  46402. -
  46403. - /* here we get the method pointer for callbacks */
  46404. - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  46405. - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  46406. - if (desc)
  46407. - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  46408. - if (!desc)
  46409. - return SWIG_ERROR;
  46410. - if (ty) {
  46411. - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
  46412. - if (tc) {
  46413. - int newmemory = 0;
  46414. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  46415. - assert(!newmemory); /* newmemory handling not yet implemented */
  46416. - } else {
  46417. - return SWIG_ERROR;
  46418. - }
  46419. - } else {
  46420. - *ptr = vptr;
  46421. - }
  46422. - return SWIG_OK;
  46423. - }
  46424. -}
  46425. -
  46426. -/* Convert a packed value value */
  46427. -
  46428. -SWIGRUNTIME int
  46429. -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  46430. - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  46431. - if (!to) return SWIG_ERROR;
  46432. - if (ty) {
  46433. - if (to != ty) {
  46434. - /* check type cast? */
  46435. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  46436. - if (!tc) return SWIG_ERROR;
  46437. - }
  46438. - }
  46439. - return SWIG_OK;
  46440. -}
  46441. -
  46442. -/* -----------------------------------------------------------------------------
  46443. - * Create a new pointer object
  46444. - * ----------------------------------------------------------------------------- */
  46445. -
  46446. -/*
  46447. - Create a new instance object, without calling __init__, and set the
  46448. - 'this' attribute.
  46449. -*/
  46450. -
  46451. -SWIGRUNTIME PyObject*
  46452. -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  46453. -{
  46454. -#if (PY_VERSION_HEX >= 0x02020000)
  46455. - PyObject *inst = 0;
  46456. - PyObject *newraw = data->newraw;
  46457. - if (newraw) {
  46458. - inst = PyObject_Call(newraw, data->newargs, NULL);
  46459. - if (inst) {
  46460. -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  46461. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  46462. - if (dictptr != NULL) {
  46463. - PyObject *dict = *dictptr;
  46464. - if (dict == NULL) {
  46465. - dict = PyDict_New();
  46466. - *dictptr = dict;
  46467. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  46468. - }
  46469. - }
  46470. -#else
  46471. - PyObject *key = SWIG_This();
  46472. - PyObject_SetAttr(inst, key, swig_this);
  46473. -#endif
  46474. - }
  46475. - } else {
  46476. -#if PY_VERSION_HEX >= 0x03000000
  46477. - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
  46478. - if (inst) {
  46479. - PyObject_SetAttr(inst, SWIG_This(), swig_this);
  46480. - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  46481. - }
  46482. -#else
  46483. - PyObject *dict = PyDict_New();
  46484. - if (dict) {
  46485. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  46486. - inst = PyInstance_NewRaw(data->newargs, dict);
  46487. - Py_DECREF(dict);
  46488. - }
  46489. -#endif
  46490. - }
  46491. - return inst;
  46492. -#else
  46493. -#if (PY_VERSION_HEX >= 0x02010000)
  46494. - PyObject *inst = 0;
  46495. - PyObject *dict = PyDict_New();
  46496. - if (dict) {
  46497. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  46498. - inst = PyInstance_NewRaw(data->newargs, dict);
  46499. - Py_DECREF(dict);
  46500. - }
  46501. - return (PyObject *) inst;
  46502. -#else
  46503. - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  46504. - if (inst == NULL) {
  46505. - return NULL;
  46506. - }
  46507. - inst->in_class = (PyClassObject *)data->newargs;
  46508. - Py_INCREF(inst->in_class);
  46509. - inst->in_dict = PyDict_New();
  46510. - if (inst->in_dict == NULL) {
  46511. - Py_DECREF(inst);
  46512. - return NULL;
  46513. - }
  46514. -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  46515. - inst->in_weakreflist = NULL;
  46516. -#endif
  46517. -#ifdef Py_TPFLAGS_GC
  46518. - PyObject_GC_Init(inst);
  46519. -#endif
  46520. - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  46521. - return (PyObject *) inst;
  46522. -#endif
  46523. -#endif
  46524. -}
  46525. -
  46526. -SWIGRUNTIME void
  46527. -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  46528. -{
  46529. - PyObject *dict;
  46530. -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  46531. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  46532. - if (dictptr != NULL) {
  46533. - dict = *dictptr;
  46534. - if (dict == NULL) {
  46535. - dict = PyDict_New();
  46536. - *dictptr = dict;
  46537. - }
  46538. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  46539. - return;
  46540. - }
  46541. -#endif
  46542. - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  46543. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  46544. - Py_DECREF(dict);
  46545. -}
  46546. -
  46547. -
  46548. -SWIGINTERN PyObject *
  46549. -SWIG_Python_InitShadowInstance(PyObject *args) {
  46550. - PyObject *obj[2];
  46551. - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  46552. - return NULL;
  46553. - } else {
  46554. - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  46555. - if (sthis) {
  46556. - SwigPyObject_append((PyObject*) sthis, obj[1]);
  46557. - } else {
  46558. - SWIG_Python_SetSwigThis(obj[0], obj[1]);
  46559. - }
  46560. - return SWIG_Py_Void();
  46561. - }
  46562. -}
  46563. -
  46564. -/* Create a new pointer object */
  46565. -
  46566. -SWIGRUNTIME PyObject *
  46567. -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  46568. - SwigPyClientData *clientdata;
  46569. - PyObject * robj;
  46570. - int own;
  46571. -
  46572. - if (!ptr)
  46573. - return SWIG_Py_Void();
  46574. -
  46575. - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  46576. - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  46577. - if (clientdata && clientdata->pytype) {
  46578. - SwigPyObject *newobj;
  46579. - if (flags & SWIG_BUILTIN_TP_INIT) {
  46580. - newobj = (SwigPyObject*) self;
  46581. - if (newobj->ptr) {
  46582. - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  46583. - while (newobj->next)
  46584. - newobj = (SwigPyObject *) newobj->next;
  46585. - newobj->next = next_self;
  46586. - newobj = (SwigPyObject *)next_self;
  46587. - }
  46588. - } else {
  46589. - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  46590. - }
  46591. - if (newobj) {
  46592. - newobj->ptr = ptr;
  46593. - newobj->ty = type;
  46594. - newobj->own = own;
  46595. - newobj->next = 0;
  46596. -#ifdef SWIGPYTHON_BUILTIN
  46597. - newobj->dict = 0;
  46598. -#endif
  46599. - return (PyObject*) newobj;
  46600. - }
  46601. - return SWIG_Py_Void();
  46602. - }
  46603. -
  46604. - assert(!(flags & SWIG_BUILTIN_TP_INIT));
  46605. -
  46606. - robj = SwigPyObject_New(ptr, type, own);
  46607. - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  46608. - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  46609. - Py_DECREF(robj);
  46610. - robj = inst;
  46611. - }
  46612. - return robj;
  46613. -}
  46614. -
  46615. -/* Create a new packed object */
  46616. -
  46617. -SWIGRUNTIMEINLINE PyObject *
  46618. -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  46619. - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  46620. -}
  46621. -
  46622. -/* -----------------------------------------------------------------------------*
  46623. - * Get type list
  46624. - * -----------------------------------------------------------------------------*/
  46625. -
  46626. -#ifdef SWIG_LINK_RUNTIME
  46627. -void *SWIG_ReturnGlobalTypeList(void *);
  46628. -#endif
  46629. -
  46630. -SWIGRUNTIME swig_module_info *
  46631. -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  46632. - static void *type_pointer = (void *)0;
  46633. - /* first check if module already created */
  46634. - if (!type_pointer) {
  46635. -#ifdef SWIG_LINK_RUNTIME
  46636. - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  46637. -#else
  46638. -# ifdef SWIGPY_USE_CAPSULE
  46639. - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  46640. -# else
  46641. - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
  46642. - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
  46643. -# endif
  46644. - if (PyErr_Occurred()) {
  46645. - PyErr_Clear();
  46646. - type_pointer = (void *)0;
  46647. - }
  46648. -#endif
  46649. - }
  46650. - return (swig_module_info *) type_pointer;
  46651. -}
  46652. -
  46653. -#if PY_MAJOR_VERSION < 2
  46654. -/* PyModule_AddObject function was introduced in Python 2.0. The following function
  46655. - is copied out of Python/modsupport.c in python version 2.3.4 */
  46656. -SWIGINTERN int
  46657. -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
  46658. -{
  46659. - PyObject *dict;
  46660. - if (!PyModule_Check(m)) {
  46661. - PyErr_SetString(PyExc_TypeError,
  46662. - "PyModule_AddObject() needs module as first arg");
  46663. - return SWIG_ERROR;
  46664. - }
  46665. - if (!o) {
  46666. - PyErr_SetString(PyExc_TypeError,
  46667. - "PyModule_AddObject() needs non-NULL value");
  46668. - return SWIG_ERROR;
  46669. - }
  46670. -
  46671. - dict = PyModule_GetDict(m);
  46672. - if (dict == NULL) {
  46673. - /* Internal error -- modules must have a dict! */
  46674. - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
  46675. - PyModule_GetName(m));
  46676. - return SWIG_ERROR;
  46677. - }
  46678. - if (PyDict_SetItemString(dict, name, o))
  46679. - return SWIG_ERROR;
  46680. - Py_DECREF(o);
  46681. - return SWIG_OK;
  46682. -}
  46683. -#endif
  46684. -
  46685. -SWIGRUNTIME void
  46686. -#ifdef SWIGPY_USE_CAPSULE
  46687. -SWIG_Python_DestroyModule(PyObject *obj)
  46688. -#else
  46689. -SWIG_Python_DestroyModule(void *vptr)
  46690. -#endif
  46691. -{
  46692. -#ifdef SWIGPY_USE_CAPSULE
  46693. - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  46694. -#else
  46695. - swig_module_info *swig_module = (swig_module_info *) vptr;
  46696. -#endif
  46697. - swig_type_info **types = swig_module->types;
  46698. - size_t i;
  46699. - for (i =0; i < swig_module->size; ++i) {
  46700. - swig_type_info *ty = types[i];
  46701. - if (ty->owndata) {
  46702. - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  46703. - if (data) SwigPyClientData_Del(data);
  46704. - }
  46705. - }
  46706. - Py_DECREF(SWIG_This());
  46707. - swig_this = NULL;
  46708. -}
  46709. -
  46710. -SWIGRUNTIME void
  46711. -SWIG_Python_SetModule(swig_module_info *swig_module) {
  46712. -#if PY_VERSION_HEX >= 0x03000000
  46713. - /* Add a dummy module object into sys.modules */
  46714. - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  46715. -#else
  46716. - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  46717. - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  46718. -#endif
  46719. -#ifdef SWIGPY_USE_CAPSULE
  46720. - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  46721. - if (pointer && module) {
  46722. - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  46723. - } else {
  46724. - Py_XDECREF(pointer);
  46725. - }
  46726. -#else
  46727. - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  46728. - if (pointer && module) {
  46729. - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  46730. - } else {
  46731. - Py_XDECREF(pointer);
  46732. - }
  46733. -#endif
  46734. -}
  46735. -
  46736. -/* The python cached type query */
  46737. -SWIGRUNTIME PyObject *
  46738. -SWIG_Python_TypeCache(void) {
  46739. - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  46740. - return cache;
  46741. -}
  46742. -
  46743. -SWIGRUNTIME swig_type_info *
  46744. -SWIG_Python_TypeQuery(const char *type)
  46745. -{
  46746. - PyObject *cache = SWIG_Python_TypeCache();
  46747. - PyObject *key = SWIG_Python_str_FromChar(type);
  46748. - PyObject *obj = PyDict_GetItem(cache, key);
  46749. - swig_type_info *descriptor;
  46750. - if (obj) {
  46751. -#ifdef SWIGPY_USE_CAPSULE
  46752. - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  46753. -#else
  46754. - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
  46755. -#endif
  46756. - } else {
  46757. - swig_module_info *swig_module = SWIG_GetModule(0);
  46758. - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  46759. - if (descriptor) {
  46760. -#ifdef SWIGPY_USE_CAPSULE
  46761. - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  46762. -#else
  46763. - obj = PyCObject_FromVoidPtr(descriptor, NULL);
  46764. -#endif
  46765. - PyDict_SetItem(cache, key, obj);
  46766. - Py_DECREF(obj);
  46767. - }
  46768. - }
  46769. - Py_DECREF(key);
  46770. - return descriptor;
  46771. -}
  46772. -
  46773. -/*
  46774. - For backward compatibility only
  46775. -*/
  46776. -#define SWIG_POINTER_EXCEPTION 0
  46777. -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  46778. -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  46779. -
  46780. -SWIGRUNTIME int
  46781. -SWIG_Python_AddErrMesg(const char* mesg, int infront)
  46782. -{
  46783. - if (PyErr_Occurred()) {
  46784. - PyObject *type = 0;
  46785. - PyObject *value = 0;
  46786. - PyObject *traceback = 0;
  46787. - PyErr_Fetch(&type, &value, &traceback);
  46788. - if (value) {
  46789. - char *tmp;
  46790. - PyObject *old_str = PyObject_Str(value);
  46791. - Py_XINCREF(type);
  46792. - PyErr_Clear();
  46793. - if (infront) {
  46794. - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
  46795. - } else {
  46796. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  46797. - }
  46798. - SWIG_Python_str_DelForPy3(tmp);
  46799. - Py_DECREF(old_str);
  46800. - }
  46801. - return 1;
  46802. - } else {
  46803. - return 0;
  46804. - }
  46805. -}
  46806. -
  46807. -SWIGRUNTIME int
  46808. -SWIG_Python_ArgFail(int argnum)
  46809. -{
  46810. - if (PyErr_Occurred()) {
  46811. - /* add information about failing argument */
  46812. - char mesg[256];
  46813. - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  46814. - return SWIG_Python_AddErrMesg(mesg, 1);
  46815. - } else {
  46816. - return 0;
  46817. - }
  46818. -}
  46819. -
  46820. -SWIGRUNTIMEINLINE const char *
  46821. -SwigPyObject_GetDesc(PyObject *self)
  46822. -{
  46823. - SwigPyObject *v = (SwigPyObject *)self;
  46824. - swig_type_info *ty = v ? v->ty : 0;
  46825. - return ty ? ty->str : "";
  46826. -}
  46827. -
  46828. -SWIGRUNTIME void
  46829. -SWIG_Python_TypeError(const char *type, PyObject *obj)
  46830. -{
  46831. - if (type) {
  46832. -#if defined(SWIG_COBJECT_TYPES)
  46833. - if (obj && SwigPyObject_Check(obj)) {
  46834. - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  46835. - if (otype) {
  46836. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  46837. - type, otype);
  46838. - return;
  46839. - }
  46840. - } else
  46841. -#endif
  46842. - {
  46843. - const char *otype = (obj ? obj->ob_type->tp_name : 0);
  46844. - if (otype) {
  46845. - PyObject *str = PyObject_Str(obj);
  46846. - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  46847. - if (cstr) {
  46848. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  46849. - type, otype, cstr);
  46850. - SWIG_Python_str_DelForPy3(cstr);
  46851. - } else {
  46852. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  46853. - type, otype);
  46854. - }
  46855. - Py_XDECREF(str);
  46856. - return;
  46857. - }
  46858. - }
  46859. - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  46860. - } else {
  46861. - PyErr_Format(PyExc_TypeError, "unexpected type is received");
  46862. - }
  46863. -}
  46864. -
  46865. -
  46866. -/* Convert a pointer value, signal an exception on a type mismatch */
  46867. -SWIGRUNTIME void *
  46868. -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  46869. - void *result;
  46870. - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  46871. - PyErr_Clear();
  46872. -#if SWIG_POINTER_EXCEPTION
  46873. - if (flags) {
  46874. - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  46875. - SWIG_Python_ArgFail(argnum);
  46876. - }
  46877. -#endif
  46878. - }
  46879. - return result;
  46880. -}
  46881. -
  46882. -#ifdef SWIGPYTHON_BUILTIN
  46883. -SWIGRUNTIME int
  46884. -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  46885. - PyTypeObject *tp = obj->ob_type;
  46886. - PyObject *descr;
  46887. - PyObject *encoded_name;
  46888. - descrsetfunc f;
  46889. - int res;
  46890. -
  46891. -# ifdef Py_USING_UNICODE
  46892. - if (PyString_Check(name)) {
  46893. - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  46894. - if (!name)
  46895. - return -1;
  46896. - } else if (!PyUnicode_Check(name))
  46897. -# else
  46898. - if (!PyString_Check(name))
  46899. -# endif
  46900. - {
  46901. - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  46902. - return -1;
  46903. - } else {
  46904. - Py_INCREF(name);
  46905. - }
  46906. -
  46907. - if (!tp->tp_dict) {
  46908. - if (PyType_Ready(tp) < 0)
  46909. - goto done;
  46910. - }
  46911. -
  46912. - res = -1;
  46913. - descr = _PyType_Lookup(tp, name);
  46914. - f = NULL;
  46915. - if (descr != NULL)
  46916. - f = descr->ob_type->tp_descr_set;
  46917. - if (!f) {
  46918. - if (PyString_Check(name)) {
  46919. - encoded_name = name;
  46920. - Py_INCREF(name);
  46921. - } else {
  46922. - encoded_name = PyUnicode_AsUTF8String(name);
  46923. - }
  46924. - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  46925. - Py_DECREF(encoded_name);
  46926. - } else {
  46927. - res = f(descr, obj, value);
  46928. - }
  46929. -
  46930. - done:
  46931. - Py_DECREF(name);
  46932. - return res;
  46933. -}
  46934. -#endif
  46935. -
  46936. -
  46937. -#ifdef __cplusplus
  46938. -}
  46939. -#endif
  46940. -
  46941. -
  46942. -
  46943. -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  46944. -
  46945. -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  46946. -
  46947. -
  46948. -
  46949. -/* -------- TYPES TABLE (BEGIN) -------- */
  46950. -
  46951. -#define SWIGTYPE_p_char swig_types[0]
  46952. -#define SWIGTYPE_p_std__exception swig_types[1]
  46953. -#define SWIGTYPE_p_std__ostream swig_types[2]
  46954. -#define SWIGTYPE_p_vips__VError swig_types[3]
  46955. -static swig_type_info *swig_types[5];
  46956. -static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
  46957. -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  46958. -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  46959. -
  46960. -/* -------- TYPES TABLE (END) -------- */
  46961. -
  46962. -#if (PY_VERSION_HEX <= 0x02000000)
  46963. -# if !defined(SWIG_PYTHON_CLASSIC)
  46964. -# error "This python version requires swig to be run with the '-classic' option"
  46965. -# endif
  46966. -#endif
  46967. -
  46968. -/*-----------------------------------------------
  46969. - @(target):= verrormodule.so
  46970. - ------------------------------------------------*/
  46971. -#if PY_VERSION_HEX >= 0x03000000
  46972. -# define SWIG_init PyInit_verrormodule
  46973. -
  46974. -#else
  46975. -# define SWIG_init initverrormodule
  46976. -
  46977. -#endif
  46978. -#define SWIG_name "verrormodule"
  46979. -
  46980. -#define SWIGVERSION 0x020010
  46981. -#define SWIG_VERSION SWIGVERSION
  46982. -
  46983. -
  46984. -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  46985. -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  46986. -
  46987. -
  46988. -#include <stdexcept>
  46989. -
  46990. -
  46991. -namespace swig {
  46992. - class SwigPtr_PyObject {
  46993. - protected:
  46994. - PyObject *_obj;
  46995. -
  46996. - public:
  46997. - SwigPtr_PyObject() :_obj(0)
  46998. - {
  46999. - }
  47000. -
  47001. - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
  47002. - {
  47003. - Py_XINCREF(_obj);
  47004. - }
  47005. -
  47006. - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
  47007. - {
  47008. - if (initial_ref) {
  47009. - Py_XINCREF(_obj);
  47010. - }
  47011. - }
  47012. -
  47013. - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
  47014. - {
  47015. - Py_XINCREF(item._obj);
  47016. - Py_XDECREF(_obj);
  47017. - _obj = item._obj;
  47018. - return *this;
  47019. - }
  47020. -
  47021. - ~SwigPtr_PyObject()
  47022. - {
  47023. - Py_XDECREF(_obj);
  47024. - }
  47025. -
  47026. - operator PyObject *() const
  47027. - {
  47028. - return _obj;
  47029. - }
  47030. -
  47031. - PyObject *operator->() const
  47032. - {
  47033. - return _obj;
  47034. - }
  47035. - };
  47036. -}
  47037. -
  47038. -
  47039. -namespace swig {
  47040. - struct SwigVar_PyObject : SwigPtr_PyObject {
  47041. - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
  47042. -
  47043. - SwigVar_PyObject & operator = (PyObject* obj)
  47044. - {
  47045. - Py_XDECREF(_obj);
  47046. - _obj = obj;
  47047. - return *this;
  47048. - }
  47049. - };
  47050. -}
  47051. -
  47052. -
  47053. -#include <vips/vipscpp.h>
  47054. -
  47055. -
  47056. -#include <stdexcept>
  47057. -
  47058. -
  47059. -#include <string>
  47060. -
  47061. -
  47062. -SWIGINTERN swig_type_info*
  47063. -SWIG_pchar_descriptor(void)
  47064. -{
  47065. - static int init = 0;
  47066. - static swig_type_info* info = 0;
  47067. - if (!init) {
  47068. - info = SWIG_TypeQuery("_p_char");
  47069. - init = 1;
  47070. - }
  47071. - return info;
  47072. -}
  47073. -
  47074. -
  47075. -SWIGINTERN int
  47076. -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  47077. -{
  47078. -#if PY_VERSION_HEX>=0x03000000
  47079. - if (PyUnicode_Check(obj))
  47080. -#else
  47081. - if (PyString_Check(obj))
  47082. -#endif
  47083. - {
  47084. - char *cstr; Py_ssize_t len;
  47085. -#if PY_VERSION_HEX>=0x03000000
  47086. - if (!alloc && cptr) {
  47087. - /* We can't allow converting without allocation, since the internal
  47088. - representation of string in Python 3 is UCS-2/UCS-4 but we require
  47089. - a UTF-8 representation.
  47090. - TODO(bhy) More detailed explanation */
  47091. - return SWIG_RuntimeError;
  47092. - }
  47093. - obj = PyUnicode_AsUTF8String(obj);
  47094. - PyBytes_AsStringAndSize(obj, &cstr, &len);
  47095. - if(alloc) *alloc = SWIG_NEWOBJ;
  47096. -#else
  47097. - PyString_AsStringAndSize(obj, &cstr, &len);
  47098. -#endif
  47099. - if (cptr) {
  47100. - if (alloc) {
  47101. - /*
  47102. - In python the user should not be able to modify the inner
  47103. - string representation. To warranty that, if you define
  47104. - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
  47105. - buffer is always returned.
  47106. -
  47107. - The default behavior is just to return the pointer value,
  47108. - so, be careful.
  47109. - */
  47110. -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
  47111. - if (*alloc != SWIG_OLDOBJ)
  47112. -#else
  47113. - if (*alloc == SWIG_NEWOBJ)
  47114. -#endif
  47115. - {
  47116. - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
  47117. - *alloc = SWIG_NEWOBJ;
  47118. - }
  47119. - else {
  47120. - *cptr = cstr;
  47121. - *alloc = SWIG_OLDOBJ;
  47122. - }
  47123. - } else {
  47124. - #if PY_VERSION_HEX>=0x03000000
  47125. - assert(0); /* Should never reach here in Python 3 */
  47126. - #endif
  47127. - *cptr = SWIG_Python_str_AsChar(obj);
  47128. - }
  47129. - }
  47130. - if (psize) *psize = len + 1;
  47131. -#if PY_VERSION_HEX>=0x03000000
  47132. - Py_XDECREF(obj);
  47133. -#endif
  47134. - return SWIG_OK;
  47135. - } else {
  47136. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  47137. - if (pchar_descriptor) {
  47138. - void* vptr = 0;
  47139. - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  47140. - if (cptr) *cptr = (char *) vptr;
  47141. - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  47142. - if (alloc) *alloc = SWIG_OLDOBJ;
  47143. - return SWIG_OK;
  47144. - }
  47145. - }
  47146. - }
  47147. - return SWIG_TypeError;
  47148. -}
  47149. -
  47150. -
  47151. -SWIGINTERN int
  47152. -SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
  47153. -{
  47154. - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
  47155. - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
  47156. - if (buf) {
  47157. - if (val) *val = new std::string(buf, size - 1);
  47158. - if (alloc == SWIG_NEWOBJ) delete[] buf;
  47159. - return SWIG_NEWOBJ;
  47160. - } else {
  47161. - if (val) *val = 0;
  47162. - return SWIG_OLDOBJ;
  47163. - }
  47164. - } else {
  47165. - static int init = 0;
  47166. - static swig_type_info* descriptor = 0;
  47167. - if (!init) {
  47168. - descriptor = SWIG_TypeQuery("std::string" " *");
  47169. - init = 1;
  47170. - }
  47171. - if (descriptor) {
  47172. - std::string *vptr;
  47173. - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
  47174. - if (SWIG_IsOK(res) && val) *val = vptr;
  47175. - return res;
  47176. - }
  47177. - }
  47178. - return SWIG_ERROR;
  47179. -}
  47180. -
  47181. -
  47182. -
  47183. -
  47184. -
  47185. -#include <limits.h>
  47186. -#if !defined(SWIG_NO_LLONG_MAX)
  47187. -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  47188. -# define LLONG_MAX __LONG_LONG_MAX__
  47189. -# define LLONG_MIN (-LLONG_MAX - 1LL)
  47190. -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  47191. -# endif
  47192. -#endif
  47193. -
  47194. -
  47195. -SWIGINTERN int
  47196. -SWIG_AsVal_double (PyObject *obj, double *val)
  47197. -{
  47198. - int res = SWIG_TypeError;
  47199. - if (PyFloat_Check(obj)) {
  47200. - if (val) *val = PyFloat_AsDouble(obj);
  47201. - return SWIG_OK;
  47202. - } else if (PyInt_Check(obj)) {
  47203. - if (val) *val = PyInt_AsLong(obj);
  47204. - return SWIG_OK;
  47205. - } else if (PyLong_Check(obj)) {
  47206. - double v = PyLong_AsDouble(obj);
  47207. - if (!PyErr_Occurred()) {
  47208. - if (val) *val = v;
  47209. - return SWIG_OK;
  47210. - } else {
  47211. - PyErr_Clear();
  47212. - }
  47213. - }
  47214. -#ifdef SWIG_PYTHON_CAST_MODE
  47215. - {
  47216. - int dispatch = 0;
  47217. - double d = PyFloat_AsDouble(obj);
  47218. - if (!PyErr_Occurred()) {
  47219. - if (val) *val = d;
  47220. - return SWIG_AddCast(SWIG_OK);
  47221. - } else {
  47222. - PyErr_Clear();
  47223. - }
  47224. - if (!dispatch) {
  47225. - long v = PyLong_AsLong(obj);
  47226. - if (!PyErr_Occurred()) {
  47227. - if (val) *val = v;
  47228. - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
  47229. - } else {
  47230. - PyErr_Clear();
  47231. - }
  47232. - }
  47233. - }
  47234. -#endif
  47235. - return res;
  47236. -}
  47237. -
  47238. -
  47239. -#include <float.h>
  47240. -
  47241. -
  47242. -#include <math.h>
  47243. -
  47244. -
  47245. -SWIGINTERNINLINE int
  47246. -SWIG_CanCastAsInteger(double *d, double min, double max) {
  47247. - double x = *d;
  47248. - if ((min <= x && x <= max)) {
  47249. - double fx = floor(x);
  47250. - double cx = ceil(x);
  47251. - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  47252. - if ((errno == EDOM) || (errno == ERANGE)) {
  47253. - errno = 0;
  47254. - } else {
  47255. - double summ, reps, diff;
  47256. - if (rd < x) {
  47257. - diff = x - rd;
  47258. - } else if (rd > x) {
  47259. - diff = rd - x;
  47260. - } else {
  47261. - return 1;
  47262. - }
  47263. - summ = rd + x;
  47264. - reps = diff/summ;
  47265. - if (reps < 8*DBL_EPSILON) {
  47266. - *d = rd;
  47267. - return 1;
  47268. - }
  47269. - }
  47270. - }
  47271. - return 0;
  47272. -}
  47273. -
  47274. -
  47275. -SWIGINTERN int
  47276. -SWIG_AsVal_long (PyObject *obj, long* val)
  47277. -{
  47278. - if (PyInt_Check(obj)) {
  47279. - if (val) *val = PyInt_AsLong(obj);
  47280. - return SWIG_OK;
  47281. - } else if (PyLong_Check(obj)) {
  47282. - long v = PyLong_AsLong(obj);
  47283. - if (!PyErr_Occurred()) {
  47284. - if (val) *val = v;
  47285. - return SWIG_OK;
  47286. - } else {
  47287. - PyErr_Clear();
  47288. - }
  47289. - }
  47290. -#ifdef SWIG_PYTHON_CAST_MODE
  47291. - {
  47292. - int dispatch = 0;
  47293. - long v = PyInt_AsLong(obj);
  47294. - if (!PyErr_Occurred()) {
  47295. - if (val) *val = v;
  47296. - return SWIG_AddCast(SWIG_OK);
  47297. - } else {
  47298. - PyErr_Clear();
  47299. - }
  47300. - if (!dispatch) {
  47301. - double d;
  47302. - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  47303. - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  47304. - if (val) *val = (long)(d);
  47305. - return res;
  47306. - }
  47307. - }
  47308. - }
  47309. -#endif
  47310. - return SWIG_TypeError;
  47311. -}
  47312. -
  47313. -
  47314. -SWIGINTERN int
  47315. -SWIG_AsVal_int (PyObject * obj, int *val)
  47316. -{
  47317. - long v;
  47318. - int res = SWIG_AsVal_long (obj, &v);
  47319. - if (SWIG_IsOK(res)) {
  47320. - if ((v < INT_MIN || v > INT_MAX)) {
  47321. - return SWIG_OverflowError;
  47322. - } else {
  47323. - if (val) *val = static_cast< int >(v);
  47324. - }
  47325. - }
  47326. - return res;
  47327. -}
  47328. -
  47329. -
  47330. -SWIGINTERNINLINE PyObject *
  47331. -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  47332. -{
  47333. - if (carray) {
  47334. - if (size > INT_MAX) {
  47335. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  47336. - return pchar_descriptor ?
  47337. - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
  47338. - } else {
  47339. -#if PY_VERSION_HEX >= 0x03000000
  47340. - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
  47341. -#else
  47342. - return PyString_FromStringAndSize(carray, static_cast< int >(size));
  47343. -#endif
  47344. - }
  47345. - } else {
  47346. - return SWIG_Py_Void();
  47347. - }
  47348. -}
  47349. -
  47350. -
  47351. -SWIGINTERNINLINE PyObject *
  47352. -SWIG_FromCharPtr(const char *cptr)
  47353. -{
  47354. - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  47355. -}
  47356. -
  47357. -SWIGINTERN char const *vips_VError___str__(vips::VError *self){
  47358. - return self->what ();
  47359. - }
  47360. -#ifdef __cplusplus
  47361. -extern "C" {
  47362. -#endif
  47363. -SWIGINTERN PyObject *_wrap_new_VError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47364. - PyObject *resultobj = 0;
  47365. - std::string arg1 ;
  47366. - PyObject * obj0 = 0 ;
  47367. - vips::VError *result = 0 ;
  47368. -
  47369. - if (!PyArg_ParseTuple(args,(char *)"O:new_VError",&obj0)) SWIG_fail;
  47370. - {
  47371. - std::string *ptr = (std::string *)0;
  47372. - int res = SWIG_AsPtr_std_string(obj0, &ptr);
  47373. - if (!SWIG_IsOK(res) || !ptr) {
  47374. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VError" "', argument " "1"" of type '" "std::string""'");
  47375. - }
  47376. - arg1 = *ptr;
  47377. - if (SWIG_IsNewObj(res)) delete ptr;
  47378. - }
  47379. - result = (vips::VError *)new vips::VError(arg1);
  47380. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 );
  47381. - return resultobj;
  47382. -fail:
  47383. - return NULL;
  47384. -}
  47385. -
  47386. -
  47387. -SWIGINTERN PyObject *_wrap_new_VError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47388. - PyObject *resultobj = 0;
  47389. - vips::VError *result = 0 ;
  47390. -
  47391. - if (!PyArg_ParseTuple(args,(char *)":new_VError")) SWIG_fail;
  47392. - result = (vips::VError *)new vips::VError();
  47393. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 );
  47394. - return resultobj;
  47395. -fail:
  47396. - return NULL;
  47397. -}
  47398. -
  47399. -
  47400. -SWIGINTERN PyObject *_wrap_new_VError(PyObject *self, PyObject *args) {
  47401. - int argc;
  47402. - PyObject *argv[2];
  47403. - int ii;
  47404. -
  47405. - if (!PyTuple_Check(args)) SWIG_fail;
  47406. - argc = args ? (int)PyObject_Length(args) : 0;
  47407. - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
  47408. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  47409. - }
  47410. - if (argc == 0) {
  47411. - return _wrap_new_VError__SWIG_1(self, args);
  47412. - }
  47413. - if (argc == 1) {
  47414. - int _v;
  47415. - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
  47416. - _v = SWIG_CheckState(res);
  47417. - if (_v) {
  47418. - return _wrap_new_VError__SWIG_0(self, args);
  47419. - }
  47420. - }
  47421. -
  47422. -fail:
  47423. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VError'.\n"
  47424. - " Possible C/C++ prototypes are:\n"
  47425. - " vips::VError::VError(std::string)\n"
  47426. - " vips::VError::VError()\n");
  47427. - return 0;
  47428. -}
  47429. -
  47430. -
  47431. -SWIGINTERN PyObject *_wrap_delete_VError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47432. - PyObject *resultobj = 0;
  47433. - vips::VError *arg1 = (vips::VError *) 0 ;
  47434. - void *argp1 = 0 ;
  47435. - int res1 = 0 ;
  47436. - PyObject * obj0 = 0 ;
  47437. -
  47438. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VError",&obj0)) SWIG_fail;
  47439. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, SWIG_POINTER_DISOWN | 0 );
  47440. - if (!SWIG_IsOK(res1)) {
  47441. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VError" "', argument " "1"" of type '" "vips::VError *""'");
  47442. - }
  47443. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47444. - delete arg1;
  47445. - resultobj = SWIG_Py_Void();
  47446. - return resultobj;
  47447. -fail:
  47448. - return NULL;
  47449. -}
  47450. -
  47451. -
  47452. -SWIGINTERN PyObject *_wrap_VError_perror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47453. - PyObject *resultobj = 0;
  47454. - vips::VError *arg1 = (vips::VError *) 0 ;
  47455. - char *arg2 = (char *) 0 ;
  47456. - void *argp1 = 0 ;
  47457. - int res1 = 0 ;
  47458. - int res2 ;
  47459. - char *buf2 = 0 ;
  47460. - int alloc2 = 0 ;
  47461. - PyObject * obj0 = 0 ;
  47462. - PyObject * obj1 = 0 ;
  47463. -
  47464. - if (!PyArg_ParseTuple(args,(char *)"OO:VError_perror",&obj0,&obj1)) SWIG_fail;
  47465. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47466. - if (!SWIG_IsOK(res1)) {
  47467. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'");
  47468. - }
  47469. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47470. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  47471. - if (!SWIG_IsOK(res2)) {
  47472. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_perror" "', argument " "2"" of type '" "char const *""'");
  47473. - }
  47474. - arg2 = reinterpret_cast< char * >(buf2);
  47475. - (arg1)->perror((char const *)arg2);
  47476. - resultobj = SWIG_Py_Void();
  47477. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  47478. - return resultobj;
  47479. -fail:
  47480. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  47481. - return NULL;
  47482. -}
  47483. -
  47484. -
  47485. -SWIGINTERN PyObject *_wrap_VError_perror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47486. - PyObject *resultobj = 0;
  47487. - vips::VError *arg1 = (vips::VError *) 0 ;
  47488. - void *argp1 = 0 ;
  47489. - int res1 = 0 ;
  47490. - PyObject * obj0 = 0 ;
  47491. -
  47492. - if (!PyArg_ParseTuple(args,(char *)"O:VError_perror",&obj0)) SWIG_fail;
  47493. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47494. - if (!SWIG_IsOK(res1)) {
  47495. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'");
  47496. - }
  47497. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47498. - (arg1)->perror();
  47499. - resultobj = SWIG_Py_Void();
  47500. - return resultobj;
  47501. -fail:
  47502. - return NULL;
  47503. -}
  47504. -
  47505. -
  47506. -SWIGINTERN PyObject *_wrap_VError_perror(PyObject *self, PyObject *args) {
  47507. - int argc;
  47508. - PyObject *argv[3];
  47509. - int ii;
  47510. -
  47511. - if (!PyTuple_Check(args)) SWIG_fail;
  47512. - argc = args ? (int)PyObject_Length(args) : 0;
  47513. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  47514. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  47515. - }
  47516. - if (argc == 1) {
  47517. - int _v;
  47518. - void *vptr = 0;
  47519. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
  47520. - _v = SWIG_CheckState(res);
  47521. - if (_v) {
  47522. - return _wrap_VError_perror__SWIG_1(self, args);
  47523. - }
  47524. - }
  47525. - if (argc == 2) {
  47526. - int _v;
  47527. - void *vptr = 0;
  47528. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
  47529. - _v = SWIG_CheckState(res);
  47530. - if (_v) {
  47531. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  47532. - _v = SWIG_CheckState(res);
  47533. - if (_v) {
  47534. - return _wrap_VError_perror__SWIG_0(self, args);
  47535. - }
  47536. - }
  47537. - }
  47538. -
  47539. -fail:
  47540. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_perror'.\n"
  47541. - " Possible C/C++ prototypes are:\n"
  47542. - " vips::VError::perror(char const *)\n"
  47543. - " vips::VError::perror()\n");
  47544. - return 0;
  47545. -}
  47546. -
  47547. -
  47548. -SWIGINTERN PyObject *_wrap_VError_app__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47549. - PyObject *resultobj = 0;
  47550. - vips::VError *arg1 = (vips::VError *) 0 ;
  47551. - std::string arg2 ;
  47552. - void *argp1 = 0 ;
  47553. - int res1 = 0 ;
  47554. - PyObject * obj0 = 0 ;
  47555. - PyObject * obj1 = 0 ;
  47556. - vips::VError *result = 0 ;
  47557. -
  47558. - if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail;
  47559. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47560. - if (!SWIG_IsOK(res1)) {
  47561. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'");
  47562. - }
  47563. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47564. - {
  47565. - std::string *ptr = (std::string *)0;
  47566. - int res = SWIG_AsPtr_std_string(obj1, &ptr);
  47567. - if (!SWIG_IsOK(res) || !ptr) {
  47568. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VError_app" "', argument " "2"" of type '" "std::string""'");
  47569. - }
  47570. - arg2 = *ptr;
  47571. - if (SWIG_IsNewObj(res)) delete ptr;
  47572. - }
  47573. - result = (vips::VError *) &(arg1)->app(arg2);
  47574. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 );
  47575. - return resultobj;
  47576. -fail:
  47577. - return NULL;
  47578. -}
  47579. -
  47580. -
  47581. -SWIGINTERN PyObject *_wrap_VError_app__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47582. - PyObject *resultobj = 0;
  47583. - vips::VError *arg1 = (vips::VError *) 0 ;
  47584. - int arg2 ;
  47585. - void *argp1 = 0 ;
  47586. - int res1 = 0 ;
  47587. - int val2 ;
  47588. - int ecode2 = 0 ;
  47589. - PyObject * obj0 = 0 ;
  47590. - PyObject * obj1 = 0 ;
  47591. - vips::VError *result = 0 ;
  47592. -
  47593. - if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail;
  47594. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47595. - if (!SWIG_IsOK(res1)) {
  47596. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'");
  47597. - }
  47598. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47599. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  47600. - if (!SWIG_IsOK(ecode2)) {
  47601. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VError_app" "', argument " "2"" of type '" "int""'");
  47602. - }
  47603. - arg2 = static_cast< int >(val2);
  47604. - result = (vips::VError *) &(arg1)->app(arg2);
  47605. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 );
  47606. - return resultobj;
  47607. -fail:
  47608. - return NULL;
  47609. -}
  47610. -
  47611. -
  47612. -SWIGINTERN PyObject *_wrap_VError_app(PyObject *self, PyObject *args) {
  47613. - int argc;
  47614. - PyObject *argv[3];
  47615. - int ii;
  47616. -
  47617. - if (!PyTuple_Check(args)) SWIG_fail;
  47618. - argc = args ? (int)PyObject_Length(args) : 0;
  47619. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  47620. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  47621. - }
  47622. - if (argc == 2) {
  47623. - int _v;
  47624. - void *vptr = 0;
  47625. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
  47626. - _v = SWIG_CheckState(res);
  47627. - if (_v) {
  47628. - {
  47629. - int res = SWIG_AsVal_int(argv[1], NULL);
  47630. - _v = SWIG_CheckState(res);
  47631. - }
  47632. - if (_v) {
  47633. - return _wrap_VError_app__SWIG_1(self, args);
  47634. - }
  47635. - }
  47636. - }
  47637. - if (argc == 2) {
  47638. - int _v;
  47639. - void *vptr = 0;
  47640. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0);
  47641. - _v = SWIG_CheckState(res);
  47642. - if (_v) {
  47643. - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
  47644. - _v = SWIG_CheckState(res);
  47645. - if (_v) {
  47646. - return _wrap_VError_app__SWIG_0(self, args);
  47647. - }
  47648. - }
  47649. - }
  47650. -
  47651. -fail:
  47652. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_app'.\n"
  47653. - " Possible C/C++ prototypes are:\n"
  47654. - " vips::VError::app(std::string)\n"
  47655. - " vips::VError::app(int const)\n");
  47656. - return 0;
  47657. -}
  47658. -
  47659. -
  47660. -SWIGINTERN PyObject *_wrap_VError_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47661. - PyObject *resultobj = 0;
  47662. - vips::VError *arg1 = (vips::VError *) 0 ;
  47663. - void *argp1 = 0 ;
  47664. - int res1 = 0 ;
  47665. - PyObject * obj0 = 0 ;
  47666. - char *result = 0 ;
  47667. -
  47668. - if (!PyArg_ParseTuple(args,(char *)"O:VError_what",&obj0)) SWIG_fail;
  47669. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47670. - if (!SWIG_IsOK(res1)) {
  47671. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_what" "', argument " "1"" of type '" "vips::VError const *""'");
  47672. - }
  47673. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47674. - result = (char *)((vips::VError const *)arg1)->what();
  47675. - resultobj = SWIG_FromCharPtr((const char *)result);
  47676. - return resultobj;
  47677. -fail:
  47678. - return NULL;
  47679. -}
  47680. -
  47681. -
  47682. -SWIGINTERN PyObject *_wrap_VError_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47683. - PyObject *resultobj = 0;
  47684. - vips::VError *arg1 = (vips::VError *) 0 ;
  47685. - std::ostream *arg2 = 0 ;
  47686. - void *argp1 = 0 ;
  47687. - int res1 = 0 ;
  47688. - void *argp2 = 0 ;
  47689. - int res2 = 0 ;
  47690. - PyObject * obj0 = 0 ;
  47691. - PyObject * obj1 = 0 ;
  47692. -
  47693. - if (!PyArg_ParseTuple(args,(char *)"OO:VError_ostream_print",&obj0,&obj1)) SWIG_fail;
  47694. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47695. - if (!SWIG_IsOK(res1)) {
  47696. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_ostream_print" "', argument " "1"" of type '" "vips::VError const *""'");
  47697. - }
  47698. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47699. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 );
  47700. - if (!SWIG_IsOK(res2)) {
  47701. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
  47702. - }
  47703. - if (!argp2) {
  47704. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
  47705. - }
  47706. - arg2 = reinterpret_cast< std::ostream * >(argp2);
  47707. - ((vips::VError const *)arg1)->ostream_print(*arg2);
  47708. - resultobj = SWIG_Py_Void();
  47709. - return resultobj;
  47710. -fail:
  47711. - return NULL;
  47712. -}
  47713. -
  47714. -
  47715. -SWIGINTERN PyObject *_wrap_VError___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47716. - PyObject *resultobj = 0;
  47717. - vips::VError *arg1 = (vips::VError *) 0 ;
  47718. - void *argp1 = 0 ;
  47719. - int res1 = 0 ;
  47720. - PyObject * obj0 = 0 ;
  47721. - char *result = 0 ;
  47722. -
  47723. - if (!PyArg_ParseTuple(args,(char *)"O:VError___str__",&obj0)) SWIG_fail;
  47724. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 );
  47725. - if (!SWIG_IsOK(res1)) {
  47726. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError___str__" "', argument " "1"" of type '" "vips::VError *""'");
  47727. - }
  47728. - arg1 = reinterpret_cast< vips::VError * >(argp1);
  47729. - result = (char *)vips_VError___str__(arg1);
  47730. - resultobj = SWIG_FromCharPtr((const char *)result);
  47731. - return resultobj;
  47732. -fail:
  47733. - return NULL;
  47734. -}
  47735. -
  47736. -
  47737. -SWIGINTERN PyObject *VError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47738. - PyObject *obj;
  47739. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  47740. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VError, SWIG_NewClientData(obj));
  47741. - return SWIG_Py_Void();
  47742. -}
  47743. -
  47744. -SWIGINTERN PyObject *_wrap___lshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47745. - PyObject *resultobj = 0;
  47746. - std::ostream *arg1 = 0 ;
  47747. - vips::VError *arg2 = 0 ;
  47748. - void *argp1 = 0 ;
  47749. - int res1 = 0 ;
  47750. - void *argp2 = 0 ;
  47751. - int res2 = 0 ;
  47752. - PyObject * obj0 = 0 ;
  47753. - PyObject * obj1 = 0 ;
  47754. - std::ostream *result = 0 ;
  47755. -
  47756. - if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail;
  47757. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 );
  47758. - if (!SWIG_IsOK(res1)) {
  47759. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
  47760. - }
  47761. - if (!argp1) {
  47762. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
  47763. - }
  47764. - arg1 = reinterpret_cast< std::ostream * >(argp1);
  47765. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VError, 0 | 0);
  47766. - if (!SWIG_IsOK(res2)) {
  47767. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'");
  47768. - }
  47769. - if (!argp2) {
  47770. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'");
  47771. - }
  47772. - arg2 = reinterpret_cast< vips::VError * >(argp2);
  47773. - result = (std::ostream *) &vips::operator <<(*arg1,(vips::VError const &)*arg2);
  47774. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
  47775. - return resultobj;
  47776. -fail:
  47777. - return NULL;
  47778. -}
  47779. -
  47780. -
  47781. -SWIGINTERN PyObject *_wrap_verror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47782. - PyObject *resultobj = 0;
  47783. - std::string arg1 ;
  47784. - PyObject * obj0 = 0 ;
  47785. -
  47786. - if (!PyArg_ParseTuple(args,(char *)"O:verror",&obj0)) SWIG_fail;
  47787. - {
  47788. - std::string *ptr = (std::string *)0;
  47789. - int res = SWIG_AsPtr_std_string(obj0, &ptr);
  47790. - if (!SWIG_IsOK(res) || !ptr) {
  47791. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "verror" "', argument " "1"" of type '" "std::string""'");
  47792. - }
  47793. - arg1 = *ptr;
  47794. - if (SWIG_IsNewObj(res)) delete ptr;
  47795. - }
  47796. - try {
  47797. - vips::verror(arg1);
  47798. - }
  47799. - catch(vips::VError &_e) {
  47800. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  47801. - }
  47802. -
  47803. - resultobj = SWIG_Py_Void();
  47804. - return resultobj;
  47805. -fail:
  47806. - return NULL;
  47807. -}
  47808. -
  47809. -
  47810. -SWIGINTERN PyObject *_wrap_verror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  47811. - PyObject *resultobj = 0;
  47812. -
  47813. - if (!PyArg_ParseTuple(args,(char *)":verror")) SWIG_fail;
  47814. - try {
  47815. - vips::verror();
  47816. - }
  47817. - catch(vips::VError &_e) {
  47818. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  47819. - }
  47820. -
  47821. - resultobj = SWIG_Py_Void();
  47822. - return resultobj;
  47823. -fail:
  47824. - return NULL;
  47825. -}
  47826. -
  47827. -
  47828. -SWIGINTERN PyObject *_wrap_verror(PyObject *self, PyObject *args) {
  47829. - int argc;
  47830. - PyObject *argv[2];
  47831. - int ii;
  47832. -
  47833. - if (!PyTuple_Check(args)) SWIG_fail;
  47834. - argc = args ? (int)PyObject_Length(args) : 0;
  47835. - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
  47836. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  47837. - }
  47838. - if (argc == 0) {
  47839. - return _wrap_verror__SWIG_1(self, args);
  47840. - }
  47841. - if (argc == 1) {
  47842. - int _v;
  47843. - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
  47844. - _v = SWIG_CheckState(res);
  47845. - if (_v) {
  47846. - return _wrap_verror__SWIG_0(self, args);
  47847. - }
  47848. - }
  47849. -
  47850. -fail:
  47851. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'verror'.\n"
  47852. - " Possible C/C++ prototypes are:\n"
  47853. - " vips::verror(std::string)\n"
  47854. - " vips::verror()\n");
  47855. - return 0;
  47856. -}
  47857. -
  47858. -
  47859. -static PyMethodDef SwigMethods[] = {
  47860. - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
  47861. - { (char *)"new_VError", _wrap_new_VError, METH_VARARGS, NULL},
  47862. - { (char *)"delete_VError", _wrap_delete_VError, METH_VARARGS, NULL},
  47863. - { (char *)"VError_perror", _wrap_VError_perror, METH_VARARGS, NULL},
  47864. - { (char *)"VError_app", _wrap_VError_app, METH_VARARGS, NULL},
  47865. - { (char *)"VError_what", _wrap_VError_what, METH_VARARGS, NULL},
  47866. - { (char *)"VError_ostream_print", _wrap_VError_ostream_print, METH_VARARGS, NULL},
  47867. - { (char *)"VError___str__", _wrap_VError___str__, METH_VARARGS, NULL},
  47868. - { (char *)"VError_swigregister", VError_swigregister, METH_VARARGS, NULL},
  47869. - { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
  47870. - { (char *)"verror", _wrap_verror, METH_VARARGS, NULL},
  47871. - { NULL, NULL, 0, NULL }
  47872. -};
  47873. -
  47874. -
  47875. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  47876. -
  47877. -static void *_p_vips__VErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
  47878. - return (void *)((std::exception *) ((vips::VError *) x));
  47879. -}
  47880. -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  47881. -static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
  47882. -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
  47883. -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
  47884. -
  47885. -static swig_type_info *swig_type_initial[] = {
  47886. - &_swigt__p_char,
  47887. - &_swigt__p_std__exception,
  47888. - &_swigt__p_std__ostream,
  47889. - &_swigt__p_vips__VError,
  47890. -};
  47891. -
  47892. -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  47893. -static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_vips__VError, _p_vips__VErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
  47894. -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
  47895. -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
  47896. -
  47897. -static swig_cast_info *swig_cast_initial[] = {
  47898. - _swigc__p_char,
  47899. - _swigc__p_std__exception,
  47900. - _swigc__p_std__ostream,
  47901. - _swigc__p_vips__VError,
  47902. -};
  47903. -
  47904. -
  47905. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  47906. -
  47907. -static swig_const_info swig_const_table[] = {
  47908. -{0, 0, 0, 0.0, 0, 0}};
  47909. -
  47910. -#ifdef __cplusplus
  47911. -}
  47912. -#endif
  47913. -/* -----------------------------------------------------------------------------
  47914. - * Type initialization:
  47915. - * This problem is tough by the requirement that no dynamic
  47916. - * memory is used. Also, since swig_type_info structures store pointers to
  47917. - * swig_cast_info structures and swig_cast_info structures store pointers back
  47918. - * to swig_type_info structures, we need some lookup code at initialization.
  47919. - * The idea is that swig generates all the structures that are needed.
  47920. - * The runtime then collects these partially filled structures.
  47921. - * The SWIG_InitializeModule function takes these initial arrays out of
  47922. - * swig_module, and does all the lookup, filling in the swig_module.types
  47923. - * array with the correct data and linking the correct swig_cast_info
  47924. - * structures together.
  47925. - *
  47926. - * The generated swig_type_info structures are assigned staticly to an initial
  47927. - * array. We just loop through that array, and handle each type individually.
  47928. - * First we lookup if this type has been already loaded, and if so, use the
  47929. - * loaded structure instead of the generated one. Then we have to fill in the
  47930. - * cast linked list. The cast data is initially stored in something like a
  47931. - * two-dimensional array. Each row corresponds to a type (there are the same
  47932. - * number of rows as there are in the swig_type_initial array). Each entry in
  47933. - * a column is one of the swig_cast_info structures for that type.
  47934. - * The cast_initial array is actually an array of arrays, because each row has
  47935. - * a variable number of columns. So to actually build the cast linked list,
  47936. - * we find the array of casts associated with the type, and loop through it
  47937. - * adding the casts to the list. The one last trick we need to do is making
  47938. - * sure the type pointer in the swig_cast_info struct is correct.
  47939. - *
  47940. - * First off, we lookup the cast->type name to see if it is already loaded.
  47941. - * There are three cases to handle:
  47942. - * 1) If the cast->type has already been loaded AND the type we are adding
  47943. - * casting info to has not been loaded (it is in this module), THEN we
  47944. - * replace the cast->type pointer with the type pointer that has already
  47945. - * been loaded.
  47946. - * 2) If BOTH types (the one we are adding casting info to, and the
  47947. - * cast->type) are loaded, THEN the cast info has already been loaded by
  47948. - * the previous module so we just ignore it.
  47949. - * 3) Finally, if cast->type has not already been loaded, then we add that
  47950. - * swig_cast_info to the linked list (because the cast->type) pointer will
  47951. - * be correct.
  47952. - * ----------------------------------------------------------------------------- */
  47953. -
  47954. -#ifdef __cplusplus
  47955. -extern "C" {
  47956. -#if 0
  47957. -} /* c-mode */
  47958. -#endif
  47959. -#endif
  47960. -
  47961. -#if 0
  47962. -#define SWIGRUNTIME_DEBUG
  47963. -#endif
  47964. -
  47965. -
  47966. -SWIGRUNTIME void
  47967. -SWIG_InitializeModule(void *clientdata) {
  47968. - size_t i;
  47969. - swig_module_info *module_head, *iter;
  47970. - int found, init;
  47971. -
  47972. - /* check to see if the circular list has been setup, if not, set it up */
  47973. - if (swig_module.next==0) {
  47974. - /* Initialize the swig_module */
  47975. - swig_module.type_initial = swig_type_initial;
  47976. - swig_module.cast_initial = swig_cast_initial;
  47977. - swig_module.next = &swig_module;
  47978. - init = 1;
  47979. - } else {
  47980. - init = 0;
  47981. - }
  47982. -
  47983. - /* Try and load any already created modules */
  47984. - module_head = SWIG_GetModule(clientdata);
  47985. - if (!module_head) {
  47986. - /* This is the first module loaded for this interpreter */
  47987. - /* so set the swig module into the interpreter */
  47988. - SWIG_SetModule(clientdata, &swig_module);
  47989. - module_head = &swig_module;
  47990. - } else {
  47991. - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  47992. - found=0;
  47993. - iter=module_head;
  47994. - do {
  47995. - if (iter==&swig_module) {
  47996. - found=1;
  47997. - break;
  47998. - }
  47999. - iter=iter->next;
  48000. - } while (iter!= module_head);
  48001. -
  48002. - /* if the is found in the list, then all is done and we may leave */
  48003. - if (found) return;
  48004. - /* otherwise we must add out module into the list */
  48005. - swig_module.next = module_head->next;
  48006. - module_head->next = &swig_module;
  48007. - }
  48008. -
  48009. - /* When multiple interpeters are used, a module could have already been initialized in
  48010. - a different interpreter, but not yet have a pointer in this interpreter.
  48011. - In this case, we do not want to continue adding types... everything should be
  48012. - set up already */
  48013. - if (init == 0) return;
  48014. -
  48015. - /* Now work on filling in swig_module.types */
  48016. -#ifdef SWIGRUNTIME_DEBUG
  48017. - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  48018. -#endif
  48019. - for (i = 0; i < swig_module.size; ++i) {
  48020. - swig_type_info *type = 0;
  48021. - swig_type_info *ret;
  48022. - swig_cast_info *cast;
  48023. -
  48024. -#ifdef SWIGRUNTIME_DEBUG
  48025. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  48026. -#endif
  48027. -
  48028. - /* if there is another module already loaded */
  48029. - if (swig_module.next != &swig_module) {
  48030. - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  48031. - }
  48032. - if (type) {
  48033. - /* Overwrite clientdata field */
  48034. -#ifdef SWIGRUNTIME_DEBUG
  48035. - printf("SWIG_InitializeModule: found type %s\n", type->name);
  48036. -#endif
  48037. - if (swig_module.type_initial[i]->clientdata) {
  48038. - type->clientdata = swig_module.type_initial[i]->clientdata;
  48039. -#ifdef SWIGRUNTIME_DEBUG
  48040. - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  48041. -#endif
  48042. - }
  48043. - } else {
  48044. - type = swig_module.type_initial[i];
  48045. - }
  48046. -
  48047. - /* Insert casting types */
  48048. - cast = swig_module.cast_initial[i];
  48049. - while (cast->type) {
  48050. - /* Don't need to add information already in the list */
  48051. - ret = 0;
  48052. -#ifdef SWIGRUNTIME_DEBUG
  48053. - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  48054. -#endif
  48055. - if (swig_module.next != &swig_module) {
  48056. - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  48057. -#ifdef SWIGRUNTIME_DEBUG
  48058. - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  48059. -#endif
  48060. - }
  48061. - if (ret) {
  48062. - if (type == swig_module.type_initial[i]) {
  48063. -#ifdef SWIGRUNTIME_DEBUG
  48064. - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  48065. -#endif
  48066. - cast->type = ret;
  48067. - ret = 0;
  48068. - } else {
  48069. - /* Check for casting already in the list */
  48070. - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  48071. -#ifdef SWIGRUNTIME_DEBUG
  48072. - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  48073. -#endif
  48074. - if (!ocast) ret = 0;
  48075. - }
  48076. - }
  48077. -
  48078. - if (!ret) {
  48079. -#ifdef SWIGRUNTIME_DEBUG
  48080. - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  48081. -#endif
  48082. - if (type->cast) {
  48083. - type->cast->prev = cast;
  48084. - cast->next = type->cast;
  48085. - }
  48086. - type->cast = cast;
  48087. - }
  48088. - cast++;
  48089. - }
  48090. - /* Set entry in modules->types array equal to the type */
  48091. - swig_module.types[i] = type;
  48092. - }
  48093. - swig_module.types[i] = 0;
  48094. -
  48095. -#ifdef SWIGRUNTIME_DEBUG
  48096. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  48097. - for (i = 0; i < swig_module.size; ++i) {
  48098. - int j = 0;
  48099. - swig_cast_info *cast = swig_module.cast_initial[i];
  48100. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  48101. - while (cast->type) {
  48102. - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  48103. - cast++;
  48104. - ++j;
  48105. - }
  48106. - printf("---- Total casts: %d\n",j);
  48107. - }
  48108. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  48109. -#endif
  48110. -}
  48111. -
  48112. -/* This function will propagate the clientdata field of type to
  48113. -* any new swig_type_info structures that have been added into the list
  48114. -* of equivalent types. It is like calling
  48115. -* SWIG_TypeClientData(type, clientdata) a second time.
  48116. -*/
  48117. -SWIGRUNTIME void
  48118. -SWIG_PropagateClientData(void) {
  48119. - size_t i;
  48120. - swig_cast_info *equiv;
  48121. - static int init_run = 0;
  48122. -
  48123. - if (init_run) return;
  48124. - init_run = 1;
  48125. -
  48126. - for (i = 0; i < swig_module.size; i++) {
  48127. - if (swig_module.types[i]->clientdata) {
  48128. - equiv = swig_module.types[i]->cast;
  48129. - while (equiv) {
  48130. - if (!equiv->converter) {
  48131. - if (equiv->type && !equiv->type->clientdata)
  48132. - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  48133. - }
  48134. - equiv = equiv->next;
  48135. - }
  48136. - }
  48137. - }
  48138. -}
  48139. -
  48140. -#ifdef __cplusplus
  48141. -#if 0
  48142. -{
  48143. - /* c-mode */
  48144. -#endif
  48145. -}
  48146. -#endif
  48147. -
  48148. -
  48149. -
  48150. -#ifdef __cplusplus
  48151. -extern "C" {
  48152. -#endif
  48153. -
  48154. - /* Python-specific SWIG API */
  48155. -#define SWIG_newvarlink() SWIG_Python_newvarlink()
  48156. -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  48157. -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  48158. -
  48159. - /* -----------------------------------------------------------------------------
  48160. - * global variable support code.
  48161. - * ----------------------------------------------------------------------------- */
  48162. -
  48163. - typedef struct swig_globalvar {
  48164. - char *name; /* Name of global variable */
  48165. - PyObject *(*get_attr)(void); /* Return the current value */
  48166. - int (*set_attr)(PyObject *); /* Set the value */
  48167. - struct swig_globalvar *next;
  48168. - } swig_globalvar;
  48169. -
  48170. - typedef struct swig_varlinkobject {
  48171. - PyObject_HEAD
  48172. - swig_globalvar *vars;
  48173. - } swig_varlinkobject;
  48174. -
  48175. - SWIGINTERN PyObject *
  48176. - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  48177. -#if PY_VERSION_HEX >= 0x03000000
  48178. - return PyUnicode_InternFromString("<Swig global variables>");
  48179. -#else
  48180. - return PyString_FromString("<Swig global variables>");
  48181. -#endif
  48182. - }
  48183. -
  48184. - SWIGINTERN PyObject *
  48185. - swig_varlink_str(swig_varlinkobject *v) {
  48186. -#if PY_VERSION_HEX >= 0x03000000
  48187. - PyObject *str = PyUnicode_InternFromString("(");
  48188. - PyObject *tail;
  48189. - PyObject *joined;
  48190. - swig_globalvar *var;
  48191. - for (var = v->vars; var; var=var->next) {
  48192. - tail = PyUnicode_FromString(var->name);
  48193. - joined = PyUnicode_Concat(str, tail);
  48194. - Py_DecRef(str);
  48195. - Py_DecRef(tail);
  48196. - str = joined;
  48197. - if (var->next) {
  48198. - tail = PyUnicode_InternFromString(", ");
  48199. - joined = PyUnicode_Concat(str, tail);
  48200. - Py_DecRef(str);
  48201. - Py_DecRef(tail);
  48202. - str = joined;
  48203. - }
  48204. - }
  48205. - tail = PyUnicode_InternFromString(")");
  48206. - joined = PyUnicode_Concat(str, tail);
  48207. - Py_DecRef(str);
  48208. - Py_DecRef(tail);
  48209. - str = joined;
  48210. -#else
  48211. - PyObject *str = PyString_FromString("(");
  48212. - swig_globalvar *var;
  48213. - for (var = v->vars; var; var=var->next) {
  48214. - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  48215. - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  48216. - }
  48217. - PyString_ConcatAndDel(&str,PyString_FromString(")"));
  48218. -#endif
  48219. - return str;
  48220. - }
  48221. -
  48222. - SWIGINTERN int
  48223. - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
  48224. - char *tmp;
  48225. - PyObject *str = swig_varlink_str(v);
  48226. - fprintf(fp,"Swig global variables ");
  48227. - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
  48228. - SWIG_Python_str_DelForPy3(tmp);
  48229. - Py_DECREF(str);
  48230. - return 0;
  48231. - }
  48232. -
  48233. - SWIGINTERN void
  48234. - swig_varlink_dealloc(swig_varlinkobject *v) {
  48235. - swig_globalvar *var = v->vars;
  48236. - while (var) {
  48237. - swig_globalvar *n = var->next;
  48238. - free(var->name);
  48239. - free(var);
  48240. - var = n;
  48241. - }
  48242. - }
  48243. -
  48244. - SWIGINTERN PyObject *
  48245. - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  48246. - PyObject *res = NULL;
  48247. - swig_globalvar *var = v->vars;
  48248. - while (var) {
  48249. - if (strcmp(var->name,n) == 0) {
  48250. - res = (*var->get_attr)();
  48251. - break;
  48252. - }
  48253. - var = var->next;
  48254. - }
  48255. - if (res == NULL && !PyErr_Occurred()) {
  48256. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  48257. - }
  48258. - return res;
  48259. - }
  48260. -
  48261. - SWIGINTERN int
  48262. - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  48263. - int res = 1;
  48264. - swig_globalvar *var = v->vars;
  48265. - while (var) {
  48266. - if (strcmp(var->name,n) == 0) {
  48267. - res = (*var->set_attr)(p);
  48268. - break;
  48269. - }
  48270. - var = var->next;
  48271. - }
  48272. - if (res == 1 && !PyErr_Occurred()) {
  48273. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  48274. - }
  48275. - return res;
  48276. - }
  48277. -
  48278. - SWIGINTERN PyTypeObject*
  48279. - swig_varlink_type(void) {
  48280. - static char varlink__doc__[] = "Swig var link object";
  48281. - static PyTypeObject varlink_type;
  48282. - static int type_init = 0;
  48283. - if (!type_init) {
  48284. - const PyTypeObject tmp = {
  48285. - /* PyObject header changed in Python 3 */
  48286. -#if PY_VERSION_HEX >= 0x03000000
  48287. - PyVarObject_HEAD_INIT(NULL, 0)
  48288. -#else
  48289. - PyObject_HEAD_INIT(NULL)
  48290. - 0, /* ob_size */
  48291. -#endif
  48292. - (char *)"swigvarlink", /* tp_name */
  48293. - sizeof(swig_varlinkobject), /* tp_basicsize */
  48294. - 0, /* tp_itemsize */
  48295. - (destructor) swig_varlink_dealloc, /* tp_dealloc */
  48296. - (printfunc) swig_varlink_print, /* tp_print */
  48297. - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  48298. - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  48299. - 0, /* tp_compare */
  48300. - (reprfunc) swig_varlink_repr, /* tp_repr */
  48301. - 0, /* tp_as_number */
  48302. - 0, /* tp_as_sequence */
  48303. - 0, /* tp_as_mapping */
  48304. - 0, /* tp_hash */
  48305. - 0, /* tp_call */
  48306. - (reprfunc) swig_varlink_str, /* tp_str */
  48307. - 0, /* tp_getattro */
  48308. - 0, /* tp_setattro */
  48309. - 0, /* tp_as_buffer */
  48310. - 0, /* tp_flags */
  48311. - varlink__doc__, /* tp_doc */
  48312. - 0, /* tp_traverse */
  48313. - 0, /* tp_clear */
  48314. - 0, /* tp_richcompare */
  48315. - 0, /* tp_weaklistoffset */
  48316. -#if PY_VERSION_HEX >= 0x02020000
  48317. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  48318. -#endif
  48319. -#if PY_VERSION_HEX >= 0x02030000
  48320. - 0, /* tp_del */
  48321. -#endif
  48322. -#if PY_VERSION_HEX >= 0x02060000
  48323. - 0, /* tp_version */
  48324. -#endif
  48325. -#ifdef COUNT_ALLOCS
  48326. - 0,0,0,0 /* tp_alloc -> tp_next */
  48327. -#endif
  48328. - };
  48329. - varlink_type = tmp;
  48330. - type_init = 1;
  48331. -#if PY_VERSION_HEX < 0x02020000
  48332. - varlink_type.ob_type = &PyType_Type;
  48333. -#else
  48334. - if (PyType_Ready(&varlink_type) < 0)
  48335. - return NULL;
  48336. -#endif
  48337. - }
  48338. - return &varlink_type;
  48339. - }
  48340. -
  48341. - /* Create a variable linking object for use later */
  48342. - SWIGINTERN PyObject *
  48343. - SWIG_Python_newvarlink(void) {
  48344. - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  48345. - if (result) {
  48346. - result->vars = 0;
  48347. - }
  48348. - return ((PyObject*) result);
  48349. - }
  48350. -
  48351. - SWIGINTERN void
  48352. - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  48353. - swig_varlinkobject *v = (swig_varlinkobject *) p;
  48354. - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  48355. - if (gv) {
  48356. - size_t size = strlen(name)+1;
  48357. - gv->name = (char *)malloc(size);
  48358. - if (gv->name) {
  48359. - strncpy(gv->name,name,size);
  48360. - gv->get_attr = get_attr;
  48361. - gv->set_attr = set_attr;
  48362. - gv->next = v->vars;
  48363. - }
  48364. - }
  48365. - v->vars = gv;
  48366. - }
  48367. -
  48368. - SWIGINTERN PyObject *
  48369. - SWIG_globals(void) {
  48370. - static PyObject *_SWIG_globals = 0;
  48371. - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
  48372. - return _SWIG_globals;
  48373. - }
  48374. -
  48375. - /* -----------------------------------------------------------------------------
  48376. - * constants/methods manipulation
  48377. - * ----------------------------------------------------------------------------- */
  48378. -
  48379. - /* Install Constants */
  48380. - SWIGINTERN void
  48381. - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  48382. - PyObject *obj = 0;
  48383. - size_t i;
  48384. - for (i = 0; constants[i].type; ++i) {
  48385. - switch(constants[i].type) {
  48386. - case SWIG_PY_POINTER:
  48387. - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  48388. - break;
  48389. - case SWIG_PY_BINARY:
  48390. - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  48391. - break;
  48392. - default:
  48393. - obj = 0;
  48394. - break;
  48395. - }
  48396. - if (obj) {
  48397. - PyDict_SetItemString(d, constants[i].name, obj);
  48398. - Py_DECREF(obj);
  48399. - }
  48400. - }
  48401. - }
  48402. -
  48403. - /* -----------------------------------------------------------------------------*/
  48404. - /* Fix SwigMethods to carry the callback ptrs when needed */
  48405. - /* -----------------------------------------------------------------------------*/
  48406. -
  48407. - SWIGINTERN void
  48408. - SWIG_Python_FixMethods(PyMethodDef *methods,
  48409. - swig_const_info *const_table,
  48410. - swig_type_info **types,
  48411. - swig_type_info **types_initial) {
  48412. - size_t i;
  48413. - for (i = 0; methods[i].ml_name; ++i) {
  48414. - const char *c = methods[i].ml_doc;
  48415. - if (c && (c = strstr(c, "swig_ptr: "))) {
  48416. - int j;
  48417. - swig_const_info *ci = 0;
  48418. - const char *name = c + 10;
  48419. - for (j = 0; const_table[j].type; ++j) {
  48420. - if (strncmp(const_table[j].name, name,
  48421. - strlen(const_table[j].name)) == 0) {
  48422. - ci = &(const_table[j]);
  48423. - break;
  48424. - }
  48425. - }
  48426. - if (ci) {
  48427. - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  48428. - if (ptr) {
  48429. - size_t shift = (ci->ptype) - types;
  48430. - swig_type_info *ty = types_initial[shift];
  48431. - size_t ldoc = (c - methods[i].ml_doc);
  48432. - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  48433. - char *ndoc = (char*)malloc(ldoc + lptr + 10);
  48434. - if (ndoc) {
  48435. - char *buff = ndoc;
  48436. - strncpy(buff, methods[i].ml_doc, ldoc);
  48437. - buff += ldoc;
  48438. - strncpy(buff, "swig_ptr: ", 10);
  48439. - buff += 10;
  48440. - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  48441. - methods[i].ml_doc = ndoc;
  48442. - }
  48443. - }
  48444. - }
  48445. - }
  48446. - }
  48447. - }
  48448. -
  48449. -#ifdef __cplusplus
  48450. -}
  48451. -#endif
  48452. -
  48453. -/* -----------------------------------------------------------------------------*
  48454. - * Partial Init method
  48455. - * -----------------------------------------------------------------------------*/
  48456. -
  48457. -#ifdef __cplusplus
  48458. -extern "C"
  48459. -#endif
  48460. -
  48461. -SWIGEXPORT
  48462. -#if PY_VERSION_HEX >= 0x03000000
  48463. -PyObject*
  48464. -#else
  48465. -void
  48466. -#endif
  48467. -SWIG_init(void) {
  48468. - PyObject *m, *d, *md;
  48469. -#if PY_VERSION_HEX >= 0x03000000
  48470. - static struct PyModuleDef SWIG_module = {
  48471. -# if PY_VERSION_HEX >= 0x03020000
  48472. - PyModuleDef_HEAD_INIT,
  48473. -# else
  48474. - {
  48475. - PyObject_HEAD_INIT(NULL)
  48476. - NULL, /* m_init */
  48477. - 0, /* m_index */
  48478. - NULL, /* m_copy */
  48479. - },
  48480. -# endif
  48481. - (char *) SWIG_name,
  48482. - NULL,
  48483. - -1,
  48484. - SwigMethods,
  48485. - NULL,
  48486. - NULL,
  48487. - NULL,
  48488. - NULL
  48489. - };
  48490. -#endif
  48491. -
  48492. -#if defined(SWIGPYTHON_BUILTIN)
  48493. - static SwigPyClientData SwigPyObject_clientdata = {
  48494. - 0, 0, 0, 0, 0, 0, 0
  48495. - };
  48496. - static PyGetSetDef this_getset_def = {
  48497. - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  48498. - };
  48499. - static SwigPyGetSet thisown_getset_closure = {
  48500. - (PyCFunction) SwigPyObject_own,
  48501. - (PyCFunction) SwigPyObject_own
  48502. - };
  48503. - static PyGetSetDef thisown_getset_def = {
  48504. - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  48505. - };
  48506. - PyObject *metatype_args;
  48507. - PyTypeObject *builtin_pytype;
  48508. - int builtin_base_count;
  48509. - swig_type_info *builtin_basetype;
  48510. - PyObject *tuple;
  48511. - PyGetSetDescrObject *static_getset;
  48512. - PyTypeObject *metatype;
  48513. - SwigPyClientData *cd;
  48514. - PyObject *public_interface, *public_symbol;
  48515. - PyObject *this_descr;
  48516. - PyObject *thisown_descr;
  48517. - int i;
  48518. -
  48519. - (void)builtin_pytype;
  48520. - (void)builtin_base_count;
  48521. - (void)builtin_basetype;
  48522. - (void)tuple;
  48523. - (void)static_getset;
  48524. -
  48525. - /* metatype is used to implement static member variables. */
  48526. - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  48527. - assert(metatype_args);
  48528. - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  48529. - assert(metatype);
  48530. - Py_DECREF(metatype_args);
  48531. - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  48532. - assert(PyType_Ready(metatype) >= 0);
  48533. -#endif
  48534. -
  48535. - /* Fix SwigMethods to carry the callback ptrs when needed */
  48536. - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  48537. -
  48538. -#if PY_VERSION_HEX >= 0x03000000
  48539. - m = PyModule_Create(&SWIG_module);
  48540. -#else
  48541. - m = Py_InitModule((char *) SWIG_name, SwigMethods);
  48542. -#endif
  48543. - md = d = PyModule_GetDict(m);
  48544. - (void)md;
  48545. -
  48546. - SWIG_InitializeModule(0);
  48547. -
  48548. -#ifdef SWIGPYTHON_BUILTIN
  48549. - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  48550. - assert(SwigPyObject_stype);
  48551. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  48552. - if (!cd) {
  48553. - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  48554. - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  48555. - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
  48556. - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  48557. -# if PY_VERSION_HEX >= 0x03000000
  48558. - return NULL;
  48559. -# else
  48560. - return;
  48561. -# endif
  48562. - }
  48563. -
  48564. - /* All objects have a 'this' attribute */
  48565. - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  48566. - (void)this_descr;
  48567. -
  48568. - /* All objects have a 'thisown' attribute */
  48569. - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  48570. - (void)thisown_descr;
  48571. -
  48572. - public_interface = PyList_New(0);
  48573. - public_symbol = 0;
  48574. - (void)public_symbol;
  48575. -
  48576. - PyDict_SetItemString(md, "__all__", public_interface);
  48577. - Py_DECREF(public_interface);
  48578. - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  48579. - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  48580. - for (i = 0; swig_const_table[i].name != 0; ++i)
  48581. - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  48582. -#endif
  48583. -
  48584. - SWIG_InstallConstants(d,swig_const_table);
  48585. -
  48586. -#if PY_VERSION_HEX >= 0x03000000
  48587. - return m;
  48588. -#else
  48589. - return;
  48590. -#endif
  48591. -}
  48592. -
  48593. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VError.py vips-7.38.5/swig/vipsCC/VError.py
  48594. --- vips-7.38.5-vanilla/swig/vipsCC/VError.py 2014-07-17 23:48:36.211794473 -0400
  48595. +++ vips-7.38.5/swig/vipsCC/VError.py 1969-12-31 19:00:00.000000000 -0500
  48596. @@ -1,100 +0,0 @@
  48597. -# This file was automatically generated by SWIG (http://www.swig.org).
  48598. -# Version 2.0.10
  48599. -#
  48600. -# Do not make changes to this file unless you know what you are doing--modify
  48601. -# the SWIG interface file instead.
  48602. -
  48603. -
  48604. -
  48605. -from sys import version_info
  48606. -if version_info >= (2,6,0):
  48607. - def swig_import_helper():
  48608. - from os.path import dirname
  48609. - import imp
  48610. - fp = None
  48611. - try:
  48612. - fp, pathname, description = imp.find_module('verrormodule', [dirname(__file__)])
  48613. - except ImportError:
  48614. - import verrormodule
  48615. - return verrormodule
  48616. - if fp is not None:
  48617. - try:
  48618. - _mod = imp.load_module('verrormodule', fp, pathname, description)
  48619. - finally:
  48620. - fp.close()
  48621. - return _mod
  48622. - verrormodule = swig_import_helper()
  48623. - del swig_import_helper
  48624. -else:
  48625. - import verrormodule
  48626. -del version_info
  48627. -try:
  48628. - _swig_property = property
  48629. -except NameError:
  48630. - pass # Python < 2.2 doesn't have 'property'.
  48631. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
  48632. - if (name == "thisown"): return self.this.own(value)
  48633. - if (name == "this"):
  48634. - if type(value).__name__ == 'SwigPyObject':
  48635. - self.__dict__[name] = value
  48636. - return
  48637. - method = class_type.__swig_setmethods__.get(name,None)
  48638. - if method: return method(self,value)
  48639. - if (not static):
  48640. - self.__dict__[name] = value
  48641. - else:
  48642. - raise AttributeError("You cannot add attributes to %s" % self)
  48643. -
  48644. -def _swig_setattr(self,class_type,name,value):
  48645. - return _swig_setattr_nondynamic(self,class_type,name,value,0)
  48646. -
  48647. -def _swig_getattr(self,class_type,name):
  48648. - if (name == "thisown"): return self.this.own()
  48649. - method = class_type.__swig_getmethods__.get(name,None)
  48650. - if method: return method(self)
  48651. - raise AttributeError(name)
  48652. -
  48653. -def _swig_repr(self):
  48654. - try: strthis = "proxy of " + self.this.__repr__()
  48655. - except: strthis = ""
  48656. - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  48657. -
  48658. -try:
  48659. - _object = object
  48660. - _newclass = 1
  48661. -except AttributeError:
  48662. - class _object : pass
  48663. - _newclass = 0
  48664. -
  48665. -
  48666. -class VError(Exception):
  48667. - __swig_setmethods__ = {}
  48668. - __setattr__ = lambda self, name, value: _swig_setattr(self, VError, name, value)
  48669. - __swig_getmethods__ = {}
  48670. - __getattr__ = lambda self, name: _swig_getattr(self, VError, name)
  48671. - __repr__ = _swig_repr
  48672. - def __init__(self, *args):
  48673. - this = verrormodule.new_VError(*args)
  48674. - try: self.this.append(this)
  48675. - except: self.this = this
  48676. - __swig_destroy__ = verrormodule.delete_VError
  48677. - __del__ = lambda self : None;
  48678. - def perror(self, *args): return verrormodule.VError_perror(self, *args)
  48679. - def app(self, *args): return verrormodule.VError_app(self, *args)
  48680. - def what(self): return verrormodule.VError_what(self)
  48681. - def ostream_print(self, *args): return verrormodule.VError_ostream_print(self, *args)
  48682. - def __str__(self): return verrormodule.VError___str__(self)
  48683. -VError_swigregister = verrormodule.VError_swigregister
  48684. -VError_swigregister(VError)
  48685. -
  48686. -
  48687. -def __lshift__(*args):
  48688. - return verrormodule.__lshift__(*args)
  48689. -__lshift__ = verrormodule.__lshift__
  48690. -
  48691. -def verror(str=""):
  48692. - return verrormodule.verror(str)
  48693. -verror = verrormodule.verror
  48694. -# This file is compatible with both classic and new-style classes.
  48695. -
  48696. -
  48697. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VImage.i vips-7.38.5/swig/vipsCC/VImage.i
  48698. --- vips-7.38.5-vanilla/swig/vipsCC/VImage.i 2014-07-17 23:48:36.207794473 -0400
  48699. +++ vips-7.38.5/swig/vipsCC/VImage.i 1969-12-31 19:00:00.000000000 -0500
  48700. @@ -1,380 +0,0 @@
  48701. -/* SWIG interface file for vipsCC7
  48702. - *
  48703. - * 5/9/07
  48704. - * - use g_option_context_set_ignore_unknown_options() so we don't fail
  48705. - * on unrecognied -args (thanks Simon)
  48706. - * 3/8/08
  48707. - * - add .tobuffer() / .frombuffer (), .tostring (), .fromstring ()
  48708. - * methods
  48709. - * - add PIL_mode_from_vips () and vips_from_PIL_mode () utility
  48710. - * functions
  48711. - * 6/11/09
  48712. - * - arg, std::vector<vips::VImage> was missing the "vips::"
  48713. - */
  48714. -
  48715. -%module VImage
  48716. -
  48717. -%{
  48718. -#include <vips/vipscpp.h>
  48719. -
  48720. -/* We need the C API too for the args init and some of the
  48721. - * frombuffer/tobuffer stuff.
  48722. - */
  48723. -#include <vips/vips.h>
  48724. -%}
  48725. -
  48726. -/* Need to override assignment to get refcounting working.
  48727. - */
  48728. -%rename(__assign__) vips::VImage::operator=;
  48729. -
  48730. -%include "std_list.i"
  48731. -%include "std_complex.i"
  48732. -%include "std_vector.i"
  48733. -%include "std_except.i"
  48734. -%include "std_string.i"
  48735. -%include "cstring.i"
  48736. -%include "typemaps.i"
  48737. -
  48738. -%import "VError.i"
  48739. -%import "VMask.i"
  48740. -%import "VDisplay.i"
  48741. -
  48742. -namespace std {
  48743. - %template(IntVector) vector<int>;
  48744. - %template(DoubleVector) vector<double>;
  48745. - %template(ImageVector) vector<vips::VImage>;
  48746. -}
  48747. -
  48748. -/* To get image data to and from VImage (eg. when interfacing with PIL) we
  48749. - * need to be able to import and export Python buffer() objects. Add new
  48750. - * methods to construct from and return pointer/length pairs, then wrap them
  48751. - * ourselves with a couple of typemaps.
  48752. - */
  48753. -
  48754. -%{
  48755. -struct VBuffer {
  48756. - void *data;
  48757. - size_t size;
  48758. -};
  48759. -%}
  48760. -
  48761. -%typemap (out) VBuffer {
  48762. - $result = PyBuffer_FromMemory ($1.data, $1.size);
  48763. -}
  48764. -
  48765. -%typemap (in) VBuffer {
  48766. - const char *buffer;
  48767. - Py_ssize_t buffer_len;
  48768. -
  48769. - if (PyObject_AsCharBuffer ($input, &buffer, &buffer_len) == -1) {
  48770. - PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer");
  48771. - return NULL;
  48772. - }
  48773. -
  48774. - $1.data = (void *) buffer;
  48775. - $1.size = buffer_len;
  48776. -}
  48777. -
  48778. -/* Functions which return extra values though their parameters need special
  48779. - * typemaps.
  48780. - */
  48781. -
  48782. -// double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out )
  48783. -%apply double *OUTPUT { double & maxpos_avg_y };
  48784. -%apply double *OUTPUT { double & maxpos_avg_out };
  48785. -
  48786. -// VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log )
  48787. -%cstring_output_allocate(char **system_image_log, g_free(*$1));
  48788. -
  48789. -// VImage segment( int& segment_segments )
  48790. -%apply int *OUTPUT { int & segment_segments };
  48791. -
  48792. -// VImage project( VImage& project_vout ) throw( VError );
  48793. -// nope ... not sure how to handle this one
  48794. -//%apply VImage *OUTPUT { VImage & project_vout };
  48795. -
  48796. -// VImage label_regions( int& label_regions_segments )
  48797. -%apply int *OUTPUT { int & label_regions_segments };
  48798. -
  48799. -// double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y )
  48800. -%apply int *OUTPUT { int & correl_x };
  48801. -%apply int *OUTPUT { int & correl_y };
  48802. -
  48803. -// int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 )
  48804. -%apply int *OUTPUT { int & _find_lroverlap_dy0 };
  48805. -%apply double *OUTPUT { double & _find_lroverlap_scale1 };
  48806. -%apply double *OUTPUT { double & _find_lroverlap_angle1 };
  48807. -%apply double *OUTPUT { double & _find_lroverlap_dx1 };
  48808. -%apply double *OUTPUT { double & _find_lroverlap_dy1 };
  48809. -
  48810. -// int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 )
  48811. -%apply int *OUTPUT { int & _find_tboverlap_dy0 };
  48812. -%apply double *OUTPUT { double & _find_tboverlap_scale1 };
  48813. -%apply double *OUTPUT { double & _find_tboverlap_angle1 };
  48814. -%apply double *OUTPUT { double & _find_tboverlap_dx1 };
  48815. -%apply double *OUTPUT { double & _find_tboverlap_dy1 };
  48816. -
  48817. -// double maxpos_subpel( double& maxpos_subpel_y )
  48818. -%apply double *OUTPUT { double & maxpos_subpel_y };
  48819. -
  48820. -/* Need the expanded VImage.h in this directory, rather than the usual
  48821. - * vips/VImage.h. SWIG b0rks on #include inside class definitions.
  48822. - */
  48823. -%include VImage.h
  48824. -
  48825. -%extend vips::VImage {
  48826. -public:
  48827. - VBuffer tobuffer () throw (VError)
  48828. - {
  48829. - VBuffer buffer;
  48830. -
  48831. - buffer.data = $self->data ();
  48832. - buffer.size = (size_t) $self->Xsize () * $self->Ysize () *
  48833. - IM_IMAGE_SIZEOF_PEL ($self->image ());
  48834. -
  48835. - return buffer;
  48836. - }
  48837. -
  48838. - static VImage frombuffer (VBuffer buffer, int width, int height,
  48839. - int bands, TBandFmt format) throw (VError)
  48840. - {
  48841. - return VImage (buffer.data, width, height, bands, format);
  48842. - }
  48843. -
  48844. - %cstring_output_allocate_size (char **buffer, int *buffer_len, im_free (*$1))
  48845. -
  48846. - void tostring (char **buffer, int *buffer_len) throw (VError)
  48847. - {
  48848. - void *vips_memory;
  48849. -
  48850. - /* Eval the vips image first. This may throw an exception and we want to
  48851. - * make sure we do this before we try to malloc() space for the copy.
  48852. - */
  48853. - vips_memory = $self->data ();
  48854. -
  48855. - /* We have to copy the image data to make a string that Python can
  48856. - * manage. Use frombuffer() / tobuffer () if you want to avoid the copy
  48857. - * and manage memory lifetime yourself.
  48858. - */
  48859. - *buffer_len = (size_t) $self->Xsize () * $self->Ysize () *
  48860. - IM_IMAGE_SIZEOF_PEL ($self->image ());
  48861. - if (!(*buffer = (char *) im_malloc (NULL, *buffer_len)))
  48862. - verror ("Unable to allocate memory for image copy.");
  48863. - memcpy (*buffer, vips_memory, *buffer_len);
  48864. - }
  48865. -
  48866. - static VImage fromstring (std::string buffer, int width, int height,
  48867. - int bands, TBandFmt format) throw (VError)
  48868. - {
  48869. - void *vips_memory;
  48870. - VImage result;
  48871. -
  48872. - /* We have to copy the string, then add a callback to the VImage to free
  48873. - * it when we free the VImage. Use frombuffer() / tobuffer () if you want
  48874. - * to avoid the copy and manage memory lifetime yourself.
  48875. - */
  48876. - if (!(vips_memory = im_malloc (NULL, buffer.length ())))
  48877. - verror ("Unable to allocate memory for image copy.");
  48878. -
  48879. - /* We have to use .c_str () since the string may not be contiguous.
  48880. - */
  48881. - memcpy (vips_memory, buffer.c_str (), buffer.length ());
  48882. - result = VImage (vips_memory, width, height, bands, format);
  48883. -
  48884. - if (im_add_close_callback (result.image (),
  48885. - (im_callback_fn) im_free, vips_memory, NULL))
  48886. - verror ();
  48887. -
  48888. - return result;
  48889. - }
  48890. -}
  48891. -
  48892. -%pythoncode %{
  48893. -# try to guess a PIL mode string from a VIPS image
  48894. -def PIL_mode_from_vips (vim):
  48895. - if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR:
  48896. - return 'RGB'
  48897. - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB:
  48898. - return 'RGBA'
  48899. - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK:
  48900. - return 'CMYK'
  48901. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR:
  48902. - return 'L'
  48903. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT:
  48904. - return 'I'
  48905. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT:
  48906. - return 'F'
  48907. - elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR:
  48908. - return 'LA'
  48909. - else:
  48910. - raise ValueError ('unsupported vips -> pil image')
  48911. -
  48912. -# return vips (bands, format, type) for a PIL mode
  48913. -def vips_from_PIL_mode (mode):
  48914. - if mode == 'RGB':
  48915. - return (3, VImage.FMTUCHAR, VImage.RGB)
  48916. - elif mode == 'RGBA':
  48917. - return (4, VImage.FMTUCHAR, VImage.RGB)
  48918. - elif mode == 'CMYK':
  48919. - return (4, VImage.FMTUCHAR, VImage.CMYK)
  48920. - elif mode == 'L':
  48921. - return (1, VImage.FMTUCHAR, VImage.B_W)
  48922. - elif mode == 'I':
  48923. - return (1, VImage.FMTINT, VImage.B_W)
  48924. - elif mode == 'F':
  48925. - return (1, VImage.FMTFLOAT, VImage.B_W)
  48926. - elif mode == 'LA':
  48927. - return (2, VImage.FMTUCHAR, VImage.B_W)
  48928. - else:
  48929. - raise ValueError ('unsupported pil -> vips image')
  48930. -%}
  48931. -
  48932. -/* Helper code for vips_init().
  48933. - */
  48934. -%{
  48935. -/* Turn on to print args.
  48936. -#define DEBUG
  48937. - */
  48938. -
  48939. -/* Command-line args during parse.
  48940. - */
  48941. -typedef struct _Args {
  48942. - /* The n strings we alloc when we get from Python.
  48943. - */
  48944. - int n;
  48945. - char **str;
  48946. -
  48947. - /* argc/argv as processed by us.
  48948. - */
  48949. - int argc;
  48950. - char **argv;
  48951. -} Args;
  48952. -
  48953. -#ifdef DEBUG
  48954. -static void
  48955. -args_print (Args *args)
  48956. -{
  48957. - int i;
  48958. -
  48959. - printf ("args_print: argc = %d\n", args->argc);
  48960. - // +1 so we print the trailing NULL too
  48961. - for (i = 0; i < args->argc + 1; i++)
  48962. - printf ("\t%2d)\t%s\n", i, args->argv[i]);
  48963. -}
  48964. -#endif /*DEBUG*/
  48965. -
  48966. -static void
  48967. -args_free (Args *args)
  48968. -{
  48969. - int i;
  48970. -
  48971. - for (i = 0; i < args->n; i++)
  48972. - IM_FREE (args->str[i]);
  48973. - args->n = 0;
  48974. - args->argc = 0;
  48975. - IM_FREE (args->str);
  48976. - IM_FREE (args->argv);
  48977. - IM_FREE (args);
  48978. -}
  48979. -
  48980. -/* Get argv/argc from python.
  48981. - */
  48982. -static Args *
  48983. -args_new (void)
  48984. -{
  48985. - Args *args;
  48986. - PyObject *av;
  48987. - int i;
  48988. - int n;
  48989. -
  48990. - args = g_new (Args, 1);
  48991. - args->n = 0;
  48992. - args->str = NULL;
  48993. - args->argc = 0;
  48994. - args->argv = NULL;
  48995. -
  48996. - if (!(av = PySys_GetObject ((char *) "argv")))
  48997. - return (args);
  48998. - if (!PyList_Check (av)) {
  48999. - PyErr_Warn (PyExc_Warning, "ignoring sys.argv: "
  49000. - "it must be a list of strings");
  49001. - return args;
  49002. - }
  49003. -
  49004. - n = PyList_Size (av);
  49005. - args->str = g_new (char *, n);
  49006. - for (i = 0; i < n; i++)
  49007. - args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
  49008. - args->n = n;
  49009. -
  49010. - /* +1 for NULL termination.
  49011. - */
  49012. - args->argc = n;
  49013. - args->argv = g_new (char *, n + 1);
  49014. - for (i = 0; i < n; i++)
  49015. - args->argv[i] = args->str[i];
  49016. - args->argv[i] = NULL;
  49017. -
  49018. - return args;
  49019. -}
  49020. -
  49021. -static void
  49022. -vips_fatal (const char *msg)
  49023. -{
  49024. - char buf[256];
  49025. -
  49026. - im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer());
  49027. - im_error_clear ();
  49028. - Py_FatalError (buf);
  49029. -}
  49030. -
  49031. -%}
  49032. -
  49033. -%init %{
  49034. -{
  49035. - Args *args;
  49036. -
  49037. - args = args_new ();
  49038. -
  49039. -#ifdef DEBUG
  49040. - printf ("on startup:\n");
  49041. - args_print (args);
  49042. -#endif /*DEBUG*/
  49043. -
  49044. - if (im_init_world (args->argv[0])) {
  49045. - args_free (args);
  49046. - vips_fatal ("can't initialise module vips");
  49047. - }
  49048. -
  49049. - /* Now parse any GOptions.
  49050. - */
  49051. - GError *error = NULL;
  49052. - GOptionContext *context;
  49053. -
  49054. - context = g_option_context_new ("- vips");
  49055. - g_option_context_add_group (context, im_get_option_group());
  49056. -
  49057. - g_option_context_set_ignore_unknown_options (context, TRUE);
  49058. - if (!g_option_context_parse (context,
  49059. - &args->argc, &args->argv, &error)) {
  49060. - g_option_context_free (context);
  49061. - args_free (args);
  49062. - im_error ("vipsmodule", "%s", error->message);
  49063. - g_error_free (error);
  49064. - vips_fatal ("can't initialise module vips");
  49065. - }
  49066. - g_option_context_free (context);
  49067. -
  49068. -#ifdef DEBUG
  49069. - printf ("after parse:\n");
  49070. - args_print (args);
  49071. -#endif /*DEBUG*/
  49072. -
  49073. - // Write (possibly) modified argc/argv back again.
  49074. - if (args->argv)
  49075. - PySys_SetArgv (args->argc, args->argv);
  49076. -
  49077. - args_free (args);
  49078. -}
  49079. -%}
  49080. -
  49081. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vimagemodule.cxx vips-7.38.5/swig/vipsCC/vimagemodule.cxx
  49082. --- vips-7.38.5-vanilla/swig/vipsCC/vimagemodule.cxx 2014-07-17 23:48:36.211794473 -0400
  49083. +++ vips-7.38.5/swig/vipsCC/vimagemodule.cxx 1969-12-31 19:00:00.000000000 -0500
  49084. @@ -1,33595 +0,0 @@
  49085. -/* ----------------------------------------------------------------------------
  49086. - * This file was automatically generated by SWIG (http://www.swig.org).
  49087. - * Version 2.0.10
  49088. - *
  49089. - * This file is not intended to be easily readable and contains a number of
  49090. - * coding conventions designed to improve portability and efficiency. Do not make
  49091. - * changes to this file unless you know what you are doing--modify the SWIG
  49092. - * interface file instead.
  49093. - * ----------------------------------------------------------------------------- */
  49094. -
  49095. -#define SWIGPYTHON
  49096. -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  49097. -
  49098. -
  49099. -#ifdef __cplusplus
  49100. -/* SwigValueWrapper is described in swig.swg */
  49101. -template<typename T> class SwigValueWrapper {
  49102. - struct SwigMovePointer {
  49103. - T *ptr;
  49104. - SwigMovePointer(T *p) : ptr(p) { }
  49105. - ~SwigMovePointer() { delete ptr; }
  49106. - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  49107. - } pointer;
  49108. - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  49109. - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  49110. -public:
  49111. - SwigValueWrapper() : pointer(0) { }
  49112. - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  49113. - operator T&() const { return *pointer.ptr; }
  49114. - T *operator&() { return pointer.ptr; }
  49115. -};
  49116. -
  49117. -template <typename T> T SwigValueInit() {
  49118. - return T();
  49119. -}
  49120. -#endif
  49121. -
  49122. -/* -----------------------------------------------------------------------------
  49123. - * This section contains generic SWIG labels for method/variable
  49124. - * declarations/attributes, and other compiler dependent labels.
  49125. - * ----------------------------------------------------------------------------- */
  49126. -
  49127. -/* template workaround for compilers that cannot correctly implement the C++ standard */
  49128. -#ifndef SWIGTEMPLATEDISAMBIGUATOR
  49129. -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  49130. -# define SWIGTEMPLATEDISAMBIGUATOR template
  49131. -# elif defined(__HP_aCC)
  49132. -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  49133. -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  49134. -# define SWIGTEMPLATEDISAMBIGUATOR template
  49135. -# else
  49136. -# define SWIGTEMPLATEDISAMBIGUATOR
  49137. -# endif
  49138. -#endif
  49139. -
  49140. -/* inline attribute */
  49141. -#ifndef SWIGINLINE
  49142. -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  49143. -# define SWIGINLINE inline
  49144. -# else
  49145. -# define SWIGINLINE
  49146. -# endif
  49147. -#endif
  49148. -
  49149. -/* attribute recognised by some compilers to avoid 'unused' warnings */
  49150. -#ifndef SWIGUNUSED
  49151. -# if defined(__GNUC__)
  49152. -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  49153. -# define SWIGUNUSED __attribute__ ((__unused__))
  49154. -# else
  49155. -# define SWIGUNUSED
  49156. -# endif
  49157. -# elif defined(__ICC)
  49158. -# define SWIGUNUSED __attribute__ ((__unused__))
  49159. -# else
  49160. -# define SWIGUNUSED
  49161. -# endif
  49162. -#endif
  49163. -
  49164. -#ifndef SWIG_MSC_UNSUPPRESS_4505
  49165. -# if defined(_MSC_VER)
  49166. -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
  49167. -# endif
  49168. -#endif
  49169. -
  49170. -#ifndef SWIGUNUSEDPARM
  49171. -# ifdef __cplusplus
  49172. -# define SWIGUNUSEDPARM(p)
  49173. -# else
  49174. -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
  49175. -# endif
  49176. -#endif
  49177. -
  49178. -/* internal SWIG method */
  49179. -#ifndef SWIGINTERN
  49180. -# define SWIGINTERN static SWIGUNUSED
  49181. -#endif
  49182. -
  49183. -/* internal inline SWIG method */
  49184. -#ifndef SWIGINTERNINLINE
  49185. -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  49186. -#endif
  49187. -
  49188. -/* exporting methods */
  49189. -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  49190. -# ifndef GCC_HASCLASSVISIBILITY
  49191. -# define GCC_HASCLASSVISIBILITY
  49192. -# endif
  49193. -#endif
  49194. -
  49195. -#ifndef SWIGEXPORT
  49196. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  49197. -# if defined(STATIC_LINKED)
  49198. -# define SWIGEXPORT
  49199. -# else
  49200. -# define SWIGEXPORT __declspec(dllexport)
  49201. -# endif
  49202. -# else
  49203. -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  49204. -# define SWIGEXPORT __attribute__ ((visibility("default")))
  49205. -# else
  49206. -# define SWIGEXPORT
  49207. -# endif
  49208. -# endif
  49209. -#endif
  49210. -
  49211. -/* calling conventions for Windows */
  49212. -#ifndef SWIGSTDCALL
  49213. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  49214. -# define SWIGSTDCALL __stdcall
  49215. -# else
  49216. -# define SWIGSTDCALL
  49217. -# endif
  49218. -#endif
  49219. -
  49220. -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  49221. -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  49222. -# define _CRT_SECURE_NO_DEPRECATE
  49223. -#endif
  49224. -
  49225. -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  49226. -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  49227. -# define _SCL_SECURE_NO_DEPRECATE
  49228. -#endif
  49229. -
  49230. -
  49231. -
  49232. -/* Python.h has to appear first */
  49233. -#include <Python.h>
  49234. -
  49235. -/* -----------------------------------------------------------------------------
  49236. - * swigrun.swg
  49237. - *
  49238. - * This file contains generic C API SWIG runtime support for pointer
  49239. - * type checking.
  49240. - * ----------------------------------------------------------------------------- */
  49241. -
  49242. -/* This should only be incremented when either the layout of swig_type_info changes,
  49243. - or for whatever reason, the runtime changes incompatibly */
  49244. -#define SWIG_RUNTIME_VERSION "4"
  49245. -
  49246. -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  49247. -#ifdef SWIG_TYPE_TABLE
  49248. -# define SWIG_QUOTE_STRING(x) #x
  49249. -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  49250. -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  49251. -#else
  49252. -# define SWIG_TYPE_TABLE_NAME
  49253. -#endif
  49254. -
  49255. -/*
  49256. - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  49257. - creating a static or dynamic library from the SWIG runtime code.
  49258. - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  49259. -
  49260. - But only do this if strictly necessary, ie, if you have problems
  49261. - with your compiler or suchlike.
  49262. -*/
  49263. -
  49264. -#ifndef SWIGRUNTIME
  49265. -# define SWIGRUNTIME SWIGINTERN
  49266. -#endif
  49267. -
  49268. -#ifndef SWIGRUNTIMEINLINE
  49269. -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  49270. -#endif
  49271. -
  49272. -/* Generic buffer size */
  49273. -#ifndef SWIG_BUFFER_SIZE
  49274. -# define SWIG_BUFFER_SIZE 1024
  49275. -#endif
  49276. -
  49277. -/* Flags for pointer conversions */
  49278. -#define SWIG_POINTER_DISOWN 0x1
  49279. -#define SWIG_CAST_NEW_MEMORY 0x2
  49280. -
  49281. -/* Flags for new pointer objects */
  49282. -#define SWIG_POINTER_OWN 0x1
  49283. -
  49284. -
  49285. -/*
  49286. - Flags/methods for returning states.
  49287. -
  49288. - The SWIG conversion methods, as ConvertPtr, return an integer
  49289. - that tells if the conversion was successful or not. And if not,
  49290. - an error code can be returned (see swigerrors.swg for the codes).
  49291. -
  49292. - Use the following macros/flags to set or process the returning
  49293. - states.
  49294. -
  49295. - In old versions of SWIG, code such as the following was usually written:
  49296. -
  49297. - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  49298. - // success code
  49299. - } else {
  49300. - //fail code
  49301. - }
  49302. -
  49303. - Now you can be more explicit:
  49304. -
  49305. - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  49306. - if (SWIG_IsOK(res)) {
  49307. - // success code
  49308. - } else {
  49309. - // fail code
  49310. - }
  49311. -
  49312. - which is the same really, but now you can also do
  49313. -
  49314. - Type *ptr;
  49315. - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  49316. - if (SWIG_IsOK(res)) {
  49317. - // success code
  49318. - if (SWIG_IsNewObj(res) {
  49319. - ...
  49320. - delete *ptr;
  49321. - } else {
  49322. - ...
  49323. - }
  49324. - } else {
  49325. - // fail code
  49326. - }
  49327. -
  49328. - I.e., now SWIG_ConvertPtr can return new objects and you can
  49329. - identify the case and take care of the deallocation. Of course that
  49330. - also requires SWIG_ConvertPtr to return new result values, such as
  49331. -
  49332. - int SWIG_ConvertPtr(obj, ptr,...) {
  49333. - if (<obj is ok>) {
  49334. - if (<need new object>) {
  49335. - *ptr = <ptr to new allocated object>;
  49336. - return SWIG_NEWOBJ;
  49337. - } else {
  49338. - *ptr = <ptr to old object>;
  49339. - return SWIG_OLDOBJ;
  49340. - }
  49341. - } else {
  49342. - return SWIG_BADOBJ;
  49343. - }
  49344. - }
  49345. -
  49346. - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  49347. - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  49348. - SWIG errors code.
  49349. -
  49350. - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  49351. - allows to return the 'cast rank', for example, if you have this
  49352. -
  49353. - int food(double)
  49354. - int fooi(int);
  49355. -
  49356. - and you call
  49357. -
  49358. - food(1) // cast rank '1' (1 -> 1.0)
  49359. - fooi(1) // cast rank '0'
  49360. -
  49361. - just use the SWIG_AddCast()/SWIG_CheckState()
  49362. -*/
  49363. -
  49364. -#define SWIG_OK (0)
  49365. -#define SWIG_ERROR (-1)
  49366. -#define SWIG_IsOK(r) (r >= 0)
  49367. -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  49368. -
  49369. -/* The CastRankLimit says how many bits are used for the cast rank */
  49370. -#define SWIG_CASTRANKLIMIT (1 << 8)
  49371. -/* The NewMask denotes the object was created (using new/malloc) */
  49372. -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  49373. -/* The TmpMask is for in/out typemaps that use temporal objects */
  49374. -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  49375. -/* Simple returning values */
  49376. -#define SWIG_BADOBJ (SWIG_ERROR)
  49377. -#define SWIG_OLDOBJ (SWIG_OK)
  49378. -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  49379. -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  49380. -/* Check, add and del mask methods */
  49381. -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  49382. -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  49383. -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  49384. -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  49385. -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  49386. -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  49387. -
  49388. -/* Cast-Rank Mode */
  49389. -#if defined(SWIG_CASTRANK_MODE)
  49390. -# ifndef SWIG_TypeRank
  49391. -# define SWIG_TypeRank unsigned long
  49392. -# endif
  49393. -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  49394. -# define SWIG_MAXCASTRANK (2)
  49395. -# endif
  49396. -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  49397. -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  49398. -SWIGINTERNINLINE int SWIG_AddCast(int r) {
  49399. - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  49400. -}
  49401. -SWIGINTERNINLINE int SWIG_CheckState(int r) {
  49402. - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  49403. -}
  49404. -#else /* no cast-rank mode */
  49405. -# define SWIG_AddCast(r) (r)
  49406. -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  49407. -#endif
  49408. -
  49409. -
  49410. -#include <string.h>
  49411. -
  49412. -#ifdef __cplusplus
  49413. -extern "C" {
  49414. -#endif
  49415. -
  49416. -typedef void *(*swig_converter_func)(void *, int *);
  49417. -typedef struct swig_type_info *(*swig_dycast_func)(void **);
  49418. -
  49419. -/* Structure to store information on one type */
  49420. -typedef struct swig_type_info {
  49421. - const char *name; /* mangled name of this type */
  49422. - const char *str; /* human readable name of this type */
  49423. - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  49424. - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  49425. - void *clientdata; /* language specific type data */
  49426. - int owndata; /* flag if the structure owns the clientdata */
  49427. -} swig_type_info;
  49428. -
  49429. -/* Structure to store a type and conversion function used for casting */
  49430. -typedef struct swig_cast_info {
  49431. - swig_type_info *type; /* pointer to type that is equivalent to this type */
  49432. - swig_converter_func converter; /* function to cast the void pointers */
  49433. - struct swig_cast_info *next; /* pointer to next cast in linked list */
  49434. - struct swig_cast_info *prev; /* pointer to the previous cast */
  49435. -} swig_cast_info;
  49436. -
  49437. -/* Structure used to store module information
  49438. - * Each module generates one structure like this, and the runtime collects
  49439. - * all of these structures and stores them in a circularly linked list.*/
  49440. -typedef struct swig_module_info {
  49441. - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  49442. - size_t size; /* Number of types in this module */
  49443. - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  49444. - swig_type_info **type_initial; /* Array of initially generated type structures */
  49445. - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  49446. - void *clientdata; /* Language specific module data */
  49447. -} swig_module_info;
  49448. -
  49449. -/*
  49450. - Compare two type names skipping the space characters, therefore
  49451. - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  49452. -
  49453. - Return 0 when the two name types are equivalent, as in
  49454. - strncmp, but skipping ' '.
  49455. -*/
  49456. -SWIGRUNTIME int
  49457. -SWIG_TypeNameComp(const char *f1, const char *l1,
  49458. - const char *f2, const char *l2) {
  49459. - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  49460. - while ((*f1 == ' ') && (f1 != l1)) ++f1;
  49461. - while ((*f2 == ' ') && (f2 != l2)) ++f2;
  49462. - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  49463. - }
  49464. - return (int)((l1 - f1) - (l2 - f2));
  49465. -}
  49466. -
  49467. -/*
  49468. - Check type equivalence in a name list like <name1>|<name2>|...
  49469. - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  49470. -*/
  49471. -SWIGRUNTIME int
  49472. -SWIG_TypeCmp(const char *nb, const char *tb) {
  49473. - int equiv = 1;
  49474. - const char* te = tb + strlen(tb);
  49475. - const char* ne = nb;
  49476. - while (equiv != 0 && *ne) {
  49477. - for (nb = ne; *ne; ++ne) {
  49478. - if (*ne == '|') break;
  49479. - }
  49480. - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  49481. - if (*ne) ++ne;
  49482. - }
  49483. - return equiv;
  49484. -}
  49485. -
  49486. -/*
  49487. - Check type equivalence in a name list like <name1>|<name2>|...
  49488. - Return 0 if not equal, 1 if equal
  49489. -*/
  49490. -SWIGRUNTIME int
  49491. -SWIG_TypeEquiv(const char *nb, const char *tb) {
  49492. - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  49493. -}
  49494. -
  49495. -/*
  49496. - Check the typename
  49497. -*/
  49498. -SWIGRUNTIME swig_cast_info *
  49499. -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  49500. - if (ty) {
  49501. - swig_cast_info *iter = ty->cast;
  49502. - while (iter) {
  49503. - if (strcmp(iter->type->name, c) == 0) {
  49504. - if (iter == ty->cast)
  49505. - return iter;
  49506. - /* Move iter to the top of the linked list */
  49507. - iter->prev->next = iter->next;
  49508. - if (iter->next)
  49509. - iter->next->prev = iter->prev;
  49510. - iter->next = ty->cast;
  49511. - iter->prev = 0;
  49512. - if (ty->cast) ty->cast->prev = iter;
  49513. - ty->cast = iter;
  49514. - return iter;
  49515. - }
  49516. - iter = iter->next;
  49517. - }
  49518. - }
  49519. - return 0;
  49520. -}
  49521. -
  49522. -/*
  49523. - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  49524. -*/
  49525. -SWIGRUNTIME swig_cast_info *
  49526. -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  49527. - if (ty) {
  49528. - swig_cast_info *iter = ty->cast;
  49529. - while (iter) {
  49530. - if (iter->type == from) {
  49531. - if (iter == ty->cast)
  49532. - return iter;
  49533. - /* Move iter to the top of the linked list */
  49534. - iter->prev->next = iter->next;
  49535. - if (iter->next)
  49536. - iter->next->prev = iter->prev;
  49537. - iter->next = ty->cast;
  49538. - iter->prev = 0;
  49539. - if (ty->cast) ty->cast->prev = iter;
  49540. - ty->cast = iter;
  49541. - return iter;
  49542. - }
  49543. - iter = iter->next;
  49544. - }
  49545. - }
  49546. - return 0;
  49547. -}
  49548. -
  49549. -/*
  49550. - Cast a pointer up an inheritance hierarchy
  49551. -*/
  49552. -SWIGRUNTIMEINLINE void *
  49553. -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  49554. - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  49555. -}
  49556. -
  49557. -/*
  49558. - Dynamic pointer casting. Down an inheritance hierarchy
  49559. -*/
  49560. -SWIGRUNTIME swig_type_info *
  49561. -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  49562. - swig_type_info *lastty = ty;
  49563. - if (!ty || !ty->dcast) return ty;
  49564. - while (ty && (ty->dcast)) {
  49565. - ty = (*ty->dcast)(ptr);
  49566. - if (ty) lastty = ty;
  49567. - }
  49568. - return lastty;
  49569. -}
  49570. -
  49571. -/*
  49572. - Return the name associated with this type
  49573. -*/
  49574. -SWIGRUNTIMEINLINE const char *
  49575. -SWIG_TypeName(const swig_type_info *ty) {
  49576. - return ty->name;
  49577. -}
  49578. -
  49579. -/*
  49580. - Return the pretty name associated with this type,
  49581. - that is an unmangled type name in a form presentable to the user.
  49582. -*/
  49583. -SWIGRUNTIME const char *
  49584. -SWIG_TypePrettyName(const swig_type_info *type) {
  49585. - /* The "str" field contains the equivalent pretty names of the
  49586. - type, separated by vertical-bar characters. We choose
  49587. - to print the last name, as it is often (?) the most
  49588. - specific. */
  49589. - if (!type) return NULL;
  49590. - if (type->str != NULL) {
  49591. - const char *last_name = type->str;
  49592. - const char *s;
  49593. - for (s = type->str; *s; s++)
  49594. - if (*s == '|') last_name = s+1;
  49595. - return last_name;
  49596. - }
  49597. - else
  49598. - return type->name;
  49599. -}
  49600. -
  49601. -/*
  49602. - Set the clientdata field for a type
  49603. -*/
  49604. -SWIGRUNTIME void
  49605. -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  49606. - swig_cast_info *cast = ti->cast;
  49607. - /* if (ti->clientdata == clientdata) return; */
  49608. - ti->clientdata = clientdata;
  49609. -
  49610. - while (cast) {
  49611. - if (!cast->converter) {
  49612. - swig_type_info *tc = cast->type;
  49613. - if (!tc->clientdata) {
  49614. - SWIG_TypeClientData(tc, clientdata);
  49615. - }
  49616. - }
  49617. - cast = cast->next;
  49618. - }
  49619. -}
  49620. -SWIGRUNTIME void
  49621. -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  49622. - SWIG_TypeClientData(ti, clientdata);
  49623. - ti->owndata = 1;
  49624. -}
  49625. -
  49626. -/*
  49627. - Search for a swig_type_info structure only by mangled name
  49628. - Search is a O(log #types)
  49629. -
  49630. - We start searching at module start, and finish searching when start == end.
  49631. - Note: if start == end at the beginning of the function, we go all the way around
  49632. - the circular list.
  49633. -*/
  49634. -SWIGRUNTIME swig_type_info *
  49635. -SWIG_MangledTypeQueryModule(swig_module_info *start,
  49636. - swig_module_info *end,
  49637. - const char *name) {
  49638. - swig_module_info *iter = start;
  49639. - do {
  49640. - if (iter->size) {
  49641. - register size_t l = 0;
  49642. - register size_t r = iter->size - 1;
  49643. - do {
  49644. - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  49645. - register size_t i = (l + r) >> 1;
  49646. - const char *iname = iter->types[i]->name;
  49647. - if (iname) {
  49648. - register int compare = strcmp(name, iname);
  49649. - if (compare == 0) {
  49650. - return iter->types[i];
  49651. - } else if (compare < 0) {
  49652. - if (i) {
  49653. - r = i - 1;
  49654. - } else {
  49655. - break;
  49656. - }
  49657. - } else if (compare > 0) {
  49658. - l = i + 1;
  49659. - }
  49660. - } else {
  49661. - break; /* should never happen */
  49662. - }
  49663. - } while (l <= r);
  49664. - }
  49665. - iter = iter->next;
  49666. - } while (iter != end);
  49667. - return 0;
  49668. -}
  49669. -
  49670. -/*
  49671. - Search for a swig_type_info structure for either a mangled name or a human readable name.
  49672. - It first searches the mangled names of the types, which is a O(log #types)
  49673. - If a type is not found it then searches the human readable names, which is O(#types).
  49674. -
  49675. - We start searching at module start, and finish searching when start == end.
  49676. - Note: if start == end at the beginning of the function, we go all the way around
  49677. - the circular list.
  49678. -*/
  49679. -SWIGRUNTIME swig_type_info *
  49680. -SWIG_TypeQueryModule(swig_module_info *start,
  49681. - swig_module_info *end,
  49682. - const char *name) {
  49683. - /* STEP 1: Search the name field using binary search */
  49684. - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  49685. - if (ret) {
  49686. - return ret;
  49687. - } else {
  49688. - /* STEP 2: If the type hasn't been found, do a complete search
  49689. - of the str field (the human readable name) */
  49690. - swig_module_info *iter = start;
  49691. - do {
  49692. - register size_t i = 0;
  49693. - for (; i < iter->size; ++i) {
  49694. - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  49695. - return iter->types[i];
  49696. - }
  49697. - iter = iter->next;
  49698. - } while (iter != end);
  49699. - }
  49700. -
  49701. - /* neither found a match */
  49702. - return 0;
  49703. -}
  49704. -
  49705. -/*
  49706. - Pack binary data into a string
  49707. -*/
  49708. -SWIGRUNTIME char *
  49709. -SWIG_PackData(char *c, void *ptr, size_t sz) {
  49710. - static const char hex[17] = "0123456789abcdef";
  49711. - register const unsigned char *u = (unsigned char *) ptr;
  49712. - register const unsigned char *eu = u + sz;
  49713. - for (; u != eu; ++u) {
  49714. - register unsigned char uu = *u;
  49715. - *(c++) = hex[(uu & 0xf0) >> 4];
  49716. - *(c++) = hex[uu & 0xf];
  49717. - }
  49718. - return c;
  49719. -}
  49720. -
  49721. -/*
  49722. - Unpack binary data from a string
  49723. -*/
  49724. -SWIGRUNTIME const char *
  49725. -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  49726. - register unsigned char *u = (unsigned char *) ptr;
  49727. - register const unsigned char *eu = u + sz;
  49728. - for (; u != eu; ++u) {
  49729. - register char d = *(c++);
  49730. - register unsigned char uu;
  49731. - if ((d >= '0') && (d <= '9'))
  49732. - uu = ((d - '0') << 4);
  49733. - else if ((d >= 'a') && (d <= 'f'))
  49734. - uu = ((d - ('a'-10)) << 4);
  49735. - else
  49736. - return (char *) 0;
  49737. - d = *(c++);
  49738. - if ((d >= '0') && (d <= '9'))
  49739. - uu |= (d - '0');
  49740. - else if ((d >= 'a') && (d <= 'f'))
  49741. - uu |= (d - ('a'-10));
  49742. - else
  49743. - return (char *) 0;
  49744. - *u = uu;
  49745. - }
  49746. - return c;
  49747. -}
  49748. -
  49749. -/*
  49750. - Pack 'void *' into a string buffer.
  49751. -*/
  49752. -SWIGRUNTIME char *
  49753. -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  49754. - char *r = buff;
  49755. - if ((2*sizeof(void *) + 2) > bsz) return 0;
  49756. - *(r++) = '_';
  49757. - r = SWIG_PackData(r,&ptr,sizeof(void *));
  49758. - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  49759. - strcpy(r,name);
  49760. - return buff;
  49761. -}
  49762. -
  49763. -SWIGRUNTIME const char *
  49764. -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  49765. - if (*c != '_') {
  49766. - if (strcmp(c,"NULL") == 0) {
  49767. - *ptr = (void *) 0;
  49768. - return name;
  49769. - } else {
  49770. - return 0;
  49771. - }
  49772. - }
  49773. - return SWIG_UnpackData(++c,ptr,sizeof(void *));
  49774. -}
  49775. -
  49776. -SWIGRUNTIME char *
  49777. -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  49778. - char *r = buff;
  49779. - size_t lname = (name ? strlen(name) : 0);
  49780. - if ((2*sz + 2 + lname) > bsz) return 0;
  49781. - *(r++) = '_';
  49782. - r = SWIG_PackData(r,ptr,sz);
  49783. - if (lname) {
  49784. - strncpy(r,name,lname+1);
  49785. - } else {
  49786. - *r = 0;
  49787. - }
  49788. - return buff;
  49789. -}
  49790. -
  49791. -SWIGRUNTIME const char *
  49792. -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  49793. - if (*c != '_') {
  49794. - if (strcmp(c,"NULL") == 0) {
  49795. - memset(ptr,0,sz);
  49796. - return name;
  49797. - } else {
  49798. - return 0;
  49799. - }
  49800. - }
  49801. - return SWIG_UnpackData(++c,ptr,sz);
  49802. -}
  49803. -
  49804. -#ifdef __cplusplus
  49805. -}
  49806. -#endif
  49807. -
  49808. -/* Errors in SWIG */
  49809. -#define SWIG_UnknownError -1
  49810. -#define SWIG_IOError -2
  49811. -#define SWIG_RuntimeError -3
  49812. -#define SWIG_IndexError -4
  49813. -#define SWIG_TypeError -5
  49814. -#define SWIG_DivisionByZero -6
  49815. -#define SWIG_OverflowError -7
  49816. -#define SWIG_SyntaxError -8
  49817. -#define SWIG_ValueError -9
  49818. -#define SWIG_SystemError -10
  49819. -#define SWIG_AttributeError -11
  49820. -#define SWIG_MemoryError -12
  49821. -#define SWIG_NullReferenceError -13
  49822. -
  49823. -
  49824. -
  49825. -/* Compatibility macros for Python 3 */
  49826. -#if PY_VERSION_HEX >= 0x03000000
  49827. -
  49828. -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  49829. -#define PyInt_Check(x) PyLong_Check(x)
  49830. -#define PyInt_AsLong(x) PyLong_AsLong(x)
  49831. -#define PyInt_FromLong(x) PyLong_FromLong(x)
  49832. -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  49833. -#define PyString_Check(name) PyBytes_Check(name)
  49834. -#define PyString_FromString(x) PyUnicode_FromString(x)
  49835. -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  49836. -#define PyString_AsString(str) PyBytes_AsString(str)
  49837. -#define PyString_Size(str) PyBytes_Size(str)
  49838. -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  49839. -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  49840. -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  49841. -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  49842. -
  49843. -#endif
  49844. -
  49845. -#ifndef Py_TYPE
  49846. -# define Py_TYPE(op) ((op)->ob_type)
  49847. -#endif
  49848. -
  49849. -/* SWIG APIs for compatibility of both Python 2 & 3 */
  49850. -
  49851. -#if PY_VERSION_HEX >= 0x03000000
  49852. -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  49853. -#else
  49854. -# define SWIG_Python_str_FromFormat PyString_FromFormat
  49855. -#endif
  49856. -
  49857. -
  49858. -/* Warning: This function will allocate a new string in Python 3,
  49859. - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  49860. - */
  49861. -SWIGINTERN char*
  49862. -SWIG_Python_str_AsChar(PyObject *str)
  49863. -{
  49864. -#if PY_VERSION_HEX >= 0x03000000
  49865. - char *cstr;
  49866. - char *newstr;
  49867. - Py_ssize_t len;
  49868. - str = PyUnicode_AsUTF8String(str);
  49869. - PyBytes_AsStringAndSize(str, &cstr, &len);
  49870. - newstr = (char *) malloc(len+1);
  49871. - memcpy(newstr, cstr, len+1);
  49872. - Py_XDECREF(str);
  49873. - return newstr;
  49874. -#else
  49875. - return PyString_AsString(str);
  49876. -#endif
  49877. -}
  49878. -
  49879. -#if PY_VERSION_HEX >= 0x03000000
  49880. -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  49881. -#else
  49882. -# define SWIG_Python_str_DelForPy3(x)
  49883. -#endif
  49884. -
  49885. -
  49886. -SWIGINTERN PyObject*
  49887. -SWIG_Python_str_FromChar(const char *c)
  49888. -{
  49889. -#if PY_VERSION_HEX >= 0x03000000
  49890. - return PyUnicode_FromString(c);
  49891. -#else
  49892. - return PyString_FromString(c);
  49893. -#endif
  49894. -}
  49895. -
  49896. -/* Add PyOS_snprintf for old Pythons */
  49897. -#if PY_VERSION_HEX < 0x02020000
  49898. -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
  49899. -# define PyOS_snprintf _snprintf
  49900. -# else
  49901. -# define PyOS_snprintf snprintf
  49902. -# endif
  49903. -#endif
  49904. -
  49905. -/* A crude PyString_FromFormat implementation for old Pythons */
  49906. -#if PY_VERSION_HEX < 0x02020000
  49907. -
  49908. -#ifndef SWIG_PYBUFFER_SIZE
  49909. -# define SWIG_PYBUFFER_SIZE 1024
  49910. -#endif
  49911. -
  49912. -static PyObject *
  49913. -PyString_FromFormat(const char *fmt, ...) {
  49914. - va_list ap;
  49915. - char buf[SWIG_PYBUFFER_SIZE * 2];
  49916. - int res;
  49917. - va_start(ap, fmt);
  49918. - res = vsnprintf(buf, sizeof(buf), fmt, ap);
  49919. - va_end(ap);
  49920. - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
  49921. -}
  49922. -#endif
  49923. -
  49924. -/* Add PyObject_Del for old Pythons */
  49925. -#if PY_VERSION_HEX < 0x01060000
  49926. -# define PyObject_Del(op) PyMem_DEL((op))
  49927. -#endif
  49928. -#ifndef PyObject_DEL
  49929. -# define PyObject_DEL PyObject_Del
  49930. -#endif
  49931. -
  49932. -/* A crude PyExc_StopIteration exception for old Pythons */
  49933. -#if PY_VERSION_HEX < 0x02020000
  49934. -# ifndef PyExc_StopIteration
  49935. -# define PyExc_StopIteration PyExc_RuntimeError
  49936. -# endif
  49937. -# ifndef PyObject_GenericGetAttr
  49938. -# define PyObject_GenericGetAttr 0
  49939. -# endif
  49940. -#endif
  49941. -
  49942. -/* Py_NotImplemented is defined in 2.1 and up. */
  49943. -#if PY_VERSION_HEX < 0x02010000
  49944. -# ifndef Py_NotImplemented
  49945. -# define Py_NotImplemented PyExc_RuntimeError
  49946. -# endif
  49947. -#endif
  49948. -
  49949. -/* A crude PyString_AsStringAndSize implementation for old Pythons */
  49950. -#if PY_VERSION_HEX < 0x02010000
  49951. -# ifndef PyString_AsStringAndSize
  49952. -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
  49953. -# endif
  49954. -#endif
  49955. -
  49956. -/* PySequence_Size for old Pythons */
  49957. -#if PY_VERSION_HEX < 0x02000000
  49958. -# ifndef PySequence_Size
  49959. -# define PySequence_Size PySequence_Length
  49960. -# endif
  49961. -#endif
  49962. -
  49963. -/* PyBool_FromLong for old Pythons */
  49964. -#if PY_VERSION_HEX < 0x02030000
  49965. -static
  49966. -PyObject *PyBool_FromLong(long ok)
  49967. -{
  49968. - PyObject *result = ok ? Py_True : Py_False;
  49969. - Py_INCREF(result);
  49970. - return result;
  49971. -}
  49972. -#endif
  49973. -
  49974. -/* Py_ssize_t for old Pythons */
  49975. -/* This code is as recommended by: */
  49976. -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
  49977. -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
  49978. -typedef int Py_ssize_t;
  49979. -# define PY_SSIZE_T_MAX INT_MAX
  49980. -# define PY_SSIZE_T_MIN INT_MIN
  49981. -typedef inquiry lenfunc;
  49982. -typedef intargfunc ssizeargfunc;
  49983. -typedef intintargfunc ssizessizeargfunc;
  49984. -typedef intobjargproc ssizeobjargproc;
  49985. -typedef intintobjargproc ssizessizeobjargproc;
  49986. -typedef getreadbufferproc readbufferproc;
  49987. -typedef getwritebufferproc writebufferproc;
  49988. -typedef getsegcountproc segcountproc;
  49989. -typedef getcharbufferproc charbufferproc;
  49990. -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  49991. -{
  49992. - long result = 0;
  49993. - PyObject *i = PyNumber_Int(x);
  49994. - if (i) {
  49995. - result = PyInt_AsLong(i);
  49996. - Py_DECREF(i);
  49997. - }
  49998. - return result;
  49999. -}
  50000. -#endif
  50001. -
  50002. -#if PY_VERSION_HEX < 0x02050000
  50003. -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
  50004. -#endif
  50005. -
  50006. -#if PY_VERSION_HEX < 0x02040000
  50007. -#define Py_VISIT(op) \
  50008. - do { \
  50009. - if (op) { \
  50010. - int vret = visit((op), arg); \
  50011. - if (vret) \
  50012. - return vret; \
  50013. - } \
  50014. - } while (0)
  50015. -#endif
  50016. -
  50017. -#if PY_VERSION_HEX < 0x02030000
  50018. -typedef struct {
  50019. - PyTypeObject type;
  50020. - PyNumberMethods as_number;
  50021. - PyMappingMethods as_mapping;
  50022. - PySequenceMethods as_sequence;
  50023. - PyBufferProcs as_buffer;
  50024. - PyObject *name, *slots;
  50025. -} PyHeapTypeObject;
  50026. -#endif
  50027. -
  50028. -#if PY_VERSION_HEX < 0x02030000
  50029. -typedef destructor freefunc;
  50030. -#endif
  50031. -
  50032. -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
  50033. - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
  50034. - (PY_MAJOR_VERSION > 3))
  50035. -# define SWIGPY_USE_CAPSULE
  50036. -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  50037. -#endif
  50038. -
  50039. -#if PY_VERSION_HEX < 0x03020000
  50040. -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  50041. -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  50042. -#endif
  50043. -
  50044. -/* -----------------------------------------------------------------------------
  50045. - * error manipulation
  50046. - * ----------------------------------------------------------------------------- */
  50047. -
  50048. -SWIGRUNTIME PyObject*
  50049. -SWIG_Python_ErrorType(int code) {
  50050. - PyObject* type = 0;
  50051. - switch(code) {
  50052. - case SWIG_MemoryError:
  50053. - type = PyExc_MemoryError;
  50054. - break;
  50055. - case SWIG_IOError:
  50056. - type = PyExc_IOError;
  50057. - break;
  50058. - case SWIG_RuntimeError:
  50059. - type = PyExc_RuntimeError;
  50060. - break;
  50061. - case SWIG_IndexError:
  50062. - type = PyExc_IndexError;
  50063. - break;
  50064. - case SWIG_TypeError:
  50065. - type = PyExc_TypeError;
  50066. - break;
  50067. - case SWIG_DivisionByZero:
  50068. - type = PyExc_ZeroDivisionError;
  50069. - break;
  50070. - case SWIG_OverflowError:
  50071. - type = PyExc_OverflowError;
  50072. - break;
  50073. - case SWIG_SyntaxError:
  50074. - type = PyExc_SyntaxError;
  50075. - break;
  50076. - case SWIG_ValueError:
  50077. - type = PyExc_ValueError;
  50078. - break;
  50079. - case SWIG_SystemError:
  50080. - type = PyExc_SystemError;
  50081. - break;
  50082. - case SWIG_AttributeError:
  50083. - type = PyExc_AttributeError;
  50084. - break;
  50085. - default:
  50086. - type = PyExc_RuntimeError;
  50087. - }
  50088. - return type;
  50089. -}
  50090. -
  50091. -
  50092. -SWIGRUNTIME void
  50093. -SWIG_Python_AddErrorMsg(const char* mesg)
  50094. -{
  50095. - PyObject *type = 0;
  50096. - PyObject *value = 0;
  50097. - PyObject *traceback = 0;
  50098. -
  50099. - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  50100. - if (value) {
  50101. - char *tmp;
  50102. - PyObject *old_str = PyObject_Str(value);
  50103. - PyErr_Clear();
  50104. - Py_XINCREF(type);
  50105. -
  50106. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  50107. - SWIG_Python_str_DelForPy3(tmp);
  50108. - Py_DECREF(old_str);
  50109. - Py_DECREF(value);
  50110. - } else {
  50111. - PyErr_SetString(PyExc_RuntimeError, mesg);
  50112. - }
  50113. -}
  50114. -
  50115. -#if defined(SWIG_PYTHON_NO_THREADS)
  50116. -# if defined(SWIG_PYTHON_THREADS)
  50117. -# undef SWIG_PYTHON_THREADS
  50118. -# endif
  50119. -#endif
  50120. -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  50121. -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  50122. -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
  50123. -# define SWIG_PYTHON_USE_GIL
  50124. -# endif
  50125. -# endif
  50126. -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  50127. -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
  50128. -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  50129. -# endif
  50130. -# ifdef __cplusplus /* C++ code */
  50131. - class SWIG_Python_Thread_Block {
  50132. - bool status;
  50133. - PyGILState_STATE state;
  50134. - public:
  50135. - void end() { if (status) { PyGILState_Release(state); status = false;} }
  50136. - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  50137. - ~SWIG_Python_Thread_Block() { end(); }
  50138. - };
  50139. - class SWIG_Python_Thread_Allow {
  50140. - bool status;
  50141. - PyThreadState *save;
  50142. - public:
  50143. - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  50144. - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  50145. - ~SWIG_Python_Thread_Allow() { end(); }
  50146. - };
  50147. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  50148. -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  50149. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  50150. -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  50151. -# else /* C code */
  50152. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  50153. -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  50154. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  50155. -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  50156. -# endif
  50157. -# else /* Old thread way, not implemented, user must provide it */
  50158. -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  50159. -# define SWIG_PYTHON_INITIALIZE_THREADS
  50160. -# endif
  50161. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  50162. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  50163. -# endif
  50164. -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  50165. -# define SWIG_PYTHON_THREAD_END_BLOCK
  50166. -# endif
  50167. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  50168. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  50169. -# endif
  50170. -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  50171. -# define SWIG_PYTHON_THREAD_END_ALLOW
  50172. -# endif
  50173. -# endif
  50174. -#else /* No thread support */
  50175. -# define SWIG_PYTHON_INITIALIZE_THREADS
  50176. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  50177. -# define SWIG_PYTHON_THREAD_END_BLOCK
  50178. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  50179. -# define SWIG_PYTHON_THREAD_END_ALLOW
  50180. -#endif
  50181. -
  50182. -/* -----------------------------------------------------------------------------
  50183. - * Python API portion that goes into the runtime
  50184. - * ----------------------------------------------------------------------------- */
  50185. -
  50186. -#ifdef __cplusplus
  50187. -extern "C" {
  50188. -#endif
  50189. -
  50190. -/* -----------------------------------------------------------------------------
  50191. - * Constant declarations
  50192. - * ----------------------------------------------------------------------------- */
  50193. -
  50194. -/* Constant Types */
  50195. -#define SWIG_PY_POINTER 4
  50196. -#define SWIG_PY_BINARY 5
  50197. -
  50198. -/* Constant information structure */
  50199. -typedef struct swig_const_info {
  50200. - int type;
  50201. - char *name;
  50202. - long lvalue;
  50203. - double dvalue;
  50204. - void *pvalue;
  50205. - swig_type_info **ptype;
  50206. -} swig_const_info;
  50207. -
  50208. -
  50209. -/* -----------------------------------------------------------------------------
  50210. - * Wrapper of PyInstanceMethod_New() used in Python 3
  50211. - * It is exported to the generated module, used for -fastproxy
  50212. - * ----------------------------------------------------------------------------- */
  50213. -#if PY_VERSION_HEX >= 0x03000000
  50214. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
  50215. -{
  50216. - return PyInstanceMethod_New(func);
  50217. -}
  50218. -#else
  50219. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
  50220. -{
  50221. - return NULL;
  50222. -}
  50223. -#endif
  50224. -
  50225. -#ifdef __cplusplus
  50226. -}
  50227. -#endif
  50228. -
  50229. -
  50230. -/* -----------------------------------------------------------------------------
  50231. - * pyrun.swg
  50232. - *
  50233. - * This file contains the runtime support for Python modules
  50234. - * and includes code for managing global variables and pointer
  50235. - * type checking.
  50236. - *
  50237. - * ----------------------------------------------------------------------------- */
  50238. -
  50239. -/* Common SWIG API */
  50240. -
  50241. -/* for raw pointers */
  50242. -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  50243. -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  50244. -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  50245. -
  50246. -#ifdef SWIGPYTHON_BUILTIN
  50247. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  50248. -#else
  50249. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  50250. -#endif
  50251. -
  50252. -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  50253. -
  50254. -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  50255. -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  50256. -#define swig_owntype int
  50257. -
  50258. -/* for raw packed data */
  50259. -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  50260. -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  50261. -
  50262. -/* for class or struct pointers */
  50263. -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  50264. -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  50265. -
  50266. -/* for C or C++ function pointers */
  50267. -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  50268. -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  50269. -
  50270. -/* for C++ member pointers, ie, member methods */
  50271. -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  50272. -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  50273. -
  50274. -
  50275. -/* Runtime API */
  50276. -
  50277. -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  50278. -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  50279. -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  50280. -
  50281. -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  50282. -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  50283. -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  50284. -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  50285. -#define SWIG_fail goto fail
  50286. -
  50287. -
  50288. -/* Runtime API implementation */
  50289. -
  50290. -/* Error manipulation */
  50291. -
  50292. -SWIGINTERN void
  50293. -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  50294. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  50295. - PyErr_SetObject(errtype, obj);
  50296. - Py_DECREF(obj);
  50297. - SWIG_PYTHON_THREAD_END_BLOCK;
  50298. -}
  50299. -
  50300. -SWIGINTERN void
  50301. -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  50302. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  50303. - PyErr_SetString(errtype, msg);
  50304. - SWIG_PYTHON_THREAD_END_BLOCK;
  50305. -}
  50306. -
  50307. -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  50308. -
  50309. -/* Set a constant value */
  50310. -
  50311. -#if defined(SWIGPYTHON_BUILTIN)
  50312. -
  50313. -SWIGINTERN void
  50314. -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  50315. - PyObject *s = PyString_InternFromString(key);
  50316. - PyList_Append(seq, s);
  50317. - Py_DECREF(s);
  50318. -}
  50319. -
  50320. -SWIGINTERN void
  50321. -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  50322. -#if PY_VERSION_HEX < 0x02030000
  50323. - PyDict_SetItemString(d, (char *)name, obj);
  50324. -#else
  50325. - PyDict_SetItemString(d, name, obj);
  50326. -#endif
  50327. - Py_DECREF(obj);
  50328. - if (public_interface)
  50329. - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  50330. -}
  50331. -
  50332. -#else
  50333. -
  50334. -SWIGINTERN void
  50335. -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  50336. -#if PY_VERSION_HEX < 0x02030000
  50337. - PyDict_SetItemString(d, (char *)name, obj);
  50338. -#else
  50339. - PyDict_SetItemString(d, name, obj);
  50340. -#endif
  50341. - Py_DECREF(obj);
  50342. -}
  50343. -
  50344. -#endif
  50345. -
  50346. -/* Append a value to the result obj */
  50347. -
  50348. -SWIGINTERN PyObject*
  50349. -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  50350. -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  50351. - if (!result) {
  50352. - result = obj;
  50353. - } else if (result == Py_None) {
  50354. - Py_DECREF(result);
  50355. - result = obj;
  50356. - } else {
  50357. - if (!PyList_Check(result)) {
  50358. - PyObject *o2 = result;
  50359. - result = PyList_New(1);
  50360. - PyList_SetItem(result, 0, o2);
  50361. - }
  50362. - PyList_Append(result,obj);
  50363. - Py_DECREF(obj);
  50364. - }
  50365. - return result;
  50366. -#else
  50367. - PyObject* o2;
  50368. - PyObject* o3;
  50369. - if (!result) {
  50370. - result = obj;
  50371. - } else if (result == Py_None) {
  50372. - Py_DECREF(result);
  50373. - result = obj;
  50374. - } else {
  50375. - if (!PyTuple_Check(result)) {
  50376. - o2 = result;
  50377. - result = PyTuple_New(1);
  50378. - PyTuple_SET_ITEM(result, 0, o2);
  50379. - }
  50380. - o3 = PyTuple_New(1);
  50381. - PyTuple_SET_ITEM(o3, 0, obj);
  50382. - o2 = result;
  50383. - result = PySequence_Concat(o2, o3);
  50384. - Py_DECREF(o2);
  50385. - Py_DECREF(o3);
  50386. - }
  50387. - return result;
  50388. -#endif
  50389. -}
  50390. -
  50391. -/* Unpack the argument tuple */
  50392. -
  50393. -SWIGINTERN int
  50394. -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  50395. -{
  50396. - if (!args) {
  50397. - if (!min && !max) {
  50398. - return 1;
  50399. - } else {
  50400. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  50401. - name, (min == max ? "" : "at least "), (int)min);
  50402. - return 0;
  50403. - }
  50404. - }
  50405. - if (!PyTuple_Check(args)) {
  50406. - if (min <= 1 && max >= 1) {
  50407. - register int i;
  50408. - objs[0] = args;
  50409. - for (i = 1; i < max; ++i) {
  50410. - objs[i] = 0;
  50411. - }
  50412. - return 2;
  50413. - }
  50414. - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  50415. - return 0;
  50416. - } else {
  50417. - register Py_ssize_t l = PyTuple_GET_SIZE(args);
  50418. - if (l < min) {
  50419. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  50420. - name, (min == max ? "" : "at least "), (int)min, (int)l);
  50421. - return 0;
  50422. - } else if (l > max) {
  50423. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  50424. - name, (min == max ? "" : "at most "), (int)max, (int)l);
  50425. - return 0;
  50426. - } else {
  50427. - register int i;
  50428. - for (i = 0; i < l; ++i) {
  50429. - objs[i] = PyTuple_GET_ITEM(args, i);
  50430. - }
  50431. - for (; l < max; ++l) {
  50432. - objs[l] = 0;
  50433. - }
  50434. - return i + 1;
  50435. - }
  50436. - }
  50437. -}
  50438. -
  50439. -/* A functor is a function object with one single object argument */
  50440. -#if PY_VERSION_HEX >= 0x02020000
  50441. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  50442. -#else
  50443. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
  50444. -#endif
  50445. -
  50446. -/*
  50447. - Helper for static pointer initialization for both C and C++ code, for example
  50448. - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  50449. -*/
  50450. -#ifdef __cplusplus
  50451. -#define SWIG_STATIC_POINTER(var) var
  50452. -#else
  50453. -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  50454. -#endif
  50455. -
  50456. -/* -----------------------------------------------------------------------------
  50457. - * Pointer declarations
  50458. - * ----------------------------------------------------------------------------- */
  50459. -
  50460. -/* Flags for new pointer objects */
  50461. -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  50462. -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  50463. -
  50464. -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  50465. -
  50466. -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  50467. -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  50468. -
  50469. -#ifdef __cplusplus
  50470. -extern "C" {
  50471. -#endif
  50472. -
  50473. -/* How to access Py_None */
  50474. -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  50475. -# ifndef SWIG_PYTHON_NO_BUILD_NONE
  50476. -# ifndef SWIG_PYTHON_BUILD_NONE
  50477. -# define SWIG_PYTHON_BUILD_NONE
  50478. -# endif
  50479. -# endif
  50480. -#endif
  50481. -
  50482. -#ifdef SWIG_PYTHON_BUILD_NONE
  50483. -# ifdef Py_None
  50484. -# undef Py_None
  50485. -# define Py_None SWIG_Py_None()
  50486. -# endif
  50487. -SWIGRUNTIMEINLINE PyObject *
  50488. -_SWIG_Py_None(void)
  50489. -{
  50490. - PyObject *none = Py_BuildValue((char*)"");
  50491. - Py_DECREF(none);
  50492. - return none;
  50493. -}
  50494. -SWIGRUNTIME PyObject *
  50495. -SWIG_Py_None(void)
  50496. -{
  50497. - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  50498. - return none;
  50499. -}
  50500. -#endif
  50501. -
  50502. -/* The python void return value */
  50503. -
  50504. -SWIGRUNTIMEINLINE PyObject *
  50505. -SWIG_Py_Void(void)
  50506. -{
  50507. - PyObject *none = Py_None;
  50508. - Py_INCREF(none);
  50509. - return none;
  50510. -}
  50511. -
  50512. -/* SwigPyClientData */
  50513. -
  50514. -typedef struct {
  50515. - PyObject *klass;
  50516. - PyObject *newraw;
  50517. - PyObject *newargs;
  50518. - PyObject *destroy;
  50519. - int delargs;
  50520. - int implicitconv;
  50521. - PyTypeObject *pytype;
  50522. -} SwigPyClientData;
  50523. -
  50524. -SWIGRUNTIMEINLINE int
  50525. -SWIG_Python_CheckImplicit(swig_type_info *ty)
  50526. -{
  50527. - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  50528. - return data ? data->implicitconv : 0;
  50529. -}
  50530. -
  50531. -SWIGRUNTIMEINLINE PyObject *
  50532. -SWIG_Python_ExceptionType(swig_type_info *desc) {
  50533. - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  50534. - PyObject *klass = data ? data->klass : 0;
  50535. - return (klass ? klass : PyExc_RuntimeError);
  50536. -}
  50537. -
  50538. -
  50539. -SWIGRUNTIME SwigPyClientData *
  50540. -SwigPyClientData_New(PyObject* obj)
  50541. -{
  50542. - if (!obj) {
  50543. - return 0;
  50544. - } else {
  50545. - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  50546. - /* the klass element */
  50547. - data->klass = obj;
  50548. - Py_INCREF(data->klass);
  50549. - /* the newraw method and newargs arguments used to create a new raw instance */
  50550. - if (PyClass_Check(obj)) {
  50551. - data->newraw = 0;
  50552. - data->newargs = obj;
  50553. - Py_INCREF(obj);
  50554. - } else {
  50555. -#if (PY_VERSION_HEX < 0x02020000)
  50556. - data->newraw = 0;
  50557. -#else
  50558. - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
  50559. -#endif
  50560. - if (data->newraw) {
  50561. - Py_INCREF(data->newraw);
  50562. - data->newargs = PyTuple_New(1);
  50563. - PyTuple_SetItem(data->newargs, 0, obj);
  50564. - } else {
  50565. - data->newargs = obj;
  50566. - }
  50567. - Py_INCREF(data->newargs);
  50568. - }
  50569. - /* the destroy method, aka as the C++ delete method */
  50570. - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
  50571. - if (PyErr_Occurred()) {
  50572. - PyErr_Clear();
  50573. - data->destroy = 0;
  50574. - }
  50575. - if (data->destroy) {
  50576. - int flags;
  50577. - Py_INCREF(data->destroy);
  50578. - flags = PyCFunction_GET_FLAGS(data->destroy);
  50579. -#ifdef METH_O
  50580. - data->delargs = !(flags & (METH_O));
  50581. -#else
  50582. - data->delargs = 0;
  50583. -#endif
  50584. - } else {
  50585. - data->delargs = 0;
  50586. - }
  50587. - data->implicitconv = 0;
  50588. - data->pytype = 0;
  50589. - return data;
  50590. - }
  50591. -}
  50592. -
  50593. -SWIGRUNTIME void
  50594. -SwigPyClientData_Del(SwigPyClientData *data) {
  50595. - Py_XDECREF(data->newraw);
  50596. - Py_XDECREF(data->newargs);
  50597. - Py_XDECREF(data->destroy);
  50598. -}
  50599. -
  50600. -/* =============== SwigPyObject =====================*/
  50601. -
  50602. -typedef struct {
  50603. - PyObject_HEAD
  50604. - void *ptr;
  50605. - swig_type_info *ty;
  50606. - int own;
  50607. - PyObject *next;
  50608. -#ifdef SWIGPYTHON_BUILTIN
  50609. - PyObject *dict;
  50610. -#endif
  50611. -} SwigPyObject;
  50612. -
  50613. -SWIGRUNTIME PyObject *
  50614. -SwigPyObject_long(SwigPyObject *v)
  50615. -{
  50616. - return PyLong_FromVoidPtr(v->ptr);
  50617. -}
  50618. -
  50619. -SWIGRUNTIME PyObject *
  50620. -SwigPyObject_format(const char* fmt, SwigPyObject *v)
  50621. -{
  50622. - PyObject *res = NULL;
  50623. - PyObject *args = PyTuple_New(1);
  50624. - if (args) {
  50625. - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  50626. - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  50627. - if (ofmt) {
  50628. -#if PY_VERSION_HEX >= 0x03000000
  50629. - res = PyUnicode_Format(ofmt,args);
  50630. -#else
  50631. - res = PyString_Format(ofmt,args);
  50632. -#endif
  50633. - Py_DECREF(ofmt);
  50634. - }
  50635. - Py_DECREF(args);
  50636. - }
  50637. - }
  50638. - return res;
  50639. -}
  50640. -
  50641. -SWIGRUNTIME PyObject *
  50642. -SwigPyObject_oct(SwigPyObject *v)
  50643. -{
  50644. - return SwigPyObject_format("%o",v);
  50645. -}
  50646. -
  50647. -SWIGRUNTIME PyObject *
  50648. -SwigPyObject_hex(SwigPyObject *v)
  50649. -{
  50650. - return SwigPyObject_format("%x",v);
  50651. -}
  50652. -
  50653. -SWIGRUNTIME PyObject *
  50654. -#ifdef METH_NOARGS
  50655. -SwigPyObject_repr(SwigPyObject *v)
  50656. -#else
  50657. -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  50658. -#endif
  50659. -{
  50660. - const char *name = SWIG_TypePrettyName(v->ty);
  50661. - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  50662. - if (v->next) {
  50663. -# ifdef METH_NOARGS
  50664. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  50665. -# else
  50666. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
  50667. -# endif
  50668. -# if PY_VERSION_HEX >= 0x03000000
  50669. - PyObject *joined = PyUnicode_Concat(repr, nrep);
  50670. - Py_DecRef(repr);
  50671. - Py_DecRef(nrep);
  50672. - repr = joined;
  50673. -# else
  50674. - PyString_ConcatAndDel(&repr,nrep);
  50675. -# endif
  50676. - }
  50677. - return repr;
  50678. -}
  50679. -
  50680. -SWIGRUNTIME int
  50681. -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  50682. -{
  50683. - char *str;
  50684. -#ifdef METH_NOARGS
  50685. - PyObject *repr = SwigPyObject_repr(v);
  50686. -#else
  50687. - PyObject *repr = SwigPyObject_repr(v, NULL);
  50688. -#endif
  50689. - if (repr) {
  50690. - str = SWIG_Python_str_AsChar(repr);
  50691. - fputs(str, fp);
  50692. - SWIG_Python_str_DelForPy3(str);
  50693. - Py_DECREF(repr);
  50694. - return 0;
  50695. - } else {
  50696. - return 1;
  50697. - }
  50698. -}
  50699. -
  50700. -SWIGRUNTIME PyObject *
  50701. -SwigPyObject_str(SwigPyObject *v)
  50702. -{
  50703. - char result[SWIG_BUFFER_SIZE];
  50704. - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
  50705. - SWIG_Python_str_FromChar(result) : 0;
  50706. -}
  50707. -
  50708. -SWIGRUNTIME int
  50709. -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  50710. -{
  50711. - void *i = v->ptr;
  50712. - void *j = w->ptr;
  50713. - return (i < j) ? -1 : ((i > j) ? 1 : 0);
  50714. -}
  50715. -
  50716. -/* Added for Python 3.x, would it also be useful for Python 2.x? */
  50717. -SWIGRUNTIME PyObject*
  50718. -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  50719. -{
  50720. - PyObject* res;
  50721. - if( op != Py_EQ && op != Py_NE ) {
  50722. - Py_INCREF(Py_NotImplemented);
  50723. - return Py_NotImplemented;
  50724. - }
  50725. - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  50726. - return res;
  50727. -}
  50728. -
  50729. -
  50730. -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  50731. -
  50732. -#ifdef SWIGPYTHON_BUILTIN
  50733. -static swig_type_info *SwigPyObject_stype = 0;
  50734. -SWIGRUNTIME PyTypeObject*
  50735. -SwigPyObject_type(void) {
  50736. - SwigPyClientData *cd;
  50737. - assert(SwigPyObject_stype);
  50738. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  50739. - assert(cd);
  50740. - assert(cd->pytype);
  50741. - return cd->pytype;
  50742. -}
  50743. -#else
  50744. -SWIGRUNTIME PyTypeObject*
  50745. -SwigPyObject_type(void) {
  50746. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  50747. - return type;
  50748. -}
  50749. -#endif
  50750. -
  50751. -SWIGRUNTIMEINLINE int
  50752. -SwigPyObject_Check(PyObject *op) {
  50753. -#ifdef SWIGPYTHON_BUILTIN
  50754. - PyTypeObject *target_tp = SwigPyObject_type();
  50755. - if (PyType_IsSubtype(op->ob_type, target_tp))
  50756. - return 1;
  50757. - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  50758. -#else
  50759. - return (Py_TYPE(op) == SwigPyObject_type())
  50760. - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  50761. -#endif
  50762. -}
  50763. -
  50764. -SWIGRUNTIME PyObject *
  50765. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  50766. -
  50767. -SWIGRUNTIME void
  50768. -SwigPyObject_dealloc(PyObject *v)
  50769. -{
  50770. - SwigPyObject *sobj = (SwigPyObject *) v;
  50771. - PyObject *next = sobj->next;
  50772. - if (sobj->own == SWIG_POINTER_OWN) {
  50773. - swig_type_info *ty = sobj->ty;
  50774. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  50775. - PyObject *destroy = data ? data->destroy : 0;
  50776. - if (destroy) {
  50777. - /* destroy is always a VARARGS method */
  50778. - PyObject *res;
  50779. - if (data->delargs) {
  50780. - /* we need to create a temporary object to carry the destroy operation */
  50781. - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  50782. - res = SWIG_Python_CallFunctor(destroy, tmp);
  50783. - Py_DECREF(tmp);
  50784. - } else {
  50785. - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  50786. - PyObject *mself = PyCFunction_GET_SELF(destroy);
  50787. - res = ((*meth)(mself, v));
  50788. - }
  50789. - Py_XDECREF(res);
  50790. - }
  50791. -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  50792. - else {
  50793. - const char *name = SWIG_TypePrettyName(ty);
  50794. - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  50795. - }
  50796. -#endif
  50797. - }
  50798. - Py_XDECREF(next);
  50799. - PyObject_DEL(v);
  50800. -}
  50801. -
  50802. -SWIGRUNTIME PyObject*
  50803. -SwigPyObject_append(PyObject* v, PyObject* next)
  50804. -{
  50805. - SwigPyObject *sobj = (SwigPyObject *) v;
  50806. -#ifndef METH_O
  50807. - PyObject *tmp = 0;
  50808. - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  50809. - next = tmp;
  50810. -#endif
  50811. - if (!SwigPyObject_Check(next)) {
  50812. - return NULL;
  50813. - }
  50814. - sobj->next = next;
  50815. - Py_INCREF(next);
  50816. - return SWIG_Py_Void();
  50817. -}
  50818. -
  50819. -SWIGRUNTIME PyObject*
  50820. -#ifdef METH_NOARGS
  50821. -SwigPyObject_next(PyObject* v)
  50822. -#else
  50823. -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  50824. -#endif
  50825. -{
  50826. - SwigPyObject *sobj = (SwigPyObject *) v;
  50827. - if (sobj->next) {
  50828. - Py_INCREF(sobj->next);
  50829. - return sobj->next;
  50830. - } else {
  50831. - return SWIG_Py_Void();
  50832. - }
  50833. -}
  50834. -
  50835. -SWIGINTERN PyObject*
  50836. -#ifdef METH_NOARGS
  50837. -SwigPyObject_disown(PyObject *v)
  50838. -#else
  50839. -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  50840. -#endif
  50841. -{
  50842. - SwigPyObject *sobj = (SwigPyObject *)v;
  50843. - sobj->own = 0;
  50844. - return SWIG_Py_Void();
  50845. -}
  50846. -
  50847. -SWIGINTERN PyObject*
  50848. -#ifdef METH_NOARGS
  50849. -SwigPyObject_acquire(PyObject *v)
  50850. -#else
  50851. -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  50852. -#endif
  50853. -{
  50854. - SwigPyObject *sobj = (SwigPyObject *)v;
  50855. - sobj->own = SWIG_POINTER_OWN;
  50856. - return SWIG_Py_Void();
  50857. -}
  50858. -
  50859. -SWIGINTERN PyObject*
  50860. -SwigPyObject_own(PyObject *v, PyObject *args)
  50861. -{
  50862. - PyObject *val = 0;
  50863. -#if (PY_VERSION_HEX < 0x02020000)
  50864. - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
  50865. -#elif (PY_VERSION_HEX < 0x02050000)
  50866. - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
  50867. -#else
  50868. - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
  50869. -#endif
  50870. - {
  50871. - return NULL;
  50872. - }
  50873. - else
  50874. - {
  50875. - SwigPyObject *sobj = (SwigPyObject *)v;
  50876. - PyObject *obj = PyBool_FromLong(sobj->own);
  50877. - if (val) {
  50878. -#ifdef METH_NOARGS
  50879. - if (PyObject_IsTrue(val)) {
  50880. - SwigPyObject_acquire(v);
  50881. - } else {
  50882. - SwigPyObject_disown(v);
  50883. - }
  50884. -#else
  50885. - if (PyObject_IsTrue(val)) {
  50886. - SwigPyObject_acquire(v,args);
  50887. - } else {
  50888. - SwigPyObject_disown(v,args);
  50889. - }
  50890. -#endif
  50891. - }
  50892. - return obj;
  50893. - }
  50894. -}
  50895. -
  50896. -#ifdef METH_O
  50897. -static PyMethodDef
  50898. -swigobject_methods[] = {
  50899. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
  50900. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
  50901. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  50902. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
  50903. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
  50904. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
  50905. - {0, 0, 0, 0}
  50906. -};
  50907. -#else
  50908. -static PyMethodDef
  50909. -swigobject_methods[] = {
  50910. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
  50911. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
  50912. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  50913. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
  50914. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
  50915. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
  50916. - {0, 0, 0, 0}
  50917. -};
  50918. -#endif
  50919. -
  50920. -#if PY_VERSION_HEX < 0x02020000
  50921. -SWIGINTERN PyObject *
  50922. -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
  50923. -{
  50924. - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
  50925. -}
  50926. -#endif
  50927. -
  50928. -SWIGRUNTIME PyTypeObject*
  50929. -SwigPyObject_TypeOnce(void) {
  50930. - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  50931. -
  50932. - static PyNumberMethods SwigPyObject_as_number = {
  50933. - (binaryfunc)0, /*nb_add*/
  50934. - (binaryfunc)0, /*nb_subtract*/
  50935. - (binaryfunc)0, /*nb_multiply*/
  50936. - /* nb_divide removed in Python 3 */
  50937. -#if PY_VERSION_HEX < 0x03000000
  50938. - (binaryfunc)0, /*nb_divide*/
  50939. -#endif
  50940. - (binaryfunc)0, /*nb_remainder*/
  50941. - (binaryfunc)0, /*nb_divmod*/
  50942. - (ternaryfunc)0,/*nb_power*/
  50943. - (unaryfunc)0, /*nb_negative*/
  50944. - (unaryfunc)0, /*nb_positive*/
  50945. - (unaryfunc)0, /*nb_absolute*/
  50946. - (inquiry)0, /*nb_nonzero*/
  50947. - 0, /*nb_invert*/
  50948. - 0, /*nb_lshift*/
  50949. - 0, /*nb_rshift*/
  50950. - 0, /*nb_and*/
  50951. - 0, /*nb_xor*/
  50952. - 0, /*nb_or*/
  50953. -#if PY_VERSION_HEX < 0x03000000
  50954. - 0, /*nb_coerce*/
  50955. -#endif
  50956. - (unaryfunc)SwigPyObject_long, /*nb_int*/
  50957. -#if PY_VERSION_HEX < 0x03000000
  50958. - (unaryfunc)SwigPyObject_long, /*nb_long*/
  50959. -#else
  50960. - 0, /*nb_reserved*/
  50961. -#endif
  50962. - (unaryfunc)0, /*nb_float*/
  50963. -#if PY_VERSION_HEX < 0x03000000
  50964. - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  50965. - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  50966. -#endif
  50967. -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  50968. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  50969. -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
  50970. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  50971. -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
  50972. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
  50973. -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
  50974. - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
  50975. -#endif
  50976. - };
  50977. -
  50978. - static PyTypeObject swigpyobject_type;
  50979. - static int type_init = 0;
  50980. - if (!type_init) {
  50981. - const PyTypeObject tmp = {
  50982. - /* PyObject header changed in Python 3 */
  50983. -#if PY_VERSION_HEX >= 0x03000000
  50984. - PyVarObject_HEAD_INIT(NULL, 0)
  50985. -#else
  50986. - PyObject_HEAD_INIT(NULL)
  50987. - 0, /* ob_size */
  50988. -#endif
  50989. - (char *)"SwigPyObject", /* tp_name */
  50990. - sizeof(SwigPyObject), /* tp_basicsize */
  50991. - 0, /* tp_itemsize */
  50992. - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  50993. - (printfunc)SwigPyObject_print, /* tp_print */
  50994. -#if PY_VERSION_HEX < 0x02020000
  50995. - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
  50996. -#else
  50997. - (getattrfunc)0, /* tp_getattr */
  50998. -#endif
  50999. - (setattrfunc)0, /* tp_setattr */
  51000. -#if PY_VERSION_HEX >= 0x03000000
  51001. - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  51002. -#else
  51003. - (cmpfunc)SwigPyObject_compare, /* tp_compare */
  51004. -#endif
  51005. - (reprfunc)SwigPyObject_repr, /* tp_repr */
  51006. - &SwigPyObject_as_number, /* tp_as_number */
  51007. - 0, /* tp_as_sequence */
  51008. - 0, /* tp_as_mapping */
  51009. - (hashfunc)0, /* tp_hash */
  51010. - (ternaryfunc)0, /* tp_call */
  51011. - (reprfunc)SwigPyObject_str, /* tp_str */
  51012. - PyObject_GenericGetAttr, /* tp_getattro */
  51013. - 0, /* tp_setattro */
  51014. - 0, /* tp_as_buffer */
  51015. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  51016. - swigobject_doc, /* tp_doc */
  51017. - 0, /* tp_traverse */
  51018. - 0, /* tp_clear */
  51019. - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  51020. - 0, /* tp_weaklistoffset */
  51021. -#if PY_VERSION_HEX >= 0x02020000
  51022. - 0, /* tp_iter */
  51023. - 0, /* tp_iternext */
  51024. - swigobject_methods, /* tp_methods */
  51025. - 0, /* tp_members */
  51026. - 0, /* tp_getset */
  51027. - 0, /* tp_base */
  51028. - 0, /* tp_dict */
  51029. - 0, /* tp_descr_get */
  51030. - 0, /* tp_descr_set */
  51031. - 0, /* tp_dictoffset */
  51032. - 0, /* tp_init */
  51033. - 0, /* tp_alloc */
  51034. - 0, /* tp_new */
  51035. - 0, /* tp_free */
  51036. - 0, /* tp_is_gc */
  51037. - 0, /* tp_bases */
  51038. - 0, /* tp_mro */
  51039. - 0, /* tp_cache */
  51040. - 0, /* tp_subclasses */
  51041. - 0, /* tp_weaklist */
  51042. -#endif
  51043. -#if PY_VERSION_HEX >= 0x02030000
  51044. - 0, /* tp_del */
  51045. -#endif
  51046. -#if PY_VERSION_HEX >= 0x02060000
  51047. - 0, /* tp_version */
  51048. -#endif
  51049. -#ifdef COUNT_ALLOCS
  51050. - 0,0,0,0 /* tp_alloc -> tp_next */
  51051. -#endif
  51052. - };
  51053. - swigpyobject_type = tmp;
  51054. - type_init = 1;
  51055. -#if PY_VERSION_HEX < 0x02020000
  51056. - swigpyobject_type.ob_type = &PyType_Type;
  51057. -#else
  51058. - if (PyType_Ready(&swigpyobject_type) < 0)
  51059. - return NULL;
  51060. -#endif
  51061. - }
  51062. - return &swigpyobject_type;
  51063. -}
  51064. -
  51065. -SWIGRUNTIME PyObject *
  51066. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  51067. -{
  51068. - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  51069. - if (sobj) {
  51070. - sobj->ptr = ptr;
  51071. - sobj->ty = ty;
  51072. - sobj->own = own;
  51073. - sobj->next = 0;
  51074. - }
  51075. - return (PyObject *)sobj;
  51076. -}
  51077. -
  51078. -/* -----------------------------------------------------------------------------
  51079. - * Implements a simple Swig Packed type, and use it instead of string
  51080. - * ----------------------------------------------------------------------------- */
  51081. -
  51082. -typedef struct {
  51083. - PyObject_HEAD
  51084. - void *pack;
  51085. - swig_type_info *ty;
  51086. - size_t size;
  51087. -} SwigPyPacked;
  51088. -
  51089. -SWIGRUNTIME int
  51090. -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  51091. -{
  51092. - char result[SWIG_BUFFER_SIZE];
  51093. - fputs("<Swig Packed ", fp);
  51094. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  51095. - fputs("at ", fp);
  51096. - fputs(result, fp);
  51097. - }
  51098. - fputs(v->ty->name,fp);
  51099. - fputs(">", fp);
  51100. - return 0;
  51101. -}
  51102. -
  51103. -SWIGRUNTIME PyObject *
  51104. -SwigPyPacked_repr(SwigPyPacked *v)
  51105. -{
  51106. - char result[SWIG_BUFFER_SIZE];
  51107. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  51108. - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  51109. - } else {
  51110. - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  51111. - }
  51112. -}
  51113. -
  51114. -SWIGRUNTIME PyObject *
  51115. -SwigPyPacked_str(SwigPyPacked *v)
  51116. -{
  51117. - char result[SWIG_BUFFER_SIZE];
  51118. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  51119. - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  51120. - } else {
  51121. - return SWIG_Python_str_FromChar(v->ty->name);
  51122. - }
  51123. -}
  51124. -
  51125. -SWIGRUNTIME int
  51126. -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  51127. -{
  51128. - size_t i = v->size;
  51129. - size_t j = w->size;
  51130. - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  51131. - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  51132. -}
  51133. -
  51134. -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  51135. -
  51136. -SWIGRUNTIME PyTypeObject*
  51137. -SwigPyPacked_type(void) {
  51138. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  51139. - return type;
  51140. -}
  51141. -
  51142. -SWIGRUNTIMEINLINE int
  51143. -SwigPyPacked_Check(PyObject *op) {
  51144. - return ((op)->ob_type == SwigPyPacked_TypeOnce())
  51145. - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  51146. -}
  51147. -
  51148. -SWIGRUNTIME void
  51149. -SwigPyPacked_dealloc(PyObject *v)
  51150. -{
  51151. - if (SwigPyPacked_Check(v)) {
  51152. - SwigPyPacked *sobj = (SwigPyPacked *) v;
  51153. - free(sobj->pack);
  51154. - }
  51155. - PyObject_DEL(v);
  51156. -}
  51157. -
  51158. -SWIGRUNTIME PyTypeObject*
  51159. -SwigPyPacked_TypeOnce(void) {
  51160. - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  51161. - static PyTypeObject swigpypacked_type;
  51162. - static int type_init = 0;
  51163. - if (!type_init) {
  51164. - const PyTypeObject tmp = {
  51165. - /* PyObject header changed in Python 3 */
  51166. -#if PY_VERSION_HEX>=0x03000000
  51167. - PyVarObject_HEAD_INIT(NULL, 0)
  51168. -#else
  51169. - PyObject_HEAD_INIT(NULL)
  51170. - 0, /* ob_size */
  51171. -#endif
  51172. - (char *)"SwigPyPacked", /* tp_name */
  51173. - sizeof(SwigPyPacked), /* tp_basicsize */
  51174. - 0, /* tp_itemsize */
  51175. - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  51176. - (printfunc)SwigPyPacked_print, /* tp_print */
  51177. - (getattrfunc)0, /* tp_getattr */
  51178. - (setattrfunc)0, /* tp_setattr */
  51179. -#if PY_VERSION_HEX>=0x03000000
  51180. - 0, /* tp_reserved in 3.0.1 */
  51181. -#else
  51182. - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  51183. -#endif
  51184. - (reprfunc)SwigPyPacked_repr, /* tp_repr */
  51185. - 0, /* tp_as_number */
  51186. - 0, /* tp_as_sequence */
  51187. - 0, /* tp_as_mapping */
  51188. - (hashfunc)0, /* tp_hash */
  51189. - (ternaryfunc)0, /* tp_call */
  51190. - (reprfunc)SwigPyPacked_str, /* tp_str */
  51191. - PyObject_GenericGetAttr, /* tp_getattro */
  51192. - 0, /* tp_setattro */
  51193. - 0, /* tp_as_buffer */
  51194. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  51195. - swigpacked_doc, /* tp_doc */
  51196. - 0, /* tp_traverse */
  51197. - 0, /* tp_clear */
  51198. - 0, /* tp_richcompare */
  51199. - 0, /* tp_weaklistoffset */
  51200. -#if PY_VERSION_HEX >= 0x02020000
  51201. - 0, /* tp_iter */
  51202. - 0, /* tp_iternext */
  51203. - 0, /* tp_methods */
  51204. - 0, /* tp_members */
  51205. - 0, /* tp_getset */
  51206. - 0, /* tp_base */
  51207. - 0, /* tp_dict */
  51208. - 0, /* tp_descr_get */
  51209. - 0, /* tp_descr_set */
  51210. - 0, /* tp_dictoffset */
  51211. - 0, /* tp_init */
  51212. - 0, /* tp_alloc */
  51213. - 0, /* tp_new */
  51214. - 0, /* tp_free */
  51215. - 0, /* tp_is_gc */
  51216. - 0, /* tp_bases */
  51217. - 0, /* tp_mro */
  51218. - 0, /* tp_cache */
  51219. - 0, /* tp_subclasses */
  51220. - 0, /* tp_weaklist */
  51221. -#endif
  51222. -#if PY_VERSION_HEX >= 0x02030000
  51223. - 0, /* tp_del */
  51224. -#endif
  51225. -#if PY_VERSION_HEX >= 0x02060000
  51226. - 0, /* tp_version */
  51227. -#endif
  51228. -#ifdef COUNT_ALLOCS
  51229. - 0,0,0,0 /* tp_alloc -> tp_next */
  51230. -#endif
  51231. - };
  51232. - swigpypacked_type = tmp;
  51233. - type_init = 1;
  51234. -#if PY_VERSION_HEX < 0x02020000
  51235. - swigpypacked_type.ob_type = &PyType_Type;
  51236. -#else
  51237. - if (PyType_Ready(&swigpypacked_type) < 0)
  51238. - return NULL;
  51239. -#endif
  51240. - }
  51241. - return &swigpypacked_type;
  51242. -}
  51243. -
  51244. -SWIGRUNTIME PyObject *
  51245. -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  51246. -{
  51247. - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  51248. - if (sobj) {
  51249. - void *pack = malloc(size);
  51250. - if (pack) {
  51251. - memcpy(pack, ptr, size);
  51252. - sobj->pack = pack;
  51253. - sobj->ty = ty;
  51254. - sobj->size = size;
  51255. - } else {
  51256. - PyObject_DEL((PyObject *) sobj);
  51257. - sobj = 0;
  51258. - }
  51259. - }
  51260. - return (PyObject *) sobj;
  51261. -}
  51262. -
  51263. -SWIGRUNTIME swig_type_info *
  51264. -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  51265. -{
  51266. - if (SwigPyPacked_Check(obj)) {
  51267. - SwigPyPacked *sobj = (SwigPyPacked *)obj;
  51268. - if (sobj->size != size) return 0;
  51269. - memcpy(ptr, sobj->pack, size);
  51270. - return sobj->ty;
  51271. - } else {
  51272. - return 0;
  51273. - }
  51274. -}
  51275. -
  51276. -/* -----------------------------------------------------------------------------
  51277. - * pointers/data manipulation
  51278. - * ----------------------------------------------------------------------------- */
  51279. -
  51280. -SWIGRUNTIMEINLINE PyObject *
  51281. -_SWIG_This(void)
  51282. -{
  51283. - return SWIG_Python_str_FromChar("this");
  51284. -}
  51285. -
  51286. -static PyObject *swig_this = NULL;
  51287. -
  51288. -SWIGRUNTIME PyObject *
  51289. -SWIG_This(void)
  51290. -{
  51291. - if (swig_this == NULL)
  51292. - swig_this = _SWIG_This();
  51293. - return swig_this;
  51294. -}
  51295. -
  51296. -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  51297. -
  51298. -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
  51299. -#if PY_VERSION_HEX>=0x03000000
  51300. -#define SWIG_PYTHON_SLOW_GETSET_THIS
  51301. -#endif
  51302. -
  51303. -SWIGRUNTIME SwigPyObject *
  51304. -SWIG_Python_GetSwigThis(PyObject *pyobj)
  51305. -{
  51306. - PyObject *obj;
  51307. -
  51308. - if (SwigPyObject_Check(pyobj))
  51309. - return (SwigPyObject *) pyobj;
  51310. -
  51311. -#ifdef SWIGPYTHON_BUILTIN
  51312. - (void)obj;
  51313. -# ifdef PyWeakref_CheckProxy
  51314. - if (PyWeakref_CheckProxy(pyobj)) {
  51315. - pyobj = PyWeakref_GET_OBJECT(pyobj);
  51316. - if (pyobj && SwigPyObject_Check(pyobj))
  51317. - return (SwigPyObject*) pyobj;
  51318. - }
  51319. -# endif
  51320. - return NULL;
  51321. -#else
  51322. -
  51323. - obj = 0;
  51324. -
  51325. -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  51326. - if (PyInstance_Check(pyobj)) {
  51327. - obj = _PyInstance_Lookup(pyobj, SWIG_This());
  51328. - } else {
  51329. - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  51330. - if (dictptr != NULL) {
  51331. - PyObject *dict = *dictptr;
  51332. - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  51333. - } else {
  51334. -#ifdef PyWeakref_CheckProxy
  51335. - if (PyWeakref_CheckProxy(pyobj)) {
  51336. - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  51337. - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  51338. - }
  51339. -#endif
  51340. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  51341. - if (obj) {
  51342. - Py_DECREF(obj);
  51343. - } else {
  51344. - if (PyErr_Occurred()) PyErr_Clear();
  51345. - return 0;
  51346. - }
  51347. - }
  51348. - }
  51349. -#else
  51350. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  51351. - if (obj) {
  51352. - Py_DECREF(obj);
  51353. - } else {
  51354. - if (PyErr_Occurred()) PyErr_Clear();
  51355. - return 0;
  51356. - }
  51357. -#endif
  51358. - if (obj && !SwigPyObject_Check(obj)) {
  51359. - /* a PyObject is called 'this', try to get the 'real this'
  51360. - SwigPyObject from it */
  51361. - return SWIG_Python_GetSwigThis(obj);
  51362. - }
  51363. - return (SwigPyObject *)obj;
  51364. -#endif
  51365. -}
  51366. -
  51367. -/* Acquire a pointer value */
  51368. -
  51369. -SWIGRUNTIME int
  51370. -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  51371. - if (own == SWIG_POINTER_OWN) {
  51372. - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  51373. - if (sobj) {
  51374. - int oldown = sobj->own;
  51375. - sobj->own = own;
  51376. - return oldown;
  51377. - }
  51378. - }
  51379. - return 0;
  51380. -}
  51381. -
  51382. -/* Convert a pointer value */
  51383. -
  51384. -SWIGRUNTIME int
  51385. -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  51386. - int res;
  51387. - SwigPyObject *sobj;
  51388. -
  51389. - if (!obj)
  51390. - return SWIG_ERROR;
  51391. - if (obj == Py_None) {
  51392. - if (ptr)
  51393. - *ptr = 0;
  51394. - return SWIG_OK;
  51395. - }
  51396. -
  51397. - res = SWIG_ERROR;
  51398. -
  51399. - sobj = SWIG_Python_GetSwigThis(obj);
  51400. - if (own)
  51401. - *own = 0;
  51402. - while (sobj) {
  51403. - void *vptr = sobj->ptr;
  51404. - if (ty) {
  51405. - swig_type_info *to = sobj->ty;
  51406. - if (to == ty) {
  51407. - /* no type cast needed */
  51408. - if (ptr) *ptr = vptr;
  51409. - break;
  51410. - } else {
  51411. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  51412. - if (!tc) {
  51413. - sobj = (SwigPyObject *)sobj->next;
  51414. - } else {
  51415. - if (ptr) {
  51416. - int newmemory = 0;
  51417. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  51418. - if (newmemory == SWIG_CAST_NEW_MEMORY) {
  51419. - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  51420. - if (own)
  51421. - *own = *own | SWIG_CAST_NEW_MEMORY;
  51422. - }
  51423. - }
  51424. - break;
  51425. - }
  51426. - }
  51427. - } else {
  51428. - if (ptr) *ptr = vptr;
  51429. - break;
  51430. - }
  51431. - }
  51432. - if (sobj) {
  51433. - if (own)
  51434. - *own = *own | sobj->own;
  51435. - if (flags & SWIG_POINTER_DISOWN) {
  51436. - sobj->own = 0;
  51437. - }
  51438. - res = SWIG_OK;
  51439. - } else {
  51440. - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
  51441. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  51442. - if (data && !data->implicitconv) {
  51443. - PyObject *klass = data->klass;
  51444. - if (klass) {
  51445. - PyObject *impconv;
  51446. - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  51447. - impconv = SWIG_Python_CallFunctor(klass, obj);
  51448. - data->implicitconv = 0;
  51449. - if (PyErr_Occurred()) {
  51450. - PyErr_Clear();
  51451. - impconv = 0;
  51452. - }
  51453. - if (impconv) {
  51454. - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  51455. - if (iobj) {
  51456. - void *vptr;
  51457. - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  51458. - if (SWIG_IsOK(res)) {
  51459. - if (ptr) {
  51460. - *ptr = vptr;
  51461. - /* transfer the ownership to 'ptr' */
  51462. - iobj->own = 0;
  51463. - res = SWIG_AddCast(res);
  51464. - res = SWIG_AddNewMask(res);
  51465. - } else {
  51466. - res = SWIG_AddCast(res);
  51467. - }
  51468. - }
  51469. - }
  51470. - Py_DECREF(impconv);
  51471. - }
  51472. - }
  51473. - }
  51474. - }
  51475. - }
  51476. - return res;
  51477. -}
  51478. -
  51479. -/* Convert a function ptr value */
  51480. -
  51481. -SWIGRUNTIME int
  51482. -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  51483. - if (!PyCFunction_Check(obj)) {
  51484. - return SWIG_ConvertPtr(obj, ptr, ty, 0);
  51485. - } else {
  51486. - void *vptr = 0;
  51487. -
  51488. - /* here we get the method pointer for callbacks */
  51489. - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  51490. - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  51491. - if (desc)
  51492. - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  51493. - if (!desc)
  51494. - return SWIG_ERROR;
  51495. - if (ty) {
  51496. - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
  51497. - if (tc) {
  51498. - int newmemory = 0;
  51499. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  51500. - assert(!newmemory); /* newmemory handling not yet implemented */
  51501. - } else {
  51502. - return SWIG_ERROR;
  51503. - }
  51504. - } else {
  51505. - *ptr = vptr;
  51506. - }
  51507. - return SWIG_OK;
  51508. - }
  51509. -}
  51510. -
  51511. -/* Convert a packed value value */
  51512. -
  51513. -SWIGRUNTIME int
  51514. -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  51515. - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  51516. - if (!to) return SWIG_ERROR;
  51517. - if (ty) {
  51518. - if (to != ty) {
  51519. - /* check type cast? */
  51520. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  51521. - if (!tc) return SWIG_ERROR;
  51522. - }
  51523. - }
  51524. - return SWIG_OK;
  51525. -}
  51526. -
  51527. -/* -----------------------------------------------------------------------------
  51528. - * Create a new pointer object
  51529. - * ----------------------------------------------------------------------------- */
  51530. -
  51531. -/*
  51532. - Create a new instance object, without calling __init__, and set the
  51533. - 'this' attribute.
  51534. -*/
  51535. -
  51536. -SWIGRUNTIME PyObject*
  51537. -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  51538. -{
  51539. -#if (PY_VERSION_HEX >= 0x02020000)
  51540. - PyObject *inst = 0;
  51541. - PyObject *newraw = data->newraw;
  51542. - if (newraw) {
  51543. - inst = PyObject_Call(newraw, data->newargs, NULL);
  51544. - if (inst) {
  51545. -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  51546. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  51547. - if (dictptr != NULL) {
  51548. - PyObject *dict = *dictptr;
  51549. - if (dict == NULL) {
  51550. - dict = PyDict_New();
  51551. - *dictptr = dict;
  51552. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  51553. - }
  51554. - }
  51555. -#else
  51556. - PyObject *key = SWIG_This();
  51557. - PyObject_SetAttr(inst, key, swig_this);
  51558. -#endif
  51559. - }
  51560. - } else {
  51561. -#if PY_VERSION_HEX >= 0x03000000
  51562. - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
  51563. - if (inst) {
  51564. - PyObject_SetAttr(inst, SWIG_This(), swig_this);
  51565. - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  51566. - }
  51567. -#else
  51568. - PyObject *dict = PyDict_New();
  51569. - if (dict) {
  51570. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  51571. - inst = PyInstance_NewRaw(data->newargs, dict);
  51572. - Py_DECREF(dict);
  51573. - }
  51574. -#endif
  51575. - }
  51576. - return inst;
  51577. -#else
  51578. -#if (PY_VERSION_HEX >= 0x02010000)
  51579. - PyObject *inst = 0;
  51580. - PyObject *dict = PyDict_New();
  51581. - if (dict) {
  51582. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  51583. - inst = PyInstance_NewRaw(data->newargs, dict);
  51584. - Py_DECREF(dict);
  51585. - }
  51586. - return (PyObject *) inst;
  51587. -#else
  51588. - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  51589. - if (inst == NULL) {
  51590. - return NULL;
  51591. - }
  51592. - inst->in_class = (PyClassObject *)data->newargs;
  51593. - Py_INCREF(inst->in_class);
  51594. - inst->in_dict = PyDict_New();
  51595. - if (inst->in_dict == NULL) {
  51596. - Py_DECREF(inst);
  51597. - return NULL;
  51598. - }
  51599. -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  51600. - inst->in_weakreflist = NULL;
  51601. -#endif
  51602. -#ifdef Py_TPFLAGS_GC
  51603. - PyObject_GC_Init(inst);
  51604. -#endif
  51605. - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  51606. - return (PyObject *) inst;
  51607. -#endif
  51608. -#endif
  51609. -}
  51610. -
  51611. -SWIGRUNTIME void
  51612. -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  51613. -{
  51614. - PyObject *dict;
  51615. -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  51616. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  51617. - if (dictptr != NULL) {
  51618. - dict = *dictptr;
  51619. - if (dict == NULL) {
  51620. - dict = PyDict_New();
  51621. - *dictptr = dict;
  51622. - }
  51623. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  51624. - return;
  51625. - }
  51626. -#endif
  51627. - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  51628. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  51629. - Py_DECREF(dict);
  51630. -}
  51631. -
  51632. -
  51633. -SWIGINTERN PyObject *
  51634. -SWIG_Python_InitShadowInstance(PyObject *args) {
  51635. - PyObject *obj[2];
  51636. - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  51637. - return NULL;
  51638. - } else {
  51639. - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  51640. - if (sthis) {
  51641. - SwigPyObject_append((PyObject*) sthis, obj[1]);
  51642. - } else {
  51643. - SWIG_Python_SetSwigThis(obj[0], obj[1]);
  51644. - }
  51645. - return SWIG_Py_Void();
  51646. - }
  51647. -}
  51648. -
  51649. -/* Create a new pointer object */
  51650. -
  51651. -SWIGRUNTIME PyObject *
  51652. -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  51653. - SwigPyClientData *clientdata;
  51654. - PyObject * robj;
  51655. - int own;
  51656. -
  51657. - if (!ptr)
  51658. - return SWIG_Py_Void();
  51659. -
  51660. - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  51661. - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  51662. - if (clientdata && clientdata->pytype) {
  51663. - SwigPyObject *newobj;
  51664. - if (flags & SWIG_BUILTIN_TP_INIT) {
  51665. - newobj = (SwigPyObject*) self;
  51666. - if (newobj->ptr) {
  51667. - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  51668. - while (newobj->next)
  51669. - newobj = (SwigPyObject *) newobj->next;
  51670. - newobj->next = next_self;
  51671. - newobj = (SwigPyObject *)next_self;
  51672. - }
  51673. - } else {
  51674. - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  51675. - }
  51676. - if (newobj) {
  51677. - newobj->ptr = ptr;
  51678. - newobj->ty = type;
  51679. - newobj->own = own;
  51680. - newobj->next = 0;
  51681. -#ifdef SWIGPYTHON_BUILTIN
  51682. - newobj->dict = 0;
  51683. -#endif
  51684. - return (PyObject*) newobj;
  51685. - }
  51686. - return SWIG_Py_Void();
  51687. - }
  51688. -
  51689. - assert(!(flags & SWIG_BUILTIN_TP_INIT));
  51690. -
  51691. - robj = SwigPyObject_New(ptr, type, own);
  51692. - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  51693. - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  51694. - Py_DECREF(robj);
  51695. - robj = inst;
  51696. - }
  51697. - return robj;
  51698. -}
  51699. -
  51700. -/* Create a new packed object */
  51701. -
  51702. -SWIGRUNTIMEINLINE PyObject *
  51703. -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  51704. - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  51705. -}
  51706. -
  51707. -/* -----------------------------------------------------------------------------*
  51708. - * Get type list
  51709. - * -----------------------------------------------------------------------------*/
  51710. -
  51711. -#ifdef SWIG_LINK_RUNTIME
  51712. -void *SWIG_ReturnGlobalTypeList(void *);
  51713. -#endif
  51714. -
  51715. -SWIGRUNTIME swig_module_info *
  51716. -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  51717. - static void *type_pointer = (void *)0;
  51718. - /* first check if module already created */
  51719. - if (!type_pointer) {
  51720. -#ifdef SWIG_LINK_RUNTIME
  51721. - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  51722. -#else
  51723. -# ifdef SWIGPY_USE_CAPSULE
  51724. - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  51725. -# else
  51726. - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
  51727. - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
  51728. -# endif
  51729. - if (PyErr_Occurred()) {
  51730. - PyErr_Clear();
  51731. - type_pointer = (void *)0;
  51732. - }
  51733. -#endif
  51734. - }
  51735. - return (swig_module_info *) type_pointer;
  51736. -}
  51737. -
  51738. -#if PY_MAJOR_VERSION < 2
  51739. -/* PyModule_AddObject function was introduced in Python 2.0. The following function
  51740. - is copied out of Python/modsupport.c in python version 2.3.4 */
  51741. -SWIGINTERN int
  51742. -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
  51743. -{
  51744. - PyObject *dict;
  51745. - if (!PyModule_Check(m)) {
  51746. - PyErr_SetString(PyExc_TypeError,
  51747. - "PyModule_AddObject() needs module as first arg");
  51748. - return SWIG_ERROR;
  51749. - }
  51750. - if (!o) {
  51751. - PyErr_SetString(PyExc_TypeError,
  51752. - "PyModule_AddObject() needs non-NULL value");
  51753. - return SWIG_ERROR;
  51754. - }
  51755. -
  51756. - dict = PyModule_GetDict(m);
  51757. - if (dict == NULL) {
  51758. - /* Internal error -- modules must have a dict! */
  51759. - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
  51760. - PyModule_GetName(m));
  51761. - return SWIG_ERROR;
  51762. - }
  51763. - if (PyDict_SetItemString(dict, name, o))
  51764. - return SWIG_ERROR;
  51765. - Py_DECREF(o);
  51766. - return SWIG_OK;
  51767. -}
  51768. -#endif
  51769. -
  51770. -SWIGRUNTIME void
  51771. -#ifdef SWIGPY_USE_CAPSULE
  51772. -SWIG_Python_DestroyModule(PyObject *obj)
  51773. -#else
  51774. -SWIG_Python_DestroyModule(void *vptr)
  51775. -#endif
  51776. -{
  51777. -#ifdef SWIGPY_USE_CAPSULE
  51778. - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  51779. -#else
  51780. - swig_module_info *swig_module = (swig_module_info *) vptr;
  51781. -#endif
  51782. - swig_type_info **types = swig_module->types;
  51783. - size_t i;
  51784. - for (i =0; i < swig_module->size; ++i) {
  51785. - swig_type_info *ty = types[i];
  51786. - if (ty->owndata) {
  51787. - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  51788. - if (data) SwigPyClientData_Del(data);
  51789. - }
  51790. - }
  51791. - Py_DECREF(SWIG_This());
  51792. - swig_this = NULL;
  51793. -}
  51794. -
  51795. -SWIGRUNTIME void
  51796. -SWIG_Python_SetModule(swig_module_info *swig_module) {
  51797. -#if PY_VERSION_HEX >= 0x03000000
  51798. - /* Add a dummy module object into sys.modules */
  51799. - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  51800. -#else
  51801. - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  51802. - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  51803. -#endif
  51804. -#ifdef SWIGPY_USE_CAPSULE
  51805. - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  51806. - if (pointer && module) {
  51807. - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  51808. - } else {
  51809. - Py_XDECREF(pointer);
  51810. - }
  51811. -#else
  51812. - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  51813. - if (pointer && module) {
  51814. - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  51815. - } else {
  51816. - Py_XDECREF(pointer);
  51817. - }
  51818. -#endif
  51819. -}
  51820. -
  51821. -/* The python cached type query */
  51822. -SWIGRUNTIME PyObject *
  51823. -SWIG_Python_TypeCache(void) {
  51824. - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  51825. - return cache;
  51826. -}
  51827. -
  51828. -SWIGRUNTIME swig_type_info *
  51829. -SWIG_Python_TypeQuery(const char *type)
  51830. -{
  51831. - PyObject *cache = SWIG_Python_TypeCache();
  51832. - PyObject *key = SWIG_Python_str_FromChar(type);
  51833. - PyObject *obj = PyDict_GetItem(cache, key);
  51834. - swig_type_info *descriptor;
  51835. - if (obj) {
  51836. -#ifdef SWIGPY_USE_CAPSULE
  51837. - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  51838. -#else
  51839. - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
  51840. -#endif
  51841. - } else {
  51842. - swig_module_info *swig_module = SWIG_GetModule(0);
  51843. - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  51844. - if (descriptor) {
  51845. -#ifdef SWIGPY_USE_CAPSULE
  51846. - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  51847. -#else
  51848. - obj = PyCObject_FromVoidPtr(descriptor, NULL);
  51849. -#endif
  51850. - PyDict_SetItem(cache, key, obj);
  51851. - Py_DECREF(obj);
  51852. - }
  51853. - }
  51854. - Py_DECREF(key);
  51855. - return descriptor;
  51856. -}
  51857. -
  51858. -/*
  51859. - For backward compatibility only
  51860. -*/
  51861. -#define SWIG_POINTER_EXCEPTION 0
  51862. -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  51863. -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  51864. -
  51865. -SWIGRUNTIME int
  51866. -SWIG_Python_AddErrMesg(const char* mesg, int infront)
  51867. -{
  51868. - if (PyErr_Occurred()) {
  51869. - PyObject *type = 0;
  51870. - PyObject *value = 0;
  51871. - PyObject *traceback = 0;
  51872. - PyErr_Fetch(&type, &value, &traceback);
  51873. - if (value) {
  51874. - char *tmp;
  51875. - PyObject *old_str = PyObject_Str(value);
  51876. - Py_XINCREF(type);
  51877. - PyErr_Clear();
  51878. - if (infront) {
  51879. - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
  51880. - } else {
  51881. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  51882. - }
  51883. - SWIG_Python_str_DelForPy3(tmp);
  51884. - Py_DECREF(old_str);
  51885. - }
  51886. - return 1;
  51887. - } else {
  51888. - return 0;
  51889. - }
  51890. -}
  51891. -
  51892. -SWIGRUNTIME int
  51893. -SWIG_Python_ArgFail(int argnum)
  51894. -{
  51895. - if (PyErr_Occurred()) {
  51896. - /* add information about failing argument */
  51897. - char mesg[256];
  51898. - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  51899. - return SWIG_Python_AddErrMesg(mesg, 1);
  51900. - } else {
  51901. - return 0;
  51902. - }
  51903. -}
  51904. -
  51905. -SWIGRUNTIMEINLINE const char *
  51906. -SwigPyObject_GetDesc(PyObject *self)
  51907. -{
  51908. - SwigPyObject *v = (SwigPyObject *)self;
  51909. - swig_type_info *ty = v ? v->ty : 0;
  51910. - return ty ? ty->str : "";
  51911. -}
  51912. -
  51913. -SWIGRUNTIME void
  51914. -SWIG_Python_TypeError(const char *type, PyObject *obj)
  51915. -{
  51916. - if (type) {
  51917. -#if defined(SWIG_COBJECT_TYPES)
  51918. - if (obj && SwigPyObject_Check(obj)) {
  51919. - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  51920. - if (otype) {
  51921. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  51922. - type, otype);
  51923. - return;
  51924. - }
  51925. - } else
  51926. -#endif
  51927. - {
  51928. - const char *otype = (obj ? obj->ob_type->tp_name : 0);
  51929. - if (otype) {
  51930. - PyObject *str = PyObject_Str(obj);
  51931. - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  51932. - if (cstr) {
  51933. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  51934. - type, otype, cstr);
  51935. - SWIG_Python_str_DelForPy3(cstr);
  51936. - } else {
  51937. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  51938. - type, otype);
  51939. - }
  51940. - Py_XDECREF(str);
  51941. - return;
  51942. - }
  51943. - }
  51944. - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  51945. - } else {
  51946. - PyErr_Format(PyExc_TypeError, "unexpected type is received");
  51947. - }
  51948. -}
  51949. -
  51950. -
  51951. -/* Convert a pointer value, signal an exception on a type mismatch */
  51952. -SWIGRUNTIME void *
  51953. -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  51954. - void *result;
  51955. - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  51956. - PyErr_Clear();
  51957. -#if SWIG_POINTER_EXCEPTION
  51958. - if (flags) {
  51959. - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  51960. - SWIG_Python_ArgFail(argnum);
  51961. - }
  51962. -#endif
  51963. - }
  51964. - return result;
  51965. -}
  51966. -
  51967. -#ifdef SWIGPYTHON_BUILTIN
  51968. -SWIGRUNTIME int
  51969. -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  51970. - PyTypeObject *tp = obj->ob_type;
  51971. - PyObject *descr;
  51972. - PyObject *encoded_name;
  51973. - descrsetfunc f;
  51974. - int res;
  51975. -
  51976. -# ifdef Py_USING_UNICODE
  51977. - if (PyString_Check(name)) {
  51978. - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  51979. - if (!name)
  51980. - return -1;
  51981. - } else if (!PyUnicode_Check(name))
  51982. -# else
  51983. - if (!PyString_Check(name))
  51984. -# endif
  51985. - {
  51986. - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  51987. - return -1;
  51988. - } else {
  51989. - Py_INCREF(name);
  51990. - }
  51991. -
  51992. - if (!tp->tp_dict) {
  51993. - if (PyType_Ready(tp) < 0)
  51994. - goto done;
  51995. - }
  51996. -
  51997. - res = -1;
  51998. - descr = _PyType_Lookup(tp, name);
  51999. - f = NULL;
  52000. - if (descr != NULL)
  52001. - f = descr->ob_type->tp_descr_set;
  52002. - if (!f) {
  52003. - if (PyString_Check(name)) {
  52004. - encoded_name = name;
  52005. - Py_INCREF(name);
  52006. - } else {
  52007. - encoded_name = PyUnicode_AsUTF8String(name);
  52008. - }
  52009. - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  52010. - Py_DECREF(encoded_name);
  52011. - } else {
  52012. - res = f(descr, obj, value);
  52013. - }
  52014. -
  52015. - done:
  52016. - Py_DECREF(name);
  52017. - return res;
  52018. -}
  52019. -#endif
  52020. -
  52021. -
  52022. -#ifdef __cplusplus
  52023. -}
  52024. -#endif
  52025. -
  52026. -
  52027. -
  52028. -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  52029. -
  52030. -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  52031. -
  52032. -
  52033. -
  52034. - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
  52035. -
  52036. -
  52037. -/* -------- TYPES TABLE (BEGIN) -------- */
  52038. -
  52039. -#define SWIGTYPE_p_GType swig_types[0]
  52040. -#define SWIGTYPE_p_VBuffer swig_types[1]
  52041. -#define SWIGTYPE_p__VipsImage swig_types[2]
  52042. -#define SWIGTYPE_p_allocator_type swig_types[3]
  52043. -#define SWIGTYPE_p_char swig_types[4]
  52044. -#define SWIGTYPE_p_difference_type swig_types[5]
  52045. -#define SWIGTYPE_p_double swig_types[6]
  52046. -#define SWIGTYPE_p_float swig_types[7]
  52047. -#define SWIGTYPE_p_gboolean swig_types[8]
  52048. -#define SWIGTYPE_p_int swig_types[9]
  52049. -#define SWIGTYPE_p_matrix swig_types[10]
  52050. -#define SWIGTYPE_p_p_PyObject swig_types[11]
  52051. -#define SWIGTYPE_p_p_char swig_types[12]
  52052. -#define SWIGTYPE_p_size_t swig_types[13]
  52053. -#define SWIGTYPE_p_size_type swig_types[14]
  52054. -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[15]
  52055. -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[16]
  52056. -#define SWIGTYPE_p_std__allocatorT_vips__VImage_t swig_types[17]
  52057. -#define SWIGTYPE_p_std__invalid_argument swig_types[18]
  52058. -#define SWIGTYPE_p_std__vectorT__Tp__Alloc_t swig_types[19]
  52059. -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[20]
  52060. -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[21]
  52061. -#define SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t swig_types[22]
  52062. -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[23]
  52063. -#define SWIGTYPE_p_value_type swig_types[24]
  52064. -#define SWIGTYPE_p_vips__VDMask swig_types[25]
  52065. -#define SWIGTYPE_p_vips__VDisplay swig_types[26]
  52066. -#define SWIGTYPE_p_vips__VError swig_types[27]
  52067. -#define SWIGTYPE_p_vips__VIMask swig_types[28]
  52068. -#define SWIGTYPE_p_vips__VImage swig_types[29]
  52069. -#define SWIGTYPE_p_void swig_types[30]
  52070. -static swig_type_info *swig_types[32];
  52071. -static swig_module_info swig_module = {swig_types, 31, 0, 0, 0, 0};
  52072. -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  52073. -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  52074. -
  52075. -/* -------- TYPES TABLE (END) -------- */
  52076. -
  52077. -#if (PY_VERSION_HEX <= 0x02000000)
  52078. -# if !defined(SWIG_PYTHON_CLASSIC)
  52079. -# error "This python version requires swig to be run with the '-classic' option"
  52080. -# endif
  52081. -#endif
  52082. -
  52083. -/*-----------------------------------------------
  52084. - @(target):= vimagemodule.so
  52085. - ------------------------------------------------*/
  52086. -#if PY_VERSION_HEX >= 0x03000000
  52087. -# define SWIG_init PyInit_vimagemodule
  52088. -
  52089. -#else
  52090. -# define SWIG_init initvimagemodule
  52091. -
  52092. -#endif
  52093. -#define SWIG_name "vimagemodule"
  52094. -
  52095. -#define SWIGVERSION 0x020010
  52096. -#define SWIG_VERSION SWIGVERSION
  52097. -
  52098. -
  52099. -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  52100. -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  52101. -
  52102. -
  52103. -#include <stdexcept>
  52104. -
  52105. -
  52106. -namespace swig {
  52107. - class SwigPtr_PyObject {
  52108. - protected:
  52109. - PyObject *_obj;
  52110. -
  52111. - public:
  52112. - SwigPtr_PyObject() :_obj(0)
  52113. - {
  52114. - }
  52115. -
  52116. - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
  52117. - {
  52118. - Py_XINCREF(_obj);
  52119. - }
  52120. -
  52121. - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
  52122. - {
  52123. - if (initial_ref) {
  52124. - Py_XINCREF(_obj);
  52125. - }
  52126. - }
  52127. -
  52128. - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
  52129. - {
  52130. - Py_XINCREF(item._obj);
  52131. - Py_XDECREF(_obj);
  52132. - _obj = item._obj;
  52133. - return *this;
  52134. - }
  52135. -
  52136. - ~SwigPtr_PyObject()
  52137. - {
  52138. - Py_XDECREF(_obj);
  52139. - }
  52140. -
  52141. - operator PyObject *() const
  52142. - {
  52143. - return _obj;
  52144. - }
  52145. -
  52146. - PyObject *operator->() const
  52147. - {
  52148. - return _obj;
  52149. - }
  52150. - };
  52151. -}
  52152. -
  52153. -
  52154. -namespace swig {
  52155. - struct SwigVar_PyObject : SwigPtr_PyObject {
  52156. - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
  52157. -
  52158. - SwigVar_PyObject & operator = (PyObject* obj)
  52159. - {
  52160. - Py_XDECREF(_obj);
  52161. - _obj = obj;
  52162. - return *this;
  52163. - }
  52164. - };
  52165. -}
  52166. -
  52167. -
  52168. -#include <vips/vipscpp.h>
  52169. -
  52170. -/* We need the C API too for the args init and some of the
  52171. - * frombuffer/tobuffer stuff.
  52172. - */
  52173. -#include <vips/vips.h>
  52174. -
  52175. -
  52176. -#include <iostream>
  52177. -
  52178. -#if PY_VERSION_HEX >= 0x03020000
  52179. -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
  52180. -#else
  52181. -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
  52182. -#endif
  52183. -
  52184. -
  52185. -#include <stdexcept>
  52186. -
  52187. -
  52188. -#if defined(__GNUC__)
  52189. -# if __GNUC__ == 2 && __GNUC_MINOR <= 96
  52190. -# define SWIG_STD_NOMODERN_STL
  52191. -# endif
  52192. -#endif
  52193. -
  52194. -
  52195. -#include <string>
  52196. -#include <stdexcept>
  52197. -#include <stddef.h>
  52198. -
  52199. -
  52200. - #include <stddef.h>
  52201. -
  52202. -
  52203. -namespace swig {
  52204. - struct stop_iteration {
  52205. - };
  52206. -
  52207. - struct SwigPyIterator {
  52208. - private:
  52209. - SwigPtr_PyObject _seq;
  52210. -
  52211. - protected:
  52212. - SwigPyIterator(PyObject *seq) : _seq(seq)
  52213. - {
  52214. - }
  52215. -
  52216. - public:
  52217. - virtual ~SwigPyIterator() {}
  52218. -
  52219. - // Access iterator method, required by Python
  52220. - virtual PyObject *value() const = 0;
  52221. -
  52222. - // Forward iterator method, required by Python
  52223. - virtual SwigPyIterator *incr(size_t n = 1) = 0;
  52224. -
  52225. - // Backward iterator method, very common in C++, but not required in Python
  52226. - virtual SwigPyIterator *decr(size_t /*n*/ = 1)
  52227. - {
  52228. - throw stop_iteration();
  52229. - }
  52230. -
  52231. - // Random access iterator methods, but not required in Python
  52232. - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
  52233. - {
  52234. - throw std::invalid_argument("operation not supported");
  52235. - }
  52236. -
  52237. - virtual bool equal (const SwigPyIterator &/*x*/) const
  52238. - {
  52239. - throw std::invalid_argument("operation not supported");
  52240. - }
  52241. -
  52242. - // C++ common/needed methods
  52243. - virtual SwigPyIterator *copy() const = 0;
  52244. -
  52245. - PyObject *next()
  52246. - {
  52247. - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
  52248. - PyObject *obj = value();
  52249. - incr();
  52250. - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
  52251. - return obj;
  52252. - }
  52253. -
  52254. - /* Make an alias for Python 3.x */
  52255. - PyObject *__next__()
  52256. - {
  52257. - return next();
  52258. - }
  52259. -
  52260. - PyObject *previous()
  52261. - {
  52262. - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
  52263. - decr();
  52264. - PyObject *obj = value();
  52265. - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
  52266. - return obj;
  52267. - }
  52268. -
  52269. - SwigPyIterator *advance(ptrdiff_t n)
  52270. - {
  52271. - return (n > 0) ? incr(n) : decr(-n);
  52272. - }
  52273. -
  52274. - bool operator == (const SwigPyIterator& x) const
  52275. - {
  52276. - return equal(x);
  52277. - }
  52278. -
  52279. - bool operator != (const SwigPyIterator& x) const
  52280. - {
  52281. - return ! operator==(x);
  52282. - }
  52283. -
  52284. - SwigPyIterator& operator += (ptrdiff_t n)
  52285. - {
  52286. - return *advance(n);
  52287. - }
  52288. -
  52289. - SwigPyIterator& operator -= (ptrdiff_t n)
  52290. - {
  52291. - return *advance(-n);
  52292. - }
  52293. -
  52294. - SwigPyIterator* operator + (ptrdiff_t n) const
  52295. - {
  52296. - return copy()->advance(n);
  52297. - }
  52298. -
  52299. - SwigPyIterator* operator - (ptrdiff_t n) const
  52300. - {
  52301. - return copy()->advance(-n);
  52302. - }
  52303. -
  52304. - ptrdiff_t operator - (const SwigPyIterator& x) const
  52305. - {
  52306. - return x.distance(*this);
  52307. - }
  52308. -
  52309. - static swig_type_info* descriptor() {
  52310. - static int init = 0;
  52311. - static swig_type_info* desc = 0;
  52312. - if (!init) {
  52313. - desc = SWIG_TypeQuery("swig::SwigPyIterator *");
  52314. - init = 1;
  52315. - }
  52316. - return desc;
  52317. - }
  52318. - };
  52319. -
  52320. -#if defined(SWIGPYTHON_BUILTIN)
  52321. - inline PyObject* make_output_iterator_builtin (PyObject *pyself)
  52322. - {
  52323. - Py_INCREF(pyself);
  52324. - return pyself;
  52325. - }
  52326. -#endif
  52327. -}
  52328. -
  52329. -
  52330. -SWIGINTERN int
  52331. -SWIG_AsVal_double (PyObject *obj, double *val)
  52332. -{
  52333. - int res = SWIG_TypeError;
  52334. - if (PyFloat_Check(obj)) {
  52335. - if (val) *val = PyFloat_AsDouble(obj);
  52336. - return SWIG_OK;
  52337. - } else if (PyInt_Check(obj)) {
  52338. - if (val) *val = PyInt_AsLong(obj);
  52339. - return SWIG_OK;
  52340. - } else if (PyLong_Check(obj)) {
  52341. - double v = PyLong_AsDouble(obj);
  52342. - if (!PyErr_Occurred()) {
  52343. - if (val) *val = v;
  52344. - return SWIG_OK;
  52345. - } else {
  52346. - PyErr_Clear();
  52347. - }
  52348. - }
  52349. -#ifdef SWIG_PYTHON_CAST_MODE
  52350. - {
  52351. - int dispatch = 0;
  52352. - double d = PyFloat_AsDouble(obj);
  52353. - if (!PyErr_Occurred()) {
  52354. - if (val) *val = d;
  52355. - return SWIG_AddCast(SWIG_OK);
  52356. - } else {
  52357. - PyErr_Clear();
  52358. - }
  52359. - if (!dispatch) {
  52360. - long v = PyLong_AsLong(obj);
  52361. - if (!PyErr_Occurred()) {
  52362. - if (val) *val = v;
  52363. - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
  52364. - } else {
  52365. - PyErr_Clear();
  52366. - }
  52367. - }
  52368. - }
  52369. -#endif
  52370. - return res;
  52371. -}
  52372. -
  52373. -
  52374. -#include <float.h>
  52375. -
  52376. -
  52377. -#include <math.h>
  52378. -
  52379. -
  52380. -SWIGINTERNINLINE int
  52381. -SWIG_CanCastAsInteger(double *d, double min, double max) {
  52382. - double x = *d;
  52383. - if ((min <= x && x <= max)) {
  52384. - double fx = floor(x);
  52385. - double cx = ceil(x);
  52386. - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  52387. - if ((errno == EDOM) || (errno == ERANGE)) {
  52388. - errno = 0;
  52389. - } else {
  52390. - double summ, reps, diff;
  52391. - if (rd < x) {
  52392. - diff = x - rd;
  52393. - } else if (rd > x) {
  52394. - diff = rd - x;
  52395. - } else {
  52396. - return 1;
  52397. - }
  52398. - summ = rd + x;
  52399. - reps = diff/summ;
  52400. - if (reps < 8*DBL_EPSILON) {
  52401. - *d = rd;
  52402. - return 1;
  52403. - }
  52404. - }
  52405. - }
  52406. - return 0;
  52407. -}
  52408. -
  52409. -
  52410. -SWIGINTERN int
  52411. -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
  52412. -{
  52413. -#if PY_VERSION_HEX < 0x03000000
  52414. - if (PyInt_Check(obj)) {
  52415. - long v = PyInt_AsLong(obj);
  52416. - if (v >= 0) {
  52417. - if (val) *val = v;
  52418. - return SWIG_OK;
  52419. - } else {
  52420. - return SWIG_OverflowError;
  52421. - }
  52422. - } else
  52423. -#endif
  52424. - if (PyLong_Check(obj)) {
  52425. - unsigned long v = PyLong_AsUnsignedLong(obj);
  52426. - if (!PyErr_Occurred()) {
  52427. - if (val) *val = v;
  52428. - return SWIG_OK;
  52429. - } else {
  52430. - PyErr_Clear();
  52431. -#if PY_VERSION_HEX >= 0x03000000
  52432. - {
  52433. - long v = PyLong_AsLong(obj);
  52434. - if (!PyErr_Occurred()) {
  52435. - if (v < 0) {
  52436. - return SWIG_OverflowError;
  52437. - }
  52438. - } else {
  52439. - PyErr_Clear();
  52440. - }
  52441. - }
  52442. -#endif
  52443. - }
  52444. - }
  52445. -#ifdef SWIG_PYTHON_CAST_MODE
  52446. - {
  52447. - int dispatch = 0;
  52448. - unsigned long v = PyLong_AsUnsignedLong(obj);
  52449. - if (!PyErr_Occurred()) {
  52450. - if (val) *val = v;
  52451. - return SWIG_AddCast(SWIG_OK);
  52452. - } else {
  52453. - PyErr_Clear();
  52454. - }
  52455. - if (!dispatch) {
  52456. - double d;
  52457. - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  52458. - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
  52459. - if (val) *val = (unsigned long)(d);
  52460. - return res;
  52461. - }
  52462. - }
  52463. - }
  52464. -#endif
  52465. - return SWIG_TypeError;
  52466. -}
  52467. -
  52468. -
  52469. -SWIGINTERNINLINE int
  52470. -SWIG_AsVal_size_t (PyObject * obj, size_t *val)
  52471. -{
  52472. - unsigned long v;
  52473. - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
  52474. - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  52475. - return res;
  52476. -}
  52477. -
  52478. -
  52479. - #define SWIG_From_long PyLong_FromLong
  52480. -
  52481. -
  52482. -SWIGINTERNINLINE PyObject *
  52483. -SWIG_From_ptrdiff_t (ptrdiff_t value)
  52484. -{
  52485. - return SWIG_From_long (static_cast< long >(value));
  52486. -}
  52487. -
  52488. -
  52489. -SWIGINTERNINLINE PyObject*
  52490. - SWIG_From_bool (bool value)
  52491. -{
  52492. - return PyBool_FromLong(value ? 1 : 0);
  52493. -}
  52494. -
  52495. -
  52496. -SWIGINTERN int
  52497. -SWIG_AsVal_long (PyObject *obj, long* val)
  52498. -{
  52499. - if (PyInt_Check(obj)) {
  52500. - if (val) *val = PyInt_AsLong(obj);
  52501. - return SWIG_OK;
  52502. - } else if (PyLong_Check(obj)) {
  52503. - long v = PyLong_AsLong(obj);
  52504. - if (!PyErr_Occurred()) {
  52505. - if (val) *val = v;
  52506. - return SWIG_OK;
  52507. - } else {
  52508. - PyErr_Clear();
  52509. - }
  52510. - }
  52511. -#ifdef SWIG_PYTHON_CAST_MODE
  52512. - {
  52513. - int dispatch = 0;
  52514. - long v = PyInt_AsLong(obj);
  52515. - if (!PyErr_Occurred()) {
  52516. - if (val) *val = v;
  52517. - return SWIG_AddCast(SWIG_OK);
  52518. - } else {
  52519. - PyErr_Clear();
  52520. - }
  52521. - if (!dispatch) {
  52522. - double d;
  52523. - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  52524. - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  52525. - if (val) *val = (long)(d);
  52526. - return res;
  52527. - }
  52528. - }
  52529. - }
  52530. -#endif
  52531. - return SWIG_TypeError;
  52532. -}
  52533. -
  52534. -
  52535. -SWIGINTERNINLINE int
  52536. -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
  52537. -{
  52538. - long v;
  52539. - int res = SWIG_AsVal_long (obj, val ? &v : 0);
  52540. - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
  52541. - return res;
  52542. -}
  52543. -
  52544. -
  52545. -#include <stdexcept>
  52546. -
  52547. -
  52548. -#include <algorithm>
  52549. -
  52550. -
  52551. -#include <list>
  52552. -
  52553. -
  52554. -#include <complex>
  52555. -
  52556. -
  52557. -#include <vector>
  52558. -
  52559. -
  52560. -#include <string>
  52561. -
  52562. -
  52563. -namespace swig {
  52564. - template <class Type>
  52565. - struct noconst_traits {
  52566. - typedef Type noconst_type;
  52567. - };
  52568. -
  52569. - template <class Type>
  52570. - struct noconst_traits<const Type> {
  52571. - typedef Type noconst_type;
  52572. - };
  52573. -
  52574. - /*
  52575. - type categories
  52576. - */
  52577. - struct pointer_category { };
  52578. - struct value_category { };
  52579. -
  52580. - /*
  52581. - General traits that provides type_name and type_info
  52582. - */
  52583. - template <class Type> struct traits { };
  52584. -
  52585. - template <class Type>
  52586. - inline const char* type_name() {
  52587. - return traits<typename noconst_traits<Type >::noconst_type >::type_name();
  52588. - }
  52589. -
  52590. - template <class Type>
  52591. - struct traits_info {
  52592. - static swig_type_info *type_query(std::string name) {
  52593. - name += " *";
  52594. - return SWIG_TypeQuery(name.c_str());
  52595. - }
  52596. - static swig_type_info *type_info() {
  52597. - static swig_type_info *info = type_query(type_name<Type>());
  52598. - return info;
  52599. - }
  52600. - };
  52601. -
  52602. - template <class Type>
  52603. - inline swig_type_info *type_info() {
  52604. - return traits_info<Type>::type_info();
  52605. - }
  52606. -
  52607. - /*
  52608. - Partial specialization for pointers
  52609. - */
  52610. - template <class Type> struct traits <Type *> {
  52611. - typedef pointer_category category;
  52612. - static std::string make_ptr_name(const char* name) {
  52613. - std::string ptrname = name;
  52614. - ptrname += " *";
  52615. - return ptrname;
  52616. - }
  52617. - static const char* type_name() {
  52618. - static std::string name = make_ptr_name(swig::type_name<Type>());
  52619. - return name.c_str();
  52620. - }
  52621. - };
  52622. -
  52623. - template <class Type, class Category>
  52624. - struct traits_as { };
  52625. -
  52626. - template <class Type, class Category>
  52627. - struct traits_check { };
  52628. -
  52629. -}
  52630. -
  52631. -
  52632. -namespace swig {
  52633. - /*
  52634. - Traits that provides the from method
  52635. - */
  52636. - template <class Type> struct traits_from_ptr {
  52637. - static PyObject *from(Type *val, int owner = 0) {
  52638. - return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
  52639. - }
  52640. - };
  52641. -
  52642. - template <class Type> struct traits_from {
  52643. - static PyObject *from(const Type& val) {
  52644. - return traits_from_ptr<Type>::from(new Type(val), 1);
  52645. - }
  52646. - };
  52647. -
  52648. - template <class Type> struct traits_from<Type *> {
  52649. - static PyObject *from(Type* val) {
  52650. - return traits_from_ptr<Type>::from(val, 0);
  52651. - }
  52652. - };
  52653. -
  52654. - template <class Type> struct traits_from<const Type *> {
  52655. - static PyObject *from(const Type* val) {
  52656. - return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
  52657. - }
  52658. - };
  52659. -
  52660. -
  52661. - template <class Type>
  52662. - inline PyObject *from(const Type& val) {
  52663. - return traits_from<Type>::from(val);
  52664. - }
  52665. -
  52666. - template <class Type>
  52667. - inline PyObject *from_ptr(Type* val, int owner) {
  52668. - return traits_from_ptr<Type>::from(val, owner);
  52669. - }
  52670. -
  52671. - /*
  52672. - Traits that provides the asval/as/check method
  52673. - */
  52674. - template <class Type>
  52675. - struct traits_asptr {
  52676. - static int asptr(PyObject *obj, Type **val) {
  52677. - Type *p;
  52678. - int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
  52679. - if (SWIG_IsOK(res)) {
  52680. - if (val) *val = p;
  52681. - }
  52682. - return res;
  52683. - }
  52684. - };
  52685. -
  52686. - template <class Type>
  52687. - inline int asptr(PyObject *obj, Type **vptr) {
  52688. - return traits_asptr<Type>::asptr(obj, vptr);
  52689. - }
  52690. -
  52691. - template <class Type>
  52692. - struct traits_asval {
  52693. - static int asval(PyObject *obj, Type *val) {
  52694. - if (val) {
  52695. - Type *p = 0;
  52696. - int res = traits_asptr<Type>::asptr(obj, &p);
  52697. - if (!SWIG_IsOK(res)) return res;
  52698. - if (p) {
  52699. - typedef typename noconst_traits<Type>::noconst_type noconst_type;
  52700. - *(const_cast<noconst_type*>(val)) = *p;
  52701. - if (SWIG_IsNewObj(res)){
  52702. - delete p;
  52703. - res = SWIG_DelNewMask(res);
  52704. - }
  52705. - return res;
  52706. - } else {
  52707. - return SWIG_ERROR;
  52708. - }
  52709. - } else {
  52710. - return traits_asptr<Type>::asptr(obj, (Type **)(0));
  52711. - }
  52712. - }
  52713. - };
  52714. -
  52715. - template <class Type> struct traits_asval<Type*> {
  52716. - static int asval(PyObject *obj, Type **val) {
  52717. - if (val) {
  52718. - typedef typename noconst_traits<Type>::noconst_type noconst_type;
  52719. - noconst_type *p = 0;
  52720. - int res = traits_asptr<noconst_type>::asptr(obj, &p);
  52721. - if (SWIG_IsOK(res)) {
  52722. - *(const_cast<noconst_type**>(val)) = p;
  52723. - }
  52724. - return res;
  52725. - } else {
  52726. - return traits_asptr<Type>::asptr(obj, (Type **)(0));
  52727. - }
  52728. - }
  52729. - };
  52730. -
  52731. - template <class Type>
  52732. - inline int asval(PyObject *obj, Type *val) {
  52733. - return traits_asval<Type>::asval(obj, val);
  52734. - }
  52735. -
  52736. - template <class Type>
  52737. - struct traits_as<Type, value_category> {
  52738. - static Type as(PyObject *obj, bool throw_error) {
  52739. - Type v;
  52740. - int res = asval(obj, &v);
  52741. - if (!obj || !SWIG_IsOK(res)) {
  52742. - if (!PyErr_Occurred()) {
  52743. - ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  52744. - }
  52745. - if (throw_error) throw std::invalid_argument("bad type");
  52746. - }
  52747. - return v;
  52748. - }
  52749. - };
  52750. -
  52751. - template <class Type>
  52752. - struct traits_as<Type, pointer_category> {
  52753. - static Type as(PyObject *obj, bool throw_error) {
  52754. - Type *v = 0;
  52755. - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
  52756. - if (SWIG_IsOK(res) && v) {
  52757. - if (SWIG_IsNewObj(res)) {
  52758. - Type r(*v);
  52759. - delete v;
  52760. - return r;
  52761. - } else {
  52762. - return *v;
  52763. - }
  52764. - } else {
  52765. - // Uninitialized return value, no Type() constructor required.
  52766. - static Type *v_def = (Type*) malloc(sizeof(Type));
  52767. - if (!PyErr_Occurred()) {
  52768. - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  52769. - }
  52770. - if (throw_error) throw std::invalid_argument("bad type");
  52771. - memset(v_def,0,sizeof(Type));
  52772. - return *v_def;
  52773. - }
  52774. - }
  52775. - };
  52776. -
  52777. - template <class Type>
  52778. - struct traits_as<Type*, pointer_category> {
  52779. - static Type* as(PyObject *obj, bool throw_error) {
  52780. - Type *v = 0;
  52781. - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
  52782. - if (SWIG_IsOK(res)) {
  52783. - return v;
  52784. - } else {
  52785. - if (!PyErr_Occurred()) {
  52786. - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  52787. - }
  52788. - if (throw_error) throw std::invalid_argument("bad type");
  52789. - return 0;
  52790. - }
  52791. - }
  52792. - };
  52793. -
  52794. - template <class Type>
  52795. - inline Type as(PyObject *obj, bool te = false) {
  52796. - return traits_as<Type, typename traits<Type>::category>::as(obj, te);
  52797. - }
  52798. -
  52799. - template <class Type>
  52800. - struct traits_check<Type, value_category> {
  52801. - static bool check(PyObject *obj) {
  52802. - int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
  52803. - return SWIG_IsOK(res) ? true : false;
  52804. - }
  52805. - };
  52806. -
  52807. - template <class Type>
  52808. - struct traits_check<Type, pointer_category> {
  52809. - static bool check(PyObject *obj) {
  52810. - int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
  52811. - return SWIG_IsOK(res) ? true : false;
  52812. - }
  52813. - };
  52814. -
  52815. - template <class Type>
  52816. - inline bool check(PyObject *obj) {
  52817. - return traits_check<Type, typename traits<Type>::category>::check(obj);
  52818. - }
  52819. -}
  52820. -
  52821. -
  52822. -#include <functional>
  52823. -
  52824. -namespace std {
  52825. - template <>
  52826. - struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
  52827. - {
  52828. - bool
  52829. - operator()(PyObject * v, PyObject *w) const
  52830. - {
  52831. - bool res;
  52832. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  52833. - res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
  52834. - /* This may fall into a case of inconsistent
  52835. - eg. ObjA > ObjX > ObjB
  52836. - but ObjA < ObjB
  52837. - */
  52838. - if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
  52839. - {
  52840. - /* Objects can't be compared, this mostly occurred in Python 3.0 */
  52841. - /* Compare their ptr directly for a workaround */
  52842. - res = (v < w);
  52843. - PyErr_Clear();
  52844. - }
  52845. - SWIG_PYTHON_THREAD_END_BLOCK;
  52846. - return res;
  52847. - }
  52848. - };
  52849. -
  52850. - template <>
  52851. - struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
  52852. - {
  52853. - bool
  52854. - operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
  52855. - {
  52856. - return std::less<PyObject *>()(v, w);
  52857. - }
  52858. - };
  52859. -
  52860. - template <>
  52861. - struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
  52862. - {
  52863. - bool
  52864. - operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
  52865. - {
  52866. - return std::less<PyObject *>()(v, w);
  52867. - }
  52868. - };
  52869. -
  52870. -}
  52871. -
  52872. -namespace swig {
  52873. - template <> struct traits<PyObject *> {
  52874. - typedef value_category category;
  52875. - static const char* type_name() { return "PyObject *"; }
  52876. - };
  52877. -
  52878. - template <> struct traits_asval<PyObject * > {
  52879. - typedef PyObject * value_type;
  52880. - static int asval(PyObject *obj, value_type *val) {
  52881. - if (val) *val = obj;
  52882. - return SWIG_OK;
  52883. - }
  52884. - };
  52885. -
  52886. - template <>
  52887. - struct traits_check<PyObject *, value_category> {
  52888. - static bool check(PyObject *) {
  52889. - return true;
  52890. - }
  52891. - };
  52892. -
  52893. - template <> struct traits_from<PyObject *> {
  52894. - typedef PyObject * value_type;
  52895. - static PyObject *from(const value_type& val) {
  52896. - Py_XINCREF(val);
  52897. - return val;
  52898. - }
  52899. - };
  52900. -
  52901. -}
  52902. -
  52903. -namespace swig {
  52904. - template <class Difference>
  52905. - inline size_t
  52906. - check_index(Difference i, size_t size, bool insert = false) {
  52907. - if ( i < 0 ) {
  52908. - if ((size_t) (-i) <= size)
  52909. - return (size_t) (i + size);
  52910. - } else if ( (size_t) i < size ) {
  52911. - return (size_t) i;
  52912. - } else if (insert && ((size_t) i == size)) {
  52913. - return size;
  52914. - }
  52915. - throw std::out_of_range("index out of range");
  52916. - }
  52917. -
  52918. - template <class Difference>
  52919. - void
  52920. - slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
  52921. - if (step == 0) {
  52922. - throw std::invalid_argument("slice step cannot be zero");
  52923. - } else if (step > 0) {
  52924. - // Required range: 0 <= i < size, 0 <= j < size
  52925. - if (i < 0) {
  52926. - ii = 0;
  52927. - } else if (i < (Difference)size) {
  52928. - ii = i;
  52929. - } else if (insert && (i >= (Difference)size)) {
  52930. - ii = (Difference)size;
  52931. - }
  52932. - if ( j < 0 ) {
  52933. - jj = 0;
  52934. - } else {
  52935. - jj = (j < (Difference)size) ? j : (Difference)size;
  52936. - }
  52937. - } else {
  52938. - // Required range: -1 <= i < size-1, -1 <= j < size-1
  52939. - if (i < -1) {
  52940. - ii = -1;
  52941. - } else if (i < (Difference) size) {
  52942. - ii = i;
  52943. - } else if (i >= (Difference)(size-1)) {
  52944. - ii = (Difference)(size-1);
  52945. - }
  52946. - if (j < -1) {
  52947. - jj = -1;
  52948. - } else {
  52949. - jj = (j < (Difference)size ) ? j : (Difference)(size-1);
  52950. - }
  52951. - }
  52952. - }
  52953. -
  52954. - template <class Sequence, class Difference>
  52955. - inline typename Sequence::iterator
  52956. - getpos(Sequence* self, Difference i) {
  52957. - typename Sequence::iterator pos = self->begin();
  52958. - std::advance(pos, check_index(i,self->size()));
  52959. - return pos;
  52960. - }
  52961. -
  52962. - template <class Sequence, class Difference>
  52963. - inline typename Sequence::const_iterator
  52964. - cgetpos(const Sequence* self, Difference i) {
  52965. - typename Sequence::const_iterator pos = self->begin();
  52966. - std::advance(pos, check_index(i,self->size()));
  52967. - return pos;
  52968. - }
  52969. -
  52970. - template <class Sequence, class Difference>
  52971. - inline Sequence*
  52972. - getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
  52973. - typename Sequence::size_type size = self->size();
  52974. - Difference ii = 0;
  52975. - Difference jj = 0;
  52976. - swig::slice_adjust(i, j, step, size, ii, jj);
  52977. -
  52978. - if (step > 0) {
  52979. - typename Sequence::const_iterator sb = self->begin();
  52980. - typename Sequence::const_iterator se = self->begin();
  52981. - std::advance(sb,ii);
  52982. - std::advance(se,jj);
  52983. - if (step == 1) {
  52984. - return new Sequence(sb, se);
  52985. - } else {
  52986. - Sequence *sequence = new Sequence();
  52987. - typename Sequence::const_iterator it = sb;
  52988. - while (it!=se) {
  52989. - sequence->push_back(*it);
  52990. - for (Py_ssize_t c=0; c<step && it!=se; ++c)
  52991. - it++;
  52992. - }
  52993. - return sequence;
  52994. - }
  52995. - } else {
  52996. - Sequence *sequence = new Sequence();
  52997. - if (ii > jj) {
  52998. - typename Sequence::const_reverse_iterator sb = self->rbegin();
  52999. - typename Sequence::const_reverse_iterator se = self->rbegin();
  53000. - std::advance(sb,size-ii-1);
  53001. - std::advance(se,size-jj-1);
  53002. - typename Sequence::const_reverse_iterator it = sb;
  53003. - while (it!=se) {
  53004. - sequence->push_back(*it);
  53005. - for (Py_ssize_t c=0; c<-step && it!=se; ++c)
  53006. - it++;
  53007. - }
  53008. - }
  53009. - return sequence;
  53010. - }
  53011. - }
  53012. -
  53013. - template <class Sequence, class Difference, class InputSeq>
  53014. - inline void
  53015. - setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
  53016. - typename Sequence::size_type size = self->size();
  53017. - Difference ii = 0;
  53018. - Difference jj = 0;
  53019. - swig::slice_adjust(i, j, step, size, ii, jj, true);
  53020. - if (step > 0) {
  53021. - if (jj < ii)
  53022. - jj = ii;
  53023. - if (step == 1) {
  53024. - size_t ssize = jj - ii;
  53025. - if (ssize <= is.size()) {
  53026. - // expanding/staying the same size
  53027. - typename Sequence::iterator sb = self->begin();
  53028. - typename InputSeq::const_iterator isit = is.begin();
  53029. - std::advance(sb,ii);
  53030. - std::advance(isit, jj - ii);
  53031. - self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
  53032. - } else {
  53033. - // shrinking
  53034. - typename Sequence::iterator sb = self->begin();
  53035. - typename Sequence::iterator se = self->begin();
  53036. - std::advance(sb,ii);
  53037. - std::advance(se,jj);
  53038. - self->erase(sb,se);
  53039. - sb = self->begin();
  53040. - std::advance(sb,ii);
  53041. - self->insert(sb, is.begin(), is.end());
  53042. - }
  53043. - } else {
  53044. - size_t replacecount = (jj - ii + step - 1) / step;
  53045. - if (is.size() != replacecount) {
  53046. - char msg[1024];
  53047. - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
  53048. - throw std::invalid_argument(msg);
  53049. - }
  53050. - typename Sequence::const_iterator isit = is.begin();
  53051. - typename Sequence::iterator it = self->begin();
  53052. - std::advance(it,ii);
  53053. - for (size_t rc=0; rc<replacecount; ++rc) {
  53054. - *it++ = *isit++;
  53055. - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
  53056. - it++;
  53057. - }
  53058. - }
  53059. - } else {
  53060. - if (jj > ii)
  53061. - jj = ii;
  53062. - size_t replacecount = (ii - jj - step - 1) / -step;
  53063. - if (is.size() != replacecount) {
  53064. - char msg[1024];
  53065. - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
  53066. - throw std::invalid_argument(msg);
  53067. - }
  53068. - typename Sequence::const_iterator isit = is.begin();
  53069. - typename Sequence::reverse_iterator it = self->rbegin();
  53070. - std::advance(it,size-ii-1);
  53071. - for (size_t rc=0; rc<replacecount; ++rc) {
  53072. - *it++ = *isit++;
  53073. - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
  53074. - it++;
  53075. - }
  53076. - }
  53077. - }
  53078. -
  53079. - template <class Sequence, class Difference>
  53080. - inline void
  53081. - delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
  53082. - typename Sequence::size_type size = self->size();
  53083. - Difference ii = 0;
  53084. - Difference jj = 0;
  53085. - swig::slice_adjust(i, j, step, size, ii, jj, true);
  53086. - if (step > 0) {
  53087. - if (jj > ii) {
  53088. - typename Sequence::iterator sb = self->begin();
  53089. - std::advance(sb,ii);
  53090. - if (step == 1) {
  53091. - typename Sequence::iterator se = self->begin();
  53092. - std::advance(se,jj);
  53093. - self->erase(sb,se);
  53094. - } else {
  53095. - typename Sequence::iterator it = sb;
  53096. - size_t delcount = (jj - ii + step - 1) / step;
  53097. - while (delcount) {
  53098. - it = self->erase(it);
  53099. - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
  53100. - it++;
  53101. - delcount--;
  53102. - }
  53103. - }
  53104. - }
  53105. - } else {
  53106. - if (ii > jj) {
  53107. - typename Sequence::reverse_iterator sb = self->rbegin();
  53108. - std::advance(sb,size-ii-1);
  53109. - typename Sequence::reverse_iterator it = sb;
  53110. - size_t delcount = (ii - jj - step - 1) / -step;
  53111. - while (delcount) {
  53112. - it = typename Sequence::reverse_iterator(self->erase((++it).base()));
  53113. - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
  53114. - it++;
  53115. - delcount--;
  53116. - }
  53117. - }
  53118. - }
  53119. - }
  53120. -}
  53121. -
  53122. -
  53123. -#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
  53124. -# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
  53125. -# define SWIG_STD_NOITERATOR_TRAITS_STL
  53126. -# endif
  53127. -#endif
  53128. -
  53129. -#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
  53130. -#include <iterator>
  53131. -#else
  53132. -namespace std {
  53133. - template <class Iterator>
  53134. - struct iterator_traits {
  53135. - typedef ptrdiff_t difference_type;
  53136. - typedef typename Iterator::value_type value_type;
  53137. - };
  53138. -
  53139. - template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
  53140. - struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
  53141. - typedef Distance difference_type;
  53142. - typedef T value_type;
  53143. - };
  53144. -
  53145. - template <class T>
  53146. - struct iterator_traits<T*> {
  53147. - typedef T value_type;
  53148. - typedef ptrdiff_t difference_type;
  53149. - };
  53150. -
  53151. - template<typename _InputIterator>
  53152. - inline typename iterator_traits<_InputIterator>::difference_type
  53153. - distance(_InputIterator __first, _InputIterator __last)
  53154. - {
  53155. - typename iterator_traits<_InputIterator>::difference_type __n = 0;
  53156. - while (__first != __last) {
  53157. - ++__first; ++__n;
  53158. - }
  53159. - return __n;
  53160. - }
  53161. -}
  53162. -#endif
  53163. -
  53164. -
  53165. -namespace swig {
  53166. - template<typename OutIterator>
  53167. - class SwigPyIterator_T : public SwigPyIterator
  53168. - {
  53169. - public:
  53170. - typedef OutIterator out_iterator;
  53171. - typedef typename std::iterator_traits<out_iterator>::value_type value_type;
  53172. - typedef SwigPyIterator_T<out_iterator> self_type;
  53173. -
  53174. - SwigPyIterator_T(out_iterator curr, PyObject *seq)
  53175. - : SwigPyIterator(seq), current(curr)
  53176. - {
  53177. - }
  53178. -
  53179. - const out_iterator& get_current() const
  53180. - {
  53181. - return current;
  53182. - }
  53183. -
  53184. -
  53185. - bool equal (const SwigPyIterator &iter) const
  53186. - {
  53187. - const self_type *iters = dynamic_cast<const self_type *>(&iter);
  53188. - if (iters) {
  53189. - return (current == iters->get_current());
  53190. - } else {
  53191. - throw std::invalid_argument("bad iterator type");
  53192. - }
  53193. - }
  53194. -
  53195. - ptrdiff_t distance(const SwigPyIterator &iter) const
  53196. - {
  53197. - const self_type *iters = dynamic_cast<const self_type *>(&iter);
  53198. - if (iters) {
  53199. - return std::distance(current, iters->get_current());
  53200. - } else {
  53201. - throw std::invalid_argument("bad iterator type");
  53202. - }
  53203. - }
  53204. -
  53205. - protected:
  53206. - out_iterator current;
  53207. - };
  53208. -
  53209. - template <class ValueType>
  53210. - struct from_oper
  53211. - {
  53212. - typedef const ValueType& argument_type;
  53213. - typedef PyObject *result_type;
  53214. - result_type operator()(argument_type v) const
  53215. - {
  53216. - return swig::from(v);
  53217. - }
  53218. - };
  53219. -
  53220. - template<typename OutIterator,
  53221. - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
  53222. - typename FromOper = from_oper<ValueType> >
  53223. - class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
  53224. - {
  53225. - public:
  53226. - FromOper from;
  53227. - typedef OutIterator out_iterator;
  53228. - typedef ValueType value_type;
  53229. - typedef SwigPyIterator_T<out_iterator> base;
  53230. - typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
  53231. -
  53232. - SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
  53233. - : SwigPyIterator_T<OutIterator>(curr, seq)
  53234. - {
  53235. - }
  53236. -
  53237. - PyObject *value() const {
  53238. - return from(static_cast<const value_type&>(*(base::current)));
  53239. - }
  53240. -
  53241. - SwigPyIterator *copy() const
  53242. - {
  53243. - return new self_type(*this);
  53244. - }
  53245. -
  53246. - SwigPyIterator *incr(size_t n = 1)
  53247. - {
  53248. - while (n--) {
  53249. - ++base::current;
  53250. - }
  53251. - return this;
  53252. - }
  53253. -
  53254. - SwigPyIterator *decr(size_t n = 1)
  53255. - {
  53256. - while (n--) {
  53257. - --base::current;
  53258. - }
  53259. - return this;
  53260. - }
  53261. - };
  53262. -
  53263. - template<typename OutIterator,
  53264. - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
  53265. - typename FromOper = from_oper<ValueType> >
  53266. - class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator>
  53267. - {
  53268. - public:
  53269. - FromOper from;
  53270. - typedef OutIterator out_iterator;
  53271. - typedef ValueType value_type;
  53272. - typedef SwigPyIterator_T<out_iterator> base;
  53273. - typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
  53274. -
  53275. - SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
  53276. - : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
  53277. - {
  53278. - }
  53279. -
  53280. - PyObject *value() const {
  53281. - if (base::current == end) {
  53282. - throw stop_iteration();
  53283. - } else {
  53284. - return from(static_cast<const value_type&>(*(base::current)));
  53285. - }
  53286. - }
  53287. -
  53288. - SwigPyIterator *copy() const
  53289. - {
  53290. - return new self_type(*this);
  53291. - }
  53292. -
  53293. - SwigPyIterator *incr(size_t n = 1)
  53294. - {
  53295. - while (n--) {
  53296. - if (base::current == end) {
  53297. - throw stop_iteration();
  53298. - } else {
  53299. - ++base::current;
  53300. - }
  53301. - }
  53302. - return this;
  53303. - }
  53304. -
  53305. - SwigPyIterator *decr(size_t n = 1)
  53306. - {
  53307. - while (n--) {
  53308. - if (base::current == begin) {
  53309. - throw stop_iteration();
  53310. - } else {
  53311. - --base::current;
  53312. - }
  53313. - }
  53314. - return this;
  53315. - }
  53316. -
  53317. - private:
  53318. - out_iterator begin;
  53319. - out_iterator end;
  53320. - };
  53321. -
  53322. - template<typename OutIter>
  53323. - inline SwigPyIterator*
  53324. - make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
  53325. - {
  53326. - return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
  53327. - }
  53328. -
  53329. - template<typename OutIter>
  53330. - inline SwigPyIterator*
  53331. - make_output_iterator(const OutIter& current, PyObject *seq = 0)
  53332. - {
  53333. - return new SwigPyIteratorOpen_T<OutIter>(current, seq);
  53334. - }
  53335. -
  53336. -}
  53337. -
  53338. -
  53339. -namespace swig
  53340. -{
  53341. - template <class T>
  53342. - struct SwigPySequence_Ref
  53343. - {
  53344. - SwigPySequence_Ref(PyObject* seq, int index)
  53345. - : _seq(seq), _index(index)
  53346. - {
  53347. - }
  53348. -
  53349. - operator T () const
  53350. - {
  53351. - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
  53352. - try {
  53353. - return swig::as<T>(item, true);
  53354. - } catch (std::exception& e) {
  53355. - char msg[1024];
  53356. - sprintf(msg, "in sequence element %d ", _index);
  53357. - if (!PyErr_Occurred()) {
  53358. - ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
  53359. - }
  53360. - SWIG_Python_AddErrorMsg(msg);
  53361. - SWIG_Python_AddErrorMsg(e.what());
  53362. - throw;
  53363. - }
  53364. - }
  53365. -
  53366. - SwigPySequence_Ref& operator=(const T& v)
  53367. - {
  53368. - PySequence_SetItem(_seq, _index, swig::from<T>(v));
  53369. - return *this;
  53370. - }
  53371. -
  53372. - private:
  53373. - PyObject* _seq;
  53374. - int _index;
  53375. - };
  53376. -
  53377. - template <class T>
  53378. - struct SwigPySequence_ArrowProxy
  53379. - {
  53380. - SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
  53381. - const T* operator->() const { return &m_value; }
  53382. - operator const T*() const { return &m_value; }
  53383. - T m_value;
  53384. - };
  53385. -
  53386. - template <class T, class Reference >
  53387. - struct SwigPySequence_InputIterator
  53388. - {
  53389. - typedef SwigPySequence_InputIterator<T, Reference > self;
  53390. -
  53391. - typedef std::random_access_iterator_tag iterator_category;
  53392. - typedef Reference reference;
  53393. - typedef T value_type;
  53394. - typedef T* pointer;
  53395. - typedef int difference_type;
  53396. -
  53397. - SwigPySequence_InputIterator()
  53398. - {
  53399. - }
  53400. -
  53401. - SwigPySequence_InputIterator(PyObject* seq, int index)
  53402. - : _seq(seq), _index(index)
  53403. - {
  53404. - }
  53405. -
  53406. - reference operator*() const
  53407. - {
  53408. - return reference(_seq, _index);
  53409. - }
  53410. -
  53411. - SwigPySequence_ArrowProxy<T>
  53412. - operator->() const {
  53413. - return SwigPySequence_ArrowProxy<T>(operator*());
  53414. - }
  53415. -
  53416. - bool operator==(const self& ri) const
  53417. - {
  53418. - return (_index == ri._index) && (_seq == ri._seq);
  53419. - }
  53420. -
  53421. - bool operator!=(const self& ri) const
  53422. - {
  53423. - return !(operator==(ri));
  53424. - }
  53425. -
  53426. - self& operator ++ ()
  53427. - {
  53428. - ++_index;
  53429. - return *this;
  53430. - }
  53431. -
  53432. - self& operator -- ()
  53433. - {
  53434. - --_index;
  53435. - return *this;
  53436. - }
  53437. -
  53438. - self& operator += (difference_type n)
  53439. - {
  53440. - _index += n;
  53441. - return *this;
  53442. - }
  53443. -
  53444. - self operator +(difference_type n) const
  53445. - {
  53446. - return self(_seq, _index + n);
  53447. - }
  53448. -
  53449. - self& operator -= (difference_type n)
  53450. - {
  53451. - _index -= n;
  53452. - return *this;
  53453. - }
  53454. -
  53455. - self operator -(difference_type n) const
  53456. - {
  53457. - return self(_seq, _index - n);
  53458. - }
  53459. -
  53460. - difference_type operator - (const self& ri) const
  53461. - {
  53462. - return _index - ri._index;
  53463. - }
  53464. -
  53465. - bool operator < (const self& ri) const
  53466. - {
  53467. - return _index < ri._index;
  53468. - }
  53469. -
  53470. - reference
  53471. - operator[](difference_type n) const
  53472. - {
  53473. - return reference(_seq, _index + n);
  53474. - }
  53475. -
  53476. - private:
  53477. - PyObject* _seq;
  53478. - difference_type _index;
  53479. - };
  53480. -
  53481. - template <class T>
  53482. - struct SwigPySequence_Cont
  53483. - {
  53484. - typedef SwigPySequence_Ref<T> reference;
  53485. - typedef const SwigPySequence_Ref<T> const_reference;
  53486. - typedef T value_type;
  53487. - typedef T* pointer;
  53488. - typedef int difference_type;
  53489. - typedef int size_type;
  53490. - typedef const pointer const_pointer;
  53491. - typedef SwigPySequence_InputIterator<T, reference> iterator;
  53492. - typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;
  53493. -
  53494. - SwigPySequence_Cont(PyObject* seq) : _seq(0)
  53495. - {
  53496. - if (!PySequence_Check(seq)) {
  53497. - throw std::invalid_argument("a sequence is expected");
  53498. - }
  53499. - _seq = seq;
  53500. - Py_INCREF(_seq);
  53501. - }
  53502. -
  53503. - ~SwigPySequence_Cont()
  53504. - {
  53505. - Py_XDECREF(_seq);
  53506. - }
  53507. -
  53508. - size_type size() const
  53509. - {
  53510. - return static_cast<size_type>(PySequence_Size(_seq));
  53511. - }
  53512. -
  53513. - bool empty() const
  53514. - {
  53515. - return size() == 0;
  53516. - }
  53517. -
  53518. - iterator begin()
  53519. - {
  53520. - return iterator(_seq, 0);
  53521. - }
  53522. -
  53523. - const_iterator begin() const
  53524. - {
  53525. - return const_iterator(_seq, 0);
  53526. - }
  53527. -
  53528. - iterator end()
  53529. - {
  53530. - return iterator(_seq, size());
  53531. - }
  53532. -
  53533. - const_iterator end() const
  53534. - {
  53535. - return const_iterator(_seq, size());
  53536. - }
  53537. -
  53538. - reference operator[](difference_type n)
  53539. - {
  53540. - return reference(_seq, n);
  53541. - }
  53542. -
  53543. - const_reference operator[](difference_type n) const
  53544. - {
  53545. - return const_reference(_seq, n);
  53546. - }
  53547. -
  53548. - bool check(bool set_err = true) const
  53549. - {
  53550. - int s = size();
  53551. - for (int i = 0; i < s; ++i) {
  53552. - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
  53553. - if (!swig::check<value_type>(item)) {
  53554. - if (set_err) {
  53555. - char msg[1024];
  53556. - sprintf(msg, "in sequence element %d", i);
  53557. - SWIG_Error(SWIG_RuntimeError, msg);
  53558. - }
  53559. - return false;
  53560. - }
  53561. - }
  53562. - return true;
  53563. - }
  53564. -
  53565. - private:
  53566. - PyObject* _seq;
  53567. - };
  53568. -
  53569. -}
  53570. -
  53571. -
  53572. -#include <limits.h>
  53573. -#if !defined(SWIG_NO_LLONG_MAX)
  53574. -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  53575. -# define LLONG_MAX __LONG_LONG_MAX__
  53576. -# define LLONG_MIN (-LLONG_MAX - 1LL)
  53577. -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  53578. -# endif
  53579. -#endif
  53580. -
  53581. -
  53582. -SWIGINTERN int
  53583. -SWIG_AsVal_int (PyObject * obj, int *val)
  53584. -{
  53585. - long v;
  53586. - int res = SWIG_AsVal_long (obj, &v);
  53587. - if (SWIG_IsOK(res)) {
  53588. - if ((v < INT_MIN || v > INT_MAX)) {
  53589. - return SWIG_OverflowError;
  53590. - } else {
  53591. - if (val) *val = static_cast< int >(v);
  53592. - }
  53593. - }
  53594. - return res;
  53595. -}
  53596. -
  53597. -
  53598. -SWIGINTERNINLINE PyObject*
  53599. - SWIG_From_int (int value)
  53600. -{
  53601. - return PyInt_FromLong((long) value);
  53602. -}
  53603. -
  53604. -
  53605. -namespace swig {
  53606. - template <> struct traits<int > {
  53607. - typedef value_category category;
  53608. - static const char* type_name() { return"int"; }
  53609. - };
  53610. - template <> struct traits_asval<int > {
  53611. - typedef int value_type;
  53612. - static int asval(PyObject *obj, value_type *val) {
  53613. - return SWIG_AsVal_int (obj, val);
  53614. - }
  53615. - };
  53616. - template <> struct traits_from<int > {
  53617. - typedef int value_type;
  53618. - static PyObject *from(const value_type& val) {
  53619. - return SWIG_From_int (val);
  53620. - }
  53621. - };
  53622. -}
  53623. -
  53624. -
  53625. -namespace swig {
  53626. - template <class SwigPySeq, class Seq>
  53627. - inline void
  53628. - assign(const SwigPySeq& swigpyseq, Seq* seq) {
  53629. - // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
  53630. - typedef typename SwigPySeq::value_type value_type;
  53631. - typename SwigPySeq::const_iterator it = swigpyseq.begin();
  53632. - for (;it != swigpyseq.end(); ++it) {
  53633. - seq->insert(seq->end(),(value_type)(*it));
  53634. - }
  53635. - }
  53636. -
  53637. - template <class Seq, class T = typename Seq::value_type >
  53638. - struct traits_asptr_stdseq {
  53639. - typedef Seq sequence;
  53640. - typedef T value_type;
  53641. -
  53642. - static int asptr(PyObject *obj, sequence **seq) {
  53643. - if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
  53644. - sequence *p;
  53645. - if (::SWIG_ConvertPtr(obj,(void**)&p,
  53646. - swig::type_info<sequence>(),0) == SWIG_OK) {
  53647. - if (seq) *seq = p;
  53648. - return SWIG_OLDOBJ;
  53649. - }
  53650. - } else if (PySequence_Check(obj)) {
  53651. - try {
  53652. - SwigPySequence_Cont<value_type> swigpyseq(obj);
  53653. - if (seq) {
  53654. - sequence *pseq = new sequence();
  53655. - assign(swigpyseq, pseq);
  53656. - *seq = pseq;
  53657. - return SWIG_NEWOBJ;
  53658. - } else {
  53659. - return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
  53660. - }
  53661. - } catch (std::exception& e) {
  53662. - if (seq) {
  53663. - if (!PyErr_Occurred()) {
  53664. - PyErr_SetString(PyExc_TypeError, e.what());
  53665. - }
  53666. - }
  53667. - return SWIG_ERROR;
  53668. - }
  53669. - }
  53670. - return SWIG_ERROR;
  53671. - }
  53672. - };
  53673. -
  53674. - template <class Seq, class T = typename Seq::value_type >
  53675. - struct traits_from_stdseq {
  53676. - typedef Seq sequence;
  53677. - typedef T value_type;
  53678. - typedef typename Seq::size_type size_type;
  53679. - typedef typename sequence::const_iterator const_iterator;
  53680. -
  53681. - static PyObject *from(const sequence& seq) {
  53682. -#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
  53683. - swig_type_info *desc = swig::type_info<sequence>();
  53684. - if (desc && desc->clientdata) {
  53685. - return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
  53686. - }
  53687. -#endif
  53688. - size_type size = seq.size();
  53689. - if (size <= (size_type)INT_MAX) {
  53690. - PyObject *obj = PyTuple_New((int)size);
  53691. - int i = 0;
  53692. - for (const_iterator it = seq.begin();
  53693. - it != seq.end(); ++it, ++i) {
  53694. - PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
  53695. - }
  53696. - return obj;
  53697. - } else {
  53698. - PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
  53699. - return NULL;
  53700. - }
  53701. - }
  53702. - };
  53703. -}
  53704. -
  53705. -
  53706. - namespace swig {
  53707. - template <class T>
  53708. - struct traits_asptr<std::vector<T> > {
  53709. - static int asptr(PyObject *obj, std::vector<T> **vec) {
  53710. - return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
  53711. - }
  53712. - };
  53713. -
  53714. - template <class T>
  53715. - struct traits_from<std::vector<T> > {
  53716. - static PyObject *from(const std::vector<T>& vec) {
  53717. - return traits_from_stdseq<std::vector<T> >::from(vec);
  53718. - }
  53719. - };
  53720. - }
  53721. -
  53722. -
  53723. - namespace swig {
  53724. - template <> struct traits<std::vector<int, std::allocator< int > > > {
  53725. - typedef pointer_category category;
  53726. - static const char* type_name() {
  53727. - return "std::vector<" "int" "," "std::allocator< int >" " >";
  53728. - }
  53729. - };
  53730. - }
  53731. -
  53732. -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
  53733. - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
  53734. - }
  53735. -SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
  53736. - return !(self->empty());
  53737. - }
  53738. -SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
  53739. - return !(self->empty());
  53740. - }
  53741. -SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
  53742. - return self->size();
  53743. - }
  53744. -
  53745. -SWIGINTERNINLINE PyObject*
  53746. -SWIG_From_unsigned_SS_long (unsigned long value)
  53747. -{
  53748. - return (value > LONG_MAX) ?
  53749. - PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value));
  53750. -}
  53751. -
  53752. -
  53753. -SWIGINTERNINLINE PyObject *
  53754. -SWIG_From_size_t (size_t value)
  53755. -{
  53756. - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
  53757. -}
  53758. -
  53759. -SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
  53760. - if (self->size() == 0)
  53761. - throw std::out_of_range("pop from empty container");
  53762. - std::vector<int,std::allocator< int > >::value_type x = self->back();
  53763. - self->pop_back();
  53764. - return x;
  53765. - }
  53766. -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
  53767. - return swig::getslice(self, i, j, 1);
  53768. - }
  53769. -SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v=std::vector< int,std::allocator< int > >()){
  53770. - swig::setslice(self, i, j, 1, v);
  53771. - }
  53772. -SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
  53773. - swig::delslice(self, i, j, 1);
  53774. - }
  53775. -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
  53776. - self->erase(swig::getpos(self,i));
  53777. - }
  53778. -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
  53779. - Py_ssize_t i, j, step;
  53780. - if( !PySlice_Check(slice) ) {
  53781. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53782. - return NULL;
  53783. - }
  53784. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53785. - std::vector<int,std::allocator< int > >::difference_type id = i;
  53786. - std::vector<int,std::allocator< int > >::difference_type jd = j;
  53787. - return swig::getslice(self, id, jd, step);
  53788. - }
  53789. -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
  53790. - Py_ssize_t i, j, step;
  53791. - if( !PySlice_Check(slice) ) {
  53792. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53793. - return;
  53794. - }
  53795. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53796. - std::vector<int,std::allocator< int > >::difference_type id = i;
  53797. - std::vector<int,std::allocator< int > >::difference_type jd = j;
  53798. - swig::setslice(self, id, jd, step, v);
  53799. - }
  53800. -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
  53801. - Py_ssize_t i, j, step;
  53802. - if( !PySlice_Check(slice) ) {
  53803. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53804. - return;
  53805. - }
  53806. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53807. - std::vector<int,std::allocator< int > >::difference_type id = i;
  53808. - std::vector<int,std::allocator< int > >::difference_type jd = j;
  53809. - swig::delslice(self, id, jd, step);
  53810. - }
  53811. -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
  53812. - Py_ssize_t i, j, step;
  53813. - if( !PySlice_Check(slice) ) {
  53814. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53815. - return;
  53816. - }
  53817. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53818. - std::vector<int,std::allocator< int > >::difference_type id = i;
  53819. - std::vector<int,std::allocator< int > >::difference_type jd = j;
  53820. - swig::delslice(self, id, jd, step);
  53821. - }
  53822. -SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
  53823. - return *(swig::cgetpos(self, i));
  53824. - }
  53825. -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
  53826. - *(swig::getpos(self,i)) = x;
  53827. - }
  53828. -SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
  53829. - self->push_back(x);
  53830. - }
  53831. -
  53832. - #define SWIG_From_double PyFloat_FromDouble
  53833. -
  53834. -
  53835. -namespace swig {
  53836. - template <> struct traits<double > {
  53837. - typedef value_category category;
  53838. - static const char* type_name() { return"double"; }
  53839. - };
  53840. - template <> struct traits_asval<double > {
  53841. - typedef double value_type;
  53842. - static int asval(PyObject *obj, value_type *val) {
  53843. - return SWIG_AsVal_double (obj, val);
  53844. - }
  53845. - };
  53846. - template <> struct traits_from<double > {
  53847. - typedef double value_type;
  53848. - static PyObject *from(const value_type& val) {
  53849. - return SWIG_From_double (val);
  53850. - }
  53851. - };
  53852. -}
  53853. -
  53854. -
  53855. - namespace swig {
  53856. - template <> struct traits<std::vector<double, std::allocator< double > > > {
  53857. - typedef pointer_category category;
  53858. - static const char* type_name() {
  53859. - return "std::vector<" "double" "," "std::allocator< double >" " >";
  53860. - }
  53861. - };
  53862. - }
  53863. -
  53864. -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){
  53865. - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
  53866. - }
  53867. -SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){
  53868. - return !(self->empty());
  53869. - }
  53870. -SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){
  53871. - return !(self->empty());
  53872. - }
  53873. -SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){
  53874. - return self->size();
  53875. - }
  53876. -SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){
  53877. - if (self->size() == 0)
  53878. - throw std::out_of_range("pop from empty container");
  53879. - std::vector<double,std::allocator< double > >::value_type x = self->back();
  53880. - self->pop_back();
  53881. - return x;
  53882. - }
  53883. -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
  53884. - return swig::getslice(self, i, j, 1);
  53885. - }
  53886. -SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v=std::vector< double,std::allocator< double > >()){
  53887. - swig::setslice(self, i, j, 1, v);
  53888. - }
  53889. -SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
  53890. - swig::delslice(self, i, j, 1);
  53891. - }
  53892. -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){
  53893. - self->erase(swig::getpos(self,i));
  53894. - }
  53895. -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){
  53896. - Py_ssize_t i, j, step;
  53897. - if( !PySlice_Check(slice) ) {
  53898. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53899. - return NULL;
  53900. - }
  53901. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53902. - std::vector<double,std::allocator< double > >::difference_type id = i;
  53903. - std::vector<double,std::allocator< double > >::difference_type jd = j;
  53904. - return swig::getslice(self, id, jd, step);
  53905. - }
  53906. -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){
  53907. - Py_ssize_t i, j, step;
  53908. - if( !PySlice_Check(slice) ) {
  53909. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53910. - return;
  53911. - }
  53912. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53913. - std::vector<double,std::allocator< double > >::difference_type id = i;
  53914. - std::vector<double,std::allocator< double > >::difference_type jd = j;
  53915. - swig::setslice(self, id, jd, step, v);
  53916. - }
  53917. -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
  53918. - Py_ssize_t i, j, step;
  53919. - if( !PySlice_Check(slice) ) {
  53920. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53921. - return;
  53922. - }
  53923. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53924. - std::vector<double,std::allocator< double > >::difference_type id = i;
  53925. - std::vector<double,std::allocator< double > >::difference_type jd = j;
  53926. - swig::delslice(self, id, jd, step);
  53927. - }
  53928. -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
  53929. - Py_ssize_t i, j, step;
  53930. - if( !PySlice_Check(slice) ) {
  53931. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  53932. - return;
  53933. - }
  53934. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  53935. - std::vector<double,std::allocator< double > >::difference_type id = i;
  53936. - std::vector<double,std::allocator< double > >::difference_type jd = j;
  53937. - swig::delslice(self, id, jd, step);
  53938. - }
  53939. -SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){
  53940. - return *(swig::cgetpos(self, i));
  53941. - }
  53942. -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){
  53943. - *(swig::getpos(self,i)) = x;
  53944. - }
  53945. -SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){
  53946. - self->push_back(x);
  53947. - }
  53948. -
  53949. - namespace swig {
  53950. - template <> struct traits<vips::VImage > {
  53951. - typedef pointer_category category;
  53952. - static const char* type_name() { return"vips::VImage"; }
  53953. - };
  53954. - }
  53955. -
  53956. -
  53957. - namespace swig {
  53958. - template <> struct traits<std::vector<vips::VImage, std::allocator< vips::VImage > > > {
  53959. - typedef pointer_category category;
  53960. - static const char* type_name() {
  53961. - return "std::vector<" "vips::VImage" "," "std::allocator< vips::VImage >" " >";
  53962. - }
  53963. - };
  53964. - }
  53965. -
  53966. -SWIGINTERN swig::SwigPyIterator *std_vector_Sl_vips_VImage_Sg__iterator(std::vector< vips::VImage > *self,PyObject **PYTHON_SELF){
  53967. - return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
  53968. - }
  53969. -SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____nonzero__(std::vector< vips::VImage > const *self){
  53970. - return !(self->empty());
  53971. - }
  53972. -SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____bool__(std::vector< vips::VImage > const *self){
  53973. - return !(self->empty());
  53974. - }
  53975. -SWIGINTERN std::vector< vips::VImage >::size_type std_vector_Sl_vips_VImage_Sg____len__(std::vector< vips::VImage > const *self){
  53976. - return self->size();
  53977. - }
  53978. -SWIGINTERN std::vector< vips::VImage >::value_type std_vector_Sl_vips_VImage_Sg__pop(std::vector< vips::VImage > *self){
  53979. - if (self->size() == 0)
  53980. - throw std::out_of_range("pop from empty container");
  53981. - std::vector<vips::VImage,std::allocator< vips::VImage > >::value_type x = self->back();
  53982. - self->pop_back();
  53983. - return x;
  53984. - }
  53985. -SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){
  53986. - return swig::getslice(self, i, j, 1);
  53987. - }
  53988. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v=std::vector< vips::VImage,std::allocator< vips::VImage > >()){
  53989. - swig::setslice(self, i, j, 1, v);
  53990. - }
  53991. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){
  53992. - swig::delslice(self, i, j, 1);
  53993. - }
  53994. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i){
  53995. - self->erase(swig::getpos(self,i));
  53996. - }
  53997. -SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice){
  53998. - Py_ssize_t i, j, step;
  53999. - if( !PySlice_Check(slice) ) {
  54000. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  54001. - return NULL;
  54002. - }
  54003. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  54004. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
  54005. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
  54006. - return swig::getslice(self, id, jd, step);
  54007. - }
  54008. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v){
  54009. - Py_ssize_t i, j, step;
  54010. - if( !PySlice_Check(slice) ) {
  54011. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  54012. - return;
  54013. - }
  54014. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  54015. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
  54016. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
  54017. - swig::setslice(self, id, jd, step, v);
  54018. - }
  54019. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){
  54020. - Py_ssize_t i, j, step;
  54021. - if( !PySlice_Check(slice) ) {
  54022. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  54023. - return;
  54024. - }
  54025. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  54026. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
  54027. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
  54028. - swig::delslice(self, id, jd, step);
  54029. - }
  54030. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){
  54031. - Py_ssize_t i, j, step;
  54032. - if( !PySlice_Check(slice) ) {
  54033. - SWIG_Error(SWIG_TypeError, "Slice object expected.");
  54034. - return;
  54035. - }
  54036. - PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
  54037. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type id = i;
  54038. - std::vector<vips::VImage,std::allocator< vips::VImage > >::difference_type jd = j;
  54039. - swig::delslice(self, id, jd, step);
  54040. - }
  54041. -SWIGINTERN std::vector< vips::VImage >::value_type const &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1(std::vector< vips::VImage > const *self,std::vector< vips::VImage >::difference_type i){
  54042. - return *(swig::cgetpos(self, i));
  54043. - }
  54044. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::value_type const &x){
  54045. - *(swig::getpos(self,i)) = x;
  54046. - }
  54047. -SWIGINTERN void std_vector_Sl_vips_VImage_Sg__append(std::vector< vips::VImage > *self,std::vector< vips::VImage >::value_type const &x){
  54048. - self->push_back(x);
  54049. - }
  54050. -
  54051. -struct VBuffer {
  54052. - void *data;
  54053. - size_t size;
  54054. -};
  54055. -
  54056. -
  54057. -SWIGINTERN swig_type_info*
  54058. -SWIG_pchar_descriptor(void)
  54059. -{
  54060. - static int init = 0;
  54061. - static swig_type_info* info = 0;
  54062. - if (!init) {
  54063. - info = SWIG_TypeQuery("_p_char");
  54064. - init = 1;
  54065. - }
  54066. - return info;
  54067. -}
  54068. -
  54069. -
  54070. -SWIGINTERN int
  54071. -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  54072. -{
  54073. -#if PY_VERSION_HEX>=0x03000000
  54074. - if (PyUnicode_Check(obj))
  54075. -#else
  54076. - if (PyString_Check(obj))
  54077. -#endif
  54078. - {
  54079. - char *cstr; Py_ssize_t len;
  54080. -#if PY_VERSION_HEX>=0x03000000
  54081. - if (!alloc && cptr) {
  54082. - /* We can't allow converting without allocation, since the internal
  54083. - representation of string in Python 3 is UCS-2/UCS-4 but we require
  54084. - a UTF-8 representation.
  54085. - TODO(bhy) More detailed explanation */
  54086. - return SWIG_RuntimeError;
  54087. - }
  54088. - obj = PyUnicode_AsUTF8String(obj);
  54089. - PyBytes_AsStringAndSize(obj, &cstr, &len);
  54090. - if(alloc) *alloc = SWIG_NEWOBJ;
  54091. -#else
  54092. - PyString_AsStringAndSize(obj, &cstr, &len);
  54093. -#endif
  54094. - if (cptr) {
  54095. - if (alloc) {
  54096. - /*
  54097. - In python the user should not be able to modify the inner
  54098. - string representation. To warranty that, if you define
  54099. - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
  54100. - buffer is always returned.
  54101. -
  54102. - The default behavior is just to return the pointer value,
  54103. - so, be careful.
  54104. - */
  54105. -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
  54106. - if (*alloc != SWIG_OLDOBJ)
  54107. -#else
  54108. - if (*alloc == SWIG_NEWOBJ)
  54109. -#endif
  54110. - {
  54111. - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
  54112. - *alloc = SWIG_NEWOBJ;
  54113. - }
  54114. - else {
  54115. - *cptr = cstr;
  54116. - *alloc = SWIG_OLDOBJ;
  54117. - }
  54118. - } else {
  54119. - #if PY_VERSION_HEX>=0x03000000
  54120. - assert(0); /* Should never reach here in Python 3 */
  54121. - #endif
  54122. - *cptr = SWIG_Python_str_AsChar(obj);
  54123. - }
  54124. - }
  54125. - if (psize) *psize = len + 1;
  54126. -#if PY_VERSION_HEX>=0x03000000
  54127. - Py_XDECREF(obj);
  54128. -#endif
  54129. - return SWIG_OK;
  54130. - } else {
  54131. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  54132. - if (pchar_descriptor) {
  54133. - void* vptr = 0;
  54134. - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  54135. - if (cptr) *cptr = (char *) vptr;
  54136. - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  54137. - if (alloc) *alloc = SWIG_OLDOBJ;
  54138. - return SWIG_OK;
  54139. - }
  54140. - }
  54141. - }
  54142. - return SWIG_TypeError;
  54143. -}
  54144. -
  54145. -
  54146. -
  54147. -
  54148. -
  54149. -SWIGINTERNINLINE PyObject *
  54150. -SWIG_From_float (float value)
  54151. -{
  54152. - return SWIG_From_double (value);
  54153. -}
  54154. -
  54155. -
  54156. -SWIGINTERNINLINE PyObject *
  54157. -SWIG_From_short (short value)
  54158. -{
  54159. - return SWIG_From_long (value);
  54160. -}
  54161. -
  54162. -
  54163. -SWIGINTERNINLINE PyObject *
  54164. -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  54165. -{
  54166. - if (carray) {
  54167. - if (size > INT_MAX) {
  54168. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  54169. - return pchar_descriptor ?
  54170. - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
  54171. - } else {
  54172. -#if PY_VERSION_HEX >= 0x03000000
  54173. - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
  54174. -#else
  54175. - return PyString_FromStringAndSize(carray, static_cast< int >(size));
  54176. -#endif
  54177. - }
  54178. - } else {
  54179. - return SWIG_Py_Void();
  54180. - }
  54181. -}
  54182. -
  54183. -
  54184. -SWIGINTERNINLINE PyObject *
  54185. -SWIG_FromCharPtr(const char *cptr)
  54186. -{
  54187. - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  54188. -}
  54189. -
  54190. -
  54191. -SWIGINTERN int
  54192. -SWIG_AsVal_float (PyObject * obj, float *val)
  54193. -{
  54194. - double v;
  54195. - int res = SWIG_AsVal_double (obj, &v);
  54196. - if (SWIG_IsOK(res)) {
  54197. - if ((v < -FLT_MAX || v > FLT_MAX)) {
  54198. - return SWIG_OverflowError;
  54199. - } else {
  54200. - if (val) *val = static_cast< float >(v);
  54201. - }
  54202. - }
  54203. - return res;
  54204. -}
  54205. -
  54206. -
  54207. -SWIGINTERNINLINE PyObject*
  54208. -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig2.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
  54209. -
  54210. -const std::complex<double>&
  54211. -
  54212. -
  54213. -
  54214. -/*@SWIG@*/ c)
  54215. -{
  54216. - return PyComplex_FromDoubles(std::real(c), std::imag(c));
  54217. -}
  54218. -
  54219. -SWIGINTERN VBuffer vips_VImage_tobuffer(vips::VImage *self){
  54220. - VBuffer buffer;
  54221. -
  54222. - buffer.data = self->data ();
  54223. - buffer.size = (size_t) self->Xsize () * self->Ysize () *
  54224. - IM_IMAGE_SIZEOF_PEL (self->image ());
  54225. -
  54226. - return buffer;
  54227. - }
  54228. -SWIGINTERN vips::VImage vips_VImage_frombuffer(VBuffer buffer,int width,int height,int bands,vips::VImage::TBandFmt format){
  54229. - return VImage (buffer.data, width, height, bands, format);
  54230. - }
  54231. -SWIGINTERN void vips_VImage_tostring(vips::VImage *self,char **buffer,int *buffer_len){
  54232. - void *vips_memory;
  54233. -
  54234. - /* Eval the vips image first. This may throw an exception and we want to
  54235. - * make sure we do this before we try to malloc() space for the copy.
  54236. - */
  54237. - vips_memory = self->data ();
  54238. -
  54239. - /* We have to copy the image data to make a string that Python can
  54240. - * manage. Use frombuffer() / tobuffer () if you want to avoid the copy
  54241. - * and manage memory lifetime yourself.
  54242. - */
  54243. - *buffer_len = (size_t) self->Xsize () * self->Ysize () *
  54244. - IM_IMAGE_SIZEOF_PEL (self->image ());
  54245. - if (!(*buffer = (char *) im_malloc (NULL, *buffer_len)))
  54246. - verror ("Unable to allocate memory for image copy.");
  54247. - memcpy (*buffer, vips_memory, *buffer_len);
  54248. - }
  54249. -
  54250. -SWIGINTERN int
  54251. -SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
  54252. -{
  54253. - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
  54254. - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
  54255. - if (buf) {
  54256. - if (val) *val = new std::string(buf, size - 1);
  54257. - if (alloc == SWIG_NEWOBJ) delete[] buf;
  54258. - return SWIG_NEWOBJ;
  54259. - } else {
  54260. - if (val) *val = 0;
  54261. - return SWIG_OLDOBJ;
  54262. - }
  54263. - } else {
  54264. - static int init = 0;
  54265. - static swig_type_info* descriptor = 0;
  54266. - if (!init) {
  54267. - descriptor = SWIG_TypeQuery("std::string" " *");
  54268. - init = 1;
  54269. - }
  54270. - if (descriptor) {
  54271. - std::string *vptr;
  54272. - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
  54273. - if (SWIG_IsOK(res) && val) *val = vptr;
  54274. - return res;
  54275. - }
  54276. - }
  54277. - return SWIG_ERROR;
  54278. -}
  54279. -
  54280. -SWIGINTERN vips::VImage vips_VImage_fromstring(std::string buffer,int width,int height,int bands,vips::VImage::TBandFmt format){
  54281. - void *vips_memory;
  54282. - VImage result;
  54283. -
  54284. - /* We have to copy the string, then add a callback to the VImage to free
  54285. - * it when we free the VImage. Use frombuffer() / tobuffer () if you want
  54286. - * to avoid the copy and manage memory lifetime yourself.
  54287. - */
  54288. - if (!(vips_memory = im_malloc (NULL, buffer.length ())))
  54289. - verror ("Unable to allocate memory for image copy.");
  54290. -
  54291. - /* We have to use .c_str () since the string may not be contiguous.
  54292. - */
  54293. - memcpy (vips_memory, buffer.c_str (), buffer.length ());
  54294. - result = VImage (vips_memory, width, height, bands, format);
  54295. -
  54296. - if (im_add_close_callback (result.image (),
  54297. - (im_callback_fn) im_free, vips_memory, NULL))
  54298. - verror ();
  54299. -
  54300. - return result;
  54301. - }
  54302. -
  54303. -/* Turn on to print args.
  54304. -#define DEBUG
  54305. - */
  54306. -
  54307. -/* Command-line args during parse.
  54308. - */
  54309. -typedef struct _Args {
  54310. - /* The n strings we alloc when we get from Python.
  54311. - */
  54312. - int n;
  54313. - char **str;
  54314. -
  54315. - /* argc/argv as processed by us.
  54316. - */
  54317. - int argc;
  54318. - char **argv;
  54319. -} Args;
  54320. -
  54321. -#ifdef DEBUG
  54322. -static void
  54323. -args_print (Args *args)
  54324. -{
  54325. - int i;
  54326. -
  54327. - printf ("args_print: argc = %d\n", args->argc);
  54328. - // +1 so we print the trailing NULL too
  54329. - for (i = 0; i < args->argc + 1; i++)
  54330. - printf ("\t%2d)\t%s\n", i, args->argv[i]);
  54331. -}
  54332. -#endif /*DEBUG*/
  54333. -
  54334. -static void
  54335. -args_free (Args *args)
  54336. -{
  54337. - int i;
  54338. -
  54339. - for (i = 0; i < args->n; i++)
  54340. - IM_FREE (args->str[i]);
  54341. - args->n = 0;
  54342. - args->argc = 0;
  54343. - IM_FREE (args->str);
  54344. - IM_FREE (args->argv);
  54345. - IM_FREE (args);
  54346. -}
  54347. -
  54348. -/* Get argv/argc from python.
  54349. - */
  54350. -static Args *
  54351. -args_new (void)
  54352. -{
  54353. - Args *args;
  54354. - PyObject *av;
  54355. - int i;
  54356. - int n;
  54357. -
  54358. - args = g_new (Args, 1);
  54359. - args->n = 0;
  54360. - args->str = NULL;
  54361. - args->argc = 0;
  54362. - args->argv = NULL;
  54363. -
  54364. - if (!(av = PySys_GetObject ((char *) "argv")))
  54365. - return (args);
  54366. - if (!PyList_Check (av)) {
  54367. - PyErr_Warn (PyExc_Warning, "ignoring sys.argv: "
  54368. - "it must be a list of strings");
  54369. - return args;
  54370. - }
  54371. -
  54372. - n = PyList_Size (av);
  54373. - args->str = g_new (char *, n);
  54374. - for (i = 0; i < n; i++)
  54375. - args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
  54376. - args->n = n;
  54377. -
  54378. - /* +1 for NULL termination.
  54379. - */
  54380. - args->argc = n;
  54381. - args->argv = g_new (char *, n + 1);
  54382. - for (i = 0; i < n; i++)
  54383. - args->argv[i] = args->str[i];
  54384. - args->argv[i] = NULL;
  54385. -
  54386. - return args;
  54387. -}
  54388. -
  54389. -static void
  54390. -vips_fatal (const char *msg)
  54391. -{
  54392. - char buf[256];
  54393. -
  54394. - im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer());
  54395. - im_error_clear ();
  54396. - Py_FatalError (buf);
  54397. -}
  54398. -
  54399. -
  54400. -#ifdef __cplusplus
  54401. -extern "C" {
  54402. -#endif
  54403. -SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54404. - PyObject *resultobj = 0;
  54405. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54406. - void *argp1 = 0 ;
  54407. - int res1 = 0 ;
  54408. - PyObject * obj0 = 0 ;
  54409. -
  54410. - if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail;
  54411. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
  54412. - if (!SWIG_IsOK(res1)) {
  54413. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54414. - }
  54415. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54416. - delete arg1;
  54417. - resultobj = SWIG_Py_Void();
  54418. - return resultobj;
  54419. -fail:
  54420. - return NULL;
  54421. -}
  54422. -
  54423. -
  54424. -SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54425. - PyObject *resultobj = 0;
  54426. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54427. - void *argp1 = 0 ;
  54428. - int res1 = 0 ;
  54429. - PyObject * obj0 = 0 ;
  54430. - PyObject *result = 0 ;
  54431. -
  54432. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail;
  54433. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54434. - if (!SWIG_IsOK(res1)) {
  54435. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54436. - }
  54437. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54438. - try {
  54439. - result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
  54440. - }
  54441. - catch(swig::stop_iteration &_e) {
  54442. - {
  54443. - (void)_e;
  54444. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54445. - SWIG_fail;
  54446. - }
  54447. - }
  54448. -
  54449. - resultobj = result;
  54450. - return resultobj;
  54451. -fail:
  54452. - return NULL;
  54453. -}
  54454. -
  54455. -
  54456. -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54457. - PyObject *resultobj = 0;
  54458. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54459. - size_t arg2 ;
  54460. - void *argp1 = 0 ;
  54461. - int res1 = 0 ;
  54462. - size_t val2 ;
  54463. - int ecode2 = 0 ;
  54464. - PyObject * obj0 = 0 ;
  54465. - PyObject * obj1 = 0 ;
  54466. - swig::SwigPyIterator *result = 0 ;
  54467. -
  54468. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail;
  54469. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54470. - if (!SWIG_IsOK(res1)) {
  54471. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54472. - }
  54473. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54474. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  54475. - if (!SWIG_IsOK(ecode2)) {
  54476. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
  54477. - }
  54478. - arg2 = static_cast< size_t >(val2);
  54479. - try {
  54480. - result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
  54481. - }
  54482. - catch(swig::stop_iteration &_e) {
  54483. - {
  54484. - (void)_e;
  54485. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54486. - SWIG_fail;
  54487. - }
  54488. - }
  54489. -
  54490. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54491. - return resultobj;
  54492. -fail:
  54493. - return NULL;
  54494. -}
  54495. -
  54496. -
  54497. -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54498. - PyObject *resultobj = 0;
  54499. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54500. - void *argp1 = 0 ;
  54501. - int res1 = 0 ;
  54502. - PyObject * obj0 = 0 ;
  54503. - swig::SwigPyIterator *result = 0 ;
  54504. -
  54505. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail;
  54506. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54507. - if (!SWIG_IsOK(res1)) {
  54508. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54509. - }
  54510. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54511. - try {
  54512. - result = (swig::SwigPyIterator *)(arg1)->incr();
  54513. - }
  54514. - catch(swig::stop_iteration &_e) {
  54515. - {
  54516. - (void)_e;
  54517. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54518. - SWIG_fail;
  54519. - }
  54520. - }
  54521. -
  54522. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54523. - return resultobj;
  54524. -fail:
  54525. - return NULL;
  54526. -}
  54527. -
  54528. -
  54529. -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
  54530. - int argc;
  54531. - PyObject *argv[3];
  54532. - int ii;
  54533. -
  54534. - if (!PyTuple_Check(args)) SWIG_fail;
  54535. - argc = args ? (int)PyObject_Length(args) : 0;
  54536. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  54537. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  54538. - }
  54539. - if (argc == 1) {
  54540. - int _v;
  54541. - void *vptr = 0;
  54542. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  54543. - _v = SWIG_CheckState(res);
  54544. - if (_v) {
  54545. - return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
  54546. - }
  54547. - }
  54548. - if (argc == 2) {
  54549. - int _v;
  54550. - void *vptr = 0;
  54551. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  54552. - _v = SWIG_CheckState(res);
  54553. - if (_v) {
  54554. - {
  54555. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  54556. - _v = SWIG_CheckState(res);
  54557. - }
  54558. - if (_v) {
  54559. - return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
  54560. - }
  54561. - }
  54562. - }
  54563. -
  54564. -fail:
  54565. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
  54566. - " Possible C/C++ prototypes are:\n"
  54567. - " swig::SwigPyIterator::incr(size_t)\n"
  54568. - " swig::SwigPyIterator::incr()\n");
  54569. - return 0;
  54570. -}
  54571. -
  54572. -
  54573. -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54574. - PyObject *resultobj = 0;
  54575. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54576. - size_t arg2 ;
  54577. - void *argp1 = 0 ;
  54578. - int res1 = 0 ;
  54579. - size_t val2 ;
  54580. - int ecode2 = 0 ;
  54581. - PyObject * obj0 = 0 ;
  54582. - PyObject * obj1 = 0 ;
  54583. - swig::SwigPyIterator *result = 0 ;
  54584. -
  54585. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail;
  54586. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54587. - if (!SWIG_IsOK(res1)) {
  54588. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54589. - }
  54590. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54591. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  54592. - if (!SWIG_IsOK(ecode2)) {
  54593. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
  54594. - }
  54595. - arg2 = static_cast< size_t >(val2);
  54596. - try {
  54597. - result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
  54598. - }
  54599. - catch(swig::stop_iteration &_e) {
  54600. - {
  54601. - (void)_e;
  54602. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54603. - SWIG_fail;
  54604. - }
  54605. - }
  54606. -
  54607. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54608. - return resultobj;
  54609. -fail:
  54610. - return NULL;
  54611. -}
  54612. -
  54613. -
  54614. -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54615. - PyObject *resultobj = 0;
  54616. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54617. - void *argp1 = 0 ;
  54618. - int res1 = 0 ;
  54619. - PyObject * obj0 = 0 ;
  54620. - swig::SwigPyIterator *result = 0 ;
  54621. -
  54622. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail;
  54623. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54624. - if (!SWIG_IsOK(res1)) {
  54625. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54626. - }
  54627. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54628. - try {
  54629. - result = (swig::SwigPyIterator *)(arg1)->decr();
  54630. - }
  54631. - catch(swig::stop_iteration &_e) {
  54632. - {
  54633. - (void)_e;
  54634. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54635. - SWIG_fail;
  54636. - }
  54637. - }
  54638. -
  54639. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54640. - return resultobj;
  54641. -fail:
  54642. - return NULL;
  54643. -}
  54644. -
  54645. -
  54646. -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
  54647. - int argc;
  54648. - PyObject *argv[3];
  54649. - int ii;
  54650. -
  54651. - if (!PyTuple_Check(args)) SWIG_fail;
  54652. - argc = args ? (int)PyObject_Length(args) : 0;
  54653. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  54654. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  54655. - }
  54656. - if (argc == 1) {
  54657. - int _v;
  54658. - void *vptr = 0;
  54659. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  54660. - _v = SWIG_CheckState(res);
  54661. - if (_v) {
  54662. - return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
  54663. - }
  54664. - }
  54665. - if (argc == 2) {
  54666. - int _v;
  54667. - void *vptr = 0;
  54668. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  54669. - _v = SWIG_CheckState(res);
  54670. - if (_v) {
  54671. - {
  54672. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  54673. - _v = SWIG_CheckState(res);
  54674. - }
  54675. - if (_v) {
  54676. - return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
  54677. - }
  54678. - }
  54679. - }
  54680. -
  54681. -fail:
  54682. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
  54683. - " Possible C/C++ prototypes are:\n"
  54684. - " swig::SwigPyIterator::decr(size_t)\n"
  54685. - " swig::SwigPyIterator::decr()\n");
  54686. - return 0;
  54687. -}
  54688. -
  54689. -
  54690. -SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54691. - PyObject *resultobj = 0;
  54692. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54693. - swig::SwigPyIterator *arg2 = 0 ;
  54694. - void *argp1 = 0 ;
  54695. - int res1 = 0 ;
  54696. - void *argp2 = 0 ;
  54697. - int res2 = 0 ;
  54698. - PyObject * obj0 = 0 ;
  54699. - PyObject * obj1 = 0 ;
  54700. - ptrdiff_t result;
  54701. -
  54702. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail;
  54703. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54704. - if (!SWIG_IsOK(res1)) {
  54705. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54706. - }
  54707. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54708. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
  54709. - if (!SWIG_IsOK(res2)) {
  54710. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54711. - }
  54712. - if (!argp2) {
  54713. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54714. - }
  54715. - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  54716. - try {
  54717. - result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
  54718. - }
  54719. - catch(std::invalid_argument &_e) {
  54720. - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  54721. - }
  54722. -
  54723. - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  54724. - return resultobj;
  54725. -fail:
  54726. - return NULL;
  54727. -}
  54728. -
  54729. -
  54730. -SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54731. - PyObject *resultobj = 0;
  54732. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54733. - swig::SwigPyIterator *arg2 = 0 ;
  54734. - void *argp1 = 0 ;
  54735. - int res1 = 0 ;
  54736. - void *argp2 = 0 ;
  54737. - int res2 = 0 ;
  54738. - PyObject * obj0 = 0 ;
  54739. - PyObject * obj1 = 0 ;
  54740. - bool result;
  54741. -
  54742. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail;
  54743. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54744. - if (!SWIG_IsOK(res1)) {
  54745. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54746. - }
  54747. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54748. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
  54749. - if (!SWIG_IsOK(res2)) {
  54750. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54751. - }
  54752. - if (!argp2) {
  54753. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54754. - }
  54755. - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  54756. - try {
  54757. - result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
  54758. - }
  54759. - catch(std::invalid_argument &_e) {
  54760. - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  54761. - }
  54762. -
  54763. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  54764. - return resultobj;
  54765. -fail:
  54766. - return NULL;
  54767. -}
  54768. -
  54769. -
  54770. -SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54771. - PyObject *resultobj = 0;
  54772. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54773. - void *argp1 = 0 ;
  54774. - int res1 = 0 ;
  54775. - PyObject * obj0 = 0 ;
  54776. - swig::SwigPyIterator *result = 0 ;
  54777. -
  54778. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail;
  54779. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54780. - if (!SWIG_IsOK(res1)) {
  54781. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54782. - }
  54783. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54784. - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
  54785. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  54786. - return resultobj;
  54787. -fail:
  54788. - return NULL;
  54789. -}
  54790. -
  54791. -
  54792. -SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54793. - PyObject *resultobj = 0;
  54794. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54795. - void *argp1 = 0 ;
  54796. - int res1 = 0 ;
  54797. - PyObject * obj0 = 0 ;
  54798. - PyObject *result = 0 ;
  54799. -
  54800. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail;
  54801. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54802. - if (!SWIG_IsOK(res1)) {
  54803. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54804. - }
  54805. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54806. - try {
  54807. - result = (PyObject *)(arg1)->next();
  54808. - }
  54809. - catch(swig::stop_iteration &_e) {
  54810. - {
  54811. - (void)_e;
  54812. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54813. - SWIG_fail;
  54814. - }
  54815. - }
  54816. -
  54817. - resultobj = result;
  54818. - return resultobj;
  54819. -fail:
  54820. - return NULL;
  54821. -}
  54822. -
  54823. -
  54824. -SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54825. - PyObject *resultobj = 0;
  54826. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54827. - void *argp1 = 0 ;
  54828. - int res1 = 0 ;
  54829. - PyObject * obj0 = 0 ;
  54830. - PyObject *result = 0 ;
  54831. -
  54832. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail;
  54833. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54834. - if (!SWIG_IsOK(res1)) {
  54835. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54836. - }
  54837. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54838. - try {
  54839. - result = (PyObject *)(arg1)->__next__();
  54840. - }
  54841. - catch(swig::stop_iteration &_e) {
  54842. - {
  54843. - (void)_e;
  54844. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54845. - SWIG_fail;
  54846. - }
  54847. - }
  54848. -
  54849. - resultobj = result;
  54850. - return resultobj;
  54851. -fail:
  54852. - return NULL;
  54853. -}
  54854. -
  54855. -
  54856. -SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54857. - PyObject *resultobj = 0;
  54858. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54859. - void *argp1 = 0 ;
  54860. - int res1 = 0 ;
  54861. - PyObject * obj0 = 0 ;
  54862. - PyObject *result = 0 ;
  54863. -
  54864. - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail;
  54865. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54866. - if (!SWIG_IsOK(res1)) {
  54867. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54868. - }
  54869. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54870. - try {
  54871. - result = (PyObject *)(arg1)->previous();
  54872. - }
  54873. - catch(swig::stop_iteration &_e) {
  54874. - {
  54875. - (void)_e;
  54876. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54877. - SWIG_fail;
  54878. - }
  54879. - }
  54880. -
  54881. - resultobj = result;
  54882. - return resultobj;
  54883. -fail:
  54884. - return NULL;
  54885. -}
  54886. -
  54887. -
  54888. -SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54889. - PyObject *resultobj = 0;
  54890. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54891. - ptrdiff_t arg2 ;
  54892. - void *argp1 = 0 ;
  54893. - int res1 = 0 ;
  54894. - ptrdiff_t val2 ;
  54895. - int ecode2 = 0 ;
  54896. - PyObject * obj0 = 0 ;
  54897. - PyObject * obj1 = 0 ;
  54898. - swig::SwigPyIterator *result = 0 ;
  54899. -
  54900. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail;
  54901. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54902. - if (!SWIG_IsOK(res1)) {
  54903. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  54904. - }
  54905. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54906. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  54907. - if (!SWIG_IsOK(ecode2)) {
  54908. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
  54909. - }
  54910. - arg2 = static_cast< ptrdiff_t >(val2);
  54911. - try {
  54912. - result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
  54913. - }
  54914. - catch(swig::stop_iteration &_e) {
  54915. - {
  54916. - (void)_e;
  54917. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  54918. - SWIG_fail;
  54919. - }
  54920. - }
  54921. -
  54922. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54923. - return resultobj;
  54924. -fail:
  54925. - return NULL;
  54926. -}
  54927. -
  54928. -
  54929. -SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54930. - PyObject *resultobj = 0;
  54931. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54932. - swig::SwigPyIterator *arg2 = 0 ;
  54933. - void *argp1 = 0 ;
  54934. - int res1 = 0 ;
  54935. - void *argp2 = 0 ;
  54936. - int res2 = 0 ;
  54937. - PyObject * obj0 = 0 ;
  54938. - PyObject * obj1 = 0 ;
  54939. - bool result;
  54940. -
  54941. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail;
  54942. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54943. - if (!SWIG_IsOK(res1)) {
  54944. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54945. - }
  54946. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54947. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
  54948. - if (!SWIG_IsOK(res2)) {
  54949. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54950. - }
  54951. - if (!argp2) {
  54952. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54953. - }
  54954. - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  54955. - result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
  54956. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  54957. - return resultobj;
  54958. -fail:
  54959. - return NULL;
  54960. -}
  54961. -
  54962. -
  54963. -SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54964. - PyObject *resultobj = 0;
  54965. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  54966. - swig::SwigPyIterator *arg2 = 0 ;
  54967. - void *argp1 = 0 ;
  54968. - int res1 = 0 ;
  54969. - void *argp2 = 0 ;
  54970. - int res2 = 0 ;
  54971. - PyObject * obj0 = 0 ;
  54972. - PyObject * obj1 = 0 ;
  54973. - bool result;
  54974. -
  54975. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail;
  54976. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  54977. - if (!SWIG_IsOK(res1)) {
  54978. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  54979. - }
  54980. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  54981. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
  54982. - if (!SWIG_IsOK(res2)) {
  54983. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54984. - }
  54985. - if (!argp2) {
  54986. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  54987. - }
  54988. - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  54989. - result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
  54990. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  54991. - return resultobj;
  54992. -fail:
  54993. - return NULL;
  54994. -}
  54995. -
  54996. -
  54997. -SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  54998. - PyObject *resultobj = 0;
  54999. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  55000. - ptrdiff_t arg2 ;
  55001. - void *argp1 = 0 ;
  55002. - int res1 = 0 ;
  55003. - ptrdiff_t val2 ;
  55004. - int ecode2 = 0 ;
  55005. - PyObject * obj0 = 0 ;
  55006. - PyObject * obj1 = 0 ;
  55007. - swig::SwigPyIterator *result = 0 ;
  55008. -
  55009. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail;
  55010. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
  55011. - if (!SWIG_IsOK(res1)) {
  55012. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  55013. - }
  55014. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  55015. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55016. - if (!SWIG_IsOK(ecode2)) {
  55017. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
  55018. - }
  55019. - arg2 = static_cast< ptrdiff_t >(val2);
  55020. - try {
  55021. - result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
  55022. - }
  55023. - catch(swig::stop_iteration &_e) {
  55024. - {
  55025. - (void)_e;
  55026. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  55027. - SWIG_fail;
  55028. - }
  55029. - }
  55030. -
  55031. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  55032. - return resultobj;
  55033. -fail:
  55034. - return NULL;
  55035. -}
  55036. -
  55037. -
  55038. -SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55039. - PyObject *resultobj = 0;
  55040. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  55041. - ptrdiff_t arg2 ;
  55042. - void *argp1 = 0 ;
  55043. - int res1 = 0 ;
  55044. - ptrdiff_t val2 ;
  55045. - int ecode2 = 0 ;
  55046. - PyObject * obj0 = 0 ;
  55047. - PyObject * obj1 = 0 ;
  55048. - swig::SwigPyIterator *result = 0 ;
  55049. -
  55050. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail;
  55051. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 );
  55052. - if (!SWIG_IsOK(res1)) {
  55053. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  55054. - }
  55055. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  55056. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55057. - if (!SWIG_IsOK(ecode2)) {
  55058. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  55059. - }
  55060. - arg2 = static_cast< ptrdiff_t >(val2);
  55061. - try {
  55062. - result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
  55063. - }
  55064. - catch(swig::stop_iteration &_e) {
  55065. - {
  55066. - (void)_e;
  55067. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  55068. - SWIG_fail;
  55069. - }
  55070. - }
  55071. -
  55072. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  55073. - return resultobj;
  55074. -fail:
  55075. - return NULL;
  55076. -}
  55077. -
  55078. -
  55079. -SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55080. - PyObject *resultobj = 0;
  55081. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  55082. - ptrdiff_t arg2 ;
  55083. - void *argp1 = 0 ;
  55084. - int res1 = 0 ;
  55085. - ptrdiff_t val2 ;
  55086. - int ecode2 = 0 ;
  55087. - PyObject * obj0 = 0 ;
  55088. - PyObject * obj1 = 0 ;
  55089. - swig::SwigPyIterator *result = 0 ;
  55090. -
  55091. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail;
  55092. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  55093. - if (!SWIG_IsOK(res1)) {
  55094. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  55095. - }
  55096. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  55097. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55098. - if (!SWIG_IsOK(ecode2)) {
  55099. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
  55100. - }
  55101. - arg2 = static_cast< ptrdiff_t >(val2);
  55102. - try {
  55103. - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
  55104. - }
  55105. - catch(swig::stop_iteration &_e) {
  55106. - {
  55107. - (void)_e;
  55108. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  55109. - SWIG_fail;
  55110. - }
  55111. - }
  55112. -
  55113. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  55114. - return resultobj;
  55115. -fail:
  55116. - return NULL;
  55117. -}
  55118. -
  55119. -
  55120. -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55121. - PyObject *resultobj = 0;
  55122. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  55123. - ptrdiff_t arg2 ;
  55124. - void *argp1 = 0 ;
  55125. - int res1 = 0 ;
  55126. - ptrdiff_t val2 ;
  55127. - int ecode2 = 0 ;
  55128. - PyObject * obj0 = 0 ;
  55129. - PyObject * obj1 = 0 ;
  55130. - swig::SwigPyIterator *result = 0 ;
  55131. -
  55132. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
  55133. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  55134. - if (!SWIG_IsOK(res1)) {
  55135. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  55136. - }
  55137. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  55138. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55139. - if (!SWIG_IsOK(ecode2)) {
  55140. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  55141. - }
  55142. - arg2 = static_cast< ptrdiff_t >(val2);
  55143. - try {
  55144. - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
  55145. - }
  55146. - catch(swig::stop_iteration &_e) {
  55147. - {
  55148. - (void)_e;
  55149. - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
  55150. - SWIG_fail;
  55151. - }
  55152. - }
  55153. -
  55154. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  55155. - return resultobj;
  55156. -fail:
  55157. - return NULL;
  55158. -}
  55159. -
  55160. -
  55161. -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55162. - PyObject *resultobj = 0;
  55163. - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  55164. - swig::SwigPyIterator *arg2 = 0 ;
  55165. - void *argp1 = 0 ;
  55166. - int res1 = 0 ;
  55167. - void *argp2 = 0 ;
  55168. - int res2 = 0 ;
  55169. - PyObject * obj0 = 0 ;
  55170. - PyObject * obj1 = 0 ;
  55171. - ptrdiff_t result;
  55172. -
  55173. - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
  55174. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 );
  55175. - if (!SWIG_IsOK(res1)) {
  55176. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
  55177. - }
  55178. - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  55179. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0);
  55180. - if (!SWIG_IsOK(res2)) {
  55181. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  55182. - }
  55183. - if (!argp2) {
  55184. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
  55185. - }
  55186. - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  55187. - result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
  55188. - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  55189. - return resultobj;
  55190. -fail:
  55191. - return NULL;
  55192. -}
  55193. -
  55194. -
  55195. -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
  55196. - int argc;
  55197. - PyObject *argv[3];
  55198. - int ii;
  55199. -
  55200. - if (!PyTuple_Check(args)) SWIG_fail;
  55201. - argc = args ? (int)PyObject_Length(args) : 0;
  55202. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  55203. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  55204. - }
  55205. - if (argc == 2) {
  55206. - int _v;
  55207. - void *vptr = 0;
  55208. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  55209. - _v = SWIG_CheckState(res);
  55210. - if (_v) {
  55211. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
  55212. - _v = SWIG_CheckState(res);
  55213. - if (_v) {
  55214. - return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
  55215. - }
  55216. - }
  55217. - }
  55218. - if (argc == 2) {
  55219. - int _v;
  55220. - void *vptr = 0;
  55221. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
  55222. - _v = SWIG_CheckState(res);
  55223. - if (_v) {
  55224. - {
  55225. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  55226. - _v = SWIG_CheckState(res);
  55227. - }
  55228. - if (_v) {
  55229. - return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
  55230. - }
  55231. - }
  55232. - }
  55233. -
  55234. -fail:
  55235. - Py_INCREF(Py_NotImplemented);
  55236. - return Py_NotImplemented;
  55237. -}
  55238. -
  55239. -
  55240. -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55241. - PyObject *obj;
  55242. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  55243. - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
  55244. - return SWIG_Py_Void();
  55245. -}
  55246. -
  55247. -SWIGINTERN PyObject *_wrap_IntVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55248. - PyObject *resultobj = 0;
  55249. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55250. - PyObject **arg2 = (PyObject **) 0 ;
  55251. - void *argp1 = 0 ;
  55252. - int res1 = 0 ;
  55253. - PyObject * obj0 = 0 ;
  55254. - swig::SwigPyIterator *result = 0 ;
  55255. -
  55256. - arg2 = &obj0;
  55257. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_iterator",&obj0)) SWIG_fail;
  55258. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55259. - if (!SWIG_IsOK(res1)) {
  55260. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'");
  55261. - }
  55262. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55263. - result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2);
  55264. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  55265. - return resultobj;
  55266. -fail:
  55267. - return NULL;
  55268. -}
  55269. -
  55270. -
  55271. -SWIGINTERN PyObject *_wrap_IntVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55272. - PyObject *resultobj = 0;
  55273. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55274. - void *argp1 = 0 ;
  55275. - int res1 = 0 ;
  55276. - PyObject * obj0 = 0 ;
  55277. - bool result;
  55278. -
  55279. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___nonzero__",&obj0)) SWIG_fail;
  55280. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55281. - if (!SWIG_IsOK(res1)) {
  55282. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'");
  55283. - }
  55284. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55285. - result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1);
  55286. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  55287. - return resultobj;
  55288. -fail:
  55289. - return NULL;
  55290. -}
  55291. -
  55292. -
  55293. -SWIGINTERN PyObject *_wrap_IntVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55294. - PyObject *resultobj = 0;
  55295. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55296. - void *argp1 = 0 ;
  55297. - int res1 = 0 ;
  55298. - PyObject * obj0 = 0 ;
  55299. - bool result;
  55300. -
  55301. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___bool__",&obj0)) SWIG_fail;
  55302. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55303. - if (!SWIG_IsOK(res1)) {
  55304. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'");
  55305. - }
  55306. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55307. - result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1);
  55308. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  55309. - return resultobj;
  55310. -fail:
  55311. - return NULL;
  55312. -}
  55313. -
  55314. -
  55315. -SWIGINTERN PyObject *_wrap_IntVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55316. - PyObject *resultobj = 0;
  55317. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55318. - void *argp1 = 0 ;
  55319. - int res1 = 0 ;
  55320. - PyObject * obj0 = 0 ;
  55321. - std::vector< int >::size_type result;
  55322. -
  55323. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector___len__",&obj0)) SWIG_fail;
  55324. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55325. - if (!SWIG_IsOK(res1)) {
  55326. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'");
  55327. - }
  55328. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55329. - result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1);
  55330. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  55331. - return resultobj;
  55332. -fail:
  55333. - return NULL;
  55334. -}
  55335. -
  55336. -
  55337. -SWIGINTERN PyObject *_wrap_IntVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55338. - PyObject *resultobj = 0;
  55339. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55340. - void *argp1 = 0 ;
  55341. - int res1 = 0 ;
  55342. - PyObject * obj0 = 0 ;
  55343. - std::vector< int >::value_type result;
  55344. -
  55345. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop",&obj0)) SWIG_fail;
  55346. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55347. - if (!SWIG_IsOK(res1)) {
  55348. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'");
  55349. - }
  55350. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55351. - try {
  55352. - result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1);
  55353. - }
  55354. - catch(std::out_of_range &_e) {
  55355. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55356. - }
  55357. -
  55358. - resultobj = SWIG_From_int(static_cast< int >(result));
  55359. - return resultobj;
  55360. -fail:
  55361. - return NULL;
  55362. -}
  55363. -
  55364. -
  55365. -SWIGINTERN PyObject *_wrap_IntVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55366. - PyObject *resultobj = 0;
  55367. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55368. - std::vector< int >::difference_type arg2 ;
  55369. - std::vector< int >::difference_type arg3 ;
  55370. - void *argp1 = 0 ;
  55371. - int res1 = 0 ;
  55372. - ptrdiff_t val2 ;
  55373. - int ecode2 = 0 ;
  55374. - ptrdiff_t val3 ;
  55375. - int ecode3 = 0 ;
  55376. - PyObject * obj0 = 0 ;
  55377. - PyObject * obj1 = 0 ;
  55378. - PyObject * obj2 = 0 ;
  55379. - std::vector< int,std::allocator< int > > *result = 0 ;
  55380. -
  55381. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  55382. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55383. - if (!SWIG_IsOK(res1)) {
  55384. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55385. - }
  55386. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55387. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55388. - if (!SWIG_IsOK(ecode2)) {
  55389. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55390. - }
  55391. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55392. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  55393. - if (!SWIG_IsOK(ecode3)) {
  55394. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  55395. - }
  55396. - arg3 = static_cast< std::vector< int >::difference_type >(val3);
  55397. - try {
  55398. - result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3);
  55399. - }
  55400. - catch(std::out_of_range &_e) {
  55401. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55402. - }
  55403. - catch(std::invalid_argument &_e) {
  55404. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55405. - }
  55406. -
  55407. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 );
  55408. - return resultobj;
  55409. -fail:
  55410. - return NULL;
  55411. -}
  55412. -
  55413. -
  55414. -SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55415. - PyObject *resultobj = 0;
  55416. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55417. - std::vector< int >::difference_type arg2 ;
  55418. - std::vector< int >::difference_type arg3 ;
  55419. - std::vector< int,std::allocator< int > > *arg4 = 0 ;
  55420. - void *argp1 = 0 ;
  55421. - int res1 = 0 ;
  55422. - ptrdiff_t val2 ;
  55423. - int ecode2 = 0 ;
  55424. - ptrdiff_t val3 ;
  55425. - int ecode3 = 0 ;
  55426. - int res4 = SWIG_OLDOBJ ;
  55427. - PyObject * obj0 = 0 ;
  55428. - PyObject * obj1 = 0 ;
  55429. - PyObject * obj2 = 0 ;
  55430. - PyObject * obj3 = 0 ;
  55431. -
  55432. - if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  55433. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55434. - if (!SWIG_IsOK(res1)) {
  55435. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55436. - }
  55437. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55438. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55439. - if (!SWIG_IsOK(ecode2)) {
  55440. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55441. - }
  55442. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55443. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  55444. - if (!SWIG_IsOK(ecode3)) {
  55445. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  55446. - }
  55447. - arg3 = static_cast< std::vector< int >::difference_type >(val3);
  55448. - {
  55449. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  55450. - res4 = swig::asptr(obj3, &ptr);
  55451. - if (!SWIG_IsOK(res4)) {
  55452. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
  55453. - }
  55454. - if (!ptr) {
  55455. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'");
  55456. - }
  55457. - arg4 = ptr;
  55458. - }
  55459. - try {
  55460. - std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4);
  55461. - }
  55462. - catch(std::out_of_range &_e) {
  55463. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55464. - }
  55465. - catch(std::invalid_argument &_e) {
  55466. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55467. - }
  55468. -
  55469. - resultobj = SWIG_Py_Void();
  55470. - if (SWIG_IsNewObj(res4)) delete arg4;
  55471. - return resultobj;
  55472. -fail:
  55473. - if (SWIG_IsNewObj(res4)) delete arg4;
  55474. - return NULL;
  55475. -}
  55476. -
  55477. -
  55478. -SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55479. - PyObject *resultobj = 0;
  55480. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55481. - std::vector< int >::difference_type arg2 ;
  55482. - std::vector< int >::difference_type arg3 ;
  55483. - void *argp1 = 0 ;
  55484. - int res1 = 0 ;
  55485. - ptrdiff_t val2 ;
  55486. - int ecode2 = 0 ;
  55487. - ptrdiff_t val3 ;
  55488. - int ecode3 = 0 ;
  55489. - PyObject * obj0 = 0 ;
  55490. - PyObject * obj1 = 0 ;
  55491. - PyObject * obj2 = 0 ;
  55492. -
  55493. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  55494. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55495. - if (!SWIG_IsOK(res1)) {
  55496. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55497. - }
  55498. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55499. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55500. - if (!SWIG_IsOK(ecode2)) {
  55501. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55502. - }
  55503. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55504. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  55505. - if (!SWIG_IsOK(ecode3)) {
  55506. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  55507. - }
  55508. - arg3 = static_cast< std::vector< int >::difference_type >(val3);
  55509. - try {
  55510. - std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3);
  55511. - }
  55512. - catch(std::out_of_range &_e) {
  55513. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55514. - }
  55515. - catch(std::invalid_argument &_e) {
  55516. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55517. - }
  55518. -
  55519. - resultobj = SWIG_Py_Void();
  55520. - return resultobj;
  55521. -fail:
  55522. - return NULL;
  55523. -}
  55524. -
  55525. -
  55526. -SWIGINTERN PyObject *_wrap_IntVector___setslice__(PyObject *self, PyObject *args) {
  55527. - int argc;
  55528. - PyObject *argv[5];
  55529. - int ii;
  55530. -
  55531. - if (!PyTuple_Check(args)) SWIG_fail;
  55532. - argc = args ? (int)PyObject_Length(args) : 0;
  55533. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  55534. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  55535. - }
  55536. - if (argc == 3) {
  55537. - int _v;
  55538. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55539. - _v = SWIG_CheckState(res);
  55540. - if (_v) {
  55541. - {
  55542. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  55543. - _v = SWIG_CheckState(res);
  55544. - }
  55545. - if (_v) {
  55546. - {
  55547. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  55548. - _v = SWIG_CheckState(res);
  55549. - }
  55550. - if (_v) {
  55551. - return _wrap_IntVector___setslice____SWIG_1(self, args);
  55552. - }
  55553. - }
  55554. - }
  55555. - }
  55556. - if (argc == 4) {
  55557. - int _v;
  55558. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55559. - _v = SWIG_CheckState(res);
  55560. - if (_v) {
  55561. - {
  55562. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  55563. - _v = SWIG_CheckState(res);
  55564. - }
  55565. - if (_v) {
  55566. - {
  55567. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  55568. - _v = SWIG_CheckState(res);
  55569. - }
  55570. - if (_v) {
  55571. - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
  55572. - _v = SWIG_CheckState(res);
  55573. - if (_v) {
  55574. - return _wrap_IntVector___setslice____SWIG_0(self, args);
  55575. - }
  55576. - }
  55577. - }
  55578. - }
  55579. - }
  55580. -
  55581. -fail:
  55582. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setslice__'.\n"
  55583. - " Possible C/C++ prototypes are:\n"
  55584. - " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"
  55585. - " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n");
  55586. - return 0;
  55587. -}
  55588. -
  55589. -
  55590. -SWIGINTERN PyObject *_wrap_IntVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55591. - PyObject *resultobj = 0;
  55592. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55593. - std::vector< int >::difference_type arg2 ;
  55594. - std::vector< int >::difference_type arg3 ;
  55595. - void *argp1 = 0 ;
  55596. - int res1 = 0 ;
  55597. - ptrdiff_t val2 ;
  55598. - int ecode2 = 0 ;
  55599. - ptrdiff_t val3 ;
  55600. - int ecode3 = 0 ;
  55601. - PyObject * obj0 = 0 ;
  55602. - PyObject * obj1 = 0 ;
  55603. - PyObject * obj2 = 0 ;
  55604. -
  55605. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  55606. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55607. - if (!SWIG_IsOK(res1)) {
  55608. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55609. - }
  55610. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55611. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55612. - if (!SWIG_IsOK(ecode2)) {
  55613. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55614. - }
  55615. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55616. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  55617. - if (!SWIG_IsOK(ecode3)) {
  55618. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  55619. - }
  55620. - arg3 = static_cast< std::vector< int >::difference_type >(val3);
  55621. - try {
  55622. - std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3);
  55623. - }
  55624. - catch(std::out_of_range &_e) {
  55625. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55626. - }
  55627. - catch(std::invalid_argument &_e) {
  55628. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55629. - }
  55630. -
  55631. - resultobj = SWIG_Py_Void();
  55632. - return resultobj;
  55633. -fail:
  55634. - return NULL;
  55635. -}
  55636. -
  55637. -
  55638. -SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55639. - PyObject *resultobj = 0;
  55640. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55641. - std::vector< int >::difference_type arg2 ;
  55642. - void *argp1 = 0 ;
  55643. - int res1 = 0 ;
  55644. - ptrdiff_t val2 ;
  55645. - int ecode2 = 0 ;
  55646. - PyObject * obj0 = 0 ;
  55647. - PyObject * obj1 = 0 ;
  55648. -
  55649. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail;
  55650. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55651. - if (!SWIG_IsOK(res1)) {
  55652. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55653. - }
  55654. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55655. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55656. - if (!SWIG_IsOK(ecode2)) {
  55657. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55658. - }
  55659. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55660. - try {
  55661. - std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2);
  55662. - }
  55663. - catch(std::out_of_range &_e) {
  55664. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55665. - }
  55666. -
  55667. - resultobj = SWIG_Py_Void();
  55668. - return resultobj;
  55669. -fail:
  55670. - return NULL;
  55671. -}
  55672. -
  55673. -
  55674. -SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55675. - PyObject *resultobj = 0;
  55676. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55677. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  55678. - void *argp1 = 0 ;
  55679. - int res1 = 0 ;
  55680. - PyObject * obj0 = 0 ;
  55681. - PyObject * obj1 = 0 ;
  55682. - std::vector< int,std::allocator< int > > *result = 0 ;
  55683. -
  55684. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail;
  55685. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55686. - if (!SWIG_IsOK(res1)) {
  55687. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55688. - }
  55689. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55690. - {
  55691. - if (!PySlice_Check(obj1)) {
  55692. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  55693. - }
  55694. - arg2 = (PySliceObject *) obj1;
  55695. - }
  55696. - try {
  55697. - result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2);
  55698. - }
  55699. - catch(std::out_of_range &_e) {
  55700. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55701. - }
  55702. - catch(std::invalid_argument &_e) {
  55703. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55704. - }
  55705. -
  55706. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 );
  55707. - return resultobj;
  55708. -fail:
  55709. - return NULL;
  55710. -}
  55711. -
  55712. -
  55713. -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55714. - PyObject *resultobj = 0;
  55715. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55716. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  55717. - std::vector< int,std::allocator< int > > *arg3 = 0 ;
  55718. - void *argp1 = 0 ;
  55719. - int res1 = 0 ;
  55720. - int res3 = SWIG_OLDOBJ ;
  55721. - PyObject * obj0 = 0 ;
  55722. - PyObject * obj1 = 0 ;
  55723. - PyObject * obj2 = 0 ;
  55724. -
  55725. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  55726. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55727. - if (!SWIG_IsOK(res1)) {
  55728. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55729. - }
  55730. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55731. - {
  55732. - if (!PySlice_Check(obj1)) {
  55733. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  55734. - }
  55735. - arg2 = (PySliceObject *) obj1;
  55736. - }
  55737. - {
  55738. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  55739. - res3 = swig::asptr(obj2, &ptr);
  55740. - if (!SWIG_IsOK(res3)) {
  55741. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
  55742. - }
  55743. - if (!ptr) {
  55744. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'");
  55745. - }
  55746. - arg3 = ptr;
  55747. - }
  55748. - try {
  55749. - std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3);
  55750. - }
  55751. - catch(std::out_of_range &_e) {
  55752. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55753. - }
  55754. - catch(std::invalid_argument &_e) {
  55755. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55756. - }
  55757. -
  55758. - resultobj = SWIG_Py_Void();
  55759. - if (SWIG_IsNewObj(res3)) delete arg3;
  55760. - return resultobj;
  55761. -fail:
  55762. - if (SWIG_IsNewObj(res3)) delete arg3;
  55763. - return NULL;
  55764. -}
  55765. -
  55766. -
  55767. -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55768. - PyObject *resultobj = 0;
  55769. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55770. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  55771. - void *argp1 = 0 ;
  55772. - int res1 = 0 ;
  55773. - PyObject * obj0 = 0 ;
  55774. - PyObject * obj1 = 0 ;
  55775. -
  55776. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___setitem__",&obj0,&obj1)) SWIG_fail;
  55777. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55778. - if (!SWIG_IsOK(res1)) {
  55779. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55780. - }
  55781. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55782. - {
  55783. - if (!PySlice_Check(obj1)) {
  55784. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  55785. - }
  55786. - arg2 = (PySliceObject *) obj1;
  55787. - }
  55788. - try {
  55789. - std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2);
  55790. - }
  55791. - catch(std::out_of_range &_e) {
  55792. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55793. - }
  55794. - catch(std::invalid_argument &_e) {
  55795. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55796. - }
  55797. -
  55798. - resultobj = SWIG_Py_Void();
  55799. - return resultobj;
  55800. -fail:
  55801. - return NULL;
  55802. -}
  55803. -
  55804. -
  55805. -SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55806. - PyObject *resultobj = 0;
  55807. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55808. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  55809. - void *argp1 = 0 ;
  55810. - int res1 = 0 ;
  55811. - PyObject * obj0 = 0 ;
  55812. - PyObject * obj1 = 0 ;
  55813. -
  55814. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail;
  55815. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55816. - if (!SWIG_IsOK(res1)) {
  55817. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55818. - }
  55819. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55820. - {
  55821. - if (!PySlice_Check(obj1)) {
  55822. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  55823. - }
  55824. - arg2 = (PySliceObject *) obj1;
  55825. - }
  55826. - try {
  55827. - std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2);
  55828. - }
  55829. - catch(std::out_of_range &_e) {
  55830. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55831. - }
  55832. - catch(std::invalid_argument &_e) {
  55833. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  55834. - }
  55835. -
  55836. - resultobj = SWIG_Py_Void();
  55837. - return resultobj;
  55838. -fail:
  55839. - return NULL;
  55840. -}
  55841. -
  55842. -
  55843. -SWIGINTERN PyObject *_wrap_IntVector___delitem__(PyObject *self, PyObject *args) {
  55844. - int argc;
  55845. - PyObject *argv[3];
  55846. - int ii;
  55847. -
  55848. - if (!PyTuple_Check(args)) SWIG_fail;
  55849. - argc = args ? (int)PyObject_Length(args) : 0;
  55850. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  55851. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  55852. - }
  55853. - if (argc == 2) {
  55854. - int _v;
  55855. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55856. - _v = SWIG_CheckState(res);
  55857. - if (_v) {
  55858. - {
  55859. - _v = PySlice_Check(argv[1]);
  55860. - }
  55861. - if (_v) {
  55862. - return _wrap_IntVector___delitem____SWIG_1(self, args);
  55863. - }
  55864. - }
  55865. - }
  55866. - if (argc == 2) {
  55867. - int _v;
  55868. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55869. - _v = SWIG_CheckState(res);
  55870. - if (_v) {
  55871. - {
  55872. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  55873. - _v = SWIG_CheckState(res);
  55874. - }
  55875. - if (_v) {
  55876. - return _wrap_IntVector___delitem____SWIG_0(self, args);
  55877. - }
  55878. - }
  55879. - }
  55880. -
  55881. -fail:
  55882. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___delitem__'.\n"
  55883. - " Possible C/C++ prototypes are:\n"
  55884. - " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n"
  55885. - " std::vector< int >::__delitem__(PySliceObject *)\n");
  55886. - return 0;
  55887. -}
  55888. -
  55889. -
  55890. -SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55891. - PyObject *resultobj = 0;
  55892. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55893. - std::vector< int >::difference_type arg2 ;
  55894. - void *argp1 = 0 ;
  55895. - int res1 = 0 ;
  55896. - ptrdiff_t val2 ;
  55897. - int ecode2 = 0 ;
  55898. - PyObject * obj0 = 0 ;
  55899. - PyObject * obj1 = 0 ;
  55900. - std::vector< int >::value_type *result = 0 ;
  55901. -
  55902. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail;
  55903. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55904. - if (!SWIG_IsOK(res1)) {
  55905. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'");
  55906. - }
  55907. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55908. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55909. - if (!SWIG_IsOK(ecode2)) {
  55910. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55911. - }
  55912. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  55913. - try {
  55914. - result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2);
  55915. - }
  55916. - catch(std::out_of_range &_e) {
  55917. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  55918. - }
  55919. -
  55920. - resultobj = SWIG_From_int(static_cast< int >(*result));
  55921. - return resultobj;
  55922. -fail:
  55923. - return NULL;
  55924. -}
  55925. -
  55926. -
  55927. -SWIGINTERN PyObject *_wrap_IntVector___getitem__(PyObject *self, PyObject *args) {
  55928. - int argc;
  55929. - PyObject *argv[3];
  55930. - int ii;
  55931. -
  55932. - if (!PyTuple_Check(args)) SWIG_fail;
  55933. - argc = args ? (int)PyObject_Length(args) : 0;
  55934. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  55935. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  55936. - }
  55937. - if (argc == 2) {
  55938. - int _v;
  55939. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55940. - _v = SWIG_CheckState(res);
  55941. - if (_v) {
  55942. - {
  55943. - _v = PySlice_Check(argv[1]);
  55944. - }
  55945. - if (_v) {
  55946. - return _wrap_IntVector___getitem____SWIG_0(self, args);
  55947. - }
  55948. - }
  55949. - }
  55950. - if (argc == 2) {
  55951. - int _v;
  55952. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  55953. - _v = SWIG_CheckState(res);
  55954. - if (_v) {
  55955. - {
  55956. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  55957. - _v = SWIG_CheckState(res);
  55958. - }
  55959. - if (_v) {
  55960. - return _wrap_IntVector___getitem____SWIG_1(self, args);
  55961. - }
  55962. - }
  55963. - }
  55964. -
  55965. -fail:
  55966. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___getitem__'.\n"
  55967. - " Possible C/C++ prototypes are:\n"
  55968. - " std::vector< int >::__getitem__(PySliceObject *)\n"
  55969. - " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n");
  55970. - return 0;
  55971. -}
  55972. -
  55973. -
  55974. -SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  55975. - PyObject *resultobj = 0;
  55976. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  55977. - std::vector< int >::difference_type arg2 ;
  55978. - std::vector< int >::value_type *arg3 = 0 ;
  55979. - void *argp1 = 0 ;
  55980. - int res1 = 0 ;
  55981. - ptrdiff_t val2 ;
  55982. - int ecode2 = 0 ;
  55983. - std::vector< int >::value_type temp3 ;
  55984. - int val3 ;
  55985. - int ecode3 = 0 ;
  55986. - PyObject * obj0 = 0 ;
  55987. - PyObject * obj1 = 0 ;
  55988. - PyObject * obj2 = 0 ;
  55989. -
  55990. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  55991. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  55992. - if (!SWIG_IsOK(res1)) {
  55993. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'");
  55994. - }
  55995. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  55996. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  55997. - if (!SWIG_IsOK(ecode2)) {
  55998. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  55999. - }
  56000. - arg2 = static_cast< std::vector< int >::difference_type >(val2);
  56001. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  56002. - if (!SWIG_IsOK(ecode3)) {
  56003. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  56004. - }
  56005. - temp3 = static_cast< std::vector< int >::value_type >(val3);
  56006. - arg3 = &temp3;
  56007. - try {
  56008. - std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3);
  56009. - }
  56010. - catch(std::out_of_range &_e) {
  56011. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  56012. - }
  56013. -
  56014. - resultobj = SWIG_Py_Void();
  56015. - return resultobj;
  56016. -fail:
  56017. - return NULL;
  56018. -}
  56019. -
  56020. -
  56021. -SWIGINTERN PyObject *_wrap_IntVector___setitem__(PyObject *self, PyObject *args) {
  56022. - int argc;
  56023. - PyObject *argv[4];
  56024. - int ii;
  56025. -
  56026. - if (!PyTuple_Check(args)) SWIG_fail;
  56027. - argc = args ? (int)PyObject_Length(args) : 0;
  56028. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  56029. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  56030. - }
  56031. - if (argc == 2) {
  56032. - int _v;
  56033. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56034. - _v = SWIG_CheckState(res);
  56035. - if (_v) {
  56036. - {
  56037. - _v = PySlice_Check(argv[1]);
  56038. - }
  56039. - if (_v) {
  56040. - return _wrap_IntVector___setitem____SWIG_1(self, args);
  56041. - }
  56042. - }
  56043. - }
  56044. - if (argc == 3) {
  56045. - int _v;
  56046. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56047. - _v = SWIG_CheckState(res);
  56048. - if (_v) {
  56049. - {
  56050. - _v = PySlice_Check(argv[1]);
  56051. - }
  56052. - if (_v) {
  56053. - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
  56054. - _v = SWIG_CheckState(res);
  56055. - if (_v) {
  56056. - return _wrap_IntVector___setitem____SWIG_0(self, args);
  56057. - }
  56058. - }
  56059. - }
  56060. - }
  56061. - if (argc == 3) {
  56062. - int _v;
  56063. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56064. - _v = SWIG_CheckState(res);
  56065. - if (_v) {
  56066. - {
  56067. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  56068. - _v = SWIG_CheckState(res);
  56069. - }
  56070. - if (_v) {
  56071. - {
  56072. - int res = SWIG_AsVal_int(argv[2], NULL);
  56073. - _v = SWIG_CheckState(res);
  56074. - }
  56075. - if (_v) {
  56076. - return _wrap_IntVector___setitem____SWIG_2(self, args);
  56077. - }
  56078. - }
  56079. - }
  56080. - }
  56081. -
  56082. -fail:
  56083. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setitem__'.\n"
  56084. - " Possible C/C++ prototypes are:\n"
  56085. - " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n"
  56086. - " std::vector< int >::__setitem__(PySliceObject *)\n"
  56087. - " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n");
  56088. - return 0;
  56089. -}
  56090. -
  56091. -
  56092. -SWIGINTERN PyObject *_wrap_IntVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56093. - PyObject *resultobj = 0;
  56094. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56095. - std::vector< int >::value_type *arg2 = 0 ;
  56096. - void *argp1 = 0 ;
  56097. - int res1 = 0 ;
  56098. - std::vector< int >::value_type temp2 ;
  56099. - int val2 ;
  56100. - int ecode2 = 0 ;
  56101. - PyObject * obj0 = 0 ;
  56102. - PyObject * obj1 = 0 ;
  56103. -
  56104. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_append",&obj0,&obj1)) SWIG_fail;
  56105. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56106. - if (!SWIG_IsOK(res1)) {
  56107. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_append" "', argument " "1"" of type '" "std::vector< int > *""'");
  56108. - }
  56109. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56110. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  56111. - if (!SWIG_IsOK(ecode2)) {
  56112. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  56113. - }
  56114. - temp2 = static_cast< std::vector< int >::value_type >(val2);
  56115. - arg2 = &temp2;
  56116. - std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2);
  56117. - resultobj = SWIG_Py_Void();
  56118. - return resultobj;
  56119. -fail:
  56120. - return NULL;
  56121. -}
  56122. -
  56123. -
  56124. -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56125. - PyObject *resultobj = 0;
  56126. - std::vector< int > *result = 0 ;
  56127. -
  56128. - if (!PyArg_ParseTuple(args,(char *)":new_IntVector")) SWIG_fail;
  56129. - result = (std::vector< int > *)new std::vector< int >();
  56130. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
  56131. - return resultobj;
  56132. -fail:
  56133. - return NULL;
  56134. -}
  56135. -
  56136. -
  56137. -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56138. - PyObject *resultobj = 0;
  56139. - std::vector< int > *arg1 = 0 ;
  56140. - int res1 = SWIG_OLDOBJ ;
  56141. - PyObject * obj0 = 0 ;
  56142. - std::vector< int > *result = 0 ;
  56143. -
  56144. - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail;
  56145. - {
  56146. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  56147. - res1 = swig::asptr(obj0, &ptr);
  56148. - if (!SWIG_IsOK(res1)) {
  56149. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'");
  56150. - }
  56151. - if (!ptr) {
  56152. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'");
  56153. - }
  56154. - arg1 = ptr;
  56155. - }
  56156. - result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
  56157. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
  56158. - if (SWIG_IsNewObj(res1)) delete arg1;
  56159. - return resultobj;
  56160. -fail:
  56161. - if (SWIG_IsNewObj(res1)) delete arg1;
  56162. - return NULL;
  56163. -}
  56164. -
  56165. -
  56166. -SWIGINTERN PyObject *_wrap_IntVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56167. - PyObject *resultobj = 0;
  56168. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56169. - void *argp1 = 0 ;
  56170. - int res1 = 0 ;
  56171. - PyObject * obj0 = 0 ;
  56172. - bool result;
  56173. -
  56174. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_empty",&obj0)) SWIG_fail;
  56175. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56176. - if (!SWIG_IsOK(res1)) {
  56177. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'");
  56178. - }
  56179. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56180. - result = (bool)((std::vector< int > const *)arg1)->empty();
  56181. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  56182. - return resultobj;
  56183. -fail:
  56184. - return NULL;
  56185. -}
  56186. -
  56187. -
  56188. -SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56189. - PyObject *resultobj = 0;
  56190. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56191. - void *argp1 = 0 ;
  56192. - int res1 = 0 ;
  56193. - PyObject * obj0 = 0 ;
  56194. - std::vector< int >::size_type result;
  56195. -
  56196. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_size",&obj0)) SWIG_fail;
  56197. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56198. - if (!SWIG_IsOK(res1)) {
  56199. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'");
  56200. - }
  56201. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56202. - result = ((std::vector< int > const *)arg1)->size();
  56203. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  56204. - return resultobj;
  56205. -fail:
  56206. - return NULL;
  56207. -}
  56208. -
  56209. -
  56210. -SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56211. - PyObject *resultobj = 0;
  56212. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56213. - void *argp1 = 0 ;
  56214. - int res1 = 0 ;
  56215. - PyObject * obj0 = 0 ;
  56216. -
  56217. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_clear",&obj0)) SWIG_fail;
  56218. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56219. - if (!SWIG_IsOK(res1)) {
  56220. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
  56221. - }
  56222. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56223. - (arg1)->clear();
  56224. - resultobj = SWIG_Py_Void();
  56225. - return resultobj;
  56226. -fail:
  56227. - return NULL;
  56228. -}
  56229. -
  56230. -
  56231. -SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56232. - PyObject *resultobj = 0;
  56233. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56234. - std::vector< int > *arg2 = 0 ;
  56235. - void *argp1 = 0 ;
  56236. - int res1 = 0 ;
  56237. - void *argp2 = 0 ;
  56238. - int res2 = 0 ;
  56239. - PyObject * obj0 = 0 ;
  56240. - PyObject * obj1 = 0 ;
  56241. -
  56242. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail;
  56243. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56244. - if (!SWIG_IsOK(res1)) {
  56245. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
  56246. - }
  56247. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56248. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 );
  56249. - if (!SWIG_IsOK(res2)) {
  56250. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
  56251. - }
  56252. - if (!argp2) {
  56253. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
  56254. - }
  56255. - arg2 = reinterpret_cast< std::vector< int > * >(argp2);
  56256. - (arg1)->swap(*arg2);
  56257. - resultobj = SWIG_Py_Void();
  56258. - return resultobj;
  56259. -fail:
  56260. - return NULL;
  56261. -}
  56262. -
  56263. -
  56264. -SWIGINTERN PyObject *_wrap_IntVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56265. - PyObject *resultobj = 0;
  56266. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56267. - void *argp1 = 0 ;
  56268. - int res1 = 0 ;
  56269. - PyObject * obj0 = 0 ;
  56270. - SwigValueWrapper< std::allocator< int > > result;
  56271. -
  56272. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_get_allocator",&obj0)) SWIG_fail;
  56273. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56274. - if (!SWIG_IsOK(res1)) {
  56275. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'");
  56276. - }
  56277. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56278. - result = ((std::vector< int > const *)arg1)->get_allocator();
  56279. - resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 );
  56280. - return resultobj;
  56281. -fail:
  56282. - return NULL;
  56283. -}
  56284. -
  56285. -
  56286. -SWIGINTERN PyObject *_wrap_IntVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56287. - PyObject *resultobj = 0;
  56288. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56289. - void *argp1 = 0 ;
  56290. - int res1 = 0 ;
  56291. - PyObject * obj0 = 0 ;
  56292. - std::vector< int >::iterator result;
  56293. -
  56294. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_begin",&obj0)) SWIG_fail;
  56295. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56296. - if (!SWIG_IsOK(res1)) {
  56297. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'");
  56298. - }
  56299. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56300. - result = (arg1)->begin();
  56301. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
  56302. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56303. - return resultobj;
  56304. -fail:
  56305. - return NULL;
  56306. -}
  56307. -
  56308. -
  56309. -SWIGINTERN PyObject *_wrap_IntVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56310. - PyObject *resultobj = 0;
  56311. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56312. - void *argp1 = 0 ;
  56313. - int res1 = 0 ;
  56314. - PyObject * obj0 = 0 ;
  56315. - std::vector< int >::iterator result;
  56316. -
  56317. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_end",&obj0)) SWIG_fail;
  56318. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56319. - if (!SWIG_IsOK(res1)) {
  56320. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_end" "', argument " "1"" of type '" "std::vector< int > *""'");
  56321. - }
  56322. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56323. - result = (arg1)->end();
  56324. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
  56325. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56326. - return resultobj;
  56327. -fail:
  56328. - return NULL;
  56329. -}
  56330. -
  56331. -
  56332. -SWIGINTERN PyObject *_wrap_IntVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56333. - PyObject *resultobj = 0;
  56334. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56335. - void *argp1 = 0 ;
  56336. - int res1 = 0 ;
  56337. - PyObject * obj0 = 0 ;
  56338. - std::vector< int >::reverse_iterator result;
  56339. -
  56340. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rbegin",&obj0)) SWIG_fail;
  56341. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56342. - if (!SWIG_IsOK(res1)) {
  56343. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'");
  56344. - }
  56345. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56346. - result = (arg1)->rbegin();
  56347. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
  56348. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56349. - return resultobj;
  56350. -fail:
  56351. - return NULL;
  56352. -}
  56353. -
  56354. -
  56355. -SWIGINTERN PyObject *_wrap_IntVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56356. - PyObject *resultobj = 0;
  56357. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56358. - void *argp1 = 0 ;
  56359. - int res1 = 0 ;
  56360. - PyObject * obj0 = 0 ;
  56361. - std::vector< int >::reverse_iterator result;
  56362. -
  56363. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rend",&obj0)) SWIG_fail;
  56364. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56365. - if (!SWIG_IsOK(res1)) {
  56366. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'");
  56367. - }
  56368. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56369. - result = (arg1)->rend();
  56370. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
  56371. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56372. - return resultobj;
  56373. -fail:
  56374. - return NULL;
  56375. -}
  56376. -
  56377. -
  56378. -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56379. - PyObject *resultobj = 0;
  56380. - std::vector< int >::size_type arg1 ;
  56381. - size_t val1 ;
  56382. - int ecode1 = 0 ;
  56383. - PyObject * obj0 = 0 ;
  56384. - std::vector< int > *result = 0 ;
  56385. -
  56386. - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail;
  56387. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  56388. - if (!SWIG_IsOK(ecode1)) {
  56389. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
  56390. - }
  56391. - arg1 = static_cast< std::vector< int >::size_type >(val1);
  56392. - result = (std::vector< int > *)new std::vector< int >(arg1);
  56393. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
  56394. - return resultobj;
  56395. -fail:
  56396. - return NULL;
  56397. -}
  56398. -
  56399. -
  56400. -SWIGINTERN PyObject *_wrap_IntVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56401. - PyObject *resultobj = 0;
  56402. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56403. - void *argp1 = 0 ;
  56404. - int res1 = 0 ;
  56405. - PyObject * obj0 = 0 ;
  56406. -
  56407. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop_back",&obj0)) SWIG_fail;
  56408. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56409. - if (!SWIG_IsOK(res1)) {
  56410. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'");
  56411. - }
  56412. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56413. - (arg1)->pop_back();
  56414. - resultobj = SWIG_Py_Void();
  56415. - return resultobj;
  56416. -fail:
  56417. - return NULL;
  56418. -}
  56419. -
  56420. -
  56421. -SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56422. - PyObject *resultobj = 0;
  56423. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56424. - std::vector< int >::size_type arg2 ;
  56425. - void *argp1 = 0 ;
  56426. - int res1 = 0 ;
  56427. - size_t val2 ;
  56428. - int ecode2 = 0 ;
  56429. - PyObject * obj0 = 0 ;
  56430. - PyObject * obj1 = 0 ;
  56431. -
  56432. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail;
  56433. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56434. - if (!SWIG_IsOK(res1)) {
  56435. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
  56436. - }
  56437. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56438. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  56439. - if (!SWIG_IsOK(ecode2)) {
  56440. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  56441. - }
  56442. - arg2 = static_cast< std::vector< int >::size_type >(val2);
  56443. - (arg1)->resize(arg2);
  56444. - resultobj = SWIG_Py_Void();
  56445. - return resultobj;
  56446. -fail:
  56447. - return NULL;
  56448. -}
  56449. -
  56450. -
  56451. -SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56452. - PyObject *resultobj = 0;
  56453. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56454. - std::vector< int >::iterator arg2 ;
  56455. - void *argp1 = 0 ;
  56456. - int res1 = 0 ;
  56457. - swig::SwigPyIterator *iter2 = 0 ;
  56458. - int res2 ;
  56459. - PyObject * obj0 = 0 ;
  56460. - PyObject * obj1 = 0 ;
  56461. - std::vector< int >::iterator result;
  56462. -
  56463. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_erase",&obj0,&obj1)) SWIG_fail;
  56464. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56465. - if (!SWIG_IsOK(res1)) {
  56466. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
  56467. - }
  56468. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56469. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  56470. - if (!SWIG_IsOK(res2) || !iter2) {
  56471. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56472. - } else {
  56473. - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
  56474. - if (iter_t) {
  56475. - arg2 = iter_t->get_current();
  56476. - } else {
  56477. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56478. - }
  56479. - }
  56480. - result = (arg1)->erase(arg2);
  56481. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
  56482. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56483. - return resultobj;
  56484. -fail:
  56485. - return NULL;
  56486. -}
  56487. -
  56488. -
  56489. -SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56490. - PyObject *resultobj = 0;
  56491. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56492. - std::vector< int >::iterator arg2 ;
  56493. - std::vector< int >::iterator arg3 ;
  56494. - void *argp1 = 0 ;
  56495. - int res1 = 0 ;
  56496. - swig::SwigPyIterator *iter2 = 0 ;
  56497. - int res2 ;
  56498. - swig::SwigPyIterator *iter3 = 0 ;
  56499. - int res3 ;
  56500. - PyObject * obj0 = 0 ;
  56501. - PyObject * obj1 = 0 ;
  56502. - PyObject * obj2 = 0 ;
  56503. - std::vector< int >::iterator result;
  56504. -
  56505. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  56506. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56507. - if (!SWIG_IsOK(res1)) {
  56508. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'");
  56509. - }
  56510. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56511. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  56512. - if (!SWIG_IsOK(res2) || !iter2) {
  56513. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56514. - } else {
  56515. - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
  56516. - if (iter_t) {
  56517. - arg2 = iter_t->get_current();
  56518. - } else {
  56519. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56520. - }
  56521. - }
  56522. - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  56523. - if (!SWIG_IsOK(res3) || !iter3) {
  56524. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
  56525. - } else {
  56526. - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter3);
  56527. - if (iter_t) {
  56528. - arg3 = iter_t->get_current();
  56529. - } else {
  56530. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
  56531. - }
  56532. - }
  56533. - result = (arg1)->erase(arg2,arg3);
  56534. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
  56535. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56536. - return resultobj;
  56537. -fail:
  56538. - return NULL;
  56539. -}
  56540. -
  56541. -
  56542. -SWIGINTERN PyObject *_wrap_IntVector_erase(PyObject *self, PyObject *args) {
  56543. - int argc;
  56544. - PyObject *argv[4];
  56545. - int ii;
  56546. -
  56547. - if (!PyTuple_Check(args)) SWIG_fail;
  56548. - argc = args ? (int)PyObject_Length(args) : 0;
  56549. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  56550. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  56551. - }
  56552. - if (argc == 2) {
  56553. - int _v;
  56554. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56555. - _v = SWIG_CheckState(res);
  56556. - if (_v) {
  56557. - swig::SwigPyIterator *iter = 0;
  56558. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  56559. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
  56560. - if (_v) {
  56561. - return _wrap_IntVector_erase__SWIG_0(self, args);
  56562. - }
  56563. - }
  56564. - }
  56565. - if (argc == 3) {
  56566. - int _v;
  56567. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56568. - _v = SWIG_CheckState(res);
  56569. - if (_v) {
  56570. - swig::SwigPyIterator *iter = 0;
  56571. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  56572. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
  56573. - if (_v) {
  56574. - swig::SwigPyIterator *iter = 0;
  56575. - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  56576. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
  56577. - if (_v) {
  56578. - return _wrap_IntVector_erase__SWIG_1(self, args);
  56579. - }
  56580. - }
  56581. - }
  56582. - }
  56583. -
  56584. -fail:
  56585. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_erase'.\n"
  56586. - " Possible C/C++ prototypes are:\n"
  56587. - " std::vector< int >::erase(std::vector< int >::iterator)\n"
  56588. - " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n");
  56589. - return 0;
  56590. -}
  56591. -
  56592. -
  56593. -SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56594. - PyObject *resultobj = 0;
  56595. - std::vector< int >::size_type arg1 ;
  56596. - std::vector< int >::value_type *arg2 = 0 ;
  56597. - size_t val1 ;
  56598. - int ecode1 = 0 ;
  56599. - std::vector< int >::value_type temp2 ;
  56600. - int val2 ;
  56601. - int ecode2 = 0 ;
  56602. - PyObject * obj0 = 0 ;
  56603. - PyObject * obj1 = 0 ;
  56604. - std::vector< int > *result = 0 ;
  56605. -
  56606. - if (!PyArg_ParseTuple(args,(char *)"OO:new_IntVector",&obj0,&obj1)) SWIG_fail;
  56607. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  56608. - if (!SWIG_IsOK(ecode1)) {
  56609. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
  56610. - }
  56611. - arg1 = static_cast< std::vector< int >::size_type >(val1);
  56612. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  56613. - if (!SWIG_IsOK(ecode2)) {
  56614. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  56615. - }
  56616. - temp2 = static_cast< std::vector< int >::value_type >(val2);
  56617. - arg2 = &temp2;
  56618. - result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2);
  56619. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 );
  56620. - return resultobj;
  56621. -fail:
  56622. - return NULL;
  56623. -}
  56624. -
  56625. -
  56626. -SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *self, PyObject *args) {
  56627. - int argc;
  56628. - PyObject *argv[3];
  56629. - int ii;
  56630. -
  56631. - if (!PyTuple_Check(args)) SWIG_fail;
  56632. - argc = args ? (int)PyObject_Length(args) : 0;
  56633. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  56634. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  56635. - }
  56636. - if (argc == 0) {
  56637. - return _wrap_new_IntVector__SWIG_0(self, args);
  56638. - }
  56639. - if (argc == 1) {
  56640. - int _v;
  56641. - {
  56642. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  56643. - _v = SWIG_CheckState(res);
  56644. - }
  56645. - if (_v) {
  56646. - return _wrap_new_IntVector__SWIG_2(self, args);
  56647. - }
  56648. - }
  56649. - if (argc == 1) {
  56650. - int _v;
  56651. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56652. - _v = SWIG_CheckState(res);
  56653. - if (_v) {
  56654. - return _wrap_new_IntVector__SWIG_1(self, args);
  56655. - }
  56656. - }
  56657. - if (argc == 2) {
  56658. - int _v;
  56659. - {
  56660. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  56661. - _v = SWIG_CheckState(res);
  56662. - }
  56663. - if (_v) {
  56664. - {
  56665. - int res = SWIG_AsVal_int(argv[1], NULL);
  56666. - _v = SWIG_CheckState(res);
  56667. - }
  56668. - if (_v) {
  56669. - return _wrap_new_IntVector__SWIG_3(self, args);
  56670. - }
  56671. - }
  56672. - }
  56673. -
  56674. -fail:
  56675. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVector'.\n"
  56676. - " Possible C/C++ prototypes are:\n"
  56677. - " std::vector< int >::vector()\n"
  56678. - " std::vector< int >::vector(std::vector< int > const &)\n"
  56679. - " std::vector< int >::vector(std::vector< int >::size_type)\n"
  56680. - " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  56681. - return 0;
  56682. -}
  56683. -
  56684. -
  56685. -SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56686. - PyObject *resultobj = 0;
  56687. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56688. - std::vector< int >::value_type *arg2 = 0 ;
  56689. - void *argp1 = 0 ;
  56690. - int res1 = 0 ;
  56691. - std::vector< int >::value_type temp2 ;
  56692. - int val2 ;
  56693. - int ecode2 = 0 ;
  56694. - PyObject * obj0 = 0 ;
  56695. - PyObject * obj1 = 0 ;
  56696. -
  56697. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail;
  56698. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56699. - if (!SWIG_IsOK(res1)) {
  56700. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
  56701. - }
  56702. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56703. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  56704. - if (!SWIG_IsOK(ecode2)) {
  56705. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  56706. - }
  56707. - temp2 = static_cast< std::vector< int >::value_type >(val2);
  56708. - arg2 = &temp2;
  56709. - (arg1)->push_back((std::vector< int >::value_type const &)*arg2);
  56710. - resultobj = SWIG_Py_Void();
  56711. - return resultobj;
  56712. -fail:
  56713. - return NULL;
  56714. -}
  56715. -
  56716. -
  56717. -SWIGINTERN PyObject *_wrap_IntVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56718. - PyObject *resultobj = 0;
  56719. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56720. - void *argp1 = 0 ;
  56721. - int res1 = 0 ;
  56722. - PyObject * obj0 = 0 ;
  56723. - std::vector< int >::value_type *result = 0 ;
  56724. -
  56725. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_front",&obj0)) SWIG_fail;
  56726. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56727. - if (!SWIG_IsOK(res1)) {
  56728. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'");
  56729. - }
  56730. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56731. - result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front();
  56732. - resultobj = SWIG_From_int(static_cast< int >(*result));
  56733. - return resultobj;
  56734. -fail:
  56735. - return NULL;
  56736. -}
  56737. -
  56738. -
  56739. -SWIGINTERN PyObject *_wrap_IntVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56740. - PyObject *resultobj = 0;
  56741. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56742. - void *argp1 = 0 ;
  56743. - int res1 = 0 ;
  56744. - PyObject * obj0 = 0 ;
  56745. - std::vector< int >::value_type *result = 0 ;
  56746. -
  56747. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_back",&obj0)) SWIG_fail;
  56748. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56749. - if (!SWIG_IsOK(res1)) {
  56750. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'");
  56751. - }
  56752. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56753. - result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back();
  56754. - resultobj = SWIG_From_int(static_cast< int >(*result));
  56755. - return resultobj;
  56756. -fail:
  56757. - return NULL;
  56758. -}
  56759. -
  56760. -
  56761. -SWIGINTERN PyObject *_wrap_IntVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56762. - PyObject *resultobj = 0;
  56763. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56764. - std::vector< int >::size_type arg2 ;
  56765. - std::vector< int >::value_type *arg3 = 0 ;
  56766. - void *argp1 = 0 ;
  56767. - int res1 = 0 ;
  56768. - size_t val2 ;
  56769. - int ecode2 = 0 ;
  56770. - std::vector< int >::value_type temp3 ;
  56771. - int val3 ;
  56772. - int ecode3 = 0 ;
  56773. - PyObject * obj0 = 0 ;
  56774. - PyObject * obj1 = 0 ;
  56775. - PyObject * obj2 = 0 ;
  56776. -
  56777. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  56778. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56779. - if (!SWIG_IsOK(res1)) {
  56780. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'");
  56781. - }
  56782. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56783. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  56784. - if (!SWIG_IsOK(ecode2)) {
  56785. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  56786. - }
  56787. - arg2 = static_cast< std::vector< int >::size_type >(val2);
  56788. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  56789. - if (!SWIG_IsOK(ecode3)) {
  56790. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  56791. - }
  56792. - temp3 = static_cast< std::vector< int >::value_type >(val3);
  56793. - arg3 = &temp3;
  56794. - (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3);
  56795. - resultobj = SWIG_Py_Void();
  56796. - return resultobj;
  56797. -fail:
  56798. - return NULL;
  56799. -}
  56800. -
  56801. -
  56802. -SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56803. - PyObject *resultobj = 0;
  56804. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56805. - std::vector< int >::size_type arg2 ;
  56806. - std::vector< int >::value_type *arg3 = 0 ;
  56807. - void *argp1 = 0 ;
  56808. - int res1 = 0 ;
  56809. - size_t val2 ;
  56810. - int ecode2 = 0 ;
  56811. - std::vector< int >::value_type temp3 ;
  56812. - int val3 ;
  56813. - int ecode3 = 0 ;
  56814. - PyObject * obj0 = 0 ;
  56815. - PyObject * obj1 = 0 ;
  56816. - PyObject * obj2 = 0 ;
  56817. -
  56818. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  56819. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56820. - if (!SWIG_IsOK(res1)) {
  56821. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
  56822. - }
  56823. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56824. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  56825. - if (!SWIG_IsOK(ecode2)) {
  56826. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  56827. - }
  56828. - arg2 = static_cast< std::vector< int >::size_type >(val2);
  56829. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  56830. - if (!SWIG_IsOK(ecode3)) {
  56831. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  56832. - }
  56833. - temp3 = static_cast< std::vector< int >::value_type >(val3);
  56834. - arg3 = &temp3;
  56835. - (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3);
  56836. - resultobj = SWIG_Py_Void();
  56837. - return resultobj;
  56838. -fail:
  56839. - return NULL;
  56840. -}
  56841. -
  56842. -
  56843. -SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *self, PyObject *args) {
  56844. - int argc;
  56845. - PyObject *argv[4];
  56846. - int ii;
  56847. -
  56848. - if (!PyTuple_Check(args)) SWIG_fail;
  56849. - argc = args ? (int)PyObject_Length(args) : 0;
  56850. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  56851. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  56852. - }
  56853. - if (argc == 2) {
  56854. - int _v;
  56855. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56856. - _v = SWIG_CheckState(res);
  56857. - if (_v) {
  56858. - {
  56859. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  56860. - _v = SWIG_CheckState(res);
  56861. - }
  56862. - if (_v) {
  56863. - return _wrap_IntVector_resize__SWIG_0(self, args);
  56864. - }
  56865. - }
  56866. - }
  56867. - if (argc == 3) {
  56868. - int _v;
  56869. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  56870. - _v = SWIG_CheckState(res);
  56871. - if (_v) {
  56872. - {
  56873. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  56874. - _v = SWIG_CheckState(res);
  56875. - }
  56876. - if (_v) {
  56877. - {
  56878. - int res = SWIG_AsVal_int(argv[2], NULL);
  56879. - _v = SWIG_CheckState(res);
  56880. - }
  56881. - if (_v) {
  56882. - return _wrap_IntVector_resize__SWIG_1(self, args);
  56883. - }
  56884. - }
  56885. - }
  56886. - }
  56887. -
  56888. -fail:
  56889. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_resize'.\n"
  56890. - " Possible C/C++ prototypes are:\n"
  56891. - " std::vector< int >::resize(std::vector< int >::size_type)\n"
  56892. - " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  56893. - return 0;
  56894. -}
  56895. -
  56896. -
  56897. -SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56898. - PyObject *resultobj = 0;
  56899. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56900. - std::vector< int >::iterator arg2 ;
  56901. - std::vector< int >::value_type *arg3 = 0 ;
  56902. - void *argp1 = 0 ;
  56903. - int res1 = 0 ;
  56904. - swig::SwigPyIterator *iter2 = 0 ;
  56905. - int res2 ;
  56906. - std::vector< int >::value_type temp3 ;
  56907. - int val3 ;
  56908. - int ecode3 = 0 ;
  56909. - PyObject * obj0 = 0 ;
  56910. - PyObject * obj1 = 0 ;
  56911. - PyObject * obj2 = 0 ;
  56912. - std::vector< int >::iterator result;
  56913. -
  56914. - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  56915. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56916. - if (!SWIG_IsOK(res1)) {
  56917. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
  56918. - }
  56919. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56920. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  56921. - if (!SWIG_IsOK(res2) || !iter2) {
  56922. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56923. - } else {
  56924. - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
  56925. - if (iter_t) {
  56926. - arg2 = iter_t->get_current();
  56927. - } else {
  56928. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56929. - }
  56930. - }
  56931. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  56932. - if (!SWIG_IsOK(ecode3)) {
  56933. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  56934. - }
  56935. - temp3 = static_cast< std::vector< int >::value_type >(val3);
  56936. - arg3 = &temp3;
  56937. - result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3);
  56938. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
  56939. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  56940. - return resultobj;
  56941. -fail:
  56942. - return NULL;
  56943. -}
  56944. -
  56945. -
  56946. -SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  56947. - PyObject *resultobj = 0;
  56948. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  56949. - std::vector< int >::iterator arg2 ;
  56950. - std::vector< int >::size_type arg3 ;
  56951. - std::vector< int >::value_type *arg4 = 0 ;
  56952. - void *argp1 = 0 ;
  56953. - int res1 = 0 ;
  56954. - swig::SwigPyIterator *iter2 = 0 ;
  56955. - int res2 ;
  56956. - size_t val3 ;
  56957. - int ecode3 = 0 ;
  56958. - std::vector< int >::value_type temp4 ;
  56959. - int val4 ;
  56960. - int ecode4 = 0 ;
  56961. - PyObject * obj0 = 0 ;
  56962. - PyObject * obj1 = 0 ;
  56963. - PyObject * obj2 = 0 ;
  56964. - PyObject * obj3 = 0 ;
  56965. -
  56966. - if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  56967. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  56968. - if (!SWIG_IsOK(res1)) {
  56969. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'");
  56970. - }
  56971. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  56972. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  56973. - if (!SWIG_IsOK(res2) || !iter2) {
  56974. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56975. - } else {
  56976. - swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
  56977. - if (iter_t) {
  56978. - arg2 = iter_t->get_current();
  56979. - } else {
  56980. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  56981. - }
  56982. - }
  56983. - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  56984. - if (!SWIG_IsOK(ecode3)) {
  56985. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'");
  56986. - }
  56987. - arg3 = static_cast< std::vector< int >::size_type >(val3);
  56988. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  56989. - if (!SWIG_IsOK(ecode4)) {
  56990. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'");
  56991. - }
  56992. - temp4 = static_cast< std::vector< int >::value_type >(val4);
  56993. - arg4 = &temp4;
  56994. - (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4);
  56995. - resultobj = SWIG_Py_Void();
  56996. - return resultobj;
  56997. -fail:
  56998. - return NULL;
  56999. -}
  57000. -
  57001. -
  57002. -SWIGINTERN PyObject *_wrap_IntVector_insert(PyObject *self, PyObject *args) {
  57003. - int argc;
  57004. - PyObject *argv[5];
  57005. - int ii;
  57006. -
  57007. - if (!PyTuple_Check(args)) SWIG_fail;
  57008. - argc = args ? (int)PyObject_Length(args) : 0;
  57009. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  57010. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  57011. - }
  57012. - if (argc == 3) {
  57013. - int _v;
  57014. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  57015. - _v = SWIG_CheckState(res);
  57016. - if (_v) {
  57017. - swig::SwigPyIterator *iter = 0;
  57018. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  57019. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
  57020. - if (_v) {
  57021. - {
  57022. - int res = SWIG_AsVal_int(argv[2], NULL);
  57023. - _v = SWIG_CheckState(res);
  57024. - }
  57025. - if (_v) {
  57026. - return _wrap_IntVector_insert__SWIG_0(self, args);
  57027. - }
  57028. - }
  57029. - }
  57030. - }
  57031. - if (argc == 4) {
  57032. - int _v;
  57033. - int res = swig::asptr(argv[0], (std::vector<int,std::allocator< int > >**)(0));
  57034. - _v = SWIG_CheckState(res);
  57035. - if (_v) {
  57036. - swig::SwigPyIterator *iter = 0;
  57037. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  57038. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
  57039. - if (_v) {
  57040. - {
  57041. - int res = SWIG_AsVal_size_t(argv[2], NULL);
  57042. - _v = SWIG_CheckState(res);
  57043. - }
  57044. - if (_v) {
  57045. - {
  57046. - int res = SWIG_AsVal_int(argv[3], NULL);
  57047. - _v = SWIG_CheckState(res);
  57048. - }
  57049. - if (_v) {
  57050. - return _wrap_IntVector_insert__SWIG_1(self, args);
  57051. - }
  57052. - }
  57053. - }
  57054. - }
  57055. - }
  57056. -
  57057. -fail:
  57058. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_insert'.\n"
  57059. - " Possible C/C++ prototypes are:\n"
  57060. - " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n"
  57061. - " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  57062. - return 0;
  57063. -}
  57064. -
  57065. -
  57066. -SWIGINTERN PyObject *_wrap_IntVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57067. - PyObject *resultobj = 0;
  57068. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  57069. - std::vector< int >::size_type arg2 ;
  57070. - void *argp1 = 0 ;
  57071. - int res1 = 0 ;
  57072. - size_t val2 ;
  57073. - int ecode2 = 0 ;
  57074. - PyObject * obj0 = 0 ;
  57075. - PyObject * obj1 = 0 ;
  57076. -
  57077. - if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_reserve",&obj0,&obj1)) SWIG_fail;
  57078. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  57079. - if (!SWIG_IsOK(res1)) {
  57080. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'");
  57081. - }
  57082. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  57083. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  57084. - if (!SWIG_IsOK(ecode2)) {
  57085. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  57086. - }
  57087. - arg2 = static_cast< std::vector< int >::size_type >(val2);
  57088. - (arg1)->reserve(arg2);
  57089. - resultobj = SWIG_Py_Void();
  57090. - return resultobj;
  57091. -fail:
  57092. - return NULL;
  57093. -}
  57094. -
  57095. -
  57096. -SWIGINTERN PyObject *_wrap_IntVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57097. - PyObject *resultobj = 0;
  57098. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  57099. - void *argp1 = 0 ;
  57100. - int res1 = 0 ;
  57101. - PyObject * obj0 = 0 ;
  57102. - std::vector< int >::size_type result;
  57103. -
  57104. - if (!PyArg_ParseTuple(args,(char *)"O:IntVector_capacity",&obj0)) SWIG_fail;
  57105. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 );
  57106. - if (!SWIG_IsOK(res1)) {
  57107. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'");
  57108. - }
  57109. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  57110. - result = ((std::vector< int > const *)arg1)->capacity();
  57111. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  57112. - return resultobj;
  57113. -fail:
  57114. - return NULL;
  57115. -}
  57116. -
  57117. -
  57118. -SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57119. - PyObject *resultobj = 0;
  57120. - std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  57121. - void *argp1 = 0 ;
  57122. - int res1 = 0 ;
  57123. - PyObject * obj0 = 0 ;
  57124. -
  57125. - if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVector",&obj0)) SWIG_fail;
  57126. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 );
  57127. - if (!SWIG_IsOK(res1)) {
  57128. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'");
  57129. - }
  57130. - arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  57131. - delete arg1;
  57132. - resultobj = SWIG_Py_Void();
  57133. - return resultobj;
  57134. -fail:
  57135. - return NULL;
  57136. -}
  57137. -
  57138. -
  57139. -SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57140. - PyObject *obj;
  57141. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  57142. - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj));
  57143. - return SWIG_Py_Void();
  57144. -}
  57145. -
  57146. -SWIGINTERN PyObject *_wrap_DoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57147. - PyObject *resultobj = 0;
  57148. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57149. - PyObject **arg2 = (PyObject **) 0 ;
  57150. - void *argp1 = 0 ;
  57151. - int res1 = 0 ;
  57152. - PyObject * obj0 = 0 ;
  57153. - swig::SwigPyIterator *result = 0 ;
  57154. -
  57155. - arg2 = &obj0;
  57156. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_iterator",&obj0)) SWIG_fail;
  57157. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57158. - if (!SWIG_IsOK(res1)) {
  57159. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_iterator" "', argument " "1"" of type '" "std::vector< double > *""'");
  57160. - }
  57161. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57162. - result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2);
  57163. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  57164. - return resultobj;
  57165. -fail:
  57166. - return NULL;
  57167. -}
  57168. -
  57169. -
  57170. -SWIGINTERN PyObject *_wrap_DoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57171. - PyObject *resultobj = 0;
  57172. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57173. - void *argp1 = 0 ;
  57174. - int res1 = 0 ;
  57175. - PyObject * obj0 = 0 ;
  57176. - bool result;
  57177. -
  57178. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___nonzero__",&obj0)) SWIG_fail;
  57179. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57180. - if (!SWIG_IsOK(res1)) {
  57181. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'");
  57182. - }
  57183. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57184. - result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1);
  57185. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  57186. - return resultobj;
  57187. -fail:
  57188. - return NULL;
  57189. -}
  57190. -
  57191. -
  57192. -SWIGINTERN PyObject *_wrap_DoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57193. - PyObject *resultobj = 0;
  57194. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57195. - void *argp1 = 0 ;
  57196. - int res1 = 0 ;
  57197. - PyObject * obj0 = 0 ;
  57198. - bool result;
  57199. -
  57200. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___bool__",&obj0)) SWIG_fail;
  57201. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57202. - if (!SWIG_IsOK(res1)) {
  57203. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'");
  57204. - }
  57205. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57206. - result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1);
  57207. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  57208. - return resultobj;
  57209. -fail:
  57210. - return NULL;
  57211. -}
  57212. -
  57213. -
  57214. -SWIGINTERN PyObject *_wrap_DoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57215. - PyObject *resultobj = 0;
  57216. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57217. - void *argp1 = 0 ;
  57218. - int res1 = 0 ;
  57219. - PyObject * obj0 = 0 ;
  57220. - std::vector< double >::size_type result;
  57221. -
  57222. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___len__",&obj0)) SWIG_fail;
  57223. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57224. - if (!SWIG_IsOK(res1)) {
  57225. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___len__" "', argument " "1"" of type '" "std::vector< double > const *""'");
  57226. - }
  57227. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57228. - result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1);
  57229. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  57230. - return resultobj;
  57231. -fail:
  57232. - return NULL;
  57233. -}
  57234. -
  57235. -
  57236. -SWIGINTERN PyObject *_wrap_DoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57237. - PyObject *resultobj = 0;
  57238. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57239. - void *argp1 = 0 ;
  57240. - int res1 = 0 ;
  57241. - PyObject * obj0 = 0 ;
  57242. - std::vector< double >::value_type result;
  57243. -
  57244. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop",&obj0)) SWIG_fail;
  57245. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57246. - if (!SWIG_IsOK(res1)) {
  57247. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'");
  57248. - }
  57249. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57250. - try {
  57251. - result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1);
  57252. - }
  57253. - catch(std::out_of_range &_e) {
  57254. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57255. - }
  57256. -
  57257. - resultobj = SWIG_From_double(static_cast< double >(result));
  57258. - return resultobj;
  57259. -fail:
  57260. - return NULL;
  57261. -}
  57262. -
  57263. -
  57264. -SWIGINTERN PyObject *_wrap_DoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57265. - PyObject *resultobj = 0;
  57266. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57267. - std::vector< double >::difference_type arg2 ;
  57268. - std::vector< double >::difference_type arg3 ;
  57269. - void *argp1 = 0 ;
  57270. - int res1 = 0 ;
  57271. - ptrdiff_t val2 ;
  57272. - int ecode2 = 0 ;
  57273. - ptrdiff_t val3 ;
  57274. - int ecode3 = 0 ;
  57275. - PyObject * obj0 = 0 ;
  57276. - PyObject * obj1 = 0 ;
  57277. - PyObject * obj2 = 0 ;
  57278. - std::vector< double,std::allocator< double > > *result = 0 ;
  57279. -
  57280. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  57281. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57282. - if (!SWIG_IsOK(res1)) {
  57283. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57284. - }
  57285. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57286. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57287. - if (!SWIG_IsOK(ecode2)) {
  57288. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57289. - }
  57290. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57291. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  57292. - if (!SWIG_IsOK(ecode3)) {
  57293. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  57294. - }
  57295. - arg3 = static_cast< std::vector< double >::difference_type >(val3);
  57296. - try {
  57297. - result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3);
  57298. - }
  57299. - catch(std::out_of_range &_e) {
  57300. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57301. - }
  57302. - catch(std::invalid_argument &_e) {
  57303. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57304. - }
  57305. -
  57306. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 );
  57307. - return resultobj;
  57308. -fail:
  57309. - return NULL;
  57310. -}
  57311. -
  57312. -
  57313. -SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57314. - PyObject *resultobj = 0;
  57315. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57316. - std::vector< double >::difference_type arg2 ;
  57317. - std::vector< double >::difference_type arg3 ;
  57318. - std::vector< double,std::allocator< double > > *arg4 = 0 ;
  57319. - void *argp1 = 0 ;
  57320. - int res1 = 0 ;
  57321. - ptrdiff_t val2 ;
  57322. - int ecode2 = 0 ;
  57323. - ptrdiff_t val3 ;
  57324. - int ecode3 = 0 ;
  57325. - int res4 = SWIG_OLDOBJ ;
  57326. - PyObject * obj0 = 0 ;
  57327. - PyObject * obj1 = 0 ;
  57328. - PyObject * obj2 = 0 ;
  57329. - PyObject * obj3 = 0 ;
  57330. -
  57331. - if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  57332. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57333. - if (!SWIG_IsOK(res1)) {
  57334. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57335. - }
  57336. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57337. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57338. - if (!SWIG_IsOK(ecode2)) {
  57339. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57340. - }
  57341. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57342. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  57343. - if (!SWIG_IsOK(ecode3)) {
  57344. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  57345. - }
  57346. - arg3 = static_cast< std::vector< double >::difference_type >(val3);
  57347. - {
  57348. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  57349. - res4 = swig::asptr(obj3, &ptr);
  57350. - if (!SWIG_IsOK(res4)) {
  57351. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'");
  57352. - }
  57353. - if (!ptr) {
  57354. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'");
  57355. - }
  57356. - arg4 = ptr;
  57357. - }
  57358. - try {
  57359. - std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
  57360. - }
  57361. - catch(std::out_of_range &_e) {
  57362. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57363. - }
  57364. - catch(std::invalid_argument &_e) {
  57365. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57366. - }
  57367. -
  57368. - resultobj = SWIG_Py_Void();
  57369. - if (SWIG_IsNewObj(res4)) delete arg4;
  57370. - return resultobj;
  57371. -fail:
  57372. - if (SWIG_IsNewObj(res4)) delete arg4;
  57373. - return NULL;
  57374. -}
  57375. -
  57376. -
  57377. -SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57378. - PyObject *resultobj = 0;
  57379. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57380. - std::vector< double >::difference_type arg2 ;
  57381. - std::vector< double >::difference_type arg3 ;
  57382. - void *argp1 = 0 ;
  57383. - int res1 = 0 ;
  57384. - ptrdiff_t val2 ;
  57385. - int ecode2 = 0 ;
  57386. - ptrdiff_t val3 ;
  57387. - int ecode3 = 0 ;
  57388. - PyObject * obj0 = 0 ;
  57389. - PyObject * obj1 = 0 ;
  57390. - PyObject * obj2 = 0 ;
  57391. -
  57392. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  57393. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57394. - if (!SWIG_IsOK(res1)) {
  57395. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57396. - }
  57397. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57398. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57399. - if (!SWIG_IsOK(ecode2)) {
  57400. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57401. - }
  57402. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57403. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  57404. - if (!SWIG_IsOK(ecode3)) {
  57405. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  57406. - }
  57407. - arg3 = static_cast< std::vector< double >::difference_type >(val3);
  57408. - try {
  57409. - std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3);
  57410. - }
  57411. - catch(std::out_of_range &_e) {
  57412. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57413. - }
  57414. - catch(std::invalid_argument &_e) {
  57415. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57416. - }
  57417. -
  57418. - resultobj = SWIG_Py_Void();
  57419. - return resultobj;
  57420. -fail:
  57421. - return NULL;
  57422. -}
  57423. -
  57424. -
  57425. -SWIGINTERN PyObject *_wrap_DoubleVector___setslice__(PyObject *self, PyObject *args) {
  57426. - int argc;
  57427. - PyObject *argv[5];
  57428. - int ii;
  57429. -
  57430. - if (!PyTuple_Check(args)) SWIG_fail;
  57431. - argc = args ? (int)PyObject_Length(args) : 0;
  57432. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  57433. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  57434. - }
  57435. - if (argc == 3) {
  57436. - int _v;
  57437. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57438. - _v = SWIG_CheckState(res);
  57439. - if (_v) {
  57440. - {
  57441. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  57442. - _v = SWIG_CheckState(res);
  57443. - }
  57444. - if (_v) {
  57445. - {
  57446. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  57447. - _v = SWIG_CheckState(res);
  57448. - }
  57449. - if (_v) {
  57450. - return _wrap_DoubleVector___setslice____SWIG_1(self, args);
  57451. - }
  57452. - }
  57453. - }
  57454. - }
  57455. - if (argc == 4) {
  57456. - int _v;
  57457. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57458. - _v = SWIG_CheckState(res);
  57459. - if (_v) {
  57460. - {
  57461. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  57462. - _v = SWIG_CheckState(res);
  57463. - }
  57464. - if (_v) {
  57465. - {
  57466. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  57467. - _v = SWIG_CheckState(res);
  57468. - }
  57469. - if (_v) {
  57470. - int res = swig::asptr(argv[3], (std::vector<double,std::allocator< double > >**)(0));
  57471. - _v = SWIG_CheckState(res);
  57472. - if (_v) {
  57473. - return _wrap_DoubleVector___setslice____SWIG_0(self, args);
  57474. - }
  57475. - }
  57476. - }
  57477. - }
  57478. - }
  57479. -
  57480. -fail:
  57481. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setslice__'.\n"
  57482. - " Possible C/C++ prototypes are:\n"
  57483. - " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n"
  57484. - " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n");
  57485. - return 0;
  57486. -}
  57487. -
  57488. -
  57489. -SWIGINTERN PyObject *_wrap_DoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57490. - PyObject *resultobj = 0;
  57491. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57492. - std::vector< double >::difference_type arg2 ;
  57493. - std::vector< double >::difference_type arg3 ;
  57494. - void *argp1 = 0 ;
  57495. - int res1 = 0 ;
  57496. - ptrdiff_t val2 ;
  57497. - int ecode2 = 0 ;
  57498. - ptrdiff_t val3 ;
  57499. - int ecode3 = 0 ;
  57500. - PyObject * obj0 = 0 ;
  57501. - PyObject * obj1 = 0 ;
  57502. - PyObject * obj2 = 0 ;
  57503. -
  57504. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  57505. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57506. - if (!SWIG_IsOK(res1)) {
  57507. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57508. - }
  57509. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57510. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57511. - if (!SWIG_IsOK(ecode2)) {
  57512. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57513. - }
  57514. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57515. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  57516. - if (!SWIG_IsOK(ecode3)) {
  57517. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  57518. - }
  57519. - arg3 = static_cast< std::vector< double >::difference_type >(val3);
  57520. - try {
  57521. - std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3);
  57522. - }
  57523. - catch(std::out_of_range &_e) {
  57524. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57525. - }
  57526. - catch(std::invalid_argument &_e) {
  57527. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57528. - }
  57529. -
  57530. - resultobj = SWIG_Py_Void();
  57531. - return resultobj;
  57532. -fail:
  57533. - return NULL;
  57534. -}
  57535. -
  57536. -
  57537. -SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57538. - PyObject *resultobj = 0;
  57539. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57540. - std::vector< double >::difference_type arg2 ;
  57541. - void *argp1 = 0 ;
  57542. - int res1 = 0 ;
  57543. - ptrdiff_t val2 ;
  57544. - int ecode2 = 0 ;
  57545. - PyObject * obj0 = 0 ;
  57546. - PyObject * obj1 = 0 ;
  57547. -
  57548. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail;
  57549. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57550. - if (!SWIG_IsOK(res1)) {
  57551. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57552. - }
  57553. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57554. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57555. - if (!SWIG_IsOK(ecode2)) {
  57556. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57557. - }
  57558. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57559. - try {
  57560. - std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2);
  57561. - }
  57562. - catch(std::out_of_range &_e) {
  57563. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57564. - }
  57565. -
  57566. - resultobj = SWIG_Py_Void();
  57567. - return resultobj;
  57568. -fail:
  57569. - return NULL;
  57570. -}
  57571. -
  57572. -
  57573. -SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57574. - PyObject *resultobj = 0;
  57575. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57576. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  57577. - void *argp1 = 0 ;
  57578. - int res1 = 0 ;
  57579. - PyObject * obj0 = 0 ;
  57580. - PyObject * obj1 = 0 ;
  57581. - std::vector< double,std::allocator< double > > *result = 0 ;
  57582. -
  57583. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail;
  57584. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57585. - if (!SWIG_IsOK(res1)) {
  57586. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57587. - }
  57588. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57589. - {
  57590. - if (!PySlice_Check(obj1)) {
  57591. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  57592. - }
  57593. - arg2 = (PySliceObject *) obj1;
  57594. - }
  57595. - try {
  57596. - result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2);
  57597. - }
  57598. - catch(std::out_of_range &_e) {
  57599. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57600. - }
  57601. - catch(std::invalid_argument &_e) {
  57602. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57603. - }
  57604. -
  57605. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 );
  57606. - return resultobj;
  57607. -fail:
  57608. - return NULL;
  57609. -}
  57610. -
  57611. -
  57612. -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57613. - PyObject *resultobj = 0;
  57614. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57615. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  57616. - std::vector< double,std::allocator< double > > *arg3 = 0 ;
  57617. - void *argp1 = 0 ;
  57618. - int res1 = 0 ;
  57619. - int res3 = SWIG_OLDOBJ ;
  57620. - PyObject * obj0 = 0 ;
  57621. - PyObject * obj1 = 0 ;
  57622. - PyObject * obj2 = 0 ;
  57623. -
  57624. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  57625. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57626. - if (!SWIG_IsOK(res1)) {
  57627. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57628. - }
  57629. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57630. - {
  57631. - if (!PySlice_Check(obj1)) {
  57632. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  57633. - }
  57634. - arg2 = (PySliceObject *) obj1;
  57635. - }
  57636. - {
  57637. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  57638. - res3 = swig::asptr(obj2, &ptr);
  57639. - if (!SWIG_IsOK(res3)) {
  57640. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'");
  57641. - }
  57642. - if (!ptr) {
  57643. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'");
  57644. - }
  57645. - arg3 = ptr;
  57646. - }
  57647. - try {
  57648. - std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
  57649. - }
  57650. - catch(std::out_of_range &_e) {
  57651. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57652. - }
  57653. - catch(std::invalid_argument &_e) {
  57654. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57655. - }
  57656. -
  57657. - resultobj = SWIG_Py_Void();
  57658. - if (SWIG_IsNewObj(res3)) delete arg3;
  57659. - return resultobj;
  57660. -fail:
  57661. - if (SWIG_IsNewObj(res3)) delete arg3;
  57662. - return NULL;
  57663. -}
  57664. -
  57665. -
  57666. -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57667. - PyObject *resultobj = 0;
  57668. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57669. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  57670. - void *argp1 = 0 ;
  57671. - int res1 = 0 ;
  57672. - PyObject * obj0 = 0 ;
  57673. - PyObject * obj1 = 0 ;
  57674. -
  57675. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___setitem__",&obj0,&obj1)) SWIG_fail;
  57676. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57677. - if (!SWIG_IsOK(res1)) {
  57678. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57679. - }
  57680. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57681. - {
  57682. - if (!PySlice_Check(obj1)) {
  57683. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  57684. - }
  57685. - arg2 = (PySliceObject *) obj1;
  57686. - }
  57687. - try {
  57688. - std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2);
  57689. - }
  57690. - catch(std::out_of_range &_e) {
  57691. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57692. - }
  57693. - catch(std::invalid_argument &_e) {
  57694. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57695. - }
  57696. -
  57697. - resultobj = SWIG_Py_Void();
  57698. - return resultobj;
  57699. -fail:
  57700. - return NULL;
  57701. -}
  57702. -
  57703. -
  57704. -SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57705. - PyObject *resultobj = 0;
  57706. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57707. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  57708. - void *argp1 = 0 ;
  57709. - int res1 = 0 ;
  57710. - PyObject * obj0 = 0 ;
  57711. - PyObject * obj1 = 0 ;
  57712. -
  57713. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail;
  57714. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57715. - if (!SWIG_IsOK(res1)) {
  57716. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57717. - }
  57718. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57719. - {
  57720. - if (!PySlice_Check(obj1)) {
  57721. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  57722. - }
  57723. - arg2 = (PySliceObject *) obj1;
  57724. - }
  57725. - try {
  57726. - std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2);
  57727. - }
  57728. - catch(std::out_of_range &_e) {
  57729. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57730. - }
  57731. - catch(std::invalid_argument &_e) {
  57732. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  57733. - }
  57734. -
  57735. - resultobj = SWIG_Py_Void();
  57736. - return resultobj;
  57737. -fail:
  57738. - return NULL;
  57739. -}
  57740. -
  57741. -
  57742. -SWIGINTERN PyObject *_wrap_DoubleVector___delitem__(PyObject *self, PyObject *args) {
  57743. - int argc;
  57744. - PyObject *argv[3];
  57745. - int ii;
  57746. -
  57747. - if (!PyTuple_Check(args)) SWIG_fail;
  57748. - argc = args ? (int)PyObject_Length(args) : 0;
  57749. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  57750. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  57751. - }
  57752. - if (argc == 2) {
  57753. - int _v;
  57754. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57755. - _v = SWIG_CheckState(res);
  57756. - if (_v) {
  57757. - {
  57758. - _v = PySlice_Check(argv[1]);
  57759. - }
  57760. - if (_v) {
  57761. - return _wrap_DoubleVector___delitem____SWIG_1(self, args);
  57762. - }
  57763. - }
  57764. - }
  57765. - if (argc == 2) {
  57766. - int _v;
  57767. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57768. - _v = SWIG_CheckState(res);
  57769. - if (_v) {
  57770. - {
  57771. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  57772. - _v = SWIG_CheckState(res);
  57773. - }
  57774. - if (_v) {
  57775. - return _wrap_DoubleVector___delitem____SWIG_0(self, args);
  57776. - }
  57777. - }
  57778. - }
  57779. -
  57780. -fail:
  57781. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___delitem__'.\n"
  57782. - " Possible C/C++ prototypes are:\n"
  57783. - " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n"
  57784. - " std::vector< double >::__delitem__(PySliceObject *)\n");
  57785. - return 0;
  57786. -}
  57787. -
  57788. -
  57789. -SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57790. - PyObject *resultobj = 0;
  57791. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57792. - std::vector< double >::difference_type arg2 ;
  57793. - void *argp1 = 0 ;
  57794. - int res1 = 0 ;
  57795. - ptrdiff_t val2 ;
  57796. - int ecode2 = 0 ;
  57797. - PyObject * obj0 = 0 ;
  57798. - PyObject * obj1 = 0 ;
  57799. - std::vector< double >::value_type *result = 0 ;
  57800. -
  57801. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail;
  57802. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57803. - if (!SWIG_IsOK(res1)) {
  57804. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'");
  57805. - }
  57806. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57807. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57808. - if (!SWIG_IsOK(ecode2)) {
  57809. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57810. - }
  57811. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57812. - try {
  57813. - result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2);
  57814. - }
  57815. - catch(std::out_of_range &_e) {
  57816. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57817. - }
  57818. -
  57819. - resultobj = SWIG_From_double(static_cast< double >(*result));
  57820. - return resultobj;
  57821. -fail:
  57822. - return NULL;
  57823. -}
  57824. -
  57825. -
  57826. -SWIGINTERN PyObject *_wrap_DoubleVector___getitem__(PyObject *self, PyObject *args) {
  57827. - int argc;
  57828. - PyObject *argv[3];
  57829. - int ii;
  57830. -
  57831. - if (!PyTuple_Check(args)) SWIG_fail;
  57832. - argc = args ? (int)PyObject_Length(args) : 0;
  57833. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  57834. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  57835. - }
  57836. - if (argc == 2) {
  57837. - int _v;
  57838. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57839. - _v = SWIG_CheckState(res);
  57840. - if (_v) {
  57841. - {
  57842. - _v = PySlice_Check(argv[1]);
  57843. - }
  57844. - if (_v) {
  57845. - return _wrap_DoubleVector___getitem____SWIG_0(self, args);
  57846. - }
  57847. - }
  57848. - }
  57849. - if (argc == 2) {
  57850. - int _v;
  57851. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57852. - _v = SWIG_CheckState(res);
  57853. - if (_v) {
  57854. - {
  57855. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  57856. - _v = SWIG_CheckState(res);
  57857. - }
  57858. - if (_v) {
  57859. - return _wrap_DoubleVector___getitem____SWIG_1(self, args);
  57860. - }
  57861. - }
  57862. - }
  57863. -
  57864. -fail:
  57865. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___getitem__'.\n"
  57866. - " Possible C/C++ prototypes are:\n"
  57867. - " std::vector< double >::__getitem__(PySliceObject *)\n"
  57868. - " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n");
  57869. - return 0;
  57870. -}
  57871. -
  57872. -
  57873. -SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57874. - PyObject *resultobj = 0;
  57875. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57876. - std::vector< double >::difference_type arg2 ;
  57877. - std::vector< double >::value_type *arg3 = 0 ;
  57878. - void *argp1 = 0 ;
  57879. - int res1 = 0 ;
  57880. - ptrdiff_t val2 ;
  57881. - int ecode2 = 0 ;
  57882. - std::vector< double >::value_type temp3 ;
  57883. - double val3 ;
  57884. - int ecode3 = 0 ;
  57885. - PyObject * obj0 = 0 ;
  57886. - PyObject * obj1 = 0 ;
  57887. - PyObject * obj2 = 0 ;
  57888. -
  57889. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  57890. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  57891. - if (!SWIG_IsOK(res1)) {
  57892. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'");
  57893. - }
  57894. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  57895. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  57896. - if (!SWIG_IsOK(ecode2)) {
  57897. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  57898. - }
  57899. - arg2 = static_cast< std::vector< double >::difference_type >(val2);
  57900. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  57901. - if (!SWIG_IsOK(ecode3)) {
  57902. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  57903. - }
  57904. - temp3 = static_cast< std::vector< double >::value_type >(val3);
  57905. - arg3 = &temp3;
  57906. - try {
  57907. - std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3);
  57908. - }
  57909. - catch(std::out_of_range &_e) {
  57910. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  57911. - }
  57912. -
  57913. - resultobj = SWIG_Py_Void();
  57914. - return resultobj;
  57915. -fail:
  57916. - return NULL;
  57917. -}
  57918. -
  57919. -
  57920. -SWIGINTERN PyObject *_wrap_DoubleVector___setitem__(PyObject *self, PyObject *args) {
  57921. - int argc;
  57922. - PyObject *argv[4];
  57923. - int ii;
  57924. -
  57925. - if (!PyTuple_Check(args)) SWIG_fail;
  57926. - argc = args ? (int)PyObject_Length(args) : 0;
  57927. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  57928. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  57929. - }
  57930. - if (argc == 2) {
  57931. - int _v;
  57932. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57933. - _v = SWIG_CheckState(res);
  57934. - if (_v) {
  57935. - {
  57936. - _v = PySlice_Check(argv[1]);
  57937. - }
  57938. - if (_v) {
  57939. - return _wrap_DoubleVector___setitem____SWIG_1(self, args);
  57940. - }
  57941. - }
  57942. - }
  57943. - if (argc == 3) {
  57944. - int _v;
  57945. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57946. - _v = SWIG_CheckState(res);
  57947. - if (_v) {
  57948. - {
  57949. - _v = PySlice_Check(argv[1]);
  57950. - }
  57951. - if (_v) {
  57952. - int res = swig::asptr(argv[2], (std::vector<double,std::allocator< double > >**)(0));
  57953. - _v = SWIG_CheckState(res);
  57954. - if (_v) {
  57955. - return _wrap_DoubleVector___setitem____SWIG_0(self, args);
  57956. - }
  57957. - }
  57958. - }
  57959. - }
  57960. - if (argc == 3) {
  57961. - int _v;
  57962. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  57963. - _v = SWIG_CheckState(res);
  57964. - if (_v) {
  57965. - {
  57966. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  57967. - _v = SWIG_CheckState(res);
  57968. - }
  57969. - if (_v) {
  57970. - {
  57971. - int res = SWIG_AsVal_double(argv[2], NULL);
  57972. - _v = SWIG_CheckState(res);
  57973. - }
  57974. - if (_v) {
  57975. - return _wrap_DoubleVector___setitem____SWIG_2(self, args);
  57976. - }
  57977. - }
  57978. - }
  57979. - }
  57980. -
  57981. -fail:
  57982. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setitem__'.\n"
  57983. - " Possible C/C++ prototypes are:\n"
  57984. - " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n"
  57985. - " std::vector< double >::__setitem__(PySliceObject *)\n"
  57986. - " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n");
  57987. - return 0;
  57988. -}
  57989. -
  57990. -
  57991. -SWIGINTERN PyObject *_wrap_DoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  57992. - PyObject *resultobj = 0;
  57993. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  57994. - std::vector< double >::value_type *arg2 = 0 ;
  57995. - void *argp1 = 0 ;
  57996. - int res1 = 0 ;
  57997. - std::vector< double >::value_type temp2 ;
  57998. - double val2 ;
  57999. - int ecode2 = 0 ;
  58000. - PyObject * obj0 = 0 ;
  58001. - PyObject * obj1 = 0 ;
  58002. -
  58003. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_append",&obj0,&obj1)) SWIG_fail;
  58004. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58005. - if (!SWIG_IsOK(res1)) {
  58006. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_append" "', argument " "1"" of type '" "std::vector< double > *""'");
  58007. - }
  58008. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58009. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  58010. - if (!SWIG_IsOK(ecode2)) {
  58011. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  58012. - }
  58013. - temp2 = static_cast< std::vector< double >::value_type >(val2);
  58014. - arg2 = &temp2;
  58015. - std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2);
  58016. - resultobj = SWIG_Py_Void();
  58017. - return resultobj;
  58018. -fail:
  58019. - return NULL;
  58020. -}
  58021. -
  58022. -
  58023. -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58024. - PyObject *resultobj = 0;
  58025. - std::vector< double > *result = 0 ;
  58026. -
  58027. - if (!PyArg_ParseTuple(args,(char *)":new_DoubleVector")) SWIG_fail;
  58028. - result = (std::vector< double > *)new std::vector< double >();
  58029. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
  58030. - return resultobj;
  58031. -fail:
  58032. - return NULL;
  58033. -}
  58034. -
  58035. -
  58036. -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58037. - PyObject *resultobj = 0;
  58038. - std::vector< double > *arg1 = 0 ;
  58039. - int res1 = SWIG_OLDOBJ ;
  58040. - PyObject * obj0 = 0 ;
  58041. - std::vector< double > *result = 0 ;
  58042. -
  58043. - if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail;
  58044. - {
  58045. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  58046. - res1 = swig::asptr(obj0, &ptr);
  58047. - if (!SWIG_IsOK(res1)) {
  58048. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'");
  58049. - }
  58050. - if (!ptr) {
  58051. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'");
  58052. - }
  58053. - arg1 = ptr;
  58054. - }
  58055. - result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
  58056. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
  58057. - if (SWIG_IsNewObj(res1)) delete arg1;
  58058. - return resultobj;
  58059. -fail:
  58060. - if (SWIG_IsNewObj(res1)) delete arg1;
  58061. - return NULL;
  58062. -}
  58063. -
  58064. -
  58065. -SWIGINTERN PyObject *_wrap_DoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58066. - PyObject *resultobj = 0;
  58067. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58068. - void *argp1 = 0 ;
  58069. - int res1 = 0 ;
  58070. - PyObject * obj0 = 0 ;
  58071. - bool result;
  58072. -
  58073. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_empty",&obj0)) SWIG_fail;
  58074. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58075. - if (!SWIG_IsOK(res1)) {
  58076. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'");
  58077. - }
  58078. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58079. - result = (bool)((std::vector< double > const *)arg1)->empty();
  58080. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  58081. - return resultobj;
  58082. -fail:
  58083. - return NULL;
  58084. -}
  58085. -
  58086. -
  58087. -SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58088. - PyObject *resultobj = 0;
  58089. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58090. - void *argp1 = 0 ;
  58091. - int res1 = 0 ;
  58092. - PyObject * obj0 = 0 ;
  58093. - std::vector< double >::size_type result;
  58094. -
  58095. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_size",&obj0)) SWIG_fail;
  58096. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58097. - if (!SWIG_IsOK(res1)) {
  58098. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > const *""'");
  58099. - }
  58100. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58101. - result = ((std::vector< double > const *)arg1)->size();
  58102. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  58103. - return resultobj;
  58104. -fail:
  58105. - return NULL;
  58106. -}
  58107. -
  58108. -
  58109. -SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58110. - PyObject *resultobj = 0;
  58111. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58112. - void *argp1 = 0 ;
  58113. - int res1 = 0 ;
  58114. - PyObject * obj0 = 0 ;
  58115. -
  58116. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_clear",&obj0)) SWIG_fail;
  58117. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58118. - if (!SWIG_IsOK(res1)) {
  58119. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'");
  58120. - }
  58121. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58122. - (arg1)->clear();
  58123. - resultobj = SWIG_Py_Void();
  58124. - return resultobj;
  58125. -fail:
  58126. - return NULL;
  58127. -}
  58128. -
  58129. -
  58130. -SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58131. - PyObject *resultobj = 0;
  58132. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58133. - std::vector< double > *arg2 = 0 ;
  58134. - void *argp1 = 0 ;
  58135. - int res1 = 0 ;
  58136. - void *argp2 = 0 ;
  58137. - int res2 = 0 ;
  58138. - PyObject * obj0 = 0 ;
  58139. - PyObject * obj1 = 0 ;
  58140. -
  58141. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail;
  58142. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58143. - if (!SWIG_IsOK(res1)) {
  58144. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'");
  58145. - }
  58146. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58147. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 );
  58148. - if (!SWIG_IsOK(res2)) {
  58149. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
  58150. - }
  58151. - if (!argp2) {
  58152. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
  58153. - }
  58154. - arg2 = reinterpret_cast< std::vector< double > * >(argp2);
  58155. - (arg1)->swap(*arg2);
  58156. - resultobj = SWIG_Py_Void();
  58157. - return resultobj;
  58158. -fail:
  58159. - return NULL;
  58160. -}
  58161. -
  58162. -
  58163. -SWIGINTERN PyObject *_wrap_DoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58164. - PyObject *resultobj = 0;
  58165. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58166. - void *argp1 = 0 ;
  58167. - int res1 = 0 ;
  58168. - PyObject * obj0 = 0 ;
  58169. - SwigValueWrapper< std::allocator< double > > result;
  58170. -
  58171. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_get_allocator",&obj0)) SWIG_fail;
  58172. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58173. - if (!SWIG_IsOK(res1)) {
  58174. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'");
  58175. - }
  58176. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58177. - result = ((std::vector< double > const *)arg1)->get_allocator();
  58178. - resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 );
  58179. - return resultobj;
  58180. -fail:
  58181. - return NULL;
  58182. -}
  58183. -
  58184. -
  58185. -SWIGINTERN PyObject *_wrap_DoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58186. - PyObject *resultobj = 0;
  58187. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58188. - void *argp1 = 0 ;
  58189. - int res1 = 0 ;
  58190. - PyObject * obj0 = 0 ;
  58191. - std::vector< double >::iterator result;
  58192. -
  58193. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_begin",&obj0)) SWIG_fail;
  58194. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58195. - if (!SWIG_IsOK(res1)) {
  58196. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_begin" "', argument " "1"" of type '" "std::vector< double > *""'");
  58197. - }
  58198. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58199. - result = (arg1)->begin();
  58200. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
  58201. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58202. - return resultobj;
  58203. -fail:
  58204. - return NULL;
  58205. -}
  58206. -
  58207. -
  58208. -SWIGINTERN PyObject *_wrap_DoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58209. - PyObject *resultobj = 0;
  58210. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58211. - void *argp1 = 0 ;
  58212. - int res1 = 0 ;
  58213. - PyObject * obj0 = 0 ;
  58214. - std::vector< double >::iterator result;
  58215. -
  58216. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_end",&obj0)) SWIG_fail;
  58217. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58218. - if (!SWIG_IsOK(res1)) {
  58219. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_end" "', argument " "1"" of type '" "std::vector< double > *""'");
  58220. - }
  58221. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58222. - result = (arg1)->end();
  58223. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
  58224. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58225. - return resultobj;
  58226. -fail:
  58227. - return NULL;
  58228. -}
  58229. -
  58230. -
  58231. -SWIGINTERN PyObject *_wrap_DoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58232. - PyObject *resultobj = 0;
  58233. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58234. - void *argp1 = 0 ;
  58235. - int res1 = 0 ;
  58236. - PyObject * obj0 = 0 ;
  58237. - std::vector< double >::reverse_iterator result;
  58238. -
  58239. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rbegin",&obj0)) SWIG_fail;
  58240. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58241. - if (!SWIG_IsOK(res1)) {
  58242. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'");
  58243. - }
  58244. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58245. - result = (arg1)->rbegin();
  58246. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
  58247. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58248. - return resultobj;
  58249. -fail:
  58250. - return NULL;
  58251. -}
  58252. -
  58253. -
  58254. -SWIGINTERN PyObject *_wrap_DoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58255. - PyObject *resultobj = 0;
  58256. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58257. - void *argp1 = 0 ;
  58258. - int res1 = 0 ;
  58259. - PyObject * obj0 = 0 ;
  58260. - std::vector< double >::reverse_iterator result;
  58261. -
  58262. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rend",&obj0)) SWIG_fail;
  58263. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58264. - if (!SWIG_IsOK(res1)) {
  58265. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rend" "', argument " "1"" of type '" "std::vector< double > *""'");
  58266. - }
  58267. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58268. - result = (arg1)->rend();
  58269. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
  58270. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58271. - return resultobj;
  58272. -fail:
  58273. - return NULL;
  58274. -}
  58275. -
  58276. -
  58277. -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58278. - PyObject *resultobj = 0;
  58279. - std::vector< double >::size_type arg1 ;
  58280. - size_t val1 ;
  58281. - int ecode1 = 0 ;
  58282. - PyObject * obj0 = 0 ;
  58283. - std::vector< double > *result = 0 ;
  58284. -
  58285. - if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail;
  58286. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  58287. - if (!SWIG_IsOK(ecode1)) {
  58288. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
  58289. - }
  58290. - arg1 = static_cast< std::vector< double >::size_type >(val1);
  58291. - result = (std::vector< double > *)new std::vector< double >(arg1);
  58292. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
  58293. - return resultobj;
  58294. -fail:
  58295. - return NULL;
  58296. -}
  58297. -
  58298. -
  58299. -SWIGINTERN PyObject *_wrap_DoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58300. - PyObject *resultobj = 0;
  58301. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58302. - void *argp1 = 0 ;
  58303. - int res1 = 0 ;
  58304. - PyObject * obj0 = 0 ;
  58305. -
  58306. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop_back",&obj0)) SWIG_fail;
  58307. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58308. - if (!SWIG_IsOK(res1)) {
  58309. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'");
  58310. - }
  58311. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58312. - (arg1)->pop_back();
  58313. - resultobj = SWIG_Py_Void();
  58314. - return resultobj;
  58315. -fail:
  58316. - return NULL;
  58317. -}
  58318. -
  58319. -
  58320. -SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58321. - PyObject *resultobj = 0;
  58322. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58323. - std::vector< double >::size_type arg2 ;
  58324. - void *argp1 = 0 ;
  58325. - int res1 = 0 ;
  58326. - size_t val2 ;
  58327. - int ecode2 = 0 ;
  58328. - PyObject * obj0 = 0 ;
  58329. - PyObject * obj1 = 0 ;
  58330. -
  58331. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail;
  58332. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58333. - if (!SWIG_IsOK(res1)) {
  58334. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
  58335. - }
  58336. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58337. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  58338. - if (!SWIG_IsOK(ecode2)) {
  58339. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  58340. - }
  58341. - arg2 = static_cast< std::vector< double >::size_type >(val2);
  58342. - (arg1)->resize(arg2);
  58343. - resultobj = SWIG_Py_Void();
  58344. - return resultobj;
  58345. -fail:
  58346. - return NULL;
  58347. -}
  58348. -
  58349. -
  58350. -SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58351. - PyObject *resultobj = 0;
  58352. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58353. - std::vector< double >::iterator arg2 ;
  58354. - void *argp1 = 0 ;
  58355. - int res1 = 0 ;
  58356. - swig::SwigPyIterator *iter2 = 0 ;
  58357. - int res2 ;
  58358. - PyObject * obj0 = 0 ;
  58359. - PyObject * obj1 = 0 ;
  58360. - std::vector< double >::iterator result;
  58361. -
  58362. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_erase",&obj0,&obj1)) SWIG_fail;
  58363. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58364. - if (!SWIG_IsOK(res1)) {
  58365. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'");
  58366. - }
  58367. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58368. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  58369. - if (!SWIG_IsOK(res2) || !iter2) {
  58370. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58371. - } else {
  58372. - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
  58373. - if (iter_t) {
  58374. - arg2 = iter_t->get_current();
  58375. - } else {
  58376. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58377. - }
  58378. - }
  58379. - result = (arg1)->erase(arg2);
  58380. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
  58381. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58382. - return resultobj;
  58383. -fail:
  58384. - return NULL;
  58385. -}
  58386. -
  58387. -
  58388. -SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58389. - PyObject *resultobj = 0;
  58390. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58391. - std::vector< double >::iterator arg2 ;
  58392. - std::vector< double >::iterator arg3 ;
  58393. - void *argp1 = 0 ;
  58394. - int res1 = 0 ;
  58395. - swig::SwigPyIterator *iter2 = 0 ;
  58396. - int res2 ;
  58397. - swig::SwigPyIterator *iter3 = 0 ;
  58398. - int res3 ;
  58399. - PyObject * obj0 = 0 ;
  58400. - PyObject * obj1 = 0 ;
  58401. - PyObject * obj2 = 0 ;
  58402. - std::vector< double >::iterator result;
  58403. -
  58404. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  58405. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58406. - if (!SWIG_IsOK(res1)) {
  58407. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'");
  58408. - }
  58409. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58410. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  58411. - if (!SWIG_IsOK(res2) || !iter2) {
  58412. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58413. - } else {
  58414. - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
  58415. - if (iter_t) {
  58416. - arg2 = iter_t->get_current();
  58417. - } else {
  58418. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58419. - }
  58420. - }
  58421. - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  58422. - if (!SWIG_IsOK(res3) || !iter3) {
  58423. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
  58424. - } else {
  58425. - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter3);
  58426. - if (iter_t) {
  58427. - arg3 = iter_t->get_current();
  58428. - } else {
  58429. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
  58430. - }
  58431. - }
  58432. - result = (arg1)->erase(arg2,arg3);
  58433. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
  58434. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58435. - return resultobj;
  58436. -fail:
  58437. - return NULL;
  58438. -}
  58439. -
  58440. -
  58441. -SWIGINTERN PyObject *_wrap_DoubleVector_erase(PyObject *self, PyObject *args) {
  58442. - int argc;
  58443. - PyObject *argv[4];
  58444. - int ii;
  58445. -
  58446. - if (!PyTuple_Check(args)) SWIG_fail;
  58447. - argc = args ? (int)PyObject_Length(args) : 0;
  58448. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  58449. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  58450. - }
  58451. - if (argc == 2) {
  58452. - int _v;
  58453. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58454. - _v = SWIG_CheckState(res);
  58455. - if (_v) {
  58456. - swig::SwigPyIterator *iter = 0;
  58457. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  58458. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
  58459. - if (_v) {
  58460. - return _wrap_DoubleVector_erase__SWIG_0(self, args);
  58461. - }
  58462. - }
  58463. - }
  58464. - if (argc == 3) {
  58465. - int _v;
  58466. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58467. - _v = SWIG_CheckState(res);
  58468. - if (_v) {
  58469. - swig::SwigPyIterator *iter = 0;
  58470. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  58471. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
  58472. - if (_v) {
  58473. - swig::SwigPyIterator *iter = 0;
  58474. - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  58475. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
  58476. - if (_v) {
  58477. - return _wrap_DoubleVector_erase__SWIG_1(self, args);
  58478. - }
  58479. - }
  58480. - }
  58481. - }
  58482. -
  58483. -fail:
  58484. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_erase'.\n"
  58485. - " Possible C/C++ prototypes are:\n"
  58486. - " std::vector< double >::erase(std::vector< double >::iterator)\n"
  58487. - " std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n");
  58488. - return 0;
  58489. -}
  58490. -
  58491. -
  58492. -SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58493. - PyObject *resultobj = 0;
  58494. - std::vector< double >::size_type arg1 ;
  58495. - std::vector< double >::value_type *arg2 = 0 ;
  58496. - size_t val1 ;
  58497. - int ecode1 = 0 ;
  58498. - std::vector< double >::value_type temp2 ;
  58499. - double val2 ;
  58500. - int ecode2 = 0 ;
  58501. - PyObject * obj0 = 0 ;
  58502. - PyObject * obj1 = 0 ;
  58503. - std::vector< double > *result = 0 ;
  58504. -
  58505. - if (!PyArg_ParseTuple(args,(char *)"OO:new_DoubleVector",&obj0,&obj1)) SWIG_fail;
  58506. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  58507. - if (!SWIG_IsOK(ecode1)) {
  58508. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
  58509. - }
  58510. - arg1 = static_cast< std::vector< double >::size_type >(val1);
  58511. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  58512. - if (!SWIG_IsOK(ecode2)) {
  58513. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  58514. - }
  58515. - temp2 = static_cast< std::vector< double >::value_type >(val2);
  58516. - arg2 = &temp2;
  58517. - result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2);
  58518. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 );
  58519. - return resultobj;
  58520. -fail:
  58521. - return NULL;
  58522. -}
  58523. -
  58524. -
  58525. -SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *self, PyObject *args) {
  58526. - int argc;
  58527. - PyObject *argv[3];
  58528. - int ii;
  58529. -
  58530. - if (!PyTuple_Check(args)) SWIG_fail;
  58531. - argc = args ? (int)PyObject_Length(args) : 0;
  58532. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  58533. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  58534. - }
  58535. - if (argc == 0) {
  58536. - return _wrap_new_DoubleVector__SWIG_0(self, args);
  58537. - }
  58538. - if (argc == 1) {
  58539. - int _v;
  58540. - {
  58541. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  58542. - _v = SWIG_CheckState(res);
  58543. - }
  58544. - if (_v) {
  58545. - return _wrap_new_DoubleVector__SWIG_2(self, args);
  58546. - }
  58547. - }
  58548. - if (argc == 1) {
  58549. - int _v;
  58550. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58551. - _v = SWIG_CheckState(res);
  58552. - if (_v) {
  58553. - return _wrap_new_DoubleVector__SWIG_1(self, args);
  58554. - }
  58555. - }
  58556. - if (argc == 2) {
  58557. - int _v;
  58558. - {
  58559. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  58560. - _v = SWIG_CheckState(res);
  58561. - }
  58562. - if (_v) {
  58563. - {
  58564. - int res = SWIG_AsVal_double(argv[1], NULL);
  58565. - _v = SWIG_CheckState(res);
  58566. - }
  58567. - if (_v) {
  58568. - return _wrap_new_DoubleVector__SWIG_3(self, args);
  58569. - }
  58570. - }
  58571. - }
  58572. -
  58573. -fail:
  58574. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DoubleVector'.\n"
  58575. - " Possible C/C++ prototypes are:\n"
  58576. - " std::vector< double >::vector()\n"
  58577. - " std::vector< double >::vector(std::vector< double > const &)\n"
  58578. - " std::vector< double >::vector(std::vector< double >::size_type)\n"
  58579. - " std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  58580. - return 0;
  58581. -}
  58582. -
  58583. -
  58584. -SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58585. - PyObject *resultobj = 0;
  58586. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58587. - std::vector< double >::value_type *arg2 = 0 ;
  58588. - void *argp1 = 0 ;
  58589. - int res1 = 0 ;
  58590. - std::vector< double >::value_type temp2 ;
  58591. - double val2 ;
  58592. - int ecode2 = 0 ;
  58593. - PyObject * obj0 = 0 ;
  58594. - PyObject * obj1 = 0 ;
  58595. -
  58596. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail;
  58597. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58598. - if (!SWIG_IsOK(res1)) {
  58599. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'");
  58600. - }
  58601. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58602. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  58603. - if (!SWIG_IsOK(ecode2)) {
  58604. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  58605. - }
  58606. - temp2 = static_cast< std::vector< double >::value_type >(val2);
  58607. - arg2 = &temp2;
  58608. - (arg1)->push_back((std::vector< double >::value_type const &)*arg2);
  58609. - resultobj = SWIG_Py_Void();
  58610. - return resultobj;
  58611. -fail:
  58612. - return NULL;
  58613. -}
  58614. -
  58615. -
  58616. -SWIGINTERN PyObject *_wrap_DoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58617. - PyObject *resultobj = 0;
  58618. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58619. - void *argp1 = 0 ;
  58620. - int res1 = 0 ;
  58621. - PyObject * obj0 = 0 ;
  58622. - std::vector< double >::value_type *result = 0 ;
  58623. -
  58624. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_front",&obj0)) SWIG_fail;
  58625. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58626. - if (!SWIG_IsOK(res1)) {
  58627. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_front" "', argument " "1"" of type '" "std::vector< double > const *""'");
  58628. - }
  58629. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58630. - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front();
  58631. - resultobj = SWIG_From_double(static_cast< double >(*result));
  58632. - return resultobj;
  58633. -fail:
  58634. - return NULL;
  58635. -}
  58636. -
  58637. -
  58638. -SWIGINTERN PyObject *_wrap_DoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58639. - PyObject *resultobj = 0;
  58640. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58641. - void *argp1 = 0 ;
  58642. - int res1 = 0 ;
  58643. - PyObject * obj0 = 0 ;
  58644. - std::vector< double >::value_type *result = 0 ;
  58645. -
  58646. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_back",&obj0)) SWIG_fail;
  58647. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58648. - if (!SWIG_IsOK(res1)) {
  58649. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_back" "', argument " "1"" of type '" "std::vector< double > const *""'");
  58650. - }
  58651. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58652. - result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back();
  58653. - resultobj = SWIG_From_double(static_cast< double >(*result));
  58654. - return resultobj;
  58655. -fail:
  58656. - return NULL;
  58657. -}
  58658. -
  58659. -
  58660. -SWIGINTERN PyObject *_wrap_DoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58661. - PyObject *resultobj = 0;
  58662. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58663. - std::vector< double >::size_type arg2 ;
  58664. - std::vector< double >::value_type *arg3 = 0 ;
  58665. - void *argp1 = 0 ;
  58666. - int res1 = 0 ;
  58667. - size_t val2 ;
  58668. - int ecode2 = 0 ;
  58669. - std::vector< double >::value_type temp3 ;
  58670. - double val3 ;
  58671. - int ecode3 = 0 ;
  58672. - PyObject * obj0 = 0 ;
  58673. - PyObject * obj1 = 0 ;
  58674. - PyObject * obj2 = 0 ;
  58675. -
  58676. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  58677. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58678. - if (!SWIG_IsOK(res1)) {
  58679. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_assign" "', argument " "1"" of type '" "std::vector< double > *""'");
  58680. - }
  58681. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58682. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  58683. - if (!SWIG_IsOK(ecode2)) {
  58684. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  58685. - }
  58686. - arg2 = static_cast< std::vector< double >::size_type >(val2);
  58687. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  58688. - if (!SWIG_IsOK(ecode3)) {
  58689. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  58690. - }
  58691. - temp3 = static_cast< std::vector< double >::value_type >(val3);
  58692. - arg3 = &temp3;
  58693. - (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3);
  58694. - resultobj = SWIG_Py_Void();
  58695. - return resultobj;
  58696. -fail:
  58697. - return NULL;
  58698. -}
  58699. -
  58700. -
  58701. -SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58702. - PyObject *resultobj = 0;
  58703. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58704. - std::vector< double >::size_type arg2 ;
  58705. - std::vector< double >::value_type *arg3 = 0 ;
  58706. - void *argp1 = 0 ;
  58707. - int res1 = 0 ;
  58708. - size_t val2 ;
  58709. - int ecode2 = 0 ;
  58710. - std::vector< double >::value_type temp3 ;
  58711. - double val3 ;
  58712. - int ecode3 = 0 ;
  58713. - PyObject * obj0 = 0 ;
  58714. - PyObject * obj1 = 0 ;
  58715. - PyObject * obj2 = 0 ;
  58716. -
  58717. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  58718. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58719. - if (!SWIG_IsOK(res1)) {
  58720. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
  58721. - }
  58722. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58723. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  58724. - if (!SWIG_IsOK(ecode2)) {
  58725. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  58726. - }
  58727. - arg2 = static_cast< std::vector< double >::size_type >(val2);
  58728. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  58729. - if (!SWIG_IsOK(ecode3)) {
  58730. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  58731. - }
  58732. - temp3 = static_cast< std::vector< double >::value_type >(val3);
  58733. - arg3 = &temp3;
  58734. - (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3);
  58735. - resultobj = SWIG_Py_Void();
  58736. - return resultobj;
  58737. -fail:
  58738. - return NULL;
  58739. -}
  58740. -
  58741. -
  58742. -SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *self, PyObject *args) {
  58743. - int argc;
  58744. - PyObject *argv[4];
  58745. - int ii;
  58746. -
  58747. - if (!PyTuple_Check(args)) SWIG_fail;
  58748. - argc = args ? (int)PyObject_Length(args) : 0;
  58749. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  58750. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  58751. - }
  58752. - if (argc == 2) {
  58753. - int _v;
  58754. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58755. - _v = SWIG_CheckState(res);
  58756. - if (_v) {
  58757. - {
  58758. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  58759. - _v = SWIG_CheckState(res);
  58760. - }
  58761. - if (_v) {
  58762. - return _wrap_DoubleVector_resize__SWIG_0(self, args);
  58763. - }
  58764. - }
  58765. - }
  58766. - if (argc == 3) {
  58767. - int _v;
  58768. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58769. - _v = SWIG_CheckState(res);
  58770. - if (_v) {
  58771. - {
  58772. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  58773. - _v = SWIG_CheckState(res);
  58774. - }
  58775. - if (_v) {
  58776. - {
  58777. - int res = SWIG_AsVal_double(argv[2], NULL);
  58778. - _v = SWIG_CheckState(res);
  58779. - }
  58780. - if (_v) {
  58781. - return _wrap_DoubleVector_resize__SWIG_1(self, args);
  58782. - }
  58783. - }
  58784. - }
  58785. - }
  58786. -
  58787. -fail:
  58788. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_resize'.\n"
  58789. - " Possible C/C++ prototypes are:\n"
  58790. - " std::vector< double >::resize(std::vector< double >::size_type)\n"
  58791. - " std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  58792. - return 0;
  58793. -}
  58794. -
  58795. -
  58796. -SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58797. - PyObject *resultobj = 0;
  58798. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58799. - std::vector< double >::iterator arg2 ;
  58800. - std::vector< double >::value_type *arg3 = 0 ;
  58801. - void *argp1 = 0 ;
  58802. - int res1 = 0 ;
  58803. - swig::SwigPyIterator *iter2 = 0 ;
  58804. - int res2 ;
  58805. - std::vector< double >::value_type temp3 ;
  58806. - double val3 ;
  58807. - int ecode3 = 0 ;
  58808. - PyObject * obj0 = 0 ;
  58809. - PyObject * obj1 = 0 ;
  58810. - PyObject * obj2 = 0 ;
  58811. - std::vector< double >::iterator result;
  58812. -
  58813. - if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  58814. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58815. - if (!SWIG_IsOK(res1)) {
  58816. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'");
  58817. - }
  58818. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58819. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  58820. - if (!SWIG_IsOK(res2) || !iter2) {
  58821. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58822. - } else {
  58823. - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
  58824. - if (iter_t) {
  58825. - arg2 = iter_t->get_current();
  58826. - } else {
  58827. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58828. - }
  58829. - }
  58830. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  58831. - if (!SWIG_IsOK(ecode3)) {
  58832. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  58833. - }
  58834. - temp3 = static_cast< std::vector< double >::value_type >(val3);
  58835. - arg3 = &temp3;
  58836. - result = (arg1)->insert(arg2,(std::vector< double >::value_type const &)*arg3);
  58837. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
  58838. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  58839. - return resultobj;
  58840. -fail:
  58841. - return NULL;
  58842. -}
  58843. -
  58844. -
  58845. -SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58846. - PyObject *resultobj = 0;
  58847. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58848. - std::vector< double >::iterator arg2 ;
  58849. - std::vector< double >::size_type arg3 ;
  58850. - std::vector< double >::value_type *arg4 = 0 ;
  58851. - void *argp1 = 0 ;
  58852. - int res1 = 0 ;
  58853. - swig::SwigPyIterator *iter2 = 0 ;
  58854. - int res2 ;
  58855. - size_t val3 ;
  58856. - int ecode3 = 0 ;
  58857. - std::vector< double >::value_type temp4 ;
  58858. - double val4 ;
  58859. - int ecode4 = 0 ;
  58860. - PyObject * obj0 = 0 ;
  58861. - PyObject * obj1 = 0 ;
  58862. - PyObject * obj2 = 0 ;
  58863. - PyObject * obj3 = 0 ;
  58864. -
  58865. - if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  58866. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58867. - if (!SWIG_IsOK(res1)) {
  58868. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'");
  58869. - }
  58870. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58871. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  58872. - if (!SWIG_IsOK(res2) || !iter2) {
  58873. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58874. - } else {
  58875. - swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
  58876. - if (iter_t) {
  58877. - arg2 = iter_t->get_current();
  58878. - } else {
  58879. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  58880. - }
  58881. - }
  58882. - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  58883. - if (!SWIG_IsOK(ecode3)) {
  58884. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'");
  58885. - }
  58886. - arg3 = static_cast< std::vector< double >::size_type >(val3);
  58887. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  58888. - if (!SWIG_IsOK(ecode4)) {
  58889. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DoubleVector_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'");
  58890. - }
  58891. - temp4 = static_cast< std::vector< double >::value_type >(val4);
  58892. - arg4 = &temp4;
  58893. - (arg1)->insert(arg2,arg3,(std::vector< double >::value_type const &)*arg4);
  58894. - resultobj = SWIG_Py_Void();
  58895. - return resultobj;
  58896. -fail:
  58897. - return NULL;
  58898. -}
  58899. -
  58900. -
  58901. -SWIGINTERN PyObject *_wrap_DoubleVector_insert(PyObject *self, PyObject *args) {
  58902. - int argc;
  58903. - PyObject *argv[5];
  58904. - int ii;
  58905. -
  58906. - if (!PyTuple_Check(args)) SWIG_fail;
  58907. - argc = args ? (int)PyObject_Length(args) : 0;
  58908. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  58909. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  58910. - }
  58911. - if (argc == 3) {
  58912. - int _v;
  58913. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58914. - _v = SWIG_CheckState(res);
  58915. - if (_v) {
  58916. - swig::SwigPyIterator *iter = 0;
  58917. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  58918. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
  58919. - if (_v) {
  58920. - {
  58921. - int res = SWIG_AsVal_double(argv[2], NULL);
  58922. - _v = SWIG_CheckState(res);
  58923. - }
  58924. - if (_v) {
  58925. - return _wrap_DoubleVector_insert__SWIG_0(self, args);
  58926. - }
  58927. - }
  58928. - }
  58929. - }
  58930. - if (argc == 4) {
  58931. - int _v;
  58932. - int res = swig::asptr(argv[0], (std::vector<double,std::allocator< double > >**)(0));
  58933. - _v = SWIG_CheckState(res);
  58934. - if (_v) {
  58935. - swig::SwigPyIterator *iter = 0;
  58936. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  58937. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
  58938. - if (_v) {
  58939. - {
  58940. - int res = SWIG_AsVal_size_t(argv[2], NULL);
  58941. - _v = SWIG_CheckState(res);
  58942. - }
  58943. - if (_v) {
  58944. - {
  58945. - int res = SWIG_AsVal_double(argv[3], NULL);
  58946. - _v = SWIG_CheckState(res);
  58947. - }
  58948. - if (_v) {
  58949. - return _wrap_DoubleVector_insert__SWIG_1(self, args);
  58950. - }
  58951. - }
  58952. - }
  58953. - }
  58954. - }
  58955. -
  58956. -fail:
  58957. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_insert'.\n"
  58958. - " Possible C/C++ prototypes are:\n"
  58959. - " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n"
  58960. - " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  58961. - return 0;
  58962. -}
  58963. -
  58964. -
  58965. -SWIGINTERN PyObject *_wrap_DoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58966. - PyObject *resultobj = 0;
  58967. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58968. - std::vector< double >::size_type arg2 ;
  58969. - void *argp1 = 0 ;
  58970. - int res1 = 0 ;
  58971. - size_t val2 ;
  58972. - int ecode2 = 0 ;
  58973. - PyObject * obj0 = 0 ;
  58974. - PyObject * obj1 = 0 ;
  58975. -
  58976. - if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_reserve",&obj0,&obj1)) SWIG_fail;
  58977. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  58978. - if (!SWIG_IsOK(res1)) {
  58979. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'");
  58980. - }
  58981. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  58982. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  58983. - if (!SWIG_IsOK(ecode2)) {
  58984. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  58985. - }
  58986. - arg2 = static_cast< std::vector< double >::size_type >(val2);
  58987. - (arg1)->reserve(arg2);
  58988. - resultobj = SWIG_Py_Void();
  58989. - return resultobj;
  58990. -fail:
  58991. - return NULL;
  58992. -}
  58993. -
  58994. -
  58995. -SWIGINTERN PyObject *_wrap_DoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  58996. - PyObject *resultobj = 0;
  58997. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  58998. - void *argp1 = 0 ;
  58999. - int res1 = 0 ;
  59000. - PyObject * obj0 = 0 ;
  59001. - std::vector< double >::size_type result;
  59002. -
  59003. - if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_capacity",&obj0)) SWIG_fail;
  59004. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 );
  59005. - if (!SWIG_IsOK(res1)) {
  59006. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'");
  59007. - }
  59008. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  59009. - result = ((std::vector< double > const *)arg1)->capacity();
  59010. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  59011. - return resultobj;
  59012. -fail:
  59013. - return NULL;
  59014. -}
  59015. -
  59016. -
  59017. -SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59018. - PyObject *resultobj = 0;
  59019. - std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  59020. - void *argp1 = 0 ;
  59021. - int res1 = 0 ;
  59022. - PyObject * obj0 = 0 ;
  59023. -
  59024. - if (!PyArg_ParseTuple(args,(char *)"O:delete_DoubleVector",&obj0)) SWIG_fail;
  59025. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 );
  59026. - if (!SWIG_IsOK(res1)) {
  59027. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'");
  59028. - }
  59029. - arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  59030. - delete arg1;
  59031. - resultobj = SWIG_Py_Void();
  59032. - return resultobj;
  59033. -fail:
  59034. - return NULL;
  59035. -}
  59036. -
  59037. -
  59038. -SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59039. - PyObject *obj;
  59040. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  59041. - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj));
  59042. - return SWIG_Py_Void();
  59043. -}
  59044. -
  59045. -SWIGINTERN PyObject *_wrap_ImageVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59046. - PyObject *resultobj = 0;
  59047. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59048. - PyObject **arg2 = (PyObject **) 0 ;
  59049. - void *argp1 = 0 ;
  59050. - int res1 = 0 ;
  59051. - PyObject * obj0 = 0 ;
  59052. - swig::SwigPyIterator *result = 0 ;
  59053. -
  59054. - arg2 = &obj0;
  59055. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_iterator",&obj0)) SWIG_fail;
  59056. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59057. - if (!SWIG_IsOK(res1)) {
  59058. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_iterator" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59059. - }
  59060. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59061. - result = (swig::SwigPyIterator *)std_vector_Sl_vips_VImage_Sg__iterator(arg1,arg2);
  59062. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 );
  59063. - return resultobj;
  59064. -fail:
  59065. - return NULL;
  59066. -}
  59067. -
  59068. -
  59069. -SWIGINTERN PyObject *_wrap_ImageVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59070. - PyObject *resultobj = 0;
  59071. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59072. - void *argp1 = 0 ;
  59073. - int res1 = 0 ;
  59074. - PyObject * obj0 = 0 ;
  59075. - bool result;
  59076. -
  59077. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___nonzero__",&obj0)) SWIG_fail;
  59078. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59079. - if (!SWIG_IsOK(res1)) {
  59080. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___nonzero__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59081. - }
  59082. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59083. - result = (bool)std_vector_Sl_vips_VImage_Sg____nonzero__((std::vector< vips::VImage > const *)arg1);
  59084. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  59085. - return resultobj;
  59086. -fail:
  59087. - return NULL;
  59088. -}
  59089. -
  59090. -
  59091. -SWIGINTERN PyObject *_wrap_ImageVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59092. - PyObject *resultobj = 0;
  59093. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59094. - void *argp1 = 0 ;
  59095. - int res1 = 0 ;
  59096. - PyObject * obj0 = 0 ;
  59097. - bool result;
  59098. -
  59099. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___bool__",&obj0)) SWIG_fail;
  59100. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59101. - if (!SWIG_IsOK(res1)) {
  59102. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___bool__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59103. - }
  59104. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59105. - result = (bool)std_vector_Sl_vips_VImage_Sg____bool__((std::vector< vips::VImage > const *)arg1);
  59106. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  59107. - return resultobj;
  59108. -fail:
  59109. - return NULL;
  59110. -}
  59111. -
  59112. -
  59113. -SWIGINTERN PyObject *_wrap_ImageVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59114. - PyObject *resultobj = 0;
  59115. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59116. - void *argp1 = 0 ;
  59117. - int res1 = 0 ;
  59118. - PyObject * obj0 = 0 ;
  59119. - std::vector< vips::VImage >::size_type result;
  59120. -
  59121. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___len__",&obj0)) SWIG_fail;
  59122. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59123. - if (!SWIG_IsOK(res1)) {
  59124. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___len__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59125. - }
  59126. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59127. - result = std_vector_Sl_vips_VImage_Sg____len__((std::vector< vips::VImage > const *)arg1);
  59128. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  59129. - return resultobj;
  59130. -fail:
  59131. - return NULL;
  59132. -}
  59133. -
  59134. -
  59135. -SWIGINTERN PyObject *_wrap_ImageVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59136. - PyObject *resultobj = 0;
  59137. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59138. - void *argp1 = 0 ;
  59139. - int res1 = 0 ;
  59140. - PyObject * obj0 = 0 ;
  59141. - std::vector< vips::VImage >::value_type result;
  59142. -
  59143. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop",&obj0)) SWIG_fail;
  59144. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59145. - if (!SWIG_IsOK(res1)) {
  59146. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59147. - }
  59148. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59149. - try {
  59150. - result = std_vector_Sl_vips_VImage_Sg__pop(arg1);
  59151. - }
  59152. - catch(std::out_of_range &_e) {
  59153. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59154. - }
  59155. -
  59156. - resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::value_type(static_cast< const std::vector< vips::VImage >::value_type& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  59157. - return resultobj;
  59158. -fail:
  59159. - return NULL;
  59160. -}
  59161. -
  59162. -
  59163. -SWIGINTERN PyObject *_wrap_ImageVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59164. - PyObject *resultobj = 0;
  59165. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59166. - std::vector< vips::VImage >::difference_type arg2 ;
  59167. - std::vector< vips::VImage >::difference_type arg3 ;
  59168. - void *argp1 = 0 ;
  59169. - int res1 = 0 ;
  59170. - ptrdiff_t val2 ;
  59171. - int ecode2 = 0 ;
  59172. - ptrdiff_t val3 ;
  59173. - int ecode3 = 0 ;
  59174. - PyObject * obj0 = 0 ;
  59175. - PyObject * obj1 = 0 ;
  59176. - PyObject * obj2 = 0 ;
  59177. - std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ;
  59178. -
  59179. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  59180. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59181. - if (!SWIG_IsOK(res1)) {
  59182. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59183. - }
  59184. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59185. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59186. - if (!SWIG_IsOK(ecode2)) {
  59187. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59188. - }
  59189. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59190. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  59191. - if (!SWIG_IsOK(ecode3)) {
  59192. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___getslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59193. - }
  59194. - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
  59195. - try {
  59196. - result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getslice__(arg1,arg2,arg3);
  59197. - }
  59198. - catch(std::out_of_range &_e) {
  59199. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59200. - }
  59201. - catch(std::invalid_argument &_e) {
  59202. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59203. - }
  59204. -
  59205. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 );
  59206. - return resultobj;
  59207. -fail:
  59208. - return NULL;
  59209. -}
  59210. -
  59211. -
  59212. -SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59213. - PyObject *resultobj = 0;
  59214. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59215. - std::vector< vips::VImage >::difference_type arg2 ;
  59216. - std::vector< vips::VImage >::difference_type arg3 ;
  59217. - std::vector< vips::VImage,std::allocator< vips::VImage > > *arg4 = 0 ;
  59218. - void *argp1 = 0 ;
  59219. - int res1 = 0 ;
  59220. - ptrdiff_t val2 ;
  59221. - int ecode2 = 0 ;
  59222. - ptrdiff_t val3 ;
  59223. - int ecode3 = 0 ;
  59224. - int res4 = SWIG_OLDOBJ ;
  59225. - PyObject * obj0 = 0 ;
  59226. - PyObject * obj1 = 0 ;
  59227. - PyObject * obj2 = 0 ;
  59228. - PyObject * obj3 = 0 ;
  59229. -
  59230. - if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  59231. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59232. - if (!SWIG_IsOK(res1)) {
  59233. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59234. - }
  59235. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59236. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59237. - if (!SWIG_IsOK(ecode2)) {
  59238. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59239. - }
  59240. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59241. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  59242. - if (!SWIG_IsOK(ecode3)) {
  59243. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59244. - }
  59245. - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
  59246. - {
  59247. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  59248. - res4 = swig::asptr(obj3, &ptr);
  59249. - if (!SWIG_IsOK(res4)) {
  59250. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
  59251. - }
  59252. - if (!ptr) {
  59253. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
  59254. - }
  59255. - arg4 = ptr;
  59256. - }
  59257. - try {
  59258. - std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg4);
  59259. - }
  59260. - catch(std::out_of_range &_e) {
  59261. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59262. - }
  59263. - catch(std::invalid_argument &_e) {
  59264. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59265. - }
  59266. -
  59267. - resultobj = SWIG_Py_Void();
  59268. - if (SWIG_IsNewObj(res4)) delete arg4;
  59269. - return resultobj;
  59270. -fail:
  59271. - if (SWIG_IsNewObj(res4)) delete arg4;
  59272. - return NULL;
  59273. -}
  59274. -
  59275. -
  59276. -SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59277. - PyObject *resultobj = 0;
  59278. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59279. - std::vector< vips::VImage >::difference_type arg2 ;
  59280. - std::vector< vips::VImage >::difference_type arg3 ;
  59281. - void *argp1 = 0 ;
  59282. - int res1 = 0 ;
  59283. - ptrdiff_t val2 ;
  59284. - int ecode2 = 0 ;
  59285. - ptrdiff_t val3 ;
  59286. - int ecode3 = 0 ;
  59287. - PyObject * obj0 = 0 ;
  59288. - PyObject * obj1 = 0 ;
  59289. - PyObject * obj2 = 0 ;
  59290. -
  59291. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  59292. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59293. - if (!SWIG_IsOK(res1)) {
  59294. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59295. - }
  59296. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59297. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59298. - if (!SWIG_IsOK(ecode2)) {
  59299. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59300. - }
  59301. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59302. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  59303. - if (!SWIG_IsOK(ecode3)) {
  59304. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59305. - }
  59306. - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
  59307. - try {
  59308. - std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3);
  59309. - }
  59310. - catch(std::out_of_range &_e) {
  59311. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59312. - }
  59313. - catch(std::invalid_argument &_e) {
  59314. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59315. - }
  59316. -
  59317. - resultobj = SWIG_Py_Void();
  59318. - return resultobj;
  59319. -fail:
  59320. - return NULL;
  59321. -}
  59322. -
  59323. -
  59324. -SWIGINTERN PyObject *_wrap_ImageVector___setslice__(PyObject *self, PyObject *args) {
  59325. - int argc;
  59326. - PyObject *argv[5];
  59327. - int ii;
  59328. -
  59329. - if (!PyTuple_Check(args)) SWIG_fail;
  59330. - argc = args ? (int)PyObject_Length(args) : 0;
  59331. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  59332. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  59333. - }
  59334. - if (argc == 3) {
  59335. - int _v;
  59336. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59337. - _v = SWIG_CheckState(res);
  59338. - if (_v) {
  59339. - {
  59340. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  59341. - _v = SWIG_CheckState(res);
  59342. - }
  59343. - if (_v) {
  59344. - {
  59345. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  59346. - _v = SWIG_CheckState(res);
  59347. - }
  59348. - if (_v) {
  59349. - return _wrap_ImageVector___setslice____SWIG_1(self, args);
  59350. - }
  59351. - }
  59352. - }
  59353. - }
  59354. - if (argc == 4) {
  59355. - int _v;
  59356. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59357. - _v = SWIG_CheckState(res);
  59358. - if (_v) {
  59359. - {
  59360. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  59361. - _v = SWIG_CheckState(res);
  59362. - }
  59363. - if (_v) {
  59364. - {
  59365. - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
  59366. - _v = SWIG_CheckState(res);
  59367. - }
  59368. - if (_v) {
  59369. - int res = swig::asptr(argv[3], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59370. - _v = SWIG_CheckState(res);
  59371. - if (_v) {
  59372. - return _wrap_ImageVector___setslice____SWIG_0(self, args);
  59373. - }
  59374. - }
  59375. - }
  59376. - }
  59377. - }
  59378. -
  59379. -fail:
  59380. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setslice__'.\n"
  59381. - " Possible C/C++ prototypes are:\n"
  59382. - " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n"
  59383. - " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type)\n");
  59384. - return 0;
  59385. -}
  59386. -
  59387. -
  59388. -SWIGINTERN PyObject *_wrap_ImageVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59389. - PyObject *resultobj = 0;
  59390. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59391. - std::vector< vips::VImage >::difference_type arg2 ;
  59392. - std::vector< vips::VImage >::difference_type arg3 ;
  59393. - void *argp1 = 0 ;
  59394. - int res1 = 0 ;
  59395. - ptrdiff_t val2 ;
  59396. - int ecode2 = 0 ;
  59397. - ptrdiff_t val3 ;
  59398. - int ecode3 = 0 ;
  59399. - PyObject * obj0 = 0 ;
  59400. - PyObject * obj1 = 0 ;
  59401. - PyObject * obj2 = 0 ;
  59402. -
  59403. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  59404. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59405. - if (!SWIG_IsOK(res1)) {
  59406. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59407. - }
  59408. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59409. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59410. - if (!SWIG_IsOK(ecode2)) {
  59411. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59412. - }
  59413. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59414. - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  59415. - if (!SWIG_IsOK(ecode3)) {
  59416. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___delslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59417. - }
  59418. - arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3);
  59419. - try {
  59420. - std_vector_Sl_vips_VImage_Sg____delslice__(arg1,arg2,arg3);
  59421. - }
  59422. - catch(std::out_of_range &_e) {
  59423. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59424. - }
  59425. - catch(std::invalid_argument &_e) {
  59426. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59427. - }
  59428. -
  59429. - resultobj = SWIG_Py_Void();
  59430. - return resultobj;
  59431. -fail:
  59432. - return NULL;
  59433. -}
  59434. -
  59435. -
  59436. -SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59437. - PyObject *resultobj = 0;
  59438. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59439. - std::vector< vips::VImage >::difference_type arg2 ;
  59440. - void *argp1 = 0 ;
  59441. - int res1 = 0 ;
  59442. - ptrdiff_t val2 ;
  59443. - int ecode2 = 0 ;
  59444. - PyObject * obj0 = 0 ;
  59445. - PyObject * obj1 = 0 ;
  59446. -
  59447. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail;
  59448. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59449. - if (!SWIG_IsOK(res1)) {
  59450. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59451. - }
  59452. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59453. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59454. - if (!SWIG_IsOK(ecode2)) {
  59455. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59456. - }
  59457. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59458. - try {
  59459. - std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(arg1,arg2);
  59460. - }
  59461. - catch(std::out_of_range &_e) {
  59462. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59463. - }
  59464. -
  59465. - resultobj = SWIG_Py_Void();
  59466. - return resultobj;
  59467. -fail:
  59468. - return NULL;
  59469. -}
  59470. -
  59471. -
  59472. -SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59473. - PyObject *resultobj = 0;
  59474. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59475. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  59476. - void *argp1 = 0 ;
  59477. - int res1 = 0 ;
  59478. - PyObject * obj0 = 0 ;
  59479. - PyObject * obj1 = 0 ;
  59480. - std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ;
  59481. -
  59482. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail;
  59483. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59484. - if (!SWIG_IsOK(res1)) {
  59485. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59486. - }
  59487. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59488. - {
  59489. - if (!PySlice_Check(obj1)) {
  59490. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  59491. - }
  59492. - arg2 = (PySliceObject *) obj1;
  59493. - }
  59494. - try {
  59495. - result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(arg1,arg2);
  59496. - }
  59497. - catch(std::out_of_range &_e) {
  59498. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59499. - }
  59500. - catch(std::invalid_argument &_e) {
  59501. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59502. - }
  59503. -
  59504. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 );
  59505. - return resultobj;
  59506. -fail:
  59507. - return NULL;
  59508. -}
  59509. -
  59510. -
  59511. -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59512. - PyObject *resultobj = 0;
  59513. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59514. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  59515. - std::vector< vips::VImage,std::allocator< vips::VImage > > *arg3 = 0 ;
  59516. - void *argp1 = 0 ;
  59517. - int res1 = 0 ;
  59518. - int res3 = SWIG_OLDOBJ ;
  59519. - PyObject * obj0 = 0 ;
  59520. - PyObject * obj1 = 0 ;
  59521. - PyObject * obj2 = 0 ;
  59522. -
  59523. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  59524. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59525. - if (!SWIG_IsOK(res1)) {
  59526. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59527. - }
  59528. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59529. - {
  59530. - if (!PySlice_Check(obj1)) {
  59531. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  59532. - }
  59533. - arg2 = (PySliceObject *) obj1;
  59534. - }
  59535. - {
  59536. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  59537. - res3 = swig::asptr(obj2, &ptr);
  59538. - if (!SWIG_IsOK(res3)) {
  59539. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
  59540. - }
  59541. - if (!ptr) {
  59542. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'");
  59543. - }
  59544. - arg3 = ptr;
  59545. - }
  59546. - try {
  59547. - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg3);
  59548. - }
  59549. - catch(std::out_of_range &_e) {
  59550. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59551. - }
  59552. - catch(std::invalid_argument &_e) {
  59553. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59554. - }
  59555. -
  59556. - resultobj = SWIG_Py_Void();
  59557. - if (SWIG_IsNewObj(res3)) delete arg3;
  59558. - return resultobj;
  59559. -fail:
  59560. - if (SWIG_IsNewObj(res3)) delete arg3;
  59561. - return NULL;
  59562. -}
  59563. -
  59564. -
  59565. -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59566. - PyObject *resultobj = 0;
  59567. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59568. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  59569. - void *argp1 = 0 ;
  59570. - int res1 = 0 ;
  59571. - PyObject * obj0 = 0 ;
  59572. - PyObject * obj1 = 0 ;
  59573. -
  59574. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___setitem__",&obj0,&obj1)) SWIG_fail;
  59575. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59576. - if (!SWIG_IsOK(res1)) {
  59577. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59578. - }
  59579. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59580. - {
  59581. - if (!PySlice_Check(obj1)) {
  59582. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  59583. - }
  59584. - arg2 = (PySliceObject *) obj1;
  59585. - }
  59586. - try {
  59587. - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(arg1,arg2);
  59588. - }
  59589. - catch(std::out_of_range &_e) {
  59590. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59591. - }
  59592. - catch(std::invalid_argument &_e) {
  59593. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59594. - }
  59595. -
  59596. - resultobj = SWIG_Py_Void();
  59597. - return resultobj;
  59598. -fail:
  59599. - return NULL;
  59600. -}
  59601. -
  59602. -
  59603. -SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59604. - PyObject *resultobj = 0;
  59605. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59606. - PySliceObject *arg2 = (PySliceObject *) 0 ;
  59607. - void *argp1 = 0 ;
  59608. - int res1 = 0 ;
  59609. - PyObject * obj0 = 0 ;
  59610. - PyObject * obj1 = 0 ;
  59611. -
  59612. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail;
  59613. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59614. - if (!SWIG_IsOK(res1)) {
  59615. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59616. - }
  59617. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59618. - {
  59619. - if (!PySlice_Check(obj1)) {
  59620. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
  59621. - }
  59622. - arg2 = (PySliceObject *) obj1;
  59623. - }
  59624. - try {
  59625. - std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(arg1,arg2);
  59626. - }
  59627. - catch(std::out_of_range &_e) {
  59628. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59629. - }
  59630. - catch(std::invalid_argument &_e) {
  59631. - SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  59632. - }
  59633. -
  59634. - resultobj = SWIG_Py_Void();
  59635. - return resultobj;
  59636. -fail:
  59637. - return NULL;
  59638. -}
  59639. -
  59640. -
  59641. -SWIGINTERN PyObject *_wrap_ImageVector___delitem__(PyObject *self, PyObject *args) {
  59642. - int argc;
  59643. - PyObject *argv[3];
  59644. - int ii;
  59645. -
  59646. - if (!PyTuple_Check(args)) SWIG_fail;
  59647. - argc = args ? (int)PyObject_Length(args) : 0;
  59648. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  59649. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  59650. - }
  59651. - if (argc == 2) {
  59652. - int _v;
  59653. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59654. - _v = SWIG_CheckState(res);
  59655. - if (_v) {
  59656. - {
  59657. - _v = PySlice_Check(argv[1]);
  59658. - }
  59659. - if (_v) {
  59660. - return _wrap_ImageVector___delitem____SWIG_1(self, args);
  59661. - }
  59662. - }
  59663. - }
  59664. - if (argc == 2) {
  59665. - int _v;
  59666. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59667. - _v = SWIG_CheckState(res);
  59668. - if (_v) {
  59669. - {
  59670. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  59671. - _v = SWIG_CheckState(res);
  59672. - }
  59673. - if (_v) {
  59674. - return _wrap_ImageVector___delitem____SWIG_0(self, args);
  59675. - }
  59676. - }
  59677. - }
  59678. -
  59679. -fail:
  59680. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___delitem__'.\n"
  59681. - " Possible C/C++ prototypes are:\n"
  59682. - " std::vector< vips::VImage >::__delitem__(std::vector< vips::VImage >::difference_type)\n"
  59683. - " std::vector< vips::VImage >::__delitem__(PySliceObject *)\n");
  59684. - return 0;
  59685. -}
  59686. -
  59687. -
  59688. -SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59689. - PyObject *resultobj = 0;
  59690. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59691. - std::vector< vips::VImage >::difference_type arg2 ;
  59692. - void *argp1 = 0 ;
  59693. - int res1 = 0 ;
  59694. - ptrdiff_t val2 ;
  59695. - int ecode2 = 0 ;
  59696. - PyObject * obj0 = 0 ;
  59697. - PyObject * obj1 = 0 ;
  59698. - std::vector< vips::VImage >::value_type *result = 0 ;
  59699. -
  59700. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail;
  59701. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59702. - if (!SWIG_IsOK(res1)) {
  59703. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59704. - }
  59705. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59706. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59707. - if (!SWIG_IsOK(ecode2)) {
  59708. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59709. - }
  59710. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59711. - try {
  59712. - result = (std::vector< vips::VImage >::value_type *) &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1((std::vector< vips::VImage > const *)arg1,arg2);
  59713. - }
  59714. - catch(std::out_of_range &_e) {
  59715. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59716. - }
  59717. -
  59718. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
  59719. - return resultobj;
  59720. -fail:
  59721. - return NULL;
  59722. -}
  59723. -
  59724. -
  59725. -SWIGINTERN PyObject *_wrap_ImageVector___getitem__(PyObject *self, PyObject *args) {
  59726. - int argc;
  59727. - PyObject *argv[3];
  59728. - int ii;
  59729. -
  59730. - if (!PyTuple_Check(args)) SWIG_fail;
  59731. - argc = args ? (int)PyObject_Length(args) : 0;
  59732. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  59733. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  59734. - }
  59735. - if (argc == 2) {
  59736. - int _v;
  59737. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59738. - _v = SWIG_CheckState(res);
  59739. - if (_v) {
  59740. - {
  59741. - _v = PySlice_Check(argv[1]);
  59742. - }
  59743. - if (_v) {
  59744. - return _wrap_ImageVector___getitem____SWIG_0(self, args);
  59745. - }
  59746. - }
  59747. - }
  59748. - if (argc == 2) {
  59749. - int _v;
  59750. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59751. - _v = SWIG_CheckState(res);
  59752. - if (_v) {
  59753. - {
  59754. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  59755. - _v = SWIG_CheckState(res);
  59756. - }
  59757. - if (_v) {
  59758. - return _wrap_ImageVector___getitem____SWIG_1(self, args);
  59759. - }
  59760. - }
  59761. - }
  59762. -
  59763. -fail:
  59764. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___getitem__'.\n"
  59765. - " Possible C/C++ prototypes are:\n"
  59766. - " std::vector< vips::VImage >::__getitem__(PySliceObject *)\n"
  59767. - " std::vector< vips::VImage >::__getitem__(std::vector< vips::VImage >::difference_type) const\n");
  59768. - return 0;
  59769. -}
  59770. -
  59771. -
  59772. -SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59773. - PyObject *resultobj = 0;
  59774. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59775. - std::vector< vips::VImage >::difference_type arg2 ;
  59776. - std::vector< vips::VImage >::value_type *arg3 = 0 ;
  59777. - void *argp1 = 0 ;
  59778. - int res1 = 0 ;
  59779. - ptrdiff_t val2 ;
  59780. - int ecode2 = 0 ;
  59781. - void *argp3 = 0 ;
  59782. - int res3 = 0 ;
  59783. - PyObject * obj0 = 0 ;
  59784. - PyObject * obj1 = 0 ;
  59785. - PyObject * obj2 = 0 ;
  59786. -
  59787. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  59788. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59789. - if (!SWIG_IsOK(res1)) {
  59790. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59791. - }
  59792. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59793. - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  59794. - if (!SWIG_IsOK(ecode2)) {
  59795. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'");
  59796. - }
  59797. - arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2);
  59798. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  59799. - if (!SWIG_IsOK(res3)) {
  59800. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  59801. - }
  59802. - if (!argp3) {
  59803. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  59804. - }
  59805. - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
  59806. - try {
  59807. - std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(arg1,arg2,(vips::VImage const &)*arg3);
  59808. - }
  59809. - catch(std::out_of_range &_e) {
  59810. - SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  59811. - }
  59812. -
  59813. - resultobj = SWIG_Py_Void();
  59814. - return resultobj;
  59815. -fail:
  59816. - return NULL;
  59817. -}
  59818. -
  59819. -
  59820. -SWIGINTERN PyObject *_wrap_ImageVector___setitem__(PyObject *self, PyObject *args) {
  59821. - int argc;
  59822. - PyObject *argv[4];
  59823. - int ii;
  59824. -
  59825. - if (!PyTuple_Check(args)) SWIG_fail;
  59826. - argc = args ? (int)PyObject_Length(args) : 0;
  59827. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  59828. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  59829. - }
  59830. - if (argc == 2) {
  59831. - int _v;
  59832. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59833. - _v = SWIG_CheckState(res);
  59834. - if (_v) {
  59835. - {
  59836. - _v = PySlice_Check(argv[1]);
  59837. - }
  59838. - if (_v) {
  59839. - return _wrap_ImageVector___setitem____SWIG_1(self, args);
  59840. - }
  59841. - }
  59842. - }
  59843. - if (argc == 3) {
  59844. - int _v;
  59845. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59846. - _v = SWIG_CheckState(res);
  59847. - if (_v) {
  59848. - {
  59849. - _v = PySlice_Check(argv[1]);
  59850. - }
  59851. - if (_v) {
  59852. - int res = swig::asptr(argv[2], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59853. - _v = SWIG_CheckState(res);
  59854. - if (_v) {
  59855. - return _wrap_ImageVector___setitem____SWIG_0(self, args);
  59856. - }
  59857. - }
  59858. - }
  59859. - }
  59860. - if (argc == 3) {
  59861. - int _v;
  59862. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  59863. - _v = SWIG_CheckState(res);
  59864. - if (_v) {
  59865. - {
  59866. - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
  59867. - _v = SWIG_CheckState(res);
  59868. - }
  59869. - if (_v) {
  59870. - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
  59871. - _v = SWIG_CheckState(res);
  59872. - if (_v) {
  59873. - return _wrap_ImageVector___setitem____SWIG_2(self, args);
  59874. - }
  59875. - }
  59876. - }
  59877. - }
  59878. -
  59879. -fail:
  59880. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setitem__'.\n"
  59881. - " Possible C/C++ prototypes are:\n"
  59882. - " std::vector< vips::VImage >::__setitem__(PySliceObject *,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n"
  59883. - " std::vector< vips::VImage >::__setitem__(PySliceObject *)\n"
  59884. - " std::vector< vips::VImage >::__setitem__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::value_type const &)\n");
  59885. - return 0;
  59886. -}
  59887. -
  59888. -
  59889. -SWIGINTERN PyObject *_wrap_ImageVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59890. - PyObject *resultobj = 0;
  59891. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59892. - std::vector< vips::VImage >::value_type *arg2 = 0 ;
  59893. - void *argp1 = 0 ;
  59894. - int res1 = 0 ;
  59895. - void *argp2 = 0 ;
  59896. - int res2 = 0 ;
  59897. - PyObject * obj0 = 0 ;
  59898. - PyObject * obj1 = 0 ;
  59899. -
  59900. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_append",&obj0,&obj1)) SWIG_fail;
  59901. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59902. - if (!SWIG_IsOK(res1)) {
  59903. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_append" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  59904. - }
  59905. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59906. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  59907. - if (!SWIG_IsOK(res2)) {
  59908. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  59909. - }
  59910. - if (!argp2) {
  59911. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  59912. - }
  59913. - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
  59914. - std_vector_Sl_vips_VImage_Sg__append(arg1,(vips::VImage const &)*arg2);
  59915. - resultobj = SWIG_Py_Void();
  59916. - return resultobj;
  59917. -fail:
  59918. - return NULL;
  59919. -}
  59920. -
  59921. -
  59922. -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59923. - PyObject *resultobj = 0;
  59924. - std::vector< vips::VImage > *result = 0 ;
  59925. -
  59926. - if (!PyArg_ParseTuple(args,(char *)":new_ImageVector")) SWIG_fail;
  59927. - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >();
  59928. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
  59929. - return resultobj;
  59930. -fail:
  59931. - return NULL;
  59932. -}
  59933. -
  59934. -
  59935. -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59936. - PyObject *resultobj = 0;
  59937. - std::vector< vips::VImage > *arg1 = 0 ;
  59938. - int res1 = SWIG_OLDOBJ ;
  59939. - PyObject * obj0 = 0 ;
  59940. - std::vector< vips::VImage > *result = 0 ;
  59941. -
  59942. - if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail;
  59943. - {
  59944. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  59945. - res1 = swig::asptr(obj0, &ptr);
  59946. - if (!SWIG_IsOK(res1)) {
  59947. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'");
  59948. - }
  59949. - if (!ptr) {
  59950. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'");
  59951. - }
  59952. - arg1 = ptr;
  59953. - }
  59954. - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >((std::vector< vips::VImage > const &)*arg1);
  59955. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
  59956. - if (SWIG_IsNewObj(res1)) delete arg1;
  59957. - return resultobj;
  59958. -fail:
  59959. - if (SWIG_IsNewObj(res1)) delete arg1;
  59960. - return NULL;
  59961. -}
  59962. -
  59963. -
  59964. -SWIGINTERN PyObject *_wrap_ImageVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59965. - PyObject *resultobj = 0;
  59966. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59967. - void *argp1 = 0 ;
  59968. - int res1 = 0 ;
  59969. - PyObject * obj0 = 0 ;
  59970. - bool result;
  59971. -
  59972. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_empty",&obj0)) SWIG_fail;
  59973. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59974. - if (!SWIG_IsOK(res1)) {
  59975. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_empty" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59976. - }
  59977. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  59978. - result = (bool)((std::vector< vips::VImage > const *)arg1)->empty();
  59979. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  59980. - return resultobj;
  59981. -fail:
  59982. - return NULL;
  59983. -}
  59984. -
  59985. -
  59986. -SWIGINTERN PyObject *_wrap_ImageVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  59987. - PyObject *resultobj = 0;
  59988. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  59989. - void *argp1 = 0 ;
  59990. - int res1 = 0 ;
  59991. - PyObject * obj0 = 0 ;
  59992. - std::vector< vips::VImage >::size_type result;
  59993. -
  59994. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_size",&obj0)) SWIG_fail;
  59995. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  59996. - if (!SWIG_IsOK(res1)) {
  59997. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_size" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  59998. - }
  59999. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60000. - result = ((std::vector< vips::VImage > const *)arg1)->size();
  60001. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  60002. - return resultobj;
  60003. -fail:
  60004. - return NULL;
  60005. -}
  60006. -
  60007. -
  60008. -SWIGINTERN PyObject *_wrap_ImageVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60009. - PyObject *resultobj = 0;
  60010. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60011. - void *argp1 = 0 ;
  60012. - int res1 = 0 ;
  60013. - PyObject * obj0 = 0 ;
  60014. -
  60015. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_clear",&obj0)) SWIG_fail;
  60016. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60017. - if (!SWIG_IsOK(res1)) {
  60018. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_clear" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60019. - }
  60020. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60021. - (arg1)->clear();
  60022. - resultobj = SWIG_Py_Void();
  60023. - return resultobj;
  60024. -fail:
  60025. - return NULL;
  60026. -}
  60027. -
  60028. -
  60029. -SWIGINTERN PyObject *_wrap_ImageVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60030. - PyObject *resultobj = 0;
  60031. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60032. - std::vector< vips::VImage > *arg2 = 0 ;
  60033. - void *argp1 = 0 ;
  60034. - int res1 = 0 ;
  60035. - void *argp2 = 0 ;
  60036. - int res2 = 0 ;
  60037. - PyObject * obj0 = 0 ;
  60038. - PyObject * obj1 = 0 ;
  60039. -
  60040. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_swap",&obj0,&obj1)) SWIG_fail;
  60041. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60042. - if (!SWIG_IsOK(res1)) {
  60043. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_swap" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60044. - }
  60045. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60046. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 );
  60047. - if (!SWIG_IsOK(res2)) {
  60048. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'");
  60049. - }
  60050. - if (!argp2) {
  60051. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'");
  60052. - }
  60053. - arg2 = reinterpret_cast< std::vector< vips::VImage > * >(argp2);
  60054. - (arg1)->swap(*arg2);
  60055. - resultobj = SWIG_Py_Void();
  60056. - return resultobj;
  60057. -fail:
  60058. - return NULL;
  60059. -}
  60060. -
  60061. -
  60062. -SWIGINTERN PyObject *_wrap_ImageVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60063. - PyObject *resultobj = 0;
  60064. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60065. - void *argp1 = 0 ;
  60066. - int res1 = 0 ;
  60067. - PyObject * obj0 = 0 ;
  60068. - SwigValueWrapper< std::allocator< vips::VImage > > result;
  60069. -
  60070. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_get_allocator",&obj0)) SWIG_fail;
  60071. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60072. - if (!SWIG_IsOK(res1)) {
  60073. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_get_allocator" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  60074. - }
  60075. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60076. - result = ((std::vector< vips::VImage > const *)arg1)->get_allocator();
  60077. - resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::allocator_type(static_cast< const std::vector< vips::VImage >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_vips__VImage_t, SWIG_POINTER_OWN | 0 );
  60078. - return resultobj;
  60079. -fail:
  60080. - return NULL;
  60081. -}
  60082. -
  60083. -
  60084. -SWIGINTERN PyObject *_wrap_ImageVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60085. - PyObject *resultobj = 0;
  60086. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60087. - void *argp1 = 0 ;
  60088. - int res1 = 0 ;
  60089. - PyObject * obj0 = 0 ;
  60090. - std::vector< vips::VImage >::iterator result;
  60091. -
  60092. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_begin",&obj0)) SWIG_fail;
  60093. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60094. - if (!SWIG_IsOK(res1)) {
  60095. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_begin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60096. - }
  60097. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60098. - result = (arg1)->begin();
  60099. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
  60100. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60101. - return resultobj;
  60102. -fail:
  60103. - return NULL;
  60104. -}
  60105. -
  60106. -
  60107. -SWIGINTERN PyObject *_wrap_ImageVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60108. - PyObject *resultobj = 0;
  60109. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60110. - void *argp1 = 0 ;
  60111. - int res1 = 0 ;
  60112. - PyObject * obj0 = 0 ;
  60113. - std::vector< vips::VImage >::iterator result;
  60114. -
  60115. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_end",&obj0)) SWIG_fail;
  60116. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60117. - if (!SWIG_IsOK(res1)) {
  60118. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_end" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60119. - }
  60120. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60121. - result = (arg1)->end();
  60122. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
  60123. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60124. - return resultobj;
  60125. -fail:
  60126. - return NULL;
  60127. -}
  60128. -
  60129. -
  60130. -SWIGINTERN PyObject *_wrap_ImageVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60131. - PyObject *resultobj = 0;
  60132. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60133. - void *argp1 = 0 ;
  60134. - int res1 = 0 ;
  60135. - PyObject * obj0 = 0 ;
  60136. - std::vector< vips::VImage >::reverse_iterator result;
  60137. -
  60138. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rbegin",&obj0)) SWIG_fail;
  60139. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60140. - if (!SWIG_IsOK(res1)) {
  60141. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rbegin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60142. - }
  60143. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60144. - result = (arg1)->rbegin();
  60145. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)),
  60146. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60147. - return resultobj;
  60148. -fail:
  60149. - return NULL;
  60150. -}
  60151. -
  60152. -
  60153. -SWIGINTERN PyObject *_wrap_ImageVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60154. - PyObject *resultobj = 0;
  60155. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60156. - void *argp1 = 0 ;
  60157. - int res1 = 0 ;
  60158. - PyObject * obj0 = 0 ;
  60159. - std::vector< vips::VImage >::reverse_iterator result;
  60160. -
  60161. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rend",&obj0)) SWIG_fail;
  60162. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60163. - if (!SWIG_IsOK(res1)) {
  60164. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rend" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60165. - }
  60166. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60167. - result = (arg1)->rend();
  60168. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)),
  60169. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60170. - return resultobj;
  60171. -fail:
  60172. - return NULL;
  60173. -}
  60174. -
  60175. -
  60176. -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60177. - PyObject *resultobj = 0;
  60178. - std::vector< vips::VImage >::size_type arg1 ;
  60179. - size_t val1 ;
  60180. - int ecode1 = 0 ;
  60181. - PyObject * obj0 = 0 ;
  60182. - std::vector< vips::VImage > *result = 0 ;
  60183. -
  60184. - if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail;
  60185. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  60186. - if (!SWIG_IsOK(ecode1)) {
  60187. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'");
  60188. - }
  60189. - arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1);
  60190. - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1);
  60191. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
  60192. - return resultobj;
  60193. -fail:
  60194. - return NULL;
  60195. -}
  60196. -
  60197. -
  60198. -SWIGINTERN PyObject *_wrap_ImageVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60199. - PyObject *resultobj = 0;
  60200. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60201. - void *argp1 = 0 ;
  60202. - int res1 = 0 ;
  60203. - PyObject * obj0 = 0 ;
  60204. -
  60205. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop_back",&obj0)) SWIG_fail;
  60206. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60207. - if (!SWIG_IsOK(res1)) {
  60208. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60209. - }
  60210. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60211. - (arg1)->pop_back();
  60212. - resultobj = SWIG_Py_Void();
  60213. - return resultobj;
  60214. -fail:
  60215. - return NULL;
  60216. -}
  60217. -
  60218. -
  60219. -SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60220. - PyObject *resultobj = 0;
  60221. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60222. - std::vector< vips::VImage >::size_type arg2 ;
  60223. - void *argp1 = 0 ;
  60224. - int res1 = 0 ;
  60225. - size_t val2 ;
  60226. - int ecode2 = 0 ;
  60227. - PyObject * obj0 = 0 ;
  60228. - PyObject * obj1 = 0 ;
  60229. -
  60230. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_resize",&obj0,&obj1)) SWIG_fail;
  60231. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60232. - if (!SWIG_IsOK(res1)) {
  60233. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60234. - }
  60235. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60236. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  60237. - if (!SWIG_IsOK(ecode2)) {
  60238. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
  60239. - }
  60240. - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
  60241. - (arg1)->resize(arg2);
  60242. - resultobj = SWIG_Py_Void();
  60243. - return resultobj;
  60244. -fail:
  60245. - return NULL;
  60246. -}
  60247. -
  60248. -
  60249. -SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60250. - PyObject *resultobj = 0;
  60251. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60252. - std::vector< vips::VImage >::iterator arg2 ;
  60253. - void *argp1 = 0 ;
  60254. - int res1 = 0 ;
  60255. - swig::SwigPyIterator *iter2 = 0 ;
  60256. - int res2 ;
  60257. - PyObject * obj0 = 0 ;
  60258. - PyObject * obj1 = 0 ;
  60259. - std::vector< vips::VImage >::iterator result;
  60260. -
  60261. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_erase",&obj0,&obj1)) SWIG_fail;
  60262. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60263. - if (!SWIG_IsOK(res1)) {
  60264. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60265. - }
  60266. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60267. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  60268. - if (!SWIG_IsOK(res2) || !iter2) {
  60269. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60270. - } else {
  60271. - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
  60272. - if (iter_t) {
  60273. - arg2 = iter_t->get_current();
  60274. - } else {
  60275. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60276. - }
  60277. - }
  60278. - result = (arg1)->erase(arg2);
  60279. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
  60280. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60281. - return resultobj;
  60282. -fail:
  60283. - return NULL;
  60284. -}
  60285. -
  60286. -
  60287. -SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60288. - PyObject *resultobj = 0;
  60289. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60290. - std::vector< vips::VImage >::iterator arg2 ;
  60291. - std::vector< vips::VImage >::iterator arg3 ;
  60292. - void *argp1 = 0 ;
  60293. - int res1 = 0 ;
  60294. - swig::SwigPyIterator *iter2 = 0 ;
  60295. - int res2 ;
  60296. - swig::SwigPyIterator *iter3 = 0 ;
  60297. - int res3 ;
  60298. - PyObject * obj0 = 0 ;
  60299. - PyObject * obj1 = 0 ;
  60300. - PyObject * obj2 = 0 ;
  60301. - std::vector< vips::VImage >::iterator result;
  60302. -
  60303. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  60304. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60305. - if (!SWIG_IsOK(res1)) {
  60306. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60307. - }
  60308. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60309. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  60310. - if (!SWIG_IsOK(res2) || !iter2) {
  60311. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60312. - } else {
  60313. - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
  60314. - if (iter_t) {
  60315. - arg2 = iter_t->get_current();
  60316. - } else {
  60317. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60318. - }
  60319. - }
  60320. - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  60321. - if (!SWIG_IsOK(res3) || !iter3) {
  60322. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'");
  60323. - } else {
  60324. - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter3);
  60325. - if (iter_t) {
  60326. - arg3 = iter_t->get_current();
  60327. - } else {
  60328. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'");
  60329. - }
  60330. - }
  60331. - result = (arg1)->erase(arg2,arg3);
  60332. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
  60333. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60334. - return resultobj;
  60335. -fail:
  60336. - return NULL;
  60337. -}
  60338. -
  60339. -
  60340. -SWIGINTERN PyObject *_wrap_ImageVector_erase(PyObject *self, PyObject *args) {
  60341. - int argc;
  60342. - PyObject *argv[4];
  60343. - int ii;
  60344. -
  60345. - if (!PyTuple_Check(args)) SWIG_fail;
  60346. - argc = args ? (int)PyObject_Length(args) : 0;
  60347. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  60348. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  60349. - }
  60350. - if (argc == 2) {
  60351. - int _v;
  60352. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60353. - _v = SWIG_CheckState(res);
  60354. - if (_v) {
  60355. - swig::SwigPyIterator *iter = 0;
  60356. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  60357. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
  60358. - if (_v) {
  60359. - return _wrap_ImageVector_erase__SWIG_0(self, args);
  60360. - }
  60361. - }
  60362. - }
  60363. - if (argc == 3) {
  60364. - int _v;
  60365. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60366. - _v = SWIG_CheckState(res);
  60367. - if (_v) {
  60368. - swig::SwigPyIterator *iter = 0;
  60369. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  60370. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
  60371. - if (_v) {
  60372. - swig::SwigPyIterator *iter = 0;
  60373. - int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  60374. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
  60375. - if (_v) {
  60376. - return _wrap_ImageVector_erase__SWIG_1(self, args);
  60377. - }
  60378. - }
  60379. - }
  60380. - }
  60381. -
  60382. -fail:
  60383. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_erase'.\n"
  60384. - " Possible C/C++ prototypes are:\n"
  60385. - " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator)\n"
  60386. - " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::iterator)\n");
  60387. - return 0;
  60388. -}
  60389. -
  60390. -
  60391. -SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60392. - PyObject *resultobj = 0;
  60393. - std::vector< vips::VImage >::size_type arg1 ;
  60394. - std::vector< vips::VImage >::value_type *arg2 = 0 ;
  60395. - size_t val1 ;
  60396. - int ecode1 = 0 ;
  60397. - void *argp2 = 0 ;
  60398. - int res2 = 0 ;
  60399. - PyObject * obj0 = 0 ;
  60400. - PyObject * obj1 = 0 ;
  60401. - std::vector< vips::VImage > *result = 0 ;
  60402. -
  60403. - if (!PyArg_ParseTuple(args,(char *)"OO:new_ImageVector",&obj0,&obj1)) SWIG_fail;
  60404. - ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  60405. - if (!SWIG_IsOK(ecode1)) {
  60406. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'");
  60407. - }
  60408. - arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1);
  60409. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  60410. - if (!SWIG_IsOK(res2)) {
  60411. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60412. - }
  60413. - if (!argp2) {
  60414. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60415. - }
  60416. - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
  60417. - result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1,(std::vector< vips::VImage >::value_type const &)*arg2);
  60418. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 );
  60419. - return resultobj;
  60420. -fail:
  60421. - return NULL;
  60422. -}
  60423. -
  60424. -
  60425. -SWIGINTERN PyObject *_wrap_new_ImageVector(PyObject *self, PyObject *args) {
  60426. - int argc;
  60427. - PyObject *argv[3];
  60428. - int ii;
  60429. -
  60430. - if (!PyTuple_Check(args)) SWIG_fail;
  60431. - argc = args ? (int)PyObject_Length(args) : 0;
  60432. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  60433. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  60434. - }
  60435. - if (argc == 0) {
  60436. - return _wrap_new_ImageVector__SWIG_0(self, args);
  60437. - }
  60438. - if (argc == 1) {
  60439. - int _v;
  60440. - {
  60441. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  60442. - _v = SWIG_CheckState(res);
  60443. - }
  60444. - if (_v) {
  60445. - return _wrap_new_ImageVector__SWIG_2(self, args);
  60446. - }
  60447. - }
  60448. - if (argc == 1) {
  60449. - int _v;
  60450. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60451. - _v = SWIG_CheckState(res);
  60452. - if (_v) {
  60453. - return _wrap_new_ImageVector__SWIG_1(self, args);
  60454. - }
  60455. - }
  60456. - if (argc == 2) {
  60457. - int _v;
  60458. - {
  60459. - int res = SWIG_AsVal_size_t(argv[0], NULL);
  60460. - _v = SWIG_CheckState(res);
  60461. - }
  60462. - if (_v) {
  60463. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  60464. - _v = SWIG_CheckState(res);
  60465. - if (_v) {
  60466. - return _wrap_new_ImageVector__SWIG_3(self, args);
  60467. - }
  60468. - }
  60469. - }
  60470. -
  60471. -fail:
  60472. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ImageVector'.\n"
  60473. - " Possible C/C++ prototypes are:\n"
  60474. - " std::vector< vips::VImage >::vector()\n"
  60475. - " std::vector< vips::VImage >::vector(std::vector< vips::VImage > const &)\n"
  60476. - " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type)\n"
  60477. - " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
  60478. - return 0;
  60479. -}
  60480. -
  60481. -
  60482. -SWIGINTERN PyObject *_wrap_ImageVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60483. - PyObject *resultobj = 0;
  60484. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60485. - std::vector< vips::VImage >::value_type *arg2 = 0 ;
  60486. - void *argp1 = 0 ;
  60487. - int res1 = 0 ;
  60488. - void *argp2 = 0 ;
  60489. - int res2 = 0 ;
  60490. - PyObject * obj0 = 0 ;
  60491. - PyObject * obj1 = 0 ;
  60492. -
  60493. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_push_back",&obj0,&obj1)) SWIG_fail;
  60494. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60495. - if (!SWIG_IsOK(res1)) {
  60496. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_push_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60497. - }
  60498. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60499. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  60500. - if (!SWIG_IsOK(res2)) {
  60501. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60502. - }
  60503. - if (!argp2) {
  60504. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60505. - }
  60506. - arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2);
  60507. - (arg1)->push_back((std::vector< vips::VImage >::value_type const &)*arg2);
  60508. - resultobj = SWIG_Py_Void();
  60509. - return resultobj;
  60510. -fail:
  60511. - return NULL;
  60512. -}
  60513. -
  60514. -
  60515. -SWIGINTERN PyObject *_wrap_ImageVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60516. - PyObject *resultobj = 0;
  60517. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60518. - void *argp1 = 0 ;
  60519. - int res1 = 0 ;
  60520. - PyObject * obj0 = 0 ;
  60521. - std::vector< vips::VImage >::value_type *result = 0 ;
  60522. -
  60523. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_front",&obj0)) SWIG_fail;
  60524. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60525. - if (!SWIG_IsOK(res1)) {
  60526. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_front" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  60527. - }
  60528. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60529. - result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->front();
  60530. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
  60531. - return resultobj;
  60532. -fail:
  60533. - return NULL;
  60534. -}
  60535. -
  60536. -
  60537. -SWIGINTERN PyObject *_wrap_ImageVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60538. - PyObject *resultobj = 0;
  60539. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60540. - void *argp1 = 0 ;
  60541. - int res1 = 0 ;
  60542. - PyObject * obj0 = 0 ;
  60543. - std::vector< vips::VImage >::value_type *result = 0 ;
  60544. -
  60545. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_back",&obj0)) SWIG_fail;
  60546. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60547. - if (!SWIG_IsOK(res1)) {
  60548. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_back" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  60549. - }
  60550. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60551. - result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->back();
  60552. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
  60553. - return resultobj;
  60554. -fail:
  60555. - return NULL;
  60556. -}
  60557. -
  60558. -
  60559. -SWIGINTERN PyObject *_wrap_ImageVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60560. - PyObject *resultobj = 0;
  60561. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60562. - std::vector< vips::VImage >::size_type arg2 ;
  60563. - std::vector< vips::VImage >::value_type *arg3 = 0 ;
  60564. - void *argp1 = 0 ;
  60565. - int res1 = 0 ;
  60566. - size_t val2 ;
  60567. - int ecode2 = 0 ;
  60568. - void *argp3 = 0 ;
  60569. - int res3 = 0 ;
  60570. - PyObject * obj0 = 0 ;
  60571. - PyObject * obj1 = 0 ;
  60572. - PyObject * obj2 = 0 ;
  60573. -
  60574. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  60575. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60576. - if (!SWIG_IsOK(res1)) {
  60577. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_assign" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60578. - }
  60579. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60580. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  60581. - if (!SWIG_IsOK(ecode2)) {
  60582. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_assign" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
  60583. - }
  60584. - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
  60585. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  60586. - if (!SWIG_IsOK(res3)) {
  60587. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60588. - }
  60589. - if (!argp3) {
  60590. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60591. - }
  60592. - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
  60593. - (arg1)->assign(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
  60594. - resultobj = SWIG_Py_Void();
  60595. - return resultobj;
  60596. -fail:
  60597. - return NULL;
  60598. -}
  60599. -
  60600. -
  60601. -SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60602. - PyObject *resultobj = 0;
  60603. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60604. - std::vector< vips::VImage >::size_type arg2 ;
  60605. - std::vector< vips::VImage >::value_type *arg3 = 0 ;
  60606. - void *argp1 = 0 ;
  60607. - int res1 = 0 ;
  60608. - size_t val2 ;
  60609. - int ecode2 = 0 ;
  60610. - void *argp3 = 0 ;
  60611. - int res3 = 0 ;
  60612. - PyObject * obj0 = 0 ;
  60613. - PyObject * obj1 = 0 ;
  60614. - PyObject * obj2 = 0 ;
  60615. -
  60616. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  60617. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60618. - if (!SWIG_IsOK(res1)) {
  60619. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60620. - }
  60621. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60622. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  60623. - if (!SWIG_IsOK(ecode2)) {
  60624. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
  60625. - }
  60626. - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
  60627. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  60628. - if (!SWIG_IsOK(res3)) {
  60629. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60630. - }
  60631. - if (!argp3) {
  60632. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60633. - }
  60634. - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
  60635. - (arg1)->resize(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
  60636. - resultobj = SWIG_Py_Void();
  60637. - return resultobj;
  60638. -fail:
  60639. - return NULL;
  60640. -}
  60641. -
  60642. -
  60643. -SWIGINTERN PyObject *_wrap_ImageVector_resize(PyObject *self, PyObject *args) {
  60644. - int argc;
  60645. - PyObject *argv[4];
  60646. - int ii;
  60647. -
  60648. - if (!PyTuple_Check(args)) SWIG_fail;
  60649. - argc = args ? (int)PyObject_Length(args) : 0;
  60650. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  60651. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  60652. - }
  60653. - if (argc == 2) {
  60654. - int _v;
  60655. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60656. - _v = SWIG_CheckState(res);
  60657. - if (_v) {
  60658. - {
  60659. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  60660. - _v = SWIG_CheckState(res);
  60661. - }
  60662. - if (_v) {
  60663. - return _wrap_ImageVector_resize__SWIG_0(self, args);
  60664. - }
  60665. - }
  60666. - }
  60667. - if (argc == 3) {
  60668. - int _v;
  60669. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60670. - _v = SWIG_CheckState(res);
  60671. - if (_v) {
  60672. - {
  60673. - int res = SWIG_AsVal_size_t(argv[1], NULL);
  60674. - _v = SWIG_CheckState(res);
  60675. - }
  60676. - if (_v) {
  60677. - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
  60678. - _v = SWIG_CheckState(res);
  60679. - if (_v) {
  60680. - return _wrap_ImageVector_resize__SWIG_1(self, args);
  60681. - }
  60682. - }
  60683. - }
  60684. - }
  60685. -
  60686. -fail:
  60687. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_resize'.\n"
  60688. - " Possible C/C++ prototypes are:\n"
  60689. - " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type)\n"
  60690. - " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
  60691. - return 0;
  60692. -}
  60693. -
  60694. -
  60695. -SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60696. - PyObject *resultobj = 0;
  60697. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60698. - std::vector< vips::VImage >::iterator arg2 ;
  60699. - std::vector< vips::VImage >::value_type *arg3 = 0 ;
  60700. - void *argp1 = 0 ;
  60701. - int res1 = 0 ;
  60702. - swig::SwigPyIterator *iter2 = 0 ;
  60703. - int res2 ;
  60704. - void *argp3 = 0 ;
  60705. - int res3 = 0 ;
  60706. - PyObject * obj0 = 0 ;
  60707. - PyObject * obj1 = 0 ;
  60708. - PyObject * obj2 = 0 ;
  60709. - std::vector< vips::VImage >::iterator result;
  60710. -
  60711. - if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  60712. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60713. - if (!SWIG_IsOK(res1)) {
  60714. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60715. - }
  60716. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60717. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  60718. - if (!SWIG_IsOK(res2) || !iter2) {
  60719. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60720. - } else {
  60721. - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
  60722. - if (iter_t) {
  60723. - arg2 = iter_t->get_current();
  60724. - } else {
  60725. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60726. - }
  60727. - }
  60728. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  60729. - if (!SWIG_IsOK(res3)) {
  60730. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60731. - }
  60732. - if (!argp3) {
  60733. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60734. - }
  60735. - arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3);
  60736. - result = (arg1)->insert(arg2,(std::vector< vips::VImage >::value_type const &)*arg3);
  60737. - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)),
  60738. - swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  60739. - return resultobj;
  60740. -fail:
  60741. - return NULL;
  60742. -}
  60743. -
  60744. -
  60745. -SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60746. - PyObject *resultobj = 0;
  60747. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60748. - std::vector< vips::VImage >::iterator arg2 ;
  60749. - std::vector< vips::VImage >::size_type arg3 ;
  60750. - std::vector< vips::VImage >::value_type *arg4 = 0 ;
  60751. - void *argp1 = 0 ;
  60752. - int res1 = 0 ;
  60753. - swig::SwigPyIterator *iter2 = 0 ;
  60754. - int res2 ;
  60755. - size_t val3 ;
  60756. - int ecode3 = 0 ;
  60757. - void *argp4 = 0 ;
  60758. - int res4 = 0 ;
  60759. - PyObject * obj0 = 0 ;
  60760. - PyObject * obj1 = 0 ;
  60761. - PyObject * obj2 = 0 ;
  60762. - PyObject * obj3 = 0 ;
  60763. -
  60764. - if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  60765. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60766. - if (!SWIG_IsOK(res1)) {
  60767. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60768. - }
  60769. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60770. - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  60771. - if (!SWIG_IsOK(res2) || !iter2) {
  60772. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60773. - } else {
  60774. - swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter2);
  60775. - if (iter_t) {
  60776. - arg2 = iter_t->get_current();
  60777. - } else {
  60778. - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'");
  60779. - }
  60780. - }
  60781. - ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  60782. - if (!SWIG_IsOK(ecode3)) {
  60783. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::size_type""'");
  60784. - }
  60785. - arg3 = static_cast< std::vector< vips::VImage >::size_type >(val3);
  60786. - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
  60787. - if (!SWIG_IsOK(res4)) {
  60788. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60789. - }
  60790. - if (!argp4) {
  60791. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'");
  60792. - }
  60793. - arg4 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp4);
  60794. - (arg1)->insert(arg2,arg3,(std::vector< vips::VImage >::value_type const &)*arg4);
  60795. - resultobj = SWIG_Py_Void();
  60796. - return resultobj;
  60797. -fail:
  60798. - return NULL;
  60799. -}
  60800. -
  60801. -
  60802. -SWIGINTERN PyObject *_wrap_ImageVector_insert(PyObject *self, PyObject *args) {
  60803. - int argc;
  60804. - PyObject *argv[5];
  60805. - int ii;
  60806. -
  60807. - if (!PyTuple_Check(args)) SWIG_fail;
  60808. - argc = args ? (int)PyObject_Length(args) : 0;
  60809. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  60810. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  60811. - }
  60812. - if (argc == 3) {
  60813. - int _v;
  60814. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60815. - _v = SWIG_CheckState(res);
  60816. - if (_v) {
  60817. - swig::SwigPyIterator *iter = 0;
  60818. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  60819. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
  60820. - if (_v) {
  60821. - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
  60822. - _v = SWIG_CheckState(res);
  60823. - if (_v) {
  60824. - return _wrap_ImageVector_insert__SWIG_0(self, args);
  60825. - }
  60826. - }
  60827. - }
  60828. - }
  60829. - if (argc == 4) {
  60830. - int _v;
  60831. - int res = swig::asptr(argv[0], (std::vector<vips::VImage,std::allocator< vips::VImage > >**)(0));
  60832. - _v = SWIG_CheckState(res);
  60833. - if (_v) {
  60834. - swig::SwigPyIterator *iter = 0;
  60835. - int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
  60836. - _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< vips::VImage >::iterator > *>(iter) != 0));
  60837. - if (_v) {
  60838. - {
  60839. - int res = SWIG_AsVal_size_t(argv[2], NULL);
  60840. - _v = SWIG_CheckState(res);
  60841. - }
  60842. - if (_v) {
  60843. - int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_vips__VImage, 0);
  60844. - _v = SWIG_CheckState(res);
  60845. - if (_v) {
  60846. - return _wrap_ImageVector_insert__SWIG_1(self, args);
  60847. - }
  60848. - }
  60849. - }
  60850. - }
  60851. - }
  60852. -
  60853. -fail:
  60854. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_insert'.\n"
  60855. - " Possible C/C++ prototypes are:\n"
  60856. - " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::value_type const &)\n"
  60857. - " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n");
  60858. - return 0;
  60859. -}
  60860. -
  60861. -
  60862. -SWIGINTERN PyObject *_wrap_ImageVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60863. - PyObject *resultobj = 0;
  60864. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60865. - std::vector< vips::VImage >::size_type arg2 ;
  60866. - void *argp1 = 0 ;
  60867. - int res1 = 0 ;
  60868. - size_t val2 ;
  60869. - int ecode2 = 0 ;
  60870. - PyObject * obj0 = 0 ;
  60871. - PyObject * obj1 = 0 ;
  60872. -
  60873. - if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_reserve",&obj0,&obj1)) SWIG_fail;
  60874. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60875. - if (!SWIG_IsOK(res1)) {
  60876. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_reserve" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60877. - }
  60878. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60879. - ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  60880. - if (!SWIG_IsOK(ecode2)) {
  60881. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_reserve" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'");
  60882. - }
  60883. - arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2);
  60884. - (arg1)->reserve(arg2);
  60885. - resultobj = SWIG_Py_Void();
  60886. - return resultobj;
  60887. -fail:
  60888. - return NULL;
  60889. -}
  60890. -
  60891. -
  60892. -SWIGINTERN PyObject *_wrap_ImageVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60893. - PyObject *resultobj = 0;
  60894. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60895. - void *argp1 = 0 ;
  60896. - int res1 = 0 ;
  60897. - PyObject * obj0 = 0 ;
  60898. - std::vector< vips::VImage >::size_type result;
  60899. -
  60900. - if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_capacity",&obj0)) SWIG_fail;
  60901. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 );
  60902. - if (!SWIG_IsOK(res1)) {
  60903. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_capacity" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'");
  60904. - }
  60905. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60906. - result = ((std::vector< vips::VImage > const *)arg1)->capacity();
  60907. - resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  60908. - return resultobj;
  60909. -fail:
  60910. - return NULL;
  60911. -}
  60912. -
  60913. -
  60914. -SWIGINTERN PyObject *_wrap_delete_ImageVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60915. - PyObject *resultobj = 0;
  60916. - std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ;
  60917. - void *argp1 = 0 ;
  60918. - int res1 = 0 ;
  60919. - PyObject * obj0 = 0 ;
  60920. -
  60921. - if (!PyArg_ParseTuple(args,(char *)"O:delete_ImageVector",&obj0)) SWIG_fail;
  60922. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_DISOWN | 0 );
  60923. - if (!SWIG_IsOK(res1)) {
  60924. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'");
  60925. - }
  60926. - arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1);
  60927. - delete arg1;
  60928. - resultobj = SWIG_Py_Void();
  60929. - return resultobj;
  60930. -fail:
  60931. - return NULL;
  60932. -}
  60933. -
  60934. -
  60935. -SWIGINTERN PyObject *ImageVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60936. - PyObject *obj;
  60937. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  60938. - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_NewClientData(obj));
  60939. - return SWIG_Py_Void();
  60940. -}
  60941. -
  60942. -SWIGINTERN PyObject *_wrap_init__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60943. - PyObject *resultobj = 0;
  60944. - char *arg1 = (char *) 0 ;
  60945. - int res1 ;
  60946. - char *buf1 = 0 ;
  60947. - int alloc1 = 0 ;
  60948. - PyObject * obj0 = 0 ;
  60949. - bool result;
  60950. -
  60951. - if (!PyArg_ParseTuple(args,(char *)"O:init",&obj0)) SWIG_fail;
  60952. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  60953. - if (!SWIG_IsOK(res1)) {
  60954. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "init" "', argument " "1"" of type '" "char const *""'");
  60955. - }
  60956. - arg1 = reinterpret_cast< char * >(buf1);
  60957. - result = (bool)vips::init((char const *)arg1);
  60958. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  60959. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  60960. - return resultobj;
  60961. -fail:
  60962. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  60963. - return NULL;
  60964. -}
  60965. -
  60966. -
  60967. -SWIGINTERN PyObject *_wrap_init__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  60968. - PyObject *resultobj = 0;
  60969. - bool result;
  60970. -
  60971. - if (!PyArg_ParseTuple(args,(char *)":init")) SWIG_fail;
  60972. - result = (bool)vips::init();
  60973. - resultobj = SWIG_From_bool(static_cast< bool >(result));
  60974. - return resultobj;
  60975. -fail:
  60976. - return NULL;
  60977. -}
  60978. -
  60979. -
  60980. -SWIGINTERN PyObject *_wrap_init(PyObject *self, PyObject *args) {
  60981. - int argc;
  60982. - PyObject *argv[2];
  60983. - int ii;
  60984. -
  60985. - if (!PyTuple_Check(args)) SWIG_fail;
  60986. - argc = args ? (int)PyObject_Length(args) : 0;
  60987. - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
  60988. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  60989. - }
  60990. - if (argc == 0) {
  60991. - return _wrap_init__SWIG_1(self, args);
  60992. - }
  60993. - if (argc == 1) {
  60994. - int _v;
  60995. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  60996. - _v = SWIG_CheckState(res);
  60997. - if (_v) {
  60998. - return _wrap_init__SWIG_0(self, args);
  60999. - }
  61000. - }
  61001. -
  61002. -fail:
  61003. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'init'.\n"
  61004. - " Possible C/C++ prototypes are:\n"
  61005. - " vips::init(char const *)\n"
  61006. - " vips::init()\n");
  61007. - return 0;
  61008. -}
  61009. -
  61010. -
  61011. -SWIGINTERN PyObject *_wrap_shutdown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61012. - PyObject *resultobj = 0;
  61013. -
  61014. - if (!PyArg_ParseTuple(args,(char *)":shutdown")) SWIG_fail;
  61015. - vips::shutdown();
  61016. - resultobj = SWIG_Py_Void();
  61017. - return resultobj;
  61018. -fail:
  61019. - return NULL;
  61020. -}
  61021. -
  61022. -
  61023. -SWIGINTERN PyObject *_wrap_VImage_print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61024. - PyObject *resultobj = 0;
  61025. -
  61026. - if (!PyArg_ParseTuple(args,(char *)":VImage_print_all")) SWIG_fail;
  61027. - vips::VImage::print_all();
  61028. - resultobj = SWIG_Py_Void();
  61029. - return resultobj;
  61030. -fail:
  61031. - return NULL;
  61032. -}
  61033. -
  61034. -
  61035. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61036. - PyObject *resultobj = 0;
  61037. - char *arg1 = (char *) 0 ;
  61038. - char *arg2 = (char *) 0 ;
  61039. - int res1 ;
  61040. - char *buf1 = 0 ;
  61041. - int alloc1 = 0 ;
  61042. - int res2 ;
  61043. - char *buf2 = 0 ;
  61044. - int alloc2 = 0 ;
  61045. - PyObject * obj0 = 0 ;
  61046. - PyObject * obj1 = 0 ;
  61047. - vips::VImage *result = 0 ;
  61048. -
  61049. - if (!PyArg_ParseTuple(args,(char *)"OO:new_VImage",&obj0,&obj1)) SWIG_fail;
  61050. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  61051. - if (!SWIG_IsOK(res1)) {
  61052. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'");
  61053. - }
  61054. - arg1 = reinterpret_cast< char * >(buf1);
  61055. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  61056. - if (!SWIG_IsOK(res2)) {
  61057. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VImage" "', argument " "2"" of type '" "char const *""'");
  61058. - }
  61059. - arg2 = reinterpret_cast< char * >(buf2);
  61060. - try {
  61061. - result = (vips::VImage *)new vips::VImage((char const *)arg1,(char const *)arg2);
  61062. - }
  61063. - catch(vips::VError &_e) {
  61064. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61065. - }
  61066. -
  61067. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61068. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61069. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61070. - return resultobj;
  61071. -fail:
  61072. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61073. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61074. - return NULL;
  61075. -}
  61076. -
  61077. -
  61078. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61079. - PyObject *resultobj = 0;
  61080. - char *arg1 = (char *) 0 ;
  61081. - int res1 ;
  61082. - char *buf1 = 0 ;
  61083. - int alloc1 = 0 ;
  61084. - PyObject * obj0 = 0 ;
  61085. - vips::VImage *result = 0 ;
  61086. -
  61087. - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
  61088. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  61089. - if (!SWIG_IsOK(res1)) {
  61090. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'");
  61091. - }
  61092. - arg1 = reinterpret_cast< char * >(buf1);
  61093. - try {
  61094. - result = (vips::VImage *)new vips::VImage((char const *)arg1);
  61095. - }
  61096. - catch(vips::VError &_e) {
  61097. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61098. - }
  61099. -
  61100. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61101. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61102. - return resultobj;
  61103. -fail:
  61104. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61105. - return NULL;
  61106. -}
  61107. -
  61108. -
  61109. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61110. - PyObject *resultobj = 0;
  61111. - void *arg1 = (void *) 0 ;
  61112. - int arg2 ;
  61113. - int arg3 ;
  61114. - int arg4 ;
  61115. - vips::VImage::TBandFmt arg5 ;
  61116. - int res1 ;
  61117. - int val2 ;
  61118. - int ecode2 = 0 ;
  61119. - int val3 ;
  61120. - int ecode3 = 0 ;
  61121. - int val4 ;
  61122. - int ecode4 = 0 ;
  61123. - int val5 ;
  61124. - int ecode5 = 0 ;
  61125. - PyObject * obj0 = 0 ;
  61126. - PyObject * obj1 = 0 ;
  61127. - PyObject * obj2 = 0 ;
  61128. - PyObject * obj3 = 0 ;
  61129. - PyObject * obj4 = 0 ;
  61130. - vips::VImage *result = 0 ;
  61131. -
  61132. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VImage",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  61133. - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  61134. - if (!SWIG_IsOK(res1)) {
  61135. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "void *""'");
  61136. - }
  61137. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  61138. - if (!SWIG_IsOK(ecode2)) {
  61139. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VImage" "', argument " "2"" of type '" "int""'");
  61140. - }
  61141. - arg2 = static_cast< int >(val2);
  61142. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  61143. - if (!SWIG_IsOK(ecode3)) {
  61144. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VImage" "', argument " "3"" of type '" "int""'");
  61145. - }
  61146. - arg3 = static_cast< int >(val3);
  61147. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  61148. - if (!SWIG_IsOK(ecode4)) {
  61149. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VImage" "', argument " "4"" of type '" "int""'");
  61150. - }
  61151. - arg4 = static_cast< int >(val4);
  61152. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  61153. - if (!SWIG_IsOK(ecode5)) {
  61154. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VImage" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  61155. - }
  61156. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  61157. - try {
  61158. - result = (vips::VImage *)new vips::VImage(arg1,arg2,arg3,arg4,arg5);
  61159. - }
  61160. - catch(vips::VError &_e) {
  61161. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61162. - }
  61163. -
  61164. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61165. - return resultobj;
  61166. -fail:
  61167. - return NULL;
  61168. -}
  61169. -
  61170. -
  61171. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61172. - PyObject *resultobj = 0;
  61173. - _VipsImage *arg1 = (_VipsImage *) 0 ;
  61174. - void *argp1 = 0 ;
  61175. - int res1 = 0 ;
  61176. - PyObject * obj0 = 0 ;
  61177. - vips::VImage *result = 0 ;
  61178. -
  61179. - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
  61180. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__VipsImage, 0 | 0 );
  61181. - if (!SWIG_IsOK(res1)) {
  61182. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "_VipsImage *""'");
  61183. - }
  61184. - arg1 = reinterpret_cast< _VipsImage * >(argp1);
  61185. - result = (vips::VImage *)new vips::VImage(arg1);
  61186. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61187. - return resultobj;
  61188. -fail:
  61189. - return NULL;
  61190. -}
  61191. -
  61192. -
  61193. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61194. - PyObject *resultobj = 0;
  61195. - vips::VImage *result = 0 ;
  61196. -
  61197. - if (!PyArg_ParseTuple(args,(char *)":new_VImage")) SWIG_fail;
  61198. - try {
  61199. - result = (vips::VImage *)new vips::VImage();
  61200. - }
  61201. - catch(vips::VError &_e) {
  61202. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61203. - }
  61204. -
  61205. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61206. - return resultobj;
  61207. -fail:
  61208. - return NULL;
  61209. -}
  61210. -
  61211. -
  61212. -SWIGINTERN PyObject *_wrap_VImage_convert2disc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61213. - PyObject *resultobj = 0;
  61214. - char *arg1 = (char *) 0 ;
  61215. - char *arg2 = (char *) 0 ;
  61216. - char *arg3 = (char *) 0 ;
  61217. - int res1 ;
  61218. - char *buf1 = 0 ;
  61219. - int alloc1 = 0 ;
  61220. - int res2 ;
  61221. - char *buf2 = 0 ;
  61222. - int alloc2 = 0 ;
  61223. - int res3 ;
  61224. - char *buf3 = 0 ;
  61225. - int alloc3 = 0 ;
  61226. - PyObject * obj0 = 0 ;
  61227. - PyObject * obj1 = 0 ;
  61228. - PyObject * obj2 = 0 ;
  61229. - vips::VImage result;
  61230. -
  61231. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_convert2disc",&obj0,&obj1,&obj2)) SWIG_fail;
  61232. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  61233. - if (!SWIG_IsOK(res1)) {
  61234. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convert2disc" "', argument " "1"" of type '" "char const *""'");
  61235. - }
  61236. - arg1 = reinterpret_cast< char * >(buf1);
  61237. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  61238. - if (!SWIG_IsOK(res2)) {
  61239. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convert2disc" "', argument " "2"" of type '" "char const *""'");
  61240. - }
  61241. - arg2 = reinterpret_cast< char * >(buf2);
  61242. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  61243. - if (!SWIG_IsOK(res3)) {
  61244. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_convert2disc" "', argument " "3"" of type '" "char const *""'");
  61245. - }
  61246. - arg3 = reinterpret_cast< char * >(buf3);
  61247. - try {
  61248. - result = vips::VImage::convert2disc((char const *)arg1,(char const *)arg2,(char const *)arg3);
  61249. - }
  61250. - catch(vips::VError &_e) {
  61251. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61252. - }
  61253. -
  61254. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  61255. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61256. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61257. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  61258. - return resultobj;
  61259. -fail:
  61260. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  61261. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61262. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  61263. - return NULL;
  61264. -}
  61265. -
  61266. -
  61267. -SWIGINTERN PyObject *_wrap_new_VImage__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61268. - PyObject *resultobj = 0;
  61269. - vips::VImage *arg1 = 0 ;
  61270. - void *argp1 = 0 ;
  61271. - int res1 = 0 ;
  61272. - PyObject * obj0 = 0 ;
  61273. - vips::VImage *result = 0 ;
  61274. -
  61275. - if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail;
  61276. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VImage, 0 | 0);
  61277. - if (!SWIG_IsOK(res1)) {
  61278. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'");
  61279. - }
  61280. - if (!argp1) {
  61281. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'");
  61282. - }
  61283. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61284. - result = (vips::VImage *)new vips::VImage((vips::VImage const &)*arg1);
  61285. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 );
  61286. - return resultobj;
  61287. -fail:
  61288. - return NULL;
  61289. -}
  61290. -
  61291. -
  61292. -SWIGINTERN PyObject *_wrap_new_VImage(PyObject *self, PyObject *args) {
  61293. - int argc;
  61294. - PyObject *argv[6];
  61295. - int ii;
  61296. -
  61297. - if (!PyTuple_Check(args)) SWIG_fail;
  61298. - argc = args ? (int)PyObject_Length(args) : 0;
  61299. - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
  61300. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  61301. - }
  61302. - if (argc == 0) {
  61303. - return _wrap_new_VImage__SWIG_4(self, args);
  61304. - }
  61305. - if (argc == 1) {
  61306. - int _v;
  61307. - void *vptr = 0;
  61308. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p__VipsImage, 0);
  61309. - _v = SWIG_CheckState(res);
  61310. - if (_v) {
  61311. - return _wrap_new_VImage__SWIG_3(self, args);
  61312. - }
  61313. - }
  61314. - if (argc == 1) {
  61315. - int _v;
  61316. - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VImage, 0);
  61317. - _v = SWIG_CheckState(res);
  61318. - if (_v) {
  61319. - return _wrap_new_VImage__SWIG_5(self, args);
  61320. - }
  61321. - }
  61322. - if (argc == 1) {
  61323. - int _v;
  61324. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  61325. - _v = SWIG_CheckState(res);
  61326. - if (_v) {
  61327. - return _wrap_new_VImage__SWIG_1(self, args);
  61328. - }
  61329. - }
  61330. - if (argc == 2) {
  61331. - int _v;
  61332. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  61333. - _v = SWIG_CheckState(res);
  61334. - if (_v) {
  61335. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  61336. - _v = SWIG_CheckState(res);
  61337. - if (_v) {
  61338. - return _wrap_new_VImage__SWIG_0(self, args);
  61339. - }
  61340. - }
  61341. - }
  61342. - if (argc == 5) {
  61343. - int _v;
  61344. - void *ptr = 0;
  61345. - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
  61346. - _v = SWIG_CheckState(res);
  61347. - if (_v) {
  61348. - {
  61349. - int res = SWIG_AsVal_int(argv[1], NULL);
  61350. - _v = SWIG_CheckState(res);
  61351. - }
  61352. - if (_v) {
  61353. - {
  61354. - int res = SWIG_AsVal_int(argv[2], NULL);
  61355. - _v = SWIG_CheckState(res);
  61356. - }
  61357. - if (_v) {
  61358. - {
  61359. - int res = SWIG_AsVal_int(argv[3], NULL);
  61360. - _v = SWIG_CheckState(res);
  61361. - }
  61362. - if (_v) {
  61363. - {
  61364. - int res = SWIG_AsVal_int(argv[4], NULL);
  61365. - _v = SWIG_CheckState(res);
  61366. - }
  61367. - if (_v) {
  61368. - return _wrap_new_VImage__SWIG_2(self, args);
  61369. - }
  61370. - }
  61371. - }
  61372. - }
  61373. - }
  61374. - }
  61375. -
  61376. -fail:
  61377. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VImage'.\n"
  61378. - " Possible C/C++ prototypes are:\n"
  61379. - " vips::VImage::VImage(char const *,char const *)\n"
  61380. - " vips::VImage::VImage(char const *)\n"
  61381. - " vips::VImage::VImage(void *,int,int,int,vips::VImage::TBandFmt)\n"
  61382. - " vips::VImage::VImage(_VipsImage *)\n"
  61383. - " vips::VImage::VImage()\n"
  61384. - " vips::VImage::VImage(vips::VImage const &)\n");
  61385. - return 0;
  61386. -}
  61387. -
  61388. -
  61389. -SWIGINTERN PyObject *_wrap_VImage___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61390. - PyObject *resultobj = 0;
  61391. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61392. - vips::VImage *arg2 = 0 ;
  61393. - void *argp1 = 0 ;
  61394. - int res1 = 0 ;
  61395. - void *argp2 = 0 ;
  61396. - int res2 = 0 ;
  61397. - PyObject * obj0 = 0 ;
  61398. - PyObject * obj1 = 0 ;
  61399. - vips::VImage *result = 0 ;
  61400. -
  61401. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage___assign__",&obj0,&obj1)) SWIG_fail;
  61402. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61403. - if (!SWIG_IsOK(res1)) {
  61404. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage___assign__" "', argument " "1"" of type '" "vips::VImage *""'");
  61405. - }
  61406. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61407. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  61408. - if (!SWIG_IsOK(res2)) {
  61409. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'");
  61410. - }
  61411. - if (!argp2) {
  61412. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'");
  61413. - }
  61414. - arg2 = reinterpret_cast< vips::VImage * >(argp2);
  61415. - try {
  61416. - result = (vips::VImage *) &(arg1)->operator =((vips::VImage const &)*arg2);
  61417. - }
  61418. - catch(vips::VError &_e) {
  61419. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61420. - }
  61421. -
  61422. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 );
  61423. - return resultobj;
  61424. -fail:
  61425. - return NULL;
  61426. -}
  61427. -
  61428. -
  61429. -SWIGINTERN PyObject *_wrap_delete_VImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61430. - PyObject *resultobj = 0;
  61431. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61432. - void *argp1 = 0 ;
  61433. - int res1 = 0 ;
  61434. - PyObject * obj0 = 0 ;
  61435. -
  61436. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VImage",&obj0)) SWIG_fail;
  61437. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, SWIG_POINTER_DISOWN | 0 );
  61438. - if (!SWIG_IsOK(res1)) {
  61439. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VImage" "', argument " "1"" of type '" "vips::VImage *""'");
  61440. - }
  61441. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61442. - delete arg1;
  61443. - resultobj = SWIG_Py_Void();
  61444. - return resultobj;
  61445. -fail:
  61446. - return NULL;
  61447. -}
  61448. -
  61449. -
  61450. -SWIGINTERN PyObject *_wrap_VImage_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61451. - PyObject *resultobj = 0;
  61452. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61453. - void *argp1 = 0 ;
  61454. - int res1 = 0 ;
  61455. - PyObject * obj0 = 0 ;
  61456. - _VipsImage *result = 0 ;
  61457. -
  61458. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_image",&obj0)) SWIG_fail;
  61459. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61460. - if (!SWIG_IsOK(res1)) {
  61461. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_image" "', argument " "1"" of type '" "vips::VImage const *""'");
  61462. - }
  61463. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61464. - result = (_VipsImage *)((vips::VImage const *)arg1)->image();
  61465. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__VipsImage, 0 | 0 );
  61466. - return resultobj;
  61467. -fail:
  61468. - return NULL;
  61469. -}
  61470. -
  61471. -
  61472. -SWIGINTERN PyObject *_wrap_VImage_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61473. - PyObject *resultobj = 0;
  61474. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61475. - void *argp1 = 0 ;
  61476. - int res1 = 0 ;
  61477. - PyObject * obj0 = 0 ;
  61478. - void *result = 0 ;
  61479. -
  61480. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_data",&obj0)) SWIG_fail;
  61481. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61482. - if (!SWIG_IsOK(res1)) {
  61483. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_data" "', argument " "1"" of type '" "vips::VImage const *""'");
  61484. - }
  61485. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61486. - try {
  61487. - result = (void *)((vips::VImage const *)arg1)->data();
  61488. - }
  61489. - catch(vips::VError &_e) {
  61490. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61491. - }
  61492. -
  61493. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
  61494. - return resultobj;
  61495. -fail:
  61496. - return NULL;
  61497. -}
  61498. -
  61499. -
  61500. -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61501. - PyObject *resultobj = 0;
  61502. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61503. - vips::VImage arg2 ;
  61504. - void *argp1 = 0 ;
  61505. - int res1 = 0 ;
  61506. - void *argp2 ;
  61507. - int res2 = 0 ;
  61508. - PyObject * obj0 = 0 ;
  61509. - PyObject * obj1 = 0 ;
  61510. - vips::VImage result;
  61511. -
  61512. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail;
  61513. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61514. - if (!SWIG_IsOK(res1)) {
  61515. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
  61516. - }
  61517. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61518. - {
  61519. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  61520. - if (!SWIG_IsOK(res2)) {
  61521. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'");
  61522. - }
  61523. - if (!argp2) {
  61524. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'");
  61525. - } else {
  61526. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  61527. - arg2 = *temp;
  61528. - if (SWIG_IsNewObj(res2)) delete temp;
  61529. - }
  61530. - }
  61531. - try {
  61532. - result = (arg1)->write(arg2);
  61533. - }
  61534. - catch(vips::VError &_e) {
  61535. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61536. - }
  61537. -
  61538. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  61539. - return resultobj;
  61540. -fail:
  61541. - return NULL;
  61542. -}
  61543. -
  61544. -
  61545. -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61546. - PyObject *resultobj = 0;
  61547. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61548. - char *arg2 = (char *) 0 ;
  61549. - void *argp1 = 0 ;
  61550. - int res1 = 0 ;
  61551. - int res2 ;
  61552. - char *buf2 = 0 ;
  61553. - int alloc2 = 0 ;
  61554. - PyObject * obj0 = 0 ;
  61555. - PyObject * obj1 = 0 ;
  61556. - vips::VImage result;
  61557. -
  61558. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail;
  61559. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61560. - if (!SWIG_IsOK(res1)) {
  61561. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
  61562. - }
  61563. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61564. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  61565. - if (!SWIG_IsOK(res2)) {
  61566. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "char const *""'");
  61567. - }
  61568. - arg2 = reinterpret_cast< char * >(buf2);
  61569. - try {
  61570. - result = (arg1)->write((char const *)arg2);
  61571. - }
  61572. - catch(vips::VError &_e) {
  61573. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61574. - }
  61575. -
  61576. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  61577. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61578. - return resultobj;
  61579. -fail:
  61580. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  61581. - return NULL;
  61582. -}
  61583. -
  61584. -
  61585. -SWIGINTERN PyObject *_wrap_VImage_write__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61586. - PyObject *resultobj = 0;
  61587. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61588. - void *argp1 = 0 ;
  61589. - int res1 = 0 ;
  61590. - PyObject * obj0 = 0 ;
  61591. - vips::VImage result;
  61592. -
  61593. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_write",&obj0)) SWIG_fail;
  61594. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61595. - if (!SWIG_IsOK(res1)) {
  61596. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'");
  61597. - }
  61598. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61599. - try {
  61600. - result = (arg1)->write();
  61601. - }
  61602. - catch(vips::VError &_e) {
  61603. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  61604. - }
  61605. -
  61606. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  61607. - return resultobj;
  61608. -fail:
  61609. - return NULL;
  61610. -}
  61611. -
  61612. -
  61613. -SWIGINTERN PyObject *_wrap_VImage_write(PyObject *self, PyObject *args) {
  61614. - int argc;
  61615. - PyObject *argv[3];
  61616. - int ii;
  61617. -
  61618. - if (!PyTuple_Check(args)) SWIG_fail;
  61619. - argc = args ? (int)PyObject_Length(args) : 0;
  61620. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  61621. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  61622. - }
  61623. - if (argc == 1) {
  61624. - int _v;
  61625. - void *vptr = 0;
  61626. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  61627. - _v = SWIG_CheckState(res);
  61628. - if (_v) {
  61629. - return _wrap_VImage_write__SWIG_2(self, args);
  61630. - }
  61631. - }
  61632. - if (argc == 2) {
  61633. - int _v;
  61634. - void *vptr = 0;
  61635. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  61636. - _v = SWIG_CheckState(res);
  61637. - if (_v) {
  61638. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  61639. - _v = SWIG_CheckState(res);
  61640. - if (_v) {
  61641. - return _wrap_VImage_write__SWIG_0(self, args);
  61642. - }
  61643. - }
  61644. - }
  61645. - if (argc == 2) {
  61646. - int _v;
  61647. - void *vptr = 0;
  61648. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  61649. - _v = SWIG_CheckState(res);
  61650. - if (_v) {
  61651. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  61652. - _v = SWIG_CheckState(res);
  61653. - if (_v) {
  61654. - return _wrap_VImage_write__SWIG_1(self, args);
  61655. - }
  61656. - }
  61657. - }
  61658. -
  61659. -fail:
  61660. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_write'.\n"
  61661. - " Possible C/C++ prototypes are:\n"
  61662. - " vips::VImage::write(vips::VImage)\n"
  61663. - " vips::VImage::write(char const *)\n"
  61664. - " vips::VImage::write()\n");
  61665. - return 0;
  61666. -}
  61667. -
  61668. -
  61669. -SWIGINTERN PyObject *_wrap_VImage_debug_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61670. - PyObject *resultobj = 0;
  61671. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61672. - void *argp1 = 0 ;
  61673. - int res1 = 0 ;
  61674. - PyObject * obj0 = 0 ;
  61675. -
  61676. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_debug_print",&obj0)) SWIG_fail;
  61677. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61678. - if (!SWIG_IsOK(res1)) {
  61679. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_debug_print" "', argument " "1"" of type '" "vips::VImage *""'");
  61680. - }
  61681. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61682. - (arg1)->debug_print();
  61683. - resultobj = SWIG_Py_Void();
  61684. - return resultobj;
  61685. -fail:
  61686. - return NULL;
  61687. -}
  61688. -
  61689. -
  61690. -SWIGINTERN PyObject *_wrap_VImage_Xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61691. - PyObject *resultobj = 0;
  61692. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61693. - void *argp1 = 0 ;
  61694. - int res1 = 0 ;
  61695. - PyObject * obj0 = 0 ;
  61696. - int result;
  61697. -
  61698. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xsize",&obj0)) SWIG_fail;
  61699. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61700. - if (!SWIG_IsOK(res1)) {
  61701. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xsize" "', argument " "1"" of type '" "vips::VImage *""'");
  61702. - }
  61703. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61704. - result = (int)(arg1)->Xsize();
  61705. - resultobj = SWIG_From_int(static_cast< int >(result));
  61706. - return resultobj;
  61707. -fail:
  61708. - return NULL;
  61709. -}
  61710. -
  61711. -
  61712. -SWIGINTERN PyObject *_wrap_VImage_Ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61713. - PyObject *resultobj = 0;
  61714. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61715. - void *argp1 = 0 ;
  61716. - int res1 = 0 ;
  61717. - PyObject * obj0 = 0 ;
  61718. - int result;
  61719. -
  61720. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Ysize",&obj0)) SWIG_fail;
  61721. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61722. - if (!SWIG_IsOK(res1)) {
  61723. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Ysize" "', argument " "1"" of type '" "vips::VImage *""'");
  61724. - }
  61725. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61726. - result = (int)(arg1)->Ysize();
  61727. - resultobj = SWIG_From_int(static_cast< int >(result));
  61728. - return resultobj;
  61729. -fail:
  61730. - return NULL;
  61731. -}
  61732. -
  61733. -
  61734. -SWIGINTERN PyObject *_wrap_VImage_Bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61735. - PyObject *resultobj = 0;
  61736. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61737. - void *argp1 = 0 ;
  61738. - int res1 = 0 ;
  61739. - PyObject * obj0 = 0 ;
  61740. - int result;
  61741. -
  61742. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Bands",&obj0)) SWIG_fail;
  61743. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61744. - if (!SWIG_IsOK(res1)) {
  61745. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Bands" "', argument " "1"" of type '" "vips::VImage *""'");
  61746. - }
  61747. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61748. - result = (int)(arg1)->Bands();
  61749. - resultobj = SWIG_From_int(static_cast< int >(result));
  61750. - return resultobj;
  61751. -fail:
  61752. - return NULL;
  61753. -}
  61754. -
  61755. -
  61756. -SWIGINTERN PyObject *_wrap_VImage_BandFmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61757. - PyObject *resultobj = 0;
  61758. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61759. - void *argp1 = 0 ;
  61760. - int res1 = 0 ;
  61761. - PyObject * obj0 = 0 ;
  61762. - vips::VImage::TBandFmt result;
  61763. -
  61764. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_BandFmt",&obj0)) SWIG_fail;
  61765. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61766. - if (!SWIG_IsOK(res1)) {
  61767. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_BandFmt" "', argument " "1"" of type '" "vips::VImage *""'");
  61768. - }
  61769. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61770. - result = (vips::VImage::TBandFmt)(arg1)->BandFmt();
  61771. - resultobj = SWIG_From_int(static_cast< int >(result));
  61772. - return resultobj;
  61773. -fail:
  61774. - return NULL;
  61775. -}
  61776. -
  61777. -
  61778. -SWIGINTERN PyObject *_wrap_VImage_Coding(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61779. - PyObject *resultobj = 0;
  61780. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61781. - void *argp1 = 0 ;
  61782. - int res1 = 0 ;
  61783. - PyObject * obj0 = 0 ;
  61784. - vips::VImage::TCoding result;
  61785. -
  61786. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Coding",&obj0)) SWIG_fail;
  61787. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61788. - if (!SWIG_IsOK(res1)) {
  61789. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Coding" "', argument " "1"" of type '" "vips::VImage *""'");
  61790. - }
  61791. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61792. - result = (vips::VImage::TCoding)(arg1)->Coding();
  61793. - resultobj = SWIG_From_int(static_cast< int >(result));
  61794. - return resultobj;
  61795. -fail:
  61796. - return NULL;
  61797. -}
  61798. -
  61799. -
  61800. -SWIGINTERN PyObject *_wrap_VImage_Type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61801. - PyObject *resultobj = 0;
  61802. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61803. - void *argp1 = 0 ;
  61804. - int res1 = 0 ;
  61805. - PyObject * obj0 = 0 ;
  61806. - vips::VImage::TType result;
  61807. -
  61808. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Type",&obj0)) SWIG_fail;
  61809. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61810. - if (!SWIG_IsOK(res1)) {
  61811. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Type" "', argument " "1"" of type '" "vips::VImage *""'");
  61812. - }
  61813. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61814. - result = (vips::VImage::TType)(arg1)->Type();
  61815. - resultobj = SWIG_From_int(static_cast< int >(result));
  61816. - return resultobj;
  61817. -fail:
  61818. - return NULL;
  61819. -}
  61820. -
  61821. -
  61822. -SWIGINTERN PyObject *_wrap_VImage_Xres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61823. - PyObject *resultobj = 0;
  61824. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61825. - void *argp1 = 0 ;
  61826. - int res1 = 0 ;
  61827. - PyObject * obj0 = 0 ;
  61828. - float result;
  61829. -
  61830. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xres",&obj0)) SWIG_fail;
  61831. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61832. - if (!SWIG_IsOK(res1)) {
  61833. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xres" "', argument " "1"" of type '" "vips::VImage *""'");
  61834. - }
  61835. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61836. - result = (float)(arg1)->Xres();
  61837. - resultobj = SWIG_From_float(static_cast< float >(result));
  61838. - return resultobj;
  61839. -fail:
  61840. - return NULL;
  61841. -}
  61842. -
  61843. -
  61844. -SWIGINTERN PyObject *_wrap_VImage_Yres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61845. - PyObject *resultobj = 0;
  61846. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61847. - void *argp1 = 0 ;
  61848. - int res1 = 0 ;
  61849. - PyObject * obj0 = 0 ;
  61850. - float result;
  61851. -
  61852. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yres",&obj0)) SWIG_fail;
  61853. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61854. - if (!SWIG_IsOK(res1)) {
  61855. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yres" "', argument " "1"" of type '" "vips::VImage *""'");
  61856. - }
  61857. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61858. - result = (float)(arg1)->Yres();
  61859. - resultobj = SWIG_From_float(static_cast< float >(result));
  61860. - return resultobj;
  61861. -fail:
  61862. - return NULL;
  61863. -}
  61864. -
  61865. -
  61866. -SWIGINTERN PyObject *_wrap_VImage_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61867. - PyObject *resultobj = 0;
  61868. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61869. - void *argp1 = 0 ;
  61870. - int res1 = 0 ;
  61871. - PyObject * obj0 = 0 ;
  61872. - int result;
  61873. -
  61874. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Length",&obj0)) SWIG_fail;
  61875. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61876. - if (!SWIG_IsOK(res1)) {
  61877. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Length" "', argument " "1"" of type '" "vips::VImage *""'");
  61878. - }
  61879. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61880. - result = (int)(arg1)->Length();
  61881. - resultobj = SWIG_From_int(static_cast< int >(result));
  61882. - return resultobj;
  61883. -fail:
  61884. - return NULL;
  61885. -}
  61886. -
  61887. -
  61888. -SWIGINTERN PyObject *_wrap_VImage_Compression(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61889. - PyObject *resultobj = 0;
  61890. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61891. - void *argp1 = 0 ;
  61892. - int res1 = 0 ;
  61893. - PyObject * obj0 = 0 ;
  61894. - vips::VImage::TCompression result;
  61895. -
  61896. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Compression",&obj0)) SWIG_fail;
  61897. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61898. - if (!SWIG_IsOK(res1)) {
  61899. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Compression" "', argument " "1"" of type '" "vips::VImage *""'");
  61900. - }
  61901. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61902. - result = (vips::VImage::TCompression)(arg1)->Compression();
  61903. - resultobj = SWIG_From_int(static_cast< int >(result));
  61904. - return resultobj;
  61905. -fail:
  61906. - return NULL;
  61907. -}
  61908. -
  61909. -
  61910. -SWIGINTERN PyObject *_wrap_VImage_Level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61911. - PyObject *resultobj = 0;
  61912. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61913. - void *argp1 = 0 ;
  61914. - int res1 = 0 ;
  61915. - PyObject * obj0 = 0 ;
  61916. - short result;
  61917. -
  61918. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Level",&obj0)) SWIG_fail;
  61919. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61920. - if (!SWIG_IsOK(res1)) {
  61921. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Level" "', argument " "1"" of type '" "vips::VImage *""'");
  61922. - }
  61923. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61924. - result = (short)(arg1)->Level();
  61925. - resultobj = SWIG_From_short(static_cast< short >(result));
  61926. - return resultobj;
  61927. -fail:
  61928. - return NULL;
  61929. -}
  61930. -
  61931. -
  61932. -SWIGINTERN PyObject *_wrap_VImage_Xoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61933. - PyObject *resultobj = 0;
  61934. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61935. - void *argp1 = 0 ;
  61936. - int res1 = 0 ;
  61937. - PyObject * obj0 = 0 ;
  61938. - int result;
  61939. -
  61940. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xoffset",&obj0)) SWIG_fail;
  61941. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61942. - if (!SWIG_IsOK(res1)) {
  61943. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xoffset" "', argument " "1"" of type '" "vips::VImage *""'");
  61944. - }
  61945. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61946. - result = (int)(arg1)->Xoffset();
  61947. - resultobj = SWIG_From_int(static_cast< int >(result));
  61948. - return resultobj;
  61949. -fail:
  61950. - return NULL;
  61951. -}
  61952. -
  61953. -
  61954. -SWIGINTERN PyObject *_wrap_VImage_Yoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61955. - PyObject *resultobj = 0;
  61956. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61957. - void *argp1 = 0 ;
  61958. - int res1 = 0 ;
  61959. - PyObject * obj0 = 0 ;
  61960. - int result;
  61961. -
  61962. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yoffset",&obj0)) SWIG_fail;
  61963. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61964. - if (!SWIG_IsOK(res1)) {
  61965. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yoffset" "', argument " "1"" of type '" "vips::VImage *""'");
  61966. - }
  61967. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61968. - result = (int)(arg1)->Yoffset();
  61969. - resultobj = SWIG_From_int(static_cast< int >(result));
  61970. - return resultobj;
  61971. -fail:
  61972. - return NULL;
  61973. -}
  61974. -
  61975. -
  61976. -SWIGINTERN PyObject *_wrap_VImage_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61977. - PyObject *resultobj = 0;
  61978. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  61979. - void *argp1 = 0 ;
  61980. - int res1 = 0 ;
  61981. - PyObject * obj0 = 0 ;
  61982. - char *result = 0 ;
  61983. -
  61984. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_filename",&obj0)) SWIG_fail;
  61985. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  61986. - if (!SWIG_IsOK(res1)) {
  61987. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_filename" "', argument " "1"" of type '" "vips::VImage *""'");
  61988. - }
  61989. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  61990. - result = (char *)(arg1)->filename();
  61991. - resultobj = SWIG_FromCharPtr((const char *)result);
  61992. - return resultobj;
  61993. -fail:
  61994. - return NULL;
  61995. -}
  61996. -
  61997. -
  61998. -SWIGINTERN PyObject *_wrap_VImage_Hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  61999. - PyObject *resultobj = 0;
  62000. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62001. - void *argp1 = 0 ;
  62002. - int res1 = 0 ;
  62003. - PyObject * obj0 = 0 ;
  62004. - char *result = 0 ;
  62005. -
  62006. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Hist",&obj0)) SWIG_fail;
  62007. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62008. - if (!SWIG_IsOK(res1)) {
  62009. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Hist" "', argument " "1"" of type '" "vips::VImage *""'");
  62010. - }
  62011. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62012. - result = (char *)(arg1)->Hist();
  62013. - resultobj = SWIG_FromCharPtr((const char *)result);
  62014. - return resultobj;
  62015. -fail:
  62016. - return NULL;
  62017. -}
  62018. -
  62019. -
  62020. -SWIGINTERN PyObject *_wrap_VImage_meta_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62021. - PyObject *resultobj = 0;
  62022. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62023. - char *arg2 = (char *) 0 ;
  62024. - void *argp1 = 0 ;
  62025. - int res1 = 0 ;
  62026. - int res2 ;
  62027. - char *buf2 = 0 ;
  62028. - int alloc2 = 0 ;
  62029. - PyObject * obj0 = 0 ;
  62030. - PyObject * obj1 = 0 ;
  62031. - gboolean result;
  62032. -
  62033. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_remove",&obj0,&obj1)) SWIG_fail;
  62034. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62035. - if (!SWIG_IsOK(res1)) {
  62036. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_remove" "', argument " "1"" of type '" "vips::VImage *""'");
  62037. - }
  62038. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62039. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62040. - if (!SWIG_IsOK(res2)) {
  62041. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_remove" "', argument " "2"" of type '" "char const *""'");
  62042. - }
  62043. - arg2 = reinterpret_cast< char * >(buf2);
  62044. - result = (arg1)->meta_remove((char const *)arg2);
  62045. - resultobj = SWIG_NewPointerObj((new gboolean(static_cast< const gboolean& >(result))), SWIGTYPE_p_gboolean, SWIG_POINTER_OWN | 0 );
  62046. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62047. - return resultobj;
  62048. -fail:
  62049. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62050. - return NULL;
  62051. -}
  62052. -
  62053. -
  62054. -SWIGINTERN PyObject *_wrap_VImage_meta_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62055. - PyObject *resultobj = 0;
  62056. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62057. - char *arg2 = (char *) 0 ;
  62058. - void *argp1 = 0 ;
  62059. - int res1 = 0 ;
  62060. - int res2 ;
  62061. - char *buf2 = 0 ;
  62062. - int alloc2 = 0 ;
  62063. - PyObject * obj0 = 0 ;
  62064. - PyObject * obj1 = 0 ;
  62065. - GType result;
  62066. -
  62067. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_typeof",&obj0,&obj1)) SWIG_fail;
  62068. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62069. - if (!SWIG_IsOK(res1)) {
  62070. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'");
  62071. - }
  62072. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62073. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62074. - if (!SWIG_IsOK(res2)) {
  62075. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_typeof" "', argument " "2"" of type '" "char const *""'");
  62076. - }
  62077. - arg2 = reinterpret_cast< char * >(buf2);
  62078. - result = (arg1)->meta_get_typeof((char const *)arg2);
  62079. - resultobj = SWIG_NewPointerObj((new GType(static_cast< const GType& >(result))), SWIGTYPE_p_GType, SWIG_POINTER_OWN | 0 );
  62080. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62081. - return resultobj;
  62082. -fail:
  62083. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62084. - return NULL;
  62085. -}
  62086. -
  62087. -
  62088. -SWIGINTERN PyObject *_wrap_VImage_meta_get_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62089. - PyObject *resultobj = 0;
  62090. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62091. - char *arg2 = (char *) 0 ;
  62092. - void *argp1 = 0 ;
  62093. - int res1 = 0 ;
  62094. - int res2 ;
  62095. - char *buf2 = 0 ;
  62096. - int alloc2 = 0 ;
  62097. - PyObject * obj0 = 0 ;
  62098. - PyObject * obj1 = 0 ;
  62099. - int result;
  62100. -
  62101. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_int",&obj0,&obj1)) SWIG_fail;
  62102. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62103. - if (!SWIG_IsOK(res1)) {
  62104. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_int" "', argument " "1"" of type '" "vips::VImage *""'");
  62105. - }
  62106. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62107. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62108. - if (!SWIG_IsOK(res2)) {
  62109. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_int" "', argument " "2"" of type '" "char const *""'");
  62110. - }
  62111. - arg2 = reinterpret_cast< char * >(buf2);
  62112. - try {
  62113. - result = (int)(arg1)->meta_get_int((char const *)arg2);
  62114. - }
  62115. - catch(vips::VError &_e) {
  62116. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62117. - }
  62118. -
  62119. - resultobj = SWIG_From_int(static_cast< int >(result));
  62120. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62121. - return resultobj;
  62122. -fail:
  62123. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62124. - return NULL;
  62125. -}
  62126. -
  62127. -
  62128. -SWIGINTERN PyObject *_wrap_VImage_meta_get_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62129. - PyObject *resultobj = 0;
  62130. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62131. - char *arg2 = (char *) 0 ;
  62132. - void *argp1 = 0 ;
  62133. - int res1 = 0 ;
  62134. - int res2 ;
  62135. - char *buf2 = 0 ;
  62136. - int alloc2 = 0 ;
  62137. - PyObject * obj0 = 0 ;
  62138. - PyObject * obj1 = 0 ;
  62139. - double result;
  62140. -
  62141. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_double",&obj0,&obj1)) SWIG_fail;
  62142. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62143. - if (!SWIG_IsOK(res1)) {
  62144. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_double" "', argument " "1"" of type '" "vips::VImage *""'");
  62145. - }
  62146. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62147. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62148. - if (!SWIG_IsOK(res2)) {
  62149. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_double" "', argument " "2"" of type '" "char const *""'");
  62150. - }
  62151. - arg2 = reinterpret_cast< char * >(buf2);
  62152. - try {
  62153. - result = (double)(arg1)->meta_get_double((char const *)arg2);
  62154. - }
  62155. - catch(vips::VError &_e) {
  62156. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62157. - }
  62158. -
  62159. - resultobj = SWIG_From_double(static_cast< double >(result));
  62160. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62161. - return resultobj;
  62162. -fail:
  62163. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62164. - return NULL;
  62165. -}
  62166. -
  62167. -
  62168. -SWIGINTERN PyObject *_wrap_VImage_meta_get_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62169. - PyObject *resultobj = 0;
  62170. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62171. - char *arg2 = (char *) 0 ;
  62172. - void *argp1 = 0 ;
  62173. - int res1 = 0 ;
  62174. - int res2 ;
  62175. - char *buf2 = 0 ;
  62176. - int alloc2 = 0 ;
  62177. - PyObject * obj0 = 0 ;
  62178. - PyObject * obj1 = 0 ;
  62179. - char *result = 0 ;
  62180. -
  62181. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_string",&obj0,&obj1)) SWIG_fail;
  62182. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62183. - if (!SWIG_IsOK(res1)) {
  62184. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_string" "', argument " "1"" of type '" "vips::VImage *""'");
  62185. - }
  62186. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62187. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62188. - if (!SWIG_IsOK(res2)) {
  62189. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_string" "', argument " "2"" of type '" "char const *""'");
  62190. - }
  62191. - arg2 = reinterpret_cast< char * >(buf2);
  62192. - try {
  62193. - result = (char *)(arg1)->meta_get_string((char const *)arg2);
  62194. - }
  62195. - catch(vips::VError &_e) {
  62196. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62197. - }
  62198. -
  62199. - resultobj = SWIG_FromCharPtr((const char *)result);
  62200. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62201. - return resultobj;
  62202. -fail:
  62203. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62204. - return NULL;
  62205. -}
  62206. -
  62207. -
  62208. -SWIGINTERN PyObject *_wrap_VImage_meta_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62209. - PyObject *resultobj = 0;
  62210. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62211. - char *arg2 = (char *) 0 ;
  62212. - void *argp1 = 0 ;
  62213. - int res1 = 0 ;
  62214. - int res2 ;
  62215. - char *buf2 = 0 ;
  62216. - int alloc2 = 0 ;
  62217. - PyObject * obj0 = 0 ;
  62218. - PyObject * obj1 = 0 ;
  62219. - void *result = 0 ;
  62220. -
  62221. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_area",&obj0,&obj1)) SWIG_fail;
  62222. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62223. - if (!SWIG_IsOK(res1)) {
  62224. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_area" "', argument " "1"" of type '" "vips::VImage *""'");
  62225. - }
  62226. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62227. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62228. - if (!SWIG_IsOK(res2)) {
  62229. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_area" "', argument " "2"" of type '" "char const *""'");
  62230. - }
  62231. - arg2 = reinterpret_cast< char * >(buf2);
  62232. - try {
  62233. - result = (void *)(arg1)->meta_get_area((char const *)arg2);
  62234. - }
  62235. - catch(vips::VError &_e) {
  62236. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62237. - }
  62238. -
  62239. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
  62240. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62241. - return resultobj;
  62242. -fail:
  62243. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62244. - return NULL;
  62245. -}
  62246. -
  62247. -
  62248. -SWIGINTERN PyObject *_wrap_VImage_meta_get_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62249. - PyObject *resultobj = 0;
  62250. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62251. - char *arg2 = (char *) 0 ;
  62252. - size_t *arg3 = (size_t *) 0 ;
  62253. - void *argp1 = 0 ;
  62254. - int res1 = 0 ;
  62255. - int res2 ;
  62256. - char *buf2 = 0 ;
  62257. - int alloc2 = 0 ;
  62258. - void *argp3 = 0 ;
  62259. - int res3 = 0 ;
  62260. - PyObject * obj0 = 0 ;
  62261. - PyObject * obj1 = 0 ;
  62262. - PyObject * obj2 = 0 ;
  62263. - void *result = 0 ;
  62264. -
  62265. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_get_blob",&obj0,&obj1,&obj2)) SWIG_fail;
  62266. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62267. - if (!SWIG_IsOK(res1)) {
  62268. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_blob" "', argument " "1"" of type '" "vips::VImage *""'");
  62269. - }
  62270. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62271. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62272. - if (!SWIG_IsOK(res2)) {
  62273. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_blob" "', argument " "2"" of type '" "char const *""'");
  62274. - }
  62275. - arg2 = reinterpret_cast< char * >(buf2);
  62276. - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 | 0 );
  62277. - if (!SWIG_IsOK(res3)) {
  62278. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_get_blob" "', argument " "3"" of type '" "size_t *""'");
  62279. - }
  62280. - arg3 = reinterpret_cast< size_t * >(argp3);
  62281. - try {
  62282. - result = (void *)(arg1)->meta_get_blob((char const *)arg2,arg3);
  62283. - }
  62284. - catch(vips::VError &_e) {
  62285. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62286. - }
  62287. -
  62288. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
  62289. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62290. - return resultobj;
  62291. -fail:
  62292. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62293. - return NULL;
  62294. -}
  62295. -
  62296. -
  62297. -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62298. - PyObject *resultobj = 0;
  62299. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62300. - char *arg2 = (char *) 0 ;
  62301. - int arg3 ;
  62302. - void *argp1 = 0 ;
  62303. - int res1 = 0 ;
  62304. - int res2 ;
  62305. - char *buf2 = 0 ;
  62306. - int alloc2 = 0 ;
  62307. - int val3 ;
  62308. - int ecode3 = 0 ;
  62309. - PyObject * obj0 = 0 ;
  62310. - PyObject * obj1 = 0 ;
  62311. - PyObject * obj2 = 0 ;
  62312. -
  62313. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
  62314. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62315. - if (!SWIG_IsOK(res1)) {
  62316. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
  62317. - }
  62318. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62319. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62320. - if (!SWIG_IsOK(res2)) {
  62321. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
  62322. - }
  62323. - arg2 = reinterpret_cast< char * >(buf2);
  62324. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62325. - if (!SWIG_IsOK(ecode3)) {
  62326. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "int""'");
  62327. - }
  62328. - arg3 = static_cast< int >(val3);
  62329. - try {
  62330. - (arg1)->meta_set((char const *)arg2,arg3);
  62331. - }
  62332. - catch(vips::VError &_e) {
  62333. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62334. - }
  62335. -
  62336. - resultobj = SWIG_Py_Void();
  62337. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62338. - return resultobj;
  62339. -fail:
  62340. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62341. - return NULL;
  62342. -}
  62343. -
  62344. -
  62345. -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62346. - PyObject *resultobj = 0;
  62347. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62348. - char *arg2 = (char *) 0 ;
  62349. - double arg3 ;
  62350. - void *argp1 = 0 ;
  62351. - int res1 = 0 ;
  62352. - int res2 ;
  62353. - char *buf2 = 0 ;
  62354. - int alloc2 = 0 ;
  62355. - double val3 ;
  62356. - int ecode3 = 0 ;
  62357. - PyObject * obj0 = 0 ;
  62358. - PyObject * obj1 = 0 ;
  62359. - PyObject * obj2 = 0 ;
  62360. -
  62361. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
  62362. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62363. - if (!SWIG_IsOK(res1)) {
  62364. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
  62365. - }
  62366. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62367. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62368. - if (!SWIG_IsOK(res2)) {
  62369. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
  62370. - }
  62371. - arg2 = reinterpret_cast< char * >(buf2);
  62372. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  62373. - if (!SWIG_IsOK(ecode3)) {
  62374. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "double""'");
  62375. - }
  62376. - arg3 = static_cast< double >(val3);
  62377. - try {
  62378. - (arg1)->meta_set((char const *)arg2,arg3);
  62379. - }
  62380. - catch(vips::VError &_e) {
  62381. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62382. - }
  62383. -
  62384. - resultobj = SWIG_Py_Void();
  62385. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62386. - return resultobj;
  62387. -fail:
  62388. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62389. - return NULL;
  62390. -}
  62391. -
  62392. -
  62393. -SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62394. - PyObject *resultobj = 0;
  62395. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62396. - char *arg2 = (char *) 0 ;
  62397. - char *arg3 = (char *) 0 ;
  62398. - void *argp1 = 0 ;
  62399. - int res1 = 0 ;
  62400. - int res2 ;
  62401. - char *buf2 = 0 ;
  62402. - int alloc2 = 0 ;
  62403. - int res3 ;
  62404. - char *buf3 = 0 ;
  62405. - int alloc3 = 0 ;
  62406. - PyObject * obj0 = 0 ;
  62407. - PyObject * obj1 = 0 ;
  62408. - PyObject * obj2 = 0 ;
  62409. -
  62410. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail;
  62411. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62412. - if (!SWIG_IsOK(res1)) {
  62413. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'");
  62414. - }
  62415. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62416. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  62417. - if (!SWIG_IsOK(res2)) {
  62418. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'");
  62419. - }
  62420. - arg2 = reinterpret_cast< char * >(buf2);
  62421. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  62422. - if (!SWIG_IsOK(res3)) {
  62423. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "char const *""'");
  62424. - }
  62425. - arg3 = reinterpret_cast< char * >(buf3);
  62426. - try {
  62427. - (arg1)->meta_set((char const *)arg2,(char const *)arg3);
  62428. - }
  62429. - catch(vips::VError &_e) {
  62430. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62431. - }
  62432. -
  62433. - resultobj = SWIG_Py_Void();
  62434. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62435. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  62436. - return resultobj;
  62437. -fail:
  62438. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  62439. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  62440. - return NULL;
  62441. -}
  62442. -
  62443. -
  62444. -SWIGINTERN PyObject *_wrap_VImage_meta_set(PyObject *self, PyObject *args) {
  62445. - int argc;
  62446. - PyObject *argv[4];
  62447. - int ii;
  62448. -
  62449. - if (!PyTuple_Check(args)) SWIG_fail;
  62450. - argc = args ? (int)PyObject_Length(args) : 0;
  62451. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  62452. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  62453. - }
  62454. - if (argc == 3) {
  62455. - int _v;
  62456. - void *vptr = 0;
  62457. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  62458. - _v = SWIG_CheckState(res);
  62459. - if (_v) {
  62460. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  62461. - _v = SWIG_CheckState(res);
  62462. - if (_v) {
  62463. - {
  62464. - int res = SWIG_AsVal_int(argv[2], NULL);
  62465. - _v = SWIG_CheckState(res);
  62466. - }
  62467. - if (_v) {
  62468. - return _wrap_VImage_meta_set__SWIG_0(self, args);
  62469. - }
  62470. - }
  62471. - }
  62472. - }
  62473. - if (argc == 3) {
  62474. - int _v;
  62475. - void *vptr = 0;
  62476. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  62477. - _v = SWIG_CheckState(res);
  62478. - if (_v) {
  62479. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  62480. - _v = SWIG_CheckState(res);
  62481. - if (_v) {
  62482. - {
  62483. - int res = SWIG_AsVal_double(argv[2], NULL);
  62484. - _v = SWIG_CheckState(res);
  62485. - }
  62486. - if (_v) {
  62487. - return _wrap_VImage_meta_set__SWIG_1(self, args);
  62488. - }
  62489. - }
  62490. - }
  62491. - }
  62492. - if (argc == 3) {
  62493. - int _v;
  62494. - void *vptr = 0;
  62495. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  62496. - _v = SWIG_CheckState(res);
  62497. - if (_v) {
  62498. - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  62499. - _v = SWIG_CheckState(res);
  62500. - if (_v) {
  62501. - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
  62502. - _v = SWIG_CheckState(res);
  62503. - if (_v) {
  62504. - return _wrap_VImage_meta_set__SWIG_2(self, args);
  62505. - }
  62506. - }
  62507. - }
  62508. - }
  62509. -
  62510. -fail:
  62511. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_meta_set'.\n"
  62512. - " Possible C/C++ prototypes are:\n"
  62513. - " vips::VImage::meta_set(char const *,int)\n"
  62514. - " vips::VImage::meta_set(char const *,double)\n"
  62515. - " vips::VImage::meta_set(char const *,char const *)\n");
  62516. - return 0;
  62517. -}
  62518. -
  62519. -
  62520. -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62521. - PyObject *resultobj = 0;
  62522. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62523. - int arg2 ;
  62524. - int arg3 ;
  62525. - int arg4 ;
  62526. - vips::VImage::TBandFmt arg5 ;
  62527. - vips::VImage::TCoding arg6 ;
  62528. - vips::VImage::TType arg7 ;
  62529. - float arg8 ;
  62530. - float arg9 ;
  62531. - int arg10 ;
  62532. - int arg11 ;
  62533. - void *argp1 = 0 ;
  62534. - int res1 = 0 ;
  62535. - int val2 ;
  62536. - int ecode2 = 0 ;
  62537. - int val3 ;
  62538. - int ecode3 = 0 ;
  62539. - int val4 ;
  62540. - int ecode4 = 0 ;
  62541. - int val5 ;
  62542. - int ecode5 = 0 ;
  62543. - int val6 ;
  62544. - int ecode6 = 0 ;
  62545. - int val7 ;
  62546. - int ecode7 = 0 ;
  62547. - float val8 ;
  62548. - int ecode8 = 0 ;
  62549. - float val9 ;
  62550. - int ecode9 = 0 ;
  62551. - int val10 ;
  62552. - int ecode10 = 0 ;
  62553. - int val11 ;
  62554. - int ecode11 = 0 ;
  62555. - PyObject * obj0 = 0 ;
  62556. - PyObject * obj1 = 0 ;
  62557. - PyObject * obj2 = 0 ;
  62558. - PyObject * obj3 = 0 ;
  62559. - PyObject * obj4 = 0 ;
  62560. - PyObject * obj5 = 0 ;
  62561. - PyObject * obj6 = 0 ;
  62562. - PyObject * obj7 = 0 ;
  62563. - PyObject * obj8 = 0 ;
  62564. - PyObject * obj9 = 0 ;
  62565. - PyObject * obj10 = 0 ;
  62566. -
  62567. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  62568. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62569. - if (!SWIG_IsOK(res1)) {
  62570. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  62571. - }
  62572. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62573. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  62574. - if (!SWIG_IsOK(ecode2)) {
  62575. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
  62576. - }
  62577. - arg2 = static_cast< int >(val2);
  62578. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62579. - if (!SWIG_IsOK(ecode3)) {
  62580. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
  62581. - }
  62582. - arg3 = static_cast< int >(val3);
  62583. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  62584. - if (!SWIG_IsOK(ecode4)) {
  62585. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
  62586. - }
  62587. - arg4 = static_cast< int >(val4);
  62588. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  62589. - if (!SWIG_IsOK(ecode5)) {
  62590. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  62591. - }
  62592. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  62593. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  62594. - if (!SWIG_IsOK(ecode6)) {
  62595. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
  62596. - }
  62597. - arg6 = static_cast< vips::VImage::TCoding >(val6);
  62598. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  62599. - if (!SWIG_IsOK(ecode7)) {
  62600. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
  62601. - }
  62602. - arg7 = static_cast< vips::VImage::TType >(val7);
  62603. - ecode8 = SWIG_AsVal_float(obj7, &val8);
  62604. - if (!SWIG_IsOK(ecode8)) {
  62605. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
  62606. - }
  62607. - arg8 = static_cast< float >(val8);
  62608. - ecode9 = SWIG_AsVal_float(obj8, &val9);
  62609. - if (!SWIG_IsOK(ecode9)) {
  62610. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
  62611. - }
  62612. - arg9 = static_cast< float >(val9);
  62613. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  62614. - if (!SWIG_IsOK(ecode10)) {
  62615. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'");
  62616. - }
  62617. - arg10 = static_cast< int >(val10);
  62618. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  62619. - if (!SWIG_IsOK(ecode11)) {
  62620. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_initdesc" "', argument " "11"" of type '" "int""'");
  62621. - }
  62622. - arg11 = static_cast< int >(val11);
  62623. - try {
  62624. - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  62625. - }
  62626. - catch(vips::VError &_e) {
  62627. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62628. - }
  62629. -
  62630. - resultobj = SWIG_Py_Void();
  62631. - return resultobj;
  62632. -fail:
  62633. - return NULL;
  62634. -}
  62635. -
  62636. -
  62637. -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62638. - PyObject *resultobj = 0;
  62639. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62640. - int arg2 ;
  62641. - int arg3 ;
  62642. - int arg4 ;
  62643. - vips::VImage::TBandFmt arg5 ;
  62644. - vips::VImage::TCoding arg6 ;
  62645. - vips::VImage::TType arg7 ;
  62646. - float arg8 ;
  62647. - float arg9 ;
  62648. - int arg10 ;
  62649. - void *argp1 = 0 ;
  62650. - int res1 = 0 ;
  62651. - int val2 ;
  62652. - int ecode2 = 0 ;
  62653. - int val3 ;
  62654. - int ecode3 = 0 ;
  62655. - int val4 ;
  62656. - int ecode4 = 0 ;
  62657. - int val5 ;
  62658. - int ecode5 = 0 ;
  62659. - int val6 ;
  62660. - int ecode6 = 0 ;
  62661. - int val7 ;
  62662. - int ecode7 = 0 ;
  62663. - float val8 ;
  62664. - int ecode8 = 0 ;
  62665. - float val9 ;
  62666. - int ecode9 = 0 ;
  62667. - int val10 ;
  62668. - int ecode10 = 0 ;
  62669. - PyObject * obj0 = 0 ;
  62670. - PyObject * obj1 = 0 ;
  62671. - PyObject * obj2 = 0 ;
  62672. - PyObject * obj3 = 0 ;
  62673. - PyObject * obj4 = 0 ;
  62674. - PyObject * obj5 = 0 ;
  62675. - PyObject * obj6 = 0 ;
  62676. - PyObject * obj7 = 0 ;
  62677. - PyObject * obj8 = 0 ;
  62678. - PyObject * obj9 = 0 ;
  62679. -
  62680. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
  62681. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62682. - if (!SWIG_IsOK(res1)) {
  62683. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  62684. - }
  62685. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62686. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  62687. - if (!SWIG_IsOK(ecode2)) {
  62688. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
  62689. - }
  62690. - arg2 = static_cast< int >(val2);
  62691. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62692. - if (!SWIG_IsOK(ecode3)) {
  62693. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
  62694. - }
  62695. - arg3 = static_cast< int >(val3);
  62696. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  62697. - if (!SWIG_IsOK(ecode4)) {
  62698. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
  62699. - }
  62700. - arg4 = static_cast< int >(val4);
  62701. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  62702. - if (!SWIG_IsOK(ecode5)) {
  62703. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  62704. - }
  62705. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  62706. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  62707. - if (!SWIG_IsOK(ecode6)) {
  62708. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
  62709. - }
  62710. - arg6 = static_cast< vips::VImage::TCoding >(val6);
  62711. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  62712. - if (!SWIG_IsOK(ecode7)) {
  62713. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
  62714. - }
  62715. - arg7 = static_cast< vips::VImage::TType >(val7);
  62716. - ecode8 = SWIG_AsVal_float(obj7, &val8);
  62717. - if (!SWIG_IsOK(ecode8)) {
  62718. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
  62719. - }
  62720. - arg8 = static_cast< float >(val8);
  62721. - ecode9 = SWIG_AsVal_float(obj8, &val9);
  62722. - if (!SWIG_IsOK(ecode9)) {
  62723. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
  62724. - }
  62725. - arg9 = static_cast< float >(val9);
  62726. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  62727. - if (!SWIG_IsOK(ecode10)) {
  62728. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'");
  62729. - }
  62730. - arg10 = static_cast< int >(val10);
  62731. - try {
  62732. - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
  62733. - }
  62734. - catch(vips::VError &_e) {
  62735. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62736. - }
  62737. -
  62738. - resultobj = SWIG_Py_Void();
  62739. - return resultobj;
  62740. -fail:
  62741. - return NULL;
  62742. -}
  62743. -
  62744. -
  62745. -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62746. - PyObject *resultobj = 0;
  62747. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62748. - int arg2 ;
  62749. - int arg3 ;
  62750. - int arg4 ;
  62751. - vips::VImage::TBandFmt arg5 ;
  62752. - vips::VImage::TCoding arg6 ;
  62753. - vips::VImage::TType arg7 ;
  62754. - float arg8 ;
  62755. - float arg9 ;
  62756. - void *argp1 = 0 ;
  62757. - int res1 = 0 ;
  62758. - int val2 ;
  62759. - int ecode2 = 0 ;
  62760. - int val3 ;
  62761. - int ecode3 = 0 ;
  62762. - int val4 ;
  62763. - int ecode4 = 0 ;
  62764. - int val5 ;
  62765. - int ecode5 = 0 ;
  62766. - int val6 ;
  62767. - int ecode6 = 0 ;
  62768. - int val7 ;
  62769. - int ecode7 = 0 ;
  62770. - float val8 ;
  62771. - int ecode8 = 0 ;
  62772. - float val9 ;
  62773. - int ecode9 = 0 ;
  62774. - PyObject * obj0 = 0 ;
  62775. - PyObject * obj1 = 0 ;
  62776. - PyObject * obj2 = 0 ;
  62777. - PyObject * obj3 = 0 ;
  62778. - PyObject * obj4 = 0 ;
  62779. - PyObject * obj5 = 0 ;
  62780. - PyObject * obj6 = 0 ;
  62781. - PyObject * obj7 = 0 ;
  62782. - PyObject * obj8 = 0 ;
  62783. -
  62784. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  62785. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62786. - if (!SWIG_IsOK(res1)) {
  62787. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  62788. - }
  62789. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62790. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  62791. - if (!SWIG_IsOK(ecode2)) {
  62792. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
  62793. - }
  62794. - arg2 = static_cast< int >(val2);
  62795. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62796. - if (!SWIG_IsOK(ecode3)) {
  62797. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
  62798. - }
  62799. - arg3 = static_cast< int >(val3);
  62800. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  62801. - if (!SWIG_IsOK(ecode4)) {
  62802. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
  62803. - }
  62804. - arg4 = static_cast< int >(val4);
  62805. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  62806. - if (!SWIG_IsOK(ecode5)) {
  62807. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  62808. - }
  62809. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  62810. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  62811. - if (!SWIG_IsOK(ecode6)) {
  62812. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
  62813. - }
  62814. - arg6 = static_cast< vips::VImage::TCoding >(val6);
  62815. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  62816. - if (!SWIG_IsOK(ecode7)) {
  62817. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
  62818. - }
  62819. - arg7 = static_cast< vips::VImage::TType >(val7);
  62820. - ecode8 = SWIG_AsVal_float(obj7, &val8);
  62821. - if (!SWIG_IsOK(ecode8)) {
  62822. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
  62823. - }
  62824. - arg8 = static_cast< float >(val8);
  62825. - ecode9 = SWIG_AsVal_float(obj8, &val9);
  62826. - if (!SWIG_IsOK(ecode9)) {
  62827. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'");
  62828. - }
  62829. - arg9 = static_cast< float >(val9);
  62830. - try {
  62831. - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  62832. - }
  62833. - catch(vips::VError &_e) {
  62834. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62835. - }
  62836. -
  62837. - resultobj = SWIG_Py_Void();
  62838. - return resultobj;
  62839. -fail:
  62840. - return NULL;
  62841. -}
  62842. -
  62843. -
  62844. -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62845. - PyObject *resultobj = 0;
  62846. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62847. - int arg2 ;
  62848. - int arg3 ;
  62849. - int arg4 ;
  62850. - vips::VImage::TBandFmt arg5 ;
  62851. - vips::VImage::TCoding arg6 ;
  62852. - vips::VImage::TType arg7 ;
  62853. - float arg8 ;
  62854. - void *argp1 = 0 ;
  62855. - int res1 = 0 ;
  62856. - int val2 ;
  62857. - int ecode2 = 0 ;
  62858. - int val3 ;
  62859. - int ecode3 = 0 ;
  62860. - int val4 ;
  62861. - int ecode4 = 0 ;
  62862. - int val5 ;
  62863. - int ecode5 = 0 ;
  62864. - int val6 ;
  62865. - int ecode6 = 0 ;
  62866. - int val7 ;
  62867. - int ecode7 = 0 ;
  62868. - float val8 ;
  62869. - int ecode8 = 0 ;
  62870. - PyObject * obj0 = 0 ;
  62871. - PyObject * obj1 = 0 ;
  62872. - PyObject * obj2 = 0 ;
  62873. - PyObject * obj3 = 0 ;
  62874. - PyObject * obj4 = 0 ;
  62875. - PyObject * obj5 = 0 ;
  62876. - PyObject * obj6 = 0 ;
  62877. - PyObject * obj7 = 0 ;
  62878. -
  62879. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  62880. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62881. - if (!SWIG_IsOK(res1)) {
  62882. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  62883. - }
  62884. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62885. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  62886. - if (!SWIG_IsOK(ecode2)) {
  62887. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
  62888. - }
  62889. - arg2 = static_cast< int >(val2);
  62890. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62891. - if (!SWIG_IsOK(ecode3)) {
  62892. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
  62893. - }
  62894. - arg3 = static_cast< int >(val3);
  62895. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  62896. - if (!SWIG_IsOK(ecode4)) {
  62897. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
  62898. - }
  62899. - arg4 = static_cast< int >(val4);
  62900. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  62901. - if (!SWIG_IsOK(ecode5)) {
  62902. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  62903. - }
  62904. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  62905. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  62906. - if (!SWIG_IsOK(ecode6)) {
  62907. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
  62908. - }
  62909. - arg6 = static_cast< vips::VImage::TCoding >(val6);
  62910. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  62911. - if (!SWIG_IsOK(ecode7)) {
  62912. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
  62913. - }
  62914. - arg7 = static_cast< vips::VImage::TType >(val7);
  62915. - ecode8 = SWIG_AsVal_float(obj7, &val8);
  62916. - if (!SWIG_IsOK(ecode8)) {
  62917. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'");
  62918. - }
  62919. - arg8 = static_cast< float >(val8);
  62920. - try {
  62921. - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  62922. - }
  62923. - catch(vips::VError &_e) {
  62924. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  62925. - }
  62926. -
  62927. - resultobj = SWIG_Py_Void();
  62928. - return resultobj;
  62929. -fail:
  62930. - return NULL;
  62931. -}
  62932. -
  62933. -
  62934. -SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  62935. - PyObject *resultobj = 0;
  62936. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  62937. - int arg2 ;
  62938. - int arg3 ;
  62939. - int arg4 ;
  62940. - vips::VImage::TBandFmt arg5 ;
  62941. - vips::VImage::TCoding arg6 ;
  62942. - vips::VImage::TType arg7 ;
  62943. - void *argp1 = 0 ;
  62944. - int res1 = 0 ;
  62945. - int val2 ;
  62946. - int ecode2 = 0 ;
  62947. - int val3 ;
  62948. - int ecode3 = 0 ;
  62949. - int val4 ;
  62950. - int ecode4 = 0 ;
  62951. - int val5 ;
  62952. - int ecode5 = 0 ;
  62953. - int val6 ;
  62954. - int ecode6 = 0 ;
  62955. - int val7 ;
  62956. - int ecode7 = 0 ;
  62957. - PyObject * obj0 = 0 ;
  62958. - PyObject * obj1 = 0 ;
  62959. - PyObject * obj2 = 0 ;
  62960. - PyObject * obj3 = 0 ;
  62961. - PyObject * obj4 = 0 ;
  62962. - PyObject * obj5 = 0 ;
  62963. - PyObject * obj6 = 0 ;
  62964. -
  62965. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  62966. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  62967. - if (!SWIG_IsOK(res1)) {
  62968. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  62969. - }
  62970. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  62971. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  62972. - if (!SWIG_IsOK(ecode2)) {
  62973. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'");
  62974. - }
  62975. - arg2 = static_cast< int >(val2);
  62976. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  62977. - if (!SWIG_IsOK(ecode3)) {
  62978. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'");
  62979. - }
  62980. - arg3 = static_cast< int >(val3);
  62981. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  62982. - if (!SWIG_IsOK(ecode4)) {
  62983. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'");
  62984. - }
  62985. - arg4 = static_cast< int >(val4);
  62986. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  62987. - if (!SWIG_IsOK(ecode5)) {
  62988. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  62989. - }
  62990. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  62991. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  62992. - if (!SWIG_IsOK(ecode6)) {
  62993. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'");
  62994. - }
  62995. - arg6 = static_cast< vips::VImage::TCoding >(val6);
  62996. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  62997. - if (!SWIG_IsOK(ecode7)) {
  62998. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'");
  62999. - }
  63000. - arg7 = static_cast< vips::VImage::TType >(val7);
  63001. - try {
  63002. - (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7);
  63003. - }
  63004. - catch(vips::VError &_e) {
  63005. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63006. - }
  63007. -
  63008. - resultobj = SWIG_Py_Void();
  63009. - return resultobj;
  63010. -fail:
  63011. - return NULL;
  63012. -}
  63013. -
  63014. -
  63015. -SWIGINTERN PyObject *_wrap_VImage_initdesc(PyObject *self, PyObject *args) {
  63016. - int argc;
  63017. - PyObject *argv[12];
  63018. - int ii;
  63019. -
  63020. - if (!PyTuple_Check(args)) SWIG_fail;
  63021. - argc = args ? (int)PyObject_Length(args) : 0;
  63022. - for (ii = 0; (ii < 11) && (ii < argc); ii++) {
  63023. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  63024. - }
  63025. - if (argc == 7) {
  63026. - int _v;
  63027. - void *vptr = 0;
  63028. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63029. - _v = SWIG_CheckState(res);
  63030. - if (_v) {
  63031. - {
  63032. - int res = SWIG_AsVal_int(argv[1], NULL);
  63033. - _v = SWIG_CheckState(res);
  63034. - }
  63035. - if (_v) {
  63036. - {
  63037. - int res = SWIG_AsVal_int(argv[2], NULL);
  63038. - _v = SWIG_CheckState(res);
  63039. - }
  63040. - if (_v) {
  63041. - {
  63042. - int res = SWIG_AsVal_int(argv[3], NULL);
  63043. - _v = SWIG_CheckState(res);
  63044. - }
  63045. - if (_v) {
  63046. - {
  63047. - int res = SWIG_AsVal_int(argv[4], NULL);
  63048. - _v = SWIG_CheckState(res);
  63049. - }
  63050. - if (_v) {
  63051. - {
  63052. - int res = SWIG_AsVal_int(argv[5], NULL);
  63053. - _v = SWIG_CheckState(res);
  63054. - }
  63055. - if (_v) {
  63056. - {
  63057. - int res = SWIG_AsVal_int(argv[6], NULL);
  63058. - _v = SWIG_CheckState(res);
  63059. - }
  63060. - if (_v) {
  63061. - return _wrap_VImage_initdesc__SWIG_4(self, args);
  63062. - }
  63063. - }
  63064. - }
  63065. - }
  63066. - }
  63067. - }
  63068. - }
  63069. - }
  63070. - if (argc == 8) {
  63071. - int _v;
  63072. - void *vptr = 0;
  63073. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63074. - _v = SWIG_CheckState(res);
  63075. - if (_v) {
  63076. - {
  63077. - int res = SWIG_AsVal_int(argv[1], NULL);
  63078. - _v = SWIG_CheckState(res);
  63079. - }
  63080. - if (_v) {
  63081. - {
  63082. - int res = SWIG_AsVal_int(argv[2], NULL);
  63083. - _v = SWIG_CheckState(res);
  63084. - }
  63085. - if (_v) {
  63086. - {
  63087. - int res = SWIG_AsVal_int(argv[3], NULL);
  63088. - _v = SWIG_CheckState(res);
  63089. - }
  63090. - if (_v) {
  63091. - {
  63092. - int res = SWIG_AsVal_int(argv[4], NULL);
  63093. - _v = SWIG_CheckState(res);
  63094. - }
  63095. - if (_v) {
  63096. - {
  63097. - int res = SWIG_AsVal_int(argv[5], NULL);
  63098. - _v = SWIG_CheckState(res);
  63099. - }
  63100. - if (_v) {
  63101. - {
  63102. - int res = SWIG_AsVal_int(argv[6], NULL);
  63103. - _v = SWIG_CheckState(res);
  63104. - }
  63105. - if (_v) {
  63106. - {
  63107. - int res = SWIG_AsVal_float(argv[7], NULL);
  63108. - _v = SWIG_CheckState(res);
  63109. - }
  63110. - if (_v) {
  63111. - return _wrap_VImage_initdesc__SWIG_3(self, args);
  63112. - }
  63113. - }
  63114. - }
  63115. - }
  63116. - }
  63117. - }
  63118. - }
  63119. - }
  63120. - }
  63121. - if (argc == 9) {
  63122. - int _v;
  63123. - void *vptr = 0;
  63124. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63125. - _v = SWIG_CheckState(res);
  63126. - if (_v) {
  63127. - {
  63128. - int res = SWIG_AsVal_int(argv[1], NULL);
  63129. - _v = SWIG_CheckState(res);
  63130. - }
  63131. - if (_v) {
  63132. - {
  63133. - int res = SWIG_AsVal_int(argv[2], NULL);
  63134. - _v = SWIG_CheckState(res);
  63135. - }
  63136. - if (_v) {
  63137. - {
  63138. - int res = SWIG_AsVal_int(argv[3], NULL);
  63139. - _v = SWIG_CheckState(res);
  63140. - }
  63141. - if (_v) {
  63142. - {
  63143. - int res = SWIG_AsVal_int(argv[4], NULL);
  63144. - _v = SWIG_CheckState(res);
  63145. - }
  63146. - if (_v) {
  63147. - {
  63148. - int res = SWIG_AsVal_int(argv[5], NULL);
  63149. - _v = SWIG_CheckState(res);
  63150. - }
  63151. - if (_v) {
  63152. - {
  63153. - int res = SWIG_AsVal_int(argv[6], NULL);
  63154. - _v = SWIG_CheckState(res);
  63155. - }
  63156. - if (_v) {
  63157. - {
  63158. - int res = SWIG_AsVal_float(argv[7], NULL);
  63159. - _v = SWIG_CheckState(res);
  63160. - }
  63161. - if (_v) {
  63162. - {
  63163. - int res = SWIG_AsVal_float(argv[8], NULL);
  63164. - _v = SWIG_CheckState(res);
  63165. - }
  63166. - if (_v) {
  63167. - return _wrap_VImage_initdesc__SWIG_2(self, args);
  63168. - }
  63169. - }
  63170. - }
  63171. - }
  63172. - }
  63173. - }
  63174. - }
  63175. - }
  63176. - }
  63177. - }
  63178. - if (argc == 10) {
  63179. - int _v;
  63180. - void *vptr = 0;
  63181. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63182. - _v = SWIG_CheckState(res);
  63183. - if (_v) {
  63184. - {
  63185. - int res = SWIG_AsVal_int(argv[1], NULL);
  63186. - _v = SWIG_CheckState(res);
  63187. - }
  63188. - if (_v) {
  63189. - {
  63190. - int res = SWIG_AsVal_int(argv[2], NULL);
  63191. - _v = SWIG_CheckState(res);
  63192. - }
  63193. - if (_v) {
  63194. - {
  63195. - int res = SWIG_AsVal_int(argv[3], NULL);
  63196. - _v = SWIG_CheckState(res);
  63197. - }
  63198. - if (_v) {
  63199. - {
  63200. - int res = SWIG_AsVal_int(argv[4], NULL);
  63201. - _v = SWIG_CheckState(res);
  63202. - }
  63203. - if (_v) {
  63204. - {
  63205. - int res = SWIG_AsVal_int(argv[5], NULL);
  63206. - _v = SWIG_CheckState(res);
  63207. - }
  63208. - if (_v) {
  63209. - {
  63210. - int res = SWIG_AsVal_int(argv[6], NULL);
  63211. - _v = SWIG_CheckState(res);
  63212. - }
  63213. - if (_v) {
  63214. - {
  63215. - int res = SWIG_AsVal_float(argv[7], NULL);
  63216. - _v = SWIG_CheckState(res);
  63217. - }
  63218. - if (_v) {
  63219. - {
  63220. - int res = SWIG_AsVal_float(argv[8], NULL);
  63221. - _v = SWIG_CheckState(res);
  63222. - }
  63223. - if (_v) {
  63224. - {
  63225. - int res = SWIG_AsVal_int(argv[9], NULL);
  63226. - _v = SWIG_CheckState(res);
  63227. - }
  63228. - if (_v) {
  63229. - return _wrap_VImage_initdesc__SWIG_1(self, args);
  63230. - }
  63231. - }
  63232. - }
  63233. - }
  63234. - }
  63235. - }
  63236. - }
  63237. - }
  63238. - }
  63239. - }
  63240. - }
  63241. - if (argc == 11) {
  63242. - int _v;
  63243. - void *vptr = 0;
  63244. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63245. - _v = SWIG_CheckState(res);
  63246. - if (_v) {
  63247. - {
  63248. - int res = SWIG_AsVal_int(argv[1], NULL);
  63249. - _v = SWIG_CheckState(res);
  63250. - }
  63251. - if (_v) {
  63252. - {
  63253. - int res = SWIG_AsVal_int(argv[2], NULL);
  63254. - _v = SWIG_CheckState(res);
  63255. - }
  63256. - if (_v) {
  63257. - {
  63258. - int res = SWIG_AsVal_int(argv[3], NULL);
  63259. - _v = SWIG_CheckState(res);
  63260. - }
  63261. - if (_v) {
  63262. - {
  63263. - int res = SWIG_AsVal_int(argv[4], NULL);
  63264. - _v = SWIG_CheckState(res);
  63265. - }
  63266. - if (_v) {
  63267. - {
  63268. - int res = SWIG_AsVal_int(argv[5], NULL);
  63269. - _v = SWIG_CheckState(res);
  63270. - }
  63271. - if (_v) {
  63272. - {
  63273. - int res = SWIG_AsVal_int(argv[6], NULL);
  63274. - _v = SWIG_CheckState(res);
  63275. - }
  63276. - if (_v) {
  63277. - {
  63278. - int res = SWIG_AsVal_float(argv[7], NULL);
  63279. - _v = SWIG_CheckState(res);
  63280. - }
  63281. - if (_v) {
  63282. - {
  63283. - int res = SWIG_AsVal_float(argv[8], NULL);
  63284. - _v = SWIG_CheckState(res);
  63285. - }
  63286. - if (_v) {
  63287. - {
  63288. - int res = SWIG_AsVal_int(argv[9], NULL);
  63289. - _v = SWIG_CheckState(res);
  63290. - }
  63291. - if (_v) {
  63292. - {
  63293. - int res = SWIG_AsVal_int(argv[10], NULL);
  63294. - _v = SWIG_CheckState(res);
  63295. - }
  63296. - if (_v) {
  63297. - return _wrap_VImage_initdesc__SWIG_0(self, args);
  63298. - }
  63299. - }
  63300. - }
  63301. - }
  63302. - }
  63303. - }
  63304. - }
  63305. - }
  63306. - }
  63307. - }
  63308. - }
  63309. - }
  63310. -
  63311. -fail:
  63312. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_initdesc'.\n"
  63313. - " Possible C/C++ prototypes are:\n"
  63314. - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int,int)\n"
  63315. - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int)\n"
  63316. - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float)\n"
  63317. - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float)\n"
  63318. - " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType)\n");
  63319. - return 0;
  63320. -}
  63321. -
  63322. -
  63323. -SWIGINTERN PyObject *_wrap_VImage_abs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63324. - PyObject *resultobj = 0;
  63325. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63326. - void *argp1 = 0 ;
  63327. - int res1 = 0 ;
  63328. - PyObject * obj0 = 0 ;
  63329. - vips::VImage result;
  63330. -
  63331. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_abs",&obj0)) SWIG_fail;
  63332. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63333. - if (!SWIG_IsOK(res1)) {
  63334. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_abs" "', argument " "1"" of type '" "vips::VImage *""'");
  63335. - }
  63336. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63337. - try {
  63338. - result = (arg1)->abs();
  63339. - }
  63340. - catch(vips::VError &_e) {
  63341. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63342. - }
  63343. -
  63344. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63345. - return resultobj;
  63346. -fail:
  63347. - return NULL;
  63348. -}
  63349. -
  63350. -
  63351. -SWIGINTERN PyObject *_wrap_VImage_acos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63352. - PyObject *resultobj = 0;
  63353. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63354. - void *argp1 = 0 ;
  63355. - int res1 = 0 ;
  63356. - PyObject * obj0 = 0 ;
  63357. - vips::VImage result;
  63358. -
  63359. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_acos",&obj0)) SWIG_fail;
  63360. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63361. - if (!SWIG_IsOK(res1)) {
  63362. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_acos" "', argument " "1"" of type '" "vips::VImage *""'");
  63363. - }
  63364. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63365. - try {
  63366. - result = (arg1)->acos();
  63367. - }
  63368. - catch(vips::VError &_e) {
  63369. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63370. - }
  63371. -
  63372. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63373. - return resultobj;
  63374. -fail:
  63375. - return NULL;
  63376. -}
  63377. -
  63378. -
  63379. -SWIGINTERN PyObject *_wrap_VImage_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63380. - PyObject *resultobj = 0;
  63381. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63382. - vips::VImage arg2 ;
  63383. - void *argp1 = 0 ;
  63384. - int res1 = 0 ;
  63385. - void *argp2 ;
  63386. - int res2 = 0 ;
  63387. - PyObject * obj0 = 0 ;
  63388. - PyObject * obj1 = 0 ;
  63389. - vips::VImage result;
  63390. -
  63391. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_add",&obj0,&obj1)) SWIG_fail;
  63392. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63393. - if (!SWIG_IsOK(res1)) {
  63394. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_add" "', argument " "1"" of type '" "vips::VImage *""'");
  63395. - }
  63396. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63397. - {
  63398. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  63399. - if (!SWIG_IsOK(res2)) {
  63400. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'");
  63401. - }
  63402. - if (!argp2) {
  63403. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'");
  63404. - } else {
  63405. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  63406. - arg2 = *temp;
  63407. - if (SWIG_IsNewObj(res2)) delete temp;
  63408. - }
  63409. - }
  63410. - try {
  63411. - result = (arg1)->add(arg2);
  63412. - }
  63413. - catch(vips::VError &_e) {
  63414. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63415. - }
  63416. -
  63417. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63418. - return resultobj;
  63419. -fail:
  63420. - return NULL;
  63421. -}
  63422. -
  63423. -
  63424. -SWIGINTERN PyObject *_wrap_VImage_asin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63425. - PyObject *resultobj = 0;
  63426. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63427. - void *argp1 = 0 ;
  63428. - int res1 = 0 ;
  63429. - PyObject * obj0 = 0 ;
  63430. - vips::VImage result;
  63431. -
  63432. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_asin",&obj0)) SWIG_fail;
  63433. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63434. - if (!SWIG_IsOK(res1)) {
  63435. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_asin" "', argument " "1"" of type '" "vips::VImage *""'");
  63436. - }
  63437. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63438. - try {
  63439. - result = (arg1)->asin();
  63440. - }
  63441. - catch(vips::VError &_e) {
  63442. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63443. - }
  63444. -
  63445. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63446. - return resultobj;
  63447. -fail:
  63448. - return NULL;
  63449. -}
  63450. -
  63451. -
  63452. -SWIGINTERN PyObject *_wrap_VImage_atan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63453. - PyObject *resultobj = 0;
  63454. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63455. - void *argp1 = 0 ;
  63456. - int res1 = 0 ;
  63457. - PyObject * obj0 = 0 ;
  63458. - vips::VImage result;
  63459. -
  63460. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_atan",&obj0)) SWIG_fail;
  63461. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63462. - if (!SWIG_IsOK(res1)) {
  63463. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_atan" "', argument " "1"" of type '" "vips::VImage *""'");
  63464. - }
  63465. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63466. - try {
  63467. - result = (arg1)->atan();
  63468. - }
  63469. - catch(vips::VError &_e) {
  63470. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63471. - }
  63472. -
  63473. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63474. - return resultobj;
  63475. -fail:
  63476. - return NULL;
  63477. -}
  63478. -
  63479. -
  63480. -SWIGINTERN PyObject *_wrap_VImage_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63481. - PyObject *resultobj = 0;
  63482. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63483. - void *argp1 = 0 ;
  63484. - int res1 = 0 ;
  63485. - PyObject * obj0 = 0 ;
  63486. - double result;
  63487. -
  63488. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_avg",&obj0)) SWIG_fail;
  63489. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63490. - if (!SWIG_IsOK(res1)) {
  63491. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_avg" "', argument " "1"" of type '" "vips::VImage *""'");
  63492. - }
  63493. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63494. - try {
  63495. - result = (double)(arg1)->avg();
  63496. - }
  63497. - catch(vips::VError &_e) {
  63498. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63499. - }
  63500. -
  63501. - resultobj = SWIG_From_double(static_cast< double >(result));
  63502. - return resultobj;
  63503. -fail:
  63504. - return NULL;
  63505. -}
  63506. -
  63507. -
  63508. -SWIGINTERN PyObject *_wrap_VImage_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63509. - PyObject *resultobj = 0;
  63510. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63511. - char *arg2 = (char *) 0 ;
  63512. - double arg3 ;
  63513. - double arg4 ;
  63514. - int arg5 ;
  63515. - void *argp1 = 0 ;
  63516. - int res1 = 0 ;
  63517. - int res2 ;
  63518. - char *buf2 = 0 ;
  63519. - int alloc2 = 0 ;
  63520. - double val3 ;
  63521. - int ecode3 = 0 ;
  63522. - double val4 ;
  63523. - int ecode4 = 0 ;
  63524. - int val5 ;
  63525. - int ecode5 = 0 ;
  63526. - PyObject * obj0 = 0 ;
  63527. - PyObject * obj1 = 0 ;
  63528. - PyObject * obj2 = 0 ;
  63529. - PyObject * obj3 = 0 ;
  63530. - PyObject * obj4 = 0 ;
  63531. - double result;
  63532. -
  63533. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_point",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  63534. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63535. - if (!SWIG_IsOK(res1)) {
  63536. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point" "', argument " "1"" of type '" "vips::VImage *""'");
  63537. - }
  63538. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63539. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  63540. - if (!SWIG_IsOK(res2)) {
  63541. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_point" "', argument " "2"" of type '" "char *""'");
  63542. - }
  63543. - arg2 = reinterpret_cast< char * >(buf2);
  63544. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  63545. - if (!SWIG_IsOK(ecode3)) {
  63546. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point" "', argument " "3"" of type '" "double""'");
  63547. - }
  63548. - arg3 = static_cast< double >(val3);
  63549. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  63550. - if (!SWIG_IsOK(ecode4)) {
  63551. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point" "', argument " "4"" of type '" "double""'");
  63552. - }
  63553. - arg4 = static_cast< double >(val4);
  63554. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  63555. - if (!SWIG_IsOK(ecode5)) {
  63556. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_point" "', argument " "5"" of type '" "int""'");
  63557. - }
  63558. - arg5 = static_cast< int >(val5);
  63559. - try {
  63560. - result = (double)(arg1)->point(arg2,arg3,arg4,arg5);
  63561. - }
  63562. - catch(vips::VError &_e) {
  63563. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63564. - }
  63565. -
  63566. - resultobj = SWIG_From_double(static_cast< double >(result));
  63567. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  63568. - return resultobj;
  63569. -fail:
  63570. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  63571. - return NULL;
  63572. -}
  63573. -
  63574. -
  63575. -SWIGINTERN PyObject *_wrap_VImage_point_bilinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63576. - PyObject *resultobj = 0;
  63577. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63578. - double arg2 ;
  63579. - double arg3 ;
  63580. - int arg4 ;
  63581. - void *argp1 = 0 ;
  63582. - int res1 = 0 ;
  63583. - double val2 ;
  63584. - int ecode2 = 0 ;
  63585. - double val3 ;
  63586. - int ecode3 = 0 ;
  63587. - int val4 ;
  63588. - int ecode4 = 0 ;
  63589. - PyObject * obj0 = 0 ;
  63590. - PyObject * obj1 = 0 ;
  63591. - PyObject * obj2 = 0 ;
  63592. - PyObject * obj3 = 0 ;
  63593. - double result;
  63594. -
  63595. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_point_bilinear",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  63596. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63597. - if (!SWIG_IsOK(res1)) {
  63598. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point_bilinear" "', argument " "1"" of type '" "vips::VImage *""'");
  63599. - }
  63600. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63601. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  63602. - if (!SWIG_IsOK(ecode2)) {
  63603. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_point_bilinear" "', argument " "2"" of type '" "double""'");
  63604. - }
  63605. - arg2 = static_cast< double >(val2);
  63606. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  63607. - if (!SWIG_IsOK(ecode3)) {
  63608. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point_bilinear" "', argument " "3"" of type '" "double""'");
  63609. - }
  63610. - arg3 = static_cast< double >(val3);
  63611. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  63612. - if (!SWIG_IsOK(ecode4)) {
  63613. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point_bilinear" "', argument " "4"" of type '" "int""'");
  63614. - }
  63615. - arg4 = static_cast< int >(val4);
  63616. - try {
  63617. - result = (double)(arg1)->point_bilinear(arg2,arg3,arg4);
  63618. - }
  63619. - catch(vips::VError &_e) {
  63620. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63621. - }
  63622. -
  63623. - resultobj = SWIG_From_double(static_cast< double >(result));
  63624. - return resultobj;
  63625. -fail:
  63626. - return NULL;
  63627. -}
  63628. -
  63629. -
  63630. -SWIGINTERN PyObject *_wrap_VImage_bandmean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63631. - PyObject *resultobj = 0;
  63632. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63633. - void *argp1 = 0 ;
  63634. - int res1 = 0 ;
  63635. - PyObject * obj0 = 0 ;
  63636. - vips::VImage result;
  63637. -
  63638. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_bandmean",&obj0)) SWIG_fail;
  63639. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63640. - if (!SWIG_IsOK(res1)) {
  63641. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandmean" "', argument " "1"" of type '" "vips::VImage *""'");
  63642. - }
  63643. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63644. - try {
  63645. - result = (arg1)->bandmean();
  63646. - }
  63647. - catch(vips::VError &_e) {
  63648. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63649. - }
  63650. -
  63651. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63652. - return resultobj;
  63653. -fail:
  63654. - return NULL;
  63655. -}
  63656. -
  63657. -
  63658. -SWIGINTERN PyObject *_wrap_VImage_ceil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63659. - PyObject *resultobj = 0;
  63660. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63661. - void *argp1 = 0 ;
  63662. - int res1 = 0 ;
  63663. - PyObject * obj0 = 0 ;
  63664. - vips::VImage result;
  63665. -
  63666. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ceil",&obj0)) SWIG_fail;
  63667. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63668. - if (!SWIG_IsOK(res1)) {
  63669. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ceil" "', argument " "1"" of type '" "vips::VImage *""'");
  63670. - }
  63671. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63672. - try {
  63673. - result = (arg1)->ceil();
  63674. - }
  63675. - catch(vips::VError &_e) {
  63676. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63677. - }
  63678. -
  63679. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63680. - return resultobj;
  63681. -fail:
  63682. - return NULL;
  63683. -}
  63684. -
  63685. -
  63686. -SWIGINTERN PyObject *_wrap_VImage_cos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63687. - PyObject *resultobj = 0;
  63688. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63689. - void *argp1 = 0 ;
  63690. - int res1 = 0 ;
  63691. - PyObject * obj0 = 0 ;
  63692. - vips::VImage result;
  63693. -
  63694. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_cos",&obj0)) SWIG_fail;
  63695. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63696. - if (!SWIG_IsOK(res1)) {
  63697. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cos" "', argument " "1"" of type '" "vips::VImage *""'");
  63698. - }
  63699. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63700. - try {
  63701. - result = (arg1)->cos();
  63702. - }
  63703. - catch(vips::VError &_e) {
  63704. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63705. - }
  63706. -
  63707. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63708. - return resultobj;
  63709. -fail:
  63710. - return NULL;
  63711. -}
  63712. -
  63713. -
  63714. -SWIGINTERN PyObject *_wrap_VImage_cross_phase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63715. - PyObject *resultobj = 0;
  63716. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63717. - vips::VImage arg2 ;
  63718. - void *argp1 = 0 ;
  63719. - int res1 = 0 ;
  63720. - void *argp2 ;
  63721. - int res2 = 0 ;
  63722. - PyObject * obj0 = 0 ;
  63723. - PyObject * obj1 = 0 ;
  63724. - vips::VImage result;
  63725. -
  63726. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cross_phase",&obj0,&obj1)) SWIG_fail;
  63727. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63728. - if (!SWIG_IsOK(res1)) {
  63729. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cross_phase" "', argument " "1"" of type '" "vips::VImage *""'");
  63730. - }
  63731. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63732. - {
  63733. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  63734. - if (!SWIG_IsOK(res2)) {
  63735. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'");
  63736. - }
  63737. - if (!argp2) {
  63738. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'");
  63739. - } else {
  63740. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  63741. - arg2 = *temp;
  63742. - if (SWIG_IsNewObj(res2)) delete temp;
  63743. - }
  63744. - }
  63745. - try {
  63746. - result = (arg1)->cross_phase(arg2);
  63747. - }
  63748. - catch(vips::VError &_e) {
  63749. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63750. - }
  63751. -
  63752. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63753. - return resultobj;
  63754. -fail:
  63755. - return NULL;
  63756. -}
  63757. -
  63758. -
  63759. -SWIGINTERN PyObject *_wrap_VImage_deviate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63760. - PyObject *resultobj = 0;
  63761. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63762. - void *argp1 = 0 ;
  63763. - int res1 = 0 ;
  63764. - PyObject * obj0 = 0 ;
  63765. - double result;
  63766. -
  63767. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_deviate",&obj0)) SWIG_fail;
  63768. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63769. - if (!SWIG_IsOK(res1)) {
  63770. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_deviate" "', argument " "1"" of type '" "vips::VImage *""'");
  63771. - }
  63772. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63773. - try {
  63774. - result = (double)(arg1)->deviate();
  63775. - }
  63776. - catch(vips::VError &_e) {
  63777. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63778. - }
  63779. -
  63780. - resultobj = SWIG_From_double(static_cast< double >(result));
  63781. - return resultobj;
  63782. -fail:
  63783. - return NULL;
  63784. -}
  63785. -
  63786. -
  63787. -SWIGINTERN PyObject *_wrap_VImage_divide(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63788. - PyObject *resultobj = 0;
  63789. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63790. - vips::VImage arg2 ;
  63791. - void *argp1 = 0 ;
  63792. - int res1 = 0 ;
  63793. - void *argp2 ;
  63794. - int res2 = 0 ;
  63795. - PyObject * obj0 = 0 ;
  63796. - PyObject * obj1 = 0 ;
  63797. - vips::VImage result;
  63798. -
  63799. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_divide",&obj0,&obj1)) SWIG_fail;
  63800. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63801. - if (!SWIG_IsOK(res1)) {
  63802. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_divide" "', argument " "1"" of type '" "vips::VImage *""'");
  63803. - }
  63804. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63805. - {
  63806. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  63807. - if (!SWIG_IsOK(res2)) {
  63808. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'");
  63809. - }
  63810. - if (!argp2) {
  63811. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'");
  63812. - } else {
  63813. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  63814. - arg2 = *temp;
  63815. - if (SWIG_IsNewObj(res2)) delete temp;
  63816. - }
  63817. - }
  63818. - try {
  63819. - result = (arg1)->divide(arg2);
  63820. - }
  63821. - catch(vips::VError &_e) {
  63822. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63823. - }
  63824. -
  63825. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63826. - return resultobj;
  63827. -fail:
  63828. - return NULL;
  63829. -}
  63830. -
  63831. -
  63832. -SWIGINTERN PyObject *_wrap_VImage_exp10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63833. - PyObject *resultobj = 0;
  63834. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63835. - void *argp1 = 0 ;
  63836. - int res1 = 0 ;
  63837. - PyObject * obj0 = 0 ;
  63838. - vips::VImage result;
  63839. -
  63840. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp10",&obj0)) SWIG_fail;
  63841. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63842. - if (!SWIG_IsOK(res1)) {
  63843. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp10" "', argument " "1"" of type '" "vips::VImage *""'");
  63844. - }
  63845. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63846. - try {
  63847. - result = (arg1)->exp10();
  63848. - }
  63849. - catch(vips::VError &_e) {
  63850. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63851. - }
  63852. -
  63853. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63854. - return resultobj;
  63855. -fail:
  63856. - return NULL;
  63857. -}
  63858. -
  63859. -
  63860. -SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63861. - PyObject *resultobj = 0;
  63862. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63863. - double arg2 ;
  63864. - void *argp1 = 0 ;
  63865. - int res1 = 0 ;
  63866. - double val2 ;
  63867. - int ecode2 = 0 ;
  63868. - PyObject * obj0 = 0 ;
  63869. - PyObject * obj1 = 0 ;
  63870. - vips::VImage result;
  63871. -
  63872. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail;
  63873. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63874. - if (!SWIG_IsOK(res1)) {
  63875. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'");
  63876. - }
  63877. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63878. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  63879. - if (!SWIG_IsOK(ecode2)) {
  63880. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_expn" "', argument " "2"" of type '" "double""'");
  63881. - }
  63882. - arg2 = static_cast< double >(val2);
  63883. - try {
  63884. - result = (arg1)->expn(arg2);
  63885. - }
  63886. - catch(vips::VError &_e) {
  63887. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63888. - }
  63889. -
  63890. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63891. - return resultobj;
  63892. -fail:
  63893. - return NULL;
  63894. -}
  63895. -
  63896. -
  63897. -SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63898. - PyObject *resultobj = 0;
  63899. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63900. - std::vector< double,std::allocator< double > > arg2 ;
  63901. - void *argp1 = 0 ;
  63902. - int res1 = 0 ;
  63903. - PyObject * obj0 = 0 ;
  63904. - PyObject * obj1 = 0 ;
  63905. - vips::VImage result;
  63906. -
  63907. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail;
  63908. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63909. - if (!SWIG_IsOK(res1)) {
  63910. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'");
  63911. - }
  63912. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63913. - {
  63914. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  63915. - int res = swig::asptr(obj1, &ptr);
  63916. - if (!SWIG_IsOK(res) || !ptr) {
  63917. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_expn" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  63918. - }
  63919. - arg2 = *ptr;
  63920. - if (SWIG_IsNewObj(res)) delete ptr;
  63921. - }
  63922. - try {
  63923. - result = (arg1)->expn(arg2);
  63924. - }
  63925. - catch(vips::VError &_e) {
  63926. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  63927. - }
  63928. -
  63929. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  63930. - return resultobj;
  63931. -fail:
  63932. - return NULL;
  63933. -}
  63934. -
  63935. -
  63936. -SWIGINTERN PyObject *_wrap_VImage_expn(PyObject *self, PyObject *args) {
  63937. - int argc;
  63938. - PyObject *argv[3];
  63939. - int ii;
  63940. -
  63941. - if (!PyTuple_Check(args)) SWIG_fail;
  63942. - argc = args ? (int)PyObject_Length(args) : 0;
  63943. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  63944. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  63945. - }
  63946. - if (argc == 2) {
  63947. - int _v;
  63948. - void *vptr = 0;
  63949. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63950. - _v = SWIG_CheckState(res);
  63951. - if (_v) {
  63952. - {
  63953. - int res = SWIG_AsVal_double(argv[1], NULL);
  63954. - _v = SWIG_CheckState(res);
  63955. - }
  63956. - if (_v) {
  63957. - return _wrap_VImage_expn__SWIG_0(self, args);
  63958. - }
  63959. - }
  63960. - }
  63961. - if (argc == 2) {
  63962. - int _v;
  63963. - void *vptr = 0;
  63964. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  63965. - _v = SWIG_CheckState(res);
  63966. - if (_v) {
  63967. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  63968. - _v = SWIG_CheckState(res);
  63969. - if (_v) {
  63970. - return _wrap_VImage_expn__SWIG_1(self, args);
  63971. - }
  63972. - }
  63973. - }
  63974. -
  63975. -fail:
  63976. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_expn'.\n"
  63977. - " Possible C/C++ prototypes are:\n"
  63978. - " vips::VImage::expn(double)\n"
  63979. - " vips::VImage::expn(std::vector< double,std::allocator< double > >)\n");
  63980. - return 0;
  63981. -}
  63982. -
  63983. -
  63984. -SWIGINTERN PyObject *_wrap_VImage_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  63985. - PyObject *resultobj = 0;
  63986. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  63987. - void *argp1 = 0 ;
  63988. - int res1 = 0 ;
  63989. - PyObject * obj0 = 0 ;
  63990. - vips::VImage result;
  63991. -
  63992. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp",&obj0)) SWIG_fail;
  63993. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  63994. - if (!SWIG_IsOK(res1)) {
  63995. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp" "', argument " "1"" of type '" "vips::VImage *""'");
  63996. - }
  63997. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  63998. - try {
  63999. - result = (arg1)->exp();
  64000. - }
  64001. - catch(vips::VError &_e) {
  64002. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64003. - }
  64004. -
  64005. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64006. - return resultobj;
  64007. -fail:
  64008. - return NULL;
  64009. -}
  64010. -
  64011. -
  64012. -SWIGINTERN PyObject *_wrap_VImage_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64013. - PyObject *resultobj = 0;
  64014. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64015. - void *argp1 = 0 ;
  64016. - int res1 = 0 ;
  64017. - PyObject * obj0 = 0 ;
  64018. - vips::VImage result;
  64019. -
  64020. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_floor",&obj0)) SWIG_fail;
  64021. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64022. - if (!SWIG_IsOK(res1)) {
  64023. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_floor" "', argument " "1"" of type '" "vips::VImage *""'");
  64024. - }
  64025. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64026. - try {
  64027. - result = (arg1)->floor();
  64028. - }
  64029. - catch(vips::VError &_e) {
  64030. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64031. - }
  64032. -
  64033. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64034. - return resultobj;
  64035. -fail:
  64036. - return NULL;
  64037. -}
  64038. -
  64039. -
  64040. -SWIGINTERN PyObject *_wrap_VImage_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64041. - PyObject *resultobj = 0;
  64042. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64043. - void *argp1 = 0 ;
  64044. - int res1 = 0 ;
  64045. - PyObject * obj0 = 0 ;
  64046. - vips::VImage result;
  64047. -
  64048. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invert",&obj0)) SWIG_fail;
  64049. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64050. - if (!SWIG_IsOK(res1)) {
  64051. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invert" "', argument " "1"" of type '" "vips::VImage *""'");
  64052. - }
  64053. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64054. - try {
  64055. - result = (arg1)->invert();
  64056. - }
  64057. - catch(vips::VError &_e) {
  64058. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64059. - }
  64060. -
  64061. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64062. - return resultobj;
  64063. -fail:
  64064. - return NULL;
  64065. -}
  64066. -
  64067. -
  64068. -SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64069. - PyObject *resultobj = 0;
  64070. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64071. - double arg2 ;
  64072. - double arg3 ;
  64073. - void *argp1 = 0 ;
  64074. - int res1 = 0 ;
  64075. - double val2 ;
  64076. - int ecode2 = 0 ;
  64077. - double val3 ;
  64078. - int ecode3 = 0 ;
  64079. - PyObject * obj0 = 0 ;
  64080. - PyObject * obj1 = 0 ;
  64081. - PyObject * obj2 = 0 ;
  64082. - vips::VImage result;
  64083. -
  64084. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail;
  64085. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64086. - if (!SWIG_IsOK(res1)) {
  64087. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'");
  64088. - }
  64089. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64090. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  64091. - if (!SWIG_IsOK(ecode2)) {
  64092. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lin" "', argument " "2"" of type '" "double""'");
  64093. - }
  64094. - arg2 = static_cast< double >(val2);
  64095. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  64096. - if (!SWIG_IsOK(ecode3)) {
  64097. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lin" "', argument " "3"" of type '" "double""'");
  64098. - }
  64099. - arg3 = static_cast< double >(val3);
  64100. - try {
  64101. - result = (arg1)->lin(arg2,arg3);
  64102. - }
  64103. - catch(vips::VError &_e) {
  64104. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64105. - }
  64106. -
  64107. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64108. - return resultobj;
  64109. -fail:
  64110. - return NULL;
  64111. -}
  64112. -
  64113. -
  64114. -SWIGINTERN PyObject *_wrap_VImage_linreg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64115. - PyObject *resultobj = 0;
  64116. - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
  64117. - std::vector< double,std::allocator< double > > arg2 ;
  64118. - PyObject * obj0 = 0 ;
  64119. - PyObject * obj1 = 0 ;
  64120. - vips::VImage result;
  64121. -
  64122. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_linreg",&obj0,&obj1)) SWIG_fail;
  64123. - {
  64124. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  64125. - int res = swig::asptr(obj0, &ptr);
  64126. - if (!SWIG_IsOK(res) || !ptr) {
  64127. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
  64128. - }
  64129. - arg1 = *ptr;
  64130. - if (SWIG_IsNewObj(res)) delete ptr;
  64131. - }
  64132. - {
  64133. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  64134. - int res = swig::asptr(obj1, &ptr);
  64135. - if (!SWIG_IsOK(res) || !ptr) {
  64136. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  64137. - }
  64138. - arg2 = *ptr;
  64139. - if (SWIG_IsNewObj(res)) delete ptr;
  64140. - }
  64141. - try {
  64142. - result = vips::VImage::linreg(arg1,arg2);
  64143. - }
  64144. - catch(vips::VError &_e) {
  64145. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64146. - }
  64147. -
  64148. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64149. - return resultobj;
  64150. -fail:
  64151. - return NULL;
  64152. -}
  64153. -
  64154. -
  64155. -SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64156. - PyObject *resultobj = 0;
  64157. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64158. - std::vector< double,std::allocator< double > > arg2 ;
  64159. - std::vector< double,std::allocator< double > > arg3 ;
  64160. - void *argp1 = 0 ;
  64161. - int res1 = 0 ;
  64162. - PyObject * obj0 = 0 ;
  64163. - PyObject * obj1 = 0 ;
  64164. - PyObject * obj2 = 0 ;
  64165. - vips::VImage result;
  64166. -
  64167. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail;
  64168. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64169. - if (!SWIG_IsOK(res1)) {
  64170. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'");
  64171. - }
  64172. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64173. - {
  64174. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  64175. - int res = swig::asptr(obj1, &ptr);
  64176. - if (!SWIG_IsOK(res) || !ptr) {
  64177. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  64178. - }
  64179. - arg2 = *ptr;
  64180. - if (SWIG_IsNewObj(res)) delete ptr;
  64181. - }
  64182. - {
  64183. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  64184. - int res = swig::asptr(obj2, &ptr);
  64185. - if (!SWIG_IsOK(res) || !ptr) {
  64186. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > >""'");
  64187. - }
  64188. - arg3 = *ptr;
  64189. - if (SWIG_IsNewObj(res)) delete ptr;
  64190. - }
  64191. - try {
  64192. - result = (arg1)->lin(arg2,arg3);
  64193. - }
  64194. - catch(vips::VError &_e) {
  64195. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64196. - }
  64197. -
  64198. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64199. - return resultobj;
  64200. -fail:
  64201. - return NULL;
  64202. -}
  64203. -
  64204. -
  64205. -SWIGINTERN PyObject *_wrap_VImage_lin(PyObject *self, PyObject *args) {
  64206. - int argc;
  64207. - PyObject *argv[4];
  64208. - int ii;
  64209. -
  64210. - if (!PyTuple_Check(args)) SWIG_fail;
  64211. - argc = args ? (int)PyObject_Length(args) : 0;
  64212. - for (ii = 0; (ii < 3) && (ii < argc); ii++) {
  64213. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  64214. - }
  64215. - if (argc == 3) {
  64216. - int _v;
  64217. - void *vptr = 0;
  64218. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64219. - _v = SWIG_CheckState(res);
  64220. - if (_v) {
  64221. - {
  64222. - int res = SWIG_AsVal_double(argv[1], NULL);
  64223. - _v = SWIG_CheckState(res);
  64224. - }
  64225. - if (_v) {
  64226. - {
  64227. - int res = SWIG_AsVal_double(argv[2], NULL);
  64228. - _v = SWIG_CheckState(res);
  64229. - }
  64230. - if (_v) {
  64231. - return _wrap_VImage_lin__SWIG_0(self, args);
  64232. - }
  64233. - }
  64234. - }
  64235. - }
  64236. - if (argc == 3) {
  64237. - int _v;
  64238. - void *vptr = 0;
  64239. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64240. - _v = SWIG_CheckState(res);
  64241. - if (_v) {
  64242. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  64243. - _v = SWIG_CheckState(res);
  64244. - if (_v) {
  64245. - int res = swig::asptr(argv[2], (std::vector<double,std::allocator< double > >**)(0));
  64246. - _v = SWIG_CheckState(res);
  64247. - if (_v) {
  64248. - return _wrap_VImage_lin__SWIG_1(self, args);
  64249. - }
  64250. - }
  64251. - }
  64252. - }
  64253. -
  64254. -fail:
  64255. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lin'.\n"
  64256. - " Possible C/C++ prototypes are:\n"
  64257. - " vips::VImage::lin(double,double)\n"
  64258. - " vips::VImage::lin(std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > >)\n");
  64259. - return 0;
  64260. -}
  64261. -
  64262. -
  64263. -SWIGINTERN PyObject *_wrap_VImage_log10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64264. - PyObject *resultobj = 0;
  64265. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64266. - void *argp1 = 0 ;
  64267. - int res1 = 0 ;
  64268. - PyObject * obj0 = 0 ;
  64269. - vips::VImage result;
  64270. -
  64271. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_log10",&obj0)) SWIG_fail;
  64272. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64273. - if (!SWIG_IsOK(res1)) {
  64274. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log10" "', argument " "1"" of type '" "vips::VImage *""'");
  64275. - }
  64276. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64277. - try {
  64278. - result = (arg1)->log10();
  64279. - }
  64280. - catch(vips::VError &_e) {
  64281. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64282. - }
  64283. -
  64284. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64285. - return resultobj;
  64286. -fail:
  64287. - return NULL;
  64288. -}
  64289. -
  64290. -
  64291. -SWIGINTERN PyObject *_wrap_VImage_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64292. - PyObject *resultobj = 0;
  64293. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64294. - void *argp1 = 0 ;
  64295. - int res1 = 0 ;
  64296. - PyObject * obj0 = 0 ;
  64297. - vips::VImage result;
  64298. -
  64299. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_log",&obj0)) SWIG_fail;
  64300. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64301. - if (!SWIG_IsOK(res1)) {
  64302. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log" "', argument " "1"" of type '" "vips::VImage *""'");
  64303. - }
  64304. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64305. - try {
  64306. - result = (arg1)->log();
  64307. - }
  64308. - catch(vips::VError &_e) {
  64309. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64310. - }
  64311. -
  64312. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64313. - return resultobj;
  64314. -fail:
  64315. - return NULL;
  64316. -}
  64317. -
  64318. -
  64319. -SWIGINTERN PyObject *_wrap_VImage_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64320. - PyObject *resultobj = 0;
  64321. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64322. - void *argp1 = 0 ;
  64323. - int res1 = 0 ;
  64324. - PyObject * obj0 = 0 ;
  64325. - double result;
  64326. -
  64327. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_max",&obj0)) SWIG_fail;
  64328. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64329. - if (!SWIG_IsOK(res1)) {
  64330. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_max" "', argument " "1"" of type '" "vips::VImage *""'");
  64331. - }
  64332. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64333. - try {
  64334. - result = (double)(arg1)->max();
  64335. - }
  64336. - catch(vips::VError &_e) {
  64337. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64338. - }
  64339. -
  64340. - resultobj = SWIG_From_double(static_cast< double >(result));
  64341. - return resultobj;
  64342. -fail:
  64343. - return NULL;
  64344. -}
  64345. -
  64346. -
  64347. -SWIGINTERN PyObject *_wrap_VImage_maxpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64348. - PyObject *resultobj = 0;
  64349. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64350. - void *argp1 = 0 ;
  64351. - int res1 = 0 ;
  64352. - PyObject * obj0 = 0 ;
  64353. - std::complex< double > result;
  64354. -
  64355. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos",&obj0)) SWIG_fail;
  64356. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64357. - if (!SWIG_IsOK(res1)) {
  64358. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos" "', argument " "1"" of type '" "vips::VImage *""'");
  64359. - }
  64360. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64361. - try {
  64362. - result = (arg1)->maxpos();
  64363. - }
  64364. - catch(vips::VError &_e) {
  64365. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64366. - }
  64367. -
  64368. - resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  64369. - return resultobj;
  64370. -fail:
  64371. - return NULL;
  64372. -}
  64373. -
  64374. -
  64375. -SWIGINTERN PyObject *_wrap_VImage_maxpos_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64376. - PyObject *resultobj = 0;
  64377. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64378. - double *arg2 = 0 ;
  64379. - double *arg3 = 0 ;
  64380. - void *argp1 = 0 ;
  64381. - int res1 = 0 ;
  64382. - double temp2 ;
  64383. - int res2 = SWIG_TMPOBJ ;
  64384. - double temp3 ;
  64385. - int res3 = SWIG_TMPOBJ ;
  64386. - PyObject * obj0 = 0 ;
  64387. - double result;
  64388. -
  64389. - arg2 = &temp2;
  64390. - arg3 = &temp3;
  64391. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_avg",&obj0)) SWIG_fail;
  64392. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64393. - if (!SWIG_IsOK(res1)) {
  64394. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_avg" "', argument " "1"" of type '" "vips::VImage *""'");
  64395. - }
  64396. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64397. - try {
  64398. - result = (double)(arg1)->maxpos_avg(*arg2,*arg3);
  64399. - }
  64400. - catch(vips::VError &_e) {
  64401. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64402. - }
  64403. -
  64404. - resultobj = SWIG_From_double(static_cast< double >(result));
  64405. - if (SWIG_IsTmpObj(res2)) {
  64406. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  64407. - } else {
  64408. - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  64409. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  64410. - }
  64411. - if (SWIG_IsTmpObj(res3)) {
  64412. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  64413. - } else {
  64414. - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  64415. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  64416. - }
  64417. - return resultobj;
  64418. -fail:
  64419. - return NULL;
  64420. -}
  64421. -
  64422. -
  64423. -SWIGINTERN PyObject *_wrap_VImage_measure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64424. - PyObject *resultobj = 0;
  64425. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64426. - int arg2 ;
  64427. - int arg3 ;
  64428. - int arg4 ;
  64429. - int arg5 ;
  64430. - int arg6 ;
  64431. - int arg7 ;
  64432. - void *argp1 = 0 ;
  64433. - int res1 = 0 ;
  64434. - int val2 ;
  64435. - int ecode2 = 0 ;
  64436. - int val3 ;
  64437. - int ecode3 = 0 ;
  64438. - int val4 ;
  64439. - int ecode4 = 0 ;
  64440. - int val5 ;
  64441. - int ecode5 = 0 ;
  64442. - int val6 ;
  64443. - int ecode6 = 0 ;
  64444. - int val7 ;
  64445. - int ecode7 = 0 ;
  64446. - PyObject * obj0 = 0 ;
  64447. - PyObject * obj1 = 0 ;
  64448. - PyObject * obj2 = 0 ;
  64449. - PyObject * obj3 = 0 ;
  64450. - PyObject * obj4 = 0 ;
  64451. - PyObject * obj5 = 0 ;
  64452. - PyObject * obj6 = 0 ;
  64453. - vips::VDMask result;
  64454. -
  64455. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_measure",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  64456. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64457. - if (!SWIG_IsOK(res1)) {
  64458. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_measure" "', argument " "1"" of type '" "vips::VImage *""'");
  64459. - }
  64460. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64461. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  64462. - if (!SWIG_IsOK(ecode2)) {
  64463. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_measure" "', argument " "2"" of type '" "int""'");
  64464. - }
  64465. - arg2 = static_cast< int >(val2);
  64466. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  64467. - if (!SWIG_IsOK(ecode3)) {
  64468. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_measure" "', argument " "3"" of type '" "int""'");
  64469. - }
  64470. - arg3 = static_cast< int >(val3);
  64471. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  64472. - if (!SWIG_IsOK(ecode4)) {
  64473. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_measure" "', argument " "4"" of type '" "int""'");
  64474. - }
  64475. - arg4 = static_cast< int >(val4);
  64476. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  64477. - if (!SWIG_IsOK(ecode5)) {
  64478. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_measure" "', argument " "5"" of type '" "int""'");
  64479. - }
  64480. - arg5 = static_cast< int >(val5);
  64481. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  64482. - if (!SWIG_IsOK(ecode6)) {
  64483. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_measure" "', argument " "6"" of type '" "int""'");
  64484. - }
  64485. - arg6 = static_cast< int >(val6);
  64486. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  64487. - if (!SWIG_IsOK(ecode7)) {
  64488. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_measure" "', argument " "7"" of type '" "int""'");
  64489. - }
  64490. - arg7 = static_cast< int >(val7);
  64491. - try {
  64492. - result = (arg1)->measure(arg2,arg3,arg4,arg5,arg6,arg7);
  64493. - }
  64494. - catch(vips::VError &_e) {
  64495. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64496. - }
  64497. -
  64498. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  64499. - return resultobj;
  64500. -fail:
  64501. - return NULL;
  64502. -}
  64503. -
  64504. -
  64505. -SWIGINTERN PyObject *_wrap_VImage_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64506. - PyObject *resultobj = 0;
  64507. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64508. - void *argp1 = 0 ;
  64509. - int res1 = 0 ;
  64510. - PyObject * obj0 = 0 ;
  64511. - double result;
  64512. -
  64513. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_min",&obj0)) SWIG_fail;
  64514. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64515. - if (!SWIG_IsOK(res1)) {
  64516. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_min" "', argument " "1"" of type '" "vips::VImage *""'");
  64517. - }
  64518. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64519. - try {
  64520. - result = (double)(arg1)->min();
  64521. - }
  64522. - catch(vips::VError &_e) {
  64523. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64524. - }
  64525. -
  64526. - resultobj = SWIG_From_double(static_cast< double >(result));
  64527. - return resultobj;
  64528. -fail:
  64529. - return NULL;
  64530. -}
  64531. -
  64532. -
  64533. -SWIGINTERN PyObject *_wrap_VImage_minpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64534. - PyObject *resultobj = 0;
  64535. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64536. - void *argp1 = 0 ;
  64537. - int res1 = 0 ;
  64538. - PyObject * obj0 = 0 ;
  64539. - std::complex< double > result;
  64540. -
  64541. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_minpos",&obj0)) SWIG_fail;
  64542. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64543. - if (!SWIG_IsOK(res1)) {
  64544. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_minpos" "', argument " "1"" of type '" "vips::VImage *""'");
  64545. - }
  64546. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64547. - try {
  64548. - result = (arg1)->minpos();
  64549. - }
  64550. - catch(vips::VError &_e) {
  64551. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64552. - }
  64553. -
  64554. - resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  64555. - return resultobj;
  64556. -fail:
  64557. - return NULL;
  64558. -}
  64559. -
  64560. -
  64561. -SWIGINTERN PyObject *_wrap_VImage_multiply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64562. - PyObject *resultobj = 0;
  64563. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64564. - vips::VImage arg2 ;
  64565. - void *argp1 = 0 ;
  64566. - int res1 = 0 ;
  64567. - void *argp2 ;
  64568. - int res2 = 0 ;
  64569. - PyObject * obj0 = 0 ;
  64570. - PyObject * obj1 = 0 ;
  64571. - vips::VImage result;
  64572. -
  64573. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_multiply",&obj0,&obj1)) SWIG_fail;
  64574. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64575. - if (!SWIG_IsOK(res1)) {
  64576. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_multiply" "', argument " "1"" of type '" "vips::VImage *""'");
  64577. - }
  64578. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64579. - {
  64580. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  64581. - if (!SWIG_IsOK(res2)) {
  64582. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'");
  64583. - }
  64584. - if (!argp2) {
  64585. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'");
  64586. - } else {
  64587. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  64588. - arg2 = *temp;
  64589. - if (SWIG_IsNewObj(res2)) delete temp;
  64590. - }
  64591. - }
  64592. - try {
  64593. - result = (arg1)->multiply(arg2);
  64594. - }
  64595. - catch(vips::VError &_e) {
  64596. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64597. - }
  64598. -
  64599. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64600. - return resultobj;
  64601. -fail:
  64602. - return NULL;
  64603. -}
  64604. -
  64605. -
  64606. -SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64607. - PyObject *resultobj = 0;
  64608. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64609. - double arg2 ;
  64610. - void *argp1 = 0 ;
  64611. - int res1 = 0 ;
  64612. - double val2 ;
  64613. - int ecode2 = 0 ;
  64614. - PyObject * obj0 = 0 ;
  64615. - PyObject * obj1 = 0 ;
  64616. - vips::VImage result;
  64617. -
  64618. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail;
  64619. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64620. - if (!SWIG_IsOK(res1)) {
  64621. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'");
  64622. - }
  64623. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64624. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  64625. - if (!SWIG_IsOK(ecode2)) {
  64626. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_pow" "', argument " "2"" of type '" "double""'");
  64627. - }
  64628. - arg2 = static_cast< double >(val2);
  64629. - try {
  64630. - result = (arg1)->pow(arg2);
  64631. - }
  64632. - catch(vips::VError &_e) {
  64633. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64634. - }
  64635. -
  64636. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64637. - return resultobj;
  64638. -fail:
  64639. - return NULL;
  64640. -}
  64641. -
  64642. -
  64643. -SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64644. - PyObject *resultobj = 0;
  64645. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64646. - std::vector< double,std::allocator< double > > arg2 ;
  64647. - void *argp1 = 0 ;
  64648. - int res1 = 0 ;
  64649. - PyObject * obj0 = 0 ;
  64650. - PyObject * obj1 = 0 ;
  64651. - vips::VImage result;
  64652. -
  64653. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail;
  64654. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64655. - if (!SWIG_IsOK(res1)) {
  64656. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'");
  64657. - }
  64658. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64659. - {
  64660. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  64661. - int res = swig::asptr(obj1, &ptr);
  64662. - if (!SWIG_IsOK(res) || !ptr) {
  64663. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_pow" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  64664. - }
  64665. - arg2 = *ptr;
  64666. - if (SWIG_IsNewObj(res)) delete ptr;
  64667. - }
  64668. - try {
  64669. - result = (arg1)->pow(arg2);
  64670. - }
  64671. - catch(vips::VError &_e) {
  64672. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64673. - }
  64674. -
  64675. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64676. - return resultobj;
  64677. -fail:
  64678. - return NULL;
  64679. -}
  64680. -
  64681. -
  64682. -SWIGINTERN PyObject *_wrap_VImage_pow(PyObject *self, PyObject *args) {
  64683. - int argc;
  64684. - PyObject *argv[3];
  64685. - int ii;
  64686. -
  64687. - if (!PyTuple_Check(args)) SWIG_fail;
  64688. - argc = args ? (int)PyObject_Length(args) : 0;
  64689. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  64690. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  64691. - }
  64692. - if (argc == 2) {
  64693. - int _v;
  64694. - void *vptr = 0;
  64695. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64696. - _v = SWIG_CheckState(res);
  64697. - if (_v) {
  64698. - {
  64699. - int res = SWIG_AsVal_double(argv[1], NULL);
  64700. - _v = SWIG_CheckState(res);
  64701. - }
  64702. - if (_v) {
  64703. - return _wrap_VImage_pow__SWIG_0(self, args);
  64704. - }
  64705. - }
  64706. - }
  64707. - if (argc == 2) {
  64708. - int _v;
  64709. - void *vptr = 0;
  64710. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64711. - _v = SWIG_CheckState(res);
  64712. - if (_v) {
  64713. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  64714. - _v = SWIG_CheckState(res);
  64715. - if (_v) {
  64716. - return _wrap_VImage_pow__SWIG_1(self, args);
  64717. - }
  64718. - }
  64719. - }
  64720. -
  64721. -fail:
  64722. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_pow'.\n"
  64723. - " Possible C/C++ prototypes are:\n"
  64724. - " vips::VImage::pow(double)\n"
  64725. - " vips::VImage::pow(std::vector< double,std::allocator< double > >)\n");
  64726. - return 0;
  64727. -}
  64728. -
  64729. -
  64730. -SWIGINTERN PyObject *_wrap_VImage_recomb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64731. - PyObject *resultobj = 0;
  64732. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64733. - vips::VDMask arg2 ;
  64734. - void *argp1 = 0 ;
  64735. - int res1 = 0 ;
  64736. - void *argp2 ;
  64737. - int res2 = 0 ;
  64738. - PyObject * obj0 = 0 ;
  64739. - PyObject * obj1 = 0 ;
  64740. - vips::VImage result;
  64741. -
  64742. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_recomb",&obj0,&obj1)) SWIG_fail;
  64743. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64744. - if (!SWIG_IsOK(res1)) {
  64745. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_recomb" "', argument " "1"" of type '" "vips::VImage *""'");
  64746. - }
  64747. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64748. - {
  64749. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  64750. - if (!SWIG_IsOK(res2)) {
  64751. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'");
  64752. - }
  64753. - if (!argp2) {
  64754. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'");
  64755. - } else {
  64756. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  64757. - arg2 = *temp;
  64758. - if (SWIG_IsNewObj(res2)) delete temp;
  64759. - }
  64760. - }
  64761. - try {
  64762. - result = (arg1)->recomb(arg2);
  64763. - }
  64764. - catch(vips::VError &_e) {
  64765. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64766. - }
  64767. -
  64768. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64769. - return resultobj;
  64770. -fail:
  64771. - return NULL;
  64772. -}
  64773. -
  64774. -
  64775. -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64776. - PyObject *resultobj = 0;
  64777. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64778. - vips::VImage arg2 ;
  64779. - void *argp1 = 0 ;
  64780. - int res1 = 0 ;
  64781. - void *argp2 ;
  64782. - int res2 = 0 ;
  64783. - PyObject * obj0 = 0 ;
  64784. - PyObject * obj1 = 0 ;
  64785. - vips::VImage result;
  64786. -
  64787. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
  64788. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64789. - if (!SWIG_IsOK(res1)) {
  64790. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
  64791. - }
  64792. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64793. - {
  64794. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  64795. - if (!SWIG_IsOK(res2)) {
  64796. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'");
  64797. - }
  64798. - if (!argp2) {
  64799. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'");
  64800. - } else {
  64801. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  64802. - arg2 = *temp;
  64803. - if (SWIG_IsNewObj(res2)) delete temp;
  64804. - }
  64805. - }
  64806. - try {
  64807. - result = (arg1)->remainder(arg2);
  64808. - }
  64809. - catch(vips::VError &_e) {
  64810. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64811. - }
  64812. -
  64813. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64814. - return resultobj;
  64815. -fail:
  64816. - return NULL;
  64817. -}
  64818. -
  64819. -
  64820. -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64821. - PyObject *resultobj = 0;
  64822. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64823. - double arg2 ;
  64824. - void *argp1 = 0 ;
  64825. - int res1 = 0 ;
  64826. - double val2 ;
  64827. - int ecode2 = 0 ;
  64828. - PyObject * obj0 = 0 ;
  64829. - PyObject * obj1 = 0 ;
  64830. - vips::VImage result;
  64831. -
  64832. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
  64833. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64834. - if (!SWIG_IsOK(res1)) {
  64835. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
  64836. - }
  64837. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64838. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  64839. - if (!SWIG_IsOK(ecode2)) {
  64840. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "double""'");
  64841. - }
  64842. - arg2 = static_cast< double >(val2);
  64843. - try {
  64844. - result = (arg1)->remainder(arg2);
  64845. - }
  64846. - catch(vips::VError &_e) {
  64847. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64848. - }
  64849. -
  64850. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64851. - return resultobj;
  64852. -fail:
  64853. - return NULL;
  64854. -}
  64855. -
  64856. -
  64857. -SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64858. - PyObject *resultobj = 0;
  64859. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64860. - std::vector< double,std::allocator< double > > arg2 ;
  64861. - void *argp1 = 0 ;
  64862. - int res1 = 0 ;
  64863. - PyObject * obj0 = 0 ;
  64864. - PyObject * obj1 = 0 ;
  64865. - vips::VImage result;
  64866. -
  64867. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail;
  64868. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64869. - if (!SWIG_IsOK(res1)) {
  64870. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'");
  64871. - }
  64872. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64873. - {
  64874. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  64875. - int res = swig::asptr(obj1, &ptr);
  64876. - if (!SWIG_IsOK(res) || !ptr) {
  64877. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_remainder" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  64878. - }
  64879. - arg2 = *ptr;
  64880. - if (SWIG_IsNewObj(res)) delete ptr;
  64881. - }
  64882. - try {
  64883. - result = (arg1)->remainder(arg2);
  64884. - }
  64885. - catch(vips::VError &_e) {
  64886. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64887. - }
  64888. -
  64889. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64890. - return resultobj;
  64891. -fail:
  64892. - return NULL;
  64893. -}
  64894. -
  64895. -
  64896. -SWIGINTERN PyObject *_wrap_VImage_remainder(PyObject *self, PyObject *args) {
  64897. - int argc;
  64898. - PyObject *argv[3];
  64899. - int ii;
  64900. -
  64901. - if (!PyTuple_Check(args)) SWIG_fail;
  64902. - argc = args ? (int)PyObject_Length(args) : 0;
  64903. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  64904. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  64905. - }
  64906. - if (argc == 2) {
  64907. - int _v;
  64908. - void *vptr = 0;
  64909. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64910. - _v = SWIG_CheckState(res);
  64911. - if (_v) {
  64912. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  64913. - _v = SWIG_CheckState(res);
  64914. - if (_v) {
  64915. - return _wrap_VImage_remainder__SWIG_0(self, args);
  64916. - }
  64917. - }
  64918. - }
  64919. - if (argc == 2) {
  64920. - int _v;
  64921. - void *vptr = 0;
  64922. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64923. - _v = SWIG_CheckState(res);
  64924. - if (_v) {
  64925. - {
  64926. - int res = SWIG_AsVal_double(argv[1], NULL);
  64927. - _v = SWIG_CheckState(res);
  64928. - }
  64929. - if (_v) {
  64930. - return _wrap_VImage_remainder__SWIG_1(self, args);
  64931. - }
  64932. - }
  64933. - }
  64934. - if (argc == 2) {
  64935. - int _v;
  64936. - void *vptr = 0;
  64937. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  64938. - _v = SWIG_CheckState(res);
  64939. - if (_v) {
  64940. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  64941. - _v = SWIG_CheckState(res);
  64942. - if (_v) {
  64943. - return _wrap_VImage_remainder__SWIG_2(self, args);
  64944. - }
  64945. - }
  64946. - }
  64947. -
  64948. -fail:
  64949. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_remainder'.\n"
  64950. - " Possible C/C++ prototypes are:\n"
  64951. - " vips::VImage::remainder(vips::VImage)\n"
  64952. - " vips::VImage::remainder(double)\n"
  64953. - " vips::VImage::remainder(std::vector< double,std::allocator< double > >)\n");
  64954. - return 0;
  64955. -}
  64956. -
  64957. -
  64958. -SWIGINTERN PyObject *_wrap_VImage_rint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64959. - PyObject *resultobj = 0;
  64960. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64961. - void *argp1 = 0 ;
  64962. - int res1 = 0 ;
  64963. - PyObject * obj0 = 0 ;
  64964. - vips::VImage result;
  64965. -
  64966. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rint",&obj0)) SWIG_fail;
  64967. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64968. - if (!SWIG_IsOK(res1)) {
  64969. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rint" "', argument " "1"" of type '" "vips::VImage *""'");
  64970. - }
  64971. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  64972. - try {
  64973. - result = (arg1)->rint();
  64974. - }
  64975. - catch(vips::VError &_e) {
  64976. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  64977. - }
  64978. -
  64979. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  64980. - return resultobj;
  64981. -fail:
  64982. - return NULL;
  64983. -}
  64984. -
  64985. -
  64986. -SWIGINTERN PyObject *_wrap_VImage_sign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  64987. - PyObject *resultobj = 0;
  64988. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  64989. - void *argp1 = 0 ;
  64990. - int res1 = 0 ;
  64991. - PyObject * obj0 = 0 ;
  64992. - vips::VImage result;
  64993. -
  64994. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sign",&obj0)) SWIG_fail;
  64995. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  64996. - if (!SWIG_IsOK(res1)) {
  64997. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sign" "', argument " "1"" of type '" "vips::VImage *""'");
  64998. - }
  64999. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65000. - try {
  65001. - result = (arg1)->sign();
  65002. - }
  65003. - catch(vips::VError &_e) {
  65004. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65005. - }
  65006. -
  65007. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65008. - return resultobj;
  65009. -fail:
  65010. - return NULL;
  65011. -}
  65012. -
  65013. -
  65014. -SWIGINTERN PyObject *_wrap_VImage_sin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65015. - PyObject *resultobj = 0;
  65016. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65017. - void *argp1 = 0 ;
  65018. - int res1 = 0 ;
  65019. - PyObject * obj0 = 0 ;
  65020. - vips::VImage result;
  65021. -
  65022. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sin",&obj0)) SWIG_fail;
  65023. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65024. - if (!SWIG_IsOK(res1)) {
  65025. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sin" "', argument " "1"" of type '" "vips::VImage *""'");
  65026. - }
  65027. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65028. - try {
  65029. - result = (arg1)->sin();
  65030. - }
  65031. - catch(vips::VError &_e) {
  65032. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65033. - }
  65034. -
  65035. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65036. - return resultobj;
  65037. -fail:
  65038. - return NULL;
  65039. -}
  65040. -
  65041. -
  65042. -SWIGINTERN PyObject *_wrap_VImage_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65043. - PyObject *resultobj = 0;
  65044. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65045. - void *argp1 = 0 ;
  65046. - int res1 = 0 ;
  65047. - PyObject * obj0 = 0 ;
  65048. - vips::VDMask result;
  65049. -
  65050. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_stats",&obj0)) SWIG_fail;
  65051. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65052. - if (!SWIG_IsOK(res1)) {
  65053. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stats" "', argument " "1"" of type '" "vips::VImage *""'");
  65054. - }
  65055. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65056. - try {
  65057. - result = (arg1)->stats();
  65058. - }
  65059. - catch(vips::VError &_e) {
  65060. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65061. - }
  65062. -
  65063. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  65064. - return resultobj;
  65065. -fail:
  65066. - return NULL;
  65067. -}
  65068. -
  65069. -
  65070. -SWIGINTERN PyObject *_wrap_VImage_subtract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65071. - PyObject *resultobj = 0;
  65072. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65073. - vips::VImage arg2 ;
  65074. - void *argp1 = 0 ;
  65075. - int res1 = 0 ;
  65076. - void *argp2 ;
  65077. - int res2 = 0 ;
  65078. - PyObject * obj0 = 0 ;
  65079. - PyObject * obj1 = 0 ;
  65080. - vips::VImage result;
  65081. -
  65082. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_subtract",&obj0,&obj1)) SWIG_fail;
  65083. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65084. - if (!SWIG_IsOK(res1)) {
  65085. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subtract" "', argument " "1"" of type '" "vips::VImage *""'");
  65086. - }
  65087. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65088. - {
  65089. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  65090. - if (!SWIG_IsOK(res2)) {
  65091. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'");
  65092. - }
  65093. - if (!argp2) {
  65094. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'");
  65095. - } else {
  65096. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  65097. - arg2 = *temp;
  65098. - if (SWIG_IsNewObj(res2)) delete temp;
  65099. - }
  65100. - }
  65101. - try {
  65102. - result = (arg1)->subtract(arg2);
  65103. - }
  65104. - catch(vips::VError &_e) {
  65105. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65106. - }
  65107. -
  65108. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65109. - return resultobj;
  65110. -fail:
  65111. - return NULL;
  65112. -}
  65113. -
  65114. -
  65115. -SWIGINTERN PyObject *_wrap_VImage_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65116. - PyObject *resultobj = 0;
  65117. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65118. - void *argp1 = 0 ;
  65119. - int res1 = 0 ;
  65120. - PyObject * obj0 = 0 ;
  65121. - vips::VImage result;
  65122. -
  65123. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tan",&obj0)) SWIG_fail;
  65124. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65125. - if (!SWIG_IsOK(res1)) {
  65126. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tan" "', argument " "1"" of type '" "vips::VImage *""'");
  65127. - }
  65128. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65129. - try {
  65130. - result = (arg1)->tan();
  65131. - }
  65132. - catch(vips::VError &_e) {
  65133. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65134. - }
  65135. -
  65136. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65137. - return resultobj;
  65138. -fail:
  65139. - return NULL;
  65140. -}
  65141. -
  65142. -
  65143. -SWIGINTERN PyObject *_wrap_VImage_greyc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65144. - PyObject *resultobj = 0;
  65145. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65146. - int arg2 ;
  65147. - double arg3 ;
  65148. - double arg4 ;
  65149. - double arg5 ;
  65150. - double arg6 ;
  65151. - double arg7 ;
  65152. - double arg8 ;
  65153. - double arg9 ;
  65154. - double arg10 ;
  65155. - int arg11 ;
  65156. - int arg12 ;
  65157. - void *argp1 = 0 ;
  65158. - int res1 = 0 ;
  65159. - int val2 ;
  65160. - int ecode2 = 0 ;
  65161. - double val3 ;
  65162. - int ecode3 = 0 ;
  65163. - double val4 ;
  65164. - int ecode4 = 0 ;
  65165. - double val5 ;
  65166. - int ecode5 = 0 ;
  65167. - double val6 ;
  65168. - int ecode6 = 0 ;
  65169. - double val7 ;
  65170. - int ecode7 = 0 ;
  65171. - double val8 ;
  65172. - int ecode8 = 0 ;
  65173. - double val9 ;
  65174. - int ecode9 = 0 ;
  65175. - double val10 ;
  65176. - int ecode10 = 0 ;
  65177. - int val11 ;
  65178. - int ecode11 = 0 ;
  65179. - int val12 ;
  65180. - int ecode12 = 0 ;
  65181. - PyObject * obj0 = 0 ;
  65182. - PyObject * obj1 = 0 ;
  65183. - PyObject * obj2 = 0 ;
  65184. - PyObject * obj3 = 0 ;
  65185. - PyObject * obj4 = 0 ;
  65186. - PyObject * obj5 = 0 ;
  65187. - PyObject * obj6 = 0 ;
  65188. - PyObject * obj7 = 0 ;
  65189. - PyObject * obj8 = 0 ;
  65190. - PyObject * obj9 = 0 ;
  65191. - PyObject * obj10 = 0 ;
  65192. - PyObject * obj11 = 0 ;
  65193. - vips::VImage result;
  65194. -
  65195. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_greyc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
  65196. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65197. - if (!SWIG_IsOK(res1)) {
  65198. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc" "', argument " "1"" of type '" "vips::VImage *""'");
  65199. - }
  65200. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65201. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  65202. - if (!SWIG_IsOK(ecode2)) {
  65203. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_greyc" "', argument " "2"" of type '" "int""'");
  65204. - }
  65205. - arg2 = static_cast< int >(val2);
  65206. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  65207. - if (!SWIG_IsOK(ecode3)) {
  65208. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc" "', argument " "3"" of type '" "double""'");
  65209. - }
  65210. - arg3 = static_cast< double >(val3);
  65211. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  65212. - if (!SWIG_IsOK(ecode4)) {
  65213. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc" "', argument " "4"" of type '" "double""'");
  65214. - }
  65215. - arg4 = static_cast< double >(val4);
  65216. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  65217. - if (!SWIG_IsOK(ecode5)) {
  65218. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc" "', argument " "5"" of type '" "double""'");
  65219. - }
  65220. - arg5 = static_cast< double >(val5);
  65221. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  65222. - if (!SWIG_IsOK(ecode6)) {
  65223. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc" "', argument " "6"" of type '" "double""'");
  65224. - }
  65225. - arg6 = static_cast< double >(val6);
  65226. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  65227. - if (!SWIG_IsOK(ecode7)) {
  65228. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc" "', argument " "7"" of type '" "double""'");
  65229. - }
  65230. - arg7 = static_cast< double >(val7);
  65231. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  65232. - if (!SWIG_IsOK(ecode8)) {
  65233. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc" "', argument " "8"" of type '" "double""'");
  65234. - }
  65235. - arg8 = static_cast< double >(val8);
  65236. - ecode9 = SWIG_AsVal_double(obj8, &val9);
  65237. - if (!SWIG_IsOK(ecode9)) {
  65238. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc" "', argument " "9"" of type '" "double""'");
  65239. - }
  65240. - arg9 = static_cast< double >(val9);
  65241. - ecode10 = SWIG_AsVal_double(obj9, &val10);
  65242. - if (!SWIG_IsOK(ecode10)) {
  65243. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc" "', argument " "10"" of type '" "double""'");
  65244. - }
  65245. - arg10 = static_cast< double >(val10);
  65246. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  65247. - if (!SWIG_IsOK(ecode11)) {
  65248. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc" "', argument " "11"" of type '" "int""'");
  65249. - }
  65250. - arg11 = static_cast< int >(val11);
  65251. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  65252. - if (!SWIG_IsOK(ecode12)) {
  65253. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc" "', argument " "12"" of type '" "int""'");
  65254. - }
  65255. - arg12 = static_cast< int >(val12);
  65256. - try {
  65257. - result = (arg1)->greyc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
  65258. - }
  65259. - catch(vips::VError &_e) {
  65260. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65261. - }
  65262. -
  65263. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65264. - return resultobj;
  65265. -fail:
  65266. - return NULL;
  65267. -}
  65268. -
  65269. -
  65270. -SWIGINTERN PyObject *_wrap_VImage_greyc_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65271. - PyObject *resultobj = 0;
  65272. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65273. - vips::VImage arg2 ;
  65274. - int arg3 ;
  65275. - double arg4 ;
  65276. - double arg5 ;
  65277. - double arg6 ;
  65278. - double arg7 ;
  65279. - double arg8 ;
  65280. - double arg9 ;
  65281. - double arg10 ;
  65282. - double arg11 ;
  65283. - int arg12 ;
  65284. - int arg13 ;
  65285. - void *argp1 = 0 ;
  65286. - int res1 = 0 ;
  65287. - void *argp2 ;
  65288. - int res2 = 0 ;
  65289. - int val3 ;
  65290. - int ecode3 = 0 ;
  65291. - double val4 ;
  65292. - int ecode4 = 0 ;
  65293. - double val5 ;
  65294. - int ecode5 = 0 ;
  65295. - double val6 ;
  65296. - int ecode6 = 0 ;
  65297. - double val7 ;
  65298. - int ecode7 = 0 ;
  65299. - double val8 ;
  65300. - int ecode8 = 0 ;
  65301. - double val9 ;
  65302. - int ecode9 = 0 ;
  65303. - double val10 ;
  65304. - int ecode10 = 0 ;
  65305. - double val11 ;
  65306. - int ecode11 = 0 ;
  65307. - int val12 ;
  65308. - int ecode12 = 0 ;
  65309. - int val13 ;
  65310. - int ecode13 = 0 ;
  65311. - PyObject * obj0 = 0 ;
  65312. - PyObject * obj1 = 0 ;
  65313. - PyObject * obj2 = 0 ;
  65314. - PyObject * obj3 = 0 ;
  65315. - PyObject * obj4 = 0 ;
  65316. - PyObject * obj5 = 0 ;
  65317. - PyObject * obj6 = 0 ;
  65318. - PyObject * obj7 = 0 ;
  65319. - PyObject * obj8 = 0 ;
  65320. - PyObject * obj9 = 0 ;
  65321. - PyObject * obj10 = 0 ;
  65322. - PyObject * obj11 = 0 ;
  65323. - PyObject * obj12 = 0 ;
  65324. - vips::VImage result;
  65325. -
  65326. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:VImage_greyc_mask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail;
  65327. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65328. - if (!SWIG_IsOK(res1)) {
  65329. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc_mask" "', argument " "1"" of type '" "vips::VImage *""'");
  65330. - }
  65331. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65332. - {
  65333. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  65334. - if (!SWIG_IsOK(res2)) {
  65335. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'");
  65336. - }
  65337. - if (!argp2) {
  65338. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'");
  65339. - } else {
  65340. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  65341. - arg2 = *temp;
  65342. - if (SWIG_IsNewObj(res2)) delete temp;
  65343. - }
  65344. - }
  65345. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  65346. - if (!SWIG_IsOK(ecode3)) {
  65347. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc_mask" "', argument " "3"" of type '" "int""'");
  65348. - }
  65349. - arg3 = static_cast< int >(val3);
  65350. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  65351. - if (!SWIG_IsOK(ecode4)) {
  65352. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc_mask" "', argument " "4"" of type '" "double""'");
  65353. - }
  65354. - arg4 = static_cast< double >(val4);
  65355. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  65356. - if (!SWIG_IsOK(ecode5)) {
  65357. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc_mask" "', argument " "5"" of type '" "double""'");
  65358. - }
  65359. - arg5 = static_cast< double >(val5);
  65360. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  65361. - if (!SWIG_IsOK(ecode6)) {
  65362. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc_mask" "', argument " "6"" of type '" "double""'");
  65363. - }
  65364. - arg6 = static_cast< double >(val6);
  65365. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  65366. - if (!SWIG_IsOK(ecode7)) {
  65367. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc_mask" "', argument " "7"" of type '" "double""'");
  65368. - }
  65369. - arg7 = static_cast< double >(val7);
  65370. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  65371. - if (!SWIG_IsOK(ecode8)) {
  65372. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc_mask" "', argument " "8"" of type '" "double""'");
  65373. - }
  65374. - arg8 = static_cast< double >(val8);
  65375. - ecode9 = SWIG_AsVal_double(obj8, &val9);
  65376. - if (!SWIG_IsOK(ecode9)) {
  65377. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc_mask" "', argument " "9"" of type '" "double""'");
  65378. - }
  65379. - arg9 = static_cast< double >(val9);
  65380. - ecode10 = SWIG_AsVal_double(obj9, &val10);
  65381. - if (!SWIG_IsOK(ecode10)) {
  65382. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc_mask" "', argument " "10"" of type '" "double""'");
  65383. - }
  65384. - arg10 = static_cast< double >(val10);
  65385. - ecode11 = SWIG_AsVal_double(obj10, &val11);
  65386. - if (!SWIG_IsOK(ecode11)) {
  65387. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc_mask" "', argument " "11"" of type '" "double""'");
  65388. - }
  65389. - arg11 = static_cast< double >(val11);
  65390. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  65391. - if (!SWIG_IsOK(ecode12)) {
  65392. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc_mask" "', argument " "12"" of type '" "int""'");
  65393. - }
  65394. - arg12 = static_cast< int >(val12);
  65395. - ecode13 = SWIG_AsVal_int(obj12, &val13);
  65396. - if (!SWIG_IsOK(ecode13)) {
  65397. - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_greyc_mask" "', argument " "13"" of type '" "int""'");
  65398. - }
  65399. - arg13 = static_cast< int >(val13);
  65400. - try {
  65401. - result = (arg1)->greyc_mask(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
  65402. - }
  65403. - catch(vips::VError &_e) {
  65404. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65405. - }
  65406. -
  65407. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65408. - return resultobj;
  65409. -fail:
  65410. - return NULL;
  65411. -}
  65412. -
  65413. -
  65414. -SWIGINTERN PyObject *_wrap_VImage_LCh2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65415. - PyObject *resultobj = 0;
  65416. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65417. - void *argp1 = 0 ;
  65418. - int res1 = 0 ;
  65419. - PyObject * obj0 = 0 ;
  65420. - vips::VImage result;
  65421. -
  65422. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2Lab",&obj0)) SWIG_fail;
  65423. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65424. - if (!SWIG_IsOK(res1)) {
  65425. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  65426. - }
  65427. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65428. - try {
  65429. - result = (arg1)->LCh2Lab();
  65430. - }
  65431. - catch(vips::VError &_e) {
  65432. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65433. - }
  65434. -
  65435. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65436. - return resultobj;
  65437. -fail:
  65438. - return NULL;
  65439. -}
  65440. -
  65441. -
  65442. -SWIGINTERN PyObject *_wrap_VImage_LCh2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65443. - PyObject *resultobj = 0;
  65444. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65445. - void *argp1 = 0 ;
  65446. - int res1 = 0 ;
  65447. - PyObject * obj0 = 0 ;
  65448. - vips::VImage result;
  65449. -
  65450. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2UCS",&obj0)) SWIG_fail;
  65451. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65452. - if (!SWIG_IsOK(res1)) {
  65453. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
  65454. - }
  65455. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65456. - try {
  65457. - result = (arg1)->LCh2UCS();
  65458. - }
  65459. - catch(vips::VError &_e) {
  65460. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65461. - }
  65462. -
  65463. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65464. - return resultobj;
  65465. -fail:
  65466. - return NULL;
  65467. -}
  65468. -
  65469. -
  65470. -SWIGINTERN PyObject *_wrap_VImage_Lab2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65471. - PyObject *resultobj = 0;
  65472. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65473. - void *argp1 = 0 ;
  65474. - int res1 = 0 ;
  65475. - PyObject * obj0 = 0 ;
  65476. - vips::VImage result;
  65477. -
  65478. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LCh",&obj0)) SWIG_fail;
  65479. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65480. - if (!SWIG_IsOK(res1)) {
  65481. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LCh" "', argument " "1"" of type '" "vips::VImage *""'");
  65482. - }
  65483. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65484. - try {
  65485. - result = (arg1)->Lab2LCh();
  65486. - }
  65487. - catch(vips::VError &_e) {
  65488. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65489. - }
  65490. -
  65491. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65492. - return resultobj;
  65493. -fail:
  65494. - return NULL;
  65495. -}
  65496. -
  65497. -
  65498. -SWIGINTERN PyObject *_wrap_VImage_Lab2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65499. - PyObject *resultobj = 0;
  65500. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65501. - void *argp1 = 0 ;
  65502. - int res1 = 0 ;
  65503. - PyObject * obj0 = 0 ;
  65504. - vips::VImage result;
  65505. -
  65506. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabQ",&obj0)) SWIG_fail;
  65507. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65508. - if (!SWIG_IsOK(res1)) {
  65509. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabQ" "', argument " "1"" of type '" "vips::VImage *""'");
  65510. - }
  65511. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65512. - try {
  65513. - result = (arg1)->Lab2LabQ();
  65514. - }
  65515. - catch(vips::VError &_e) {
  65516. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65517. - }
  65518. -
  65519. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65520. - return resultobj;
  65521. -fail:
  65522. - return NULL;
  65523. -}
  65524. -
  65525. -
  65526. -SWIGINTERN PyObject *_wrap_VImage_Lab2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65527. - PyObject *resultobj = 0;
  65528. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65529. - void *argp1 = 0 ;
  65530. - int res1 = 0 ;
  65531. - PyObject * obj0 = 0 ;
  65532. - vips::VImage result;
  65533. -
  65534. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabS",&obj0)) SWIG_fail;
  65535. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65536. - if (!SWIG_IsOK(res1)) {
  65537. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabS" "', argument " "1"" of type '" "vips::VImage *""'");
  65538. - }
  65539. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65540. - try {
  65541. - result = (arg1)->Lab2LabS();
  65542. - }
  65543. - catch(vips::VError &_e) {
  65544. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65545. - }
  65546. -
  65547. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65548. - return resultobj;
  65549. -fail:
  65550. - return NULL;
  65551. -}
  65552. -
  65553. -
  65554. -SWIGINTERN PyObject *_wrap_VImage_Lab2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65555. - PyObject *resultobj = 0;
  65556. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65557. - void *argp1 = 0 ;
  65558. - int res1 = 0 ;
  65559. - PyObject * obj0 = 0 ;
  65560. - vips::VImage result;
  65561. -
  65562. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2UCS",&obj0)) SWIG_fail;
  65563. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65564. - if (!SWIG_IsOK(res1)) {
  65565. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
  65566. - }
  65567. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65568. - try {
  65569. - result = (arg1)->Lab2UCS();
  65570. - }
  65571. - catch(vips::VError &_e) {
  65572. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65573. - }
  65574. -
  65575. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65576. - return resultobj;
  65577. -fail:
  65578. - return NULL;
  65579. -}
  65580. -
  65581. -
  65582. -SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65583. - PyObject *resultobj = 0;
  65584. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65585. - void *argp1 = 0 ;
  65586. - int res1 = 0 ;
  65587. - PyObject * obj0 = 0 ;
  65588. - vips::VImage result;
  65589. -
  65590. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2XYZ",&obj0)) SWIG_fail;
  65591. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65592. - if (!SWIG_IsOK(res1)) {
  65593. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  65594. - }
  65595. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65596. - try {
  65597. - result = (arg1)->Lab2XYZ();
  65598. - }
  65599. - catch(vips::VError &_e) {
  65600. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65601. - }
  65602. -
  65603. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65604. - return resultobj;
  65605. -fail:
  65606. - return NULL;
  65607. -}
  65608. -
  65609. -
  65610. -SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65611. - PyObject *resultobj = 0;
  65612. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65613. - double arg2 ;
  65614. - double arg3 ;
  65615. - double arg4 ;
  65616. - void *argp1 = 0 ;
  65617. - int res1 = 0 ;
  65618. - double val2 ;
  65619. - int ecode2 = 0 ;
  65620. - double val3 ;
  65621. - int ecode3 = 0 ;
  65622. - double val4 ;
  65623. - int ecode4 = 0 ;
  65624. - PyObject * obj0 = 0 ;
  65625. - PyObject * obj1 = 0 ;
  65626. - PyObject * obj2 = 0 ;
  65627. - PyObject * obj3 = 0 ;
  65628. - vips::VImage result;
  65629. -
  65630. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_Lab2XYZ_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  65631. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65632. - if (!SWIG_IsOK(res1)) {
  65633. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ_temp" "', argument " "1"" of type '" "vips::VImage *""'");
  65634. - }
  65635. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65636. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  65637. - if (!SWIG_IsOK(ecode2)) {
  65638. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_Lab2XYZ_temp" "', argument " "2"" of type '" "double""'");
  65639. - }
  65640. - arg2 = static_cast< double >(val2);
  65641. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  65642. - if (!SWIG_IsOK(ecode3)) {
  65643. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_Lab2XYZ_temp" "', argument " "3"" of type '" "double""'");
  65644. - }
  65645. - arg3 = static_cast< double >(val3);
  65646. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  65647. - if (!SWIG_IsOK(ecode4)) {
  65648. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_Lab2XYZ_temp" "', argument " "4"" of type '" "double""'");
  65649. - }
  65650. - arg4 = static_cast< double >(val4);
  65651. - try {
  65652. - result = (arg1)->Lab2XYZ_temp(arg2,arg3,arg4);
  65653. - }
  65654. - catch(vips::VError &_e) {
  65655. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65656. - }
  65657. -
  65658. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65659. - return resultobj;
  65660. -fail:
  65661. - return NULL;
  65662. -}
  65663. -
  65664. -
  65665. -SWIGINTERN PyObject *_wrap_VImage_Lab2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65666. - PyObject *resultobj = 0;
  65667. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65668. - vips::VDisplay arg2 ;
  65669. - void *argp1 = 0 ;
  65670. - int res1 = 0 ;
  65671. - void *argp2 ;
  65672. - int res2 = 0 ;
  65673. - PyObject * obj0 = 0 ;
  65674. - PyObject * obj1 = 0 ;
  65675. - vips::VImage result;
  65676. -
  65677. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_Lab2disp",&obj0,&obj1)) SWIG_fail;
  65678. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65679. - if (!SWIG_IsOK(res1)) {
  65680. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2disp" "', argument " "1"" of type '" "vips::VImage *""'");
  65681. - }
  65682. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65683. - {
  65684. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  65685. - if (!SWIG_IsOK(res2)) {
  65686. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  65687. - }
  65688. - if (!argp2) {
  65689. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  65690. - } else {
  65691. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
  65692. - arg2 = *temp;
  65693. - if (SWIG_IsNewObj(res2)) delete temp;
  65694. - }
  65695. - }
  65696. - try {
  65697. - result = (arg1)->Lab2disp(arg2);
  65698. - }
  65699. - catch(vips::VError &_e) {
  65700. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65701. - }
  65702. -
  65703. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65704. - return resultobj;
  65705. -fail:
  65706. - return NULL;
  65707. -}
  65708. -
  65709. -
  65710. -SWIGINTERN PyObject *_wrap_VImage_LabQ2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65711. - PyObject *resultobj = 0;
  65712. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65713. - void *argp1 = 0 ;
  65714. - int res1 = 0 ;
  65715. - PyObject * obj0 = 0 ;
  65716. - vips::VImage result;
  65717. -
  65718. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2LabS",&obj0)) SWIG_fail;
  65719. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65720. - if (!SWIG_IsOK(res1)) {
  65721. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2LabS" "', argument " "1"" of type '" "vips::VImage *""'");
  65722. - }
  65723. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65724. - try {
  65725. - result = (arg1)->LabQ2LabS();
  65726. - }
  65727. - catch(vips::VError &_e) {
  65728. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65729. - }
  65730. -
  65731. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65732. - return resultobj;
  65733. -fail:
  65734. - return NULL;
  65735. -}
  65736. -
  65737. -
  65738. -SWIGINTERN PyObject *_wrap_VImage_LabQ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65739. - PyObject *resultobj = 0;
  65740. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65741. - void *argp1 = 0 ;
  65742. - int res1 = 0 ;
  65743. - PyObject * obj0 = 0 ;
  65744. - vips::VImage result;
  65745. -
  65746. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2Lab",&obj0)) SWIG_fail;
  65747. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65748. - if (!SWIG_IsOK(res1)) {
  65749. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  65750. - }
  65751. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65752. - try {
  65753. - result = (arg1)->LabQ2Lab();
  65754. - }
  65755. - catch(vips::VError &_e) {
  65756. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65757. - }
  65758. -
  65759. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65760. - return resultobj;
  65761. -fail:
  65762. - return NULL;
  65763. -}
  65764. -
  65765. -
  65766. -SWIGINTERN PyObject *_wrap_VImage_LabQ2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65767. - PyObject *resultobj = 0;
  65768. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65769. - void *argp1 = 0 ;
  65770. - int res1 = 0 ;
  65771. - PyObject * obj0 = 0 ;
  65772. - vips::VImage result;
  65773. -
  65774. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2XYZ",&obj0)) SWIG_fail;
  65775. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65776. - if (!SWIG_IsOK(res1)) {
  65777. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  65778. - }
  65779. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65780. - try {
  65781. - result = (arg1)->LabQ2XYZ();
  65782. - }
  65783. - catch(vips::VError &_e) {
  65784. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65785. - }
  65786. -
  65787. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65788. - return resultobj;
  65789. -fail:
  65790. - return NULL;
  65791. -}
  65792. -
  65793. -
  65794. -SWIGINTERN PyObject *_wrap_VImage_LabQ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65795. - PyObject *resultobj = 0;
  65796. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65797. - vips::VDisplay arg2 ;
  65798. - void *argp1 = 0 ;
  65799. - int res1 = 0 ;
  65800. - void *argp2 ;
  65801. - int res2 = 0 ;
  65802. - PyObject * obj0 = 0 ;
  65803. - PyObject * obj1 = 0 ;
  65804. - vips::VImage result;
  65805. -
  65806. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_LabQ2disp",&obj0,&obj1)) SWIG_fail;
  65807. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65808. - if (!SWIG_IsOK(res1)) {
  65809. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2disp" "', argument " "1"" of type '" "vips::VImage *""'");
  65810. - }
  65811. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65812. - {
  65813. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  65814. - if (!SWIG_IsOK(res2)) {
  65815. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  65816. - }
  65817. - if (!argp2) {
  65818. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  65819. - } else {
  65820. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
  65821. - arg2 = *temp;
  65822. - if (SWIG_IsNewObj(res2)) delete temp;
  65823. - }
  65824. - }
  65825. - try {
  65826. - result = (arg1)->LabQ2disp(arg2);
  65827. - }
  65828. - catch(vips::VError &_e) {
  65829. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65830. - }
  65831. -
  65832. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65833. - return resultobj;
  65834. -fail:
  65835. - return NULL;
  65836. -}
  65837. -
  65838. -
  65839. -SWIGINTERN PyObject *_wrap_VImage_LabS2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65840. - PyObject *resultobj = 0;
  65841. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65842. - void *argp1 = 0 ;
  65843. - int res1 = 0 ;
  65844. - PyObject * obj0 = 0 ;
  65845. - vips::VImage result;
  65846. -
  65847. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2LabQ",&obj0)) SWIG_fail;
  65848. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65849. - if (!SWIG_IsOK(res1)) {
  65850. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2LabQ" "', argument " "1"" of type '" "vips::VImage *""'");
  65851. - }
  65852. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65853. - try {
  65854. - result = (arg1)->LabS2LabQ();
  65855. - }
  65856. - catch(vips::VError &_e) {
  65857. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65858. - }
  65859. -
  65860. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65861. - return resultobj;
  65862. -fail:
  65863. - return NULL;
  65864. -}
  65865. -
  65866. -
  65867. -SWIGINTERN PyObject *_wrap_VImage_LabS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65868. - PyObject *resultobj = 0;
  65869. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65870. - void *argp1 = 0 ;
  65871. - int res1 = 0 ;
  65872. - PyObject * obj0 = 0 ;
  65873. - vips::VImage result;
  65874. -
  65875. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2Lab",&obj0)) SWIG_fail;
  65876. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65877. - if (!SWIG_IsOK(res1)) {
  65878. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  65879. - }
  65880. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65881. - try {
  65882. - result = (arg1)->LabS2Lab();
  65883. - }
  65884. - catch(vips::VError &_e) {
  65885. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65886. - }
  65887. -
  65888. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65889. - return resultobj;
  65890. -fail:
  65891. - return NULL;
  65892. -}
  65893. -
  65894. -
  65895. -SWIGINTERN PyObject *_wrap_VImage_UCS2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65896. - PyObject *resultobj = 0;
  65897. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65898. - void *argp1 = 0 ;
  65899. - int res1 = 0 ;
  65900. - PyObject * obj0 = 0 ;
  65901. - vips::VImage result;
  65902. -
  65903. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2LCh",&obj0)) SWIG_fail;
  65904. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65905. - if (!SWIG_IsOK(res1)) {
  65906. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2LCh" "', argument " "1"" of type '" "vips::VImage *""'");
  65907. - }
  65908. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65909. - try {
  65910. - result = (arg1)->UCS2LCh();
  65911. - }
  65912. - catch(vips::VError &_e) {
  65913. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65914. - }
  65915. -
  65916. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65917. - return resultobj;
  65918. -fail:
  65919. - return NULL;
  65920. -}
  65921. -
  65922. -
  65923. -SWIGINTERN PyObject *_wrap_VImage_UCS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65924. - PyObject *resultobj = 0;
  65925. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65926. - void *argp1 = 0 ;
  65927. - int res1 = 0 ;
  65928. - PyObject * obj0 = 0 ;
  65929. - vips::VImage result;
  65930. -
  65931. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2Lab",&obj0)) SWIG_fail;
  65932. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65933. - if (!SWIG_IsOK(res1)) {
  65934. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  65935. - }
  65936. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65937. - try {
  65938. - result = (arg1)->UCS2Lab();
  65939. - }
  65940. - catch(vips::VError &_e) {
  65941. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65942. - }
  65943. -
  65944. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65945. - return resultobj;
  65946. -fail:
  65947. - return NULL;
  65948. -}
  65949. -
  65950. -
  65951. -SWIGINTERN PyObject *_wrap_VImage_UCS2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65952. - PyObject *resultobj = 0;
  65953. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65954. - void *argp1 = 0 ;
  65955. - int res1 = 0 ;
  65956. - PyObject * obj0 = 0 ;
  65957. - vips::VImage result;
  65958. -
  65959. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2XYZ",&obj0)) SWIG_fail;
  65960. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65961. - if (!SWIG_IsOK(res1)) {
  65962. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  65963. - }
  65964. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65965. - try {
  65966. - result = (arg1)->UCS2XYZ();
  65967. - }
  65968. - catch(vips::VError &_e) {
  65969. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65970. - }
  65971. -
  65972. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  65973. - return resultobj;
  65974. -fail:
  65975. - return NULL;
  65976. -}
  65977. -
  65978. -
  65979. -SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  65980. - PyObject *resultobj = 0;
  65981. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  65982. - void *argp1 = 0 ;
  65983. - int res1 = 0 ;
  65984. - PyObject * obj0 = 0 ;
  65985. - vips::VImage result;
  65986. -
  65987. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Lab",&obj0)) SWIG_fail;
  65988. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  65989. - if (!SWIG_IsOK(res1)) {
  65990. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  65991. - }
  65992. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  65993. - try {
  65994. - result = (arg1)->XYZ2Lab();
  65995. - }
  65996. - catch(vips::VError &_e) {
  65997. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  65998. - }
  65999. -
  66000. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66001. - return resultobj;
  66002. -fail:
  66003. - return NULL;
  66004. -}
  66005. -
  66006. -
  66007. -SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66008. - PyObject *resultobj = 0;
  66009. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66010. - double arg2 ;
  66011. - double arg3 ;
  66012. - double arg4 ;
  66013. - void *argp1 = 0 ;
  66014. - int res1 = 0 ;
  66015. - double val2 ;
  66016. - int ecode2 = 0 ;
  66017. - double val3 ;
  66018. - int ecode3 = 0 ;
  66019. - double val4 ;
  66020. - int ecode4 = 0 ;
  66021. - PyObject * obj0 = 0 ;
  66022. - PyObject * obj1 = 0 ;
  66023. - PyObject * obj2 = 0 ;
  66024. - PyObject * obj3 = 0 ;
  66025. - vips::VImage result;
  66026. -
  66027. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_XYZ2Lab_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  66028. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66029. - if (!SWIG_IsOK(res1)) {
  66030. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab_temp" "', argument " "1"" of type '" "vips::VImage *""'");
  66031. - }
  66032. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66033. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  66034. - if (!SWIG_IsOK(ecode2)) {
  66035. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_XYZ2Lab_temp" "', argument " "2"" of type '" "double""'");
  66036. - }
  66037. - arg2 = static_cast< double >(val2);
  66038. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  66039. - if (!SWIG_IsOK(ecode3)) {
  66040. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_XYZ2Lab_temp" "', argument " "3"" of type '" "double""'");
  66041. - }
  66042. - arg3 = static_cast< double >(val3);
  66043. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  66044. - if (!SWIG_IsOK(ecode4)) {
  66045. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_XYZ2Lab_temp" "', argument " "4"" of type '" "double""'");
  66046. - }
  66047. - arg4 = static_cast< double >(val4);
  66048. - try {
  66049. - result = (arg1)->XYZ2Lab_temp(arg2,arg3,arg4);
  66050. - }
  66051. - catch(vips::VError &_e) {
  66052. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66053. - }
  66054. -
  66055. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66056. - return resultobj;
  66057. -fail:
  66058. - return NULL;
  66059. -}
  66060. -
  66061. -
  66062. -SWIGINTERN PyObject *_wrap_VImage_XYZ2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66063. - PyObject *resultobj = 0;
  66064. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66065. - void *argp1 = 0 ;
  66066. - int res1 = 0 ;
  66067. - PyObject * obj0 = 0 ;
  66068. - vips::VImage result;
  66069. -
  66070. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2UCS",&obj0)) SWIG_fail;
  66071. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66072. - if (!SWIG_IsOK(res1)) {
  66073. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2UCS" "', argument " "1"" of type '" "vips::VImage *""'");
  66074. - }
  66075. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66076. - try {
  66077. - result = (arg1)->XYZ2UCS();
  66078. - }
  66079. - catch(vips::VError &_e) {
  66080. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66081. - }
  66082. -
  66083. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66084. - return resultobj;
  66085. -fail:
  66086. - return NULL;
  66087. -}
  66088. -
  66089. -
  66090. -SWIGINTERN PyObject *_wrap_VImage_XYZ2Yxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66091. - PyObject *resultobj = 0;
  66092. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66093. - void *argp1 = 0 ;
  66094. - int res1 = 0 ;
  66095. - PyObject * obj0 = 0 ;
  66096. - vips::VImage result;
  66097. -
  66098. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Yxy",&obj0)) SWIG_fail;
  66099. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66100. - if (!SWIG_IsOK(res1)) {
  66101. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Yxy" "', argument " "1"" of type '" "vips::VImage *""'");
  66102. - }
  66103. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66104. - try {
  66105. - result = (arg1)->XYZ2Yxy();
  66106. - }
  66107. - catch(vips::VError &_e) {
  66108. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66109. - }
  66110. -
  66111. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66112. - return resultobj;
  66113. -fail:
  66114. - return NULL;
  66115. -}
  66116. -
  66117. -
  66118. -SWIGINTERN PyObject *_wrap_VImage_XYZ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66119. - PyObject *resultobj = 0;
  66120. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66121. - vips::VDisplay arg2 ;
  66122. - void *argp1 = 0 ;
  66123. - int res1 = 0 ;
  66124. - void *argp2 ;
  66125. - int res2 = 0 ;
  66126. - PyObject * obj0 = 0 ;
  66127. - PyObject * obj1 = 0 ;
  66128. - vips::VImage result;
  66129. -
  66130. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_XYZ2disp",&obj0,&obj1)) SWIG_fail;
  66131. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66132. - if (!SWIG_IsOK(res1)) {
  66133. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2disp" "', argument " "1"" of type '" "vips::VImage *""'");
  66134. - }
  66135. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66136. - {
  66137. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  66138. - if (!SWIG_IsOK(res2)) {
  66139. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  66140. - }
  66141. - if (!argp2) {
  66142. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'");
  66143. - } else {
  66144. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
  66145. - arg2 = *temp;
  66146. - if (SWIG_IsNewObj(res2)) delete temp;
  66147. - }
  66148. - }
  66149. - try {
  66150. - result = (arg1)->XYZ2disp(arg2);
  66151. - }
  66152. - catch(vips::VError &_e) {
  66153. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66154. - }
  66155. -
  66156. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66157. - return resultobj;
  66158. -fail:
  66159. - return NULL;
  66160. -}
  66161. -
  66162. -
  66163. -SWIGINTERN PyObject *_wrap_VImage_XYZ2sRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66164. - PyObject *resultobj = 0;
  66165. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66166. - void *argp1 = 0 ;
  66167. - int res1 = 0 ;
  66168. - PyObject * obj0 = 0 ;
  66169. - vips::VImage result;
  66170. -
  66171. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2sRGB",&obj0)) SWIG_fail;
  66172. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66173. - if (!SWIG_IsOK(res1)) {
  66174. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2sRGB" "', argument " "1"" of type '" "vips::VImage *""'");
  66175. - }
  66176. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66177. - try {
  66178. - result = (arg1)->XYZ2sRGB();
  66179. - }
  66180. - catch(vips::VError &_e) {
  66181. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66182. - }
  66183. -
  66184. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66185. - return resultobj;
  66186. -fail:
  66187. - return NULL;
  66188. -}
  66189. -
  66190. -
  66191. -SWIGINTERN PyObject *_wrap_VImage_Yxy2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66192. - PyObject *resultobj = 0;
  66193. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66194. - void *argp1 = 0 ;
  66195. - int res1 = 0 ;
  66196. - PyObject * obj0 = 0 ;
  66197. - vips::VImage result;
  66198. -
  66199. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yxy2XYZ",&obj0)) SWIG_fail;
  66200. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66201. - if (!SWIG_IsOK(res1)) {
  66202. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yxy2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  66203. - }
  66204. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66205. - try {
  66206. - result = (arg1)->Yxy2XYZ();
  66207. - }
  66208. - catch(vips::VError &_e) {
  66209. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66210. - }
  66211. -
  66212. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66213. - return resultobj;
  66214. -fail:
  66215. - return NULL;
  66216. -}
  66217. -
  66218. -
  66219. -SWIGINTERN PyObject *_wrap_VImage_dE00_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66220. - PyObject *resultobj = 0;
  66221. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66222. - vips::VImage arg2 ;
  66223. - void *argp1 = 0 ;
  66224. - int res1 = 0 ;
  66225. - void *argp2 ;
  66226. - int res2 = 0 ;
  66227. - PyObject * obj0 = 0 ;
  66228. - PyObject * obj1 = 0 ;
  66229. - vips::VImage result;
  66230. -
  66231. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE00_fromLab",&obj0,&obj1)) SWIG_fail;
  66232. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66233. - if (!SWIG_IsOK(res1)) {
  66234. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE00_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
  66235. - }
  66236. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66237. - {
  66238. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66239. - if (!SWIG_IsOK(res2)) {
  66240. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66241. - }
  66242. - if (!argp2) {
  66243. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66244. - } else {
  66245. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66246. - arg2 = *temp;
  66247. - if (SWIG_IsNewObj(res2)) delete temp;
  66248. - }
  66249. - }
  66250. - try {
  66251. - result = (arg1)->dE00_fromLab(arg2);
  66252. - }
  66253. - catch(vips::VError &_e) {
  66254. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66255. - }
  66256. -
  66257. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66258. - return resultobj;
  66259. -fail:
  66260. - return NULL;
  66261. -}
  66262. -
  66263. -
  66264. -SWIGINTERN PyObject *_wrap_VImage_dECMC_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66265. - PyObject *resultobj = 0;
  66266. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66267. - vips::VImage arg2 ;
  66268. - void *argp1 = 0 ;
  66269. - int res1 = 0 ;
  66270. - void *argp2 ;
  66271. - int res2 = 0 ;
  66272. - PyObject * obj0 = 0 ;
  66273. - PyObject * obj1 = 0 ;
  66274. - vips::VImage result;
  66275. -
  66276. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dECMC_fromLab",&obj0,&obj1)) SWIG_fail;
  66277. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66278. - if (!SWIG_IsOK(res1)) {
  66279. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
  66280. - }
  66281. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66282. - {
  66283. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66284. - if (!SWIG_IsOK(res2)) {
  66285. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66286. - }
  66287. - if (!argp2) {
  66288. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66289. - } else {
  66290. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66291. - arg2 = *temp;
  66292. - if (SWIG_IsNewObj(res2)) delete temp;
  66293. - }
  66294. - }
  66295. - try {
  66296. - result = (arg1)->dECMC_fromLab(arg2);
  66297. - }
  66298. - catch(vips::VError &_e) {
  66299. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66300. - }
  66301. -
  66302. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66303. - return resultobj;
  66304. -fail:
  66305. - return NULL;
  66306. -}
  66307. -
  66308. -
  66309. -SWIGINTERN PyObject *_wrap_VImage_dECMC_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66310. - PyObject *resultobj = 0;
  66311. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66312. - vips::VImage arg2 ;
  66313. - vips::VDisplay arg3 ;
  66314. - void *argp1 = 0 ;
  66315. - int res1 = 0 ;
  66316. - void *argp2 ;
  66317. - int res2 = 0 ;
  66318. - void *argp3 ;
  66319. - int res3 = 0 ;
  66320. - PyObject * obj0 = 0 ;
  66321. - PyObject * obj1 = 0 ;
  66322. - PyObject * obj2 = 0 ;
  66323. - vips::VImage result;
  66324. -
  66325. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dECMC_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail;
  66326. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66327. - if (!SWIG_IsOK(res1)) {
  66328. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'");
  66329. - }
  66330. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66331. - {
  66332. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66333. - if (!SWIG_IsOK(res2)) {
  66334. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
  66335. - }
  66336. - if (!argp2) {
  66337. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
  66338. - } else {
  66339. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66340. - arg2 = *temp;
  66341. - if (SWIG_IsNewObj(res2)) delete temp;
  66342. - }
  66343. - }
  66344. - {
  66345. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  66346. - if (!SWIG_IsOK(res3)) {
  66347. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
  66348. - }
  66349. - if (!argp3) {
  66350. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
  66351. - } else {
  66352. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3);
  66353. - arg3 = *temp;
  66354. - if (SWIG_IsNewObj(res3)) delete temp;
  66355. - }
  66356. - }
  66357. - try {
  66358. - result = (arg1)->dECMC_fromdisp(arg2,arg3);
  66359. - }
  66360. - catch(vips::VError &_e) {
  66361. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66362. - }
  66363. -
  66364. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66365. - return resultobj;
  66366. -fail:
  66367. - return NULL;
  66368. -}
  66369. -
  66370. -
  66371. -SWIGINTERN PyObject *_wrap_VImage_dE_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66372. - PyObject *resultobj = 0;
  66373. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66374. - vips::VImage arg2 ;
  66375. - void *argp1 = 0 ;
  66376. - int res1 = 0 ;
  66377. - void *argp2 ;
  66378. - int res2 = 0 ;
  66379. - PyObject * obj0 = 0 ;
  66380. - PyObject * obj1 = 0 ;
  66381. - vips::VImage result;
  66382. -
  66383. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromLab",&obj0,&obj1)) SWIG_fail;
  66384. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66385. - if (!SWIG_IsOK(res1)) {
  66386. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromLab" "', argument " "1"" of type '" "vips::VImage *""'");
  66387. - }
  66388. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66389. - {
  66390. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66391. - if (!SWIG_IsOK(res2)) {
  66392. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66393. - }
  66394. - if (!argp2) {
  66395. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'");
  66396. - } else {
  66397. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66398. - arg2 = *temp;
  66399. - if (SWIG_IsNewObj(res2)) delete temp;
  66400. - }
  66401. - }
  66402. - try {
  66403. - result = (arg1)->dE_fromLab(arg2);
  66404. - }
  66405. - catch(vips::VError &_e) {
  66406. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66407. - }
  66408. -
  66409. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66410. - return resultobj;
  66411. -fail:
  66412. - return NULL;
  66413. -}
  66414. -
  66415. -
  66416. -SWIGINTERN PyObject *_wrap_VImage_dE_fromXYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66417. - PyObject *resultobj = 0;
  66418. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66419. - vips::VImage arg2 ;
  66420. - void *argp1 = 0 ;
  66421. - int res1 = 0 ;
  66422. - void *argp2 ;
  66423. - int res2 = 0 ;
  66424. - PyObject * obj0 = 0 ;
  66425. - PyObject * obj1 = 0 ;
  66426. - vips::VImage result;
  66427. -
  66428. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromXYZ",&obj0,&obj1)) SWIG_fail;
  66429. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66430. - if (!SWIG_IsOK(res1)) {
  66431. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromXYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  66432. - }
  66433. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66434. - {
  66435. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66436. - if (!SWIG_IsOK(res2)) {
  66437. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'");
  66438. - }
  66439. - if (!argp2) {
  66440. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'");
  66441. - } else {
  66442. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66443. - arg2 = *temp;
  66444. - if (SWIG_IsNewObj(res2)) delete temp;
  66445. - }
  66446. - }
  66447. - try {
  66448. - result = (arg1)->dE_fromXYZ(arg2);
  66449. - }
  66450. - catch(vips::VError &_e) {
  66451. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66452. - }
  66453. -
  66454. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66455. - return resultobj;
  66456. -fail:
  66457. - return NULL;
  66458. -}
  66459. -
  66460. -
  66461. -SWIGINTERN PyObject *_wrap_VImage_dE_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66462. - PyObject *resultobj = 0;
  66463. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66464. - vips::VImage arg2 ;
  66465. - vips::VDisplay arg3 ;
  66466. - void *argp1 = 0 ;
  66467. - int res1 = 0 ;
  66468. - void *argp2 ;
  66469. - int res2 = 0 ;
  66470. - void *argp3 ;
  66471. - int res3 = 0 ;
  66472. - PyObject * obj0 = 0 ;
  66473. - PyObject * obj1 = 0 ;
  66474. - PyObject * obj2 = 0 ;
  66475. - vips::VImage result;
  66476. -
  66477. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dE_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail;
  66478. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66479. - if (!SWIG_IsOK(res1)) {
  66480. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'");
  66481. - }
  66482. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66483. - {
  66484. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  66485. - if (!SWIG_IsOK(res2)) {
  66486. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
  66487. - }
  66488. - if (!argp2) {
  66489. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'");
  66490. - } else {
  66491. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  66492. - arg2 = *temp;
  66493. - if (SWIG_IsNewObj(res2)) delete temp;
  66494. - }
  66495. - }
  66496. - {
  66497. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  66498. - if (!SWIG_IsOK(res3)) {
  66499. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
  66500. - }
  66501. - if (!argp3) {
  66502. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'");
  66503. - } else {
  66504. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3);
  66505. - arg3 = *temp;
  66506. - if (SWIG_IsNewObj(res3)) delete temp;
  66507. - }
  66508. - }
  66509. - try {
  66510. - result = (arg1)->dE_fromdisp(arg2,arg3);
  66511. - }
  66512. - catch(vips::VError &_e) {
  66513. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66514. - }
  66515. -
  66516. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66517. - return resultobj;
  66518. -fail:
  66519. - return NULL;
  66520. -}
  66521. -
  66522. -
  66523. -SWIGINTERN PyObject *_wrap_VImage_disp2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66524. - PyObject *resultobj = 0;
  66525. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66526. - vips::VDisplay arg2 ;
  66527. - void *argp1 = 0 ;
  66528. - int res1 = 0 ;
  66529. - void *argp2 ;
  66530. - int res2 = 0 ;
  66531. - PyObject * obj0 = 0 ;
  66532. - PyObject * obj1 = 0 ;
  66533. - vips::VImage result;
  66534. -
  66535. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2Lab",&obj0,&obj1)) SWIG_fail;
  66536. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66537. - if (!SWIG_IsOK(res1)) {
  66538. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2Lab" "', argument " "1"" of type '" "vips::VImage *""'");
  66539. - }
  66540. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66541. - {
  66542. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  66543. - if (!SWIG_IsOK(res2)) {
  66544. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'");
  66545. - }
  66546. - if (!argp2) {
  66547. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'");
  66548. - } else {
  66549. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
  66550. - arg2 = *temp;
  66551. - if (SWIG_IsNewObj(res2)) delete temp;
  66552. - }
  66553. - }
  66554. - try {
  66555. - result = (arg1)->disp2Lab(arg2);
  66556. - }
  66557. - catch(vips::VError &_e) {
  66558. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66559. - }
  66560. -
  66561. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66562. - return resultobj;
  66563. -fail:
  66564. - return NULL;
  66565. -}
  66566. -
  66567. -
  66568. -SWIGINTERN PyObject *_wrap_VImage_disp2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66569. - PyObject *resultobj = 0;
  66570. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66571. - vips::VDisplay arg2 ;
  66572. - void *argp1 = 0 ;
  66573. - int res1 = 0 ;
  66574. - void *argp2 ;
  66575. - int res2 = 0 ;
  66576. - PyObject * obj0 = 0 ;
  66577. - PyObject * obj1 = 0 ;
  66578. - vips::VImage result;
  66579. -
  66580. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2XYZ",&obj0,&obj1)) SWIG_fail;
  66581. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66582. - if (!SWIG_IsOK(res1)) {
  66583. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  66584. - }
  66585. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66586. - {
  66587. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0);
  66588. - if (!SWIG_IsOK(res2)) {
  66589. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'");
  66590. - }
  66591. - if (!argp2) {
  66592. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'");
  66593. - } else {
  66594. - vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2);
  66595. - arg2 = *temp;
  66596. - if (SWIG_IsNewObj(res2)) delete temp;
  66597. - }
  66598. - }
  66599. - try {
  66600. - result = (arg1)->disp2XYZ(arg2);
  66601. - }
  66602. - catch(vips::VError &_e) {
  66603. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66604. - }
  66605. -
  66606. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66607. - return resultobj;
  66608. -fail:
  66609. - return NULL;
  66610. -}
  66611. -
  66612. -
  66613. -SWIGINTERN PyObject *_wrap_VImage_float2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66614. - PyObject *resultobj = 0;
  66615. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66616. - void *argp1 = 0 ;
  66617. - int res1 = 0 ;
  66618. - PyObject * obj0 = 0 ;
  66619. - vips::VImage result;
  66620. -
  66621. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_float2rad",&obj0)) SWIG_fail;
  66622. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66623. - if (!SWIG_IsOK(res1)) {
  66624. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_float2rad" "', argument " "1"" of type '" "vips::VImage *""'");
  66625. - }
  66626. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66627. - try {
  66628. - result = (arg1)->float2rad();
  66629. - }
  66630. - catch(vips::VError &_e) {
  66631. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66632. - }
  66633. -
  66634. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66635. - return resultobj;
  66636. -fail:
  66637. - return NULL;
  66638. -}
  66639. -
  66640. -
  66641. -SWIGINTERN PyObject *_wrap_VImage_icc_ac2rc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66642. - PyObject *resultobj = 0;
  66643. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66644. - char *arg2 = (char *) 0 ;
  66645. - void *argp1 = 0 ;
  66646. - int res1 = 0 ;
  66647. - int res2 ;
  66648. - char *buf2 = 0 ;
  66649. - int alloc2 = 0 ;
  66650. - PyObject * obj0 = 0 ;
  66651. - PyObject * obj1 = 0 ;
  66652. - vips::VImage result;
  66653. -
  66654. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_ac2rc",&obj0,&obj1)) SWIG_fail;
  66655. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66656. - if (!SWIG_IsOK(res1)) {
  66657. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_ac2rc" "', argument " "1"" of type '" "vips::VImage *""'");
  66658. - }
  66659. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66660. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  66661. - if (!SWIG_IsOK(res2)) {
  66662. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_ac2rc" "', argument " "2"" of type '" "char *""'");
  66663. - }
  66664. - arg2 = reinterpret_cast< char * >(buf2);
  66665. - try {
  66666. - result = (arg1)->icc_ac2rc(arg2);
  66667. - }
  66668. - catch(vips::VError &_e) {
  66669. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66670. - }
  66671. -
  66672. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66673. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66674. - return resultobj;
  66675. -fail:
  66676. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66677. - return NULL;
  66678. -}
  66679. -
  66680. -
  66681. -SWIGINTERN PyObject *_wrap_VImage_icc_export_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66682. - PyObject *resultobj = 0;
  66683. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66684. - int arg2 ;
  66685. - char *arg3 = (char *) 0 ;
  66686. - int arg4 ;
  66687. - void *argp1 = 0 ;
  66688. - int res1 = 0 ;
  66689. - int val2 ;
  66690. - int ecode2 = 0 ;
  66691. - int res3 ;
  66692. - char *buf3 = 0 ;
  66693. - int alloc3 = 0 ;
  66694. - int val4 ;
  66695. - int ecode4 = 0 ;
  66696. - PyObject * obj0 = 0 ;
  66697. - PyObject * obj1 = 0 ;
  66698. - PyObject * obj2 = 0 ;
  66699. - PyObject * obj3 = 0 ;
  66700. - vips::VImage result;
  66701. -
  66702. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_export_depth",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  66703. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66704. - if (!SWIG_IsOK(res1)) {
  66705. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export_depth" "', argument " "1"" of type '" "vips::VImage *""'");
  66706. - }
  66707. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66708. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  66709. - if (!SWIG_IsOK(ecode2)) {
  66710. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_export_depth" "', argument " "2"" of type '" "int""'");
  66711. - }
  66712. - arg2 = static_cast< int >(val2);
  66713. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  66714. - if (!SWIG_IsOK(res3)) {
  66715. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_export_depth" "', argument " "3"" of type '" "char *""'");
  66716. - }
  66717. - arg3 = reinterpret_cast< char * >(buf3);
  66718. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  66719. - if (!SWIG_IsOK(ecode4)) {
  66720. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_export_depth" "', argument " "4"" of type '" "int""'");
  66721. - }
  66722. - arg4 = static_cast< int >(val4);
  66723. - try {
  66724. - result = (arg1)->icc_export_depth(arg2,arg3,arg4);
  66725. - }
  66726. - catch(vips::VError &_e) {
  66727. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66728. - }
  66729. -
  66730. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66731. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  66732. - return resultobj;
  66733. -fail:
  66734. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  66735. - return NULL;
  66736. -}
  66737. -
  66738. -
  66739. -SWIGINTERN PyObject *_wrap_VImage_icc_import(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66740. - PyObject *resultobj = 0;
  66741. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66742. - char *arg2 = (char *) 0 ;
  66743. - int arg3 ;
  66744. - void *argp1 = 0 ;
  66745. - int res1 = 0 ;
  66746. - int res2 ;
  66747. - char *buf2 = 0 ;
  66748. - int alloc2 = 0 ;
  66749. - int val3 ;
  66750. - int ecode3 = 0 ;
  66751. - PyObject * obj0 = 0 ;
  66752. - PyObject * obj1 = 0 ;
  66753. - PyObject * obj2 = 0 ;
  66754. - vips::VImage result;
  66755. -
  66756. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_import",&obj0,&obj1,&obj2)) SWIG_fail;
  66757. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66758. - if (!SWIG_IsOK(res1)) {
  66759. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import" "', argument " "1"" of type '" "vips::VImage *""'");
  66760. - }
  66761. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66762. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  66763. - if (!SWIG_IsOK(res2)) {
  66764. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_import" "', argument " "2"" of type '" "char *""'");
  66765. - }
  66766. - arg2 = reinterpret_cast< char * >(buf2);
  66767. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  66768. - if (!SWIG_IsOK(ecode3)) {
  66769. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_import" "', argument " "3"" of type '" "int""'");
  66770. - }
  66771. - arg3 = static_cast< int >(val3);
  66772. - try {
  66773. - result = (arg1)->icc_import(arg2,arg3);
  66774. - }
  66775. - catch(vips::VError &_e) {
  66776. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66777. - }
  66778. -
  66779. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66780. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66781. - return resultobj;
  66782. -fail:
  66783. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66784. - return NULL;
  66785. -}
  66786. -
  66787. -
  66788. -SWIGINTERN PyObject *_wrap_VImage_icc_import_embedded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66789. - PyObject *resultobj = 0;
  66790. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66791. - int arg2 ;
  66792. - void *argp1 = 0 ;
  66793. - int res1 = 0 ;
  66794. - int val2 ;
  66795. - int ecode2 = 0 ;
  66796. - PyObject * obj0 = 0 ;
  66797. - PyObject * obj1 = 0 ;
  66798. - vips::VImage result;
  66799. -
  66800. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_import_embedded",&obj0,&obj1)) SWIG_fail;
  66801. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66802. - if (!SWIG_IsOK(res1)) {
  66803. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import_embedded" "', argument " "1"" of type '" "vips::VImage *""'");
  66804. - }
  66805. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66806. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  66807. - if (!SWIG_IsOK(ecode2)) {
  66808. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_import_embedded" "', argument " "2"" of type '" "int""'");
  66809. - }
  66810. - arg2 = static_cast< int >(val2);
  66811. - try {
  66812. - result = (arg1)->icc_import_embedded(arg2);
  66813. - }
  66814. - catch(vips::VError &_e) {
  66815. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66816. - }
  66817. -
  66818. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66819. - return resultobj;
  66820. -fail:
  66821. - return NULL;
  66822. -}
  66823. -
  66824. -
  66825. -SWIGINTERN PyObject *_wrap_VImage_icc_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66826. - PyObject *resultobj = 0;
  66827. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66828. - char *arg2 = (char *) 0 ;
  66829. - char *arg3 = (char *) 0 ;
  66830. - int arg4 ;
  66831. - void *argp1 = 0 ;
  66832. - int res1 = 0 ;
  66833. - int res2 ;
  66834. - char *buf2 = 0 ;
  66835. - int alloc2 = 0 ;
  66836. - int res3 ;
  66837. - char *buf3 = 0 ;
  66838. - int alloc3 = 0 ;
  66839. - int val4 ;
  66840. - int ecode4 = 0 ;
  66841. - PyObject * obj0 = 0 ;
  66842. - PyObject * obj1 = 0 ;
  66843. - PyObject * obj2 = 0 ;
  66844. - PyObject * obj3 = 0 ;
  66845. - vips::VImage result;
  66846. -
  66847. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  66848. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66849. - if (!SWIG_IsOK(res1)) {
  66850. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_transform" "', argument " "1"" of type '" "vips::VImage *""'");
  66851. - }
  66852. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66853. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  66854. - if (!SWIG_IsOK(res2)) {
  66855. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_transform" "', argument " "2"" of type '" "char *""'");
  66856. - }
  66857. - arg2 = reinterpret_cast< char * >(buf2);
  66858. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  66859. - if (!SWIG_IsOK(res3)) {
  66860. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_transform" "', argument " "3"" of type '" "char *""'");
  66861. - }
  66862. - arg3 = reinterpret_cast< char * >(buf3);
  66863. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  66864. - if (!SWIG_IsOK(ecode4)) {
  66865. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_transform" "', argument " "4"" of type '" "int""'");
  66866. - }
  66867. - arg4 = static_cast< int >(val4);
  66868. - try {
  66869. - result = (arg1)->icc_transform(arg2,arg3,arg4);
  66870. - }
  66871. - catch(vips::VError &_e) {
  66872. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66873. - }
  66874. -
  66875. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66876. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66877. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  66878. - return resultobj;
  66879. -fail:
  66880. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  66881. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  66882. - return NULL;
  66883. -}
  66884. -
  66885. -
  66886. -SWIGINTERN PyObject *_wrap_VImage_lab_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66887. - PyObject *resultobj = 0;
  66888. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66889. - vips::VDMask arg2 ;
  66890. - double arg3 ;
  66891. - double arg4 ;
  66892. - double arg5 ;
  66893. - double arg6 ;
  66894. - void *argp1 = 0 ;
  66895. - int res1 = 0 ;
  66896. - void *argp2 ;
  66897. - int res2 = 0 ;
  66898. - double val3 ;
  66899. - int ecode3 = 0 ;
  66900. - double val4 ;
  66901. - int ecode4 = 0 ;
  66902. - double val5 ;
  66903. - int ecode5 = 0 ;
  66904. - double val6 ;
  66905. - int ecode6 = 0 ;
  66906. - PyObject * obj0 = 0 ;
  66907. - PyObject * obj1 = 0 ;
  66908. - PyObject * obj2 = 0 ;
  66909. - PyObject * obj3 = 0 ;
  66910. - PyObject * obj4 = 0 ;
  66911. - PyObject * obj5 = 0 ;
  66912. - vips::VImage result;
  66913. -
  66914. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_lab_morph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  66915. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66916. - if (!SWIG_IsOK(res1)) {
  66917. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lab_morph" "', argument " "1"" of type '" "vips::VImage *""'");
  66918. - }
  66919. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66920. - {
  66921. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  66922. - if (!SWIG_IsOK(res2)) {
  66923. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'");
  66924. - }
  66925. - if (!argp2) {
  66926. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'");
  66927. - } else {
  66928. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  66929. - arg2 = *temp;
  66930. - if (SWIG_IsNewObj(res2)) delete temp;
  66931. - }
  66932. - }
  66933. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  66934. - if (!SWIG_IsOK(ecode3)) {
  66935. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lab_morph" "', argument " "3"" of type '" "double""'");
  66936. - }
  66937. - arg3 = static_cast< double >(val3);
  66938. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  66939. - if (!SWIG_IsOK(ecode4)) {
  66940. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lab_morph" "', argument " "4"" of type '" "double""'");
  66941. - }
  66942. - arg4 = static_cast< double >(val4);
  66943. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  66944. - if (!SWIG_IsOK(ecode5)) {
  66945. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lab_morph" "', argument " "5"" of type '" "double""'");
  66946. - }
  66947. - arg5 = static_cast< double >(val5);
  66948. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  66949. - if (!SWIG_IsOK(ecode6)) {
  66950. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lab_morph" "', argument " "6"" of type '" "double""'");
  66951. - }
  66952. - arg6 = static_cast< double >(val6);
  66953. - try {
  66954. - result = (arg1)->lab_morph(arg2,arg3,arg4,arg5,arg6);
  66955. - }
  66956. - catch(vips::VError &_e) {
  66957. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66958. - }
  66959. -
  66960. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66961. - return resultobj;
  66962. -fail:
  66963. - return NULL;
  66964. -}
  66965. -
  66966. -
  66967. -SWIGINTERN PyObject *_wrap_VImage_rad2float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66968. - PyObject *resultobj = 0;
  66969. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66970. - void *argp1 = 0 ;
  66971. - int res1 = 0 ;
  66972. - PyObject * obj0 = 0 ;
  66973. - vips::VImage result;
  66974. -
  66975. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rad2float",&obj0)) SWIG_fail;
  66976. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  66977. - if (!SWIG_IsOK(res1)) {
  66978. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rad2float" "', argument " "1"" of type '" "vips::VImage *""'");
  66979. - }
  66980. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  66981. - try {
  66982. - result = (arg1)->rad2float();
  66983. - }
  66984. - catch(vips::VError &_e) {
  66985. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  66986. - }
  66987. -
  66988. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  66989. - return resultobj;
  66990. -fail:
  66991. - return NULL;
  66992. -}
  66993. -
  66994. -
  66995. -SWIGINTERN PyObject *_wrap_VImage_sRGB2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  66996. - PyObject *resultobj = 0;
  66997. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  66998. - void *argp1 = 0 ;
  66999. - int res1 = 0 ;
  67000. - PyObject * obj0 = 0 ;
  67001. - vips::VImage result;
  67002. -
  67003. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_sRGB2XYZ",&obj0)) SWIG_fail;
  67004. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67005. - if (!SWIG_IsOK(res1)) {
  67006. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sRGB2XYZ" "', argument " "1"" of type '" "vips::VImage *""'");
  67007. - }
  67008. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67009. - try {
  67010. - result = (arg1)->sRGB2XYZ();
  67011. - }
  67012. - catch(vips::VError &_e) {
  67013. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67014. - }
  67015. -
  67016. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67017. - return resultobj;
  67018. -fail:
  67019. - return NULL;
  67020. -}
  67021. -
  67022. -
  67023. -SWIGINTERN PyObject *_wrap_VImage_gaussnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67024. - PyObject *resultobj = 0;
  67025. - int arg1 ;
  67026. - int arg2 ;
  67027. - double arg3 ;
  67028. - double arg4 ;
  67029. - int val1 ;
  67030. - int ecode1 = 0 ;
  67031. - int val2 ;
  67032. - int ecode2 = 0 ;
  67033. - double val3 ;
  67034. - int ecode3 = 0 ;
  67035. - double val4 ;
  67036. - int ecode4 = 0 ;
  67037. - PyObject * obj0 = 0 ;
  67038. - PyObject * obj1 = 0 ;
  67039. - PyObject * obj2 = 0 ;
  67040. - PyObject * obj3 = 0 ;
  67041. - vips::VImage result;
  67042. -
  67043. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_gaussnoise",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  67044. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  67045. - if (!SWIG_IsOK(ecode1)) {
  67046. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_gaussnoise" "', argument " "1"" of type '" "int""'");
  67047. - }
  67048. - arg1 = static_cast< int >(val1);
  67049. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67050. - if (!SWIG_IsOK(ecode2)) {
  67051. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gaussnoise" "', argument " "2"" of type '" "int""'");
  67052. - }
  67053. - arg2 = static_cast< int >(val2);
  67054. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  67055. - if (!SWIG_IsOK(ecode3)) {
  67056. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gaussnoise" "', argument " "3"" of type '" "double""'");
  67057. - }
  67058. - arg3 = static_cast< double >(val3);
  67059. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  67060. - if (!SWIG_IsOK(ecode4)) {
  67061. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_gaussnoise" "', argument " "4"" of type '" "double""'");
  67062. - }
  67063. - arg4 = static_cast< double >(val4);
  67064. - try {
  67065. - result = vips::VImage::gaussnoise(arg1,arg2,arg3,arg4);
  67066. - }
  67067. - catch(vips::VError &_e) {
  67068. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67069. - }
  67070. -
  67071. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67072. - return resultobj;
  67073. -fail:
  67074. - return NULL;
  67075. -}
  67076. -
  67077. -
  67078. -SWIGINTERN PyObject *_wrap_VImage_bandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67079. - PyObject *resultobj = 0;
  67080. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67081. - vips::VImage arg2 ;
  67082. - void *argp1 = 0 ;
  67083. - int res1 = 0 ;
  67084. - void *argp2 ;
  67085. - int res2 = 0 ;
  67086. - PyObject * obj0 = 0 ;
  67087. - PyObject * obj1 = 0 ;
  67088. - vips::VImage result;
  67089. -
  67090. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_bandjoin",&obj0,&obj1)) SWIG_fail;
  67091. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67092. - if (!SWIG_IsOK(res1)) {
  67093. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandjoin" "', argument " "1"" of type '" "vips::VImage *""'");
  67094. - }
  67095. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67096. - {
  67097. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  67098. - if (!SWIG_IsOK(res2)) {
  67099. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'");
  67100. - }
  67101. - if (!argp2) {
  67102. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'");
  67103. - } else {
  67104. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  67105. - arg2 = *temp;
  67106. - if (SWIG_IsNewObj(res2)) delete temp;
  67107. - }
  67108. - }
  67109. - try {
  67110. - result = (arg1)->bandjoin(arg2);
  67111. - }
  67112. - catch(vips::VError &_e) {
  67113. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67114. - }
  67115. -
  67116. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67117. - return resultobj;
  67118. -fail:
  67119. - return NULL;
  67120. -}
  67121. -
  67122. -
  67123. -SWIGINTERN PyObject *_wrap_VImage_black(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67124. - PyObject *resultobj = 0;
  67125. - int arg1 ;
  67126. - int arg2 ;
  67127. - int arg3 ;
  67128. - int val1 ;
  67129. - int ecode1 = 0 ;
  67130. - int val2 ;
  67131. - int ecode2 = 0 ;
  67132. - int val3 ;
  67133. - int ecode3 = 0 ;
  67134. - PyObject * obj0 = 0 ;
  67135. - PyObject * obj1 = 0 ;
  67136. - PyObject * obj2 = 0 ;
  67137. - vips::VImage result;
  67138. -
  67139. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_black",&obj0,&obj1,&obj2)) SWIG_fail;
  67140. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  67141. - if (!SWIG_IsOK(ecode1)) {
  67142. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_black" "', argument " "1"" of type '" "int""'");
  67143. - }
  67144. - arg1 = static_cast< int >(val1);
  67145. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67146. - if (!SWIG_IsOK(ecode2)) {
  67147. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_black" "', argument " "2"" of type '" "int""'");
  67148. - }
  67149. - arg2 = static_cast< int >(val2);
  67150. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67151. - if (!SWIG_IsOK(ecode3)) {
  67152. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_black" "', argument " "3"" of type '" "int""'");
  67153. - }
  67154. - arg3 = static_cast< int >(val3);
  67155. - try {
  67156. - result = vips::VImage::black(arg1,arg2,arg3);
  67157. - }
  67158. - catch(vips::VError &_e) {
  67159. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67160. - }
  67161. -
  67162. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67163. - return resultobj;
  67164. -fail:
  67165. - return NULL;
  67166. -}
  67167. -
  67168. -
  67169. -SWIGINTERN PyObject *_wrap_VImage_c2amph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67170. - PyObject *resultobj = 0;
  67171. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67172. - void *argp1 = 0 ;
  67173. - int res1 = 0 ;
  67174. - PyObject * obj0 = 0 ;
  67175. - vips::VImage result;
  67176. -
  67177. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2amph",&obj0)) SWIG_fail;
  67178. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67179. - if (!SWIG_IsOK(res1)) {
  67180. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2amph" "', argument " "1"" of type '" "vips::VImage *""'");
  67181. - }
  67182. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67183. - try {
  67184. - result = (arg1)->c2amph();
  67185. - }
  67186. - catch(vips::VError &_e) {
  67187. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67188. - }
  67189. -
  67190. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67191. - return resultobj;
  67192. -fail:
  67193. - return NULL;
  67194. -}
  67195. -
  67196. -
  67197. -SWIGINTERN PyObject *_wrap_VImage_c2imag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67198. - PyObject *resultobj = 0;
  67199. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67200. - void *argp1 = 0 ;
  67201. - int res1 = 0 ;
  67202. - PyObject * obj0 = 0 ;
  67203. - vips::VImage result;
  67204. -
  67205. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2imag",&obj0)) SWIG_fail;
  67206. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67207. - if (!SWIG_IsOK(res1)) {
  67208. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2imag" "', argument " "1"" of type '" "vips::VImage *""'");
  67209. - }
  67210. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67211. - try {
  67212. - result = (arg1)->c2imag();
  67213. - }
  67214. - catch(vips::VError &_e) {
  67215. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67216. - }
  67217. -
  67218. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67219. - return resultobj;
  67220. -fail:
  67221. - return NULL;
  67222. -}
  67223. -
  67224. -
  67225. -SWIGINTERN PyObject *_wrap_VImage_c2real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67226. - PyObject *resultobj = 0;
  67227. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67228. - void *argp1 = 0 ;
  67229. - int res1 = 0 ;
  67230. - PyObject * obj0 = 0 ;
  67231. - vips::VImage result;
  67232. -
  67233. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2real",&obj0)) SWIG_fail;
  67234. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67235. - if (!SWIG_IsOK(res1)) {
  67236. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2real" "', argument " "1"" of type '" "vips::VImage *""'");
  67237. - }
  67238. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67239. - try {
  67240. - result = (arg1)->c2real();
  67241. - }
  67242. - catch(vips::VError &_e) {
  67243. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67244. - }
  67245. -
  67246. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67247. - return resultobj;
  67248. -fail:
  67249. - return NULL;
  67250. -}
  67251. -
  67252. -
  67253. -SWIGINTERN PyObject *_wrap_VImage_c2rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67254. - PyObject *resultobj = 0;
  67255. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67256. - void *argp1 = 0 ;
  67257. - int res1 = 0 ;
  67258. - PyObject * obj0 = 0 ;
  67259. - vips::VImage result;
  67260. -
  67261. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2rect",&obj0)) SWIG_fail;
  67262. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67263. - if (!SWIG_IsOK(res1)) {
  67264. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2rect" "', argument " "1"" of type '" "vips::VImage *""'");
  67265. - }
  67266. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67267. - try {
  67268. - result = (arg1)->c2rect();
  67269. - }
  67270. - catch(vips::VError &_e) {
  67271. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67272. - }
  67273. -
  67274. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67275. - return resultobj;
  67276. -fail:
  67277. - return NULL;
  67278. -}
  67279. -
  67280. -
  67281. -SWIGINTERN PyObject *_wrap_VImage_clip2fmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67282. - PyObject *resultobj = 0;
  67283. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67284. - int arg2 ;
  67285. - void *argp1 = 0 ;
  67286. - int res1 = 0 ;
  67287. - int val2 ;
  67288. - int ecode2 = 0 ;
  67289. - PyObject * obj0 = 0 ;
  67290. - PyObject * obj1 = 0 ;
  67291. - vips::VImage result;
  67292. -
  67293. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_clip2fmt",&obj0,&obj1)) SWIG_fail;
  67294. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67295. - if (!SWIG_IsOK(res1)) {
  67296. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2fmt" "', argument " "1"" of type '" "vips::VImage *""'");
  67297. - }
  67298. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67299. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67300. - if (!SWIG_IsOK(ecode2)) {
  67301. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_clip2fmt" "', argument " "2"" of type '" "int""'");
  67302. - }
  67303. - arg2 = static_cast< int >(val2);
  67304. - try {
  67305. - result = (arg1)->clip2fmt(arg2);
  67306. - }
  67307. - catch(vips::VError &_e) {
  67308. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67309. - }
  67310. -
  67311. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67312. - return resultobj;
  67313. -fail:
  67314. - return NULL;
  67315. -}
  67316. -
  67317. -
  67318. -SWIGINTERN PyObject *_wrap_VImage_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67319. - PyObject *resultobj = 0;
  67320. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67321. - void *argp1 = 0 ;
  67322. - int res1 = 0 ;
  67323. - PyObject * obj0 = 0 ;
  67324. - vips::VImage result;
  67325. -
  67326. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy",&obj0)) SWIG_fail;
  67327. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67328. - if (!SWIG_IsOK(res1)) {
  67329. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy" "', argument " "1"" of type '" "vips::VImage *""'");
  67330. - }
  67331. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67332. - try {
  67333. - result = (arg1)->copy();
  67334. - }
  67335. - catch(vips::VError &_e) {
  67336. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67337. - }
  67338. -
  67339. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67340. - return resultobj;
  67341. -fail:
  67342. - return NULL;
  67343. -}
  67344. -
  67345. -
  67346. -SWIGINTERN PyObject *_wrap_VImage_copy_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67347. - PyObject *resultobj = 0;
  67348. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67349. - void *argp1 = 0 ;
  67350. - int res1 = 0 ;
  67351. - PyObject * obj0 = 0 ;
  67352. - vips::VImage result;
  67353. -
  67354. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_file",&obj0)) SWIG_fail;
  67355. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67356. - if (!SWIG_IsOK(res1)) {
  67357. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_file" "', argument " "1"" of type '" "vips::VImage *""'");
  67358. - }
  67359. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67360. - try {
  67361. - result = (arg1)->copy_file();
  67362. - }
  67363. - catch(vips::VError &_e) {
  67364. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67365. - }
  67366. -
  67367. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67368. - return resultobj;
  67369. -fail:
  67370. - return NULL;
  67371. -}
  67372. -
  67373. -
  67374. -SWIGINTERN PyObject *_wrap_VImage_copy_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67375. - PyObject *resultobj = 0;
  67376. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67377. - int arg2 ;
  67378. - int arg3 ;
  67379. - int arg4 ;
  67380. - void *argp1 = 0 ;
  67381. - int res1 = 0 ;
  67382. - int val2 ;
  67383. - int ecode2 = 0 ;
  67384. - int val3 ;
  67385. - int ecode3 = 0 ;
  67386. - int val4 ;
  67387. - int ecode4 = 0 ;
  67388. - PyObject * obj0 = 0 ;
  67389. - PyObject * obj1 = 0 ;
  67390. - PyObject * obj2 = 0 ;
  67391. - PyObject * obj3 = 0 ;
  67392. - vips::VImage result;
  67393. -
  67394. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_copy_morph",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  67395. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67396. - if (!SWIG_IsOK(res1)) {
  67397. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_morph" "', argument " "1"" of type '" "vips::VImage *""'");
  67398. - }
  67399. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67400. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67401. - if (!SWIG_IsOK(ecode2)) {
  67402. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_morph" "', argument " "2"" of type '" "int""'");
  67403. - }
  67404. - arg2 = static_cast< int >(val2);
  67405. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67406. - if (!SWIG_IsOK(ecode3)) {
  67407. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_morph" "', argument " "3"" of type '" "int""'");
  67408. - }
  67409. - arg3 = static_cast< int >(val3);
  67410. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  67411. - if (!SWIG_IsOK(ecode4)) {
  67412. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_morph" "', argument " "4"" of type '" "int""'");
  67413. - }
  67414. - arg4 = static_cast< int >(val4);
  67415. - try {
  67416. - result = (arg1)->copy_morph(arg2,arg3,arg4);
  67417. - }
  67418. - catch(vips::VError &_e) {
  67419. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67420. - }
  67421. -
  67422. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67423. - return resultobj;
  67424. -fail:
  67425. - return NULL;
  67426. -}
  67427. -
  67428. -
  67429. -SWIGINTERN PyObject *_wrap_VImage_copy_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67430. - PyObject *resultobj = 0;
  67431. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67432. - void *argp1 = 0 ;
  67433. - int res1 = 0 ;
  67434. - PyObject * obj0 = 0 ;
  67435. - vips::VImage result;
  67436. -
  67437. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_swap",&obj0)) SWIG_fail;
  67438. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67439. - if (!SWIG_IsOK(res1)) {
  67440. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_swap" "', argument " "1"" of type '" "vips::VImage *""'");
  67441. - }
  67442. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67443. - try {
  67444. - result = (arg1)->copy_swap();
  67445. - }
  67446. - catch(vips::VError &_e) {
  67447. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67448. - }
  67449. -
  67450. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67451. - return resultobj;
  67452. -fail:
  67453. - return NULL;
  67454. -}
  67455. -
  67456. -
  67457. -SWIGINTERN PyObject *_wrap_VImage_copy_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67458. - PyObject *resultobj = 0;
  67459. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67460. - int arg2 ;
  67461. - double arg3 ;
  67462. - double arg4 ;
  67463. - int arg5 ;
  67464. - int arg6 ;
  67465. - void *argp1 = 0 ;
  67466. - int res1 = 0 ;
  67467. - int val2 ;
  67468. - int ecode2 = 0 ;
  67469. - double val3 ;
  67470. - int ecode3 = 0 ;
  67471. - double val4 ;
  67472. - int ecode4 = 0 ;
  67473. - int val5 ;
  67474. - int ecode5 = 0 ;
  67475. - int val6 ;
  67476. - int ecode6 = 0 ;
  67477. - PyObject * obj0 = 0 ;
  67478. - PyObject * obj1 = 0 ;
  67479. - PyObject * obj2 = 0 ;
  67480. - PyObject * obj3 = 0 ;
  67481. - PyObject * obj4 = 0 ;
  67482. - PyObject * obj5 = 0 ;
  67483. - vips::VImage result;
  67484. -
  67485. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_copy_set",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  67486. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67487. - if (!SWIG_IsOK(res1)) {
  67488. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_set" "', argument " "1"" of type '" "vips::VImage *""'");
  67489. - }
  67490. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67491. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67492. - if (!SWIG_IsOK(ecode2)) {
  67493. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_set" "', argument " "2"" of type '" "int""'");
  67494. - }
  67495. - arg2 = static_cast< int >(val2);
  67496. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  67497. - if (!SWIG_IsOK(ecode3)) {
  67498. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_set" "', argument " "3"" of type '" "double""'");
  67499. - }
  67500. - arg3 = static_cast< double >(val3);
  67501. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  67502. - if (!SWIG_IsOK(ecode4)) {
  67503. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_set" "', argument " "4"" of type '" "double""'");
  67504. - }
  67505. - arg4 = static_cast< double >(val4);
  67506. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  67507. - if (!SWIG_IsOK(ecode5)) {
  67508. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_copy_set" "', argument " "5"" of type '" "int""'");
  67509. - }
  67510. - arg5 = static_cast< int >(val5);
  67511. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  67512. - if (!SWIG_IsOK(ecode6)) {
  67513. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_copy_set" "', argument " "6"" of type '" "int""'");
  67514. - }
  67515. - arg6 = static_cast< int >(val6);
  67516. - try {
  67517. - result = (arg1)->copy_set(arg2,arg3,arg4,arg5,arg6);
  67518. - }
  67519. - catch(vips::VError &_e) {
  67520. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67521. - }
  67522. -
  67523. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67524. - return resultobj;
  67525. -fail:
  67526. - return NULL;
  67527. -}
  67528. -
  67529. -
  67530. -SWIGINTERN PyObject *_wrap_VImage_extract_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67531. - PyObject *resultobj = 0;
  67532. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67533. - int arg2 ;
  67534. - int arg3 ;
  67535. - int arg4 ;
  67536. - int arg5 ;
  67537. - void *argp1 = 0 ;
  67538. - int res1 = 0 ;
  67539. - int val2 ;
  67540. - int ecode2 = 0 ;
  67541. - int val3 ;
  67542. - int ecode3 = 0 ;
  67543. - int val4 ;
  67544. - int ecode4 = 0 ;
  67545. - int val5 ;
  67546. - int ecode5 = 0 ;
  67547. - PyObject * obj0 = 0 ;
  67548. - PyObject * obj1 = 0 ;
  67549. - PyObject * obj2 = 0 ;
  67550. - PyObject * obj3 = 0 ;
  67551. - PyObject * obj4 = 0 ;
  67552. - vips::VImage result;
  67553. -
  67554. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_extract_area",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  67555. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67556. - if (!SWIG_IsOK(res1)) {
  67557. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_area" "', argument " "1"" of type '" "vips::VImage *""'");
  67558. - }
  67559. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67560. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67561. - if (!SWIG_IsOK(ecode2)) {
  67562. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_area" "', argument " "2"" of type '" "int""'");
  67563. - }
  67564. - arg2 = static_cast< int >(val2);
  67565. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67566. - if (!SWIG_IsOK(ecode3)) {
  67567. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_area" "', argument " "3"" of type '" "int""'");
  67568. - }
  67569. - arg3 = static_cast< int >(val3);
  67570. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  67571. - if (!SWIG_IsOK(ecode4)) {
  67572. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_area" "', argument " "4"" of type '" "int""'");
  67573. - }
  67574. - arg4 = static_cast< int >(val4);
  67575. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  67576. - if (!SWIG_IsOK(ecode5)) {
  67577. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_area" "', argument " "5"" of type '" "int""'");
  67578. - }
  67579. - arg5 = static_cast< int >(val5);
  67580. - try {
  67581. - result = (arg1)->extract_area(arg2,arg3,arg4,arg5);
  67582. - }
  67583. - catch(vips::VError &_e) {
  67584. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67585. - }
  67586. -
  67587. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67588. - return resultobj;
  67589. -fail:
  67590. - return NULL;
  67591. -}
  67592. -
  67593. -
  67594. -SWIGINTERN PyObject *_wrap_VImage_extract_areabands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67595. - PyObject *resultobj = 0;
  67596. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67597. - int arg2 ;
  67598. - int arg3 ;
  67599. - int arg4 ;
  67600. - int arg5 ;
  67601. - int arg6 ;
  67602. - int arg7 ;
  67603. - void *argp1 = 0 ;
  67604. - int res1 = 0 ;
  67605. - int val2 ;
  67606. - int ecode2 = 0 ;
  67607. - int val3 ;
  67608. - int ecode3 = 0 ;
  67609. - int val4 ;
  67610. - int ecode4 = 0 ;
  67611. - int val5 ;
  67612. - int ecode5 = 0 ;
  67613. - int val6 ;
  67614. - int ecode6 = 0 ;
  67615. - int val7 ;
  67616. - int ecode7 = 0 ;
  67617. - PyObject * obj0 = 0 ;
  67618. - PyObject * obj1 = 0 ;
  67619. - PyObject * obj2 = 0 ;
  67620. - PyObject * obj3 = 0 ;
  67621. - PyObject * obj4 = 0 ;
  67622. - PyObject * obj5 = 0 ;
  67623. - PyObject * obj6 = 0 ;
  67624. - vips::VImage result;
  67625. -
  67626. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_extract_areabands",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  67627. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67628. - if (!SWIG_IsOK(res1)) {
  67629. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_areabands" "', argument " "1"" of type '" "vips::VImage *""'");
  67630. - }
  67631. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67632. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67633. - if (!SWIG_IsOK(ecode2)) {
  67634. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_areabands" "', argument " "2"" of type '" "int""'");
  67635. - }
  67636. - arg2 = static_cast< int >(val2);
  67637. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67638. - if (!SWIG_IsOK(ecode3)) {
  67639. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_areabands" "', argument " "3"" of type '" "int""'");
  67640. - }
  67641. - arg3 = static_cast< int >(val3);
  67642. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  67643. - if (!SWIG_IsOK(ecode4)) {
  67644. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_areabands" "', argument " "4"" of type '" "int""'");
  67645. - }
  67646. - arg4 = static_cast< int >(val4);
  67647. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  67648. - if (!SWIG_IsOK(ecode5)) {
  67649. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_areabands" "', argument " "5"" of type '" "int""'");
  67650. - }
  67651. - arg5 = static_cast< int >(val5);
  67652. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  67653. - if (!SWIG_IsOK(ecode6)) {
  67654. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract_areabands" "', argument " "6"" of type '" "int""'");
  67655. - }
  67656. - arg6 = static_cast< int >(val6);
  67657. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  67658. - if (!SWIG_IsOK(ecode7)) {
  67659. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_extract_areabands" "', argument " "7"" of type '" "int""'");
  67660. - }
  67661. - arg7 = static_cast< int >(val7);
  67662. - try {
  67663. - result = (arg1)->extract_areabands(arg2,arg3,arg4,arg5,arg6,arg7);
  67664. - }
  67665. - catch(vips::VError &_e) {
  67666. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67667. - }
  67668. -
  67669. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67670. - return resultobj;
  67671. -fail:
  67672. - return NULL;
  67673. -}
  67674. -
  67675. -
  67676. -SWIGINTERN PyObject *_wrap_VImage_extract_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67677. - PyObject *resultobj = 0;
  67678. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67679. - int arg2 ;
  67680. - void *argp1 = 0 ;
  67681. - int res1 = 0 ;
  67682. - int val2 ;
  67683. - int ecode2 = 0 ;
  67684. - PyObject * obj0 = 0 ;
  67685. - PyObject * obj1 = 0 ;
  67686. - vips::VImage result;
  67687. -
  67688. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_extract_band",&obj0,&obj1)) SWIG_fail;
  67689. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67690. - if (!SWIG_IsOK(res1)) {
  67691. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_band" "', argument " "1"" of type '" "vips::VImage *""'");
  67692. - }
  67693. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67694. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67695. - if (!SWIG_IsOK(ecode2)) {
  67696. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_band" "', argument " "2"" of type '" "int""'");
  67697. - }
  67698. - arg2 = static_cast< int >(val2);
  67699. - try {
  67700. - result = (arg1)->extract_band(arg2);
  67701. - }
  67702. - catch(vips::VError &_e) {
  67703. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67704. - }
  67705. -
  67706. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67707. - return resultobj;
  67708. -fail:
  67709. - return NULL;
  67710. -}
  67711. -
  67712. -
  67713. -SWIGINTERN PyObject *_wrap_VImage_extract_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67714. - PyObject *resultobj = 0;
  67715. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67716. - int arg2 ;
  67717. - int arg3 ;
  67718. - void *argp1 = 0 ;
  67719. - int res1 = 0 ;
  67720. - int val2 ;
  67721. - int ecode2 = 0 ;
  67722. - int val3 ;
  67723. - int ecode3 = 0 ;
  67724. - PyObject * obj0 = 0 ;
  67725. - PyObject * obj1 = 0 ;
  67726. - PyObject * obj2 = 0 ;
  67727. - vips::VImage result;
  67728. -
  67729. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_extract_bands",&obj0,&obj1,&obj2)) SWIG_fail;
  67730. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67731. - if (!SWIG_IsOK(res1)) {
  67732. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_bands" "', argument " "1"" of type '" "vips::VImage *""'");
  67733. - }
  67734. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67735. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67736. - if (!SWIG_IsOK(ecode2)) {
  67737. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_bands" "', argument " "2"" of type '" "int""'");
  67738. - }
  67739. - arg2 = static_cast< int >(val2);
  67740. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67741. - if (!SWIG_IsOK(ecode3)) {
  67742. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_bands" "', argument " "3"" of type '" "int""'");
  67743. - }
  67744. - arg3 = static_cast< int >(val3);
  67745. - try {
  67746. - result = (arg1)->extract_bands(arg2,arg3);
  67747. - }
  67748. - catch(vips::VError &_e) {
  67749. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67750. - }
  67751. -
  67752. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67753. - return resultobj;
  67754. -fail:
  67755. - return NULL;
  67756. -}
  67757. -
  67758. -
  67759. -SWIGINTERN PyObject *_wrap_VImage_extract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67760. - PyObject *resultobj = 0;
  67761. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67762. - int arg2 ;
  67763. - int arg3 ;
  67764. - int arg4 ;
  67765. - int arg5 ;
  67766. - int arg6 ;
  67767. - void *argp1 = 0 ;
  67768. - int res1 = 0 ;
  67769. - int val2 ;
  67770. - int ecode2 = 0 ;
  67771. - int val3 ;
  67772. - int ecode3 = 0 ;
  67773. - int val4 ;
  67774. - int ecode4 = 0 ;
  67775. - int val5 ;
  67776. - int ecode5 = 0 ;
  67777. - int val6 ;
  67778. - int ecode6 = 0 ;
  67779. - PyObject * obj0 = 0 ;
  67780. - PyObject * obj1 = 0 ;
  67781. - PyObject * obj2 = 0 ;
  67782. - PyObject * obj3 = 0 ;
  67783. - PyObject * obj4 = 0 ;
  67784. - PyObject * obj5 = 0 ;
  67785. - vips::VImage result;
  67786. -
  67787. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_extract",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  67788. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67789. - if (!SWIG_IsOK(res1)) {
  67790. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract" "', argument " "1"" of type '" "vips::VImage *""'");
  67791. - }
  67792. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67793. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67794. - if (!SWIG_IsOK(ecode2)) {
  67795. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract" "', argument " "2"" of type '" "int""'");
  67796. - }
  67797. - arg2 = static_cast< int >(val2);
  67798. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67799. - if (!SWIG_IsOK(ecode3)) {
  67800. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract" "', argument " "3"" of type '" "int""'");
  67801. - }
  67802. - arg3 = static_cast< int >(val3);
  67803. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  67804. - if (!SWIG_IsOK(ecode4)) {
  67805. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract" "', argument " "4"" of type '" "int""'");
  67806. - }
  67807. - arg4 = static_cast< int >(val4);
  67808. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  67809. - if (!SWIG_IsOK(ecode5)) {
  67810. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract" "', argument " "5"" of type '" "int""'");
  67811. - }
  67812. - arg5 = static_cast< int >(val5);
  67813. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  67814. - if (!SWIG_IsOK(ecode6)) {
  67815. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract" "', argument " "6"" of type '" "int""'");
  67816. - }
  67817. - arg6 = static_cast< int >(val6);
  67818. - try {
  67819. - result = (arg1)->extract(arg2,arg3,arg4,arg5,arg6);
  67820. - }
  67821. - catch(vips::VError &_e) {
  67822. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67823. - }
  67824. -
  67825. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67826. - return resultobj;
  67827. -fail:
  67828. - return NULL;
  67829. -}
  67830. -
  67831. -
  67832. -SWIGINTERN PyObject *_wrap_VImage_falsecolour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67833. - PyObject *resultobj = 0;
  67834. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67835. - void *argp1 = 0 ;
  67836. - int res1 = 0 ;
  67837. - PyObject * obj0 = 0 ;
  67838. - vips::VImage result;
  67839. -
  67840. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_falsecolour",&obj0)) SWIG_fail;
  67841. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67842. - if (!SWIG_IsOK(res1)) {
  67843. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_falsecolour" "', argument " "1"" of type '" "vips::VImage *""'");
  67844. - }
  67845. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67846. - try {
  67847. - result = (arg1)->falsecolour();
  67848. - }
  67849. - catch(vips::VError &_e) {
  67850. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67851. - }
  67852. -
  67853. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67854. - return resultobj;
  67855. -fail:
  67856. - return NULL;
  67857. -}
  67858. -
  67859. -
  67860. -SWIGINTERN PyObject *_wrap_VImage_fliphor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67861. - PyObject *resultobj = 0;
  67862. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67863. - void *argp1 = 0 ;
  67864. - int res1 = 0 ;
  67865. - PyObject * obj0 = 0 ;
  67866. - vips::VImage result;
  67867. -
  67868. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fliphor",&obj0)) SWIG_fail;
  67869. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67870. - if (!SWIG_IsOK(res1)) {
  67871. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fliphor" "', argument " "1"" of type '" "vips::VImage *""'");
  67872. - }
  67873. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67874. - try {
  67875. - result = (arg1)->fliphor();
  67876. - }
  67877. - catch(vips::VError &_e) {
  67878. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67879. - }
  67880. -
  67881. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67882. - return resultobj;
  67883. -fail:
  67884. - return NULL;
  67885. -}
  67886. -
  67887. -
  67888. -SWIGINTERN PyObject *_wrap_VImage_flipver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67889. - PyObject *resultobj = 0;
  67890. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67891. - void *argp1 = 0 ;
  67892. - int res1 = 0 ;
  67893. - PyObject * obj0 = 0 ;
  67894. - vips::VImage result;
  67895. -
  67896. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_flipver",&obj0)) SWIG_fail;
  67897. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67898. - if (!SWIG_IsOK(res1)) {
  67899. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flipver" "', argument " "1"" of type '" "vips::VImage *""'");
  67900. - }
  67901. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67902. - try {
  67903. - result = (arg1)->flipver();
  67904. - }
  67905. - catch(vips::VError &_e) {
  67906. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67907. - }
  67908. -
  67909. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67910. - return resultobj;
  67911. -fail:
  67912. - return NULL;
  67913. -}
  67914. -
  67915. -
  67916. -SWIGINTERN PyObject *_wrap_VImage_gbandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67917. - PyObject *resultobj = 0;
  67918. - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
  67919. - PyObject * obj0 = 0 ;
  67920. - vips::VImage result;
  67921. -
  67922. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_gbandjoin",&obj0)) SWIG_fail;
  67923. - {
  67924. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  67925. - int res = swig::asptr(obj0, &ptr);
  67926. - if (!SWIG_IsOK(res) || !ptr) {
  67927. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_gbandjoin" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
  67928. - }
  67929. - arg1 = *ptr;
  67930. - if (SWIG_IsNewObj(res)) delete ptr;
  67931. - }
  67932. - try {
  67933. - result = vips::VImage::gbandjoin(arg1);
  67934. - }
  67935. - catch(vips::VError &_e) {
  67936. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67937. - }
  67938. -
  67939. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67940. - return resultobj;
  67941. -fail:
  67942. - return NULL;
  67943. -}
  67944. -
  67945. -
  67946. -SWIGINTERN PyObject *_wrap_VImage_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  67947. - PyObject *resultobj = 0;
  67948. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  67949. - int arg2 ;
  67950. - int arg3 ;
  67951. - int arg4 ;
  67952. - void *argp1 = 0 ;
  67953. - int res1 = 0 ;
  67954. - int val2 ;
  67955. - int ecode2 = 0 ;
  67956. - int val3 ;
  67957. - int ecode3 = 0 ;
  67958. - int val4 ;
  67959. - int ecode4 = 0 ;
  67960. - PyObject * obj0 = 0 ;
  67961. - PyObject * obj1 = 0 ;
  67962. - PyObject * obj2 = 0 ;
  67963. - PyObject * obj3 = 0 ;
  67964. - vips::VImage result;
  67965. -
  67966. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_grid",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  67967. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  67968. - if (!SWIG_IsOK(res1)) {
  67969. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grid" "', argument " "1"" of type '" "vips::VImage *""'");
  67970. - }
  67971. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  67972. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  67973. - if (!SWIG_IsOK(ecode2)) {
  67974. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grid" "', argument " "2"" of type '" "int""'");
  67975. - }
  67976. - arg2 = static_cast< int >(val2);
  67977. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  67978. - if (!SWIG_IsOK(ecode3)) {
  67979. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_grid" "', argument " "3"" of type '" "int""'");
  67980. - }
  67981. - arg3 = static_cast< int >(val3);
  67982. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  67983. - if (!SWIG_IsOK(ecode4)) {
  67984. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_grid" "', argument " "4"" of type '" "int""'");
  67985. - }
  67986. - arg4 = static_cast< int >(val4);
  67987. - try {
  67988. - result = (arg1)->grid(arg2,arg3,arg4);
  67989. - }
  67990. - catch(vips::VError &_e) {
  67991. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  67992. - }
  67993. -
  67994. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  67995. - return resultobj;
  67996. -fail:
  67997. - return NULL;
  67998. -}
  67999. -
  68000. -
  68001. -SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68002. - PyObject *resultobj = 0;
  68003. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68004. - vips::VImage arg2 ;
  68005. - int arg3 ;
  68006. - int arg4 ;
  68007. - void *argp1 = 0 ;
  68008. - int res1 = 0 ;
  68009. - void *argp2 ;
  68010. - int res2 = 0 ;
  68011. - int val3 ;
  68012. - int ecode3 = 0 ;
  68013. - int val4 ;
  68014. - int ecode4 = 0 ;
  68015. - PyObject * obj0 = 0 ;
  68016. - PyObject * obj1 = 0 ;
  68017. - PyObject * obj2 = 0 ;
  68018. - PyObject * obj3 = 0 ;
  68019. - vips::VImage result;
  68020. -
  68021. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  68022. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68023. - if (!SWIG_IsOK(res1)) {
  68024. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'");
  68025. - }
  68026. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68027. - {
  68028. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68029. - if (!SWIG_IsOK(res2)) {
  68030. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
  68031. - }
  68032. - if (!argp2) {
  68033. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
  68034. - } else {
  68035. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68036. - arg2 = *temp;
  68037. - if (SWIG_IsNewObj(res2)) delete temp;
  68038. - }
  68039. - }
  68040. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68041. - if (!SWIG_IsOK(ecode3)) {
  68042. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert" "', argument " "3"" of type '" "int""'");
  68043. - }
  68044. - arg3 = static_cast< int >(val3);
  68045. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  68046. - if (!SWIG_IsOK(ecode4)) {
  68047. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert" "', argument " "4"" of type '" "int""'");
  68048. - }
  68049. - arg4 = static_cast< int >(val4);
  68050. - try {
  68051. - result = (arg1)->insert(arg2,arg3,arg4);
  68052. - }
  68053. - catch(vips::VError &_e) {
  68054. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68055. - }
  68056. -
  68057. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68058. - return resultobj;
  68059. -fail:
  68060. - return NULL;
  68061. -}
  68062. -
  68063. -
  68064. -SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68065. - PyObject *resultobj = 0;
  68066. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68067. - vips::VImage arg2 ;
  68068. - std::vector< int,std::allocator< int > > arg3 ;
  68069. - std::vector< int,std::allocator< int > > arg4 ;
  68070. - void *argp1 = 0 ;
  68071. - int res1 = 0 ;
  68072. - void *argp2 ;
  68073. - int res2 = 0 ;
  68074. - PyObject * obj0 = 0 ;
  68075. - PyObject * obj1 = 0 ;
  68076. - PyObject * obj2 = 0 ;
  68077. - PyObject * obj3 = 0 ;
  68078. - vips::VImage result;
  68079. -
  68080. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  68081. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68082. - if (!SWIG_IsOK(res1)) {
  68083. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'");
  68084. - }
  68085. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68086. - {
  68087. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68088. - if (!SWIG_IsOK(res2)) {
  68089. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
  68090. - }
  68091. - if (!argp2) {
  68092. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'");
  68093. - } else {
  68094. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68095. - arg2 = *temp;
  68096. - if (SWIG_IsNewObj(res2)) delete temp;
  68097. - }
  68098. - }
  68099. - {
  68100. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  68101. - int res = swig::asptr(obj2, &ptr);
  68102. - if (!SWIG_IsOK(res) || !ptr) {
  68103. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'");
  68104. - }
  68105. - arg3 = *ptr;
  68106. - if (SWIG_IsNewObj(res)) delete ptr;
  68107. - }
  68108. - {
  68109. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  68110. - int res = swig::asptr(obj3, &ptr);
  68111. - if (!SWIG_IsOK(res) || !ptr) {
  68112. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
  68113. - }
  68114. - arg4 = *ptr;
  68115. - if (SWIG_IsNewObj(res)) delete ptr;
  68116. - }
  68117. - try {
  68118. - result = (arg1)->insert(arg2,arg3,arg4);
  68119. - }
  68120. - catch(vips::VError &_e) {
  68121. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68122. - }
  68123. -
  68124. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68125. - return resultobj;
  68126. -fail:
  68127. - return NULL;
  68128. -}
  68129. -
  68130. -
  68131. -SWIGINTERN PyObject *_wrap_VImage_insert(PyObject *self, PyObject *args) {
  68132. - int argc;
  68133. - PyObject *argv[5];
  68134. - int ii;
  68135. -
  68136. - if (!PyTuple_Check(args)) SWIG_fail;
  68137. - argc = args ? (int)PyObject_Length(args) : 0;
  68138. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  68139. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  68140. - }
  68141. - if (argc == 4) {
  68142. - int _v;
  68143. - void *vptr = 0;
  68144. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  68145. - _v = SWIG_CheckState(res);
  68146. - if (_v) {
  68147. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  68148. - _v = SWIG_CheckState(res);
  68149. - if (_v) {
  68150. - {
  68151. - int res = SWIG_AsVal_int(argv[2], NULL);
  68152. - _v = SWIG_CheckState(res);
  68153. - }
  68154. - if (_v) {
  68155. - {
  68156. - int res = SWIG_AsVal_int(argv[3], NULL);
  68157. - _v = SWIG_CheckState(res);
  68158. - }
  68159. - if (_v) {
  68160. - return _wrap_VImage_insert__SWIG_0(self, args);
  68161. - }
  68162. - }
  68163. - }
  68164. - }
  68165. - }
  68166. - if (argc == 4) {
  68167. - int _v;
  68168. - void *vptr = 0;
  68169. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  68170. - _v = SWIG_CheckState(res);
  68171. - if (_v) {
  68172. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  68173. - _v = SWIG_CheckState(res);
  68174. - if (_v) {
  68175. - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
  68176. - _v = SWIG_CheckState(res);
  68177. - if (_v) {
  68178. - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
  68179. - _v = SWIG_CheckState(res);
  68180. - if (_v) {
  68181. - return _wrap_VImage_insert__SWIG_1(self, args);
  68182. - }
  68183. - }
  68184. - }
  68185. - }
  68186. - }
  68187. -
  68188. -fail:
  68189. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insert'.\n"
  68190. - " Possible C/C++ prototypes are:\n"
  68191. - " vips::VImage::insert(vips::VImage,int,int)\n"
  68192. - " vips::VImage::insert(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n");
  68193. - return 0;
  68194. -}
  68195. -
  68196. -
  68197. -SWIGINTERN PyObject *_wrap_VImage_insert_noexpand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68198. - PyObject *resultobj = 0;
  68199. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68200. - vips::VImage arg2 ;
  68201. - int arg3 ;
  68202. - int arg4 ;
  68203. - void *argp1 = 0 ;
  68204. - int res1 = 0 ;
  68205. - void *argp2 ;
  68206. - int res2 = 0 ;
  68207. - int val3 ;
  68208. - int ecode3 = 0 ;
  68209. - int val4 ;
  68210. - int ecode4 = 0 ;
  68211. - PyObject * obj0 = 0 ;
  68212. - PyObject * obj1 = 0 ;
  68213. - PyObject * obj2 = 0 ;
  68214. - PyObject * obj3 = 0 ;
  68215. - vips::VImage result;
  68216. -
  68217. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert_noexpand",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  68218. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68219. - if (!SWIG_IsOK(res1)) {
  68220. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert_noexpand" "', argument " "1"" of type '" "vips::VImage *""'");
  68221. - }
  68222. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68223. - {
  68224. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68225. - if (!SWIG_IsOK(res2)) {
  68226. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'");
  68227. - }
  68228. - if (!argp2) {
  68229. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'");
  68230. - } else {
  68231. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68232. - arg2 = *temp;
  68233. - if (SWIG_IsNewObj(res2)) delete temp;
  68234. - }
  68235. - }
  68236. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68237. - if (!SWIG_IsOK(ecode3)) {
  68238. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert_noexpand" "', argument " "3"" of type '" "int""'");
  68239. - }
  68240. - arg3 = static_cast< int >(val3);
  68241. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  68242. - if (!SWIG_IsOK(ecode4)) {
  68243. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert_noexpand" "', argument " "4"" of type '" "int""'");
  68244. - }
  68245. - arg4 = static_cast< int >(val4);
  68246. - try {
  68247. - result = (arg1)->insert_noexpand(arg2,arg3,arg4);
  68248. - }
  68249. - catch(vips::VError &_e) {
  68250. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68251. - }
  68252. -
  68253. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68254. - return resultobj;
  68255. -fail:
  68256. - return NULL;
  68257. -}
  68258. -
  68259. -
  68260. -SWIGINTERN PyObject *_wrap_VImage_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68261. - PyObject *resultobj = 0;
  68262. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68263. - int arg2 ;
  68264. - int arg3 ;
  68265. - int arg4 ;
  68266. - int arg5 ;
  68267. - int arg6 ;
  68268. - void *argp1 = 0 ;
  68269. - int res1 = 0 ;
  68270. - int val2 ;
  68271. - int ecode2 = 0 ;
  68272. - int val3 ;
  68273. - int ecode3 = 0 ;
  68274. - int val4 ;
  68275. - int ecode4 = 0 ;
  68276. - int val5 ;
  68277. - int ecode5 = 0 ;
  68278. - int val6 ;
  68279. - int ecode6 = 0 ;
  68280. - PyObject * obj0 = 0 ;
  68281. - PyObject * obj1 = 0 ;
  68282. - PyObject * obj2 = 0 ;
  68283. - PyObject * obj3 = 0 ;
  68284. - PyObject * obj4 = 0 ;
  68285. - PyObject * obj5 = 0 ;
  68286. - vips::VImage result;
  68287. -
  68288. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_embed",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  68289. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68290. - if (!SWIG_IsOK(res1)) {
  68291. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_embed" "', argument " "1"" of type '" "vips::VImage *""'");
  68292. - }
  68293. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68294. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  68295. - if (!SWIG_IsOK(ecode2)) {
  68296. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_embed" "', argument " "2"" of type '" "int""'");
  68297. - }
  68298. - arg2 = static_cast< int >(val2);
  68299. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68300. - if (!SWIG_IsOK(ecode3)) {
  68301. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_embed" "', argument " "3"" of type '" "int""'");
  68302. - }
  68303. - arg3 = static_cast< int >(val3);
  68304. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  68305. - if (!SWIG_IsOK(ecode4)) {
  68306. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_embed" "', argument " "4"" of type '" "int""'");
  68307. - }
  68308. - arg4 = static_cast< int >(val4);
  68309. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  68310. - if (!SWIG_IsOK(ecode5)) {
  68311. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_embed" "', argument " "5"" of type '" "int""'");
  68312. - }
  68313. - arg5 = static_cast< int >(val5);
  68314. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  68315. - if (!SWIG_IsOK(ecode6)) {
  68316. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_embed" "', argument " "6"" of type '" "int""'");
  68317. - }
  68318. - arg6 = static_cast< int >(val6);
  68319. - try {
  68320. - result = (arg1)->embed(arg2,arg3,arg4,arg5,arg6);
  68321. - }
  68322. - catch(vips::VError &_e) {
  68323. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68324. - }
  68325. -
  68326. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68327. - return resultobj;
  68328. -fail:
  68329. - return NULL;
  68330. -}
  68331. -
  68332. -
  68333. -SWIGINTERN PyObject *_wrap_VImage_lrjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68334. - PyObject *resultobj = 0;
  68335. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68336. - vips::VImage arg2 ;
  68337. - void *argp1 = 0 ;
  68338. - int res1 = 0 ;
  68339. - void *argp2 ;
  68340. - int res2 = 0 ;
  68341. - PyObject * obj0 = 0 ;
  68342. - PyObject * obj1 = 0 ;
  68343. - vips::VImage result;
  68344. -
  68345. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lrjoin",&obj0,&obj1)) SWIG_fail;
  68346. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68347. - if (!SWIG_IsOK(res1)) {
  68348. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrjoin" "', argument " "1"" of type '" "vips::VImage *""'");
  68349. - }
  68350. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68351. - {
  68352. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68353. - if (!SWIG_IsOK(res2)) {
  68354. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'");
  68355. - }
  68356. - if (!argp2) {
  68357. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'");
  68358. - } else {
  68359. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68360. - arg2 = *temp;
  68361. - if (SWIG_IsNewObj(res2)) delete temp;
  68362. - }
  68363. - }
  68364. - try {
  68365. - result = (arg1)->lrjoin(arg2);
  68366. - }
  68367. - catch(vips::VError &_e) {
  68368. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68369. - }
  68370. -
  68371. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68372. - return resultobj;
  68373. -fail:
  68374. - return NULL;
  68375. -}
  68376. -
  68377. -
  68378. -SWIGINTERN PyObject *_wrap_VImage_msb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68379. - PyObject *resultobj = 0;
  68380. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68381. - void *argp1 = 0 ;
  68382. - int res1 = 0 ;
  68383. - PyObject * obj0 = 0 ;
  68384. - vips::VImage result;
  68385. -
  68386. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_msb",&obj0)) SWIG_fail;
  68387. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68388. - if (!SWIG_IsOK(res1)) {
  68389. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb" "', argument " "1"" of type '" "vips::VImage *""'");
  68390. - }
  68391. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68392. - try {
  68393. - result = (arg1)->msb();
  68394. - }
  68395. - catch(vips::VError &_e) {
  68396. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68397. - }
  68398. -
  68399. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68400. - return resultobj;
  68401. -fail:
  68402. - return NULL;
  68403. -}
  68404. -
  68405. -
  68406. -SWIGINTERN PyObject *_wrap_VImage_msb_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68407. - PyObject *resultobj = 0;
  68408. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68409. - int arg2 ;
  68410. - void *argp1 = 0 ;
  68411. - int res1 = 0 ;
  68412. - int val2 ;
  68413. - int ecode2 = 0 ;
  68414. - PyObject * obj0 = 0 ;
  68415. - PyObject * obj1 = 0 ;
  68416. - vips::VImage result;
  68417. -
  68418. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_msb_band",&obj0,&obj1)) SWIG_fail;
  68419. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68420. - if (!SWIG_IsOK(res1)) {
  68421. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb_band" "', argument " "1"" of type '" "vips::VImage *""'");
  68422. - }
  68423. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68424. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  68425. - if (!SWIG_IsOK(ecode2)) {
  68426. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_msb_band" "', argument " "2"" of type '" "int""'");
  68427. - }
  68428. - arg2 = static_cast< int >(val2);
  68429. - try {
  68430. - result = (arg1)->msb_band(arg2);
  68431. - }
  68432. - catch(vips::VError &_e) {
  68433. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68434. - }
  68435. -
  68436. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68437. - return resultobj;
  68438. -fail:
  68439. - return NULL;
  68440. -}
  68441. -
  68442. -
  68443. -SWIGINTERN PyObject *_wrap_VImage_replicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68444. - PyObject *resultobj = 0;
  68445. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68446. - int arg2 ;
  68447. - int arg3 ;
  68448. - void *argp1 = 0 ;
  68449. - int res1 = 0 ;
  68450. - int val2 ;
  68451. - int ecode2 = 0 ;
  68452. - int val3 ;
  68453. - int ecode3 = 0 ;
  68454. - PyObject * obj0 = 0 ;
  68455. - PyObject * obj1 = 0 ;
  68456. - PyObject * obj2 = 0 ;
  68457. - vips::VImage result;
  68458. -
  68459. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_replicate",&obj0,&obj1,&obj2)) SWIG_fail;
  68460. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68461. - if (!SWIG_IsOK(res1)) {
  68462. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_replicate" "', argument " "1"" of type '" "vips::VImage *""'");
  68463. - }
  68464. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68465. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  68466. - if (!SWIG_IsOK(ecode2)) {
  68467. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_replicate" "', argument " "2"" of type '" "int""'");
  68468. - }
  68469. - arg2 = static_cast< int >(val2);
  68470. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68471. - if (!SWIG_IsOK(ecode3)) {
  68472. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_replicate" "', argument " "3"" of type '" "int""'");
  68473. - }
  68474. - arg3 = static_cast< int >(val3);
  68475. - try {
  68476. - result = (arg1)->replicate(arg2,arg3);
  68477. - }
  68478. - catch(vips::VError &_e) {
  68479. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68480. - }
  68481. -
  68482. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68483. - return resultobj;
  68484. -fail:
  68485. - return NULL;
  68486. -}
  68487. -
  68488. -
  68489. -SWIGINTERN PyObject *_wrap_VImage_ri2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68490. - PyObject *resultobj = 0;
  68491. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68492. - vips::VImage arg2 ;
  68493. - void *argp1 = 0 ;
  68494. - int res1 = 0 ;
  68495. - void *argp2 ;
  68496. - int res2 = 0 ;
  68497. - PyObject * obj0 = 0 ;
  68498. - PyObject * obj1 = 0 ;
  68499. - vips::VImage result;
  68500. -
  68501. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_ri2c",&obj0,&obj1)) SWIG_fail;
  68502. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68503. - if (!SWIG_IsOK(res1)) {
  68504. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ri2c" "', argument " "1"" of type '" "vips::VImage *""'");
  68505. - }
  68506. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68507. - {
  68508. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68509. - if (!SWIG_IsOK(res2)) {
  68510. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'");
  68511. - }
  68512. - if (!argp2) {
  68513. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'");
  68514. - } else {
  68515. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68516. - arg2 = *temp;
  68517. - if (SWIG_IsNewObj(res2)) delete temp;
  68518. - }
  68519. - }
  68520. - try {
  68521. - result = (arg1)->ri2c(arg2);
  68522. - }
  68523. - catch(vips::VError &_e) {
  68524. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68525. - }
  68526. -
  68527. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68528. - return resultobj;
  68529. -fail:
  68530. - return NULL;
  68531. -}
  68532. -
  68533. -
  68534. -SWIGINTERN PyObject *_wrap_VImage_rot180(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68535. - PyObject *resultobj = 0;
  68536. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68537. - void *argp1 = 0 ;
  68538. - int res1 = 0 ;
  68539. - PyObject * obj0 = 0 ;
  68540. - vips::VImage result;
  68541. -
  68542. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot180",&obj0)) SWIG_fail;
  68543. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68544. - if (!SWIG_IsOK(res1)) {
  68545. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot180" "', argument " "1"" of type '" "vips::VImage *""'");
  68546. - }
  68547. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68548. - try {
  68549. - result = (arg1)->rot180();
  68550. - }
  68551. - catch(vips::VError &_e) {
  68552. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68553. - }
  68554. -
  68555. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68556. - return resultobj;
  68557. -fail:
  68558. - return NULL;
  68559. -}
  68560. -
  68561. -
  68562. -SWIGINTERN PyObject *_wrap_VImage_rot270(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68563. - PyObject *resultobj = 0;
  68564. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68565. - void *argp1 = 0 ;
  68566. - int res1 = 0 ;
  68567. - PyObject * obj0 = 0 ;
  68568. - vips::VImage result;
  68569. -
  68570. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot270",&obj0)) SWIG_fail;
  68571. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68572. - if (!SWIG_IsOK(res1)) {
  68573. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot270" "', argument " "1"" of type '" "vips::VImage *""'");
  68574. - }
  68575. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68576. - try {
  68577. - result = (arg1)->rot270();
  68578. - }
  68579. - catch(vips::VError &_e) {
  68580. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68581. - }
  68582. -
  68583. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68584. - return resultobj;
  68585. -fail:
  68586. - return NULL;
  68587. -}
  68588. -
  68589. -
  68590. -SWIGINTERN PyObject *_wrap_VImage_rot90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68591. - PyObject *resultobj = 0;
  68592. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68593. - void *argp1 = 0 ;
  68594. - int res1 = 0 ;
  68595. - PyObject * obj0 = 0 ;
  68596. - vips::VImage result;
  68597. -
  68598. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot90",&obj0)) SWIG_fail;
  68599. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68600. - if (!SWIG_IsOK(res1)) {
  68601. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot90" "', argument " "1"" of type '" "vips::VImage *""'");
  68602. - }
  68603. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68604. - try {
  68605. - result = (arg1)->rot90();
  68606. - }
  68607. - catch(vips::VError &_e) {
  68608. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68609. - }
  68610. -
  68611. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68612. - return resultobj;
  68613. -fail:
  68614. - return NULL;
  68615. -}
  68616. -
  68617. -
  68618. -SWIGINTERN PyObject *_wrap_VImage_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68619. - PyObject *resultobj = 0;
  68620. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68621. - void *argp1 = 0 ;
  68622. - int res1 = 0 ;
  68623. - PyObject * obj0 = 0 ;
  68624. - vips::VImage result;
  68625. -
  68626. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_scale",&obj0)) SWIG_fail;
  68627. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68628. - if (!SWIG_IsOK(res1)) {
  68629. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scale" "', argument " "1"" of type '" "vips::VImage *""'");
  68630. - }
  68631. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68632. - try {
  68633. - result = (arg1)->scale();
  68634. - }
  68635. - catch(vips::VError &_e) {
  68636. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68637. - }
  68638. -
  68639. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68640. - return resultobj;
  68641. -fail:
  68642. - return NULL;
  68643. -}
  68644. -
  68645. -
  68646. -SWIGINTERN PyObject *_wrap_VImage_scaleps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68647. - PyObject *resultobj = 0;
  68648. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68649. - void *argp1 = 0 ;
  68650. - int res1 = 0 ;
  68651. - PyObject * obj0 = 0 ;
  68652. - vips::VImage result;
  68653. -
  68654. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_scaleps",&obj0)) SWIG_fail;
  68655. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68656. - if (!SWIG_IsOK(res1)) {
  68657. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scaleps" "', argument " "1"" of type '" "vips::VImage *""'");
  68658. - }
  68659. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68660. - try {
  68661. - result = (arg1)->scaleps();
  68662. - }
  68663. - catch(vips::VError &_e) {
  68664. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68665. - }
  68666. -
  68667. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68668. - return resultobj;
  68669. -fail:
  68670. - return NULL;
  68671. -}
  68672. -
  68673. -
  68674. -SWIGINTERN PyObject *_wrap_VImage_subsample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68675. - PyObject *resultobj = 0;
  68676. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68677. - int arg2 ;
  68678. - int arg3 ;
  68679. - void *argp1 = 0 ;
  68680. - int res1 = 0 ;
  68681. - int val2 ;
  68682. - int ecode2 = 0 ;
  68683. - int val3 ;
  68684. - int ecode3 = 0 ;
  68685. - PyObject * obj0 = 0 ;
  68686. - PyObject * obj1 = 0 ;
  68687. - PyObject * obj2 = 0 ;
  68688. - vips::VImage result;
  68689. -
  68690. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_subsample",&obj0,&obj1,&obj2)) SWIG_fail;
  68691. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68692. - if (!SWIG_IsOK(res1)) {
  68693. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subsample" "', argument " "1"" of type '" "vips::VImage *""'");
  68694. - }
  68695. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68696. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  68697. - if (!SWIG_IsOK(ecode2)) {
  68698. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_subsample" "', argument " "2"" of type '" "int""'");
  68699. - }
  68700. - arg2 = static_cast< int >(val2);
  68701. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68702. - if (!SWIG_IsOK(ecode3)) {
  68703. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_subsample" "', argument " "3"" of type '" "int""'");
  68704. - }
  68705. - arg3 = static_cast< int >(val3);
  68706. - try {
  68707. - result = (arg1)->subsample(arg2,arg3);
  68708. - }
  68709. - catch(vips::VError &_e) {
  68710. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68711. - }
  68712. -
  68713. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68714. - return resultobj;
  68715. -fail:
  68716. - return NULL;
  68717. -}
  68718. -
  68719. -
  68720. -SWIGINTERN PyObject *_wrap_VImage_system(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68721. - PyObject *resultobj = 0;
  68722. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68723. - char *arg2 = (char *) 0 ;
  68724. - void *argp1 = 0 ;
  68725. - int res1 = 0 ;
  68726. - int res2 ;
  68727. - char *buf2 = 0 ;
  68728. - int alloc2 = 0 ;
  68729. - PyObject * obj0 = 0 ;
  68730. - PyObject * obj1 = 0 ;
  68731. - char *result = 0 ;
  68732. -
  68733. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_system",&obj0,&obj1)) SWIG_fail;
  68734. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68735. - if (!SWIG_IsOK(res1)) {
  68736. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system" "', argument " "1"" of type '" "vips::VImage *""'");
  68737. - }
  68738. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68739. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  68740. - if (!SWIG_IsOK(res2)) {
  68741. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system" "', argument " "2"" of type '" "char *""'");
  68742. - }
  68743. - arg2 = reinterpret_cast< char * >(buf2);
  68744. - try {
  68745. - result = (char *)(arg1)->system(arg2);
  68746. - }
  68747. - catch(vips::VError &_e) {
  68748. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68749. - }
  68750. -
  68751. - resultobj = SWIG_FromCharPtr((const char *)result);
  68752. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68753. - return resultobj;
  68754. -fail:
  68755. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68756. - return NULL;
  68757. -}
  68758. -
  68759. -
  68760. -SWIGINTERN PyObject *_wrap_VImage_system_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68761. - PyObject *resultobj = 0;
  68762. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68763. - char *arg2 = (char *) 0 ;
  68764. - char *arg3 = (char *) 0 ;
  68765. - char *arg4 = (char *) 0 ;
  68766. - char **arg5 = 0 ;
  68767. - void *argp1 = 0 ;
  68768. - int res1 = 0 ;
  68769. - int res2 ;
  68770. - char *buf2 = 0 ;
  68771. - int alloc2 = 0 ;
  68772. - int res3 ;
  68773. - char *buf3 = 0 ;
  68774. - int alloc3 = 0 ;
  68775. - int res4 ;
  68776. - char *buf4 = 0 ;
  68777. - int alloc4 = 0 ;
  68778. - void *argp5 = 0 ;
  68779. - int res5 = 0 ;
  68780. - PyObject * obj0 = 0 ;
  68781. - PyObject * obj1 = 0 ;
  68782. - PyObject * obj2 = 0 ;
  68783. - PyObject * obj3 = 0 ;
  68784. - PyObject * obj4 = 0 ;
  68785. - vips::VImage result;
  68786. -
  68787. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_system_image",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  68788. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68789. - if (!SWIG_IsOK(res1)) {
  68790. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system_image" "', argument " "1"" of type '" "vips::VImage *""'");
  68791. - }
  68792. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68793. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  68794. - if (!SWIG_IsOK(res2)) {
  68795. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system_image" "', argument " "2"" of type '" "char *""'");
  68796. - }
  68797. - arg2 = reinterpret_cast< char * >(buf2);
  68798. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  68799. - if (!SWIG_IsOK(res3)) {
  68800. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_system_image" "', argument " "3"" of type '" "char *""'");
  68801. - }
  68802. - arg3 = reinterpret_cast< char * >(buf3);
  68803. - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  68804. - if (!SWIG_IsOK(res4)) {
  68805. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_system_image" "', argument " "4"" of type '" "char *""'");
  68806. - }
  68807. - arg4 = reinterpret_cast< char * >(buf4);
  68808. - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_p_char, 0 );
  68809. - if (!SWIG_IsOK(res5)) {
  68810. - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'");
  68811. - }
  68812. - if (!argp5) {
  68813. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'");
  68814. - }
  68815. - arg5 = reinterpret_cast< char ** >(argp5);
  68816. - try {
  68817. - result = (arg1)->system_image(arg2,arg3,arg4,*arg5);
  68818. - }
  68819. - catch(vips::VError &_e) {
  68820. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68821. - }
  68822. -
  68823. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68824. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68825. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  68826. - if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  68827. - return resultobj;
  68828. -fail:
  68829. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68830. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  68831. - if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  68832. - return NULL;
  68833. -}
  68834. -
  68835. -
  68836. -SWIGINTERN PyObject *_wrap_VImage_tbjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68837. - PyObject *resultobj = 0;
  68838. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68839. - vips::VImage arg2 ;
  68840. - void *argp1 = 0 ;
  68841. - int res1 = 0 ;
  68842. - void *argp2 ;
  68843. - int res2 = 0 ;
  68844. - PyObject * obj0 = 0 ;
  68845. - PyObject * obj1 = 0 ;
  68846. - vips::VImage result;
  68847. -
  68848. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tbjoin",&obj0,&obj1)) SWIG_fail;
  68849. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68850. - if (!SWIG_IsOK(res1)) {
  68851. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbjoin" "', argument " "1"" of type '" "vips::VImage *""'");
  68852. - }
  68853. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68854. - {
  68855. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  68856. - if (!SWIG_IsOK(res2)) {
  68857. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'");
  68858. - }
  68859. - if (!argp2) {
  68860. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'");
  68861. - } else {
  68862. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  68863. - arg2 = *temp;
  68864. - if (SWIG_IsNewObj(res2)) delete temp;
  68865. - }
  68866. - }
  68867. - try {
  68868. - result = (arg1)->tbjoin(arg2);
  68869. - }
  68870. - catch(vips::VError &_e) {
  68871. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68872. - }
  68873. -
  68874. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68875. - return resultobj;
  68876. -fail:
  68877. - return NULL;
  68878. -}
  68879. -
  68880. -
  68881. -SWIGINTERN PyObject *_wrap_VImage_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68882. - PyObject *resultobj = 0;
  68883. - char *arg1 = (char *) 0 ;
  68884. - char *arg2 = (char *) 0 ;
  68885. - int arg3 ;
  68886. - int arg4 ;
  68887. - int arg5 ;
  68888. - int res1 ;
  68889. - char *buf1 = 0 ;
  68890. - int alloc1 = 0 ;
  68891. - int res2 ;
  68892. - char *buf2 = 0 ;
  68893. - int alloc2 = 0 ;
  68894. - int val3 ;
  68895. - int ecode3 = 0 ;
  68896. - int val4 ;
  68897. - int ecode4 = 0 ;
  68898. - int val5 ;
  68899. - int ecode5 = 0 ;
  68900. - PyObject * obj0 = 0 ;
  68901. - PyObject * obj1 = 0 ;
  68902. - PyObject * obj2 = 0 ;
  68903. - PyObject * obj3 = 0 ;
  68904. - PyObject * obj4 = 0 ;
  68905. - vips::VImage result;
  68906. -
  68907. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_text",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  68908. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  68909. - if (!SWIG_IsOK(res1)) {
  68910. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_text" "', argument " "1"" of type '" "char *""'");
  68911. - }
  68912. - arg1 = reinterpret_cast< char * >(buf1);
  68913. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  68914. - if (!SWIG_IsOK(res2)) {
  68915. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_text" "', argument " "2"" of type '" "char *""'");
  68916. - }
  68917. - arg2 = reinterpret_cast< char * >(buf2);
  68918. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68919. - if (!SWIG_IsOK(ecode3)) {
  68920. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_text" "', argument " "3"" of type '" "int""'");
  68921. - }
  68922. - arg3 = static_cast< int >(val3);
  68923. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  68924. - if (!SWIG_IsOK(ecode4)) {
  68925. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_text" "', argument " "4"" of type '" "int""'");
  68926. - }
  68927. - arg4 = static_cast< int >(val4);
  68928. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  68929. - if (!SWIG_IsOK(ecode5)) {
  68930. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_text" "', argument " "5"" of type '" "int""'");
  68931. - }
  68932. - arg5 = static_cast< int >(val5);
  68933. - try {
  68934. - result = vips::VImage::text(arg1,arg2,arg3,arg4,arg5);
  68935. - }
  68936. - catch(vips::VError &_e) {
  68937. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68938. - }
  68939. -
  68940. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68941. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  68942. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68943. - return resultobj;
  68944. -fail:
  68945. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  68946. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  68947. - return NULL;
  68948. -}
  68949. -
  68950. -
  68951. -SWIGINTERN PyObject *_wrap_VImage_wrap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68952. - PyObject *resultobj = 0;
  68953. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  68954. - int arg2 ;
  68955. - int arg3 ;
  68956. - void *argp1 = 0 ;
  68957. - int res1 = 0 ;
  68958. - int val2 ;
  68959. - int ecode2 = 0 ;
  68960. - int val3 ;
  68961. - int ecode3 = 0 ;
  68962. - PyObject * obj0 = 0 ;
  68963. - PyObject * obj1 = 0 ;
  68964. - PyObject * obj2 = 0 ;
  68965. - vips::VImage result;
  68966. -
  68967. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_wrap",&obj0,&obj1,&obj2)) SWIG_fail;
  68968. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  68969. - if (!SWIG_IsOK(res1)) {
  68970. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_wrap" "', argument " "1"" of type '" "vips::VImage *""'");
  68971. - }
  68972. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  68973. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  68974. - if (!SWIG_IsOK(ecode2)) {
  68975. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_wrap" "', argument " "2"" of type '" "int""'");
  68976. - }
  68977. - arg2 = static_cast< int >(val2);
  68978. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  68979. - if (!SWIG_IsOK(ecode3)) {
  68980. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_wrap" "', argument " "3"" of type '" "int""'");
  68981. - }
  68982. - arg3 = static_cast< int >(val3);
  68983. - try {
  68984. - result = (arg1)->wrap(arg2,arg3);
  68985. - }
  68986. - catch(vips::VError &_e) {
  68987. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  68988. - }
  68989. -
  68990. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  68991. - return resultobj;
  68992. -fail:
  68993. - return NULL;
  68994. -}
  68995. -
  68996. -
  68997. -SWIGINTERN PyObject *_wrap_VImage_zoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  68998. - PyObject *resultobj = 0;
  68999. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69000. - int arg2 ;
  69001. - int arg3 ;
  69002. - void *argp1 = 0 ;
  69003. - int res1 = 0 ;
  69004. - int val2 ;
  69005. - int ecode2 = 0 ;
  69006. - int val3 ;
  69007. - int ecode3 = 0 ;
  69008. - PyObject * obj0 = 0 ;
  69009. - PyObject * obj1 = 0 ;
  69010. - PyObject * obj2 = 0 ;
  69011. - vips::VImage result;
  69012. -
  69013. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_zoom",&obj0,&obj1,&obj2)) SWIG_fail;
  69014. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69015. - if (!SWIG_IsOK(res1)) {
  69016. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zoom" "', argument " "1"" of type '" "vips::VImage *""'");
  69017. - }
  69018. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69019. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  69020. - if (!SWIG_IsOK(ecode2)) {
  69021. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zoom" "', argument " "2"" of type '" "int""'");
  69022. - }
  69023. - arg2 = static_cast< int >(val2);
  69024. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  69025. - if (!SWIG_IsOK(ecode3)) {
  69026. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_zoom" "', argument " "3"" of type '" "int""'");
  69027. - }
  69028. - arg3 = static_cast< int >(val3);
  69029. - try {
  69030. - result = (arg1)->zoom(arg2,arg3);
  69031. - }
  69032. - catch(vips::VError &_e) {
  69033. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69034. - }
  69035. -
  69036. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69037. - return resultobj;
  69038. -fail:
  69039. - return NULL;
  69040. -}
  69041. -
  69042. -
  69043. -SWIGINTERN PyObject *_wrap_VImage_aconvsep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69044. - PyObject *resultobj = 0;
  69045. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69046. - vips::VDMask arg2 ;
  69047. - int arg3 ;
  69048. - void *argp1 = 0 ;
  69049. - int res1 = 0 ;
  69050. - void *argp2 ;
  69051. - int res2 = 0 ;
  69052. - int val3 ;
  69053. - int ecode3 = 0 ;
  69054. - PyObject * obj0 = 0 ;
  69055. - PyObject * obj1 = 0 ;
  69056. - PyObject * obj2 = 0 ;
  69057. - vips::VImage result;
  69058. -
  69059. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_aconvsep",&obj0,&obj1,&obj2)) SWIG_fail;
  69060. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69061. - if (!SWIG_IsOK(res1)) {
  69062. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconvsep" "', argument " "1"" of type '" "vips::VImage *""'");
  69063. - }
  69064. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69065. - {
  69066. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  69067. - if (!SWIG_IsOK(res2)) {
  69068. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'");
  69069. - }
  69070. - if (!argp2) {
  69071. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'");
  69072. - } else {
  69073. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  69074. - arg2 = *temp;
  69075. - if (SWIG_IsNewObj(res2)) delete temp;
  69076. - }
  69077. - }
  69078. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  69079. - if (!SWIG_IsOK(ecode3)) {
  69080. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconvsep" "', argument " "3"" of type '" "int""'");
  69081. - }
  69082. - arg3 = static_cast< int >(val3);
  69083. - try {
  69084. - result = (arg1)->aconvsep(arg2,arg3);
  69085. - }
  69086. - catch(vips::VError &_e) {
  69087. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69088. - }
  69089. -
  69090. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69091. - return resultobj;
  69092. -fail:
  69093. - return NULL;
  69094. -}
  69095. -
  69096. -
  69097. -SWIGINTERN PyObject *_wrap_VImage_aconv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69098. - PyObject *resultobj = 0;
  69099. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69100. - vips::VDMask arg2 ;
  69101. - int arg3 ;
  69102. - int arg4 ;
  69103. - void *argp1 = 0 ;
  69104. - int res1 = 0 ;
  69105. - void *argp2 ;
  69106. - int res2 = 0 ;
  69107. - int val3 ;
  69108. - int ecode3 = 0 ;
  69109. - int val4 ;
  69110. - int ecode4 = 0 ;
  69111. - PyObject * obj0 = 0 ;
  69112. - PyObject * obj1 = 0 ;
  69113. - PyObject * obj2 = 0 ;
  69114. - PyObject * obj3 = 0 ;
  69115. - vips::VImage result;
  69116. -
  69117. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_aconv",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  69118. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69119. - if (!SWIG_IsOK(res1)) {
  69120. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconv" "', argument " "1"" of type '" "vips::VImage *""'");
  69121. - }
  69122. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69123. - {
  69124. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  69125. - if (!SWIG_IsOK(res2)) {
  69126. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'");
  69127. - }
  69128. - if (!argp2) {
  69129. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'");
  69130. - } else {
  69131. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  69132. - arg2 = *temp;
  69133. - if (SWIG_IsNewObj(res2)) delete temp;
  69134. - }
  69135. - }
  69136. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  69137. - if (!SWIG_IsOK(ecode3)) {
  69138. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconv" "', argument " "3"" of type '" "int""'");
  69139. - }
  69140. - arg3 = static_cast< int >(val3);
  69141. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  69142. - if (!SWIG_IsOK(ecode4)) {
  69143. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_aconv" "', argument " "4"" of type '" "int""'");
  69144. - }
  69145. - arg4 = static_cast< int >(val4);
  69146. - try {
  69147. - result = (arg1)->aconv(arg2,arg3,arg4);
  69148. - }
  69149. - catch(vips::VError &_e) {
  69150. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69151. - }
  69152. -
  69153. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69154. - return resultobj;
  69155. -fail:
  69156. - return NULL;
  69157. -}
  69158. -
  69159. -
  69160. -SWIGINTERN PyObject *_wrap_VImage_addgnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69161. - PyObject *resultobj = 0;
  69162. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69163. - double arg2 ;
  69164. - void *argp1 = 0 ;
  69165. - int res1 = 0 ;
  69166. - double val2 ;
  69167. - int ecode2 = 0 ;
  69168. - PyObject * obj0 = 0 ;
  69169. - PyObject * obj1 = 0 ;
  69170. - vips::VImage result;
  69171. -
  69172. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_addgnoise",&obj0,&obj1)) SWIG_fail;
  69173. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69174. - if (!SWIG_IsOK(res1)) {
  69175. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_addgnoise" "', argument " "1"" of type '" "vips::VImage *""'");
  69176. - }
  69177. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69178. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  69179. - if (!SWIG_IsOK(ecode2)) {
  69180. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_addgnoise" "', argument " "2"" of type '" "double""'");
  69181. - }
  69182. - arg2 = static_cast< double >(val2);
  69183. - try {
  69184. - result = (arg1)->addgnoise(arg2);
  69185. - }
  69186. - catch(vips::VError &_e) {
  69187. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69188. - }
  69189. -
  69190. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69191. - return resultobj;
  69192. -fail:
  69193. - return NULL;
  69194. -}
  69195. -
  69196. -
  69197. -SWIGINTERN PyObject *_wrap_VImage_compass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69198. - PyObject *resultobj = 0;
  69199. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69200. - vips::VIMask arg2 ;
  69201. - void *argp1 = 0 ;
  69202. - int res1 = 0 ;
  69203. - void *argp2 ;
  69204. - int res2 = 0 ;
  69205. - PyObject * obj0 = 0 ;
  69206. - PyObject * obj1 = 0 ;
  69207. - vips::VImage result;
  69208. -
  69209. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_compass",&obj0,&obj1)) SWIG_fail;
  69210. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69211. - if (!SWIG_IsOK(res1)) {
  69212. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_compass" "', argument " "1"" of type '" "vips::VImage *""'");
  69213. - }
  69214. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69215. - {
  69216. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  69217. - if (!SWIG_IsOK(res2)) {
  69218. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'");
  69219. - }
  69220. - if (!argp2) {
  69221. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'");
  69222. - } else {
  69223. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  69224. - arg2 = *temp;
  69225. - if (SWIG_IsNewObj(res2)) delete temp;
  69226. - }
  69227. - }
  69228. - try {
  69229. - result = (arg1)->compass(arg2);
  69230. - }
  69231. - catch(vips::VError &_e) {
  69232. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69233. - }
  69234. -
  69235. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69236. - return resultobj;
  69237. -fail:
  69238. - return NULL;
  69239. -}
  69240. -
  69241. -
  69242. -SWIGINTERN PyObject *_wrap_VImage_contrast_surface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69243. - PyObject *resultobj = 0;
  69244. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69245. - int arg2 ;
  69246. - int arg3 ;
  69247. - void *argp1 = 0 ;
  69248. - int res1 = 0 ;
  69249. - int val2 ;
  69250. - int ecode2 = 0 ;
  69251. - int val3 ;
  69252. - int ecode3 = 0 ;
  69253. - PyObject * obj0 = 0 ;
  69254. - PyObject * obj1 = 0 ;
  69255. - PyObject * obj2 = 0 ;
  69256. - vips::VImage result;
  69257. -
  69258. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface",&obj0,&obj1,&obj2)) SWIG_fail;
  69259. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69260. - if (!SWIG_IsOK(res1)) {
  69261. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface" "', argument " "1"" of type '" "vips::VImage *""'");
  69262. - }
  69263. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69264. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  69265. - if (!SWIG_IsOK(ecode2)) {
  69266. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface" "', argument " "2"" of type '" "int""'");
  69267. - }
  69268. - arg2 = static_cast< int >(val2);
  69269. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  69270. - if (!SWIG_IsOK(ecode3)) {
  69271. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface" "', argument " "3"" of type '" "int""'");
  69272. - }
  69273. - arg3 = static_cast< int >(val3);
  69274. - try {
  69275. - result = (arg1)->contrast_surface(arg2,arg3);
  69276. - }
  69277. - catch(vips::VError &_e) {
  69278. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69279. - }
  69280. -
  69281. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69282. - return resultobj;
  69283. -fail:
  69284. - return NULL;
  69285. -}
  69286. -
  69287. -
  69288. -SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69289. - PyObject *resultobj = 0;
  69290. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69291. - vips::VIMask arg2 ;
  69292. - void *argp1 = 0 ;
  69293. - int res1 = 0 ;
  69294. - void *argp2 ;
  69295. - int res2 = 0 ;
  69296. - PyObject * obj0 = 0 ;
  69297. - PyObject * obj1 = 0 ;
  69298. - vips::VImage result;
  69299. -
  69300. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail;
  69301. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69302. - if (!SWIG_IsOK(res1)) {
  69303. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'");
  69304. - }
  69305. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69306. - {
  69307. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  69308. - if (!SWIG_IsOK(res2)) {
  69309. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'");
  69310. - }
  69311. - if (!argp2) {
  69312. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'");
  69313. - } else {
  69314. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  69315. - arg2 = *temp;
  69316. - if (SWIG_IsNewObj(res2)) delete temp;
  69317. - }
  69318. - }
  69319. - try {
  69320. - result = (arg1)->conv(arg2);
  69321. - }
  69322. - catch(vips::VError &_e) {
  69323. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69324. - }
  69325. -
  69326. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69327. - return resultobj;
  69328. -fail:
  69329. - return NULL;
  69330. -}
  69331. -
  69332. -
  69333. -SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69334. - PyObject *resultobj = 0;
  69335. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69336. - vips::VDMask arg2 ;
  69337. - void *argp1 = 0 ;
  69338. - int res1 = 0 ;
  69339. - void *argp2 ;
  69340. - int res2 = 0 ;
  69341. - PyObject * obj0 = 0 ;
  69342. - PyObject * obj1 = 0 ;
  69343. - vips::VImage result;
  69344. -
  69345. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail;
  69346. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69347. - if (!SWIG_IsOK(res1)) {
  69348. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'");
  69349. - }
  69350. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69351. - {
  69352. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  69353. - if (!SWIG_IsOK(res2)) {
  69354. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'");
  69355. - }
  69356. - if (!argp2) {
  69357. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'");
  69358. - } else {
  69359. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  69360. - arg2 = *temp;
  69361. - if (SWIG_IsNewObj(res2)) delete temp;
  69362. - }
  69363. - }
  69364. - try {
  69365. - result = (arg1)->conv(arg2);
  69366. - }
  69367. - catch(vips::VError &_e) {
  69368. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69369. - }
  69370. -
  69371. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69372. - return resultobj;
  69373. -fail:
  69374. - return NULL;
  69375. -}
  69376. -
  69377. -
  69378. -SWIGINTERN PyObject *_wrap_VImage_conv(PyObject *self, PyObject *args) {
  69379. - int argc;
  69380. - PyObject *argv[3];
  69381. - int ii;
  69382. -
  69383. - if (!PyTuple_Check(args)) SWIG_fail;
  69384. - argc = args ? (int)PyObject_Length(args) : 0;
  69385. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  69386. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  69387. - }
  69388. - if (argc == 2) {
  69389. - int _v;
  69390. - void *vptr = 0;
  69391. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  69392. - _v = SWIG_CheckState(res);
  69393. - if (_v) {
  69394. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0);
  69395. - _v = SWIG_CheckState(res);
  69396. - if (_v) {
  69397. - return _wrap_VImage_conv__SWIG_0(self, args);
  69398. - }
  69399. - }
  69400. - }
  69401. - if (argc == 2) {
  69402. - int _v;
  69403. - void *vptr = 0;
  69404. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  69405. - _v = SWIG_CheckState(res);
  69406. - if (_v) {
  69407. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0);
  69408. - _v = SWIG_CheckState(res);
  69409. - if (_v) {
  69410. - return _wrap_VImage_conv__SWIG_1(self, args);
  69411. - }
  69412. - }
  69413. - }
  69414. -
  69415. -fail:
  69416. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_conv'.\n"
  69417. - " Possible C/C++ prototypes are:\n"
  69418. - " vips::VImage::conv(vips::VIMask)\n"
  69419. - " vips::VImage::conv(vips::VDMask)\n");
  69420. - return 0;
  69421. -}
  69422. -
  69423. -
  69424. -SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69425. - PyObject *resultobj = 0;
  69426. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69427. - vips::VIMask arg2 ;
  69428. - void *argp1 = 0 ;
  69429. - int res1 = 0 ;
  69430. - void *argp2 ;
  69431. - int res2 = 0 ;
  69432. - PyObject * obj0 = 0 ;
  69433. - PyObject * obj1 = 0 ;
  69434. - vips::VImage result;
  69435. -
  69436. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail;
  69437. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69438. - if (!SWIG_IsOK(res1)) {
  69439. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'");
  69440. - }
  69441. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69442. - {
  69443. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  69444. - if (!SWIG_IsOK(res2)) {
  69445. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'");
  69446. - }
  69447. - if (!argp2) {
  69448. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'");
  69449. - } else {
  69450. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  69451. - arg2 = *temp;
  69452. - if (SWIG_IsNewObj(res2)) delete temp;
  69453. - }
  69454. - }
  69455. - try {
  69456. - result = (arg1)->convsep(arg2);
  69457. - }
  69458. - catch(vips::VError &_e) {
  69459. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69460. - }
  69461. -
  69462. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69463. - return resultobj;
  69464. -fail:
  69465. - return NULL;
  69466. -}
  69467. -
  69468. -
  69469. -SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69470. - PyObject *resultobj = 0;
  69471. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69472. - vips::VDMask arg2 ;
  69473. - void *argp1 = 0 ;
  69474. - int res1 = 0 ;
  69475. - void *argp2 ;
  69476. - int res2 = 0 ;
  69477. - PyObject * obj0 = 0 ;
  69478. - PyObject * obj1 = 0 ;
  69479. - vips::VImage result;
  69480. -
  69481. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail;
  69482. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69483. - if (!SWIG_IsOK(res1)) {
  69484. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'");
  69485. - }
  69486. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69487. - {
  69488. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  69489. - if (!SWIG_IsOK(res2)) {
  69490. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'");
  69491. - }
  69492. - if (!argp2) {
  69493. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'");
  69494. - } else {
  69495. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  69496. - arg2 = *temp;
  69497. - if (SWIG_IsNewObj(res2)) delete temp;
  69498. - }
  69499. - }
  69500. - try {
  69501. - result = (arg1)->convsep(arg2);
  69502. - }
  69503. - catch(vips::VError &_e) {
  69504. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69505. - }
  69506. -
  69507. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69508. - return resultobj;
  69509. -fail:
  69510. - return NULL;
  69511. -}
  69512. -
  69513. -
  69514. -SWIGINTERN PyObject *_wrap_VImage_convsep(PyObject *self, PyObject *args) {
  69515. - int argc;
  69516. - PyObject *argv[3];
  69517. - int ii;
  69518. -
  69519. - if (!PyTuple_Check(args)) SWIG_fail;
  69520. - argc = args ? (int)PyObject_Length(args) : 0;
  69521. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  69522. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  69523. - }
  69524. - if (argc == 2) {
  69525. - int _v;
  69526. - void *vptr = 0;
  69527. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  69528. - _v = SWIG_CheckState(res);
  69529. - if (_v) {
  69530. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0);
  69531. - _v = SWIG_CheckState(res);
  69532. - if (_v) {
  69533. - return _wrap_VImage_convsep__SWIG_0(self, args);
  69534. - }
  69535. - }
  69536. - }
  69537. - if (argc == 2) {
  69538. - int _v;
  69539. - void *vptr = 0;
  69540. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  69541. - _v = SWIG_CheckState(res);
  69542. - if (_v) {
  69543. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0);
  69544. - _v = SWIG_CheckState(res);
  69545. - if (_v) {
  69546. - return _wrap_VImage_convsep__SWIG_1(self, args);
  69547. - }
  69548. - }
  69549. - }
  69550. -
  69551. -fail:
  69552. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_convsep'.\n"
  69553. - " Possible C/C++ prototypes are:\n"
  69554. - " vips::VImage::convsep(vips::VIMask)\n"
  69555. - " vips::VImage::convsep(vips::VDMask)\n");
  69556. - return 0;
  69557. -}
  69558. -
  69559. -
  69560. -SWIGINTERN PyObject *_wrap_VImage_fastcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69561. - PyObject *resultobj = 0;
  69562. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69563. - vips::VImage arg2 ;
  69564. - void *argp1 = 0 ;
  69565. - int res1 = 0 ;
  69566. - void *argp2 ;
  69567. - int res2 = 0 ;
  69568. - PyObject * obj0 = 0 ;
  69569. - PyObject * obj1 = 0 ;
  69570. - vips::VImage result;
  69571. -
  69572. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor",&obj0,&obj1)) SWIG_fail;
  69573. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69574. - if (!SWIG_IsOK(res1)) {
  69575. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor" "', argument " "1"" of type '" "vips::VImage *""'");
  69576. - }
  69577. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69578. - {
  69579. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  69580. - if (!SWIG_IsOK(res2)) {
  69581. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'");
  69582. - }
  69583. - if (!argp2) {
  69584. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'");
  69585. - } else {
  69586. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  69587. - arg2 = *temp;
  69588. - if (SWIG_IsNewObj(res2)) delete temp;
  69589. - }
  69590. - }
  69591. - try {
  69592. - result = (arg1)->fastcor(arg2);
  69593. - }
  69594. - catch(vips::VError &_e) {
  69595. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69596. - }
  69597. -
  69598. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69599. - return resultobj;
  69600. -fail:
  69601. - return NULL;
  69602. -}
  69603. -
  69604. -
  69605. -SWIGINTERN PyObject *_wrap_VImage_gradcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69606. - PyObject *resultobj = 0;
  69607. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69608. - vips::VImage arg2 ;
  69609. - void *argp1 = 0 ;
  69610. - int res1 = 0 ;
  69611. - void *argp2 ;
  69612. - int res2 = 0 ;
  69613. - PyObject * obj0 = 0 ;
  69614. - PyObject * obj1 = 0 ;
  69615. - vips::VImage result;
  69616. -
  69617. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor",&obj0,&obj1)) SWIG_fail;
  69618. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69619. - if (!SWIG_IsOK(res1)) {
  69620. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor" "', argument " "1"" of type '" "vips::VImage *""'");
  69621. - }
  69622. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69623. - {
  69624. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  69625. - if (!SWIG_IsOK(res2)) {
  69626. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'");
  69627. - }
  69628. - if (!argp2) {
  69629. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'");
  69630. - } else {
  69631. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  69632. - arg2 = *temp;
  69633. - if (SWIG_IsNewObj(res2)) delete temp;
  69634. - }
  69635. - }
  69636. - try {
  69637. - result = (arg1)->gradcor(arg2);
  69638. - }
  69639. - catch(vips::VError &_e) {
  69640. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69641. - }
  69642. -
  69643. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69644. - return resultobj;
  69645. -fail:
  69646. - return NULL;
  69647. -}
  69648. -
  69649. -
  69650. -SWIGINTERN PyObject *_wrap_VImage_gradient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69651. - PyObject *resultobj = 0;
  69652. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69653. - vips::VIMask arg2 ;
  69654. - void *argp1 = 0 ;
  69655. - int res1 = 0 ;
  69656. - void *argp2 ;
  69657. - int res2 = 0 ;
  69658. - PyObject * obj0 = 0 ;
  69659. - PyObject * obj1 = 0 ;
  69660. - vips::VImage result;
  69661. -
  69662. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradient",&obj0,&obj1)) SWIG_fail;
  69663. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69664. - if (!SWIG_IsOK(res1)) {
  69665. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradient" "', argument " "1"" of type '" "vips::VImage *""'");
  69666. - }
  69667. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69668. - {
  69669. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  69670. - if (!SWIG_IsOK(res2)) {
  69671. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'");
  69672. - }
  69673. - if (!argp2) {
  69674. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'");
  69675. - } else {
  69676. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  69677. - arg2 = *temp;
  69678. - if (SWIG_IsNewObj(res2)) delete temp;
  69679. - }
  69680. - }
  69681. - try {
  69682. - result = (arg1)->gradient(arg2);
  69683. - }
  69684. - catch(vips::VError &_e) {
  69685. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69686. - }
  69687. -
  69688. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69689. - return resultobj;
  69690. -fail:
  69691. - return NULL;
  69692. -}
  69693. -
  69694. -
  69695. -SWIGINTERN PyObject *_wrap_VImage_grad_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69696. - PyObject *resultobj = 0;
  69697. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69698. - void *argp1 = 0 ;
  69699. - int res1 = 0 ;
  69700. - PyObject * obj0 = 0 ;
  69701. - vips::VImage result;
  69702. -
  69703. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_x",&obj0)) SWIG_fail;
  69704. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69705. - if (!SWIG_IsOK(res1)) {
  69706. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_x" "', argument " "1"" of type '" "vips::VImage *""'");
  69707. - }
  69708. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69709. - try {
  69710. - result = (arg1)->grad_x();
  69711. - }
  69712. - catch(vips::VError &_e) {
  69713. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69714. - }
  69715. -
  69716. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69717. - return resultobj;
  69718. -fail:
  69719. - return NULL;
  69720. -}
  69721. -
  69722. -
  69723. -SWIGINTERN PyObject *_wrap_VImage_grad_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69724. - PyObject *resultobj = 0;
  69725. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69726. - void *argp1 = 0 ;
  69727. - int res1 = 0 ;
  69728. - PyObject * obj0 = 0 ;
  69729. - vips::VImage result;
  69730. -
  69731. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_y",&obj0)) SWIG_fail;
  69732. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69733. - if (!SWIG_IsOK(res1)) {
  69734. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_y" "', argument " "1"" of type '" "vips::VImage *""'");
  69735. - }
  69736. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69737. - try {
  69738. - result = (arg1)->grad_y();
  69739. - }
  69740. - catch(vips::VError &_e) {
  69741. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69742. - }
  69743. -
  69744. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69745. - return resultobj;
  69746. -fail:
  69747. - return NULL;
  69748. -}
  69749. -
  69750. -
  69751. -SWIGINTERN PyObject *_wrap_VImage_lindetect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69752. - PyObject *resultobj = 0;
  69753. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69754. - vips::VIMask arg2 ;
  69755. - void *argp1 = 0 ;
  69756. - int res1 = 0 ;
  69757. - void *argp2 ;
  69758. - int res2 = 0 ;
  69759. - PyObject * obj0 = 0 ;
  69760. - PyObject * obj1 = 0 ;
  69761. - vips::VImage result;
  69762. -
  69763. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lindetect",&obj0,&obj1)) SWIG_fail;
  69764. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69765. - if (!SWIG_IsOK(res1)) {
  69766. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lindetect" "', argument " "1"" of type '" "vips::VImage *""'");
  69767. - }
  69768. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69769. - {
  69770. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  69771. - if (!SWIG_IsOK(res2)) {
  69772. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'");
  69773. - }
  69774. - if (!argp2) {
  69775. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'");
  69776. - } else {
  69777. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  69778. - arg2 = *temp;
  69779. - if (SWIG_IsNewObj(res2)) delete temp;
  69780. - }
  69781. - }
  69782. - try {
  69783. - result = (arg1)->lindetect(arg2);
  69784. - }
  69785. - catch(vips::VError &_e) {
  69786. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69787. - }
  69788. -
  69789. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69790. - return resultobj;
  69791. -fail:
  69792. - return NULL;
  69793. -}
  69794. -
  69795. -
  69796. -SWIGINTERN PyObject *_wrap_VImage_sharpen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69797. - PyObject *resultobj = 0;
  69798. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69799. - int arg2 ;
  69800. - double arg3 ;
  69801. - double arg4 ;
  69802. - double arg5 ;
  69803. - double arg6 ;
  69804. - double arg7 ;
  69805. - void *argp1 = 0 ;
  69806. - int res1 = 0 ;
  69807. - int val2 ;
  69808. - int ecode2 = 0 ;
  69809. - double val3 ;
  69810. - int ecode3 = 0 ;
  69811. - double val4 ;
  69812. - int ecode4 = 0 ;
  69813. - double val5 ;
  69814. - int ecode5 = 0 ;
  69815. - double val6 ;
  69816. - int ecode6 = 0 ;
  69817. - double val7 ;
  69818. - int ecode7 = 0 ;
  69819. - PyObject * obj0 = 0 ;
  69820. - PyObject * obj1 = 0 ;
  69821. - PyObject * obj2 = 0 ;
  69822. - PyObject * obj3 = 0 ;
  69823. - PyObject * obj4 = 0 ;
  69824. - PyObject * obj5 = 0 ;
  69825. - PyObject * obj6 = 0 ;
  69826. - vips::VImage result;
  69827. -
  69828. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_sharpen",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  69829. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69830. - if (!SWIG_IsOK(res1)) {
  69831. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sharpen" "', argument " "1"" of type '" "vips::VImage *""'");
  69832. - }
  69833. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69834. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  69835. - if (!SWIG_IsOK(ecode2)) {
  69836. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sharpen" "', argument " "2"" of type '" "int""'");
  69837. - }
  69838. - arg2 = static_cast< int >(val2);
  69839. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  69840. - if (!SWIG_IsOK(ecode3)) {
  69841. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sharpen" "', argument " "3"" of type '" "double""'");
  69842. - }
  69843. - arg3 = static_cast< double >(val3);
  69844. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  69845. - if (!SWIG_IsOK(ecode4)) {
  69846. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sharpen" "', argument " "4"" of type '" "double""'");
  69847. - }
  69848. - arg4 = static_cast< double >(val4);
  69849. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  69850. - if (!SWIG_IsOK(ecode5)) {
  69851. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_sharpen" "', argument " "5"" of type '" "double""'");
  69852. - }
  69853. - arg5 = static_cast< double >(val5);
  69854. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  69855. - if (!SWIG_IsOK(ecode6)) {
  69856. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_sharpen" "', argument " "6"" of type '" "double""'");
  69857. - }
  69858. - arg6 = static_cast< double >(val6);
  69859. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  69860. - if (!SWIG_IsOK(ecode7)) {
  69861. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_sharpen" "', argument " "7"" of type '" "double""'");
  69862. - }
  69863. - arg7 = static_cast< double >(val7);
  69864. - try {
  69865. - result = (arg1)->sharpen(arg2,arg3,arg4,arg5,arg6,arg7);
  69866. - }
  69867. - catch(vips::VError &_e) {
  69868. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69869. - }
  69870. -
  69871. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69872. - return resultobj;
  69873. -fail:
  69874. - return NULL;
  69875. -}
  69876. -
  69877. -
  69878. -SWIGINTERN PyObject *_wrap_VImage_spcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69879. - PyObject *resultobj = 0;
  69880. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69881. - vips::VImage arg2 ;
  69882. - void *argp1 = 0 ;
  69883. - int res1 = 0 ;
  69884. - void *argp2 ;
  69885. - int res2 = 0 ;
  69886. - PyObject * obj0 = 0 ;
  69887. - PyObject * obj1 = 0 ;
  69888. - vips::VImage result;
  69889. -
  69890. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor",&obj0,&obj1)) SWIG_fail;
  69891. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69892. - if (!SWIG_IsOK(res1)) {
  69893. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor" "', argument " "1"" of type '" "vips::VImage *""'");
  69894. - }
  69895. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69896. - {
  69897. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  69898. - if (!SWIG_IsOK(res2)) {
  69899. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'");
  69900. - }
  69901. - if (!argp2) {
  69902. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'");
  69903. - } else {
  69904. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  69905. - arg2 = *temp;
  69906. - if (SWIG_IsNewObj(res2)) delete temp;
  69907. - }
  69908. - }
  69909. - try {
  69910. - result = (arg1)->spcor(arg2);
  69911. - }
  69912. - catch(vips::VError &_e) {
  69913. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69914. - }
  69915. -
  69916. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69917. - return resultobj;
  69918. -fail:
  69919. - return NULL;
  69920. -}
  69921. -
  69922. -
  69923. -SWIGINTERN PyObject *_wrap_VImage_argb2rgba(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69924. - PyObject *resultobj = 0;
  69925. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69926. - void *argp1 = 0 ;
  69927. - int res1 = 0 ;
  69928. - PyObject * obj0 = 0 ;
  69929. - vips::VImage result;
  69930. -
  69931. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_argb2rgba",&obj0)) SWIG_fail;
  69932. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69933. - if (!SWIG_IsOK(res1)) {
  69934. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_argb2rgba" "', argument " "1"" of type '" "vips::VImage *""'");
  69935. - }
  69936. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69937. - try {
  69938. - result = (arg1)->argb2rgba();
  69939. - }
  69940. - catch(vips::VError &_e) {
  69941. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69942. - }
  69943. -
  69944. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  69945. - return resultobj;
  69946. -fail:
  69947. - return NULL;
  69948. -}
  69949. -
  69950. -
  69951. -SWIGINTERN PyObject *_wrap_VImage_flood_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  69952. - PyObject *resultobj = 0;
  69953. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  69954. - int arg2 ;
  69955. - int arg3 ;
  69956. - std::vector< double,std::allocator< double > > arg4 ;
  69957. - void *argp1 = 0 ;
  69958. - int res1 = 0 ;
  69959. - int val2 ;
  69960. - int ecode2 = 0 ;
  69961. - int val3 ;
  69962. - int ecode3 = 0 ;
  69963. - PyObject * obj0 = 0 ;
  69964. - PyObject * obj1 = 0 ;
  69965. - PyObject * obj2 = 0 ;
  69966. - PyObject * obj3 = 0 ;
  69967. - vips::VImage result;
  69968. -
  69969. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  69970. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  69971. - if (!SWIG_IsOK(res1)) {
  69972. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_copy" "', argument " "1"" of type '" "vips::VImage *""'");
  69973. - }
  69974. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  69975. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  69976. - if (!SWIG_IsOK(ecode2)) {
  69977. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_copy" "', argument " "2"" of type '" "int""'");
  69978. - }
  69979. - arg2 = static_cast< int >(val2);
  69980. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  69981. - if (!SWIG_IsOK(ecode3)) {
  69982. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_copy" "', argument " "3"" of type '" "int""'");
  69983. - }
  69984. - arg3 = static_cast< int >(val3);
  69985. - {
  69986. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  69987. - int res = swig::asptr(obj3, &ptr);
  69988. - if (!SWIG_IsOK(res) || !ptr) {
  69989. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
  69990. - }
  69991. - arg4 = *ptr;
  69992. - if (SWIG_IsNewObj(res)) delete ptr;
  69993. - }
  69994. - try {
  69995. - result = (arg1)->flood_copy(arg2,arg3,arg4);
  69996. - }
  69997. - catch(vips::VError &_e) {
  69998. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  69999. - }
  70000. -
  70001. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70002. - return resultobj;
  70003. -fail:
  70004. - return NULL;
  70005. -}
  70006. -
  70007. -
  70008. -SWIGINTERN PyObject *_wrap_VImage_flood_blob_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70009. - PyObject *resultobj = 0;
  70010. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70011. - int arg2 ;
  70012. - int arg3 ;
  70013. - std::vector< double,std::allocator< double > > arg4 ;
  70014. - void *argp1 = 0 ;
  70015. - int res1 = 0 ;
  70016. - int val2 ;
  70017. - int ecode2 = 0 ;
  70018. - int val3 ;
  70019. - int ecode3 = 0 ;
  70020. - PyObject * obj0 = 0 ;
  70021. - PyObject * obj1 = 0 ;
  70022. - PyObject * obj2 = 0 ;
  70023. - PyObject * obj3 = 0 ;
  70024. - vips::VImage result;
  70025. -
  70026. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_blob_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  70027. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70028. - if (!SWIG_IsOK(res1)) {
  70029. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_blob_copy" "', argument " "1"" of type '" "vips::VImage *""'");
  70030. - }
  70031. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70032. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  70033. - if (!SWIG_IsOK(ecode2)) {
  70034. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_blob_copy" "', argument " "2"" of type '" "int""'");
  70035. - }
  70036. - arg2 = static_cast< int >(val2);
  70037. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70038. - if (!SWIG_IsOK(ecode3)) {
  70039. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_blob_copy" "', argument " "3"" of type '" "int""'");
  70040. - }
  70041. - arg3 = static_cast< int >(val3);
  70042. - {
  70043. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  70044. - int res = swig::asptr(obj3, &ptr);
  70045. - if (!SWIG_IsOK(res) || !ptr) {
  70046. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_blob_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
  70047. - }
  70048. - arg4 = *ptr;
  70049. - if (SWIG_IsNewObj(res)) delete ptr;
  70050. - }
  70051. - try {
  70052. - result = (arg1)->flood_blob_copy(arg2,arg3,arg4);
  70053. - }
  70054. - catch(vips::VError &_e) {
  70055. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70056. - }
  70057. -
  70058. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70059. - return resultobj;
  70060. -fail:
  70061. - return NULL;
  70062. -}
  70063. -
  70064. -
  70065. -SWIGINTERN PyObject *_wrap_VImage_flood_other_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70066. - PyObject *resultobj = 0;
  70067. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70068. - vips::VImage arg2 ;
  70069. - int arg3 ;
  70070. - int arg4 ;
  70071. - int arg5 ;
  70072. - void *argp1 = 0 ;
  70073. - int res1 = 0 ;
  70074. - void *argp2 ;
  70075. - int res2 = 0 ;
  70076. - int val3 ;
  70077. - int ecode3 = 0 ;
  70078. - int val4 ;
  70079. - int ecode4 = 0 ;
  70080. - int val5 ;
  70081. - int ecode5 = 0 ;
  70082. - PyObject * obj0 = 0 ;
  70083. - PyObject * obj1 = 0 ;
  70084. - PyObject * obj2 = 0 ;
  70085. - PyObject * obj3 = 0 ;
  70086. - PyObject * obj4 = 0 ;
  70087. - vips::VImage result;
  70088. -
  70089. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_flood_other_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  70090. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70091. - if (!SWIG_IsOK(res1)) {
  70092. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_other_copy" "', argument " "1"" of type '" "vips::VImage *""'");
  70093. - }
  70094. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70095. - {
  70096. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  70097. - if (!SWIG_IsOK(res2)) {
  70098. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'");
  70099. - }
  70100. - if (!argp2) {
  70101. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'");
  70102. - } else {
  70103. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  70104. - arg2 = *temp;
  70105. - if (SWIG_IsNewObj(res2)) delete temp;
  70106. - }
  70107. - }
  70108. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70109. - if (!SWIG_IsOK(ecode3)) {
  70110. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_other_copy" "', argument " "3"" of type '" "int""'");
  70111. - }
  70112. - arg3 = static_cast< int >(val3);
  70113. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  70114. - if (!SWIG_IsOK(ecode4)) {
  70115. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flood_other_copy" "', argument " "4"" of type '" "int""'");
  70116. - }
  70117. - arg4 = static_cast< int >(val4);
  70118. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  70119. - if (!SWIG_IsOK(ecode5)) {
  70120. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flood_other_copy" "', argument " "5"" of type '" "int""'");
  70121. - }
  70122. - arg5 = static_cast< int >(val5);
  70123. - try {
  70124. - result = (arg1)->flood_other_copy(arg2,arg3,arg4,arg5);
  70125. - }
  70126. - catch(vips::VError &_e) {
  70127. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70128. - }
  70129. -
  70130. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70131. - return resultobj;
  70132. -fail:
  70133. - return NULL;
  70134. -}
  70135. -
  70136. -
  70137. -SWIGINTERN PyObject *_wrap_VImage_clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70138. - PyObject *resultobj = 0;
  70139. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70140. - void *argp1 = 0 ;
  70141. - int res1 = 0 ;
  70142. - PyObject * obj0 = 0 ;
  70143. - vips::VImage result;
  70144. -
  70145. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip",&obj0)) SWIG_fail;
  70146. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70147. - if (!SWIG_IsOK(res1)) {
  70148. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip" "', argument " "1"" of type '" "vips::VImage *""'");
  70149. - }
  70150. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70151. - try {
  70152. - result = (arg1)->clip();
  70153. - }
  70154. - catch(vips::VError &_e) {
  70155. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70156. - }
  70157. -
  70158. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70159. - return resultobj;
  70160. -fail:
  70161. - return NULL;
  70162. -}
  70163. -
  70164. -
  70165. -SWIGINTERN PyObject *_wrap_VImage_c2ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70166. - PyObject *resultobj = 0;
  70167. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70168. - void *argp1 = 0 ;
  70169. - int res1 = 0 ;
  70170. - PyObject * obj0 = 0 ;
  70171. - vips::VImage result;
  70172. -
  70173. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2ps",&obj0)) SWIG_fail;
  70174. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70175. - if (!SWIG_IsOK(res1)) {
  70176. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2ps" "', argument " "1"" of type '" "vips::VImage *""'");
  70177. - }
  70178. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70179. - try {
  70180. - result = (arg1)->c2ps();
  70181. - }
  70182. - catch(vips::VError &_e) {
  70183. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70184. - }
  70185. -
  70186. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70187. - return resultobj;
  70188. -fail:
  70189. - return NULL;
  70190. -}
  70191. -
  70192. -
  70193. -SWIGINTERN PyObject *_wrap_VImage_resize_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70194. - PyObject *resultobj = 0;
  70195. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70196. - int arg2 ;
  70197. - int arg3 ;
  70198. - void *argp1 = 0 ;
  70199. - int res1 = 0 ;
  70200. - int val2 ;
  70201. - int ecode2 = 0 ;
  70202. - int val3 ;
  70203. - int ecode3 = 0 ;
  70204. - PyObject * obj0 = 0 ;
  70205. - PyObject * obj1 = 0 ;
  70206. - PyObject * obj2 = 0 ;
  70207. - vips::VImage result;
  70208. -
  70209. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_resize_linear",&obj0,&obj1,&obj2)) SWIG_fail;
  70210. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70211. - if (!SWIG_IsOK(res1)) {
  70212. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_resize_linear" "', argument " "1"" of type '" "vips::VImage *""'");
  70213. - }
  70214. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70215. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  70216. - if (!SWIG_IsOK(ecode2)) {
  70217. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_resize_linear" "', argument " "2"" of type '" "int""'");
  70218. - }
  70219. - arg2 = static_cast< int >(val2);
  70220. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70221. - if (!SWIG_IsOK(ecode3)) {
  70222. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_resize_linear" "', argument " "3"" of type '" "int""'");
  70223. - }
  70224. - arg3 = static_cast< int >(val3);
  70225. - try {
  70226. - result = (arg1)->resize_linear(arg2,arg3);
  70227. - }
  70228. - catch(vips::VError &_e) {
  70229. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70230. - }
  70231. -
  70232. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70233. - return resultobj;
  70234. -fail:
  70235. - return NULL;
  70236. -}
  70237. -
  70238. -
  70239. -SWIGINTERN PyObject *_wrap_VImage_cmulnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70240. - PyObject *resultobj = 0;
  70241. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70242. - vips::VImage arg2 ;
  70243. - void *argp1 = 0 ;
  70244. - int res1 = 0 ;
  70245. - void *argp2 ;
  70246. - int res2 = 0 ;
  70247. - PyObject * obj0 = 0 ;
  70248. - PyObject * obj1 = 0 ;
  70249. - vips::VImage result;
  70250. -
  70251. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cmulnorm",&obj0,&obj1)) SWIG_fail;
  70252. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70253. - if (!SWIG_IsOK(res1)) {
  70254. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cmulnorm" "', argument " "1"" of type '" "vips::VImage *""'");
  70255. - }
  70256. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70257. - {
  70258. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  70259. - if (!SWIG_IsOK(res2)) {
  70260. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'");
  70261. - }
  70262. - if (!argp2) {
  70263. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'");
  70264. - } else {
  70265. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  70266. - arg2 = *temp;
  70267. - if (SWIG_IsNewObj(res2)) delete temp;
  70268. - }
  70269. - }
  70270. - try {
  70271. - result = (arg1)->cmulnorm(arg2);
  70272. - }
  70273. - catch(vips::VError &_e) {
  70274. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70275. - }
  70276. -
  70277. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70278. - return resultobj;
  70279. -fail:
  70280. - return NULL;
  70281. -}
  70282. -
  70283. -
  70284. -SWIGINTERN PyObject *_wrap_VImage_fav4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70285. - PyObject *resultobj = 0;
  70286. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70287. - vips::VImage arg2 ;
  70288. - vips::VImage arg3 ;
  70289. - vips::VImage arg4 ;
  70290. - void *argp1 = 0 ;
  70291. - int res1 = 0 ;
  70292. - void *argp2 ;
  70293. - int res2 = 0 ;
  70294. - void *argp3 ;
  70295. - int res3 = 0 ;
  70296. - void *argp4 ;
  70297. - int res4 = 0 ;
  70298. - PyObject * obj0 = 0 ;
  70299. - PyObject * obj1 = 0 ;
  70300. - PyObject * obj2 = 0 ;
  70301. - PyObject * obj3 = 0 ;
  70302. - vips::VImage result;
  70303. -
  70304. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_fav4",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  70305. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70306. - if (!SWIG_IsOK(res1)) {
  70307. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fav4" "', argument " "1"" of type '" "vips::VImage *""'");
  70308. - }
  70309. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70310. - {
  70311. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  70312. - if (!SWIG_IsOK(res2)) {
  70313. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'");
  70314. - }
  70315. - if (!argp2) {
  70316. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'");
  70317. - } else {
  70318. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  70319. - arg2 = *temp;
  70320. - if (SWIG_IsNewObj(res2)) delete temp;
  70321. - }
  70322. - }
  70323. - {
  70324. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  70325. - if (!SWIG_IsOK(res3)) {
  70326. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'");
  70327. - }
  70328. - if (!argp3) {
  70329. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'");
  70330. - } else {
  70331. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
  70332. - arg3 = *temp;
  70333. - if (SWIG_IsNewObj(res3)) delete temp;
  70334. - }
  70335. - }
  70336. - {
  70337. - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
  70338. - if (!SWIG_IsOK(res4)) {
  70339. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'");
  70340. - }
  70341. - if (!argp4) {
  70342. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'");
  70343. - } else {
  70344. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4);
  70345. - arg4 = *temp;
  70346. - if (SWIG_IsNewObj(res4)) delete temp;
  70347. - }
  70348. - }
  70349. - try {
  70350. - result = (arg1)->fav4(arg2,arg3,arg4);
  70351. - }
  70352. - catch(vips::VError &_e) {
  70353. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70354. - }
  70355. -
  70356. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70357. - return resultobj;
  70358. -fail:
  70359. - return NULL;
  70360. -}
  70361. -
  70362. -
  70363. -SWIGINTERN PyObject *_wrap_VImage_gadd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70364. - PyObject *resultobj = 0;
  70365. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70366. - double arg2 ;
  70367. - double arg3 ;
  70368. - vips::VImage arg4 ;
  70369. - double arg5 ;
  70370. - void *argp1 = 0 ;
  70371. - int res1 = 0 ;
  70372. - double val2 ;
  70373. - int ecode2 = 0 ;
  70374. - double val3 ;
  70375. - int ecode3 = 0 ;
  70376. - void *argp4 ;
  70377. - int res4 = 0 ;
  70378. - double val5 ;
  70379. - int ecode5 = 0 ;
  70380. - PyObject * obj0 = 0 ;
  70381. - PyObject * obj1 = 0 ;
  70382. - PyObject * obj2 = 0 ;
  70383. - PyObject * obj3 = 0 ;
  70384. - PyObject * obj4 = 0 ;
  70385. - vips::VImage result;
  70386. -
  70387. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_gadd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  70388. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70389. - if (!SWIG_IsOK(res1)) {
  70390. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gadd" "', argument " "1"" of type '" "vips::VImage *""'");
  70391. - }
  70392. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70393. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  70394. - if (!SWIG_IsOK(ecode2)) {
  70395. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gadd" "', argument " "2"" of type '" "double""'");
  70396. - }
  70397. - arg2 = static_cast< double >(val2);
  70398. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  70399. - if (!SWIG_IsOK(ecode3)) {
  70400. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gadd" "', argument " "3"" of type '" "double""'");
  70401. - }
  70402. - arg3 = static_cast< double >(val3);
  70403. - {
  70404. - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0);
  70405. - if (!SWIG_IsOK(res4)) {
  70406. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'");
  70407. - }
  70408. - if (!argp4) {
  70409. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'");
  70410. - } else {
  70411. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4);
  70412. - arg4 = *temp;
  70413. - if (SWIG_IsNewObj(res4)) delete temp;
  70414. - }
  70415. - }
  70416. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  70417. - if (!SWIG_IsOK(ecode5)) {
  70418. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_gadd" "', argument " "5"" of type '" "double""'");
  70419. - }
  70420. - arg5 = static_cast< double >(val5);
  70421. - try {
  70422. - result = (arg1)->gadd(arg2,arg3,arg4,arg5);
  70423. - }
  70424. - catch(vips::VError &_e) {
  70425. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70426. - }
  70427. -
  70428. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70429. - return resultobj;
  70430. -fail:
  70431. - return NULL;
  70432. -}
  70433. -
  70434. -
  70435. -SWIGINTERN PyObject *_wrap_VImage_icc_export(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70436. - PyObject *resultobj = 0;
  70437. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70438. - char *arg2 = (char *) 0 ;
  70439. - int arg3 ;
  70440. - void *argp1 = 0 ;
  70441. - int res1 = 0 ;
  70442. - int res2 ;
  70443. - char *buf2 = 0 ;
  70444. - int alloc2 = 0 ;
  70445. - int val3 ;
  70446. - int ecode3 = 0 ;
  70447. - PyObject * obj0 = 0 ;
  70448. - PyObject * obj1 = 0 ;
  70449. - PyObject * obj2 = 0 ;
  70450. - vips::VImage result;
  70451. -
  70452. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_export",&obj0,&obj1,&obj2)) SWIG_fail;
  70453. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70454. - if (!SWIG_IsOK(res1)) {
  70455. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export" "', argument " "1"" of type '" "vips::VImage *""'");
  70456. - }
  70457. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70458. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  70459. - if (!SWIG_IsOK(res2)) {
  70460. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_export" "', argument " "2"" of type '" "char *""'");
  70461. - }
  70462. - arg2 = reinterpret_cast< char * >(buf2);
  70463. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70464. - if (!SWIG_IsOK(ecode3)) {
  70465. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_export" "', argument " "3"" of type '" "int""'");
  70466. - }
  70467. - arg3 = static_cast< int >(val3);
  70468. - try {
  70469. - result = (arg1)->icc_export(arg2,arg3);
  70470. - }
  70471. - catch(vips::VError &_e) {
  70472. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70473. - }
  70474. -
  70475. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70476. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  70477. - return resultobj;
  70478. -fail:
  70479. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  70480. - return NULL;
  70481. -}
  70482. -
  70483. -
  70484. -SWIGINTERN PyObject *_wrap_VImage_litecor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70485. - PyObject *resultobj = 0;
  70486. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70487. - vips::VImage arg2 ;
  70488. - int arg3 ;
  70489. - double arg4 ;
  70490. - void *argp1 = 0 ;
  70491. - int res1 = 0 ;
  70492. - void *argp2 ;
  70493. - int res2 = 0 ;
  70494. - int val3 ;
  70495. - int ecode3 = 0 ;
  70496. - double val4 ;
  70497. - int ecode4 = 0 ;
  70498. - PyObject * obj0 = 0 ;
  70499. - PyObject * obj1 = 0 ;
  70500. - PyObject * obj2 = 0 ;
  70501. - PyObject * obj3 = 0 ;
  70502. - vips::VImage result;
  70503. -
  70504. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_litecor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  70505. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70506. - if (!SWIG_IsOK(res1)) {
  70507. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_litecor" "', argument " "1"" of type '" "vips::VImage *""'");
  70508. - }
  70509. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70510. - {
  70511. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  70512. - if (!SWIG_IsOK(res2)) {
  70513. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'");
  70514. - }
  70515. - if (!argp2) {
  70516. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'");
  70517. - } else {
  70518. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  70519. - arg2 = *temp;
  70520. - if (SWIG_IsNewObj(res2)) delete temp;
  70521. - }
  70522. - }
  70523. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70524. - if (!SWIG_IsOK(ecode3)) {
  70525. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_litecor" "', argument " "3"" of type '" "int""'");
  70526. - }
  70527. - arg3 = static_cast< int >(val3);
  70528. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  70529. - if (!SWIG_IsOK(ecode4)) {
  70530. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_litecor" "', argument " "4"" of type '" "double""'");
  70531. - }
  70532. - arg4 = static_cast< double >(val4);
  70533. - try {
  70534. - result = (arg1)->litecor(arg2,arg3,arg4);
  70535. - }
  70536. - catch(vips::VError &_e) {
  70537. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70538. - }
  70539. -
  70540. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70541. - return resultobj;
  70542. -fail:
  70543. - return NULL;
  70544. -}
  70545. -
  70546. -
  70547. -SWIGINTERN PyObject *_wrap_VImage_affine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70548. - PyObject *resultobj = 0;
  70549. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70550. - double arg2 ;
  70551. - double arg3 ;
  70552. - double arg4 ;
  70553. - double arg5 ;
  70554. - double arg6 ;
  70555. - double arg7 ;
  70556. - int arg8 ;
  70557. - int arg9 ;
  70558. - int arg10 ;
  70559. - int arg11 ;
  70560. - void *argp1 = 0 ;
  70561. - int res1 = 0 ;
  70562. - double val2 ;
  70563. - int ecode2 = 0 ;
  70564. - double val3 ;
  70565. - int ecode3 = 0 ;
  70566. - double val4 ;
  70567. - int ecode4 = 0 ;
  70568. - double val5 ;
  70569. - int ecode5 = 0 ;
  70570. - double val6 ;
  70571. - int ecode6 = 0 ;
  70572. - double val7 ;
  70573. - int ecode7 = 0 ;
  70574. - int val8 ;
  70575. - int ecode8 = 0 ;
  70576. - int val9 ;
  70577. - int ecode9 = 0 ;
  70578. - int val10 ;
  70579. - int ecode10 = 0 ;
  70580. - int val11 ;
  70581. - int ecode11 = 0 ;
  70582. - PyObject * obj0 = 0 ;
  70583. - PyObject * obj1 = 0 ;
  70584. - PyObject * obj2 = 0 ;
  70585. - PyObject * obj3 = 0 ;
  70586. - PyObject * obj4 = 0 ;
  70587. - PyObject * obj5 = 0 ;
  70588. - PyObject * obj6 = 0 ;
  70589. - PyObject * obj7 = 0 ;
  70590. - PyObject * obj8 = 0 ;
  70591. - PyObject * obj9 = 0 ;
  70592. - PyObject * obj10 = 0 ;
  70593. - vips::VImage result;
  70594. -
  70595. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_affine",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  70596. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70597. - if (!SWIG_IsOK(res1)) {
  70598. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affine" "', argument " "1"" of type '" "vips::VImage *""'");
  70599. - }
  70600. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70601. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  70602. - if (!SWIG_IsOK(ecode2)) {
  70603. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_affine" "', argument " "2"" of type '" "double""'");
  70604. - }
  70605. - arg2 = static_cast< double >(val2);
  70606. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  70607. - if (!SWIG_IsOK(ecode3)) {
  70608. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affine" "', argument " "3"" of type '" "double""'");
  70609. - }
  70610. - arg3 = static_cast< double >(val3);
  70611. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  70612. - if (!SWIG_IsOK(ecode4)) {
  70613. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affine" "', argument " "4"" of type '" "double""'");
  70614. - }
  70615. - arg4 = static_cast< double >(val4);
  70616. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  70617. - if (!SWIG_IsOK(ecode5)) {
  70618. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affine" "', argument " "5"" of type '" "double""'");
  70619. - }
  70620. - arg5 = static_cast< double >(val5);
  70621. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  70622. - if (!SWIG_IsOK(ecode6)) {
  70623. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affine" "', argument " "6"" of type '" "double""'");
  70624. - }
  70625. - arg6 = static_cast< double >(val6);
  70626. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  70627. - if (!SWIG_IsOK(ecode7)) {
  70628. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affine" "', argument " "7"" of type '" "double""'");
  70629. - }
  70630. - arg7 = static_cast< double >(val7);
  70631. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  70632. - if (!SWIG_IsOK(ecode8)) {
  70633. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affine" "', argument " "8"" of type '" "int""'");
  70634. - }
  70635. - arg8 = static_cast< int >(val8);
  70636. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  70637. - if (!SWIG_IsOK(ecode9)) {
  70638. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affine" "', argument " "9"" of type '" "int""'");
  70639. - }
  70640. - arg9 = static_cast< int >(val9);
  70641. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  70642. - if (!SWIG_IsOK(ecode10)) {
  70643. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affine" "', argument " "10"" of type '" "int""'");
  70644. - }
  70645. - arg10 = static_cast< int >(val10);
  70646. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  70647. - if (!SWIG_IsOK(ecode11)) {
  70648. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affine" "', argument " "11"" of type '" "int""'");
  70649. - }
  70650. - arg11 = static_cast< int >(val11);
  70651. - try {
  70652. - result = (arg1)->affine(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  70653. - }
  70654. - catch(vips::VError &_e) {
  70655. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70656. - }
  70657. -
  70658. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70659. - return resultobj;
  70660. -fail:
  70661. - return NULL;
  70662. -}
  70663. -
  70664. -
  70665. -SWIGINTERN PyObject *_wrap_VImage_clip2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70666. - PyObject *resultobj = 0;
  70667. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70668. - void *argp1 = 0 ;
  70669. - int res1 = 0 ;
  70670. - PyObject * obj0 = 0 ;
  70671. - vips::VImage result;
  70672. -
  70673. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2c",&obj0)) SWIG_fail;
  70674. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70675. - if (!SWIG_IsOK(res1)) {
  70676. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2c" "', argument " "1"" of type '" "vips::VImage *""'");
  70677. - }
  70678. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70679. - try {
  70680. - result = (arg1)->clip2c();
  70681. - }
  70682. - catch(vips::VError &_e) {
  70683. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70684. - }
  70685. -
  70686. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70687. - return resultobj;
  70688. -fail:
  70689. - return NULL;
  70690. -}
  70691. -
  70692. -
  70693. -SWIGINTERN PyObject *_wrap_VImage_clip2cm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70694. - PyObject *resultobj = 0;
  70695. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70696. - void *argp1 = 0 ;
  70697. - int res1 = 0 ;
  70698. - PyObject * obj0 = 0 ;
  70699. - vips::VImage result;
  70700. -
  70701. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2cm",&obj0)) SWIG_fail;
  70702. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70703. - if (!SWIG_IsOK(res1)) {
  70704. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2cm" "', argument " "1"" of type '" "vips::VImage *""'");
  70705. - }
  70706. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70707. - try {
  70708. - result = (arg1)->clip2cm();
  70709. - }
  70710. - catch(vips::VError &_e) {
  70711. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70712. - }
  70713. -
  70714. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70715. - return resultobj;
  70716. -fail:
  70717. - return NULL;
  70718. -}
  70719. -
  70720. -
  70721. -SWIGINTERN PyObject *_wrap_VImage_clip2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70722. - PyObject *resultobj = 0;
  70723. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70724. - void *argp1 = 0 ;
  70725. - int res1 = 0 ;
  70726. - PyObject * obj0 = 0 ;
  70727. - vips::VImage result;
  70728. -
  70729. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2d",&obj0)) SWIG_fail;
  70730. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70731. - if (!SWIG_IsOK(res1)) {
  70732. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2d" "', argument " "1"" of type '" "vips::VImage *""'");
  70733. - }
  70734. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70735. - try {
  70736. - result = (arg1)->clip2d();
  70737. - }
  70738. - catch(vips::VError &_e) {
  70739. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70740. - }
  70741. -
  70742. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70743. - return resultobj;
  70744. -fail:
  70745. - return NULL;
  70746. -}
  70747. -
  70748. -
  70749. -SWIGINTERN PyObject *_wrap_VImage_clip2dcm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70750. - PyObject *resultobj = 0;
  70751. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70752. - void *argp1 = 0 ;
  70753. - int res1 = 0 ;
  70754. - PyObject * obj0 = 0 ;
  70755. - vips::VImage result;
  70756. -
  70757. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2dcm",&obj0)) SWIG_fail;
  70758. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70759. - if (!SWIG_IsOK(res1)) {
  70760. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2dcm" "', argument " "1"" of type '" "vips::VImage *""'");
  70761. - }
  70762. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70763. - try {
  70764. - result = (arg1)->clip2dcm();
  70765. - }
  70766. - catch(vips::VError &_e) {
  70767. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70768. - }
  70769. -
  70770. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70771. - return resultobj;
  70772. -fail:
  70773. - return NULL;
  70774. -}
  70775. -
  70776. -
  70777. -SWIGINTERN PyObject *_wrap_VImage_clip2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70778. - PyObject *resultobj = 0;
  70779. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70780. - void *argp1 = 0 ;
  70781. - int res1 = 0 ;
  70782. - PyObject * obj0 = 0 ;
  70783. - vips::VImage result;
  70784. -
  70785. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2f",&obj0)) SWIG_fail;
  70786. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70787. - if (!SWIG_IsOK(res1)) {
  70788. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2f" "', argument " "1"" of type '" "vips::VImage *""'");
  70789. - }
  70790. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70791. - try {
  70792. - result = (arg1)->clip2f();
  70793. - }
  70794. - catch(vips::VError &_e) {
  70795. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70796. - }
  70797. -
  70798. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70799. - return resultobj;
  70800. -fail:
  70801. - return NULL;
  70802. -}
  70803. -
  70804. -
  70805. -SWIGINTERN PyObject *_wrap_VImage_clip2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70806. - PyObject *resultobj = 0;
  70807. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70808. - void *argp1 = 0 ;
  70809. - int res1 = 0 ;
  70810. - PyObject * obj0 = 0 ;
  70811. - vips::VImage result;
  70812. -
  70813. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2i",&obj0)) SWIG_fail;
  70814. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70815. - if (!SWIG_IsOK(res1)) {
  70816. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2i" "', argument " "1"" of type '" "vips::VImage *""'");
  70817. - }
  70818. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70819. - try {
  70820. - result = (arg1)->clip2i();
  70821. - }
  70822. - catch(vips::VError &_e) {
  70823. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70824. - }
  70825. -
  70826. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70827. - return resultobj;
  70828. -fail:
  70829. - return NULL;
  70830. -}
  70831. -
  70832. -
  70833. -SWIGINTERN PyObject *_wrap_VImage_convsub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70834. - PyObject *resultobj = 0;
  70835. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70836. - vips::VIMask arg2 ;
  70837. - int arg3 ;
  70838. - int arg4 ;
  70839. - void *argp1 = 0 ;
  70840. - int res1 = 0 ;
  70841. - void *argp2 ;
  70842. - int res2 = 0 ;
  70843. - int val3 ;
  70844. - int ecode3 = 0 ;
  70845. - int val4 ;
  70846. - int ecode4 = 0 ;
  70847. - PyObject * obj0 = 0 ;
  70848. - PyObject * obj1 = 0 ;
  70849. - PyObject * obj2 = 0 ;
  70850. - PyObject * obj3 = 0 ;
  70851. - vips::VImage result;
  70852. -
  70853. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_convsub",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  70854. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70855. - if (!SWIG_IsOK(res1)) {
  70856. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsub" "', argument " "1"" of type '" "vips::VImage *""'");
  70857. - }
  70858. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70859. - {
  70860. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  70861. - if (!SWIG_IsOK(res2)) {
  70862. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'");
  70863. - }
  70864. - if (!argp2) {
  70865. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'");
  70866. - } else {
  70867. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  70868. - arg2 = *temp;
  70869. - if (SWIG_IsNewObj(res2)) delete temp;
  70870. - }
  70871. - }
  70872. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  70873. - if (!SWIG_IsOK(ecode3)) {
  70874. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_convsub" "', argument " "3"" of type '" "int""'");
  70875. - }
  70876. - arg3 = static_cast< int >(val3);
  70877. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  70878. - if (!SWIG_IsOK(ecode4)) {
  70879. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_convsub" "', argument " "4"" of type '" "int""'");
  70880. - }
  70881. - arg4 = static_cast< int >(val4);
  70882. - try {
  70883. - result = (arg1)->convsub(arg2,arg3,arg4);
  70884. - }
  70885. - catch(vips::VError &_e) {
  70886. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70887. - }
  70888. -
  70889. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70890. - return resultobj;
  70891. -fail:
  70892. - return NULL;
  70893. -}
  70894. -
  70895. -
  70896. -SWIGINTERN PyObject *_wrap_VImage_convf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70897. - PyObject *resultobj = 0;
  70898. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70899. - vips::VDMask arg2 ;
  70900. - void *argp1 = 0 ;
  70901. - int res1 = 0 ;
  70902. - void *argp2 ;
  70903. - int res2 = 0 ;
  70904. - PyObject * obj0 = 0 ;
  70905. - PyObject * obj1 = 0 ;
  70906. - vips::VImage result;
  70907. -
  70908. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf",&obj0,&obj1)) SWIG_fail;
  70909. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70910. - if (!SWIG_IsOK(res1)) {
  70911. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf" "', argument " "1"" of type '" "vips::VImage *""'");
  70912. - }
  70913. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70914. - {
  70915. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  70916. - if (!SWIG_IsOK(res2)) {
  70917. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'");
  70918. - }
  70919. - if (!argp2) {
  70920. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'");
  70921. - } else {
  70922. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  70923. - arg2 = *temp;
  70924. - if (SWIG_IsNewObj(res2)) delete temp;
  70925. - }
  70926. - }
  70927. - try {
  70928. - result = (arg1)->convf(arg2);
  70929. - }
  70930. - catch(vips::VError &_e) {
  70931. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70932. - }
  70933. -
  70934. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70935. - return resultobj;
  70936. -fail:
  70937. - return NULL;
  70938. -}
  70939. -
  70940. -
  70941. -SWIGINTERN PyObject *_wrap_VImage_convsepf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70942. - PyObject *resultobj = 0;
  70943. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70944. - vips::VDMask arg2 ;
  70945. - void *argp1 = 0 ;
  70946. - int res1 = 0 ;
  70947. - void *argp2 ;
  70948. - int res2 = 0 ;
  70949. - PyObject * obj0 = 0 ;
  70950. - PyObject * obj1 = 0 ;
  70951. - vips::VImage result;
  70952. -
  70953. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf",&obj0,&obj1)) SWIG_fail;
  70954. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70955. - if (!SWIG_IsOK(res1)) {
  70956. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf" "', argument " "1"" of type '" "vips::VImage *""'");
  70957. - }
  70958. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  70959. - {
  70960. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  70961. - if (!SWIG_IsOK(res2)) {
  70962. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'");
  70963. - }
  70964. - if (!argp2) {
  70965. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'");
  70966. - } else {
  70967. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  70968. - arg2 = *temp;
  70969. - if (SWIG_IsNewObj(res2)) delete temp;
  70970. - }
  70971. - }
  70972. - try {
  70973. - result = (arg1)->convsepf(arg2);
  70974. - }
  70975. - catch(vips::VError &_e) {
  70976. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  70977. - }
  70978. -
  70979. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  70980. - return resultobj;
  70981. -fail:
  70982. - return NULL;
  70983. -}
  70984. -
  70985. -
  70986. -SWIGINTERN PyObject *_wrap_VImage_clip2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  70987. - PyObject *resultobj = 0;
  70988. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  70989. - void *argp1 = 0 ;
  70990. - int res1 = 0 ;
  70991. - PyObject * obj0 = 0 ;
  70992. - vips::VImage result;
  70993. -
  70994. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2s",&obj0)) SWIG_fail;
  70995. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  70996. - if (!SWIG_IsOK(res1)) {
  70997. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2s" "', argument " "1"" of type '" "vips::VImage *""'");
  70998. - }
  70999. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71000. - try {
  71001. - result = (arg1)->clip2s();
  71002. - }
  71003. - catch(vips::VError &_e) {
  71004. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71005. - }
  71006. -
  71007. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71008. - return resultobj;
  71009. -fail:
  71010. - return NULL;
  71011. -}
  71012. -
  71013. -
  71014. -SWIGINTERN PyObject *_wrap_VImage_clip2ui(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71015. - PyObject *resultobj = 0;
  71016. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71017. - void *argp1 = 0 ;
  71018. - int res1 = 0 ;
  71019. - PyObject * obj0 = 0 ;
  71020. - vips::VImage result;
  71021. -
  71022. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2ui",&obj0)) SWIG_fail;
  71023. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71024. - if (!SWIG_IsOK(res1)) {
  71025. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2ui" "', argument " "1"" of type '" "vips::VImage *""'");
  71026. - }
  71027. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71028. - try {
  71029. - result = (arg1)->clip2ui();
  71030. - }
  71031. - catch(vips::VError &_e) {
  71032. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71033. - }
  71034. -
  71035. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71036. - return resultobj;
  71037. -fail:
  71038. - return NULL;
  71039. -}
  71040. -
  71041. -
  71042. -SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71043. - PyObject *resultobj = 0;
  71044. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71045. - vips::VImage arg2 ;
  71046. - std::vector< int,std::allocator< int > > arg3 ;
  71047. - std::vector< int,std::allocator< int > > arg4 ;
  71048. - void *argp1 = 0 ;
  71049. - int res1 = 0 ;
  71050. - void *argp2 ;
  71051. - int res2 = 0 ;
  71052. - PyObject * obj0 = 0 ;
  71053. - PyObject * obj1 = 0 ;
  71054. - PyObject * obj2 = 0 ;
  71055. - PyObject * obj3 = 0 ;
  71056. - vips::VImage result;
  71057. -
  71058. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  71059. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71060. - if (!SWIG_IsOK(res1)) {
  71061. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'");
  71062. - }
  71063. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71064. - {
  71065. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  71066. - if (!SWIG_IsOK(res2)) {
  71067. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
  71068. - }
  71069. - if (!argp2) {
  71070. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
  71071. - } else {
  71072. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  71073. - arg2 = *temp;
  71074. - if (SWIG_IsNewObj(res2)) delete temp;
  71075. - }
  71076. - }
  71077. - {
  71078. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  71079. - int res = swig::asptr(obj2, &ptr);
  71080. - if (!SWIG_IsOK(res) || !ptr) {
  71081. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'");
  71082. - }
  71083. - arg3 = *ptr;
  71084. - if (SWIG_IsNewObj(res)) delete ptr;
  71085. - }
  71086. - {
  71087. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  71088. - int res = swig::asptr(obj3, &ptr);
  71089. - if (!SWIG_IsOK(res) || !ptr) {
  71090. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
  71091. - }
  71092. - arg4 = *ptr;
  71093. - if (SWIG_IsNewObj(res)) delete ptr;
  71094. - }
  71095. - try {
  71096. - result = (arg1)->insertplace(arg2,arg3,arg4);
  71097. - }
  71098. - catch(vips::VError &_e) {
  71099. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71100. - }
  71101. -
  71102. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71103. - return resultobj;
  71104. -fail:
  71105. - return NULL;
  71106. -}
  71107. -
  71108. -
  71109. -SWIGINTERN PyObject *_wrap_VImage_clip2us(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71110. - PyObject *resultobj = 0;
  71111. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71112. - void *argp1 = 0 ;
  71113. - int res1 = 0 ;
  71114. - PyObject * obj0 = 0 ;
  71115. - vips::VImage result;
  71116. -
  71117. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2us",&obj0)) SWIG_fail;
  71118. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71119. - if (!SWIG_IsOK(res1)) {
  71120. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2us" "', argument " "1"" of type '" "vips::VImage *""'");
  71121. - }
  71122. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71123. - try {
  71124. - result = (arg1)->clip2us();
  71125. - }
  71126. - catch(vips::VError &_e) {
  71127. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71128. - }
  71129. -
  71130. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71131. - return resultobj;
  71132. -fail:
  71133. - return NULL;
  71134. -}
  71135. -
  71136. -
  71137. -SWIGINTERN PyObject *_wrap_VImage_slice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71138. - PyObject *resultobj = 0;
  71139. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71140. - double arg2 ;
  71141. - double arg3 ;
  71142. - void *argp1 = 0 ;
  71143. - int res1 = 0 ;
  71144. - double val2 ;
  71145. - int ecode2 = 0 ;
  71146. - double val3 ;
  71147. - int ecode3 = 0 ;
  71148. - PyObject * obj0 = 0 ;
  71149. - PyObject * obj1 = 0 ;
  71150. - PyObject * obj2 = 0 ;
  71151. - vips::VImage result;
  71152. -
  71153. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_slice",&obj0,&obj1,&obj2)) SWIG_fail;
  71154. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71155. - if (!SWIG_IsOK(res1)) {
  71156. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_slice" "', argument " "1"" of type '" "vips::VImage *""'");
  71157. - }
  71158. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71159. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  71160. - if (!SWIG_IsOK(ecode2)) {
  71161. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_slice" "', argument " "2"" of type '" "double""'");
  71162. - }
  71163. - arg2 = static_cast< double >(val2);
  71164. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  71165. - if (!SWIG_IsOK(ecode3)) {
  71166. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_slice" "', argument " "3"" of type '" "double""'");
  71167. - }
  71168. - arg3 = static_cast< double >(val3);
  71169. - try {
  71170. - result = (arg1)->slice(arg2,arg3);
  71171. - }
  71172. - catch(vips::VError &_e) {
  71173. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71174. - }
  71175. -
  71176. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71177. - return resultobj;
  71178. -fail:
  71179. - return NULL;
  71180. -}
  71181. -
  71182. -
  71183. -SWIGINTERN PyObject *_wrap_VImage_segment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71184. - PyObject *resultobj = 0;
  71185. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71186. - int *arg2 = 0 ;
  71187. - void *argp1 = 0 ;
  71188. - int res1 = 0 ;
  71189. - int temp2 ;
  71190. - int res2 = SWIG_TMPOBJ ;
  71191. - PyObject * obj0 = 0 ;
  71192. - vips::VImage result;
  71193. -
  71194. - arg2 = &temp2;
  71195. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_segment",&obj0)) SWIG_fail;
  71196. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71197. - if (!SWIG_IsOK(res1)) {
  71198. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_segment" "', argument " "1"" of type '" "vips::VImage *""'");
  71199. - }
  71200. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71201. - try {
  71202. - result = (arg1)->segment(*arg2);
  71203. - }
  71204. - catch(vips::VError &_e) {
  71205. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71206. - }
  71207. -
  71208. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71209. - if (SWIG_IsTmpObj(res2)) {
  71210. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
  71211. - } else {
  71212. - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  71213. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
  71214. - }
  71215. - return resultobj;
  71216. -fail:
  71217. - return NULL;
  71218. -}
  71219. -
  71220. -
  71221. -SWIGINTERN PyObject *_wrap_VImage_line__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71222. - PyObject *resultobj = 0;
  71223. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71224. - int arg2 ;
  71225. - int arg3 ;
  71226. - int arg4 ;
  71227. - int arg5 ;
  71228. - int arg6 ;
  71229. - void *argp1 = 0 ;
  71230. - int res1 = 0 ;
  71231. - int val2 ;
  71232. - int ecode2 = 0 ;
  71233. - int val3 ;
  71234. - int ecode3 = 0 ;
  71235. - int val4 ;
  71236. - int ecode4 = 0 ;
  71237. - int val5 ;
  71238. - int ecode5 = 0 ;
  71239. - int val6 ;
  71240. - int ecode6 = 0 ;
  71241. - PyObject * obj0 = 0 ;
  71242. - PyObject * obj1 = 0 ;
  71243. - PyObject * obj2 = 0 ;
  71244. - PyObject * obj3 = 0 ;
  71245. - PyObject * obj4 = 0 ;
  71246. - PyObject * obj5 = 0 ;
  71247. -
  71248. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  71249. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71250. - if (!SWIG_IsOK(res1)) {
  71251. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'");
  71252. - }
  71253. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71254. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  71255. - if (!SWIG_IsOK(ecode2)) {
  71256. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_line" "', argument " "2"" of type '" "int""'");
  71257. - }
  71258. - arg2 = static_cast< int >(val2);
  71259. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  71260. - if (!SWIG_IsOK(ecode3)) {
  71261. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_line" "', argument " "3"" of type '" "int""'");
  71262. - }
  71263. - arg3 = static_cast< int >(val3);
  71264. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  71265. - if (!SWIG_IsOK(ecode4)) {
  71266. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_line" "', argument " "4"" of type '" "int""'");
  71267. - }
  71268. - arg4 = static_cast< int >(val4);
  71269. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  71270. - if (!SWIG_IsOK(ecode5)) {
  71271. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_line" "', argument " "5"" of type '" "int""'");
  71272. - }
  71273. - arg5 = static_cast< int >(val5);
  71274. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  71275. - if (!SWIG_IsOK(ecode6)) {
  71276. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_line" "', argument " "6"" of type '" "int""'");
  71277. - }
  71278. - arg6 = static_cast< int >(val6);
  71279. - try {
  71280. - (arg1)->line(arg2,arg3,arg4,arg5,arg6);
  71281. - }
  71282. - catch(vips::VError &_e) {
  71283. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71284. - }
  71285. -
  71286. - resultobj = SWIG_Py_Void();
  71287. - return resultobj;
  71288. -fail:
  71289. - return NULL;
  71290. -}
  71291. -
  71292. -
  71293. -SWIGINTERN PyObject *_wrap_VImage_thresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71294. - PyObject *resultobj = 0;
  71295. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71296. - double arg2 ;
  71297. - void *argp1 = 0 ;
  71298. - int res1 = 0 ;
  71299. - double val2 ;
  71300. - int ecode2 = 0 ;
  71301. - PyObject * obj0 = 0 ;
  71302. - PyObject * obj1 = 0 ;
  71303. - vips::VImage result;
  71304. -
  71305. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_thresh",&obj0,&obj1)) SWIG_fail;
  71306. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71307. - if (!SWIG_IsOK(res1)) {
  71308. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_thresh" "', argument " "1"" of type '" "vips::VImage *""'");
  71309. - }
  71310. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71311. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  71312. - if (!SWIG_IsOK(ecode2)) {
  71313. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_thresh" "', argument " "2"" of type '" "double""'");
  71314. - }
  71315. - arg2 = static_cast< double >(val2);
  71316. - try {
  71317. - result = (arg1)->thresh(arg2);
  71318. - }
  71319. - catch(vips::VError &_e) {
  71320. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71321. - }
  71322. -
  71323. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71324. - return resultobj;
  71325. -fail:
  71326. - return NULL;
  71327. -}
  71328. -
  71329. -
  71330. -SWIGINTERN PyObject *_wrap_VImage_convf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71331. - PyObject *resultobj = 0;
  71332. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71333. - vips::VDMask arg2 ;
  71334. - void *argp1 = 0 ;
  71335. - int res1 = 0 ;
  71336. - void *argp2 ;
  71337. - int res2 = 0 ;
  71338. - PyObject * obj0 = 0 ;
  71339. - PyObject * obj1 = 0 ;
  71340. - vips::VImage result;
  71341. -
  71342. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf_raw",&obj0,&obj1)) SWIG_fail;
  71343. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71344. - if (!SWIG_IsOK(res1)) {
  71345. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71346. - }
  71347. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71348. - {
  71349. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  71350. - if (!SWIG_IsOK(res2)) {
  71351. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
  71352. - }
  71353. - if (!argp2) {
  71354. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
  71355. - } else {
  71356. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  71357. - arg2 = *temp;
  71358. - if (SWIG_IsNewObj(res2)) delete temp;
  71359. - }
  71360. - }
  71361. - try {
  71362. - result = (arg1)->convf_raw(arg2);
  71363. - }
  71364. - catch(vips::VError &_e) {
  71365. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71366. - }
  71367. -
  71368. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71369. - return resultobj;
  71370. -fail:
  71371. - return NULL;
  71372. -}
  71373. -
  71374. -
  71375. -SWIGINTERN PyObject *_wrap_VImage_conv_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71376. - PyObject *resultobj = 0;
  71377. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71378. - vips::VIMask arg2 ;
  71379. - void *argp1 = 0 ;
  71380. - int res1 = 0 ;
  71381. - void *argp2 ;
  71382. - int res2 = 0 ;
  71383. - PyObject * obj0 = 0 ;
  71384. - PyObject * obj1 = 0 ;
  71385. - vips::VImage result;
  71386. -
  71387. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv_raw",&obj0,&obj1)) SWIG_fail;
  71388. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71389. - if (!SWIG_IsOK(res1)) {
  71390. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71391. - }
  71392. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71393. - {
  71394. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  71395. - if (!SWIG_IsOK(res2)) {
  71396. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71397. - }
  71398. - if (!argp2) {
  71399. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71400. - } else {
  71401. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  71402. - arg2 = *temp;
  71403. - if (SWIG_IsNewObj(res2)) delete temp;
  71404. - }
  71405. - }
  71406. - try {
  71407. - result = (arg1)->conv_raw(arg2);
  71408. - }
  71409. - catch(vips::VError &_e) {
  71410. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71411. - }
  71412. -
  71413. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71414. - return resultobj;
  71415. -fail:
  71416. - return NULL;
  71417. -}
  71418. -
  71419. -
  71420. -SWIGINTERN PyObject *_wrap_VImage_contrast_surface_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71421. - PyObject *resultobj = 0;
  71422. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71423. - int arg2 ;
  71424. - int arg3 ;
  71425. - void *argp1 = 0 ;
  71426. - int res1 = 0 ;
  71427. - int val2 ;
  71428. - int ecode2 = 0 ;
  71429. - int val3 ;
  71430. - int ecode3 = 0 ;
  71431. - PyObject * obj0 = 0 ;
  71432. - PyObject * obj1 = 0 ;
  71433. - PyObject * obj2 = 0 ;
  71434. - vips::VImage result;
  71435. -
  71436. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface_raw",&obj0,&obj1,&obj2)) SWIG_fail;
  71437. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71438. - if (!SWIG_IsOK(res1)) {
  71439. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71440. - }
  71441. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71442. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  71443. - if (!SWIG_IsOK(ecode2)) {
  71444. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface_raw" "', argument " "2"" of type '" "int""'");
  71445. - }
  71446. - arg2 = static_cast< int >(val2);
  71447. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  71448. - if (!SWIG_IsOK(ecode3)) {
  71449. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface_raw" "', argument " "3"" of type '" "int""'");
  71450. - }
  71451. - arg3 = static_cast< int >(val3);
  71452. - try {
  71453. - result = (arg1)->contrast_surface_raw(arg2,arg3);
  71454. - }
  71455. - catch(vips::VError &_e) {
  71456. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71457. - }
  71458. -
  71459. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71460. - return resultobj;
  71461. -fail:
  71462. - return NULL;
  71463. -}
  71464. -
  71465. -
  71466. -SWIGINTERN PyObject *_wrap_VImage_convsepf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71467. - PyObject *resultobj = 0;
  71468. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71469. - vips::VDMask arg2 ;
  71470. - void *argp1 = 0 ;
  71471. - int res1 = 0 ;
  71472. - void *argp2 ;
  71473. - int res2 = 0 ;
  71474. - PyObject * obj0 = 0 ;
  71475. - PyObject * obj1 = 0 ;
  71476. - vips::VImage result;
  71477. -
  71478. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf_raw",&obj0,&obj1)) SWIG_fail;
  71479. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71480. - if (!SWIG_IsOK(res1)) {
  71481. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71482. - }
  71483. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71484. - {
  71485. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  71486. - if (!SWIG_IsOK(res2)) {
  71487. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
  71488. - }
  71489. - if (!argp2) {
  71490. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'");
  71491. - } else {
  71492. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  71493. - arg2 = *temp;
  71494. - if (SWIG_IsNewObj(res2)) delete temp;
  71495. - }
  71496. - }
  71497. - try {
  71498. - result = (arg1)->convsepf_raw(arg2);
  71499. - }
  71500. - catch(vips::VError &_e) {
  71501. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71502. - }
  71503. -
  71504. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71505. - return resultobj;
  71506. -fail:
  71507. - return NULL;
  71508. -}
  71509. -
  71510. -
  71511. -SWIGINTERN PyObject *_wrap_VImage_convsep_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71512. - PyObject *resultobj = 0;
  71513. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71514. - vips::VIMask arg2 ;
  71515. - void *argp1 = 0 ;
  71516. - int res1 = 0 ;
  71517. - void *argp2 ;
  71518. - int res2 = 0 ;
  71519. - PyObject * obj0 = 0 ;
  71520. - PyObject * obj1 = 0 ;
  71521. - vips::VImage result;
  71522. -
  71523. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep_raw",&obj0,&obj1)) SWIG_fail;
  71524. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71525. - if (!SWIG_IsOK(res1)) {
  71526. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71527. - }
  71528. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71529. - {
  71530. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  71531. - if (!SWIG_IsOK(res2)) {
  71532. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71533. - }
  71534. - if (!argp2) {
  71535. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71536. - } else {
  71537. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  71538. - arg2 = *temp;
  71539. - if (SWIG_IsNewObj(res2)) delete temp;
  71540. - }
  71541. - }
  71542. - try {
  71543. - result = (arg1)->convsep_raw(arg2);
  71544. - }
  71545. - catch(vips::VError &_e) {
  71546. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71547. - }
  71548. -
  71549. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71550. - return resultobj;
  71551. -fail:
  71552. - return NULL;
  71553. -}
  71554. -
  71555. -
  71556. -SWIGINTERN PyObject *_wrap_VImage_fastcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71557. - PyObject *resultobj = 0;
  71558. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71559. - vips::VImage arg2 ;
  71560. - void *argp1 = 0 ;
  71561. - int res1 = 0 ;
  71562. - void *argp2 ;
  71563. - int res2 = 0 ;
  71564. - PyObject * obj0 = 0 ;
  71565. - PyObject * obj1 = 0 ;
  71566. - vips::VImage result;
  71567. -
  71568. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor_raw",&obj0,&obj1)) SWIG_fail;
  71569. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71570. - if (!SWIG_IsOK(res1)) {
  71571. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71572. - }
  71573. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71574. - {
  71575. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  71576. - if (!SWIG_IsOK(res2)) {
  71577. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71578. - }
  71579. - if (!argp2) {
  71580. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71581. - } else {
  71582. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  71583. - arg2 = *temp;
  71584. - if (SWIG_IsNewObj(res2)) delete temp;
  71585. - }
  71586. - }
  71587. - try {
  71588. - result = (arg1)->fastcor_raw(arg2);
  71589. - }
  71590. - catch(vips::VError &_e) {
  71591. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71592. - }
  71593. -
  71594. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71595. - return resultobj;
  71596. -fail:
  71597. - return NULL;
  71598. -}
  71599. -
  71600. -
  71601. -SWIGINTERN PyObject *_wrap_VImage_gradcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71602. - PyObject *resultobj = 0;
  71603. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71604. - vips::VImage arg2 ;
  71605. - void *argp1 = 0 ;
  71606. - int res1 = 0 ;
  71607. - void *argp2 ;
  71608. - int res2 = 0 ;
  71609. - PyObject * obj0 = 0 ;
  71610. - PyObject * obj1 = 0 ;
  71611. - vips::VImage result;
  71612. -
  71613. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor_raw",&obj0,&obj1)) SWIG_fail;
  71614. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71615. - if (!SWIG_IsOK(res1)) {
  71616. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71617. - }
  71618. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71619. - {
  71620. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  71621. - if (!SWIG_IsOK(res2)) {
  71622. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71623. - }
  71624. - if (!argp2) {
  71625. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71626. - } else {
  71627. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  71628. - arg2 = *temp;
  71629. - if (SWIG_IsNewObj(res2)) delete temp;
  71630. - }
  71631. - }
  71632. - try {
  71633. - result = (arg1)->gradcor_raw(arg2);
  71634. - }
  71635. - catch(vips::VError &_e) {
  71636. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71637. - }
  71638. -
  71639. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71640. - return resultobj;
  71641. -fail:
  71642. - return NULL;
  71643. -}
  71644. -
  71645. -
  71646. -SWIGINTERN PyObject *_wrap_VImage_spcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71647. - PyObject *resultobj = 0;
  71648. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71649. - vips::VImage arg2 ;
  71650. - void *argp1 = 0 ;
  71651. - int res1 = 0 ;
  71652. - void *argp2 ;
  71653. - int res2 = 0 ;
  71654. - PyObject * obj0 = 0 ;
  71655. - PyObject * obj1 = 0 ;
  71656. - vips::VImage result;
  71657. -
  71658. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor_raw",&obj0,&obj1)) SWIG_fail;
  71659. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71660. - if (!SWIG_IsOK(res1)) {
  71661. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71662. - }
  71663. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71664. - {
  71665. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  71666. - if (!SWIG_IsOK(res2)) {
  71667. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71668. - }
  71669. - if (!argp2) {
  71670. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'");
  71671. - } else {
  71672. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  71673. - arg2 = *temp;
  71674. - if (SWIG_IsNewObj(res2)) delete temp;
  71675. - }
  71676. - }
  71677. - try {
  71678. - result = (arg1)->spcor_raw(arg2);
  71679. - }
  71680. - catch(vips::VError &_e) {
  71681. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71682. - }
  71683. -
  71684. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71685. - return resultobj;
  71686. -fail:
  71687. - return NULL;
  71688. -}
  71689. -
  71690. -
  71691. -SWIGINTERN PyObject *_wrap_VImage_lhisteq_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71692. - PyObject *resultobj = 0;
  71693. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71694. - int arg2 ;
  71695. - int arg3 ;
  71696. - void *argp1 = 0 ;
  71697. - int res1 = 0 ;
  71698. - int val2 ;
  71699. - int ecode2 = 0 ;
  71700. - int val3 ;
  71701. - int ecode3 = 0 ;
  71702. - PyObject * obj0 = 0 ;
  71703. - PyObject * obj1 = 0 ;
  71704. - PyObject * obj2 = 0 ;
  71705. - vips::VImage result;
  71706. -
  71707. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq_raw",&obj0,&obj1,&obj2)) SWIG_fail;
  71708. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71709. - if (!SWIG_IsOK(res1)) {
  71710. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71711. - }
  71712. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71713. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  71714. - if (!SWIG_IsOK(ecode2)) {
  71715. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq_raw" "', argument " "2"" of type '" "int""'");
  71716. - }
  71717. - arg2 = static_cast< int >(val2);
  71718. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  71719. - if (!SWIG_IsOK(ecode3)) {
  71720. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq_raw" "', argument " "3"" of type '" "int""'");
  71721. - }
  71722. - arg3 = static_cast< int >(val3);
  71723. - try {
  71724. - result = (arg1)->lhisteq_raw(arg2,arg3);
  71725. - }
  71726. - catch(vips::VError &_e) {
  71727. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71728. - }
  71729. -
  71730. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71731. - return resultobj;
  71732. -fail:
  71733. - return NULL;
  71734. -}
  71735. -
  71736. -
  71737. -SWIGINTERN PyObject *_wrap_VImage_stdif_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71738. - PyObject *resultobj = 0;
  71739. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71740. - double arg2 ;
  71741. - double arg3 ;
  71742. - double arg4 ;
  71743. - double arg5 ;
  71744. - int arg6 ;
  71745. - int arg7 ;
  71746. - void *argp1 = 0 ;
  71747. - int res1 = 0 ;
  71748. - double val2 ;
  71749. - int ecode2 = 0 ;
  71750. - double val3 ;
  71751. - int ecode3 = 0 ;
  71752. - double val4 ;
  71753. - int ecode4 = 0 ;
  71754. - double val5 ;
  71755. - int ecode5 = 0 ;
  71756. - int val6 ;
  71757. - int ecode6 = 0 ;
  71758. - int val7 ;
  71759. - int ecode7 = 0 ;
  71760. - PyObject * obj0 = 0 ;
  71761. - PyObject * obj1 = 0 ;
  71762. - PyObject * obj2 = 0 ;
  71763. - PyObject * obj3 = 0 ;
  71764. - PyObject * obj4 = 0 ;
  71765. - PyObject * obj5 = 0 ;
  71766. - PyObject * obj6 = 0 ;
  71767. - vips::VImage result;
  71768. -
  71769. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif_raw",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  71770. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71771. - if (!SWIG_IsOK(res1)) {
  71772. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71773. - }
  71774. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71775. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  71776. - if (!SWIG_IsOK(ecode2)) {
  71777. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif_raw" "', argument " "2"" of type '" "double""'");
  71778. - }
  71779. - arg2 = static_cast< double >(val2);
  71780. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  71781. - if (!SWIG_IsOK(ecode3)) {
  71782. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif_raw" "', argument " "3"" of type '" "double""'");
  71783. - }
  71784. - arg3 = static_cast< double >(val3);
  71785. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  71786. - if (!SWIG_IsOK(ecode4)) {
  71787. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif_raw" "', argument " "4"" of type '" "double""'");
  71788. - }
  71789. - arg4 = static_cast< double >(val4);
  71790. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  71791. - if (!SWIG_IsOK(ecode5)) {
  71792. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif_raw" "', argument " "5"" of type '" "double""'");
  71793. - }
  71794. - arg5 = static_cast< double >(val5);
  71795. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  71796. - if (!SWIG_IsOK(ecode6)) {
  71797. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif_raw" "', argument " "6"" of type '" "int""'");
  71798. - }
  71799. - arg6 = static_cast< int >(val6);
  71800. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  71801. - if (!SWIG_IsOK(ecode7)) {
  71802. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif_raw" "', argument " "7"" of type '" "int""'");
  71803. - }
  71804. - arg7 = static_cast< int >(val7);
  71805. - try {
  71806. - result = (arg1)->stdif_raw(arg2,arg3,arg4,arg5,arg6,arg7);
  71807. - }
  71808. - catch(vips::VError &_e) {
  71809. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71810. - }
  71811. -
  71812. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71813. - return resultobj;
  71814. -fail:
  71815. - return NULL;
  71816. -}
  71817. -
  71818. -
  71819. -SWIGINTERN PyObject *_wrap_VImage_rank_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71820. - PyObject *resultobj = 0;
  71821. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71822. - int arg2 ;
  71823. - int arg3 ;
  71824. - int arg4 ;
  71825. - void *argp1 = 0 ;
  71826. - int res1 = 0 ;
  71827. - int val2 ;
  71828. - int ecode2 = 0 ;
  71829. - int val3 ;
  71830. - int ecode3 = 0 ;
  71831. - int val4 ;
  71832. - int ecode4 = 0 ;
  71833. - PyObject * obj0 = 0 ;
  71834. - PyObject * obj1 = 0 ;
  71835. - PyObject * obj2 = 0 ;
  71836. - PyObject * obj3 = 0 ;
  71837. - vips::VImage result;
  71838. -
  71839. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank_raw",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  71840. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71841. - if (!SWIG_IsOK(res1)) {
  71842. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71843. - }
  71844. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71845. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  71846. - if (!SWIG_IsOK(ecode2)) {
  71847. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_raw" "', argument " "2"" of type '" "int""'");
  71848. - }
  71849. - arg2 = static_cast< int >(val2);
  71850. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  71851. - if (!SWIG_IsOK(ecode3)) {
  71852. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank_raw" "', argument " "3"" of type '" "int""'");
  71853. - }
  71854. - arg3 = static_cast< int >(val3);
  71855. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  71856. - if (!SWIG_IsOK(ecode4)) {
  71857. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank_raw" "', argument " "4"" of type '" "int""'");
  71858. - }
  71859. - arg4 = static_cast< int >(val4);
  71860. - try {
  71861. - result = (arg1)->rank_raw(arg2,arg3,arg4);
  71862. - }
  71863. - catch(vips::VError &_e) {
  71864. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71865. - }
  71866. -
  71867. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71868. - return resultobj;
  71869. -fail:
  71870. - return NULL;
  71871. -}
  71872. -
  71873. -
  71874. -SWIGINTERN PyObject *_wrap_VImage_dilate_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71875. - PyObject *resultobj = 0;
  71876. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71877. - vips::VIMask arg2 ;
  71878. - void *argp1 = 0 ;
  71879. - int res1 = 0 ;
  71880. - void *argp2 ;
  71881. - int res2 = 0 ;
  71882. - PyObject * obj0 = 0 ;
  71883. - PyObject * obj1 = 0 ;
  71884. - vips::VImage result;
  71885. -
  71886. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate_raw",&obj0,&obj1)) SWIG_fail;
  71887. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71888. - if (!SWIG_IsOK(res1)) {
  71889. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71890. - }
  71891. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71892. - {
  71893. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  71894. - if (!SWIG_IsOK(res2)) {
  71895. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71896. - }
  71897. - if (!argp2) {
  71898. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71899. - } else {
  71900. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  71901. - arg2 = *temp;
  71902. - if (SWIG_IsNewObj(res2)) delete temp;
  71903. - }
  71904. - }
  71905. - try {
  71906. - result = (arg1)->dilate_raw(arg2);
  71907. - }
  71908. - catch(vips::VError &_e) {
  71909. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71910. - }
  71911. -
  71912. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71913. - return resultobj;
  71914. -fail:
  71915. - return NULL;
  71916. -}
  71917. -
  71918. -
  71919. -SWIGINTERN PyObject *_wrap_VImage_erode_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71920. - PyObject *resultobj = 0;
  71921. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71922. - vips::VIMask arg2 ;
  71923. - void *argp1 = 0 ;
  71924. - int res1 = 0 ;
  71925. - void *argp2 ;
  71926. - int res2 = 0 ;
  71927. - PyObject * obj0 = 0 ;
  71928. - PyObject * obj1 = 0 ;
  71929. - vips::VImage result;
  71930. -
  71931. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode_raw",&obj0,&obj1)) SWIG_fail;
  71932. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  71933. - if (!SWIG_IsOK(res1)) {
  71934. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode_raw" "', argument " "1"" of type '" "vips::VImage *""'");
  71935. - }
  71936. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  71937. - {
  71938. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  71939. - if (!SWIG_IsOK(res2)) {
  71940. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71941. - }
  71942. - if (!argp2) {
  71943. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'");
  71944. - } else {
  71945. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  71946. - arg2 = *temp;
  71947. - if (SWIG_IsNewObj(res2)) delete temp;
  71948. - }
  71949. - }
  71950. - try {
  71951. - result = (arg1)->erode_raw(arg2);
  71952. - }
  71953. - catch(vips::VError &_e) {
  71954. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  71955. - }
  71956. -
  71957. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  71958. - return resultobj;
  71959. -fail:
  71960. - return NULL;
  71961. -}
  71962. -
  71963. -
  71964. -SWIGINTERN PyObject *_wrap_VImage_similarity_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  71965. - PyObject *resultobj = 0;
  71966. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  71967. - double arg2 ;
  71968. - double arg3 ;
  71969. - double arg4 ;
  71970. - double arg5 ;
  71971. - int arg6 ;
  71972. - int arg7 ;
  71973. - int arg8 ;
  71974. - int arg9 ;
  71975. - void *argp1 = 0 ;
  71976. - int res1 = 0 ;
  71977. - double val2 ;
  71978. - int ecode2 = 0 ;
  71979. - double val3 ;
  71980. - int ecode3 = 0 ;
  71981. - double val4 ;
  71982. - int ecode4 = 0 ;
  71983. - double val5 ;
  71984. - int ecode5 = 0 ;
  71985. - int val6 ;
  71986. - int ecode6 = 0 ;
  71987. - int val7 ;
  71988. - int ecode7 = 0 ;
  71989. - int val8 ;
  71990. - int ecode8 = 0 ;
  71991. - int val9 ;
  71992. - int ecode9 = 0 ;
  71993. - PyObject * obj0 = 0 ;
  71994. - PyObject * obj1 = 0 ;
  71995. - PyObject * obj2 = 0 ;
  71996. - PyObject * obj3 = 0 ;
  71997. - PyObject * obj4 = 0 ;
  71998. - PyObject * obj5 = 0 ;
  71999. - PyObject * obj6 = 0 ;
  72000. - PyObject * obj7 = 0 ;
  72001. - PyObject * obj8 = 0 ;
  72002. - vips::VImage result;
  72003. -
  72004. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_similarity_area",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  72005. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72006. - if (!SWIG_IsOK(res1)) {
  72007. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity_area" "', argument " "1"" of type '" "vips::VImage *""'");
  72008. - }
  72009. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72010. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  72011. - if (!SWIG_IsOK(ecode2)) {
  72012. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity_area" "', argument " "2"" of type '" "double""'");
  72013. - }
  72014. - arg2 = static_cast< double >(val2);
  72015. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  72016. - if (!SWIG_IsOK(ecode3)) {
  72017. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity_area" "', argument " "3"" of type '" "double""'");
  72018. - }
  72019. - arg3 = static_cast< double >(val3);
  72020. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  72021. - if (!SWIG_IsOK(ecode4)) {
  72022. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity_area" "', argument " "4"" of type '" "double""'");
  72023. - }
  72024. - arg4 = static_cast< double >(val4);
  72025. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  72026. - if (!SWIG_IsOK(ecode5)) {
  72027. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity_area" "', argument " "5"" of type '" "double""'");
  72028. - }
  72029. - arg5 = static_cast< double >(val5);
  72030. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  72031. - if (!SWIG_IsOK(ecode6)) {
  72032. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_similarity_area" "', argument " "6"" of type '" "int""'");
  72033. - }
  72034. - arg6 = static_cast< int >(val6);
  72035. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  72036. - if (!SWIG_IsOK(ecode7)) {
  72037. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_similarity_area" "', argument " "7"" of type '" "int""'");
  72038. - }
  72039. - arg7 = static_cast< int >(val7);
  72040. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  72041. - if (!SWIG_IsOK(ecode8)) {
  72042. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_similarity_area" "', argument " "8"" of type '" "int""'");
  72043. - }
  72044. - arg8 = static_cast< int >(val8);
  72045. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  72046. - if (!SWIG_IsOK(ecode9)) {
  72047. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_similarity_area" "', argument " "9"" of type '" "int""'");
  72048. - }
  72049. - arg9 = static_cast< int >(val9);
  72050. - try {
  72051. - result = (arg1)->similarity_area(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  72052. - }
  72053. - catch(vips::VError &_e) {
  72054. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72055. - }
  72056. -
  72057. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72058. - return resultobj;
  72059. -fail:
  72060. - return NULL;
  72061. -}
  72062. -
  72063. -
  72064. -SWIGINTERN PyObject *_wrap_VImage_similarity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72065. - PyObject *resultobj = 0;
  72066. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72067. - double arg2 ;
  72068. - double arg3 ;
  72069. - double arg4 ;
  72070. - double arg5 ;
  72071. - void *argp1 = 0 ;
  72072. - int res1 = 0 ;
  72073. - double val2 ;
  72074. - int ecode2 = 0 ;
  72075. - double val3 ;
  72076. - int ecode3 = 0 ;
  72077. - double val4 ;
  72078. - int ecode4 = 0 ;
  72079. - double val5 ;
  72080. - int ecode5 = 0 ;
  72081. - PyObject * obj0 = 0 ;
  72082. - PyObject * obj1 = 0 ;
  72083. - PyObject * obj2 = 0 ;
  72084. - PyObject * obj3 = 0 ;
  72085. - PyObject * obj4 = 0 ;
  72086. - vips::VImage result;
  72087. -
  72088. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_similarity",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  72089. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72090. - if (!SWIG_IsOK(res1)) {
  72091. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity" "', argument " "1"" of type '" "vips::VImage *""'");
  72092. - }
  72093. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72094. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  72095. - if (!SWIG_IsOK(ecode2)) {
  72096. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity" "', argument " "2"" of type '" "double""'");
  72097. - }
  72098. - arg2 = static_cast< double >(val2);
  72099. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  72100. - if (!SWIG_IsOK(ecode3)) {
  72101. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity" "', argument " "3"" of type '" "double""'");
  72102. - }
  72103. - arg3 = static_cast< double >(val3);
  72104. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  72105. - if (!SWIG_IsOK(ecode4)) {
  72106. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity" "', argument " "4"" of type '" "double""'");
  72107. - }
  72108. - arg4 = static_cast< double >(val4);
  72109. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  72110. - if (!SWIG_IsOK(ecode5)) {
  72111. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity" "', argument " "5"" of type '" "double""'");
  72112. - }
  72113. - arg5 = static_cast< double >(val5);
  72114. - try {
  72115. - result = (arg1)->similarity(arg2,arg3,arg4,arg5);
  72116. - }
  72117. - catch(vips::VError &_e) {
  72118. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72119. - }
  72120. -
  72121. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72122. - return resultobj;
  72123. -fail:
  72124. - return NULL;
  72125. -}
  72126. -
  72127. -
  72128. -SWIGINTERN PyObject *_wrap_VImage_mask2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72129. - PyObject *resultobj = 0;
  72130. - vips::VDMask arg1 ;
  72131. - void *argp1 ;
  72132. - int res1 = 0 ;
  72133. - PyObject * obj0 = 0 ;
  72134. - vips::VImage result;
  72135. -
  72136. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_mask2vips",&obj0)) SWIG_fail;
  72137. - {
  72138. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
  72139. - if (!SWIG_IsOK(res1)) {
  72140. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'");
  72141. - }
  72142. - if (!argp1) {
  72143. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'");
  72144. - } else {
  72145. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
  72146. - arg1 = *temp;
  72147. - if (SWIG_IsNewObj(res1)) delete temp;
  72148. - }
  72149. - }
  72150. - try {
  72151. - result = vips::VImage::mask2vips(arg1);
  72152. - }
  72153. - catch(vips::VError &_e) {
  72154. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72155. - }
  72156. -
  72157. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72158. - return resultobj;
  72159. -fail:
  72160. - return NULL;
  72161. -}
  72162. -
  72163. -
  72164. -SWIGINTERN PyObject *_wrap_VImage_vips2mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72165. - PyObject *resultobj = 0;
  72166. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72167. - void *argp1 = 0 ;
  72168. - int res1 = 0 ;
  72169. - PyObject * obj0 = 0 ;
  72170. - vips::VDMask result;
  72171. -
  72172. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_vips2mask",&obj0)) SWIG_fail;
  72173. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72174. - if (!SWIG_IsOK(res1)) {
  72175. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mask" "', argument " "1"" of type '" "vips::VImage *""'");
  72176. - }
  72177. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72178. - try {
  72179. - result = (arg1)->vips2mask();
  72180. - }
  72181. - catch(vips::VError &_e) {
  72182. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72183. - }
  72184. -
  72185. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  72186. - return resultobj;
  72187. -fail:
  72188. - return NULL;
  72189. -}
  72190. -
  72191. -
  72192. -SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72193. - PyObject *resultobj = 0;
  72194. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72195. - vips::VImage arg2 ;
  72196. - int arg3 ;
  72197. - int arg4 ;
  72198. - void *argp1 = 0 ;
  72199. - int res1 = 0 ;
  72200. - void *argp2 ;
  72201. - int res2 = 0 ;
  72202. - int val3 ;
  72203. - int ecode3 = 0 ;
  72204. - int val4 ;
  72205. - int ecode4 = 0 ;
  72206. - PyObject * obj0 = 0 ;
  72207. - PyObject * obj1 = 0 ;
  72208. - PyObject * obj2 = 0 ;
  72209. - PyObject * obj3 = 0 ;
  72210. -
  72211. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  72212. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72213. - if (!SWIG_IsOK(res1)) {
  72214. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'");
  72215. - }
  72216. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72217. - {
  72218. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  72219. - if (!SWIG_IsOK(res2)) {
  72220. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
  72221. - }
  72222. - if (!argp2) {
  72223. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'");
  72224. - } else {
  72225. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  72226. - arg2 = *temp;
  72227. - if (SWIG_IsNewObj(res2)) delete temp;
  72228. - }
  72229. - }
  72230. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  72231. - if (!SWIG_IsOK(ecode3)) {
  72232. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "int""'");
  72233. - }
  72234. - arg3 = static_cast< int >(val3);
  72235. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  72236. - if (!SWIG_IsOK(ecode4)) {
  72237. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "int""'");
  72238. - }
  72239. - arg4 = static_cast< int >(val4);
  72240. - try {
  72241. - (arg1)->insertplace(arg2,arg3,arg4);
  72242. - }
  72243. - catch(vips::VError &_e) {
  72244. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72245. - }
  72246. -
  72247. - resultobj = SWIG_Py_Void();
  72248. - return resultobj;
  72249. -fail:
  72250. - return NULL;
  72251. -}
  72252. -
  72253. -
  72254. -SWIGINTERN PyObject *_wrap_VImage_insertplace(PyObject *self, PyObject *args) {
  72255. - int argc;
  72256. - PyObject *argv[5];
  72257. - int ii;
  72258. -
  72259. - if (!PyTuple_Check(args)) SWIG_fail;
  72260. - argc = args ? (int)PyObject_Length(args) : 0;
  72261. - for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  72262. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  72263. - }
  72264. - if (argc == 4) {
  72265. - int _v;
  72266. - void *vptr = 0;
  72267. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72268. - _v = SWIG_CheckState(res);
  72269. - if (_v) {
  72270. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  72271. - _v = SWIG_CheckState(res);
  72272. - if (_v) {
  72273. - {
  72274. - int res = SWIG_AsVal_int(argv[2], NULL);
  72275. - _v = SWIG_CheckState(res);
  72276. - }
  72277. - if (_v) {
  72278. - {
  72279. - int res = SWIG_AsVal_int(argv[3], NULL);
  72280. - _v = SWIG_CheckState(res);
  72281. - }
  72282. - if (_v) {
  72283. - return _wrap_VImage_insertplace__SWIG_1(self, args);
  72284. - }
  72285. - }
  72286. - }
  72287. - }
  72288. - }
  72289. - if (argc == 4) {
  72290. - int _v;
  72291. - void *vptr = 0;
  72292. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72293. - _v = SWIG_CheckState(res);
  72294. - if (_v) {
  72295. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  72296. - _v = SWIG_CheckState(res);
  72297. - if (_v) {
  72298. - int res = swig::asptr(argv[2], (std::vector<int,std::allocator< int > >**)(0));
  72299. - _v = SWIG_CheckState(res);
  72300. - if (_v) {
  72301. - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
  72302. - _v = SWIG_CheckState(res);
  72303. - if (_v) {
  72304. - return _wrap_VImage_insertplace__SWIG_0(self, args);
  72305. - }
  72306. - }
  72307. - }
  72308. - }
  72309. - }
  72310. -
  72311. -fail:
  72312. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insertplace'.\n"
  72313. - " Possible C/C++ prototypes are:\n"
  72314. - " vips::VImage::insertplace(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n"
  72315. - " vips::VImage::insertplace(vips::VImage,int,int)\n");
  72316. - return 0;
  72317. -}
  72318. -
  72319. -
  72320. -SWIGINTERN PyObject *_wrap_VImage_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72321. - PyObject *resultobj = 0;
  72322. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72323. - int arg2 ;
  72324. - int arg3 ;
  72325. - int arg4 ;
  72326. - int arg5 ;
  72327. - void *argp1 = 0 ;
  72328. - int res1 = 0 ;
  72329. - int val2 ;
  72330. - int ecode2 = 0 ;
  72331. - int val3 ;
  72332. - int ecode3 = 0 ;
  72333. - int val4 ;
  72334. - int ecode4 = 0 ;
  72335. - int val5 ;
  72336. - int ecode5 = 0 ;
  72337. - PyObject * obj0 = 0 ;
  72338. - PyObject * obj1 = 0 ;
  72339. - PyObject * obj2 = 0 ;
  72340. - PyObject * obj3 = 0 ;
  72341. - PyObject * obj4 = 0 ;
  72342. -
  72343. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_circle",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  72344. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72345. - if (!SWIG_IsOK(res1)) {
  72346. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_circle" "', argument " "1"" of type '" "vips::VImage *""'");
  72347. - }
  72348. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72349. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  72350. - if (!SWIG_IsOK(ecode2)) {
  72351. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_circle" "', argument " "2"" of type '" "int""'");
  72352. - }
  72353. - arg2 = static_cast< int >(val2);
  72354. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  72355. - if (!SWIG_IsOK(ecode3)) {
  72356. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_circle" "', argument " "3"" of type '" "int""'");
  72357. - }
  72358. - arg3 = static_cast< int >(val3);
  72359. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  72360. - if (!SWIG_IsOK(ecode4)) {
  72361. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_circle" "', argument " "4"" of type '" "int""'");
  72362. - }
  72363. - arg4 = static_cast< int >(val4);
  72364. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  72365. - if (!SWIG_IsOK(ecode5)) {
  72366. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_circle" "', argument " "5"" of type '" "int""'");
  72367. - }
  72368. - arg5 = static_cast< int >(val5);
  72369. - try {
  72370. - (arg1)->circle(arg2,arg3,arg4,arg5);
  72371. - }
  72372. - catch(vips::VError &_e) {
  72373. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72374. - }
  72375. -
  72376. - resultobj = SWIG_Py_Void();
  72377. - return resultobj;
  72378. -fail:
  72379. - return NULL;
  72380. -}
  72381. -
  72382. -
  72383. -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72384. - PyObject *resultobj = 0;
  72385. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72386. - vips::VImage arg2 ;
  72387. - void *argp1 = 0 ;
  72388. - int res1 = 0 ;
  72389. - void *argp2 ;
  72390. - int res2 = 0 ;
  72391. - PyObject * obj0 = 0 ;
  72392. - PyObject * obj1 = 0 ;
  72393. - vips::VImage result;
  72394. -
  72395. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
  72396. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72397. - if (!SWIG_IsOK(res1)) {
  72398. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72399. - }
  72400. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72401. - {
  72402. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  72403. - if (!SWIG_IsOK(res2)) {
  72404. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'");
  72405. - }
  72406. - if (!argp2) {
  72407. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'");
  72408. - } else {
  72409. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  72410. - arg2 = *temp;
  72411. - if (SWIG_IsNewObj(res2)) delete temp;
  72412. - }
  72413. - }
  72414. - try {
  72415. - result = (arg1)->andimage(arg2);
  72416. - }
  72417. - catch(vips::VError &_e) {
  72418. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72419. - }
  72420. -
  72421. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72422. - return resultobj;
  72423. -fail:
  72424. - return NULL;
  72425. -}
  72426. -
  72427. -
  72428. -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72429. - PyObject *resultobj = 0;
  72430. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72431. - int arg2 ;
  72432. - void *argp1 = 0 ;
  72433. - int res1 = 0 ;
  72434. - int val2 ;
  72435. - int ecode2 = 0 ;
  72436. - PyObject * obj0 = 0 ;
  72437. - PyObject * obj1 = 0 ;
  72438. - vips::VImage result;
  72439. -
  72440. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
  72441. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72442. - if (!SWIG_IsOK(res1)) {
  72443. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72444. - }
  72445. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72446. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  72447. - if (!SWIG_IsOK(ecode2)) {
  72448. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "int""'");
  72449. - }
  72450. - arg2 = static_cast< int >(val2);
  72451. - try {
  72452. - result = (arg1)->andimage(arg2);
  72453. - }
  72454. - catch(vips::VError &_e) {
  72455. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72456. - }
  72457. -
  72458. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72459. - return resultobj;
  72460. -fail:
  72461. - return NULL;
  72462. -}
  72463. -
  72464. -
  72465. -SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72466. - PyObject *resultobj = 0;
  72467. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72468. - std::vector< double,std::allocator< double > > arg2 ;
  72469. - void *argp1 = 0 ;
  72470. - int res1 = 0 ;
  72471. - PyObject * obj0 = 0 ;
  72472. - PyObject * obj1 = 0 ;
  72473. - vips::VImage result;
  72474. -
  72475. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail;
  72476. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72477. - if (!SWIG_IsOK(res1)) {
  72478. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72479. - }
  72480. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72481. - {
  72482. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  72483. - int res = swig::asptr(obj1, &ptr);
  72484. - if (!SWIG_IsOK(res) || !ptr) {
  72485. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_andimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  72486. - }
  72487. - arg2 = *ptr;
  72488. - if (SWIG_IsNewObj(res)) delete ptr;
  72489. - }
  72490. - try {
  72491. - result = (arg1)->andimage(arg2);
  72492. - }
  72493. - catch(vips::VError &_e) {
  72494. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72495. - }
  72496. -
  72497. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72498. - return resultobj;
  72499. -fail:
  72500. - return NULL;
  72501. -}
  72502. -
  72503. -
  72504. -SWIGINTERN PyObject *_wrap_VImage_andimage(PyObject *self, PyObject *args) {
  72505. - int argc;
  72506. - PyObject *argv[3];
  72507. - int ii;
  72508. -
  72509. - if (!PyTuple_Check(args)) SWIG_fail;
  72510. - argc = args ? (int)PyObject_Length(args) : 0;
  72511. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  72512. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  72513. - }
  72514. - if (argc == 2) {
  72515. - int _v;
  72516. - void *vptr = 0;
  72517. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72518. - _v = SWIG_CheckState(res);
  72519. - if (_v) {
  72520. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  72521. - _v = SWIG_CheckState(res);
  72522. - if (_v) {
  72523. - return _wrap_VImage_andimage__SWIG_0(self, args);
  72524. - }
  72525. - }
  72526. - }
  72527. - if (argc == 2) {
  72528. - int _v;
  72529. - void *vptr = 0;
  72530. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72531. - _v = SWIG_CheckState(res);
  72532. - if (_v) {
  72533. - {
  72534. - int res = SWIG_AsVal_int(argv[1], NULL);
  72535. - _v = SWIG_CheckState(res);
  72536. - }
  72537. - if (_v) {
  72538. - return _wrap_VImage_andimage__SWIG_1(self, args);
  72539. - }
  72540. - }
  72541. - }
  72542. - if (argc == 2) {
  72543. - int _v;
  72544. - void *vptr = 0;
  72545. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72546. - _v = SWIG_CheckState(res);
  72547. - if (_v) {
  72548. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  72549. - _v = SWIG_CheckState(res);
  72550. - if (_v) {
  72551. - return _wrap_VImage_andimage__SWIG_2(self, args);
  72552. - }
  72553. - }
  72554. - }
  72555. -
  72556. -fail:
  72557. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_andimage'.\n"
  72558. - " Possible C/C++ prototypes are:\n"
  72559. - " vips::VImage::andimage(vips::VImage)\n"
  72560. - " vips::VImage::andimage(int)\n"
  72561. - " vips::VImage::andimage(std::vector< double,std::allocator< double > >)\n");
  72562. - return 0;
  72563. -}
  72564. -
  72565. -
  72566. -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72567. - PyObject *resultobj = 0;
  72568. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72569. - vips::VImage arg2 ;
  72570. - void *argp1 = 0 ;
  72571. - int res1 = 0 ;
  72572. - void *argp2 ;
  72573. - int res2 = 0 ;
  72574. - PyObject * obj0 = 0 ;
  72575. - PyObject * obj1 = 0 ;
  72576. - vips::VImage result;
  72577. -
  72578. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
  72579. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72580. - if (!SWIG_IsOK(res1)) {
  72581. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72582. - }
  72583. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72584. - {
  72585. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  72586. - if (!SWIG_IsOK(res2)) {
  72587. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'");
  72588. - }
  72589. - if (!argp2) {
  72590. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'");
  72591. - } else {
  72592. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  72593. - arg2 = *temp;
  72594. - if (SWIG_IsNewObj(res2)) delete temp;
  72595. - }
  72596. - }
  72597. - try {
  72598. - result = (arg1)->orimage(arg2);
  72599. - }
  72600. - catch(vips::VError &_e) {
  72601. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72602. - }
  72603. -
  72604. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72605. - return resultobj;
  72606. -fail:
  72607. - return NULL;
  72608. -}
  72609. -
  72610. -
  72611. -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72612. - PyObject *resultobj = 0;
  72613. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72614. - int arg2 ;
  72615. - void *argp1 = 0 ;
  72616. - int res1 = 0 ;
  72617. - int val2 ;
  72618. - int ecode2 = 0 ;
  72619. - PyObject * obj0 = 0 ;
  72620. - PyObject * obj1 = 0 ;
  72621. - vips::VImage result;
  72622. -
  72623. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
  72624. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72625. - if (!SWIG_IsOK(res1)) {
  72626. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72627. - }
  72628. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72629. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  72630. - if (!SWIG_IsOK(ecode2)) {
  72631. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "int""'");
  72632. - }
  72633. - arg2 = static_cast< int >(val2);
  72634. - try {
  72635. - result = (arg1)->orimage(arg2);
  72636. - }
  72637. - catch(vips::VError &_e) {
  72638. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72639. - }
  72640. -
  72641. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72642. - return resultobj;
  72643. -fail:
  72644. - return NULL;
  72645. -}
  72646. -
  72647. -
  72648. -SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72649. - PyObject *resultobj = 0;
  72650. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72651. - std::vector< double,std::allocator< double > > arg2 ;
  72652. - void *argp1 = 0 ;
  72653. - int res1 = 0 ;
  72654. - PyObject * obj0 = 0 ;
  72655. - PyObject * obj1 = 0 ;
  72656. - vips::VImage result;
  72657. -
  72658. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail;
  72659. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72660. - if (!SWIG_IsOK(res1)) {
  72661. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72662. - }
  72663. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72664. - {
  72665. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  72666. - int res = swig::asptr(obj1, &ptr);
  72667. - if (!SWIG_IsOK(res) || !ptr) {
  72668. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_orimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  72669. - }
  72670. - arg2 = *ptr;
  72671. - if (SWIG_IsNewObj(res)) delete ptr;
  72672. - }
  72673. - try {
  72674. - result = (arg1)->orimage(arg2);
  72675. - }
  72676. - catch(vips::VError &_e) {
  72677. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72678. - }
  72679. -
  72680. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72681. - return resultobj;
  72682. -fail:
  72683. - return NULL;
  72684. -}
  72685. -
  72686. -
  72687. -SWIGINTERN PyObject *_wrap_VImage_orimage(PyObject *self, PyObject *args) {
  72688. - int argc;
  72689. - PyObject *argv[3];
  72690. - int ii;
  72691. -
  72692. - if (!PyTuple_Check(args)) SWIG_fail;
  72693. - argc = args ? (int)PyObject_Length(args) : 0;
  72694. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  72695. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  72696. - }
  72697. - if (argc == 2) {
  72698. - int _v;
  72699. - void *vptr = 0;
  72700. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72701. - _v = SWIG_CheckState(res);
  72702. - if (_v) {
  72703. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  72704. - _v = SWIG_CheckState(res);
  72705. - if (_v) {
  72706. - return _wrap_VImage_orimage__SWIG_0(self, args);
  72707. - }
  72708. - }
  72709. - }
  72710. - if (argc == 2) {
  72711. - int _v;
  72712. - void *vptr = 0;
  72713. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72714. - _v = SWIG_CheckState(res);
  72715. - if (_v) {
  72716. - {
  72717. - int res = SWIG_AsVal_int(argv[1], NULL);
  72718. - _v = SWIG_CheckState(res);
  72719. - }
  72720. - if (_v) {
  72721. - return _wrap_VImage_orimage__SWIG_1(self, args);
  72722. - }
  72723. - }
  72724. - }
  72725. - if (argc == 2) {
  72726. - int _v;
  72727. - void *vptr = 0;
  72728. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72729. - _v = SWIG_CheckState(res);
  72730. - if (_v) {
  72731. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  72732. - _v = SWIG_CheckState(res);
  72733. - if (_v) {
  72734. - return _wrap_VImage_orimage__SWIG_2(self, args);
  72735. - }
  72736. - }
  72737. - }
  72738. -
  72739. -fail:
  72740. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_orimage'.\n"
  72741. - " Possible C/C++ prototypes are:\n"
  72742. - " vips::VImage::orimage(vips::VImage)\n"
  72743. - " vips::VImage::orimage(int)\n"
  72744. - " vips::VImage::orimage(std::vector< double,std::allocator< double > >)\n");
  72745. - return 0;
  72746. -}
  72747. -
  72748. -
  72749. -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72750. - PyObject *resultobj = 0;
  72751. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72752. - vips::VImage arg2 ;
  72753. - void *argp1 = 0 ;
  72754. - int res1 = 0 ;
  72755. - void *argp2 ;
  72756. - int res2 = 0 ;
  72757. - PyObject * obj0 = 0 ;
  72758. - PyObject * obj1 = 0 ;
  72759. - vips::VImage result;
  72760. -
  72761. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
  72762. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72763. - if (!SWIG_IsOK(res1)) {
  72764. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72765. - }
  72766. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72767. - {
  72768. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  72769. - if (!SWIG_IsOK(res2)) {
  72770. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'");
  72771. - }
  72772. - if (!argp2) {
  72773. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'");
  72774. - } else {
  72775. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  72776. - arg2 = *temp;
  72777. - if (SWIG_IsNewObj(res2)) delete temp;
  72778. - }
  72779. - }
  72780. - try {
  72781. - result = (arg1)->eorimage(arg2);
  72782. - }
  72783. - catch(vips::VError &_e) {
  72784. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72785. - }
  72786. -
  72787. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72788. - return resultobj;
  72789. -fail:
  72790. - return NULL;
  72791. -}
  72792. -
  72793. -
  72794. -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72795. - PyObject *resultobj = 0;
  72796. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72797. - int arg2 ;
  72798. - void *argp1 = 0 ;
  72799. - int res1 = 0 ;
  72800. - int val2 ;
  72801. - int ecode2 = 0 ;
  72802. - PyObject * obj0 = 0 ;
  72803. - PyObject * obj1 = 0 ;
  72804. - vips::VImage result;
  72805. -
  72806. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
  72807. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72808. - if (!SWIG_IsOK(res1)) {
  72809. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72810. - }
  72811. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72812. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  72813. - if (!SWIG_IsOK(ecode2)) {
  72814. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "int""'");
  72815. - }
  72816. - arg2 = static_cast< int >(val2);
  72817. - try {
  72818. - result = (arg1)->eorimage(arg2);
  72819. - }
  72820. - catch(vips::VError &_e) {
  72821. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72822. - }
  72823. -
  72824. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72825. - return resultobj;
  72826. -fail:
  72827. - return NULL;
  72828. -}
  72829. -
  72830. -
  72831. -SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72832. - PyObject *resultobj = 0;
  72833. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72834. - std::vector< double,std::allocator< double > > arg2 ;
  72835. - void *argp1 = 0 ;
  72836. - int res1 = 0 ;
  72837. - PyObject * obj0 = 0 ;
  72838. - PyObject * obj1 = 0 ;
  72839. - vips::VImage result;
  72840. -
  72841. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail;
  72842. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72843. - if (!SWIG_IsOK(res1)) {
  72844. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'");
  72845. - }
  72846. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72847. - {
  72848. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  72849. - int res = swig::asptr(obj1, &ptr);
  72850. - if (!SWIG_IsOK(res) || !ptr) {
  72851. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  72852. - }
  72853. - arg2 = *ptr;
  72854. - if (SWIG_IsNewObj(res)) delete ptr;
  72855. - }
  72856. - try {
  72857. - result = (arg1)->eorimage(arg2);
  72858. - }
  72859. - catch(vips::VError &_e) {
  72860. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72861. - }
  72862. -
  72863. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72864. - return resultobj;
  72865. -fail:
  72866. - return NULL;
  72867. -}
  72868. -
  72869. -
  72870. -SWIGINTERN PyObject *_wrap_VImage_eorimage(PyObject *self, PyObject *args) {
  72871. - int argc;
  72872. - PyObject *argv[3];
  72873. - int ii;
  72874. -
  72875. - if (!PyTuple_Check(args)) SWIG_fail;
  72876. - argc = args ? (int)PyObject_Length(args) : 0;
  72877. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  72878. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  72879. - }
  72880. - if (argc == 2) {
  72881. - int _v;
  72882. - void *vptr = 0;
  72883. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72884. - _v = SWIG_CheckState(res);
  72885. - if (_v) {
  72886. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  72887. - _v = SWIG_CheckState(res);
  72888. - if (_v) {
  72889. - return _wrap_VImage_eorimage__SWIG_0(self, args);
  72890. - }
  72891. - }
  72892. - }
  72893. - if (argc == 2) {
  72894. - int _v;
  72895. - void *vptr = 0;
  72896. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72897. - _v = SWIG_CheckState(res);
  72898. - if (_v) {
  72899. - {
  72900. - int res = SWIG_AsVal_int(argv[1], NULL);
  72901. - _v = SWIG_CheckState(res);
  72902. - }
  72903. - if (_v) {
  72904. - return _wrap_VImage_eorimage__SWIG_1(self, args);
  72905. - }
  72906. - }
  72907. - }
  72908. - if (argc == 2) {
  72909. - int _v;
  72910. - void *vptr = 0;
  72911. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  72912. - _v = SWIG_CheckState(res);
  72913. - if (_v) {
  72914. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  72915. - _v = SWIG_CheckState(res);
  72916. - if (_v) {
  72917. - return _wrap_VImage_eorimage__SWIG_2(self, args);
  72918. - }
  72919. - }
  72920. - }
  72921. -
  72922. -fail:
  72923. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_eorimage'.\n"
  72924. - " Possible C/C++ prototypes are:\n"
  72925. - " vips::VImage::eorimage(vips::VImage)\n"
  72926. - " vips::VImage::eorimage(int)\n"
  72927. - " vips::VImage::eorimage(std::vector< double,std::allocator< double > >)\n");
  72928. - return 0;
  72929. -}
  72930. -
  72931. -
  72932. -SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72933. - PyObject *resultobj = 0;
  72934. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72935. - std::vector< double,std::allocator< double > > arg2 ;
  72936. - void *argp1 = 0 ;
  72937. - int res1 = 0 ;
  72938. - PyObject * obj0 = 0 ;
  72939. - PyObject * obj1 = 0 ;
  72940. - vips::VImage result;
  72941. -
  72942. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail;
  72943. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72944. - if (!SWIG_IsOK(res1)) {
  72945. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'");
  72946. - }
  72947. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72948. - {
  72949. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  72950. - int res = swig::asptr(obj1, &ptr);
  72951. - if (!SWIG_IsOK(res) || !ptr) {
  72952. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  72953. - }
  72954. - arg2 = *ptr;
  72955. - if (SWIG_IsNewObj(res)) delete ptr;
  72956. - }
  72957. - try {
  72958. - result = (arg1)->shiftleft(arg2);
  72959. - }
  72960. - catch(vips::VError &_e) {
  72961. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72962. - }
  72963. -
  72964. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  72965. - return resultobj;
  72966. -fail:
  72967. - return NULL;
  72968. -}
  72969. -
  72970. -
  72971. -SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  72972. - PyObject *resultobj = 0;
  72973. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  72974. - int arg2 ;
  72975. - void *argp1 = 0 ;
  72976. - int res1 = 0 ;
  72977. - int val2 ;
  72978. - int ecode2 = 0 ;
  72979. - PyObject * obj0 = 0 ;
  72980. - PyObject * obj1 = 0 ;
  72981. - vips::VImage result;
  72982. -
  72983. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail;
  72984. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  72985. - if (!SWIG_IsOK(res1)) {
  72986. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'");
  72987. - }
  72988. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  72989. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  72990. - if (!SWIG_IsOK(ecode2)) {
  72991. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "int""'");
  72992. - }
  72993. - arg2 = static_cast< int >(val2);
  72994. - try {
  72995. - result = (arg1)->shiftleft(arg2);
  72996. - }
  72997. - catch(vips::VError &_e) {
  72998. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  72999. - }
  73000. -
  73001. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73002. - return resultobj;
  73003. -fail:
  73004. - return NULL;
  73005. -}
  73006. -
  73007. -
  73008. -SWIGINTERN PyObject *_wrap_VImage_shiftleft(PyObject *self, PyObject *args) {
  73009. - int argc;
  73010. - PyObject *argv[3];
  73011. - int ii;
  73012. -
  73013. - if (!PyTuple_Check(args)) SWIG_fail;
  73014. - argc = args ? (int)PyObject_Length(args) : 0;
  73015. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73016. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73017. - }
  73018. - if (argc == 2) {
  73019. - int _v;
  73020. - void *vptr = 0;
  73021. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73022. - _v = SWIG_CheckState(res);
  73023. - if (_v) {
  73024. - {
  73025. - int res = SWIG_AsVal_int(argv[1], NULL);
  73026. - _v = SWIG_CheckState(res);
  73027. - }
  73028. - if (_v) {
  73029. - return _wrap_VImage_shiftleft__SWIG_1(self, args);
  73030. - }
  73031. - }
  73032. - }
  73033. - if (argc == 2) {
  73034. - int _v;
  73035. - void *vptr = 0;
  73036. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73037. - _v = SWIG_CheckState(res);
  73038. - if (_v) {
  73039. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  73040. - _v = SWIG_CheckState(res);
  73041. - if (_v) {
  73042. - return _wrap_VImage_shiftleft__SWIG_0(self, args);
  73043. - }
  73044. - }
  73045. - }
  73046. -
  73047. -fail:
  73048. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftleft'.\n"
  73049. - " Possible C/C++ prototypes are:\n"
  73050. - " vips::VImage::shiftleft(std::vector< double,std::allocator< double > >)\n"
  73051. - " vips::VImage::shiftleft(int)\n");
  73052. - return 0;
  73053. -}
  73054. -
  73055. -
  73056. -SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73057. - PyObject *resultobj = 0;
  73058. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73059. - std::vector< double,std::allocator< double > > arg2 ;
  73060. - void *argp1 = 0 ;
  73061. - int res1 = 0 ;
  73062. - PyObject * obj0 = 0 ;
  73063. - PyObject * obj1 = 0 ;
  73064. - vips::VImage result;
  73065. -
  73066. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail;
  73067. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73068. - if (!SWIG_IsOK(res1)) {
  73069. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'");
  73070. - }
  73071. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73072. - {
  73073. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  73074. - int res = swig::asptr(obj1, &ptr);
  73075. - if (!SWIG_IsOK(res) || !ptr) {
  73076. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  73077. - }
  73078. - arg2 = *ptr;
  73079. - if (SWIG_IsNewObj(res)) delete ptr;
  73080. - }
  73081. - try {
  73082. - result = (arg1)->shiftright(arg2);
  73083. - }
  73084. - catch(vips::VError &_e) {
  73085. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73086. - }
  73087. -
  73088. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73089. - return resultobj;
  73090. -fail:
  73091. - return NULL;
  73092. -}
  73093. -
  73094. -
  73095. -SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73096. - PyObject *resultobj = 0;
  73097. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73098. - int arg2 ;
  73099. - void *argp1 = 0 ;
  73100. - int res1 = 0 ;
  73101. - int val2 ;
  73102. - int ecode2 = 0 ;
  73103. - PyObject * obj0 = 0 ;
  73104. - PyObject * obj1 = 0 ;
  73105. - vips::VImage result;
  73106. -
  73107. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail;
  73108. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73109. - if (!SWIG_IsOK(res1)) {
  73110. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'");
  73111. - }
  73112. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73113. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  73114. - if (!SWIG_IsOK(ecode2)) {
  73115. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "int""'");
  73116. - }
  73117. - arg2 = static_cast< int >(val2);
  73118. - try {
  73119. - result = (arg1)->shiftright(arg2);
  73120. - }
  73121. - catch(vips::VError &_e) {
  73122. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73123. - }
  73124. -
  73125. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73126. - return resultobj;
  73127. -fail:
  73128. - return NULL;
  73129. -}
  73130. -
  73131. -
  73132. -SWIGINTERN PyObject *_wrap_VImage_shiftright(PyObject *self, PyObject *args) {
  73133. - int argc;
  73134. - PyObject *argv[3];
  73135. - int ii;
  73136. -
  73137. - if (!PyTuple_Check(args)) SWIG_fail;
  73138. - argc = args ? (int)PyObject_Length(args) : 0;
  73139. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73140. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73141. - }
  73142. - if (argc == 2) {
  73143. - int _v;
  73144. - void *vptr = 0;
  73145. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73146. - _v = SWIG_CheckState(res);
  73147. - if (_v) {
  73148. - {
  73149. - int res = SWIG_AsVal_int(argv[1], NULL);
  73150. - _v = SWIG_CheckState(res);
  73151. - }
  73152. - if (_v) {
  73153. - return _wrap_VImage_shiftright__SWIG_1(self, args);
  73154. - }
  73155. - }
  73156. - }
  73157. - if (argc == 2) {
  73158. - int _v;
  73159. - void *vptr = 0;
  73160. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73161. - _v = SWIG_CheckState(res);
  73162. - if (_v) {
  73163. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  73164. - _v = SWIG_CheckState(res);
  73165. - if (_v) {
  73166. - return _wrap_VImage_shiftright__SWIG_0(self, args);
  73167. - }
  73168. - }
  73169. - }
  73170. -
  73171. -fail:
  73172. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftright'.\n"
  73173. - " Possible C/C++ prototypes are:\n"
  73174. - " vips::VImage::shiftright(std::vector< double,std::allocator< double > >)\n"
  73175. - " vips::VImage::shiftright(int)\n");
  73176. - return 0;
  73177. -}
  73178. -
  73179. -
  73180. -SWIGINTERN PyObject *_wrap_VImage_blend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73181. - PyObject *resultobj = 0;
  73182. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73183. - vips::VImage arg2 ;
  73184. - vips::VImage arg3 ;
  73185. - void *argp1 = 0 ;
  73186. - int res1 = 0 ;
  73187. - void *argp2 ;
  73188. - int res2 = 0 ;
  73189. - void *argp3 ;
  73190. - int res3 = 0 ;
  73191. - PyObject * obj0 = 0 ;
  73192. - PyObject * obj1 = 0 ;
  73193. - PyObject * obj2 = 0 ;
  73194. - vips::VImage result;
  73195. -
  73196. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_blend",&obj0,&obj1,&obj2)) SWIG_fail;
  73197. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73198. - if (!SWIG_IsOK(res1)) {
  73199. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_blend" "', argument " "1"" of type '" "vips::VImage *""'");
  73200. - }
  73201. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73202. - {
  73203. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73204. - if (!SWIG_IsOK(res2)) {
  73205. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'");
  73206. - }
  73207. - if (!argp2) {
  73208. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'");
  73209. - } else {
  73210. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73211. - arg2 = *temp;
  73212. - if (SWIG_IsNewObj(res2)) delete temp;
  73213. - }
  73214. - }
  73215. - {
  73216. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  73217. - if (!SWIG_IsOK(res3)) {
  73218. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'");
  73219. - }
  73220. - if (!argp3) {
  73221. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'");
  73222. - } else {
  73223. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
  73224. - arg3 = *temp;
  73225. - if (SWIG_IsNewObj(res3)) delete temp;
  73226. - }
  73227. - }
  73228. - try {
  73229. - result = (arg1)->blend(arg2,arg3);
  73230. - }
  73231. - catch(vips::VError &_e) {
  73232. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73233. - }
  73234. -
  73235. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73236. - return resultobj;
  73237. -fail:
  73238. - return NULL;
  73239. -}
  73240. -
  73241. -
  73242. -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73243. - PyObject *resultobj = 0;
  73244. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73245. - vips::VImage arg2 ;
  73246. - void *argp1 = 0 ;
  73247. - int res1 = 0 ;
  73248. - void *argp2 ;
  73249. - int res2 = 0 ;
  73250. - PyObject * obj0 = 0 ;
  73251. - PyObject * obj1 = 0 ;
  73252. - vips::VImage result;
  73253. -
  73254. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
  73255. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73256. - if (!SWIG_IsOK(res1)) {
  73257. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
  73258. - }
  73259. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73260. - {
  73261. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73262. - if (!SWIG_IsOK(res2)) {
  73263. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'");
  73264. - }
  73265. - if (!argp2) {
  73266. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'");
  73267. - } else {
  73268. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73269. - arg2 = *temp;
  73270. - if (SWIG_IsNewObj(res2)) delete temp;
  73271. - }
  73272. - }
  73273. - try {
  73274. - result = (arg1)->equal(arg2);
  73275. - }
  73276. - catch(vips::VError &_e) {
  73277. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73278. - }
  73279. -
  73280. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73281. - return resultobj;
  73282. -fail:
  73283. - return NULL;
  73284. -}
  73285. -
  73286. -
  73287. -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73288. - PyObject *resultobj = 0;
  73289. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73290. - std::vector< double,std::allocator< double > > arg2 ;
  73291. - void *argp1 = 0 ;
  73292. - int res1 = 0 ;
  73293. - PyObject * obj0 = 0 ;
  73294. - PyObject * obj1 = 0 ;
  73295. - vips::VImage result;
  73296. -
  73297. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
  73298. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73299. - if (!SWIG_IsOK(res1)) {
  73300. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
  73301. - }
  73302. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73303. - {
  73304. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  73305. - int res = swig::asptr(obj1, &ptr);
  73306. - if (!SWIG_IsOK(res) || !ptr) {
  73307. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_equal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  73308. - }
  73309. - arg2 = *ptr;
  73310. - if (SWIG_IsNewObj(res)) delete ptr;
  73311. - }
  73312. - try {
  73313. - result = (arg1)->equal(arg2);
  73314. - }
  73315. - catch(vips::VError &_e) {
  73316. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73317. - }
  73318. -
  73319. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73320. - return resultobj;
  73321. -fail:
  73322. - return NULL;
  73323. -}
  73324. -
  73325. -
  73326. -SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73327. - PyObject *resultobj = 0;
  73328. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73329. - double arg2 ;
  73330. - void *argp1 = 0 ;
  73331. - int res1 = 0 ;
  73332. - double val2 ;
  73333. - int ecode2 = 0 ;
  73334. - PyObject * obj0 = 0 ;
  73335. - PyObject * obj1 = 0 ;
  73336. - vips::VImage result;
  73337. -
  73338. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail;
  73339. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73340. - if (!SWIG_IsOK(res1)) {
  73341. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'");
  73342. - }
  73343. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73344. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  73345. - if (!SWIG_IsOK(ecode2)) {
  73346. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_equal" "', argument " "2"" of type '" "double""'");
  73347. - }
  73348. - arg2 = static_cast< double >(val2);
  73349. - try {
  73350. - result = (arg1)->equal(arg2);
  73351. - }
  73352. - catch(vips::VError &_e) {
  73353. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73354. - }
  73355. -
  73356. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73357. - return resultobj;
  73358. -fail:
  73359. - return NULL;
  73360. -}
  73361. -
  73362. -
  73363. -SWIGINTERN PyObject *_wrap_VImage_equal(PyObject *self, PyObject *args) {
  73364. - int argc;
  73365. - PyObject *argv[3];
  73366. - int ii;
  73367. -
  73368. - if (!PyTuple_Check(args)) SWIG_fail;
  73369. - argc = args ? (int)PyObject_Length(args) : 0;
  73370. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73371. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73372. - }
  73373. - if (argc == 2) {
  73374. - int _v;
  73375. - void *vptr = 0;
  73376. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73377. - _v = SWIG_CheckState(res);
  73378. - if (_v) {
  73379. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  73380. - _v = SWIG_CheckState(res);
  73381. - if (_v) {
  73382. - return _wrap_VImage_equal__SWIG_0(self, args);
  73383. - }
  73384. - }
  73385. - }
  73386. - if (argc == 2) {
  73387. - int _v;
  73388. - void *vptr = 0;
  73389. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73390. - _v = SWIG_CheckState(res);
  73391. - if (_v) {
  73392. - {
  73393. - int res = SWIG_AsVal_double(argv[1], NULL);
  73394. - _v = SWIG_CheckState(res);
  73395. - }
  73396. - if (_v) {
  73397. - return _wrap_VImage_equal__SWIG_2(self, args);
  73398. - }
  73399. - }
  73400. - }
  73401. - if (argc == 2) {
  73402. - int _v;
  73403. - void *vptr = 0;
  73404. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73405. - _v = SWIG_CheckState(res);
  73406. - if (_v) {
  73407. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  73408. - _v = SWIG_CheckState(res);
  73409. - if (_v) {
  73410. - return _wrap_VImage_equal__SWIG_1(self, args);
  73411. - }
  73412. - }
  73413. - }
  73414. -
  73415. -fail:
  73416. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_equal'.\n"
  73417. - " Possible C/C++ prototypes are:\n"
  73418. - " vips::VImage::equal(vips::VImage)\n"
  73419. - " vips::VImage::equal(std::vector< double,std::allocator< double > >)\n"
  73420. - " vips::VImage::equal(double)\n");
  73421. - return 0;
  73422. -}
  73423. -
  73424. -
  73425. -SWIGINTERN PyObject *_wrap_VImage_ifthenelse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73426. - PyObject *resultobj = 0;
  73427. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73428. - vips::VImage arg2 ;
  73429. - vips::VImage arg3 ;
  73430. - void *argp1 = 0 ;
  73431. - int res1 = 0 ;
  73432. - void *argp2 ;
  73433. - int res2 = 0 ;
  73434. - void *argp3 ;
  73435. - int res3 = 0 ;
  73436. - PyObject * obj0 = 0 ;
  73437. - PyObject * obj1 = 0 ;
  73438. - PyObject * obj2 = 0 ;
  73439. - vips::VImage result;
  73440. -
  73441. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_ifthenelse",&obj0,&obj1,&obj2)) SWIG_fail;
  73442. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73443. - if (!SWIG_IsOK(res1)) {
  73444. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ifthenelse" "', argument " "1"" of type '" "vips::VImage *""'");
  73445. - }
  73446. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73447. - {
  73448. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73449. - if (!SWIG_IsOK(res2)) {
  73450. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'");
  73451. - }
  73452. - if (!argp2) {
  73453. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'");
  73454. - } else {
  73455. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73456. - arg2 = *temp;
  73457. - if (SWIG_IsNewObj(res2)) delete temp;
  73458. - }
  73459. - }
  73460. - {
  73461. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  73462. - if (!SWIG_IsOK(res3)) {
  73463. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'");
  73464. - }
  73465. - if (!argp3) {
  73466. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'");
  73467. - } else {
  73468. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
  73469. - arg3 = *temp;
  73470. - if (SWIG_IsNewObj(res3)) delete temp;
  73471. - }
  73472. - }
  73473. - try {
  73474. - result = (arg1)->ifthenelse(arg2,arg3);
  73475. - }
  73476. - catch(vips::VError &_e) {
  73477. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73478. - }
  73479. -
  73480. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73481. - return resultobj;
  73482. -fail:
  73483. - return NULL;
  73484. -}
  73485. -
  73486. -
  73487. -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73488. - PyObject *resultobj = 0;
  73489. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73490. - vips::VImage arg2 ;
  73491. - void *argp1 = 0 ;
  73492. - int res1 = 0 ;
  73493. - void *argp2 ;
  73494. - int res2 = 0 ;
  73495. - PyObject * obj0 = 0 ;
  73496. - PyObject * obj1 = 0 ;
  73497. - vips::VImage result;
  73498. -
  73499. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
  73500. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73501. - if (!SWIG_IsOK(res1)) {
  73502. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
  73503. - }
  73504. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73505. - {
  73506. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73507. - if (!SWIG_IsOK(res2)) {
  73508. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'");
  73509. - }
  73510. - if (!argp2) {
  73511. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'");
  73512. - } else {
  73513. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73514. - arg2 = *temp;
  73515. - if (SWIG_IsNewObj(res2)) delete temp;
  73516. - }
  73517. - }
  73518. - try {
  73519. - result = (arg1)->less(arg2);
  73520. - }
  73521. - catch(vips::VError &_e) {
  73522. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73523. - }
  73524. -
  73525. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73526. - return resultobj;
  73527. -fail:
  73528. - return NULL;
  73529. -}
  73530. -
  73531. -
  73532. -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73533. - PyObject *resultobj = 0;
  73534. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73535. - std::vector< double,std::allocator< double > > arg2 ;
  73536. - void *argp1 = 0 ;
  73537. - int res1 = 0 ;
  73538. - PyObject * obj0 = 0 ;
  73539. - PyObject * obj1 = 0 ;
  73540. - vips::VImage result;
  73541. -
  73542. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
  73543. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73544. - if (!SWIG_IsOK(res1)) {
  73545. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
  73546. - }
  73547. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73548. - {
  73549. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  73550. - int res = swig::asptr(obj1, &ptr);
  73551. - if (!SWIG_IsOK(res) || !ptr) {
  73552. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_less" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  73553. - }
  73554. - arg2 = *ptr;
  73555. - if (SWIG_IsNewObj(res)) delete ptr;
  73556. - }
  73557. - try {
  73558. - result = (arg1)->less(arg2);
  73559. - }
  73560. - catch(vips::VError &_e) {
  73561. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73562. - }
  73563. -
  73564. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73565. - return resultobj;
  73566. -fail:
  73567. - return NULL;
  73568. -}
  73569. -
  73570. -
  73571. -SWIGINTERN PyObject *_wrap_VImage_less__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73572. - PyObject *resultobj = 0;
  73573. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73574. - double arg2 ;
  73575. - void *argp1 = 0 ;
  73576. - int res1 = 0 ;
  73577. - double val2 ;
  73578. - int ecode2 = 0 ;
  73579. - PyObject * obj0 = 0 ;
  73580. - PyObject * obj1 = 0 ;
  73581. - vips::VImage result;
  73582. -
  73583. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail;
  73584. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73585. - if (!SWIG_IsOK(res1)) {
  73586. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'");
  73587. - }
  73588. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73589. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  73590. - if (!SWIG_IsOK(ecode2)) {
  73591. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_less" "', argument " "2"" of type '" "double""'");
  73592. - }
  73593. - arg2 = static_cast< double >(val2);
  73594. - try {
  73595. - result = (arg1)->less(arg2);
  73596. - }
  73597. - catch(vips::VError &_e) {
  73598. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73599. - }
  73600. -
  73601. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73602. - return resultobj;
  73603. -fail:
  73604. - return NULL;
  73605. -}
  73606. -
  73607. -
  73608. -SWIGINTERN PyObject *_wrap_VImage_less(PyObject *self, PyObject *args) {
  73609. - int argc;
  73610. - PyObject *argv[3];
  73611. - int ii;
  73612. -
  73613. - if (!PyTuple_Check(args)) SWIG_fail;
  73614. - argc = args ? (int)PyObject_Length(args) : 0;
  73615. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73616. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73617. - }
  73618. - if (argc == 2) {
  73619. - int _v;
  73620. - void *vptr = 0;
  73621. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73622. - _v = SWIG_CheckState(res);
  73623. - if (_v) {
  73624. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  73625. - _v = SWIG_CheckState(res);
  73626. - if (_v) {
  73627. - return _wrap_VImage_less__SWIG_0(self, args);
  73628. - }
  73629. - }
  73630. - }
  73631. - if (argc == 2) {
  73632. - int _v;
  73633. - void *vptr = 0;
  73634. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73635. - _v = SWIG_CheckState(res);
  73636. - if (_v) {
  73637. - {
  73638. - int res = SWIG_AsVal_double(argv[1], NULL);
  73639. - _v = SWIG_CheckState(res);
  73640. - }
  73641. - if (_v) {
  73642. - return _wrap_VImage_less__SWIG_2(self, args);
  73643. - }
  73644. - }
  73645. - }
  73646. - if (argc == 2) {
  73647. - int _v;
  73648. - void *vptr = 0;
  73649. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73650. - _v = SWIG_CheckState(res);
  73651. - if (_v) {
  73652. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  73653. - _v = SWIG_CheckState(res);
  73654. - if (_v) {
  73655. - return _wrap_VImage_less__SWIG_1(self, args);
  73656. - }
  73657. - }
  73658. - }
  73659. -
  73660. -fail:
  73661. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_less'.\n"
  73662. - " Possible C/C++ prototypes are:\n"
  73663. - " vips::VImage::less(vips::VImage)\n"
  73664. - " vips::VImage::less(std::vector< double,std::allocator< double > >)\n"
  73665. - " vips::VImage::less(double)\n");
  73666. - return 0;
  73667. -}
  73668. -
  73669. -
  73670. -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73671. - PyObject *resultobj = 0;
  73672. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73673. - vips::VImage arg2 ;
  73674. - void *argp1 = 0 ;
  73675. - int res1 = 0 ;
  73676. - void *argp2 ;
  73677. - int res2 = 0 ;
  73678. - PyObject * obj0 = 0 ;
  73679. - PyObject * obj1 = 0 ;
  73680. - vips::VImage result;
  73681. -
  73682. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
  73683. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73684. - if (!SWIG_IsOK(res1)) {
  73685. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
  73686. - }
  73687. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73688. - {
  73689. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73690. - if (!SWIG_IsOK(res2)) {
  73691. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'");
  73692. - }
  73693. - if (!argp2) {
  73694. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'");
  73695. - } else {
  73696. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73697. - arg2 = *temp;
  73698. - if (SWIG_IsNewObj(res2)) delete temp;
  73699. - }
  73700. - }
  73701. - try {
  73702. - result = (arg1)->lesseq(arg2);
  73703. - }
  73704. - catch(vips::VError &_e) {
  73705. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73706. - }
  73707. -
  73708. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73709. - return resultobj;
  73710. -fail:
  73711. - return NULL;
  73712. -}
  73713. -
  73714. -
  73715. -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73716. - PyObject *resultobj = 0;
  73717. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73718. - std::vector< double,std::allocator< double > > arg2 ;
  73719. - void *argp1 = 0 ;
  73720. - int res1 = 0 ;
  73721. - PyObject * obj0 = 0 ;
  73722. - PyObject * obj1 = 0 ;
  73723. - vips::VImage result;
  73724. -
  73725. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
  73726. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73727. - if (!SWIG_IsOK(res1)) {
  73728. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
  73729. - }
  73730. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73731. - {
  73732. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  73733. - int res = swig::asptr(obj1, &ptr);
  73734. - if (!SWIG_IsOK(res) || !ptr) {
  73735. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  73736. - }
  73737. - arg2 = *ptr;
  73738. - if (SWIG_IsNewObj(res)) delete ptr;
  73739. - }
  73740. - try {
  73741. - result = (arg1)->lesseq(arg2);
  73742. - }
  73743. - catch(vips::VError &_e) {
  73744. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73745. - }
  73746. -
  73747. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73748. - return resultobj;
  73749. -fail:
  73750. - return NULL;
  73751. -}
  73752. -
  73753. -
  73754. -SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73755. - PyObject *resultobj = 0;
  73756. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73757. - double arg2 ;
  73758. - void *argp1 = 0 ;
  73759. - int res1 = 0 ;
  73760. - double val2 ;
  73761. - int ecode2 = 0 ;
  73762. - PyObject * obj0 = 0 ;
  73763. - PyObject * obj1 = 0 ;
  73764. - vips::VImage result;
  73765. -
  73766. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail;
  73767. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73768. - if (!SWIG_IsOK(res1)) {
  73769. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'");
  73770. - }
  73771. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73772. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  73773. - if (!SWIG_IsOK(ecode2)) {
  73774. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "double""'");
  73775. - }
  73776. - arg2 = static_cast< double >(val2);
  73777. - try {
  73778. - result = (arg1)->lesseq(arg2);
  73779. - }
  73780. - catch(vips::VError &_e) {
  73781. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73782. - }
  73783. -
  73784. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73785. - return resultobj;
  73786. -fail:
  73787. - return NULL;
  73788. -}
  73789. -
  73790. -
  73791. -SWIGINTERN PyObject *_wrap_VImage_lesseq(PyObject *self, PyObject *args) {
  73792. - int argc;
  73793. - PyObject *argv[3];
  73794. - int ii;
  73795. -
  73796. - if (!PyTuple_Check(args)) SWIG_fail;
  73797. - argc = args ? (int)PyObject_Length(args) : 0;
  73798. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73799. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73800. - }
  73801. - if (argc == 2) {
  73802. - int _v;
  73803. - void *vptr = 0;
  73804. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73805. - _v = SWIG_CheckState(res);
  73806. - if (_v) {
  73807. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  73808. - _v = SWIG_CheckState(res);
  73809. - if (_v) {
  73810. - return _wrap_VImage_lesseq__SWIG_0(self, args);
  73811. - }
  73812. - }
  73813. - }
  73814. - if (argc == 2) {
  73815. - int _v;
  73816. - void *vptr = 0;
  73817. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73818. - _v = SWIG_CheckState(res);
  73819. - if (_v) {
  73820. - {
  73821. - int res = SWIG_AsVal_double(argv[1], NULL);
  73822. - _v = SWIG_CheckState(res);
  73823. - }
  73824. - if (_v) {
  73825. - return _wrap_VImage_lesseq__SWIG_2(self, args);
  73826. - }
  73827. - }
  73828. - }
  73829. - if (argc == 2) {
  73830. - int _v;
  73831. - void *vptr = 0;
  73832. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73833. - _v = SWIG_CheckState(res);
  73834. - if (_v) {
  73835. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  73836. - _v = SWIG_CheckState(res);
  73837. - if (_v) {
  73838. - return _wrap_VImage_lesseq__SWIG_1(self, args);
  73839. - }
  73840. - }
  73841. - }
  73842. -
  73843. -fail:
  73844. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lesseq'.\n"
  73845. - " Possible C/C++ prototypes are:\n"
  73846. - " vips::VImage::lesseq(vips::VImage)\n"
  73847. - " vips::VImage::lesseq(std::vector< double,std::allocator< double > >)\n"
  73848. - " vips::VImage::lesseq(double)\n");
  73849. - return 0;
  73850. -}
  73851. -
  73852. -
  73853. -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73854. - PyObject *resultobj = 0;
  73855. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73856. - vips::VImage arg2 ;
  73857. - void *argp1 = 0 ;
  73858. - int res1 = 0 ;
  73859. - void *argp2 ;
  73860. - int res2 = 0 ;
  73861. - PyObject * obj0 = 0 ;
  73862. - PyObject * obj1 = 0 ;
  73863. - vips::VImage result;
  73864. -
  73865. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
  73866. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73867. - if (!SWIG_IsOK(res1)) {
  73868. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
  73869. - }
  73870. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73871. - {
  73872. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  73873. - if (!SWIG_IsOK(res2)) {
  73874. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'");
  73875. - }
  73876. - if (!argp2) {
  73877. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'");
  73878. - } else {
  73879. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  73880. - arg2 = *temp;
  73881. - if (SWIG_IsNewObj(res2)) delete temp;
  73882. - }
  73883. - }
  73884. - try {
  73885. - result = (arg1)->more(arg2);
  73886. - }
  73887. - catch(vips::VError &_e) {
  73888. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73889. - }
  73890. -
  73891. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73892. - return resultobj;
  73893. -fail:
  73894. - return NULL;
  73895. -}
  73896. -
  73897. -
  73898. -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73899. - PyObject *resultobj = 0;
  73900. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73901. - std::vector< double,std::allocator< double > > arg2 ;
  73902. - void *argp1 = 0 ;
  73903. - int res1 = 0 ;
  73904. - PyObject * obj0 = 0 ;
  73905. - PyObject * obj1 = 0 ;
  73906. - vips::VImage result;
  73907. -
  73908. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
  73909. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73910. - if (!SWIG_IsOK(res1)) {
  73911. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
  73912. - }
  73913. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73914. - {
  73915. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  73916. - int res = swig::asptr(obj1, &ptr);
  73917. - if (!SWIG_IsOK(res) || !ptr) {
  73918. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_more" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  73919. - }
  73920. - arg2 = *ptr;
  73921. - if (SWIG_IsNewObj(res)) delete ptr;
  73922. - }
  73923. - try {
  73924. - result = (arg1)->more(arg2);
  73925. - }
  73926. - catch(vips::VError &_e) {
  73927. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73928. - }
  73929. -
  73930. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73931. - return resultobj;
  73932. -fail:
  73933. - return NULL;
  73934. -}
  73935. -
  73936. -
  73937. -SWIGINTERN PyObject *_wrap_VImage_more__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  73938. - PyObject *resultobj = 0;
  73939. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  73940. - double arg2 ;
  73941. - void *argp1 = 0 ;
  73942. - int res1 = 0 ;
  73943. - double val2 ;
  73944. - int ecode2 = 0 ;
  73945. - PyObject * obj0 = 0 ;
  73946. - PyObject * obj1 = 0 ;
  73947. - vips::VImage result;
  73948. -
  73949. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail;
  73950. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  73951. - if (!SWIG_IsOK(res1)) {
  73952. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'");
  73953. - }
  73954. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  73955. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  73956. - if (!SWIG_IsOK(ecode2)) {
  73957. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_more" "', argument " "2"" of type '" "double""'");
  73958. - }
  73959. - arg2 = static_cast< double >(val2);
  73960. - try {
  73961. - result = (arg1)->more(arg2);
  73962. - }
  73963. - catch(vips::VError &_e) {
  73964. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  73965. - }
  73966. -
  73967. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  73968. - return resultobj;
  73969. -fail:
  73970. - return NULL;
  73971. -}
  73972. -
  73973. -
  73974. -SWIGINTERN PyObject *_wrap_VImage_more(PyObject *self, PyObject *args) {
  73975. - int argc;
  73976. - PyObject *argv[3];
  73977. - int ii;
  73978. -
  73979. - if (!PyTuple_Check(args)) SWIG_fail;
  73980. - argc = args ? (int)PyObject_Length(args) : 0;
  73981. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  73982. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  73983. - }
  73984. - if (argc == 2) {
  73985. - int _v;
  73986. - void *vptr = 0;
  73987. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  73988. - _v = SWIG_CheckState(res);
  73989. - if (_v) {
  73990. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  73991. - _v = SWIG_CheckState(res);
  73992. - if (_v) {
  73993. - return _wrap_VImage_more__SWIG_0(self, args);
  73994. - }
  73995. - }
  73996. - }
  73997. - if (argc == 2) {
  73998. - int _v;
  73999. - void *vptr = 0;
  74000. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74001. - _v = SWIG_CheckState(res);
  74002. - if (_v) {
  74003. - {
  74004. - int res = SWIG_AsVal_double(argv[1], NULL);
  74005. - _v = SWIG_CheckState(res);
  74006. - }
  74007. - if (_v) {
  74008. - return _wrap_VImage_more__SWIG_2(self, args);
  74009. - }
  74010. - }
  74011. - }
  74012. - if (argc == 2) {
  74013. - int _v;
  74014. - void *vptr = 0;
  74015. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74016. - _v = SWIG_CheckState(res);
  74017. - if (_v) {
  74018. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  74019. - _v = SWIG_CheckState(res);
  74020. - if (_v) {
  74021. - return _wrap_VImage_more__SWIG_1(self, args);
  74022. - }
  74023. - }
  74024. - }
  74025. -
  74026. -fail:
  74027. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_more'.\n"
  74028. - " Possible C/C++ prototypes are:\n"
  74029. - " vips::VImage::more(vips::VImage)\n"
  74030. - " vips::VImage::more(std::vector< double,std::allocator< double > >)\n"
  74031. - " vips::VImage::more(double)\n");
  74032. - return 0;
  74033. -}
  74034. -
  74035. -
  74036. -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74037. - PyObject *resultobj = 0;
  74038. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74039. - vips::VImage arg2 ;
  74040. - void *argp1 = 0 ;
  74041. - int res1 = 0 ;
  74042. - void *argp2 ;
  74043. - int res2 = 0 ;
  74044. - PyObject * obj0 = 0 ;
  74045. - PyObject * obj1 = 0 ;
  74046. - vips::VImage result;
  74047. -
  74048. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
  74049. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74050. - if (!SWIG_IsOK(res1)) {
  74051. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
  74052. - }
  74053. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74054. - {
  74055. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  74056. - if (!SWIG_IsOK(res2)) {
  74057. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'");
  74058. - }
  74059. - if (!argp2) {
  74060. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'");
  74061. - } else {
  74062. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  74063. - arg2 = *temp;
  74064. - if (SWIG_IsNewObj(res2)) delete temp;
  74065. - }
  74066. - }
  74067. - try {
  74068. - result = (arg1)->moreeq(arg2);
  74069. - }
  74070. - catch(vips::VError &_e) {
  74071. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74072. - }
  74073. -
  74074. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74075. - return resultobj;
  74076. -fail:
  74077. - return NULL;
  74078. -}
  74079. -
  74080. -
  74081. -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74082. - PyObject *resultobj = 0;
  74083. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74084. - std::vector< double,std::allocator< double > > arg2 ;
  74085. - void *argp1 = 0 ;
  74086. - int res1 = 0 ;
  74087. - PyObject * obj0 = 0 ;
  74088. - PyObject * obj1 = 0 ;
  74089. - vips::VImage result;
  74090. -
  74091. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
  74092. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74093. - if (!SWIG_IsOK(res1)) {
  74094. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
  74095. - }
  74096. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74097. - {
  74098. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  74099. - int res = swig::asptr(obj1, &ptr);
  74100. - if (!SWIG_IsOK(res) || !ptr) {
  74101. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  74102. - }
  74103. - arg2 = *ptr;
  74104. - if (SWIG_IsNewObj(res)) delete ptr;
  74105. - }
  74106. - try {
  74107. - result = (arg1)->moreeq(arg2);
  74108. - }
  74109. - catch(vips::VError &_e) {
  74110. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74111. - }
  74112. -
  74113. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74114. - return resultobj;
  74115. -fail:
  74116. - return NULL;
  74117. -}
  74118. -
  74119. -
  74120. -SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74121. - PyObject *resultobj = 0;
  74122. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74123. - double arg2 ;
  74124. - void *argp1 = 0 ;
  74125. - int res1 = 0 ;
  74126. - double val2 ;
  74127. - int ecode2 = 0 ;
  74128. - PyObject * obj0 = 0 ;
  74129. - PyObject * obj1 = 0 ;
  74130. - vips::VImage result;
  74131. -
  74132. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail;
  74133. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74134. - if (!SWIG_IsOK(res1)) {
  74135. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'");
  74136. - }
  74137. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74138. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  74139. - if (!SWIG_IsOK(ecode2)) {
  74140. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "double""'");
  74141. - }
  74142. - arg2 = static_cast< double >(val2);
  74143. - try {
  74144. - result = (arg1)->moreeq(arg2);
  74145. - }
  74146. - catch(vips::VError &_e) {
  74147. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74148. - }
  74149. -
  74150. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74151. - return resultobj;
  74152. -fail:
  74153. - return NULL;
  74154. -}
  74155. -
  74156. -
  74157. -SWIGINTERN PyObject *_wrap_VImage_moreeq(PyObject *self, PyObject *args) {
  74158. - int argc;
  74159. - PyObject *argv[3];
  74160. - int ii;
  74161. -
  74162. - if (!PyTuple_Check(args)) SWIG_fail;
  74163. - argc = args ? (int)PyObject_Length(args) : 0;
  74164. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  74165. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  74166. - }
  74167. - if (argc == 2) {
  74168. - int _v;
  74169. - void *vptr = 0;
  74170. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74171. - _v = SWIG_CheckState(res);
  74172. - if (_v) {
  74173. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  74174. - _v = SWIG_CheckState(res);
  74175. - if (_v) {
  74176. - return _wrap_VImage_moreeq__SWIG_0(self, args);
  74177. - }
  74178. - }
  74179. - }
  74180. - if (argc == 2) {
  74181. - int _v;
  74182. - void *vptr = 0;
  74183. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74184. - _v = SWIG_CheckState(res);
  74185. - if (_v) {
  74186. - {
  74187. - int res = SWIG_AsVal_double(argv[1], NULL);
  74188. - _v = SWIG_CheckState(res);
  74189. - }
  74190. - if (_v) {
  74191. - return _wrap_VImage_moreeq__SWIG_2(self, args);
  74192. - }
  74193. - }
  74194. - }
  74195. - if (argc == 2) {
  74196. - int _v;
  74197. - void *vptr = 0;
  74198. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74199. - _v = SWIG_CheckState(res);
  74200. - if (_v) {
  74201. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  74202. - _v = SWIG_CheckState(res);
  74203. - if (_v) {
  74204. - return _wrap_VImage_moreeq__SWIG_1(self, args);
  74205. - }
  74206. - }
  74207. - }
  74208. -
  74209. -fail:
  74210. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_moreeq'.\n"
  74211. - " Possible C/C++ prototypes are:\n"
  74212. - " vips::VImage::moreeq(vips::VImage)\n"
  74213. - " vips::VImage::moreeq(std::vector< double,std::allocator< double > >)\n"
  74214. - " vips::VImage::moreeq(double)\n");
  74215. - return 0;
  74216. -}
  74217. -
  74218. -
  74219. -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74220. - PyObject *resultobj = 0;
  74221. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74222. - vips::VImage arg2 ;
  74223. - void *argp1 = 0 ;
  74224. - int res1 = 0 ;
  74225. - void *argp2 ;
  74226. - int res2 = 0 ;
  74227. - PyObject * obj0 = 0 ;
  74228. - PyObject * obj1 = 0 ;
  74229. - vips::VImage result;
  74230. -
  74231. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
  74232. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74233. - if (!SWIG_IsOK(res1)) {
  74234. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
  74235. - }
  74236. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74237. - {
  74238. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  74239. - if (!SWIG_IsOK(res2)) {
  74240. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'");
  74241. - }
  74242. - if (!argp2) {
  74243. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'");
  74244. - } else {
  74245. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  74246. - arg2 = *temp;
  74247. - if (SWIG_IsNewObj(res2)) delete temp;
  74248. - }
  74249. - }
  74250. - try {
  74251. - result = (arg1)->notequal(arg2);
  74252. - }
  74253. - catch(vips::VError &_e) {
  74254. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74255. - }
  74256. -
  74257. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74258. - return resultobj;
  74259. -fail:
  74260. - return NULL;
  74261. -}
  74262. -
  74263. -
  74264. -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74265. - PyObject *resultobj = 0;
  74266. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74267. - std::vector< double,std::allocator< double > > arg2 ;
  74268. - void *argp1 = 0 ;
  74269. - int res1 = 0 ;
  74270. - PyObject * obj0 = 0 ;
  74271. - PyObject * obj1 = 0 ;
  74272. - vips::VImage result;
  74273. -
  74274. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
  74275. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74276. - if (!SWIG_IsOK(res1)) {
  74277. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
  74278. - }
  74279. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74280. - {
  74281. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  74282. - int res = swig::asptr(obj1, &ptr);
  74283. - if (!SWIG_IsOK(res) || !ptr) {
  74284. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_notequal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'");
  74285. - }
  74286. - arg2 = *ptr;
  74287. - if (SWIG_IsNewObj(res)) delete ptr;
  74288. - }
  74289. - try {
  74290. - result = (arg1)->notequal(arg2);
  74291. - }
  74292. - catch(vips::VError &_e) {
  74293. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74294. - }
  74295. -
  74296. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74297. - return resultobj;
  74298. -fail:
  74299. - return NULL;
  74300. -}
  74301. -
  74302. -
  74303. -SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74304. - PyObject *resultobj = 0;
  74305. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74306. - double arg2 ;
  74307. - void *argp1 = 0 ;
  74308. - int res1 = 0 ;
  74309. - double val2 ;
  74310. - int ecode2 = 0 ;
  74311. - PyObject * obj0 = 0 ;
  74312. - PyObject * obj1 = 0 ;
  74313. - vips::VImage result;
  74314. -
  74315. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail;
  74316. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74317. - if (!SWIG_IsOK(res1)) {
  74318. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'");
  74319. - }
  74320. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74321. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  74322. - if (!SWIG_IsOK(ecode2)) {
  74323. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "double""'");
  74324. - }
  74325. - arg2 = static_cast< double >(val2);
  74326. - try {
  74327. - result = (arg1)->notequal(arg2);
  74328. - }
  74329. - catch(vips::VError &_e) {
  74330. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74331. - }
  74332. -
  74333. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74334. - return resultobj;
  74335. -fail:
  74336. - return NULL;
  74337. -}
  74338. -
  74339. -
  74340. -SWIGINTERN PyObject *_wrap_VImage_notequal(PyObject *self, PyObject *args) {
  74341. - int argc;
  74342. - PyObject *argv[3];
  74343. - int ii;
  74344. -
  74345. - if (!PyTuple_Check(args)) SWIG_fail;
  74346. - argc = args ? (int)PyObject_Length(args) : 0;
  74347. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  74348. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  74349. - }
  74350. - if (argc == 2) {
  74351. - int _v;
  74352. - void *vptr = 0;
  74353. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74354. - _v = SWIG_CheckState(res);
  74355. - if (_v) {
  74356. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  74357. - _v = SWIG_CheckState(res);
  74358. - if (_v) {
  74359. - return _wrap_VImage_notequal__SWIG_0(self, args);
  74360. - }
  74361. - }
  74362. - }
  74363. - if (argc == 2) {
  74364. - int _v;
  74365. - void *vptr = 0;
  74366. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74367. - _v = SWIG_CheckState(res);
  74368. - if (_v) {
  74369. - {
  74370. - int res = SWIG_AsVal_double(argv[1], NULL);
  74371. - _v = SWIG_CheckState(res);
  74372. - }
  74373. - if (_v) {
  74374. - return _wrap_VImage_notequal__SWIG_2(self, args);
  74375. - }
  74376. - }
  74377. - }
  74378. - if (argc == 2) {
  74379. - int _v;
  74380. - void *vptr = 0;
  74381. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  74382. - _v = SWIG_CheckState(res);
  74383. - if (_v) {
  74384. - int res = swig::asptr(argv[1], (std::vector<double,std::allocator< double > >**)(0));
  74385. - _v = SWIG_CheckState(res);
  74386. - if (_v) {
  74387. - return _wrap_VImage_notequal__SWIG_1(self, args);
  74388. - }
  74389. - }
  74390. - }
  74391. -
  74392. -fail:
  74393. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_notequal'.\n"
  74394. - " Possible C/C++ prototypes are:\n"
  74395. - " vips::VImage::notequal(vips::VImage)\n"
  74396. - " vips::VImage::notequal(std::vector< double,std::allocator< double > >)\n"
  74397. - " vips::VImage::notequal(double)\n");
  74398. - return 0;
  74399. -}
  74400. -
  74401. -
  74402. -SWIGINTERN PyObject *_wrap_VImage_quadratic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74403. - PyObject *resultobj = 0;
  74404. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74405. - vips::VImage arg2 ;
  74406. - void *argp1 = 0 ;
  74407. - int res1 = 0 ;
  74408. - void *argp2 ;
  74409. - int res2 = 0 ;
  74410. - PyObject * obj0 = 0 ;
  74411. - PyObject * obj1 = 0 ;
  74412. - vips::VImage result;
  74413. -
  74414. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_quadratic",&obj0,&obj1)) SWIG_fail;
  74415. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74416. - if (!SWIG_IsOK(res1)) {
  74417. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_quadratic" "', argument " "1"" of type '" "vips::VImage *""'");
  74418. - }
  74419. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74420. - {
  74421. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  74422. - if (!SWIG_IsOK(res2)) {
  74423. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'");
  74424. - }
  74425. - if (!argp2) {
  74426. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'");
  74427. - } else {
  74428. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  74429. - arg2 = *temp;
  74430. - if (SWIG_IsNewObj(res2)) delete temp;
  74431. - }
  74432. - }
  74433. - try {
  74434. - result = (arg1)->quadratic(arg2);
  74435. - }
  74436. - catch(vips::VError &_e) {
  74437. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74438. - }
  74439. -
  74440. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74441. - return resultobj;
  74442. -fail:
  74443. - return NULL;
  74444. -}
  74445. -
  74446. -
  74447. -SWIGINTERN PyObject *_wrap_VImage_csv2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74448. - PyObject *resultobj = 0;
  74449. - char *arg1 = (char *) 0 ;
  74450. - int res1 ;
  74451. - char *buf1 = 0 ;
  74452. - int alloc1 = 0 ;
  74453. - PyObject * obj0 = 0 ;
  74454. - vips::VImage result;
  74455. -
  74456. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_csv2vips",&obj0)) SWIG_fail;
  74457. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74458. - if (!SWIG_IsOK(res1)) {
  74459. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_csv2vips" "', argument " "1"" of type '" "char *""'");
  74460. - }
  74461. - arg1 = reinterpret_cast< char * >(buf1);
  74462. - try {
  74463. - result = vips::VImage::csv2vips(arg1);
  74464. - }
  74465. - catch(vips::VError &_e) {
  74466. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74467. - }
  74468. -
  74469. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74470. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74471. - return resultobj;
  74472. -fail:
  74473. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74474. - return NULL;
  74475. -}
  74476. -
  74477. -
  74478. -SWIGINTERN PyObject *_wrap_VImage_fits2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74479. - PyObject *resultobj = 0;
  74480. - char *arg1 = (char *) 0 ;
  74481. - int res1 ;
  74482. - char *buf1 = 0 ;
  74483. - int alloc1 = 0 ;
  74484. - PyObject * obj0 = 0 ;
  74485. - vips::VImage result;
  74486. -
  74487. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fits2vips",&obj0)) SWIG_fail;
  74488. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74489. - if (!SWIG_IsOK(res1)) {
  74490. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fits2vips" "', argument " "1"" of type '" "char *""'");
  74491. - }
  74492. - arg1 = reinterpret_cast< char * >(buf1);
  74493. - try {
  74494. - result = vips::VImage::fits2vips(arg1);
  74495. - }
  74496. - catch(vips::VError &_e) {
  74497. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74498. - }
  74499. -
  74500. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74501. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74502. - return resultobj;
  74503. -fail:
  74504. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74505. - return NULL;
  74506. -}
  74507. -
  74508. -
  74509. -SWIGINTERN PyObject *_wrap_VImage_jpeg2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74510. - PyObject *resultobj = 0;
  74511. - char *arg1 = (char *) 0 ;
  74512. - int res1 ;
  74513. - char *buf1 = 0 ;
  74514. - int alloc1 = 0 ;
  74515. - PyObject * obj0 = 0 ;
  74516. - vips::VImage result;
  74517. -
  74518. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_jpeg2vips",&obj0)) SWIG_fail;
  74519. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74520. - if (!SWIG_IsOK(res1)) {
  74521. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_jpeg2vips" "', argument " "1"" of type '" "char *""'");
  74522. - }
  74523. - arg1 = reinterpret_cast< char * >(buf1);
  74524. - try {
  74525. - result = vips::VImage::jpeg2vips(arg1);
  74526. - }
  74527. - catch(vips::VError &_e) {
  74528. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74529. - }
  74530. -
  74531. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74532. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74533. - return resultobj;
  74534. -fail:
  74535. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74536. - return NULL;
  74537. -}
  74538. -
  74539. -
  74540. -SWIGINTERN PyObject *_wrap_VImage_magick2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74541. - PyObject *resultobj = 0;
  74542. - char *arg1 = (char *) 0 ;
  74543. - int res1 ;
  74544. - char *buf1 = 0 ;
  74545. - int alloc1 = 0 ;
  74546. - PyObject * obj0 = 0 ;
  74547. - vips::VImage result;
  74548. -
  74549. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_magick2vips",&obj0)) SWIG_fail;
  74550. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74551. - if (!SWIG_IsOK(res1)) {
  74552. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_magick2vips" "', argument " "1"" of type '" "char *""'");
  74553. - }
  74554. - arg1 = reinterpret_cast< char * >(buf1);
  74555. - try {
  74556. - result = vips::VImage::magick2vips(arg1);
  74557. - }
  74558. - catch(vips::VError &_e) {
  74559. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74560. - }
  74561. -
  74562. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74563. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74564. - return resultobj;
  74565. -fail:
  74566. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74567. - return NULL;
  74568. -}
  74569. -
  74570. -
  74571. -SWIGINTERN PyObject *_wrap_VImage_png2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74572. - PyObject *resultobj = 0;
  74573. - char *arg1 = (char *) 0 ;
  74574. - int res1 ;
  74575. - char *buf1 = 0 ;
  74576. - int alloc1 = 0 ;
  74577. - PyObject * obj0 = 0 ;
  74578. - vips::VImage result;
  74579. -
  74580. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_png2vips",&obj0)) SWIG_fail;
  74581. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74582. - if (!SWIG_IsOK(res1)) {
  74583. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_png2vips" "', argument " "1"" of type '" "char *""'");
  74584. - }
  74585. - arg1 = reinterpret_cast< char * >(buf1);
  74586. - try {
  74587. - result = vips::VImage::png2vips(arg1);
  74588. - }
  74589. - catch(vips::VError &_e) {
  74590. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74591. - }
  74592. -
  74593. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74594. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74595. - return resultobj;
  74596. -fail:
  74597. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74598. - return NULL;
  74599. -}
  74600. -
  74601. -
  74602. -SWIGINTERN PyObject *_wrap_VImage_exr2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74603. - PyObject *resultobj = 0;
  74604. - char *arg1 = (char *) 0 ;
  74605. - int res1 ;
  74606. - char *buf1 = 0 ;
  74607. - int alloc1 = 0 ;
  74608. - PyObject * obj0 = 0 ;
  74609. - vips::VImage result;
  74610. -
  74611. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_exr2vips",&obj0)) SWIG_fail;
  74612. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74613. - if (!SWIG_IsOK(res1)) {
  74614. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exr2vips" "', argument " "1"" of type '" "char *""'");
  74615. - }
  74616. - arg1 = reinterpret_cast< char * >(buf1);
  74617. - try {
  74618. - result = vips::VImage::exr2vips(arg1);
  74619. - }
  74620. - catch(vips::VError &_e) {
  74621. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74622. - }
  74623. -
  74624. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74625. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74626. - return resultobj;
  74627. -fail:
  74628. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74629. - return NULL;
  74630. -}
  74631. -
  74632. -
  74633. -SWIGINTERN PyObject *_wrap_VImage_ppm2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74634. - PyObject *resultobj = 0;
  74635. - char *arg1 = (char *) 0 ;
  74636. - int res1 ;
  74637. - char *buf1 = 0 ;
  74638. - int alloc1 = 0 ;
  74639. - PyObject * obj0 = 0 ;
  74640. - vips::VImage result;
  74641. -
  74642. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ppm2vips",&obj0)) SWIG_fail;
  74643. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74644. - if (!SWIG_IsOK(res1)) {
  74645. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ppm2vips" "', argument " "1"" of type '" "char *""'");
  74646. - }
  74647. - arg1 = reinterpret_cast< char * >(buf1);
  74648. - try {
  74649. - result = vips::VImage::ppm2vips(arg1);
  74650. - }
  74651. - catch(vips::VError &_e) {
  74652. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74653. - }
  74654. -
  74655. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74656. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74657. - return resultobj;
  74658. -fail:
  74659. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74660. - return NULL;
  74661. -}
  74662. -
  74663. -
  74664. -SWIGINTERN PyObject *_wrap_VImage_analyze2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74665. - PyObject *resultobj = 0;
  74666. - char *arg1 = (char *) 0 ;
  74667. - int res1 ;
  74668. - char *buf1 = 0 ;
  74669. - int alloc1 = 0 ;
  74670. - PyObject * obj0 = 0 ;
  74671. - vips::VImage result;
  74672. -
  74673. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_analyze2vips",&obj0)) SWIG_fail;
  74674. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74675. - if (!SWIG_IsOK(res1)) {
  74676. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_analyze2vips" "', argument " "1"" of type '" "char *""'");
  74677. - }
  74678. - arg1 = reinterpret_cast< char * >(buf1);
  74679. - try {
  74680. - result = vips::VImage::analyze2vips(arg1);
  74681. - }
  74682. - catch(vips::VError &_e) {
  74683. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74684. - }
  74685. -
  74686. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74687. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74688. - return resultobj;
  74689. -fail:
  74690. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74691. - return NULL;
  74692. -}
  74693. -
  74694. -
  74695. -SWIGINTERN PyObject *_wrap_VImage_tiff2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74696. - PyObject *resultobj = 0;
  74697. - char *arg1 = (char *) 0 ;
  74698. - int res1 ;
  74699. - char *buf1 = 0 ;
  74700. - int alloc1 = 0 ;
  74701. - PyObject * obj0 = 0 ;
  74702. - vips::VImage result;
  74703. -
  74704. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tiff2vips",&obj0)) SWIG_fail;
  74705. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  74706. - if (!SWIG_IsOK(res1)) {
  74707. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tiff2vips" "', argument " "1"" of type '" "char *""'");
  74708. - }
  74709. - arg1 = reinterpret_cast< char * >(buf1);
  74710. - try {
  74711. - result = vips::VImage::tiff2vips(arg1);
  74712. - }
  74713. - catch(vips::VError &_e) {
  74714. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74715. - }
  74716. -
  74717. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  74718. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74719. - return resultobj;
  74720. -fail:
  74721. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  74722. - return NULL;
  74723. -}
  74724. -
  74725. -
  74726. -SWIGINTERN PyObject *_wrap_VImage_vips2csv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74727. - PyObject *resultobj = 0;
  74728. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74729. - char *arg2 = (char *) 0 ;
  74730. - void *argp1 = 0 ;
  74731. - int res1 = 0 ;
  74732. - int res2 ;
  74733. - char *buf2 = 0 ;
  74734. - int alloc2 = 0 ;
  74735. - PyObject * obj0 = 0 ;
  74736. - PyObject * obj1 = 0 ;
  74737. -
  74738. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2csv",&obj0,&obj1)) SWIG_fail;
  74739. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74740. - if (!SWIG_IsOK(res1)) {
  74741. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2csv" "', argument " "1"" of type '" "vips::VImage *""'");
  74742. - }
  74743. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74744. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74745. - if (!SWIG_IsOK(res2)) {
  74746. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2csv" "', argument " "2"" of type '" "char *""'");
  74747. - }
  74748. - arg2 = reinterpret_cast< char * >(buf2);
  74749. - try {
  74750. - (arg1)->vips2csv(arg2);
  74751. - }
  74752. - catch(vips::VError &_e) {
  74753. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74754. - }
  74755. -
  74756. - resultobj = SWIG_Py_Void();
  74757. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74758. - return resultobj;
  74759. -fail:
  74760. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74761. - return NULL;
  74762. -}
  74763. -
  74764. -
  74765. -SWIGINTERN PyObject *_wrap_VImage_vips2dz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74766. - PyObject *resultobj = 0;
  74767. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74768. - char *arg2 = (char *) 0 ;
  74769. - void *argp1 = 0 ;
  74770. - int res1 = 0 ;
  74771. - int res2 ;
  74772. - char *buf2 = 0 ;
  74773. - int alloc2 = 0 ;
  74774. - PyObject * obj0 = 0 ;
  74775. - PyObject * obj1 = 0 ;
  74776. -
  74777. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2dz",&obj0,&obj1)) SWIG_fail;
  74778. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74779. - if (!SWIG_IsOK(res1)) {
  74780. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2dz" "', argument " "1"" of type '" "vips::VImage *""'");
  74781. - }
  74782. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74783. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74784. - if (!SWIG_IsOK(res2)) {
  74785. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2dz" "', argument " "2"" of type '" "char *""'");
  74786. - }
  74787. - arg2 = reinterpret_cast< char * >(buf2);
  74788. - try {
  74789. - (arg1)->vips2dz(arg2);
  74790. - }
  74791. - catch(vips::VError &_e) {
  74792. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74793. - }
  74794. -
  74795. - resultobj = SWIG_Py_Void();
  74796. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74797. - return resultobj;
  74798. -fail:
  74799. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74800. - return NULL;
  74801. -}
  74802. -
  74803. -
  74804. -SWIGINTERN PyObject *_wrap_VImage_vips2jpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74805. - PyObject *resultobj = 0;
  74806. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74807. - char *arg2 = (char *) 0 ;
  74808. - void *argp1 = 0 ;
  74809. - int res1 = 0 ;
  74810. - int res2 ;
  74811. - char *buf2 = 0 ;
  74812. - int alloc2 = 0 ;
  74813. - PyObject * obj0 = 0 ;
  74814. - PyObject * obj1 = 0 ;
  74815. -
  74816. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2jpeg",&obj0,&obj1)) SWIG_fail;
  74817. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74818. - if (!SWIG_IsOK(res1)) {
  74819. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2jpeg" "', argument " "1"" of type '" "vips::VImage *""'");
  74820. - }
  74821. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74822. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74823. - if (!SWIG_IsOK(res2)) {
  74824. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2jpeg" "', argument " "2"" of type '" "char *""'");
  74825. - }
  74826. - arg2 = reinterpret_cast< char * >(buf2);
  74827. - try {
  74828. - (arg1)->vips2jpeg(arg2);
  74829. - }
  74830. - catch(vips::VError &_e) {
  74831. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74832. - }
  74833. -
  74834. - resultobj = SWIG_Py_Void();
  74835. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74836. - return resultobj;
  74837. -fail:
  74838. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74839. - return NULL;
  74840. -}
  74841. -
  74842. -
  74843. -SWIGINTERN PyObject *_wrap_VImage_vips2mimejpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74844. - PyObject *resultobj = 0;
  74845. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74846. - int arg2 ;
  74847. - void *argp1 = 0 ;
  74848. - int res1 = 0 ;
  74849. - int val2 ;
  74850. - int ecode2 = 0 ;
  74851. - PyObject * obj0 = 0 ;
  74852. - PyObject * obj1 = 0 ;
  74853. -
  74854. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2mimejpeg",&obj0,&obj1)) SWIG_fail;
  74855. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74856. - if (!SWIG_IsOK(res1)) {
  74857. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mimejpeg" "', argument " "1"" of type '" "vips::VImage *""'");
  74858. - }
  74859. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74860. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  74861. - if (!SWIG_IsOK(ecode2)) {
  74862. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_vips2mimejpeg" "', argument " "2"" of type '" "int""'");
  74863. - }
  74864. - arg2 = static_cast< int >(val2);
  74865. - try {
  74866. - (arg1)->vips2mimejpeg(arg2);
  74867. - }
  74868. - catch(vips::VError &_e) {
  74869. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74870. - }
  74871. -
  74872. - resultobj = SWIG_Py_Void();
  74873. - return resultobj;
  74874. -fail:
  74875. - return NULL;
  74876. -}
  74877. -
  74878. -
  74879. -SWIGINTERN PyObject *_wrap_VImage_vips2png(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74880. - PyObject *resultobj = 0;
  74881. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74882. - char *arg2 = (char *) 0 ;
  74883. - void *argp1 = 0 ;
  74884. - int res1 = 0 ;
  74885. - int res2 ;
  74886. - char *buf2 = 0 ;
  74887. - int alloc2 = 0 ;
  74888. - PyObject * obj0 = 0 ;
  74889. - PyObject * obj1 = 0 ;
  74890. -
  74891. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2png",&obj0,&obj1)) SWIG_fail;
  74892. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74893. - if (!SWIG_IsOK(res1)) {
  74894. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2png" "', argument " "1"" of type '" "vips::VImage *""'");
  74895. - }
  74896. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74897. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74898. - if (!SWIG_IsOK(res2)) {
  74899. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2png" "', argument " "2"" of type '" "char *""'");
  74900. - }
  74901. - arg2 = reinterpret_cast< char * >(buf2);
  74902. - try {
  74903. - (arg1)->vips2png(arg2);
  74904. - }
  74905. - catch(vips::VError &_e) {
  74906. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74907. - }
  74908. -
  74909. - resultobj = SWIG_Py_Void();
  74910. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74911. - return resultobj;
  74912. -fail:
  74913. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74914. - return NULL;
  74915. -}
  74916. -
  74917. -
  74918. -SWIGINTERN PyObject *_wrap_VImage_vips2ppm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74919. - PyObject *resultobj = 0;
  74920. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74921. - char *arg2 = (char *) 0 ;
  74922. - void *argp1 = 0 ;
  74923. - int res1 = 0 ;
  74924. - int res2 ;
  74925. - char *buf2 = 0 ;
  74926. - int alloc2 = 0 ;
  74927. - PyObject * obj0 = 0 ;
  74928. - PyObject * obj1 = 0 ;
  74929. -
  74930. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2ppm",&obj0,&obj1)) SWIG_fail;
  74931. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74932. - if (!SWIG_IsOK(res1)) {
  74933. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2ppm" "', argument " "1"" of type '" "vips::VImage *""'");
  74934. - }
  74935. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74936. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74937. - if (!SWIG_IsOK(res2)) {
  74938. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2ppm" "', argument " "2"" of type '" "char *""'");
  74939. - }
  74940. - arg2 = reinterpret_cast< char * >(buf2);
  74941. - try {
  74942. - (arg1)->vips2ppm(arg2);
  74943. - }
  74944. - catch(vips::VError &_e) {
  74945. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74946. - }
  74947. -
  74948. - resultobj = SWIG_Py_Void();
  74949. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74950. - return resultobj;
  74951. -fail:
  74952. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74953. - return NULL;
  74954. -}
  74955. -
  74956. -
  74957. -SWIGINTERN PyObject *_wrap_VImage_vips2tiff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74958. - PyObject *resultobj = 0;
  74959. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  74960. - char *arg2 = (char *) 0 ;
  74961. - void *argp1 = 0 ;
  74962. - int res1 = 0 ;
  74963. - int res2 ;
  74964. - char *buf2 = 0 ;
  74965. - int alloc2 = 0 ;
  74966. - PyObject * obj0 = 0 ;
  74967. - PyObject * obj1 = 0 ;
  74968. -
  74969. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2tiff",&obj0,&obj1)) SWIG_fail;
  74970. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  74971. - if (!SWIG_IsOK(res1)) {
  74972. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2tiff" "', argument " "1"" of type '" "vips::VImage *""'");
  74973. - }
  74974. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  74975. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  74976. - if (!SWIG_IsOK(res2)) {
  74977. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2tiff" "', argument " "2"" of type '" "char *""'");
  74978. - }
  74979. - arg2 = reinterpret_cast< char * >(buf2);
  74980. - try {
  74981. - (arg1)->vips2tiff(arg2);
  74982. - }
  74983. - catch(vips::VError &_e) {
  74984. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  74985. - }
  74986. -
  74987. - resultobj = SWIG_Py_Void();
  74988. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74989. - return resultobj;
  74990. -fail:
  74991. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  74992. - return NULL;
  74993. -}
  74994. -
  74995. -
  74996. -SWIGINTERN PyObject *_wrap_VImage_create_fmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  74997. - PyObject *resultobj = 0;
  74998. - int arg1 ;
  74999. - int arg2 ;
  75000. - int arg3 ;
  75001. - double arg4 ;
  75002. - double arg5 ;
  75003. - double arg6 ;
  75004. - double arg7 ;
  75005. - double arg8 ;
  75006. - int val1 ;
  75007. - int ecode1 = 0 ;
  75008. - int val2 ;
  75009. - int ecode2 = 0 ;
  75010. - int val3 ;
  75011. - int ecode3 = 0 ;
  75012. - double val4 ;
  75013. - int ecode4 = 0 ;
  75014. - double val5 ;
  75015. - int ecode5 = 0 ;
  75016. - double val6 ;
  75017. - int ecode6 = 0 ;
  75018. - double val7 ;
  75019. - int ecode7 = 0 ;
  75020. - double val8 ;
  75021. - int ecode8 = 0 ;
  75022. - PyObject * obj0 = 0 ;
  75023. - PyObject * obj1 = 0 ;
  75024. - PyObject * obj2 = 0 ;
  75025. - PyObject * obj3 = 0 ;
  75026. - PyObject * obj4 = 0 ;
  75027. - PyObject * obj5 = 0 ;
  75028. - PyObject * obj6 = 0 ;
  75029. - PyObject * obj7 = 0 ;
  75030. - vips::VImage result;
  75031. -
  75032. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_create_fmask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  75033. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  75034. - if (!SWIG_IsOK(ecode1)) {
  75035. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_create_fmask" "', argument " "1"" of type '" "int""'");
  75036. - }
  75037. - arg1 = static_cast< int >(val1);
  75038. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75039. - if (!SWIG_IsOK(ecode2)) {
  75040. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_create_fmask" "', argument " "2"" of type '" "int""'");
  75041. - }
  75042. - arg2 = static_cast< int >(val2);
  75043. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  75044. - if (!SWIG_IsOK(ecode3)) {
  75045. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_create_fmask" "', argument " "3"" of type '" "int""'");
  75046. - }
  75047. - arg3 = static_cast< int >(val3);
  75048. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  75049. - if (!SWIG_IsOK(ecode4)) {
  75050. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_create_fmask" "', argument " "4"" of type '" "double""'");
  75051. - }
  75052. - arg4 = static_cast< double >(val4);
  75053. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  75054. - if (!SWIG_IsOK(ecode5)) {
  75055. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_create_fmask" "', argument " "5"" of type '" "double""'");
  75056. - }
  75057. - arg5 = static_cast< double >(val5);
  75058. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  75059. - if (!SWIG_IsOK(ecode6)) {
  75060. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_create_fmask" "', argument " "6"" of type '" "double""'");
  75061. - }
  75062. - arg6 = static_cast< double >(val6);
  75063. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  75064. - if (!SWIG_IsOK(ecode7)) {
  75065. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_create_fmask" "', argument " "7"" of type '" "double""'");
  75066. - }
  75067. - arg7 = static_cast< double >(val7);
  75068. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  75069. - if (!SWIG_IsOK(ecode8)) {
  75070. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_create_fmask" "', argument " "8"" of type '" "double""'");
  75071. - }
  75072. - arg8 = static_cast< double >(val8);
  75073. - try {
  75074. - result = vips::VImage::create_fmask(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  75075. - }
  75076. - catch(vips::VError &_e) {
  75077. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75078. - }
  75079. -
  75080. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75081. - return resultobj;
  75082. -fail:
  75083. - return NULL;
  75084. -}
  75085. -
  75086. -
  75087. -SWIGINTERN PyObject *_wrap_VImage_disp_ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75088. - PyObject *resultobj = 0;
  75089. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75090. - void *argp1 = 0 ;
  75091. - int res1 = 0 ;
  75092. - PyObject * obj0 = 0 ;
  75093. - vips::VImage result;
  75094. -
  75095. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_disp_ps",&obj0)) SWIG_fail;
  75096. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75097. - if (!SWIG_IsOK(res1)) {
  75098. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp_ps" "', argument " "1"" of type '" "vips::VImage *""'");
  75099. - }
  75100. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75101. - try {
  75102. - result = (arg1)->disp_ps();
  75103. - }
  75104. - catch(vips::VError &_e) {
  75105. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75106. - }
  75107. -
  75108. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75109. - return resultobj;
  75110. -fail:
  75111. - return NULL;
  75112. -}
  75113. -
  75114. -
  75115. -SWIGINTERN PyObject *_wrap_VImage_flt_image_freq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75116. - PyObject *resultobj = 0;
  75117. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75118. - int arg2 ;
  75119. - double arg3 ;
  75120. - double arg4 ;
  75121. - double arg5 ;
  75122. - double arg6 ;
  75123. - double arg7 ;
  75124. - void *argp1 = 0 ;
  75125. - int res1 = 0 ;
  75126. - int val2 ;
  75127. - int ecode2 = 0 ;
  75128. - double val3 ;
  75129. - int ecode3 = 0 ;
  75130. - double val4 ;
  75131. - int ecode4 = 0 ;
  75132. - double val5 ;
  75133. - int ecode5 = 0 ;
  75134. - double val6 ;
  75135. - int ecode6 = 0 ;
  75136. - double val7 ;
  75137. - int ecode7 = 0 ;
  75138. - PyObject * obj0 = 0 ;
  75139. - PyObject * obj1 = 0 ;
  75140. - PyObject * obj2 = 0 ;
  75141. - PyObject * obj3 = 0 ;
  75142. - PyObject * obj4 = 0 ;
  75143. - PyObject * obj5 = 0 ;
  75144. - PyObject * obj6 = 0 ;
  75145. - vips::VImage result;
  75146. -
  75147. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_flt_image_freq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  75148. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75149. - if (!SWIG_IsOK(res1)) {
  75150. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flt_image_freq" "', argument " "1"" of type '" "vips::VImage *""'");
  75151. - }
  75152. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75153. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75154. - if (!SWIG_IsOK(ecode2)) {
  75155. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flt_image_freq" "', argument " "2"" of type '" "int""'");
  75156. - }
  75157. - arg2 = static_cast< int >(val2);
  75158. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  75159. - if (!SWIG_IsOK(ecode3)) {
  75160. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flt_image_freq" "', argument " "3"" of type '" "double""'");
  75161. - }
  75162. - arg3 = static_cast< double >(val3);
  75163. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  75164. - if (!SWIG_IsOK(ecode4)) {
  75165. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flt_image_freq" "', argument " "4"" of type '" "double""'");
  75166. - }
  75167. - arg4 = static_cast< double >(val4);
  75168. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  75169. - if (!SWIG_IsOK(ecode5)) {
  75170. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flt_image_freq" "', argument " "5"" of type '" "double""'");
  75171. - }
  75172. - arg5 = static_cast< double >(val5);
  75173. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  75174. - if (!SWIG_IsOK(ecode6)) {
  75175. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_flt_image_freq" "', argument " "6"" of type '" "double""'");
  75176. - }
  75177. - arg6 = static_cast< double >(val6);
  75178. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  75179. - if (!SWIG_IsOK(ecode7)) {
  75180. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_flt_image_freq" "', argument " "7"" of type '" "double""'");
  75181. - }
  75182. - arg7 = static_cast< double >(val7);
  75183. - try {
  75184. - result = (arg1)->flt_image_freq(arg2,arg3,arg4,arg5,arg6,arg7);
  75185. - }
  75186. - catch(vips::VError &_e) {
  75187. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75188. - }
  75189. -
  75190. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75191. - return resultobj;
  75192. -fail:
  75193. - return NULL;
  75194. -}
  75195. -
  75196. -
  75197. -SWIGINTERN PyObject *_wrap_VImage_fractsurf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75198. - PyObject *resultobj = 0;
  75199. - int arg1 ;
  75200. - double arg2 ;
  75201. - int val1 ;
  75202. - int ecode1 = 0 ;
  75203. - double val2 ;
  75204. - int ecode2 = 0 ;
  75205. - PyObject * obj0 = 0 ;
  75206. - PyObject * obj1 = 0 ;
  75207. - vips::VImage result;
  75208. -
  75209. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fractsurf",&obj0,&obj1)) SWIG_fail;
  75210. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  75211. - if (!SWIG_IsOK(ecode1)) {
  75212. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fractsurf" "', argument " "1"" of type '" "int""'");
  75213. - }
  75214. - arg1 = static_cast< int >(val1);
  75215. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  75216. - if (!SWIG_IsOK(ecode2)) {
  75217. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fractsurf" "', argument " "2"" of type '" "double""'");
  75218. - }
  75219. - arg2 = static_cast< double >(val2);
  75220. - try {
  75221. - result = vips::VImage::fractsurf(arg1,arg2);
  75222. - }
  75223. - catch(vips::VError &_e) {
  75224. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75225. - }
  75226. -
  75227. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75228. - return resultobj;
  75229. -fail:
  75230. - return NULL;
  75231. -}
  75232. -
  75233. -
  75234. -SWIGINTERN PyObject *_wrap_VImage_freqflt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75235. - PyObject *resultobj = 0;
  75236. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75237. - vips::VImage arg2 ;
  75238. - void *argp1 = 0 ;
  75239. - int res1 = 0 ;
  75240. - void *argp2 ;
  75241. - int res2 = 0 ;
  75242. - PyObject * obj0 = 0 ;
  75243. - PyObject * obj1 = 0 ;
  75244. - vips::VImage result;
  75245. -
  75246. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_freqflt",&obj0,&obj1)) SWIG_fail;
  75247. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75248. - if (!SWIG_IsOK(res1)) {
  75249. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_freqflt" "', argument " "1"" of type '" "vips::VImage *""'");
  75250. - }
  75251. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75252. - {
  75253. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  75254. - if (!SWIG_IsOK(res2)) {
  75255. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'");
  75256. - }
  75257. - if (!argp2) {
  75258. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'");
  75259. - } else {
  75260. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  75261. - arg2 = *temp;
  75262. - if (SWIG_IsNewObj(res2)) delete temp;
  75263. - }
  75264. - }
  75265. - try {
  75266. - result = (arg1)->freqflt(arg2);
  75267. - }
  75268. - catch(vips::VError &_e) {
  75269. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75270. - }
  75271. -
  75272. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75273. - return resultobj;
  75274. -fail:
  75275. - return NULL;
  75276. -}
  75277. -
  75278. -
  75279. -SWIGINTERN PyObject *_wrap_VImage_fwfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75280. - PyObject *resultobj = 0;
  75281. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75282. - void *argp1 = 0 ;
  75283. - int res1 = 0 ;
  75284. - PyObject * obj0 = 0 ;
  75285. - vips::VImage result;
  75286. -
  75287. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fwfft",&obj0)) SWIG_fail;
  75288. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75289. - if (!SWIG_IsOK(res1)) {
  75290. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fwfft" "', argument " "1"" of type '" "vips::VImage *""'");
  75291. - }
  75292. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75293. - try {
  75294. - result = (arg1)->fwfft();
  75295. - }
  75296. - catch(vips::VError &_e) {
  75297. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75298. - }
  75299. -
  75300. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75301. - return resultobj;
  75302. -fail:
  75303. - return NULL;
  75304. -}
  75305. -
  75306. -
  75307. -SWIGINTERN PyObject *_wrap_VImage_rotquad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75308. - PyObject *resultobj = 0;
  75309. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75310. - void *argp1 = 0 ;
  75311. - int res1 = 0 ;
  75312. - PyObject * obj0 = 0 ;
  75313. - vips::VImage result;
  75314. -
  75315. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_rotquad",&obj0)) SWIG_fail;
  75316. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75317. - if (!SWIG_IsOK(res1)) {
  75318. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rotquad" "', argument " "1"" of type '" "vips::VImage *""'");
  75319. - }
  75320. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75321. - try {
  75322. - result = (arg1)->rotquad();
  75323. - }
  75324. - catch(vips::VError &_e) {
  75325. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75326. - }
  75327. -
  75328. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75329. - return resultobj;
  75330. -fail:
  75331. - return NULL;
  75332. -}
  75333. -
  75334. -
  75335. -SWIGINTERN PyObject *_wrap_VImage_invfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75336. - PyObject *resultobj = 0;
  75337. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75338. - void *argp1 = 0 ;
  75339. - int res1 = 0 ;
  75340. - PyObject * obj0 = 0 ;
  75341. - vips::VImage result;
  75342. -
  75343. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfft",&obj0)) SWIG_fail;
  75344. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75345. - if (!SWIG_IsOK(res1)) {
  75346. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfft" "', argument " "1"" of type '" "vips::VImage *""'");
  75347. - }
  75348. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75349. - try {
  75350. - result = (arg1)->invfft();
  75351. - }
  75352. - catch(vips::VError &_e) {
  75353. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75354. - }
  75355. -
  75356. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75357. - return resultobj;
  75358. -fail:
  75359. - return NULL;
  75360. -}
  75361. -
  75362. -
  75363. -SWIGINTERN PyObject *_wrap_VImage_phasecor_fft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75364. - PyObject *resultobj = 0;
  75365. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75366. - vips::VImage arg2 ;
  75367. - void *argp1 = 0 ;
  75368. - int res1 = 0 ;
  75369. - void *argp2 ;
  75370. - int res2 = 0 ;
  75371. - PyObject * obj0 = 0 ;
  75372. - PyObject * obj1 = 0 ;
  75373. - vips::VImage result;
  75374. -
  75375. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_phasecor_fft",&obj0,&obj1)) SWIG_fail;
  75376. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75377. - if (!SWIG_IsOK(res1)) {
  75378. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_phasecor_fft" "', argument " "1"" of type '" "vips::VImage *""'");
  75379. - }
  75380. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75381. - {
  75382. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  75383. - if (!SWIG_IsOK(res2)) {
  75384. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'");
  75385. - }
  75386. - if (!argp2) {
  75387. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'");
  75388. - } else {
  75389. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  75390. - arg2 = *temp;
  75391. - if (SWIG_IsNewObj(res2)) delete temp;
  75392. - }
  75393. - }
  75394. - try {
  75395. - result = (arg1)->phasecor_fft(arg2);
  75396. - }
  75397. - catch(vips::VError &_e) {
  75398. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75399. - }
  75400. -
  75401. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75402. - return resultobj;
  75403. -fail:
  75404. - return NULL;
  75405. -}
  75406. -
  75407. -
  75408. -SWIGINTERN PyObject *_wrap_VImage_invfftr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75409. - PyObject *resultobj = 0;
  75410. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75411. - void *argp1 = 0 ;
  75412. - int res1 = 0 ;
  75413. - PyObject * obj0 = 0 ;
  75414. - vips::VImage result;
  75415. -
  75416. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfftr",&obj0)) SWIG_fail;
  75417. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75418. - if (!SWIG_IsOK(res1)) {
  75419. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfftr" "', argument " "1"" of type '" "vips::VImage *""'");
  75420. - }
  75421. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75422. - try {
  75423. - result = (arg1)->invfftr();
  75424. - }
  75425. - catch(vips::VError &_e) {
  75426. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75427. - }
  75428. -
  75429. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75430. - return resultobj;
  75431. -fail:
  75432. - return NULL;
  75433. -}
  75434. -
  75435. -
  75436. -SWIGINTERN PyObject *_wrap_VImage_gammacorrect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75437. - PyObject *resultobj = 0;
  75438. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75439. - double arg2 ;
  75440. - void *argp1 = 0 ;
  75441. - int res1 = 0 ;
  75442. - double val2 ;
  75443. - int ecode2 = 0 ;
  75444. - PyObject * obj0 = 0 ;
  75445. - PyObject * obj1 = 0 ;
  75446. - vips::VImage result;
  75447. -
  75448. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gammacorrect",&obj0,&obj1)) SWIG_fail;
  75449. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75450. - if (!SWIG_IsOK(res1)) {
  75451. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gammacorrect" "', argument " "1"" of type '" "vips::VImage *""'");
  75452. - }
  75453. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75454. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  75455. - if (!SWIG_IsOK(ecode2)) {
  75456. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gammacorrect" "', argument " "2"" of type '" "double""'");
  75457. - }
  75458. - arg2 = static_cast< double >(val2);
  75459. - try {
  75460. - result = (arg1)->gammacorrect(arg2);
  75461. - }
  75462. - catch(vips::VError &_e) {
  75463. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75464. - }
  75465. -
  75466. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75467. - return resultobj;
  75468. -fail:
  75469. - return NULL;
  75470. -}
  75471. -
  75472. -
  75473. -SWIGINTERN PyObject *_wrap_VImage_heq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75474. - PyObject *resultobj = 0;
  75475. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75476. - int arg2 ;
  75477. - void *argp1 = 0 ;
  75478. - int res1 = 0 ;
  75479. - int val2 ;
  75480. - int ecode2 = 0 ;
  75481. - PyObject * obj0 = 0 ;
  75482. - PyObject * obj1 = 0 ;
  75483. - vips::VImage result;
  75484. -
  75485. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_heq",&obj0,&obj1)) SWIG_fail;
  75486. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75487. - if (!SWIG_IsOK(res1)) {
  75488. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_heq" "', argument " "1"" of type '" "vips::VImage *""'");
  75489. - }
  75490. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75491. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75492. - if (!SWIG_IsOK(ecode2)) {
  75493. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_heq" "', argument " "2"" of type '" "int""'");
  75494. - }
  75495. - arg2 = static_cast< int >(val2);
  75496. - try {
  75497. - result = (arg1)->heq(arg2);
  75498. - }
  75499. - catch(vips::VError &_e) {
  75500. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75501. - }
  75502. -
  75503. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75504. - return resultobj;
  75505. -fail:
  75506. - return NULL;
  75507. -}
  75508. -
  75509. -
  75510. -SWIGINTERN PyObject *_wrap_VImage_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75511. - PyObject *resultobj = 0;
  75512. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75513. - int arg2 ;
  75514. - void *argp1 = 0 ;
  75515. - int res1 = 0 ;
  75516. - int val2 ;
  75517. - int ecode2 = 0 ;
  75518. - PyObject * obj0 = 0 ;
  75519. - PyObject * obj1 = 0 ;
  75520. - vips::VImage result;
  75521. -
  75522. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist",&obj0,&obj1)) SWIG_fail;
  75523. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75524. - if (!SWIG_IsOK(res1)) {
  75525. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist" "', argument " "1"" of type '" "vips::VImage *""'");
  75526. - }
  75527. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75528. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75529. - if (!SWIG_IsOK(ecode2)) {
  75530. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_hist" "', argument " "2"" of type '" "int""'");
  75531. - }
  75532. - arg2 = static_cast< int >(val2);
  75533. - try {
  75534. - result = (arg1)->hist(arg2);
  75535. - }
  75536. - catch(vips::VError &_e) {
  75537. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75538. - }
  75539. -
  75540. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75541. - return resultobj;
  75542. -fail:
  75543. - return NULL;
  75544. -}
  75545. -
  75546. -
  75547. -SWIGINTERN PyObject *_wrap_VImage_histcum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75548. - PyObject *resultobj = 0;
  75549. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75550. - void *argp1 = 0 ;
  75551. - int res1 = 0 ;
  75552. - PyObject * obj0 = 0 ;
  75553. - vips::VImage result;
  75554. -
  75555. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histcum",&obj0)) SWIG_fail;
  75556. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75557. - if (!SWIG_IsOK(res1)) {
  75558. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histcum" "', argument " "1"" of type '" "vips::VImage *""'");
  75559. - }
  75560. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75561. - try {
  75562. - result = (arg1)->histcum();
  75563. - }
  75564. - catch(vips::VError &_e) {
  75565. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75566. - }
  75567. -
  75568. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75569. - return resultobj;
  75570. -fail:
  75571. - return NULL;
  75572. -}
  75573. -
  75574. -
  75575. -SWIGINTERN PyObject *_wrap_VImage_histeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75576. - PyObject *resultobj = 0;
  75577. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75578. - void *argp1 = 0 ;
  75579. - int res1 = 0 ;
  75580. - PyObject * obj0 = 0 ;
  75581. - vips::VImage result;
  75582. -
  75583. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histeq",&obj0)) SWIG_fail;
  75584. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75585. - if (!SWIG_IsOK(res1)) {
  75586. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histeq" "', argument " "1"" of type '" "vips::VImage *""'");
  75587. - }
  75588. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75589. - try {
  75590. - result = (arg1)->histeq();
  75591. - }
  75592. - catch(vips::VError &_e) {
  75593. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75594. - }
  75595. -
  75596. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75597. - return resultobj;
  75598. -fail:
  75599. - return NULL;
  75600. -}
  75601. -
  75602. -
  75603. -SWIGINTERN PyObject *_wrap_VImage_hist_indexed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75604. - PyObject *resultobj = 0;
  75605. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75606. - vips::VImage arg2 ;
  75607. - void *argp1 = 0 ;
  75608. - int res1 = 0 ;
  75609. - void *argp2 ;
  75610. - int res2 = 0 ;
  75611. - PyObject * obj0 = 0 ;
  75612. - PyObject * obj1 = 0 ;
  75613. - vips::VImage result;
  75614. -
  75615. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist_indexed",&obj0,&obj1)) SWIG_fail;
  75616. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75617. - if (!SWIG_IsOK(res1)) {
  75618. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist_indexed" "', argument " "1"" of type '" "vips::VImage *""'");
  75619. - }
  75620. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75621. - {
  75622. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  75623. - if (!SWIG_IsOK(res2)) {
  75624. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'");
  75625. - }
  75626. - if (!argp2) {
  75627. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'");
  75628. - } else {
  75629. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  75630. - arg2 = *temp;
  75631. - if (SWIG_IsNewObj(res2)) delete temp;
  75632. - }
  75633. - }
  75634. - try {
  75635. - result = (arg1)->hist_indexed(arg2);
  75636. - }
  75637. - catch(vips::VError &_e) {
  75638. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75639. - }
  75640. -
  75641. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75642. - return resultobj;
  75643. -fail:
  75644. - return NULL;
  75645. -}
  75646. -
  75647. -
  75648. -SWIGINTERN PyObject *_wrap_VImage_histgr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75649. - PyObject *resultobj = 0;
  75650. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75651. - int arg2 ;
  75652. - void *argp1 = 0 ;
  75653. - int res1 = 0 ;
  75654. - int val2 ;
  75655. - int ecode2 = 0 ;
  75656. - PyObject * obj0 = 0 ;
  75657. - PyObject * obj1 = 0 ;
  75658. - vips::VImage result;
  75659. -
  75660. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histgr",&obj0,&obj1)) SWIG_fail;
  75661. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75662. - if (!SWIG_IsOK(res1)) {
  75663. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histgr" "', argument " "1"" of type '" "vips::VImage *""'");
  75664. - }
  75665. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75666. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75667. - if (!SWIG_IsOK(ecode2)) {
  75668. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histgr" "', argument " "2"" of type '" "int""'");
  75669. - }
  75670. - arg2 = static_cast< int >(val2);
  75671. - try {
  75672. - result = (arg1)->histgr(arg2);
  75673. - }
  75674. - catch(vips::VError &_e) {
  75675. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75676. - }
  75677. -
  75678. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75679. - return resultobj;
  75680. -fail:
  75681. - return NULL;
  75682. -}
  75683. -
  75684. -
  75685. -SWIGINTERN PyObject *_wrap_VImage_histnD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75686. - PyObject *resultobj = 0;
  75687. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75688. - int arg2 ;
  75689. - void *argp1 = 0 ;
  75690. - int res1 = 0 ;
  75691. - int val2 ;
  75692. - int ecode2 = 0 ;
  75693. - PyObject * obj0 = 0 ;
  75694. - PyObject * obj1 = 0 ;
  75695. - vips::VImage result;
  75696. -
  75697. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histnD",&obj0,&obj1)) SWIG_fail;
  75698. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75699. - if (!SWIG_IsOK(res1)) {
  75700. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnD" "', argument " "1"" of type '" "vips::VImage *""'");
  75701. - }
  75702. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75703. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75704. - if (!SWIG_IsOK(ecode2)) {
  75705. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histnD" "', argument " "2"" of type '" "int""'");
  75706. - }
  75707. - arg2 = static_cast< int >(val2);
  75708. - try {
  75709. - result = (arg1)->histnD(arg2);
  75710. - }
  75711. - catch(vips::VError &_e) {
  75712. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75713. - }
  75714. -
  75715. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75716. - return resultobj;
  75717. -fail:
  75718. - return NULL;
  75719. -}
  75720. -
  75721. -
  75722. -SWIGINTERN PyObject *_wrap_VImage_histnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75723. - PyObject *resultobj = 0;
  75724. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75725. - void *argp1 = 0 ;
  75726. - int res1 = 0 ;
  75727. - PyObject * obj0 = 0 ;
  75728. - vips::VImage result;
  75729. -
  75730. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histnorm",&obj0)) SWIG_fail;
  75731. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75732. - if (!SWIG_IsOK(res1)) {
  75733. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnorm" "', argument " "1"" of type '" "vips::VImage *""'");
  75734. - }
  75735. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75736. - try {
  75737. - result = (arg1)->histnorm();
  75738. - }
  75739. - catch(vips::VError &_e) {
  75740. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75741. - }
  75742. -
  75743. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75744. - return resultobj;
  75745. -fail:
  75746. - return NULL;
  75747. -}
  75748. -
  75749. -
  75750. -SWIGINTERN PyObject *_wrap_VImage_histplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75751. - PyObject *resultobj = 0;
  75752. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75753. - void *argp1 = 0 ;
  75754. - int res1 = 0 ;
  75755. - PyObject * obj0 = 0 ;
  75756. - vips::VImage result;
  75757. -
  75758. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_histplot",&obj0)) SWIG_fail;
  75759. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75760. - if (!SWIG_IsOK(res1)) {
  75761. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histplot" "', argument " "1"" of type '" "vips::VImage *""'");
  75762. - }
  75763. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75764. - try {
  75765. - result = (arg1)->histplot();
  75766. - }
  75767. - catch(vips::VError &_e) {
  75768. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75769. - }
  75770. -
  75771. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75772. - return resultobj;
  75773. -fail:
  75774. - return NULL;
  75775. -}
  75776. -
  75777. -
  75778. -SWIGINTERN PyObject *_wrap_VImage_histspec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75779. - PyObject *resultobj = 0;
  75780. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75781. - vips::VImage arg2 ;
  75782. - void *argp1 = 0 ;
  75783. - int res1 = 0 ;
  75784. - void *argp2 ;
  75785. - int res2 = 0 ;
  75786. - PyObject * obj0 = 0 ;
  75787. - PyObject * obj1 = 0 ;
  75788. - vips::VImage result;
  75789. -
  75790. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histspec",&obj0,&obj1)) SWIG_fail;
  75791. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75792. - if (!SWIG_IsOK(res1)) {
  75793. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histspec" "', argument " "1"" of type '" "vips::VImage *""'");
  75794. - }
  75795. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75796. - {
  75797. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  75798. - if (!SWIG_IsOK(res2)) {
  75799. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'");
  75800. - }
  75801. - if (!argp2) {
  75802. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'");
  75803. - } else {
  75804. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  75805. - arg2 = *temp;
  75806. - if (SWIG_IsNewObj(res2)) delete temp;
  75807. - }
  75808. - }
  75809. - try {
  75810. - result = (arg1)->histspec(arg2);
  75811. - }
  75812. - catch(vips::VError &_e) {
  75813. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75814. - }
  75815. -
  75816. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75817. - return resultobj;
  75818. -fail:
  75819. - return NULL;
  75820. -}
  75821. -
  75822. -
  75823. -SWIGINTERN PyObject *_wrap_VImage_hsp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75824. - PyObject *resultobj = 0;
  75825. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75826. - vips::VImage arg2 ;
  75827. - void *argp1 = 0 ;
  75828. - int res1 = 0 ;
  75829. - void *argp2 ;
  75830. - int res2 = 0 ;
  75831. - PyObject * obj0 = 0 ;
  75832. - PyObject * obj1 = 0 ;
  75833. - vips::VImage result;
  75834. -
  75835. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hsp",&obj0,&obj1)) SWIG_fail;
  75836. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75837. - if (!SWIG_IsOK(res1)) {
  75838. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hsp" "', argument " "1"" of type '" "vips::VImage *""'");
  75839. - }
  75840. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75841. - {
  75842. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  75843. - if (!SWIG_IsOK(res2)) {
  75844. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'");
  75845. - }
  75846. - if (!argp2) {
  75847. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'");
  75848. - } else {
  75849. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  75850. - arg2 = *temp;
  75851. - if (SWIG_IsNewObj(res2)) delete temp;
  75852. - }
  75853. - }
  75854. - try {
  75855. - result = (arg1)->hsp(arg2);
  75856. - }
  75857. - catch(vips::VError &_e) {
  75858. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75859. - }
  75860. -
  75861. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75862. - return resultobj;
  75863. -fail:
  75864. - return NULL;
  75865. -}
  75866. -
  75867. -
  75868. -SWIGINTERN PyObject *_wrap_VImage_identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75869. - PyObject *resultobj = 0;
  75870. - int arg1 ;
  75871. - int val1 ;
  75872. - int ecode1 = 0 ;
  75873. - PyObject * obj0 = 0 ;
  75874. - vips::VImage result;
  75875. -
  75876. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_identity",&obj0)) SWIG_fail;
  75877. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  75878. - if (!SWIG_IsOK(ecode1)) {
  75879. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity" "', argument " "1"" of type '" "int""'");
  75880. - }
  75881. - arg1 = static_cast< int >(val1);
  75882. - try {
  75883. - result = vips::VImage::identity(arg1);
  75884. - }
  75885. - catch(vips::VError &_e) {
  75886. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75887. - }
  75888. -
  75889. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75890. - return resultobj;
  75891. -fail:
  75892. - return NULL;
  75893. -}
  75894. -
  75895. -
  75896. -SWIGINTERN PyObject *_wrap_VImage_identity_ushort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75897. - PyObject *resultobj = 0;
  75898. - int arg1 ;
  75899. - int arg2 ;
  75900. - int val1 ;
  75901. - int ecode1 = 0 ;
  75902. - int val2 ;
  75903. - int ecode2 = 0 ;
  75904. - PyObject * obj0 = 0 ;
  75905. - PyObject * obj1 = 0 ;
  75906. - vips::VImage result;
  75907. -
  75908. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_identity_ushort",&obj0,&obj1)) SWIG_fail;
  75909. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  75910. - if (!SWIG_IsOK(ecode1)) {
  75911. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity_ushort" "', argument " "1"" of type '" "int""'");
  75912. - }
  75913. - arg1 = static_cast< int >(val1);
  75914. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75915. - if (!SWIG_IsOK(ecode2)) {
  75916. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_identity_ushort" "', argument " "2"" of type '" "int""'");
  75917. - }
  75918. - arg2 = static_cast< int >(val2);
  75919. - try {
  75920. - result = vips::VImage::identity_ushort(arg1,arg2);
  75921. - }
  75922. - catch(vips::VError &_e) {
  75923. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75924. - }
  75925. -
  75926. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  75927. - return resultobj;
  75928. -fail:
  75929. - return NULL;
  75930. -}
  75931. -
  75932. -
  75933. -SWIGINTERN PyObject *_wrap_VImage_ismonotonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75934. - PyObject *resultobj = 0;
  75935. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75936. - void *argp1 = 0 ;
  75937. - int res1 = 0 ;
  75938. - PyObject * obj0 = 0 ;
  75939. - int result;
  75940. -
  75941. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_ismonotonic",&obj0)) SWIG_fail;
  75942. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75943. - if (!SWIG_IsOK(res1)) {
  75944. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ismonotonic" "', argument " "1"" of type '" "vips::VImage *""'");
  75945. - }
  75946. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75947. - try {
  75948. - result = (int)(arg1)->ismonotonic();
  75949. - }
  75950. - catch(vips::VError &_e) {
  75951. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75952. - }
  75953. -
  75954. - resultobj = SWIG_From_int(static_cast< int >(result));
  75955. - return resultobj;
  75956. -fail:
  75957. - return NULL;
  75958. -}
  75959. -
  75960. -
  75961. -SWIGINTERN PyObject *_wrap_VImage_lhisteq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  75962. - PyObject *resultobj = 0;
  75963. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  75964. - int arg2 ;
  75965. - int arg3 ;
  75966. - void *argp1 = 0 ;
  75967. - int res1 = 0 ;
  75968. - int val2 ;
  75969. - int ecode2 = 0 ;
  75970. - int val3 ;
  75971. - int ecode3 = 0 ;
  75972. - PyObject * obj0 = 0 ;
  75973. - PyObject * obj1 = 0 ;
  75974. - PyObject * obj2 = 0 ;
  75975. - vips::VImage result;
  75976. -
  75977. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq",&obj0,&obj1,&obj2)) SWIG_fail;
  75978. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  75979. - if (!SWIG_IsOK(res1)) {
  75980. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq" "', argument " "1"" of type '" "vips::VImage *""'");
  75981. - }
  75982. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  75983. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  75984. - if (!SWIG_IsOK(ecode2)) {
  75985. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq" "', argument " "2"" of type '" "int""'");
  75986. - }
  75987. - arg2 = static_cast< int >(val2);
  75988. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  75989. - if (!SWIG_IsOK(ecode3)) {
  75990. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq" "', argument " "3"" of type '" "int""'");
  75991. - }
  75992. - arg3 = static_cast< int >(val3);
  75993. - try {
  75994. - result = (arg1)->lhisteq(arg2,arg3);
  75995. - }
  75996. - catch(vips::VError &_e) {
  75997. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  75998. - }
  75999. -
  76000. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76001. - return resultobj;
  76002. -fail:
  76003. - return NULL;
  76004. -}
  76005. -
  76006. -
  76007. -SWIGINTERN PyObject *_wrap_VImage_mpercent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76008. - PyObject *resultobj = 0;
  76009. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76010. - double arg2 ;
  76011. - void *argp1 = 0 ;
  76012. - int res1 = 0 ;
  76013. - double val2 ;
  76014. - int ecode2 = 0 ;
  76015. - PyObject * obj0 = 0 ;
  76016. - PyObject * obj1 = 0 ;
  76017. - int result;
  76018. -
  76019. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_mpercent",&obj0,&obj1)) SWIG_fail;
  76020. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76021. - if (!SWIG_IsOK(res1)) {
  76022. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mpercent" "', argument " "1"" of type '" "vips::VImage *""'");
  76023. - }
  76024. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76025. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  76026. - if (!SWIG_IsOK(ecode2)) {
  76027. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_mpercent" "', argument " "2"" of type '" "double""'");
  76028. - }
  76029. - arg2 = static_cast< double >(val2);
  76030. - try {
  76031. - result = (int)(arg1)->mpercent(arg2);
  76032. - }
  76033. - catch(vips::VError &_e) {
  76034. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76035. - }
  76036. -
  76037. - resultobj = SWIG_From_int(static_cast< int >(result));
  76038. - return resultobj;
  76039. -fail:
  76040. - return NULL;
  76041. -}
  76042. -
  76043. -
  76044. -SWIGINTERN PyObject *_wrap_VImage_invertlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76045. - PyObject *resultobj = 0;
  76046. - vips::VDMask arg1 ;
  76047. - int arg2 ;
  76048. - void *argp1 ;
  76049. - int res1 = 0 ;
  76050. - int val2 ;
  76051. - int ecode2 = 0 ;
  76052. - PyObject * obj0 = 0 ;
  76053. - PyObject * obj1 = 0 ;
  76054. - vips::VImage result;
  76055. -
  76056. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_invertlut",&obj0,&obj1)) SWIG_fail;
  76057. - {
  76058. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
  76059. - if (!SWIG_IsOK(res1)) {
  76060. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'");
  76061. - }
  76062. - if (!argp1) {
  76063. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'");
  76064. - } else {
  76065. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
  76066. - arg1 = *temp;
  76067. - if (SWIG_IsNewObj(res1)) delete temp;
  76068. - }
  76069. - }
  76070. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76071. - if (!SWIG_IsOK(ecode2)) {
  76072. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_invertlut" "', argument " "2"" of type '" "int""'");
  76073. - }
  76074. - arg2 = static_cast< int >(val2);
  76075. - try {
  76076. - result = vips::VImage::invertlut(arg1,arg2);
  76077. - }
  76078. - catch(vips::VError &_e) {
  76079. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76080. - }
  76081. -
  76082. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76083. - return resultobj;
  76084. -fail:
  76085. - return NULL;
  76086. -}
  76087. -
  76088. -
  76089. -SWIGINTERN PyObject *_wrap_VImage_buildlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76090. - PyObject *resultobj = 0;
  76091. - vips::VDMask arg1 ;
  76092. - void *argp1 ;
  76093. - int res1 = 0 ;
  76094. - PyObject * obj0 = 0 ;
  76095. - vips::VImage result;
  76096. -
  76097. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_buildlut",&obj0)) SWIG_fail;
  76098. - {
  76099. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0);
  76100. - if (!SWIG_IsOK(res1)) {
  76101. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'");
  76102. - }
  76103. - if (!argp1) {
  76104. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'");
  76105. - } else {
  76106. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1);
  76107. - arg1 = *temp;
  76108. - if (SWIG_IsNewObj(res1)) delete temp;
  76109. - }
  76110. - }
  76111. - try {
  76112. - result = vips::VImage::buildlut(arg1);
  76113. - }
  76114. - catch(vips::VError &_e) {
  76115. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76116. - }
  76117. -
  76118. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76119. - return resultobj;
  76120. -fail:
  76121. - return NULL;
  76122. -}
  76123. -
  76124. -
  76125. -SWIGINTERN PyObject *_wrap_VImage_maplut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76126. - PyObject *resultobj = 0;
  76127. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76128. - vips::VImage arg2 ;
  76129. - void *argp1 = 0 ;
  76130. - int res1 = 0 ;
  76131. - void *argp2 ;
  76132. - int res2 = 0 ;
  76133. - PyObject * obj0 = 0 ;
  76134. - PyObject * obj1 = 0 ;
  76135. - vips::VImage result;
  76136. -
  76137. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_maplut",&obj0,&obj1)) SWIG_fail;
  76138. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76139. - if (!SWIG_IsOK(res1)) {
  76140. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maplut" "', argument " "1"" of type '" "vips::VImage *""'");
  76141. - }
  76142. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76143. - {
  76144. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  76145. - if (!SWIG_IsOK(res2)) {
  76146. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'");
  76147. - }
  76148. - if (!argp2) {
  76149. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'");
  76150. - } else {
  76151. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  76152. - arg2 = *temp;
  76153. - if (SWIG_IsNewObj(res2)) delete temp;
  76154. - }
  76155. - }
  76156. - try {
  76157. - result = (arg1)->maplut(arg2);
  76158. - }
  76159. - catch(vips::VError &_e) {
  76160. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76161. - }
  76162. -
  76163. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76164. - return resultobj;
  76165. -fail:
  76166. - return NULL;
  76167. -}
  76168. -
  76169. -
  76170. -SWIGINTERN PyObject *_wrap_VImage_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76171. - PyObject *resultobj = 0;
  76172. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76173. - vips::VImage *arg2 = 0 ;
  76174. - void *argp1 = 0 ;
  76175. - int res1 = 0 ;
  76176. - void *argp2 = 0 ;
  76177. - int res2 = 0 ;
  76178. - PyObject * obj0 = 0 ;
  76179. - PyObject * obj1 = 0 ;
  76180. - vips::VImage result;
  76181. -
  76182. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_project",&obj0,&obj1)) SWIG_fail;
  76183. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76184. - if (!SWIG_IsOK(res1)) {
  76185. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_project" "', argument " "1"" of type '" "vips::VImage *""'");
  76186. - }
  76187. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76188. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 );
  76189. - if (!SWIG_IsOK(res2)) {
  76190. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'");
  76191. - }
  76192. - if (!argp2) {
  76193. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'");
  76194. - }
  76195. - arg2 = reinterpret_cast< vips::VImage * >(argp2);
  76196. - try {
  76197. - result = (arg1)->project(*arg2);
  76198. - }
  76199. - catch(vips::VError &_e) {
  76200. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76201. - }
  76202. -
  76203. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76204. - return resultobj;
  76205. -fail:
  76206. - return NULL;
  76207. -}
  76208. -
  76209. -
  76210. -SWIGINTERN PyObject *_wrap_VImage_stdif(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76211. - PyObject *resultobj = 0;
  76212. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76213. - double arg2 ;
  76214. - double arg3 ;
  76215. - double arg4 ;
  76216. - double arg5 ;
  76217. - int arg6 ;
  76218. - int arg7 ;
  76219. - void *argp1 = 0 ;
  76220. - int res1 = 0 ;
  76221. - double val2 ;
  76222. - int ecode2 = 0 ;
  76223. - double val3 ;
  76224. - int ecode3 = 0 ;
  76225. - double val4 ;
  76226. - int ecode4 = 0 ;
  76227. - double val5 ;
  76228. - int ecode5 = 0 ;
  76229. - int val6 ;
  76230. - int ecode6 = 0 ;
  76231. - int val7 ;
  76232. - int ecode7 = 0 ;
  76233. - PyObject * obj0 = 0 ;
  76234. - PyObject * obj1 = 0 ;
  76235. - PyObject * obj2 = 0 ;
  76236. - PyObject * obj3 = 0 ;
  76237. - PyObject * obj4 = 0 ;
  76238. - PyObject * obj5 = 0 ;
  76239. - PyObject * obj6 = 0 ;
  76240. - vips::VImage result;
  76241. -
  76242. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  76243. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76244. - if (!SWIG_IsOK(res1)) {
  76245. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif" "', argument " "1"" of type '" "vips::VImage *""'");
  76246. - }
  76247. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76248. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  76249. - if (!SWIG_IsOK(ecode2)) {
  76250. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif" "', argument " "2"" of type '" "double""'");
  76251. - }
  76252. - arg2 = static_cast< double >(val2);
  76253. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  76254. - if (!SWIG_IsOK(ecode3)) {
  76255. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif" "', argument " "3"" of type '" "double""'");
  76256. - }
  76257. - arg3 = static_cast< double >(val3);
  76258. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  76259. - if (!SWIG_IsOK(ecode4)) {
  76260. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif" "', argument " "4"" of type '" "double""'");
  76261. - }
  76262. - arg4 = static_cast< double >(val4);
  76263. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  76264. - if (!SWIG_IsOK(ecode5)) {
  76265. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif" "', argument " "5"" of type '" "double""'");
  76266. - }
  76267. - arg5 = static_cast< double >(val5);
  76268. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  76269. - if (!SWIG_IsOK(ecode6)) {
  76270. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif" "', argument " "6"" of type '" "int""'");
  76271. - }
  76272. - arg6 = static_cast< int >(val6);
  76273. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  76274. - if (!SWIG_IsOK(ecode7)) {
  76275. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif" "', argument " "7"" of type '" "int""'");
  76276. - }
  76277. - arg7 = static_cast< int >(val7);
  76278. - try {
  76279. - result = (arg1)->stdif(arg2,arg3,arg4,arg5,arg6,arg7);
  76280. - }
  76281. - catch(vips::VError &_e) {
  76282. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76283. - }
  76284. -
  76285. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76286. - return resultobj;
  76287. -fail:
  76288. - return NULL;
  76289. -}
  76290. -
  76291. -
  76292. -SWIGINTERN PyObject *_wrap_VImage_tone_analyse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76293. - PyObject *resultobj = 0;
  76294. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76295. - double arg2 ;
  76296. - double arg3 ;
  76297. - double arg4 ;
  76298. - double arg5 ;
  76299. - double arg6 ;
  76300. - double arg7 ;
  76301. - void *argp1 = 0 ;
  76302. - int res1 = 0 ;
  76303. - double val2 ;
  76304. - int ecode2 = 0 ;
  76305. - double val3 ;
  76306. - int ecode3 = 0 ;
  76307. - double val4 ;
  76308. - int ecode4 = 0 ;
  76309. - double val5 ;
  76310. - int ecode5 = 0 ;
  76311. - double val6 ;
  76312. - int ecode6 = 0 ;
  76313. - double val7 ;
  76314. - int ecode7 = 0 ;
  76315. - PyObject * obj0 = 0 ;
  76316. - PyObject * obj1 = 0 ;
  76317. - PyObject * obj2 = 0 ;
  76318. - PyObject * obj3 = 0 ;
  76319. - PyObject * obj4 = 0 ;
  76320. - PyObject * obj5 = 0 ;
  76321. - PyObject * obj6 = 0 ;
  76322. - vips::VImage result;
  76323. -
  76324. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_tone_analyse",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  76325. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76326. - if (!SWIG_IsOK(res1)) {
  76327. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_analyse" "', argument " "1"" of type '" "vips::VImage *""'");
  76328. - }
  76329. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76330. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  76331. - if (!SWIG_IsOK(ecode2)) {
  76332. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_analyse" "', argument " "2"" of type '" "double""'");
  76333. - }
  76334. - arg2 = static_cast< double >(val2);
  76335. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  76336. - if (!SWIG_IsOK(ecode3)) {
  76337. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_analyse" "', argument " "3"" of type '" "double""'");
  76338. - }
  76339. - arg3 = static_cast< double >(val3);
  76340. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  76341. - if (!SWIG_IsOK(ecode4)) {
  76342. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_analyse" "', argument " "4"" of type '" "double""'");
  76343. - }
  76344. - arg4 = static_cast< double >(val4);
  76345. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  76346. - if (!SWIG_IsOK(ecode5)) {
  76347. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_analyse" "', argument " "5"" of type '" "double""'");
  76348. - }
  76349. - arg5 = static_cast< double >(val5);
  76350. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  76351. - if (!SWIG_IsOK(ecode6)) {
  76352. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_analyse" "', argument " "6"" of type '" "double""'");
  76353. - }
  76354. - arg6 = static_cast< double >(val6);
  76355. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  76356. - if (!SWIG_IsOK(ecode7)) {
  76357. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_analyse" "', argument " "7"" of type '" "double""'");
  76358. - }
  76359. - arg7 = static_cast< double >(val7);
  76360. - try {
  76361. - result = (arg1)->tone_analyse(arg2,arg3,arg4,arg5,arg6,arg7);
  76362. - }
  76363. - catch(vips::VError &_e) {
  76364. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76365. - }
  76366. -
  76367. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76368. - return resultobj;
  76369. -fail:
  76370. - return NULL;
  76371. -}
  76372. -
  76373. -
  76374. -SWIGINTERN PyObject *_wrap_VImage_tone_build(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76375. - PyObject *resultobj = 0;
  76376. - double arg1 ;
  76377. - double arg2 ;
  76378. - double arg3 ;
  76379. - double arg4 ;
  76380. - double arg5 ;
  76381. - double arg6 ;
  76382. - double arg7 ;
  76383. - double arg8 ;
  76384. - double val1 ;
  76385. - int ecode1 = 0 ;
  76386. - double val2 ;
  76387. - int ecode2 = 0 ;
  76388. - double val3 ;
  76389. - int ecode3 = 0 ;
  76390. - double val4 ;
  76391. - int ecode4 = 0 ;
  76392. - double val5 ;
  76393. - int ecode5 = 0 ;
  76394. - double val6 ;
  76395. - int ecode6 = 0 ;
  76396. - double val7 ;
  76397. - int ecode7 = 0 ;
  76398. - double val8 ;
  76399. - int ecode8 = 0 ;
  76400. - PyObject * obj0 = 0 ;
  76401. - PyObject * obj1 = 0 ;
  76402. - PyObject * obj2 = 0 ;
  76403. - PyObject * obj3 = 0 ;
  76404. - PyObject * obj4 = 0 ;
  76405. - PyObject * obj5 = 0 ;
  76406. - PyObject * obj6 = 0 ;
  76407. - PyObject * obj7 = 0 ;
  76408. - vips::VImage result;
  76409. -
  76410. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_tone_build",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  76411. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  76412. - if (!SWIG_IsOK(ecode1)) {
  76413. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build" "', argument " "1"" of type '" "double""'");
  76414. - }
  76415. - arg1 = static_cast< double >(val1);
  76416. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  76417. - if (!SWIG_IsOK(ecode2)) {
  76418. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build" "', argument " "2"" of type '" "double""'");
  76419. - }
  76420. - arg2 = static_cast< double >(val2);
  76421. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  76422. - if (!SWIG_IsOK(ecode3)) {
  76423. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build" "', argument " "3"" of type '" "double""'");
  76424. - }
  76425. - arg3 = static_cast< double >(val3);
  76426. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  76427. - if (!SWIG_IsOK(ecode4)) {
  76428. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build" "', argument " "4"" of type '" "double""'");
  76429. - }
  76430. - arg4 = static_cast< double >(val4);
  76431. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  76432. - if (!SWIG_IsOK(ecode5)) {
  76433. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build" "', argument " "5"" of type '" "double""'");
  76434. - }
  76435. - arg5 = static_cast< double >(val5);
  76436. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  76437. - if (!SWIG_IsOK(ecode6)) {
  76438. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build" "', argument " "6"" of type '" "double""'");
  76439. - }
  76440. - arg6 = static_cast< double >(val6);
  76441. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  76442. - if (!SWIG_IsOK(ecode7)) {
  76443. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build" "', argument " "7"" of type '" "double""'");
  76444. - }
  76445. - arg7 = static_cast< double >(val7);
  76446. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  76447. - if (!SWIG_IsOK(ecode8)) {
  76448. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build" "', argument " "8"" of type '" "double""'");
  76449. - }
  76450. - arg8 = static_cast< double >(val8);
  76451. - try {
  76452. - result = vips::VImage::tone_build(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  76453. - }
  76454. - catch(vips::VError &_e) {
  76455. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76456. - }
  76457. -
  76458. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76459. - return resultobj;
  76460. -fail:
  76461. - return NULL;
  76462. -}
  76463. -
  76464. -
  76465. -SWIGINTERN PyObject *_wrap_VImage_tone_build_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76466. - PyObject *resultobj = 0;
  76467. - int arg1 ;
  76468. - int arg2 ;
  76469. - double arg3 ;
  76470. - double arg4 ;
  76471. - double arg5 ;
  76472. - double arg6 ;
  76473. - double arg7 ;
  76474. - double arg8 ;
  76475. - double arg9 ;
  76476. - double arg10 ;
  76477. - int val1 ;
  76478. - int ecode1 = 0 ;
  76479. - int val2 ;
  76480. - int ecode2 = 0 ;
  76481. - double val3 ;
  76482. - int ecode3 = 0 ;
  76483. - double val4 ;
  76484. - int ecode4 = 0 ;
  76485. - double val5 ;
  76486. - int ecode5 = 0 ;
  76487. - double val6 ;
  76488. - int ecode6 = 0 ;
  76489. - double val7 ;
  76490. - int ecode7 = 0 ;
  76491. - double val8 ;
  76492. - int ecode8 = 0 ;
  76493. - double val9 ;
  76494. - int ecode9 = 0 ;
  76495. - double val10 ;
  76496. - int ecode10 = 0 ;
  76497. - PyObject * obj0 = 0 ;
  76498. - PyObject * obj1 = 0 ;
  76499. - PyObject * obj2 = 0 ;
  76500. - PyObject * obj3 = 0 ;
  76501. - PyObject * obj4 = 0 ;
  76502. - PyObject * obj5 = 0 ;
  76503. - PyObject * obj6 = 0 ;
  76504. - PyObject * obj7 = 0 ;
  76505. - PyObject * obj8 = 0 ;
  76506. - PyObject * obj9 = 0 ;
  76507. - vips::VImage result;
  76508. -
  76509. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_tone_build_range",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
  76510. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  76511. - if (!SWIG_IsOK(ecode1)) {
  76512. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build_range" "', argument " "1"" of type '" "int""'");
  76513. - }
  76514. - arg1 = static_cast< int >(val1);
  76515. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76516. - if (!SWIG_IsOK(ecode2)) {
  76517. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build_range" "', argument " "2"" of type '" "int""'");
  76518. - }
  76519. - arg2 = static_cast< int >(val2);
  76520. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  76521. - if (!SWIG_IsOK(ecode3)) {
  76522. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build_range" "', argument " "3"" of type '" "double""'");
  76523. - }
  76524. - arg3 = static_cast< double >(val3);
  76525. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  76526. - if (!SWIG_IsOK(ecode4)) {
  76527. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build_range" "', argument " "4"" of type '" "double""'");
  76528. - }
  76529. - arg4 = static_cast< double >(val4);
  76530. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  76531. - if (!SWIG_IsOK(ecode5)) {
  76532. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build_range" "', argument " "5"" of type '" "double""'");
  76533. - }
  76534. - arg5 = static_cast< double >(val5);
  76535. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  76536. - if (!SWIG_IsOK(ecode6)) {
  76537. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build_range" "', argument " "6"" of type '" "double""'");
  76538. - }
  76539. - arg6 = static_cast< double >(val6);
  76540. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  76541. - if (!SWIG_IsOK(ecode7)) {
  76542. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build_range" "', argument " "7"" of type '" "double""'");
  76543. - }
  76544. - arg7 = static_cast< double >(val7);
  76545. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  76546. - if (!SWIG_IsOK(ecode8)) {
  76547. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build_range" "', argument " "8"" of type '" "double""'");
  76548. - }
  76549. - arg8 = static_cast< double >(val8);
  76550. - ecode9 = SWIG_AsVal_double(obj8, &val9);
  76551. - if (!SWIG_IsOK(ecode9)) {
  76552. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tone_build_range" "', argument " "9"" of type '" "double""'");
  76553. - }
  76554. - arg9 = static_cast< double >(val9);
  76555. - ecode10 = SWIG_AsVal_double(obj9, &val10);
  76556. - if (!SWIG_IsOK(ecode10)) {
  76557. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tone_build_range" "', argument " "10"" of type '" "double""'");
  76558. - }
  76559. - arg10 = static_cast< double >(val10);
  76560. - try {
  76561. - result = vips::VImage::tone_build_range(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
  76562. - }
  76563. - catch(vips::VError &_e) {
  76564. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76565. - }
  76566. -
  76567. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76568. - return resultobj;
  76569. -fail:
  76570. - return NULL;
  76571. -}
  76572. -
  76573. -
  76574. -SWIGINTERN PyObject *_wrap_VImage_tone_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76575. - PyObject *resultobj = 0;
  76576. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76577. - vips::VImage arg2 ;
  76578. - void *argp1 = 0 ;
  76579. - int res1 = 0 ;
  76580. - void *argp2 ;
  76581. - int res2 = 0 ;
  76582. - PyObject * obj0 = 0 ;
  76583. - PyObject * obj1 = 0 ;
  76584. - vips::VImage result;
  76585. -
  76586. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tone_map",&obj0,&obj1)) SWIG_fail;
  76587. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76588. - if (!SWIG_IsOK(res1)) {
  76589. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_map" "', argument " "1"" of type '" "vips::VImage *""'");
  76590. - }
  76591. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76592. - {
  76593. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  76594. - if (!SWIG_IsOK(res2)) {
  76595. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'");
  76596. - }
  76597. - if (!argp2) {
  76598. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'");
  76599. - } else {
  76600. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  76601. - arg2 = *temp;
  76602. - if (SWIG_IsNewObj(res2)) delete temp;
  76603. - }
  76604. - }
  76605. - try {
  76606. - result = (arg1)->tone_map(arg2);
  76607. - }
  76608. - catch(vips::VError &_e) {
  76609. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76610. - }
  76611. -
  76612. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  76613. - return resultobj;
  76614. -fail:
  76615. - return NULL;
  76616. -}
  76617. -
  76618. -
  76619. -SWIGINTERN PyObject *_wrap_VImage_draw_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76620. - PyObject *resultobj = 0;
  76621. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76622. - int arg2 ;
  76623. - int arg3 ;
  76624. - int arg4 ;
  76625. - int arg5 ;
  76626. - std::vector< double,std::allocator< double > > arg6 ;
  76627. - void *argp1 = 0 ;
  76628. - int res1 = 0 ;
  76629. - int val2 ;
  76630. - int ecode2 = 0 ;
  76631. - int val3 ;
  76632. - int ecode3 = 0 ;
  76633. - int val4 ;
  76634. - int ecode4 = 0 ;
  76635. - int val5 ;
  76636. - int ecode5 = 0 ;
  76637. - PyObject * obj0 = 0 ;
  76638. - PyObject * obj1 = 0 ;
  76639. - PyObject * obj2 = 0 ;
  76640. - PyObject * obj3 = 0 ;
  76641. - PyObject * obj4 = 0 ;
  76642. - PyObject * obj5 = 0 ;
  76643. -
  76644. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_circle",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  76645. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76646. - if (!SWIG_IsOK(res1)) {
  76647. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_circle" "', argument " "1"" of type '" "vips::VImage *""'");
  76648. - }
  76649. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76650. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76651. - if (!SWIG_IsOK(ecode2)) {
  76652. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_circle" "', argument " "2"" of type '" "int""'");
  76653. - }
  76654. - arg2 = static_cast< int >(val2);
  76655. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76656. - if (!SWIG_IsOK(ecode3)) {
  76657. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_circle" "', argument " "3"" of type '" "int""'");
  76658. - }
  76659. - arg3 = static_cast< int >(val3);
  76660. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  76661. - if (!SWIG_IsOK(ecode4)) {
  76662. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_circle" "', argument " "4"" of type '" "int""'");
  76663. - }
  76664. - arg4 = static_cast< int >(val4);
  76665. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  76666. - if (!SWIG_IsOK(ecode5)) {
  76667. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_circle" "', argument " "5"" of type '" "int""'");
  76668. - }
  76669. - arg5 = static_cast< int >(val5);
  76670. - {
  76671. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  76672. - int res = swig::asptr(obj5, &ptr);
  76673. - if (!SWIG_IsOK(res) || !ptr) {
  76674. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_circle" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'");
  76675. - }
  76676. - arg6 = *ptr;
  76677. - if (SWIG_IsNewObj(res)) delete ptr;
  76678. - }
  76679. - try {
  76680. - (arg1)->draw_circle(arg2,arg3,arg4,arg5,arg6);
  76681. - }
  76682. - catch(vips::VError &_e) {
  76683. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76684. - }
  76685. -
  76686. - resultobj = SWIG_Py_Void();
  76687. - return resultobj;
  76688. -fail:
  76689. - return NULL;
  76690. -}
  76691. -
  76692. -
  76693. -SWIGINTERN PyObject *_wrap_VImage_draw_rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76694. - PyObject *resultobj = 0;
  76695. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76696. - int arg2 ;
  76697. - int arg3 ;
  76698. - int arg4 ;
  76699. - int arg5 ;
  76700. - int arg6 ;
  76701. - std::vector< double,std::allocator< double > > arg7 ;
  76702. - void *argp1 = 0 ;
  76703. - int res1 = 0 ;
  76704. - int val2 ;
  76705. - int ecode2 = 0 ;
  76706. - int val3 ;
  76707. - int ecode3 = 0 ;
  76708. - int val4 ;
  76709. - int ecode4 = 0 ;
  76710. - int val5 ;
  76711. - int ecode5 = 0 ;
  76712. - int val6 ;
  76713. - int ecode6 = 0 ;
  76714. - PyObject * obj0 = 0 ;
  76715. - PyObject * obj1 = 0 ;
  76716. - PyObject * obj2 = 0 ;
  76717. - PyObject * obj3 = 0 ;
  76718. - PyObject * obj4 = 0 ;
  76719. - PyObject * obj5 = 0 ;
  76720. - PyObject * obj6 = 0 ;
  76721. -
  76722. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_draw_rect",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  76723. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76724. - if (!SWIG_IsOK(res1)) {
  76725. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_rect" "', argument " "1"" of type '" "vips::VImage *""'");
  76726. - }
  76727. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76728. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76729. - if (!SWIG_IsOK(ecode2)) {
  76730. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_rect" "', argument " "2"" of type '" "int""'");
  76731. - }
  76732. - arg2 = static_cast< int >(val2);
  76733. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76734. - if (!SWIG_IsOK(ecode3)) {
  76735. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_rect" "', argument " "3"" of type '" "int""'");
  76736. - }
  76737. - arg3 = static_cast< int >(val3);
  76738. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  76739. - if (!SWIG_IsOK(ecode4)) {
  76740. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_rect" "', argument " "4"" of type '" "int""'");
  76741. - }
  76742. - arg4 = static_cast< int >(val4);
  76743. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  76744. - if (!SWIG_IsOK(ecode5)) {
  76745. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_rect" "', argument " "5"" of type '" "int""'");
  76746. - }
  76747. - arg5 = static_cast< int >(val5);
  76748. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  76749. - if (!SWIG_IsOK(ecode6)) {
  76750. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_draw_rect" "', argument " "6"" of type '" "int""'");
  76751. - }
  76752. - arg6 = static_cast< int >(val6);
  76753. - {
  76754. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  76755. - int res = swig::asptr(obj6, &ptr);
  76756. - if (!SWIG_IsOK(res) || !ptr) {
  76757. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_rect" "', argument " "7"" of type '" "std::vector< double,std::allocator< double > >""'");
  76758. - }
  76759. - arg7 = *ptr;
  76760. - if (SWIG_IsNewObj(res)) delete ptr;
  76761. - }
  76762. - try {
  76763. - (arg1)->draw_rect(arg2,arg3,arg4,arg5,arg6,arg7);
  76764. - }
  76765. - catch(vips::VError &_e) {
  76766. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76767. - }
  76768. -
  76769. - resultobj = SWIG_Py_Void();
  76770. - return resultobj;
  76771. -fail:
  76772. - return NULL;
  76773. -}
  76774. -
  76775. -
  76776. -SWIGINTERN PyObject *_wrap_VImage_draw_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76777. - PyObject *resultobj = 0;
  76778. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76779. - int arg2 ;
  76780. - int arg3 ;
  76781. - int arg4 ;
  76782. - int arg5 ;
  76783. - std::vector< double,std::allocator< double > > arg6 ;
  76784. - void *argp1 = 0 ;
  76785. - int res1 = 0 ;
  76786. - int val2 ;
  76787. - int ecode2 = 0 ;
  76788. - int val3 ;
  76789. - int ecode3 = 0 ;
  76790. - int val4 ;
  76791. - int ecode4 = 0 ;
  76792. - int val5 ;
  76793. - int ecode5 = 0 ;
  76794. - PyObject * obj0 = 0 ;
  76795. - PyObject * obj1 = 0 ;
  76796. - PyObject * obj2 = 0 ;
  76797. - PyObject * obj3 = 0 ;
  76798. - PyObject * obj4 = 0 ;
  76799. - PyObject * obj5 = 0 ;
  76800. -
  76801. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  76802. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76803. - if (!SWIG_IsOK(res1)) {
  76804. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_line" "', argument " "1"" of type '" "vips::VImage *""'");
  76805. - }
  76806. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76807. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76808. - if (!SWIG_IsOK(ecode2)) {
  76809. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_line" "', argument " "2"" of type '" "int""'");
  76810. - }
  76811. - arg2 = static_cast< int >(val2);
  76812. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76813. - if (!SWIG_IsOK(ecode3)) {
  76814. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_line" "', argument " "3"" of type '" "int""'");
  76815. - }
  76816. - arg3 = static_cast< int >(val3);
  76817. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  76818. - if (!SWIG_IsOK(ecode4)) {
  76819. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_line" "', argument " "4"" of type '" "int""'");
  76820. - }
  76821. - arg4 = static_cast< int >(val4);
  76822. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  76823. - if (!SWIG_IsOK(ecode5)) {
  76824. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_line" "', argument " "5"" of type '" "int""'");
  76825. - }
  76826. - arg5 = static_cast< int >(val5);
  76827. - {
  76828. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  76829. - int res = swig::asptr(obj5, &ptr);
  76830. - if (!SWIG_IsOK(res) || !ptr) {
  76831. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_line" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'");
  76832. - }
  76833. - arg6 = *ptr;
  76834. - if (SWIG_IsNewObj(res)) delete ptr;
  76835. - }
  76836. - try {
  76837. - (arg1)->draw_line(arg2,arg3,arg4,arg5,arg6);
  76838. - }
  76839. - catch(vips::VError &_e) {
  76840. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76841. - }
  76842. -
  76843. - resultobj = SWIG_Py_Void();
  76844. - return resultobj;
  76845. -fail:
  76846. - return NULL;
  76847. -}
  76848. -
  76849. -
  76850. -SWIGINTERN PyObject *_wrap_VImage_draw_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76851. - PyObject *resultobj = 0;
  76852. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76853. - int arg2 ;
  76854. - int arg3 ;
  76855. - std::vector< double,std::allocator< double > > arg4 ;
  76856. - void *argp1 = 0 ;
  76857. - int res1 = 0 ;
  76858. - int val2 ;
  76859. - int ecode2 = 0 ;
  76860. - int val3 ;
  76861. - int ecode3 = 0 ;
  76862. - PyObject * obj0 = 0 ;
  76863. - PyObject * obj1 = 0 ;
  76864. - PyObject * obj2 = 0 ;
  76865. - PyObject * obj3 = 0 ;
  76866. -
  76867. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_point",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  76868. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76869. - if (!SWIG_IsOK(res1)) {
  76870. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_point" "', argument " "1"" of type '" "vips::VImage *""'");
  76871. - }
  76872. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76873. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76874. - if (!SWIG_IsOK(ecode2)) {
  76875. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_point" "', argument " "2"" of type '" "int""'");
  76876. - }
  76877. - arg2 = static_cast< int >(val2);
  76878. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76879. - if (!SWIG_IsOK(ecode3)) {
  76880. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_point" "', argument " "3"" of type '" "int""'");
  76881. - }
  76882. - arg3 = static_cast< int >(val3);
  76883. - {
  76884. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  76885. - int res = swig::asptr(obj3, &ptr);
  76886. - if (!SWIG_IsOK(res) || !ptr) {
  76887. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_point" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
  76888. - }
  76889. - arg4 = *ptr;
  76890. - if (SWIG_IsNewObj(res)) delete ptr;
  76891. - }
  76892. - try {
  76893. - (arg1)->draw_point(arg2,arg3,arg4);
  76894. - }
  76895. - catch(vips::VError &_e) {
  76896. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76897. - }
  76898. -
  76899. - resultobj = SWIG_Py_Void();
  76900. - return resultobj;
  76901. -fail:
  76902. - return NULL;
  76903. -}
  76904. -
  76905. -
  76906. -SWIGINTERN PyObject *_wrap_VImage_draw_smudge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76907. - PyObject *resultobj = 0;
  76908. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76909. - int arg2 ;
  76910. - int arg3 ;
  76911. - int arg4 ;
  76912. - int arg5 ;
  76913. - void *argp1 = 0 ;
  76914. - int res1 = 0 ;
  76915. - int val2 ;
  76916. - int ecode2 = 0 ;
  76917. - int val3 ;
  76918. - int ecode3 = 0 ;
  76919. - int val4 ;
  76920. - int ecode4 = 0 ;
  76921. - int val5 ;
  76922. - int ecode5 = 0 ;
  76923. - PyObject * obj0 = 0 ;
  76924. - PyObject * obj1 = 0 ;
  76925. - PyObject * obj2 = 0 ;
  76926. - PyObject * obj3 = 0 ;
  76927. - PyObject * obj4 = 0 ;
  76928. -
  76929. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_smudge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  76930. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76931. - if (!SWIG_IsOK(res1)) {
  76932. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_smudge" "', argument " "1"" of type '" "vips::VImage *""'");
  76933. - }
  76934. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76935. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76936. - if (!SWIG_IsOK(ecode2)) {
  76937. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_smudge" "', argument " "2"" of type '" "int""'");
  76938. - }
  76939. - arg2 = static_cast< int >(val2);
  76940. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76941. - if (!SWIG_IsOK(ecode3)) {
  76942. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_smudge" "', argument " "3"" of type '" "int""'");
  76943. - }
  76944. - arg3 = static_cast< int >(val3);
  76945. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  76946. - if (!SWIG_IsOK(ecode4)) {
  76947. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_smudge" "', argument " "4"" of type '" "int""'");
  76948. - }
  76949. - arg4 = static_cast< int >(val4);
  76950. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  76951. - if (!SWIG_IsOK(ecode5)) {
  76952. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_smudge" "', argument " "5"" of type '" "int""'");
  76953. - }
  76954. - arg5 = static_cast< int >(val5);
  76955. - try {
  76956. - (arg1)->draw_smudge(arg2,arg3,arg4,arg5);
  76957. - }
  76958. - catch(vips::VError &_e) {
  76959. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  76960. - }
  76961. -
  76962. - resultobj = SWIG_Py_Void();
  76963. - return resultobj;
  76964. -fail:
  76965. - return NULL;
  76966. -}
  76967. -
  76968. -
  76969. -SWIGINTERN PyObject *_wrap_VImage_draw_flood(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  76970. - PyObject *resultobj = 0;
  76971. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  76972. - int arg2 ;
  76973. - int arg3 ;
  76974. - std::vector< double,std::allocator< double > > arg4 ;
  76975. - void *argp1 = 0 ;
  76976. - int res1 = 0 ;
  76977. - int val2 ;
  76978. - int ecode2 = 0 ;
  76979. - int val3 ;
  76980. - int ecode3 = 0 ;
  76981. - PyObject * obj0 = 0 ;
  76982. - PyObject * obj1 = 0 ;
  76983. - PyObject * obj2 = 0 ;
  76984. - PyObject * obj3 = 0 ;
  76985. -
  76986. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  76987. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  76988. - if (!SWIG_IsOK(res1)) {
  76989. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood" "', argument " "1"" of type '" "vips::VImage *""'");
  76990. - }
  76991. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  76992. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  76993. - if (!SWIG_IsOK(ecode2)) {
  76994. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood" "', argument " "2"" of type '" "int""'");
  76995. - }
  76996. - arg2 = static_cast< int >(val2);
  76997. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  76998. - if (!SWIG_IsOK(ecode3)) {
  76999. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood" "', argument " "3"" of type '" "int""'");
  77000. - }
  77001. - arg3 = static_cast< int >(val3);
  77002. - {
  77003. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  77004. - int res = swig::asptr(obj3, &ptr);
  77005. - if (!SWIG_IsOK(res) || !ptr) {
  77006. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
  77007. - }
  77008. - arg4 = *ptr;
  77009. - if (SWIG_IsNewObj(res)) delete ptr;
  77010. - }
  77011. - try {
  77012. - (arg1)->draw_flood(arg2,arg3,arg4);
  77013. - }
  77014. - catch(vips::VError &_e) {
  77015. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77016. - }
  77017. -
  77018. - resultobj = SWIG_Py_Void();
  77019. - return resultobj;
  77020. -fail:
  77021. - return NULL;
  77022. -}
  77023. -
  77024. -
  77025. -SWIGINTERN PyObject *_wrap_VImage_draw_flood_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77026. - PyObject *resultobj = 0;
  77027. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77028. - int arg2 ;
  77029. - int arg3 ;
  77030. - std::vector< double,std::allocator< double > > arg4 ;
  77031. - void *argp1 = 0 ;
  77032. - int res1 = 0 ;
  77033. - int val2 ;
  77034. - int ecode2 = 0 ;
  77035. - int val3 ;
  77036. - int ecode3 = 0 ;
  77037. - PyObject * obj0 = 0 ;
  77038. - PyObject * obj1 = 0 ;
  77039. - PyObject * obj2 = 0 ;
  77040. - PyObject * obj3 = 0 ;
  77041. -
  77042. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood_blob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  77043. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77044. - if (!SWIG_IsOK(res1)) {
  77045. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_blob" "', argument " "1"" of type '" "vips::VImage *""'");
  77046. - }
  77047. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77048. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  77049. - if (!SWIG_IsOK(ecode2)) {
  77050. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood_blob" "', argument " "2"" of type '" "int""'");
  77051. - }
  77052. - arg2 = static_cast< int >(val2);
  77053. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77054. - if (!SWIG_IsOK(ecode3)) {
  77055. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_blob" "', argument " "3"" of type '" "int""'");
  77056. - }
  77057. - arg3 = static_cast< int >(val3);
  77058. - {
  77059. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  77060. - int res = swig::asptr(obj3, &ptr);
  77061. - if (!SWIG_IsOK(res) || !ptr) {
  77062. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood_blob" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'");
  77063. - }
  77064. - arg4 = *ptr;
  77065. - if (SWIG_IsNewObj(res)) delete ptr;
  77066. - }
  77067. - try {
  77068. - (arg1)->draw_flood_blob(arg2,arg3,arg4);
  77069. - }
  77070. - catch(vips::VError &_e) {
  77071. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77072. - }
  77073. -
  77074. - resultobj = SWIG_Py_Void();
  77075. - return resultobj;
  77076. -fail:
  77077. - return NULL;
  77078. -}
  77079. -
  77080. -
  77081. -SWIGINTERN PyObject *_wrap_VImage_draw_flood_other(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77082. - PyObject *resultobj = 0;
  77083. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77084. - vips::VImage arg2 ;
  77085. - int arg3 ;
  77086. - int arg4 ;
  77087. - int arg5 ;
  77088. - void *argp1 = 0 ;
  77089. - int res1 = 0 ;
  77090. - void *argp2 ;
  77091. - int res2 = 0 ;
  77092. - int val3 ;
  77093. - int ecode3 = 0 ;
  77094. - int val4 ;
  77095. - int ecode4 = 0 ;
  77096. - int val5 ;
  77097. - int ecode5 = 0 ;
  77098. - PyObject * obj0 = 0 ;
  77099. - PyObject * obj1 = 0 ;
  77100. - PyObject * obj2 = 0 ;
  77101. - PyObject * obj3 = 0 ;
  77102. - PyObject * obj4 = 0 ;
  77103. -
  77104. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_flood_other",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  77105. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77106. - if (!SWIG_IsOK(res1)) {
  77107. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_other" "', argument " "1"" of type '" "vips::VImage *""'");
  77108. - }
  77109. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77110. - {
  77111. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  77112. - if (!SWIG_IsOK(res2)) {
  77113. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'");
  77114. - }
  77115. - if (!argp2) {
  77116. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'");
  77117. - } else {
  77118. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  77119. - arg2 = *temp;
  77120. - if (SWIG_IsNewObj(res2)) delete temp;
  77121. - }
  77122. - }
  77123. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77124. - if (!SWIG_IsOK(ecode3)) {
  77125. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_other" "', argument " "3"" of type '" "int""'");
  77126. - }
  77127. - arg3 = static_cast< int >(val3);
  77128. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77129. - if (!SWIG_IsOK(ecode4)) {
  77130. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_flood_other" "', argument " "4"" of type '" "int""'");
  77131. - }
  77132. - arg4 = static_cast< int >(val4);
  77133. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  77134. - if (!SWIG_IsOK(ecode5)) {
  77135. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_flood_other" "', argument " "5"" of type '" "int""'");
  77136. - }
  77137. - arg5 = static_cast< int >(val5);
  77138. - try {
  77139. - (arg1)->draw_flood_other(arg2,arg3,arg4,arg5);
  77140. - }
  77141. - catch(vips::VError &_e) {
  77142. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77143. - }
  77144. -
  77145. - resultobj = SWIG_Py_Void();
  77146. - return resultobj;
  77147. -fail:
  77148. - return NULL;
  77149. -}
  77150. -
  77151. -
  77152. -SWIGINTERN PyObject *_wrap_VImage_draw_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77153. - PyObject *resultobj = 0;
  77154. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77155. - vips::VImage arg2 ;
  77156. - int arg3 ;
  77157. - int arg4 ;
  77158. - void *argp1 = 0 ;
  77159. - int res1 = 0 ;
  77160. - void *argp2 ;
  77161. - int res2 = 0 ;
  77162. - int val3 ;
  77163. - int ecode3 = 0 ;
  77164. - int val4 ;
  77165. - int ecode4 = 0 ;
  77166. - PyObject * obj0 = 0 ;
  77167. - PyObject * obj1 = 0 ;
  77168. - PyObject * obj2 = 0 ;
  77169. - PyObject * obj3 = 0 ;
  77170. -
  77171. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_image",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  77172. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77173. - if (!SWIG_IsOK(res1)) {
  77174. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_image" "', argument " "1"" of type '" "vips::VImage *""'");
  77175. - }
  77176. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77177. - {
  77178. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  77179. - if (!SWIG_IsOK(res2)) {
  77180. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'");
  77181. - }
  77182. - if (!argp2) {
  77183. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'");
  77184. - } else {
  77185. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  77186. - arg2 = *temp;
  77187. - if (SWIG_IsNewObj(res2)) delete temp;
  77188. - }
  77189. - }
  77190. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77191. - if (!SWIG_IsOK(ecode3)) {
  77192. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_image" "', argument " "3"" of type '" "int""'");
  77193. - }
  77194. - arg3 = static_cast< int >(val3);
  77195. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77196. - if (!SWIG_IsOK(ecode4)) {
  77197. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_image" "', argument " "4"" of type '" "int""'");
  77198. - }
  77199. - arg4 = static_cast< int >(val4);
  77200. - try {
  77201. - (arg1)->draw_image(arg2,arg3,arg4);
  77202. - }
  77203. - catch(vips::VError &_e) {
  77204. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77205. - }
  77206. -
  77207. - resultobj = SWIG_Py_Void();
  77208. - return resultobj;
  77209. -fail:
  77210. - return NULL;
  77211. -}
  77212. -
  77213. -
  77214. -SWIGINTERN PyObject *_wrap_VImage_draw_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77215. - PyObject *resultobj = 0;
  77216. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77217. - vips::VImage arg2 ;
  77218. - int arg3 ;
  77219. - int arg4 ;
  77220. - std::vector< double,std::allocator< double > > arg5 ;
  77221. - void *argp1 = 0 ;
  77222. - int res1 = 0 ;
  77223. - void *argp2 ;
  77224. - int res2 = 0 ;
  77225. - int val3 ;
  77226. - int ecode3 = 0 ;
  77227. - int val4 ;
  77228. - int ecode4 = 0 ;
  77229. - PyObject * obj0 = 0 ;
  77230. - PyObject * obj1 = 0 ;
  77231. - PyObject * obj2 = 0 ;
  77232. - PyObject * obj3 = 0 ;
  77233. - PyObject * obj4 = 0 ;
  77234. -
  77235. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_mask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  77236. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77237. - if (!SWIG_IsOK(res1)) {
  77238. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_mask" "', argument " "1"" of type '" "vips::VImage *""'");
  77239. - }
  77240. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77241. - {
  77242. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  77243. - if (!SWIG_IsOK(res2)) {
  77244. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'");
  77245. - }
  77246. - if (!argp2) {
  77247. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'");
  77248. - } else {
  77249. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  77250. - arg2 = *temp;
  77251. - if (SWIG_IsNewObj(res2)) delete temp;
  77252. - }
  77253. - }
  77254. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77255. - if (!SWIG_IsOK(ecode3)) {
  77256. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_mask" "', argument " "3"" of type '" "int""'");
  77257. - }
  77258. - arg3 = static_cast< int >(val3);
  77259. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77260. - if (!SWIG_IsOK(ecode4)) {
  77261. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_mask" "', argument " "4"" of type '" "int""'");
  77262. - }
  77263. - arg4 = static_cast< int >(val4);
  77264. - {
  77265. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  77266. - int res = swig::asptr(obj4, &ptr);
  77267. - if (!SWIG_IsOK(res) || !ptr) {
  77268. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_mask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'");
  77269. - }
  77270. - arg5 = *ptr;
  77271. - if (SWIG_IsNewObj(res)) delete ptr;
  77272. - }
  77273. - try {
  77274. - (arg1)->draw_mask(arg2,arg3,arg4,arg5);
  77275. - }
  77276. - catch(vips::VError &_e) {
  77277. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77278. - }
  77279. -
  77280. - resultobj = SWIG_Py_Void();
  77281. - return resultobj;
  77282. -fail:
  77283. - return NULL;
  77284. -}
  77285. -
  77286. -
  77287. -SWIGINTERN PyObject *_wrap_VImage_line__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77288. - PyObject *resultobj = 0;
  77289. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77290. - vips::VImage arg2 ;
  77291. - vips::VImage arg3 ;
  77292. - std::vector< int,std::allocator< int > > arg4 ;
  77293. - std::vector< int,std::allocator< int > > arg5 ;
  77294. - std::vector< int,std::allocator< int > > arg6 ;
  77295. - std::vector< int,std::allocator< int > > arg7 ;
  77296. - void *argp1 = 0 ;
  77297. - int res1 = 0 ;
  77298. - void *argp2 ;
  77299. - int res2 = 0 ;
  77300. - void *argp3 ;
  77301. - int res3 = 0 ;
  77302. - PyObject * obj0 = 0 ;
  77303. - PyObject * obj1 = 0 ;
  77304. - PyObject * obj2 = 0 ;
  77305. - PyObject * obj3 = 0 ;
  77306. - PyObject * obj4 = 0 ;
  77307. - PyObject * obj5 = 0 ;
  77308. - PyObject * obj6 = 0 ;
  77309. - vips::VImage result;
  77310. -
  77311. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  77312. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77313. - if (!SWIG_IsOK(res1)) {
  77314. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'");
  77315. - }
  77316. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77317. - {
  77318. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  77319. - if (!SWIG_IsOK(res2)) {
  77320. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'");
  77321. - }
  77322. - if (!argp2) {
  77323. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'");
  77324. - } else {
  77325. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  77326. - arg2 = *temp;
  77327. - if (SWIG_IsNewObj(res2)) delete temp;
  77328. - }
  77329. - }
  77330. - {
  77331. - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0);
  77332. - if (!SWIG_IsOK(res3)) {
  77333. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'");
  77334. - }
  77335. - if (!argp3) {
  77336. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'");
  77337. - } else {
  77338. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3);
  77339. - arg3 = *temp;
  77340. - if (SWIG_IsNewObj(res3)) delete temp;
  77341. - }
  77342. - }
  77343. - {
  77344. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  77345. - int res = swig::asptr(obj3, &ptr);
  77346. - if (!SWIG_IsOK(res) || !ptr) {
  77347. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'");
  77348. - }
  77349. - arg4 = *ptr;
  77350. - if (SWIG_IsNewObj(res)) delete ptr;
  77351. - }
  77352. - {
  77353. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  77354. - int res = swig::asptr(obj4, &ptr);
  77355. - if (!SWIG_IsOK(res) || !ptr) {
  77356. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'");
  77357. - }
  77358. - arg5 = *ptr;
  77359. - if (SWIG_IsNewObj(res)) delete ptr;
  77360. - }
  77361. - {
  77362. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  77363. - int res = swig::asptr(obj5, &ptr);
  77364. - if (!SWIG_IsOK(res) || !ptr) {
  77365. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "6"" of type '" "std::vector< int,std::allocator< int > >""'");
  77366. - }
  77367. - arg6 = *ptr;
  77368. - if (SWIG_IsNewObj(res)) delete ptr;
  77369. - }
  77370. - {
  77371. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  77372. - int res = swig::asptr(obj6, &ptr);
  77373. - if (!SWIG_IsOK(res) || !ptr) {
  77374. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "7"" of type '" "std::vector< int,std::allocator< int > >""'");
  77375. - }
  77376. - arg7 = *ptr;
  77377. - if (SWIG_IsNewObj(res)) delete ptr;
  77378. - }
  77379. - try {
  77380. - result = (arg1)->line(arg2,arg3,arg4,arg5,arg6,arg7);
  77381. - }
  77382. - catch(vips::VError &_e) {
  77383. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77384. - }
  77385. -
  77386. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  77387. - return resultobj;
  77388. -fail:
  77389. - return NULL;
  77390. -}
  77391. -
  77392. -
  77393. -SWIGINTERN PyObject *_wrap_VImage_line(PyObject *self, PyObject *args) {
  77394. - int argc;
  77395. - PyObject *argv[8];
  77396. - int ii;
  77397. -
  77398. - if (!PyTuple_Check(args)) SWIG_fail;
  77399. - argc = args ? (int)PyObject_Length(args) : 0;
  77400. - for (ii = 0; (ii < 7) && (ii < argc); ii++) {
  77401. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  77402. - }
  77403. - if (argc == 6) {
  77404. - int _v;
  77405. - void *vptr = 0;
  77406. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  77407. - _v = SWIG_CheckState(res);
  77408. - if (_v) {
  77409. - {
  77410. - int res = SWIG_AsVal_int(argv[1], NULL);
  77411. - _v = SWIG_CheckState(res);
  77412. - }
  77413. - if (_v) {
  77414. - {
  77415. - int res = SWIG_AsVal_int(argv[2], NULL);
  77416. - _v = SWIG_CheckState(res);
  77417. - }
  77418. - if (_v) {
  77419. - {
  77420. - int res = SWIG_AsVal_int(argv[3], NULL);
  77421. - _v = SWIG_CheckState(res);
  77422. - }
  77423. - if (_v) {
  77424. - {
  77425. - int res = SWIG_AsVal_int(argv[4], NULL);
  77426. - _v = SWIG_CheckState(res);
  77427. - }
  77428. - if (_v) {
  77429. - {
  77430. - int res = SWIG_AsVal_int(argv[5], NULL);
  77431. - _v = SWIG_CheckState(res);
  77432. - }
  77433. - if (_v) {
  77434. - return _wrap_VImage_line__SWIG_0(self, args);
  77435. - }
  77436. - }
  77437. - }
  77438. - }
  77439. - }
  77440. - }
  77441. - }
  77442. - if (argc == 7) {
  77443. - int _v;
  77444. - void *vptr = 0;
  77445. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0);
  77446. - _v = SWIG_CheckState(res);
  77447. - if (_v) {
  77448. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0);
  77449. - _v = SWIG_CheckState(res);
  77450. - if (_v) {
  77451. - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0);
  77452. - _v = SWIG_CheckState(res);
  77453. - if (_v) {
  77454. - int res = swig::asptr(argv[3], (std::vector<int,std::allocator< int > >**)(0));
  77455. - _v = SWIG_CheckState(res);
  77456. - if (_v) {
  77457. - int res = swig::asptr(argv[4], (std::vector<int,std::allocator< int > >**)(0));
  77458. - _v = SWIG_CheckState(res);
  77459. - if (_v) {
  77460. - int res = swig::asptr(argv[5], (std::vector<int,std::allocator< int > >**)(0));
  77461. - _v = SWIG_CheckState(res);
  77462. - if (_v) {
  77463. - int res = swig::asptr(argv[6], (std::vector<int,std::allocator< int > >**)(0));
  77464. - _v = SWIG_CheckState(res);
  77465. - if (_v) {
  77466. - return _wrap_VImage_line__SWIG_1(self, args);
  77467. - }
  77468. - }
  77469. - }
  77470. - }
  77471. - }
  77472. - }
  77473. - }
  77474. - }
  77475. -
  77476. -fail:
  77477. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_line'.\n"
  77478. - " Possible C/C++ prototypes are:\n"
  77479. - " vips::VImage::line(int,int,int,int,int)\n"
  77480. - " vips::VImage::line(vips::VImage,vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n");
  77481. - return 0;
  77482. -}
  77483. -
  77484. -
  77485. -SWIGINTERN PyObject *_wrap_VImage_binfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77486. - PyObject *resultobj = 0;
  77487. - char *arg1 = (char *) 0 ;
  77488. - int arg2 ;
  77489. - int arg3 ;
  77490. - int arg4 ;
  77491. - int arg5 ;
  77492. - int res1 ;
  77493. - char *buf1 = 0 ;
  77494. - int alloc1 = 0 ;
  77495. - int val2 ;
  77496. - int ecode2 = 0 ;
  77497. - int val3 ;
  77498. - int ecode3 = 0 ;
  77499. - int val4 ;
  77500. - int ecode4 = 0 ;
  77501. - int val5 ;
  77502. - int ecode5 = 0 ;
  77503. - PyObject * obj0 = 0 ;
  77504. - PyObject * obj1 = 0 ;
  77505. - PyObject * obj2 = 0 ;
  77506. - PyObject * obj3 = 0 ;
  77507. - PyObject * obj4 = 0 ;
  77508. - vips::VImage result;
  77509. -
  77510. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_binfile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  77511. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  77512. - if (!SWIG_IsOK(res1)) {
  77513. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_binfile" "', argument " "1"" of type '" "char *""'");
  77514. - }
  77515. - arg1 = reinterpret_cast< char * >(buf1);
  77516. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  77517. - if (!SWIG_IsOK(ecode2)) {
  77518. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_binfile" "', argument " "2"" of type '" "int""'");
  77519. - }
  77520. - arg2 = static_cast< int >(val2);
  77521. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77522. - if (!SWIG_IsOK(ecode3)) {
  77523. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_binfile" "', argument " "3"" of type '" "int""'");
  77524. - }
  77525. - arg3 = static_cast< int >(val3);
  77526. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77527. - if (!SWIG_IsOK(ecode4)) {
  77528. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_binfile" "', argument " "4"" of type '" "int""'");
  77529. - }
  77530. - arg4 = static_cast< int >(val4);
  77531. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  77532. - if (!SWIG_IsOK(ecode5)) {
  77533. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_binfile" "', argument " "5"" of type '" "int""'");
  77534. - }
  77535. - arg5 = static_cast< int >(val5);
  77536. - try {
  77537. - result = vips::VImage::binfile(arg1,arg2,arg3,arg4,arg5);
  77538. - }
  77539. - catch(vips::VError &_e) {
  77540. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77541. - }
  77542. -
  77543. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  77544. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  77545. - return resultobj;
  77546. -fail:
  77547. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  77548. - return NULL;
  77549. -}
  77550. -
  77551. -
  77552. -SWIGINTERN PyObject *_wrap_VImage_cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77553. - PyObject *resultobj = 0;
  77554. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77555. - int arg2 ;
  77556. - int arg3 ;
  77557. - int arg4 ;
  77558. - void *argp1 = 0 ;
  77559. - int res1 = 0 ;
  77560. - int val2 ;
  77561. - int ecode2 = 0 ;
  77562. - int val3 ;
  77563. - int ecode3 = 0 ;
  77564. - int val4 ;
  77565. - int ecode4 = 0 ;
  77566. - PyObject * obj0 = 0 ;
  77567. - PyObject * obj1 = 0 ;
  77568. - PyObject * obj2 = 0 ;
  77569. - PyObject * obj3 = 0 ;
  77570. - vips::VImage result;
  77571. -
  77572. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_cache",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  77573. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77574. - if (!SWIG_IsOK(res1)) {
  77575. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cache" "', argument " "1"" of type '" "vips::VImage *""'");
  77576. - }
  77577. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77578. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  77579. - if (!SWIG_IsOK(ecode2)) {
  77580. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cache" "', argument " "2"" of type '" "int""'");
  77581. - }
  77582. - arg2 = static_cast< int >(val2);
  77583. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77584. - if (!SWIG_IsOK(ecode3)) {
  77585. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_cache" "', argument " "3"" of type '" "int""'");
  77586. - }
  77587. - arg3 = static_cast< int >(val3);
  77588. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77589. - if (!SWIG_IsOK(ecode4)) {
  77590. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_cache" "', argument " "4"" of type '" "int""'");
  77591. - }
  77592. - arg4 = static_cast< int >(val4);
  77593. - try {
  77594. - result = (arg1)->cache(arg2,arg3,arg4);
  77595. - }
  77596. - catch(vips::VError &_e) {
  77597. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77598. - }
  77599. -
  77600. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  77601. - return resultobj;
  77602. -fail:
  77603. - return NULL;
  77604. -}
  77605. -
  77606. -
  77607. -SWIGINTERN PyObject *_wrap_VImage_getext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77608. - PyObject *resultobj = 0;
  77609. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77610. - void *argp1 = 0 ;
  77611. - int res1 = 0 ;
  77612. - PyObject * obj0 = 0 ;
  77613. - char *result = 0 ;
  77614. -
  77615. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_getext",&obj0)) SWIG_fail;
  77616. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77617. - if (!SWIG_IsOK(res1)) {
  77618. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_getext" "', argument " "1"" of type '" "vips::VImage *""'");
  77619. - }
  77620. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77621. - try {
  77622. - result = (char *)(arg1)->getext();
  77623. - }
  77624. - catch(vips::VError &_e) {
  77625. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77626. - }
  77627. -
  77628. - resultobj = SWIG_FromCharPtr((const char *)result);
  77629. - return resultobj;
  77630. -fail:
  77631. - return NULL;
  77632. -}
  77633. -
  77634. -
  77635. -SWIGINTERN PyObject *_wrap_VImage_header_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77636. - PyObject *resultobj = 0;
  77637. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77638. - char *arg2 = (char *) 0 ;
  77639. - void *argp1 = 0 ;
  77640. - int res1 = 0 ;
  77641. - int res2 ;
  77642. - char *buf2 = 0 ;
  77643. - int alloc2 = 0 ;
  77644. - PyObject * obj0 = 0 ;
  77645. - PyObject * obj1 = 0 ;
  77646. - int result;
  77647. -
  77648. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_get_typeof",&obj0,&obj1)) SWIG_fail;
  77649. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77650. - if (!SWIG_IsOK(res1)) {
  77651. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'");
  77652. - }
  77653. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77654. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  77655. - if (!SWIG_IsOK(res2)) {
  77656. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_get_typeof" "', argument " "2"" of type '" "char *""'");
  77657. - }
  77658. - arg2 = reinterpret_cast< char * >(buf2);
  77659. - try {
  77660. - result = (int)(arg1)->header_get_typeof(arg2);
  77661. - }
  77662. - catch(vips::VError &_e) {
  77663. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77664. - }
  77665. -
  77666. - resultobj = SWIG_From_int(static_cast< int >(result));
  77667. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77668. - return resultobj;
  77669. -fail:
  77670. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77671. - return NULL;
  77672. -}
  77673. -
  77674. -
  77675. -SWIGINTERN PyObject *_wrap_VImage_header_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77676. - PyObject *resultobj = 0;
  77677. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77678. - char *arg2 = (char *) 0 ;
  77679. - void *argp1 = 0 ;
  77680. - int res1 = 0 ;
  77681. - int res2 ;
  77682. - char *buf2 = 0 ;
  77683. - int alloc2 = 0 ;
  77684. - PyObject * obj0 = 0 ;
  77685. - PyObject * obj1 = 0 ;
  77686. - int result;
  77687. -
  77688. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_int",&obj0,&obj1)) SWIG_fail;
  77689. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77690. - if (!SWIG_IsOK(res1)) {
  77691. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_int" "', argument " "1"" of type '" "vips::VImage *""'");
  77692. - }
  77693. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77694. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  77695. - if (!SWIG_IsOK(res2)) {
  77696. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_int" "', argument " "2"" of type '" "char *""'");
  77697. - }
  77698. - arg2 = reinterpret_cast< char * >(buf2);
  77699. - try {
  77700. - result = (int)(arg1)->header_int(arg2);
  77701. - }
  77702. - catch(vips::VError &_e) {
  77703. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77704. - }
  77705. -
  77706. - resultobj = SWIG_From_int(static_cast< int >(result));
  77707. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77708. - return resultobj;
  77709. -fail:
  77710. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77711. - return NULL;
  77712. -}
  77713. -
  77714. -
  77715. -SWIGINTERN PyObject *_wrap_VImage_header_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77716. - PyObject *resultobj = 0;
  77717. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77718. - char *arg2 = (char *) 0 ;
  77719. - void *argp1 = 0 ;
  77720. - int res1 = 0 ;
  77721. - int res2 ;
  77722. - char *buf2 = 0 ;
  77723. - int alloc2 = 0 ;
  77724. - PyObject * obj0 = 0 ;
  77725. - PyObject * obj1 = 0 ;
  77726. - double result;
  77727. -
  77728. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_double",&obj0,&obj1)) SWIG_fail;
  77729. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77730. - if (!SWIG_IsOK(res1)) {
  77731. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_double" "', argument " "1"" of type '" "vips::VImage *""'");
  77732. - }
  77733. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77734. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  77735. - if (!SWIG_IsOK(res2)) {
  77736. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_double" "', argument " "2"" of type '" "char *""'");
  77737. - }
  77738. - arg2 = reinterpret_cast< char * >(buf2);
  77739. - try {
  77740. - result = (double)(arg1)->header_double(arg2);
  77741. - }
  77742. - catch(vips::VError &_e) {
  77743. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77744. - }
  77745. -
  77746. - resultobj = SWIG_From_double(static_cast< double >(result));
  77747. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77748. - return resultobj;
  77749. -fail:
  77750. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77751. - return NULL;
  77752. -}
  77753. -
  77754. -
  77755. -SWIGINTERN PyObject *_wrap_VImage_header_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77756. - PyObject *resultobj = 0;
  77757. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77758. - char *arg2 = (char *) 0 ;
  77759. - void *argp1 = 0 ;
  77760. - int res1 = 0 ;
  77761. - int res2 ;
  77762. - char *buf2 = 0 ;
  77763. - int alloc2 = 0 ;
  77764. - PyObject * obj0 = 0 ;
  77765. - PyObject * obj1 = 0 ;
  77766. - char *result = 0 ;
  77767. -
  77768. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_string",&obj0,&obj1)) SWIG_fail;
  77769. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77770. - if (!SWIG_IsOK(res1)) {
  77771. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_string" "', argument " "1"" of type '" "vips::VImage *""'");
  77772. - }
  77773. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77774. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  77775. - if (!SWIG_IsOK(res2)) {
  77776. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_string" "', argument " "2"" of type '" "char *""'");
  77777. - }
  77778. - arg2 = reinterpret_cast< char * >(buf2);
  77779. - try {
  77780. - result = (char *)(arg1)->header_string(arg2);
  77781. - }
  77782. - catch(vips::VError &_e) {
  77783. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77784. - }
  77785. -
  77786. - resultobj = SWIG_FromCharPtr((const char *)result);
  77787. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77788. - return resultobj;
  77789. -fail:
  77790. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  77791. - return NULL;
  77792. -}
  77793. -
  77794. -
  77795. -SWIGINTERN PyObject *_wrap_VImage_history_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77796. - PyObject *resultobj = 0;
  77797. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77798. - void *argp1 = 0 ;
  77799. - int res1 = 0 ;
  77800. - PyObject * obj0 = 0 ;
  77801. - char *result = 0 ;
  77802. -
  77803. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_history_get",&obj0)) SWIG_fail;
  77804. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77805. - if (!SWIG_IsOK(res1)) {
  77806. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_history_get" "', argument " "1"" of type '" "vips::VImage *""'");
  77807. - }
  77808. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77809. - try {
  77810. - result = (char *)(arg1)->history_get();
  77811. - }
  77812. - catch(vips::VError &_e) {
  77813. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77814. - }
  77815. -
  77816. - resultobj = SWIG_FromCharPtr((const char *)result);
  77817. - return resultobj;
  77818. -fail:
  77819. - return NULL;
  77820. -}
  77821. -
  77822. -
  77823. -SWIGINTERN PyObject *_wrap_VImage_printdesc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77824. - PyObject *resultobj = 0;
  77825. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77826. - void *argp1 = 0 ;
  77827. - int res1 = 0 ;
  77828. - PyObject * obj0 = 0 ;
  77829. -
  77830. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_printdesc",&obj0)) SWIG_fail;
  77831. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77832. - if (!SWIG_IsOK(res1)) {
  77833. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_printdesc" "', argument " "1"" of type '" "vips::VImage *""'");
  77834. - }
  77835. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77836. - try {
  77837. - (arg1)->printdesc();
  77838. - }
  77839. - catch(vips::VError &_e) {
  77840. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77841. - }
  77842. -
  77843. - resultobj = SWIG_Py_Void();
  77844. - return resultobj;
  77845. -fail:
  77846. - return NULL;
  77847. -}
  77848. -
  77849. -
  77850. -SWIGINTERN PyObject *_wrap_VImage_cntlines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77851. - PyObject *resultobj = 0;
  77852. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77853. - int arg2 ;
  77854. - void *argp1 = 0 ;
  77855. - int res1 = 0 ;
  77856. - int val2 ;
  77857. - int ecode2 = 0 ;
  77858. - PyObject * obj0 = 0 ;
  77859. - PyObject * obj1 = 0 ;
  77860. - double result;
  77861. -
  77862. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cntlines",&obj0,&obj1)) SWIG_fail;
  77863. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77864. - if (!SWIG_IsOK(res1)) {
  77865. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cntlines" "', argument " "1"" of type '" "vips::VImage *""'");
  77866. - }
  77867. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77868. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  77869. - if (!SWIG_IsOK(ecode2)) {
  77870. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cntlines" "', argument " "2"" of type '" "int""'");
  77871. - }
  77872. - arg2 = static_cast< int >(val2);
  77873. - try {
  77874. - result = (double)(arg1)->cntlines(arg2);
  77875. - }
  77876. - catch(vips::VError &_e) {
  77877. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77878. - }
  77879. -
  77880. - resultobj = SWIG_From_double(static_cast< double >(result));
  77881. - return resultobj;
  77882. -fail:
  77883. - return NULL;
  77884. -}
  77885. -
  77886. -
  77887. -SWIGINTERN PyObject *_wrap_VImage_dilate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77888. - PyObject *resultobj = 0;
  77889. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77890. - vips::VIMask arg2 ;
  77891. - void *argp1 = 0 ;
  77892. - int res1 = 0 ;
  77893. - void *argp2 ;
  77894. - int res2 = 0 ;
  77895. - PyObject * obj0 = 0 ;
  77896. - PyObject * obj1 = 0 ;
  77897. - vips::VImage result;
  77898. -
  77899. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate",&obj0,&obj1)) SWIG_fail;
  77900. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77901. - if (!SWIG_IsOK(res1)) {
  77902. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate" "', argument " "1"" of type '" "vips::VImage *""'");
  77903. - }
  77904. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77905. - {
  77906. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  77907. - if (!SWIG_IsOK(res2)) {
  77908. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'");
  77909. - }
  77910. - if (!argp2) {
  77911. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'");
  77912. - } else {
  77913. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  77914. - arg2 = *temp;
  77915. - if (SWIG_IsNewObj(res2)) delete temp;
  77916. - }
  77917. - }
  77918. - try {
  77919. - result = (arg1)->dilate(arg2);
  77920. - }
  77921. - catch(vips::VError &_e) {
  77922. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77923. - }
  77924. -
  77925. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  77926. - return resultobj;
  77927. -fail:
  77928. - return NULL;
  77929. -}
  77930. -
  77931. -
  77932. -SWIGINTERN PyObject *_wrap_VImage_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77933. - PyObject *resultobj = 0;
  77934. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  77935. - int arg2 ;
  77936. - int arg3 ;
  77937. - int arg4 ;
  77938. - void *argp1 = 0 ;
  77939. - int res1 = 0 ;
  77940. - int val2 ;
  77941. - int ecode2 = 0 ;
  77942. - int val3 ;
  77943. - int ecode3 = 0 ;
  77944. - int val4 ;
  77945. - int ecode4 = 0 ;
  77946. - PyObject * obj0 = 0 ;
  77947. - PyObject * obj1 = 0 ;
  77948. - PyObject * obj2 = 0 ;
  77949. - PyObject * obj3 = 0 ;
  77950. - vips::VImage result;
  77951. -
  77952. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  77953. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  77954. - if (!SWIG_IsOK(res1)) {
  77955. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank" "', argument " "1"" of type '" "vips::VImage *""'");
  77956. - }
  77957. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  77958. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  77959. - if (!SWIG_IsOK(ecode2)) {
  77960. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank" "', argument " "2"" of type '" "int""'");
  77961. - }
  77962. - arg2 = static_cast< int >(val2);
  77963. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  77964. - if (!SWIG_IsOK(ecode3)) {
  77965. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank" "', argument " "3"" of type '" "int""'");
  77966. - }
  77967. - arg3 = static_cast< int >(val3);
  77968. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  77969. - if (!SWIG_IsOK(ecode4)) {
  77970. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank" "', argument " "4"" of type '" "int""'");
  77971. - }
  77972. - arg4 = static_cast< int >(val4);
  77973. - try {
  77974. - result = (arg1)->rank(arg2,arg3,arg4);
  77975. - }
  77976. - catch(vips::VError &_e) {
  77977. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  77978. - }
  77979. -
  77980. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  77981. - return resultobj;
  77982. -fail:
  77983. - return NULL;
  77984. -}
  77985. -
  77986. -
  77987. -SWIGINTERN PyObject *_wrap_VImage_rank_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  77988. - PyObject *resultobj = 0;
  77989. - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
  77990. - int arg2 ;
  77991. - int val2 ;
  77992. - int ecode2 = 0 ;
  77993. - PyObject * obj0 = 0 ;
  77994. - PyObject * obj1 = 0 ;
  77995. - vips::VImage result;
  77996. -
  77997. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_rank_image",&obj0,&obj1)) SWIG_fail;
  77998. - {
  77999. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  78000. - int res = swig::asptr(obj0, &ptr);
  78001. - if (!SWIG_IsOK(res) || !ptr) {
  78002. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_rank_image" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
  78003. - }
  78004. - arg1 = *ptr;
  78005. - if (SWIG_IsNewObj(res)) delete ptr;
  78006. - }
  78007. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  78008. - if (!SWIG_IsOK(ecode2)) {
  78009. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_image" "', argument " "2"" of type '" "int""'");
  78010. - }
  78011. - arg2 = static_cast< int >(val2);
  78012. - try {
  78013. - result = vips::VImage::rank_image(arg1,arg2);
  78014. - }
  78015. - catch(vips::VError &_e) {
  78016. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78017. - }
  78018. -
  78019. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78020. - return resultobj;
  78021. -fail:
  78022. - return NULL;
  78023. -}
  78024. -
  78025. -
  78026. -SWIGINTERN PyObject *_wrap_VImage_maxvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78027. - PyObject *resultobj = 0;
  78028. - std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ;
  78029. - PyObject * obj0 = 0 ;
  78030. - vips::VImage result;
  78031. -
  78032. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxvalue",&obj0)) SWIG_fail;
  78033. - {
  78034. - std::vector<vips::VImage,std::allocator< vips::VImage > > *ptr = (std::vector<vips::VImage,std::allocator< vips::VImage > > *)0;
  78035. - int res = swig::asptr(obj0, &ptr);
  78036. - if (!SWIG_IsOK(res) || !ptr) {
  78037. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_maxvalue" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'");
  78038. - }
  78039. - arg1 = *ptr;
  78040. - if (SWIG_IsNewObj(res)) delete ptr;
  78041. - }
  78042. - try {
  78043. - result = vips::VImage::maxvalue(arg1);
  78044. - }
  78045. - catch(vips::VError &_e) {
  78046. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78047. - }
  78048. -
  78049. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78050. - return resultobj;
  78051. -fail:
  78052. - return NULL;
  78053. -}
  78054. -
  78055. -
  78056. -SWIGINTERN PyObject *_wrap_VImage_label_regions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78057. - PyObject *resultobj = 0;
  78058. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78059. - int *arg2 = 0 ;
  78060. - void *argp1 = 0 ;
  78061. - int res1 = 0 ;
  78062. - int temp2 ;
  78063. - int res2 = SWIG_TMPOBJ ;
  78064. - PyObject * obj0 = 0 ;
  78065. - vips::VImage result;
  78066. -
  78067. - arg2 = &temp2;
  78068. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_label_regions",&obj0)) SWIG_fail;
  78069. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78070. - if (!SWIG_IsOK(res1)) {
  78071. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_label_regions" "', argument " "1"" of type '" "vips::VImage *""'");
  78072. - }
  78073. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78074. - try {
  78075. - result = (arg1)->label_regions(*arg2);
  78076. - }
  78077. - catch(vips::VError &_e) {
  78078. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78079. - }
  78080. -
  78081. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78082. - if (SWIG_IsTmpObj(res2)) {
  78083. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
  78084. - } else {
  78085. - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78086. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
  78087. - }
  78088. - return resultobj;
  78089. -fail:
  78090. - return NULL;
  78091. -}
  78092. -
  78093. -
  78094. -SWIGINTERN PyObject *_wrap_VImage_zerox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78095. - PyObject *resultobj = 0;
  78096. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78097. - int arg2 ;
  78098. - void *argp1 = 0 ;
  78099. - int res1 = 0 ;
  78100. - int val2 ;
  78101. - int ecode2 = 0 ;
  78102. - PyObject * obj0 = 0 ;
  78103. - PyObject * obj1 = 0 ;
  78104. - vips::VImage result;
  78105. -
  78106. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_zerox",&obj0,&obj1)) SWIG_fail;
  78107. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78108. - if (!SWIG_IsOK(res1)) {
  78109. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zerox" "', argument " "1"" of type '" "vips::VImage *""'");
  78110. - }
  78111. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78112. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  78113. - if (!SWIG_IsOK(ecode2)) {
  78114. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zerox" "', argument " "2"" of type '" "int""'");
  78115. - }
  78116. - arg2 = static_cast< int >(val2);
  78117. - try {
  78118. - result = (arg1)->zerox(arg2);
  78119. - }
  78120. - catch(vips::VError &_e) {
  78121. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78122. - }
  78123. -
  78124. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78125. - return resultobj;
  78126. -fail:
  78127. - return NULL;
  78128. -}
  78129. -
  78130. -
  78131. -SWIGINTERN PyObject *_wrap_VImage_erode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78132. - PyObject *resultobj = 0;
  78133. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78134. - vips::VIMask arg2 ;
  78135. - void *argp1 = 0 ;
  78136. - int res1 = 0 ;
  78137. - void *argp2 ;
  78138. - int res2 = 0 ;
  78139. - PyObject * obj0 = 0 ;
  78140. - PyObject * obj1 = 0 ;
  78141. - vips::VImage result;
  78142. -
  78143. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode",&obj0,&obj1)) SWIG_fail;
  78144. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78145. - if (!SWIG_IsOK(res1)) {
  78146. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode" "', argument " "1"" of type '" "vips::VImage *""'");
  78147. - }
  78148. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78149. - {
  78150. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0);
  78151. - if (!SWIG_IsOK(res2)) {
  78152. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'");
  78153. - }
  78154. - if (!argp2) {
  78155. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'");
  78156. - } else {
  78157. - vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2);
  78158. - arg2 = *temp;
  78159. - if (SWIG_IsNewObj(res2)) delete temp;
  78160. - }
  78161. - }
  78162. - try {
  78163. - result = (arg1)->erode(arg2);
  78164. - }
  78165. - catch(vips::VError &_e) {
  78166. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78167. - }
  78168. -
  78169. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78170. - return resultobj;
  78171. -fail:
  78172. - return NULL;
  78173. -}
  78174. -
  78175. -
  78176. -SWIGINTERN PyObject *_wrap_VImage_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78177. - PyObject *resultobj = 0;
  78178. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78179. - int arg2 ;
  78180. - void *argp1 = 0 ;
  78181. - int res1 = 0 ;
  78182. - int val2 ;
  78183. - int ecode2 = 0 ;
  78184. - PyObject * obj0 = 0 ;
  78185. - PyObject * obj1 = 0 ;
  78186. - vips::VImage result;
  78187. -
  78188. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_profile",&obj0,&obj1)) SWIG_fail;
  78189. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78190. - if (!SWIG_IsOK(res1)) {
  78191. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_profile" "', argument " "1"" of type '" "vips::VImage *""'");
  78192. - }
  78193. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78194. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  78195. - if (!SWIG_IsOK(ecode2)) {
  78196. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_profile" "', argument " "2"" of type '" "int""'");
  78197. - }
  78198. - arg2 = static_cast< int >(val2);
  78199. - try {
  78200. - result = (arg1)->profile(arg2);
  78201. - }
  78202. - catch(vips::VError &_e) {
  78203. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78204. - }
  78205. -
  78206. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78207. - return resultobj;
  78208. -fail:
  78209. - return NULL;
  78210. -}
  78211. -
  78212. -
  78213. -SWIGINTERN PyObject *_wrap_VImage_align_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78214. - PyObject *resultobj = 0;
  78215. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78216. - void *argp1 = 0 ;
  78217. - int res1 = 0 ;
  78218. - PyObject * obj0 = 0 ;
  78219. - vips::VImage result;
  78220. -
  78221. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_align_bands",&obj0)) SWIG_fail;
  78222. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78223. - if (!SWIG_IsOK(res1)) {
  78224. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_align_bands" "', argument " "1"" of type '" "vips::VImage *""'");
  78225. - }
  78226. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78227. - try {
  78228. - result = (arg1)->align_bands();
  78229. - }
  78230. - catch(vips::VError &_e) {
  78231. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78232. - }
  78233. -
  78234. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78235. - return resultobj;
  78236. -fail:
  78237. - return NULL;
  78238. -}
  78239. -
  78240. -
  78241. -SWIGINTERN PyObject *_wrap_VImage_correl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78242. - PyObject *resultobj = 0;
  78243. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78244. - vips::VImage arg2 ;
  78245. - int arg3 ;
  78246. - int arg4 ;
  78247. - int arg5 ;
  78248. - int arg6 ;
  78249. - int arg7 ;
  78250. - int arg8 ;
  78251. - int *arg9 = 0 ;
  78252. - int *arg10 = 0 ;
  78253. - void *argp1 = 0 ;
  78254. - int res1 = 0 ;
  78255. - void *argp2 ;
  78256. - int res2 = 0 ;
  78257. - int val3 ;
  78258. - int ecode3 = 0 ;
  78259. - int val4 ;
  78260. - int ecode4 = 0 ;
  78261. - int val5 ;
  78262. - int ecode5 = 0 ;
  78263. - int val6 ;
  78264. - int ecode6 = 0 ;
  78265. - int val7 ;
  78266. - int ecode7 = 0 ;
  78267. - int val8 ;
  78268. - int ecode8 = 0 ;
  78269. - int temp9 ;
  78270. - int res9 = SWIG_TMPOBJ ;
  78271. - int temp10 ;
  78272. - int res10 = SWIG_TMPOBJ ;
  78273. - PyObject * obj0 = 0 ;
  78274. - PyObject * obj1 = 0 ;
  78275. - PyObject * obj2 = 0 ;
  78276. - PyObject * obj3 = 0 ;
  78277. - PyObject * obj4 = 0 ;
  78278. - PyObject * obj5 = 0 ;
  78279. - PyObject * obj6 = 0 ;
  78280. - PyObject * obj7 = 0 ;
  78281. - double result;
  78282. -
  78283. - arg9 = &temp9;
  78284. - arg10 = &temp10;
  78285. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_correl",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  78286. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78287. - if (!SWIG_IsOK(res1)) {
  78288. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_correl" "', argument " "1"" of type '" "vips::VImage *""'");
  78289. - }
  78290. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78291. - {
  78292. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  78293. - if (!SWIG_IsOK(res2)) {
  78294. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'");
  78295. - }
  78296. - if (!argp2) {
  78297. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'");
  78298. - } else {
  78299. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  78300. - arg2 = *temp;
  78301. - if (SWIG_IsNewObj(res2)) delete temp;
  78302. - }
  78303. - }
  78304. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  78305. - if (!SWIG_IsOK(ecode3)) {
  78306. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_correl" "', argument " "3"" of type '" "int""'");
  78307. - }
  78308. - arg3 = static_cast< int >(val3);
  78309. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  78310. - if (!SWIG_IsOK(ecode4)) {
  78311. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_correl" "', argument " "4"" of type '" "int""'");
  78312. - }
  78313. - arg4 = static_cast< int >(val4);
  78314. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  78315. - if (!SWIG_IsOK(ecode5)) {
  78316. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_correl" "', argument " "5"" of type '" "int""'");
  78317. - }
  78318. - arg5 = static_cast< int >(val5);
  78319. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  78320. - if (!SWIG_IsOK(ecode6)) {
  78321. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_correl" "', argument " "6"" of type '" "int""'");
  78322. - }
  78323. - arg6 = static_cast< int >(val6);
  78324. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  78325. - if (!SWIG_IsOK(ecode7)) {
  78326. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_correl" "', argument " "7"" of type '" "int""'");
  78327. - }
  78328. - arg7 = static_cast< int >(val7);
  78329. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  78330. - if (!SWIG_IsOK(ecode8)) {
  78331. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_correl" "', argument " "8"" of type '" "int""'");
  78332. - }
  78333. - arg8 = static_cast< int >(val8);
  78334. - try {
  78335. - result = (double)(arg1)->correl(arg2,arg3,arg4,arg5,arg6,arg7,arg8,*arg9,*arg10);
  78336. - }
  78337. - catch(vips::VError &_e) {
  78338. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78339. - }
  78340. -
  78341. - resultobj = SWIG_From_double(static_cast< double >(result));
  78342. - if (SWIG_IsTmpObj(res9)) {
  78343. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
  78344. - } else {
  78345. - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78346. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
  78347. - }
  78348. - if (SWIG_IsTmpObj(res10)) {
  78349. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
  78350. - } else {
  78351. - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78352. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
  78353. - }
  78354. - return resultobj;
  78355. -fail:
  78356. - return NULL;
  78357. -}
  78358. -
  78359. -
  78360. -SWIGINTERN PyObject *_wrap_VImage__find_lroverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78361. - PyObject *resultobj = 0;
  78362. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78363. - vips::VImage arg2 ;
  78364. - int arg3 ;
  78365. - int arg4 ;
  78366. - int arg5 ;
  78367. - int arg6 ;
  78368. - int arg7 ;
  78369. - int arg8 ;
  78370. - int arg9 ;
  78371. - int *arg10 = 0 ;
  78372. - double *arg11 = 0 ;
  78373. - double *arg12 = 0 ;
  78374. - double *arg13 = 0 ;
  78375. - double *arg14 = 0 ;
  78376. - void *argp1 = 0 ;
  78377. - int res1 = 0 ;
  78378. - void *argp2 ;
  78379. - int res2 = 0 ;
  78380. - int val3 ;
  78381. - int ecode3 = 0 ;
  78382. - int val4 ;
  78383. - int ecode4 = 0 ;
  78384. - int val5 ;
  78385. - int ecode5 = 0 ;
  78386. - int val6 ;
  78387. - int ecode6 = 0 ;
  78388. - int val7 ;
  78389. - int ecode7 = 0 ;
  78390. - int val8 ;
  78391. - int ecode8 = 0 ;
  78392. - int val9 ;
  78393. - int ecode9 = 0 ;
  78394. - int temp10 ;
  78395. - int res10 = SWIG_TMPOBJ ;
  78396. - double temp11 ;
  78397. - int res11 = SWIG_TMPOBJ ;
  78398. - double temp12 ;
  78399. - int res12 = SWIG_TMPOBJ ;
  78400. - double temp13 ;
  78401. - int res13 = SWIG_TMPOBJ ;
  78402. - double temp14 ;
  78403. - int res14 = SWIG_TMPOBJ ;
  78404. - PyObject * obj0 = 0 ;
  78405. - PyObject * obj1 = 0 ;
  78406. - PyObject * obj2 = 0 ;
  78407. - PyObject * obj3 = 0 ;
  78408. - PyObject * obj4 = 0 ;
  78409. - PyObject * obj5 = 0 ;
  78410. - PyObject * obj6 = 0 ;
  78411. - PyObject * obj7 = 0 ;
  78412. - PyObject * obj8 = 0 ;
  78413. - int result;
  78414. -
  78415. - arg10 = &temp10;
  78416. - arg11 = &temp11;
  78417. - arg12 = &temp12;
  78418. - arg13 = &temp13;
  78419. - arg14 = &temp14;
  78420. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_lroverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  78421. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78422. - if (!SWIG_IsOK(res1)) {
  78423. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_lroverlap" "', argument " "1"" of type '" "vips::VImage *""'");
  78424. - }
  78425. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78426. - {
  78427. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  78428. - if (!SWIG_IsOK(res2)) {
  78429. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'");
  78430. - }
  78431. - if (!argp2) {
  78432. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'");
  78433. - } else {
  78434. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  78435. - arg2 = *temp;
  78436. - if (SWIG_IsNewObj(res2)) delete temp;
  78437. - }
  78438. - }
  78439. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  78440. - if (!SWIG_IsOK(ecode3)) {
  78441. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_lroverlap" "', argument " "3"" of type '" "int""'");
  78442. - }
  78443. - arg3 = static_cast< int >(val3);
  78444. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  78445. - if (!SWIG_IsOK(ecode4)) {
  78446. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_lroverlap" "', argument " "4"" of type '" "int""'");
  78447. - }
  78448. - arg4 = static_cast< int >(val4);
  78449. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  78450. - if (!SWIG_IsOK(ecode5)) {
  78451. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_lroverlap" "', argument " "5"" of type '" "int""'");
  78452. - }
  78453. - arg5 = static_cast< int >(val5);
  78454. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  78455. - if (!SWIG_IsOK(ecode6)) {
  78456. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_lroverlap" "', argument " "6"" of type '" "int""'");
  78457. - }
  78458. - arg6 = static_cast< int >(val6);
  78459. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  78460. - if (!SWIG_IsOK(ecode7)) {
  78461. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_lroverlap" "', argument " "7"" of type '" "int""'");
  78462. - }
  78463. - arg7 = static_cast< int >(val7);
  78464. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  78465. - if (!SWIG_IsOK(ecode8)) {
  78466. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_lroverlap" "', argument " "8"" of type '" "int""'");
  78467. - }
  78468. - arg8 = static_cast< int >(val8);
  78469. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  78470. - if (!SWIG_IsOK(ecode9)) {
  78471. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_lroverlap" "', argument " "9"" of type '" "int""'");
  78472. - }
  78473. - arg9 = static_cast< int >(val9);
  78474. - try {
  78475. - result = (int)(arg1)->_find_lroverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14);
  78476. - }
  78477. - catch(vips::VError &_e) {
  78478. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78479. - }
  78480. -
  78481. - resultobj = SWIG_From_int(static_cast< int >(result));
  78482. - if (SWIG_IsTmpObj(res10)) {
  78483. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
  78484. - } else {
  78485. - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78486. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
  78487. - }
  78488. - if (SWIG_IsTmpObj(res11)) {
  78489. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11)));
  78490. - } else {
  78491. - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78492. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags));
  78493. - }
  78494. - if (SWIG_IsTmpObj(res12)) {
  78495. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12)));
  78496. - } else {
  78497. - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78498. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags));
  78499. - }
  78500. - if (SWIG_IsTmpObj(res13)) {
  78501. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13)));
  78502. - } else {
  78503. - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78504. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags));
  78505. - }
  78506. - if (SWIG_IsTmpObj(res14)) {
  78507. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14)));
  78508. - } else {
  78509. - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78510. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags));
  78511. - }
  78512. - return resultobj;
  78513. -fail:
  78514. - return NULL;
  78515. -}
  78516. -
  78517. -
  78518. -SWIGINTERN PyObject *_wrap_VImage__find_tboverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78519. - PyObject *resultobj = 0;
  78520. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78521. - vips::VImage arg2 ;
  78522. - int arg3 ;
  78523. - int arg4 ;
  78524. - int arg5 ;
  78525. - int arg6 ;
  78526. - int arg7 ;
  78527. - int arg8 ;
  78528. - int arg9 ;
  78529. - int *arg10 = 0 ;
  78530. - double *arg11 = 0 ;
  78531. - double *arg12 = 0 ;
  78532. - double *arg13 = 0 ;
  78533. - double *arg14 = 0 ;
  78534. - void *argp1 = 0 ;
  78535. - int res1 = 0 ;
  78536. - void *argp2 ;
  78537. - int res2 = 0 ;
  78538. - int val3 ;
  78539. - int ecode3 = 0 ;
  78540. - int val4 ;
  78541. - int ecode4 = 0 ;
  78542. - int val5 ;
  78543. - int ecode5 = 0 ;
  78544. - int val6 ;
  78545. - int ecode6 = 0 ;
  78546. - int val7 ;
  78547. - int ecode7 = 0 ;
  78548. - int val8 ;
  78549. - int ecode8 = 0 ;
  78550. - int val9 ;
  78551. - int ecode9 = 0 ;
  78552. - int temp10 ;
  78553. - int res10 = SWIG_TMPOBJ ;
  78554. - double temp11 ;
  78555. - int res11 = SWIG_TMPOBJ ;
  78556. - double temp12 ;
  78557. - int res12 = SWIG_TMPOBJ ;
  78558. - double temp13 ;
  78559. - int res13 = SWIG_TMPOBJ ;
  78560. - double temp14 ;
  78561. - int res14 = SWIG_TMPOBJ ;
  78562. - PyObject * obj0 = 0 ;
  78563. - PyObject * obj1 = 0 ;
  78564. - PyObject * obj2 = 0 ;
  78565. - PyObject * obj3 = 0 ;
  78566. - PyObject * obj4 = 0 ;
  78567. - PyObject * obj5 = 0 ;
  78568. - PyObject * obj6 = 0 ;
  78569. - PyObject * obj7 = 0 ;
  78570. - PyObject * obj8 = 0 ;
  78571. - int result;
  78572. -
  78573. - arg10 = &temp10;
  78574. - arg11 = &temp11;
  78575. - arg12 = &temp12;
  78576. - arg13 = &temp13;
  78577. - arg14 = &temp14;
  78578. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_tboverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  78579. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78580. - if (!SWIG_IsOK(res1)) {
  78581. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_tboverlap" "', argument " "1"" of type '" "vips::VImage *""'");
  78582. - }
  78583. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78584. - {
  78585. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  78586. - if (!SWIG_IsOK(res2)) {
  78587. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'");
  78588. - }
  78589. - if (!argp2) {
  78590. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'");
  78591. - } else {
  78592. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  78593. - arg2 = *temp;
  78594. - if (SWIG_IsNewObj(res2)) delete temp;
  78595. - }
  78596. - }
  78597. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  78598. - if (!SWIG_IsOK(ecode3)) {
  78599. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_tboverlap" "', argument " "3"" of type '" "int""'");
  78600. - }
  78601. - arg3 = static_cast< int >(val3);
  78602. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  78603. - if (!SWIG_IsOK(ecode4)) {
  78604. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_tboverlap" "', argument " "4"" of type '" "int""'");
  78605. - }
  78606. - arg4 = static_cast< int >(val4);
  78607. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  78608. - if (!SWIG_IsOK(ecode5)) {
  78609. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_tboverlap" "', argument " "5"" of type '" "int""'");
  78610. - }
  78611. - arg5 = static_cast< int >(val5);
  78612. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  78613. - if (!SWIG_IsOK(ecode6)) {
  78614. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_tboverlap" "', argument " "6"" of type '" "int""'");
  78615. - }
  78616. - arg6 = static_cast< int >(val6);
  78617. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  78618. - if (!SWIG_IsOK(ecode7)) {
  78619. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_tboverlap" "', argument " "7"" of type '" "int""'");
  78620. - }
  78621. - arg7 = static_cast< int >(val7);
  78622. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  78623. - if (!SWIG_IsOK(ecode8)) {
  78624. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_tboverlap" "', argument " "8"" of type '" "int""'");
  78625. - }
  78626. - arg8 = static_cast< int >(val8);
  78627. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  78628. - if (!SWIG_IsOK(ecode9)) {
  78629. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_tboverlap" "', argument " "9"" of type '" "int""'");
  78630. - }
  78631. - arg9 = static_cast< int >(val9);
  78632. - try {
  78633. - result = (int)(arg1)->_find_tboverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14);
  78634. - }
  78635. - catch(vips::VError &_e) {
  78636. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78637. - }
  78638. -
  78639. - resultobj = SWIG_From_int(static_cast< int >(result));
  78640. - if (SWIG_IsTmpObj(res10)) {
  78641. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10)));
  78642. - } else {
  78643. - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78644. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags));
  78645. - }
  78646. - if (SWIG_IsTmpObj(res11)) {
  78647. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11)));
  78648. - } else {
  78649. - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78650. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags));
  78651. - }
  78652. - if (SWIG_IsTmpObj(res12)) {
  78653. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12)));
  78654. - } else {
  78655. - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78656. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags));
  78657. - }
  78658. - if (SWIG_IsTmpObj(res13)) {
  78659. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13)));
  78660. - } else {
  78661. - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78662. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags));
  78663. - }
  78664. - if (SWIG_IsTmpObj(res14)) {
  78665. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14)));
  78666. - } else {
  78667. - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  78668. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags));
  78669. - }
  78670. - return resultobj;
  78671. -fail:
  78672. - return NULL;
  78673. -}
  78674. -
  78675. -
  78676. -SWIGINTERN PyObject *_wrap_VImage_global_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78677. - PyObject *resultobj = 0;
  78678. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78679. - double arg2 ;
  78680. - void *argp1 = 0 ;
  78681. - int res1 = 0 ;
  78682. - double val2 ;
  78683. - int ecode2 = 0 ;
  78684. - PyObject * obj0 = 0 ;
  78685. - PyObject * obj1 = 0 ;
  78686. - vips::VImage result;
  78687. -
  78688. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balance",&obj0,&obj1)) SWIG_fail;
  78689. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78690. - if (!SWIG_IsOK(res1)) {
  78691. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balance" "', argument " "1"" of type '" "vips::VImage *""'");
  78692. - }
  78693. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78694. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  78695. - if (!SWIG_IsOK(ecode2)) {
  78696. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balance" "', argument " "2"" of type '" "double""'");
  78697. - }
  78698. - arg2 = static_cast< double >(val2);
  78699. - try {
  78700. - result = (arg1)->global_balance(arg2);
  78701. - }
  78702. - catch(vips::VError &_e) {
  78703. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78704. - }
  78705. -
  78706. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78707. - return resultobj;
  78708. -fail:
  78709. - return NULL;
  78710. -}
  78711. -
  78712. -
  78713. -SWIGINTERN PyObject *_wrap_VImage_global_balancef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78714. - PyObject *resultobj = 0;
  78715. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78716. - double arg2 ;
  78717. - void *argp1 = 0 ;
  78718. - int res1 = 0 ;
  78719. - double val2 ;
  78720. - int ecode2 = 0 ;
  78721. - PyObject * obj0 = 0 ;
  78722. - PyObject * obj1 = 0 ;
  78723. - vips::VImage result;
  78724. -
  78725. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balancef",&obj0,&obj1)) SWIG_fail;
  78726. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78727. - if (!SWIG_IsOK(res1)) {
  78728. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balancef" "', argument " "1"" of type '" "vips::VImage *""'");
  78729. - }
  78730. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78731. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  78732. - if (!SWIG_IsOK(ecode2)) {
  78733. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balancef" "', argument " "2"" of type '" "double""'");
  78734. - }
  78735. - arg2 = static_cast< double >(val2);
  78736. - try {
  78737. - result = (arg1)->global_balancef(arg2);
  78738. - }
  78739. - catch(vips::VError &_e) {
  78740. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78741. - }
  78742. -
  78743. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78744. - return resultobj;
  78745. -fail:
  78746. - return NULL;
  78747. -}
  78748. -
  78749. -
  78750. -SWIGINTERN PyObject *_wrap_VImage_lrmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78751. - PyObject *resultobj = 0;
  78752. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78753. - vips::VImage arg2 ;
  78754. - int arg3 ;
  78755. - int arg4 ;
  78756. - int arg5 ;
  78757. - void *argp1 = 0 ;
  78758. - int res1 = 0 ;
  78759. - void *argp2 ;
  78760. - int res2 = 0 ;
  78761. - int val3 ;
  78762. - int ecode3 = 0 ;
  78763. - int val4 ;
  78764. - int ecode4 = 0 ;
  78765. - int val5 ;
  78766. - int ecode5 = 0 ;
  78767. - PyObject * obj0 = 0 ;
  78768. - PyObject * obj1 = 0 ;
  78769. - PyObject * obj2 = 0 ;
  78770. - PyObject * obj3 = 0 ;
  78771. - PyObject * obj4 = 0 ;
  78772. - vips::VImage result;
  78773. -
  78774. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_lrmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  78775. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78776. - if (!SWIG_IsOK(res1)) {
  78777. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge" "', argument " "1"" of type '" "vips::VImage *""'");
  78778. - }
  78779. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78780. - {
  78781. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  78782. - if (!SWIG_IsOK(res2)) {
  78783. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'");
  78784. - }
  78785. - if (!argp2) {
  78786. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'");
  78787. - } else {
  78788. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  78789. - arg2 = *temp;
  78790. - if (SWIG_IsNewObj(res2)) delete temp;
  78791. - }
  78792. - }
  78793. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  78794. - if (!SWIG_IsOK(ecode3)) {
  78795. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge" "', argument " "3"" of type '" "int""'");
  78796. - }
  78797. - arg3 = static_cast< int >(val3);
  78798. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  78799. - if (!SWIG_IsOK(ecode4)) {
  78800. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge" "', argument " "4"" of type '" "int""'");
  78801. - }
  78802. - arg4 = static_cast< int >(val4);
  78803. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  78804. - if (!SWIG_IsOK(ecode5)) {
  78805. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge" "', argument " "5"" of type '" "int""'");
  78806. - }
  78807. - arg5 = static_cast< int >(val5);
  78808. - try {
  78809. - result = (arg1)->lrmerge(arg2,arg3,arg4,arg5);
  78810. - }
  78811. - catch(vips::VError &_e) {
  78812. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78813. - }
  78814. -
  78815. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78816. - return resultobj;
  78817. -fail:
  78818. - return NULL;
  78819. -}
  78820. -
  78821. -
  78822. -SWIGINTERN PyObject *_wrap_VImage_lrmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78823. - PyObject *resultobj = 0;
  78824. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78825. - vips::VImage arg2 ;
  78826. - int arg3 ;
  78827. - int arg4 ;
  78828. - int arg5 ;
  78829. - int arg6 ;
  78830. - int arg7 ;
  78831. - int arg8 ;
  78832. - int arg9 ;
  78833. - int arg10 ;
  78834. - int arg11 ;
  78835. - void *argp1 = 0 ;
  78836. - int res1 = 0 ;
  78837. - void *argp2 ;
  78838. - int res2 = 0 ;
  78839. - int val3 ;
  78840. - int ecode3 = 0 ;
  78841. - int val4 ;
  78842. - int ecode4 = 0 ;
  78843. - int val5 ;
  78844. - int ecode5 = 0 ;
  78845. - int val6 ;
  78846. - int ecode6 = 0 ;
  78847. - int val7 ;
  78848. - int ecode7 = 0 ;
  78849. - int val8 ;
  78850. - int ecode8 = 0 ;
  78851. - int val9 ;
  78852. - int ecode9 = 0 ;
  78853. - int val10 ;
  78854. - int ecode10 = 0 ;
  78855. - int val11 ;
  78856. - int ecode11 = 0 ;
  78857. - PyObject * obj0 = 0 ;
  78858. - PyObject * obj1 = 0 ;
  78859. - PyObject * obj2 = 0 ;
  78860. - PyObject * obj3 = 0 ;
  78861. - PyObject * obj4 = 0 ;
  78862. - PyObject * obj5 = 0 ;
  78863. - PyObject * obj6 = 0 ;
  78864. - PyObject * obj7 = 0 ;
  78865. - PyObject * obj8 = 0 ;
  78866. - PyObject * obj9 = 0 ;
  78867. - PyObject * obj10 = 0 ;
  78868. - vips::VImage result;
  78869. -
  78870. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  78871. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78872. - if (!SWIG_IsOK(res1)) {
  78873. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge1" "', argument " "1"" of type '" "vips::VImage *""'");
  78874. - }
  78875. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  78876. - {
  78877. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  78878. - if (!SWIG_IsOK(res2)) {
  78879. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'");
  78880. - }
  78881. - if (!argp2) {
  78882. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'");
  78883. - } else {
  78884. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  78885. - arg2 = *temp;
  78886. - if (SWIG_IsNewObj(res2)) delete temp;
  78887. - }
  78888. - }
  78889. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  78890. - if (!SWIG_IsOK(ecode3)) {
  78891. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge1" "', argument " "3"" of type '" "int""'");
  78892. - }
  78893. - arg3 = static_cast< int >(val3);
  78894. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  78895. - if (!SWIG_IsOK(ecode4)) {
  78896. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge1" "', argument " "4"" of type '" "int""'");
  78897. - }
  78898. - arg4 = static_cast< int >(val4);
  78899. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  78900. - if (!SWIG_IsOK(ecode5)) {
  78901. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge1" "', argument " "5"" of type '" "int""'");
  78902. - }
  78903. - arg5 = static_cast< int >(val5);
  78904. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  78905. - if (!SWIG_IsOK(ecode6)) {
  78906. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmerge1" "', argument " "6"" of type '" "int""'");
  78907. - }
  78908. - arg6 = static_cast< int >(val6);
  78909. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  78910. - if (!SWIG_IsOK(ecode7)) {
  78911. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmerge1" "', argument " "7"" of type '" "int""'");
  78912. - }
  78913. - arg7 = static_cast< int >(val7);
  78914. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  78915. - if (!SWIG_IsOK(ecode8)) {
  78916. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmerge1" "', argument " "8"" of type '" "int""'");
  78917. - }
  78918. - arg8 = static_cast< int >(val8);
  78919. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  78920. - if (!SWIG_IsOK(ecode9)) {
  78921. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmerge1" "', argument " "9"" of type '" "int""'");
  78922. - }
  78923. - arg9 = static_cast< int >(val9);
  78924. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  78925. - if (!SWIG_IsOK(ecode10)) {
  78926. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmerge1" "', argument " "10"" of type '" "int""'");
  78927. - }
  78928. - arg10 = static_cast< int >(val10);
  78929. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  78930. - if (!SWIG_IsOK(ecode11)) {
  78931. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmerge1" "', argument " "11"" of type '" "int""'");
  78932. - }
  78933. - arg11 = static_cast< int >(val11);
  78934. - try {
  78935. - result = (arg1)->lrmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  78936. - }
  78937. - catch(vips::VError &_e) {
  78938. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  78939. - }
  78940. -
  78941. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  78942. - return resultobj;
  78943. -fail:
  78944. - return NULL;
  78945. -}
  78946. -
  78947. -
  78948. -SWIGINTERN PyObject *_wrap_VImage_lrmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  78949. - PyObject *resultobj = 0;
  78950. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  78951. - vips::VImage arg2 ;
  78952. - int arg3 ;
  78953. - int arg4 ;
  78954. - int arg5 ;
  78955. - int arg6 ;
  78956. - int arg7 ;
  78957. - int arg8 ;
  78958. - int arg9 ;
  78959. - int arg10 ;
  78960. - int arg11 ;
  78961. - void *argp1 = 0 ;
  78962. - int res1 = 0 ;
  78963. - void *argp2 ;
  78964. - int res2 = 0 ;
  78965. - int val3 ;
  78966. - int ecode3 = 0 ;
  78967. - int val4 ;
  78968. - int ecode4 = 0 ;
  78969. - int val5 ;
  78970. - int ecode5 = 0 ;
  78971. - int val6 ;
  78972. - int ecode6 = 0 ;
  78973. - int val7 ;
  78974. - int ecode7 = 0 ;
  78975. - int val8 ;
  78976. - int ecode8 = 0 ;
  78977. - int val9 ;
  78978. - int ecode9 = 0 ;
  78979. - int val10 ;
  78980. - int ecode10 = 0 ;
  78981. - int val11 ;
  78982. - int ecode11 = 0 ;
  78983. - PyObject * obj0 = 0 ;
  78984. - PyObject * obj1 = 0 ;
  78985. - PyObject * obj2 = 0 ;
  78986. - PyObject * obj3 = 0 ;
  78987. - PyObject * obj4 = 0 ;
  78988. - PyObject * obj5 = 0 ;
  78989. - PyObject * obj6 = 0 ;
  78990. - PyObject * obj7 = 0 ;
  78991. - PyObject * obj8 = 0 ;
  78992. - PyObject * obj9 = 0 ;
  78993. - PyObject * obj10 = 0 ;
  78994. - vips::VImage result;
  78995. -
  78996. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  78997. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  78998. - if (!SWIG_IsOK(res1)) {
  78999. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic" "', argument " "1"" of type '" "vips::VImage *""'");
  79000. - }
  79001. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79002. - {
  79003. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79004. - if (!SWIG_IsOK(res2)) {
  79005. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'");
  79006. - }
  79007. - if (!argp2) {
  79008. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'");
  79009. - } else {
  79010. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79011. - arg2 = *temp;
  79012. - if (SWIG_IsNewObj(res2)) delete temp;
  79013. - }
  79014. - }
  79015. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79016. - if (!SWIG_IsOK(ecode3)) {
  79017. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic" "', argument " "3"" of type '" "int""'");
  79018. - }
  79019. - arg3 = static_cast< int >(val3);
  79020. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79021. - if (!SWIG_IsOK(ecode4)) {
  79022. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic" "', argument " "4"" of type '" "int""'");
  79023. - }
  79024. - arg4 = static_cast< int >(val4);
  79025. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79026. - if (!SWIG_IsOK(ecode5)) {
  79027. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic" "', argument " "5"" of type '" "int""'");
  79028. - }
  79029. - arg5 = static_cast< int >(val5);
  79030. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79031. - if (!SWIG_IsOK(ecode6)) {
  79032. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic" "', argument " "6"" of type '" "int""'");
  79033. - }
  79034. - arg6 = static_cast< int >(val6);
  79035. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79036. - if (!SWIG_IsOK(ecode7)) {
  79037. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic" "', argument " "7"" of type '" "int""'");
  79038. - }
  79039. - arg7 = static_cast< int >(val7);
  79040. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79041. - if (!SWIG_IsOK(ecode8)) {
  79042. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic" "', argument " "8"" of type '" "int""'");
  79043. - }
  79044. - arg8 = static_cast< int >(val8);
  79045. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79046. - if (!SWIG_IsOK(ecode9)) {
  79047. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic" "', argument " "9"" of type '" "int""'");
  79048. - }
  79049. - arg9 = static_cast< int >(val9);
  79050. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79051. - if (!SWIG_IsOK(ecode10)) {
  79052. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic" "', argument " "10"" of type '" "int""'");
  79053. - }
  79054. - arg10 = static_cast< int >(val10);
  79055. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  79056. - if (!SWIG_IsOK(ecode11)) {
  79057. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic" "', argument " "11"" of type '" "int""'");
  79058. - }
  79059. - arg11 = static_cast< int >(val11);
  79060. - try {
  79061. - result = (arg1)->lrmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  79062. - }
  79063. - catch(vips::VError &_e) {
  79064. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79065. - }
  79066. -
  79067. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79068. - return resultobj;
  79069. -fail:
  79070. - return NULL;
  79071. -}
  79072. -
  79073. -
  79074. -SWIGINTERN PyObject *_wrap_VImage_lrmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79075. - PyObject *resultobj = 0;
  79076. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79077. - vips::VImage arg2 ;
  79078. - int arg3 ;
  79079. - int arg4 ;
  79080. - int arg5 ;
  79081. - int arg6 ;
  79082. - int arg7 ;
  79083. - int arg8 ;
  79084. - int arg9 ;
  79085. - int arg10 ;
  79086. - int arg11 ;
  79087. - int arg12 ;
  79088. - int arg13 ;
  79089. - int arg14 ;
  79090. - int arg15 ;
  79091. - void *argp1 = 0 ;
  79092. - int res1 = 0 ;
  79093. - void *argp2 ;
  79094. - int res2 = 0 ;
  79095. - int val3 ;
  79096. - int ecode3 = 0 ;
  79097. - int val4 ;
  79098. - int ecode4 = 0 ;
  79099. - int val5 ;
  79100. - int ecode5 = 0 ;
  79101. - int val6 ;
  79102. - int ecode6 = 0 ;
  79103. - int val7 ;
  79104. - int ecode7 = 0 ;
  79105. - int val8 ;
  79106. - int ecode8 = 0 ;
  79107. - int val9 ;
  79108. - int ecode9 = 0 ;
  79109. - int val10 ;
  79110. - int ecode10 = 0 ;
  79111. - int val11 ;
  79112. - int ecode11 = 0 ;
  79113. - int val12 ;
  79114. - int ecode12 = 0 ;
  79115. - int val13 ;
  79116. - int ecode13 = 0 ;
  79117. - int val14 ;
  79118. - int ecode14 = 0 ;
  79119. - int val15 ;
  79120. - int ecode15 = 0 ;
  79121. - PyObject * obj0 = 0 ;
  79122. - PyObject * obj1 = 0 ;
  79123. - PyObject * obj2 = 0 ;
  79124. - PyObject * obj3 = 0 ;
  79125. - PyObject * obj4 = 0 ;
  79126. - PyObject * obj5 = 0 ;
  79127. - PyObject * obj6 = 0 ;
  79128. - PyObject * obj7 = 0 ;
  79129. - PyObject * obj8 = 0 ;
  79130. - PyObject * obj9 = 0 ;
  79131. - PyObject * obj10 = 0 ;
  79132. - PyObject * obj11 = 0 ;
  79133. - PyObject * obj12 = 0 ;
  79134. - PyObject * obj13 = 0 ;
  79135. - PyObject * obj14 = 0 ;
  79136. - vips::VImage result;
  79137. -
  79138. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_lrmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail;
  79139. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79140. - if (!SWIG_IsOK(res1)) {
  79141. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic1" "', argument " "1"" of type '" "vips::VImage *""'");
  79142. - }
  79143. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79144. - {
  79145. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79146. - if (!SWIG_IsOK(res2)) {
  79147. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
  79148. - }
  79149. - if (!argp2) {
  79150. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
  79151. - } else {
  79152. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79153. - arg2 = *temp;
  79154. - if (SWIG_IsNewObj(res2)) delete temp;
  79155. - }
  79156. - }
  79157. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79158. - if (!SWIG_IsOK(ecode3)) {
  79159. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic1" "', argument " "3"" of type '" "int""'");
  79160. - }
  79161. - arg3 = static_cast< int >(val3);
  79162. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79163. - if (!SWIG_IsOK(ecode4)) {
  79164. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic1" "', argument " "4"" of type '" "int""'");
  79165. - }
  79166. - arg4 = static_cast< int >(val4);
  79167. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79168. - if (!SWIG_IsOK(ecode5)) {
  79169. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic1" "', argument " "5"" of type '" "int""'");
  79170. - }
  79171. - arg5 = static_cast< int >(val5);
  79172. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79173. - if (!SWIG_IsOK(ecode6)) {
  79174. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic1" "', argument " "6"" of type '" "int""'");
  79175. - }
  79176. - arg6 = static_cast< int >(val6);
  79177. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79178. - if (!SWIG_IsOK(ecode7)) {
  79179. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic1" "', argument " "7"" of type '" "int""'");
  79180. - }
  79181. - arg7 = static_cast< int >(val7);
  79182. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79183. - if (!SWIG_IsOK(ecode8)) {
  79184. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic1" "', argument " "8"" of type '" "int""'");
  79185. - }
  79186. - arg8 = static_cast< int >(val8);
  79187. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79188. - if (!SWIG_IsOK(ecode9)) {
  79189. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic1" "', argument " "9"" of type '" "int""'");
  79190. - }
  79191. - arg9 = static_cast< int >(val9);
  79192. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79193. - if (!SWIG_IsOK(ecode10)) {
  79194. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic1" "', argument " "10"" of type '" "int""'");
  79195. - }
  79196. - arg10 = static_cast< int >(val10);
  79197. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  79198. - if (!SWIG_IsOK(ecode11)) {
  79199. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic1" "', argument " "11"" of type '" "int""'");
  79200. - }
  79201. - arg11 = static_cast< int >(val11);
  79202. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  79203. - if (!SWIG_IsOK(ecode12)) {
  79204. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_lrmosaic1" "', argument " "12"" of type '" "int""'");
  79205. - }
  79206. - arg12 = static_cast< int >(val12);
  79207. - ecode13 = SWIG_AsVal_int(obj12, &val13);
  79208. - if (!SWIG_IsOK(ecode13)) {
  79209. - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_lrmosaic1" "', argument " "13"" of type '" "int""'");
  79210. - }
  79211. - arg13 = static_cast< int >(val13);
  79212. - ecode14 = SWIG_AsVal_int(obj13, &val14);
  79213. - if (!SWIG_IsOK(ecode14)) {
  79214. - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_lrmosaic1" "', argument " "14"" of type '" "int""'");
  79215. - }
  79216. - arg14 = static_cast< int >(val14);
  79217. - ecode15 = SWIG_AsVal_int(obj14, &val15);
  79218. - if (!SWIG_IsOK(ecode15)) {
  79219. - SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_lrmosaic1" "', argument " "15"" of type '" "int""'");
  79220. - }
  79221. - arg15 = static_cast< int >(val15);
  79222. - try {
  79223. - result = (arg1)->lrmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
  79224. - }
  79225. - catch(vips::VError &_e) {
  79226. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79227. - }
  79228. -
  79229. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79230. - return resultobj;
  79231. -fail:
  79232. - return NULL;
  79233. -}
  79234. -
  79235. -
  79236. -SWIGINTERN PyObject *_wrap_VImage_match_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79237. - PyObject *resultobj = 0;
  79238. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79239. - vips::VImage arg2 ;
  79240. - int arg3 ;
  79241. - int arg4 ;
  79242. - int arg5 ;
  79243. - int arg6 ;
  79244. - int arg7 ;
  79245. - int arg8 ;
  79246. - int arg9 ;
  79247. - int arg10 ;
  79248. - void *argp1 = 0 ;
  79249. - int res1 = 0 ;
  79250. - void *argp2 ;
  79251. - int res2 = 0 ;
  79252. - int val3 ;
  79253. - int ecode3 = 0 ;
  79254. - int val4 ;
  79255. - int ecode4 = 0 ;
  79256. - int val5 ;
  79257. - int ecode5 = 0 ;
  79258. - int val6 ;
  79259. - int ecode6 = 0 ;
  79260. - int val7 ;
  79261. - int ecode7 = 0 ;
  79262. - int val8 ;
  79263. - int ecode8 = 0 ;
  79264. - int val9 ;
  79265. - int ecode9 = 0 ;
  79266. - int val10 ;
  79267. - int ecode10 = 0 ;
  79268. - PyObject * obj0 = 0 ;
  79269. - PyObject * obj1 = 0 ;
  79270. - PyObject * obj2 = 0 ;
  79271. - PyObject * obj3 = 0 ;
  79272. - PyObject * obj4 = 0 ;
  79273. - PyObject * obj5 = 0 ;
  79274. - PyObject * obj6 = 0 ;
  79275. - PyObject * obj7 = 0 ;
  79276. - PyObject * obj8 = 0 ;
  79277. - PyObject * obj9 = 0 ;
  79278. - vips::VImage result;
  79279. -
  79280. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_match_linear",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
  79281. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79282. - if (!SWIG_IsOK(res1)) {
  79283. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear" "', argument " "1"" of type '" "vips::VImage *""'");
  79284. - }
  79285. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79286. - {
  79287. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79288. - if (!SWIG_IsOK(res2)) {
  79289. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'");
  79290. - }
  79291. - if (!argp2) {
  79292. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'");
  79293. - } else {
  79294. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79295. - arg2 = *temp;
  79296. - if (SWIG_IsNewObj(res2)) delete temp;
  79297. - }
  79298. - }
  79299. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79300. - if (!SWIG_IsOK(ecode3)) {
  79301. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear" "', argument " "3"" of type '" "int""'");
  79302. - }
  79303. - arg3 = static_cast< int >(val3);
  79304. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79305. - if (!SWIG_IsOK(ecode4)) {
  79306. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear" "', argument " "4"" of type '" "int""'");
  79307. - }
  79308. - arg4 = static_cast< int >(val4);
  79309. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79310. - if (!SWIG_IsOK(ecode5)) {
  79311. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear" "', argument " "5"" of type '" "int""'");
  79312. - }
  79313. - arg5 = static_cast< int >(val5);
  79314. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79315. - if (!SWIG_IsOK(ecode6)) {
  79316. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear" "', argument " "6"" of type '" "int""'");
  79317. - }
  79318. - arg6 = static_cast< int >(val6);
  79319. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79320. - if (!SWIG_IsOK(ecode7)) {
  79321. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear" "', argument " "7"" of type '" "int""'");
  79322. - }
  79323. - arg7 = static_cast< int >(val7);
  79324. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79325. - if (!SWIG_IsOK(ecode8)) {
  79326. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear" "', argument " "8"" of type '" "int""'");
  79327. - }
  79328. - arg8 = static_cast< int >(val8);
  79329. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79330. - if (!SWIG_IsOK(ecode9)) {
  79331. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear" "', argument " "9"" of type '" "int""'");
  79332. - }
  79333. - arg9 = static_cast< int >(val9);
  79334. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79335. - if (!SWIG_IsOK(ecode10)) {
  79336. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear" "', argument " "10"" of type '" "int""'");
  79337. - }
  79338. - arg10 = static_cast< int >(val10);
  79339. - try {
  79340. - result = (arg1)->match_linear(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
  79341. - }
  79342. - catch(vips::VError &_e) {
  79343. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79344. - }
  79345. -
  79346. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79347. - return resultobj;
  79348. -fail:
  79349. - return NULL;
  79350. -}
  79351. -
  79352. -
  79353. -SWIGINTERN PyObject *_wrap_VImage_match_linear_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79354. - PyObject *resultobj = 0;
  79355. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79356. - vips::VImage arg2 ;
  79357. - int arg3 ;
  79358. - int arg4 ;
  79359. - int arg5 ;
  79360. - int arg6 ;
  79361. - int arg7 ;
  79362. - int arg8 ;
  79363. - int arg9 ;
  79364. - int arg10 ;
  79365. - int arg11 ;
  79366. - int arg12 ;
  79367. - void *argp1 = 0 ;
  79368. - int res1 = 0 ;
  79369. - void *argp2 ;
  79370. - int res2 = 0 ;
  79371. - int val3 ;
  79372. - int ecode3 = 0 ;
  79373. - int val4 ;
  79374. - int ecode4 = 0 ;
  79375. - int val5 ;
  79376. - int ecode5 = 0 ;
  79377. - int val6 ;
  79378. - int ecode6 = 0 ;
  79379. - int val7 ;
  79380. - int ecode7 = 0 ;
  79381. - int val8 ;
  79382. - int ecode8 = 0 ;
  79383. - int val9 ;
  79384. - int ecode9 = 0 ;
  79385. - int val10 ;
  79386. - int ecode10 = 0 ;
  79387. - int val11 ;
  79388. - int ecode11 = 0 ;
  79389. - int val12 ;
  79390. - int ecode12 = 0 ;
  79391. - PyObject * obj0 = 0 ;
  79392. - PyObject * obj1 = 0 ;
  79393. - PyObject * obj2 = 0 ;
  79394. - PyObject * obj3 = 0 ;
  79395. - PyObject * obj4 = 0 ;
  79396. - PyObject * obj5 = 0 ;
  79397. - PyObject * obj6 = 0 ;
  79398. - PyObject * obj7 = 0 ;
  79399. - PyObject * obj8 = 0 ;
  79400. - PyObject * obj9 = 0 ;
  79401. - PyObject * obj10 = 0 ;
  79402. - PyObject * obj11 = 0 ;
  79403. - vips::VImage result;
  79404. -
  79405. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_match_linear_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
  79406. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79407. - if (!SWIG_IsOK(res1)) {
  79408. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear_search" "', argument " "1"" of type '" "vips::VImage *""'");
  79409. - }
  79410. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79411. - {
  79412. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79413. - if (!SWIG_IsOK(res2)) {
  79414. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'");
  79415. - }
  79416. - if (!argp2) {
  79417. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'");
  79418. - } else {
  79419. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79420. - arg2 = *temp;
  79421. - if (SWIG_IsNewObj(res2)) delete temp;
  79422. - }
  79423. - }
  79424. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79425. - if (!SWIG_IsOK(ecode3)) {
  79426. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear_search" "', argument " "3"" of type '" "int""'");
  79427. - }
  79428. - arg3 = static_cast< int >(val3);
  79429. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79430. - if (!SWIG_IsOK(ecode4)) {
  79431. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear_search" "', argument " "4"" of type '" "int""'");
  79432. - }
  79433. - arg4 = static_cast< int >(val4);
  79434. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79435. - if (!SWIG_IsOK(ecode5)) {
  79436. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear_search" "', argument " "5"" of type '" "int""'");
  79437. - }
  79438. - arg5 = static_cast< int >(val5);
  79439. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79440. - if (!SWIG_IsOK(ecode6)) {
  79441. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear_search" "', argument " "6"" of type '" "int""'");
  79442. - }
  79443. - arg6 = static_cast< int >(val6);
  79444. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79445. - if (!SWIG_IsOK(ecode7)) {
  79446. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear_search" "', argument " "7"" of type '" "int""'");
  79447. - }
  79448. - arg7 = static_cast< int >(val7);
  79449. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79450. - if (!SWIG_IsOK(ecode8)) {
  79451. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear_search" "', argument " "8"" of type '" "int""'");
  79452. - }
  79453. - arg8 = static_cast< int >(val8);
  79454. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79455. - if (!SWIG_IsOK(ecode9)) {
  79456. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear_search" "', argument " "9"" of type '" "int""'");
  79457. - }
  79458. - arg9 = static_cast< int >(val9);
  79459. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79460. - if (!SWIG_IsOK(ecode10)) {
  79461. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear_search" "', argument " "10"" of type '" "int""'");
  79462. - }
  79463. - arg10 = static_cast< int >(val10);
  79464. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  79465. - if (!SWIG_IsOK(ecode11)) {
  79466. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_match_linear_search" "', argument " "11"" of type '" "int""'");
  79467. - }
  79468. - arg11 = static_cast< int >(val11);
  79469. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  79470. - if (!SWIG_IsOK(ecode12)) {
  79471. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_match_linear_search" "', argument " "12"" of type '" "int""'");
  79472. - }
  79473. - arg12 = static_cast< int >(val12);
  79474. - try {
  79475. - result = (arg1)->match_linear_search(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
  79476. - }
  79477. - catch(vips::VError &_e) {
  79478. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79479. - }
  79480. -
  79481. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79482. - return resultobj;
  79483. -fail:
  79484. - return NULL;
  79485. -}
  79486. -
  79487. -
  79488. -SWIGINTERN PyObject *_wrap_VImage_maxpos_subpel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79489. - PyObject *resultobj = 0;
  79490. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79491. - double *arg2 = 0 ;
  79492. - void *argp1 = 0 ;
  79493. - int res1 = 0 ;
  79494. - double temp2 ;
  79495. - int res2 = SWIG_TMPOBJ ;
  79496. - PyObject * obj0 = 0 ;
  79497. - double result;
  79498. -
  79499. - arg2 = &temp2;
  79500. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_subpel",&obj0)) SWIG_fail;
  79501. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79502. - if (!SWIG_IsOK(res1)) {
  79503. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_subpel" "', argument " "1"" of type '" "vips::VImage *""'");
  79504. - }
  79505. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79506. - try {
  79507. - result = (double)(arg1)->maxpos_subpel(*arg2);
  79508. - }
  79509. - catch(vips::VError &_e) {
  79510. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79511. - }
  79512. -
  79513. - resultobj = SWIG_From_double(static_cast< double >(result));
  79514. - if (SWIG_IsTmpObj(res2)) {
  79515. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  79516. - } else {
  79517. - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
  79518. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  79519. - }
  79520. - return resultobj;
  79521. -fail:
  79522. - return NULL;
  79523. -}
  79524. -
  79525. -
  79526. -SWIGINTERN PyObject *_wrap_VImage_remosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79527. - PyObject *resultobj = 0;
  79528. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79529. - char *arg2 = (char *) 0 ;
  79530. - char *arg3 = (char *) 0 ;
  79531. - void *argp1 = 0 ;
  79532. - int res1 = 0 ;
  79533. - int res2 ;
  79534. - char *buf2 = 0 ;
  79535. - int alloc2 = 0 ;
  79536. - int res3 ;
  79537. - char *buf3 = 0 ;
  79538. - int alloc3 = 0 ;
  79539. - PyObject * obj0 = 0 ;
  79540. - PyObject * obj1 = 0 ;
  79541. - PyObject * obj2 = 0 ;
  79542. - vips::VImage result;
  79543. -
  79544. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_remosaic",&obj0,&obj1,&obj2)) SWIG_fail;
  79545. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79546. - if (!SWIG_IsOK(res1)) {
  79547. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remosaic" "', argument " "1"" of type '" "vips::VImage *""'");
  79548. - }
  79549. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79550. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  79551. - if (!SWIG_IsOK(res2)) {
  79552. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remosaic" "', argument " "2"" of type '" "char *""'");
  79553. - }
  79554. - arg2 = reinterpret_cast< char * >(buf2);
  79555. - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  79556. - if (!SWIG_IsOK(res3)) {
  79557. - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_remosaic" "', argument " "3"" of type '" "char *""'");
  79558. - }
  79559. - arg3 = reinterpret_cast< char * >(buf3);
  79560. - try {
  79561. - result = (arg1)->remosaic(arg2,arg3);
  79562. - }
  79563. - catch(vips::VError &_e) {
  79564. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79565. - }
  79566. -
  79567. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79568. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  79569. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  79570. - return resultobj;
  79571. -fail:
  79572. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  79573. - if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  79574. - return NULL;
  79575. -}
  79576. -
  79577. -
  79578. -SWIGINTERN PyObject *_wrap_VImage_tbmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79579. - PyObject *resultobj = 0;
  79580. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79581. - vips::VImage arg2 ;
  79582. - int arg3 ;
  79583. - int arg4 ;
  79584. - int arg5 ;
  79585. - void *argp1 = 0 ;
  79586. - int res1 = 0 ;
  79587. - void *argp2 ;
  79588. - int res2 = 0 ;
  79589. - int val3 ;
  79590. - int ecode3 = 0 ;
  79591. - int val4 ;
  79592. - int ecode4 = 0 ;
  79593. - int val5 ;
  79594. - int ecode5 = 0 ;
  79595. - PyObject * obj0 = 0 ;
  79596. - PyObject * obj1 = 0 ;
  79597. - PyObject * obj2 = 0 ;
  79598. - PyObject * obj3 = 0 ;
  79599. - PyObject * obj4 = 0 ;
  79600. - vips::VImage result;
  79601. -
  79602. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_tbmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  79603. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79604. - if (!SWIG_IsOK(res1)) {
  79605. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge" "', argument " "1"" of type '" "vips::VImage *""'");
  79606. - }
  79607. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79608. - {
  79609. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79610. - if (!SWIG_IsOK(res2)) {
  79611. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'");
  79612. - }
  79613. - if (!argp2) {
  79614. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'");
  79615. - } else {
  79616. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79617. - arg2 = *temp;
  79618. - if (SWIG_IsNewObj(res2)) delete temp;
  79619. - }
  79620. - }
  79621. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79622. - if (!SWIG_IsOK(ecode3)) {
  79623. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge" "', argument " "3"" of type '" "int""'");
  79624. - }
  79625. - arg3 = static_cast< int >(val3);
  79626. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79627. - if (!SWIG_IsOK(ecode4)) {
  79628. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge" "', argument " "4"" of type '" "int""'");
  79629. - }
  79630. - arg4 = static_cast< int >(val4);
  79631. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79632. - if (!SWIG_IsOK(ecode5)) {
  79633. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge" "', argument " "5"" of type '" "int""'");
  79634. - }
  79635. - arg5 = static_cast< int >(val5);
  79636. - try {
  79637. - result = (arg1)->tbmerge(arg2,arg3,arg4,arg5);
  79638. - }
  79639. - catch(vips::VError &_e) {
  79640. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79641. - }
  79642. -
  79643. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79644. - return resultobj;
  79645. -fail:
  79646. - return NULL;
  79647. -}
  79648. -
  79649. -
  79650. -SWIGINTERN PyObject *_wrap_VImage_tbmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79651. - PyObject *resultobj = 0;
  79652. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79653. - vips::VImage arg2 ;
  79654. - int arg3 ;
  79655. - int arg4 ;
  79656. - int arg5 ;
  79657. - int arg6 ;
  79658. - int arg7 ;
  79659. - int arg8 ;
  79660. - int arg9 ;
  79661. - int arg10 ;
  79662. - int arg11 ;
  79663. - void *argp1 = 0 ;
  79664. - int res1 = 0 ;
  79665. - void *argp2 ;
  79666. - int res2 = 0 ;
  79667. - int val3 ;
  79668. - int ecode3 = 0 ;
  79669. - int val4 ;
  79670. - int ecode4 = 0 ;
  79671. - int val5 ;
  79672. - int ecode5 = 0 ;
  79673. - int val6 ;
  79674. - int ecode6 = 0 ;
  79675. - int val7 ;
  79676. - int ecode7 = 0 ;
  79677. - int val8 ;
  79678. - int ecode8 = 0 ;
  79679. - int val9 ;
  79680. - int ecode9 = 0 ;
  79681. - int val10 ;
  79682. - int ecode10 = 0 ;
  79683. - int val11 ;
  79684. - int ecode11 = 0 ;
  79685. - PyObject * obj0 = 0 ;
  79686. - PyObject * obj1 = 0 ;
  79687. - PyObject * obj2 = 0 ;
  79688. - PyObject * obj3 = 0 ;
  79689. - PyObject * obj4 = 0 ;
  79690. - PyObject * obj5 = 0 ;
  79691. - PyObject * obj6 = 0 ;
  79692. - PyObject * obj7 = 0 ;
  79693. - PyObject * obj8 = 0 ;
  79694. - PyObject * obj9 = 0 ;
  79695. - PyObject * obj10 = 0 ;
  79696. - vips::VImage result;
  79697. -
  79698. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  79699. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79700. - if (!SWIG_IsOK(res1)) {
  79701. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge1" "', argument " "1"" of type '" "vips::VImage *""'");
  79702. - }
  79703. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79704. - {
  79705. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79706. - if (!SWIG_IsOK(res2)) {
  79707. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'");
  79708. - }
  79709. - if (!argp2) {
  79710. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'");
  79711. - } else {
  79712. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79713. - arg2 = *temp;
  79714. - if (SWIG_IsNewObj(res2)) delete temp;
  79715. - }
  79716. - }
  79717. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79718. - if (!SWIG_IsOK(ecode3)) {
  79719. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge1" "', argument " "3"" of type '" "int""'");
  79720. - }
  79721. - arg3 = static_cast< int >(val3);
  79722. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79723. - if (!SWIG_IsOK(ecode4)) {
  79724. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge1" "', argument " "4"" of type '" "int""'");
  79725. - }
  79726. - arg4 = static_cast< int >(val4);
  79727. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79728. - if (!SWIG_IsOK(ecode5)) {
  79729. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge1" "', argument " "5"" of type '" "int""'");
  79730. - }
  79731. - arg5 = static_cast< int >(val5);
  79732. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79733. - if (!SWIG_IsOK(ecode6)) {
  79734. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmerge1" "', argument " "6"" of type '" "int""'");
  79735. - }
  79736. - arg6 = static_cast< int >(val6);
  79737. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79738. - if (!SWIG_IsOK(ecode7)) {
  79739. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmerge1" "', argument " "7"" of type '" "int""'");
  79740. - }
  79741. - arg7 = static_cast< int >(val7);
  79742. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79743. - if (!SWIG_IsOK(ecode8)) {
  79744. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmerge1" "', argument " "8"" of type '" "int""'");
  79745. - }
  79746. - arg8 = static_cast< int >(val8);
  79747. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79748. - if (!SWIG_IsOK(ecode9)) {
  79749. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmerge1" "', argument " "9"" of type '" "int""'");
  79750. - }
  79751. - arg9 = static_cast< int >(val9);
  79752. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79753. - if (!SWIG_IsOK(ecode10)) {
  79754. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmerge1" "', argument " "10"" of type '" "int""'");
  79755. - }
  79756. - arg10 = static_cast< int >(val10);
  79757. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  79758. - if (!SWIG_IsOK(ecode11)) {
  79759. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmerge1" "', argument " "11"" of type '" "int""'");
  79760. - }
  79761. - arg11 = static_cast< int >(val11);
  79762. - try {
  79763. - result = (arg1)->tbmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  79764. - }
  79765. - catch(vips::VError &_e) {
  79766. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79767. - }
  79768. -
  79769. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79770. - return resultobj;
  79771. -fail:
  79772. - return NULL;
  79773. -}
  79774. -
  79775. -
  79776. -SWIGINTERN PyObject *_wrap_VImage_tbmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79777. - PyObject *resultobj = 0;
  79778. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79779. - vips::VImage arg2 ;
  79780. - int arg3 ;
  79781. - int arg4 ;
  79782. - int arg5 ;
  79783. - int arg6 ;
  79784. - int arg7 ;
  79785. - int arg8 ;
  79786. - int arg9 ;
  79787. - int arg10 ;
  79788. - int arg11 ;
  79789. - void *argp1 = 0 ;
  79790. - int res1 = 0 ;
  79791. - void *argp2 ;
  79792. - int res2 = 0 ;
  79793. - int val3 ;
  79794. - int ecode3 = 0 ;
  79795. - int val4 ;
  79796. - int ecode4 = 0 ;
  79797. - int val5 ;
  79798. - int ecode5 = 0 ;
  79799. - int val6 ;
  79800. - int ecode6 = 0 ;
  79801. - int val7 ;
  79802. - int ecode7 = 0 ;
  79803. - int val8 ;
  79804. - int ecode8 = 0 ;
  79805. - int val9 ;
  79806. - int ecode9 = 0 ;
  79807. - int val10 ;
  79808. - int ecode10 = 0 ;
  79809. - int val11 ;
  79810. - int ecode11 = 0 ;
  79811. - PyObject * obj0 = 0 ;
  79812. - PyObject * obj1 = 0 ;
  79813. - PyObject * obj2 = 0 ;
  79814. - PyObject * obj3 = 0 ;
  79815. - PyObject * obj4 = 0 ;
  79816. - PyObject * obj5 = 0 ;
  79817. - PyObject * obj6 = 0 ;
  79818. - PyObject * obj7 = 0 ;
  79819. - PyObject * obj8 = 0 ;
  79820. - PyObject * obj9 = 0 ;
  79821. - PyObject * obj10 = 0 ;
  79822. - vips::VImage result;
  79823. -
  79824. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  79825. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79826. - if (!SWIG_IsOK(res1)) {
  79827. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic" "', argument " "1"" of type '" "vips::VImage *""'");
  79828. - }
  79829. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79830. - {
  79831. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79832. - if (!SWIG_IsOK(res2)) {
  79833. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'");
  79834. - }
  79835. - if (!argp2) {
  79836. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'");
  79837. - } else {
  79838. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79839. - arg2 = *temp;
  79840. - if (SWIG_IsNewObj(res2)) delete temp;
  79841. - }
  79842. - }
  79843. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79844. - if (!SWIG_IsOK(ecode3)) {
  79845. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic" "', argument " "3"" of type '" "int""'");
  79846. - }
  79847. - arg3 = static_cast< int >(val3);
  79848. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79849. - if (!SWIG_IsOK(ecode4)) {
  79850. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic" "', argument " "4"" of type '" "int""'");
  79851. - }
  79852. - arg4 = static_cast< int >(val4);
  79853. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79854. - if (!SWIG_IsOK(ecode5)) {
  79855. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic" "', argument " "5"" of type '" "int""'");
  79856. - }
  79857. - arg5 = static_cast< int >(val5);
  79858. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  79859. - if (!SWIG_IsOK(ecode6)) {
  79860. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic" "', argument " "6"" of type '" "int""'");
  79861. - }
  79862. - arg6 = static_cast< int >(val6);
  79863. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  79864. - if (!SWIG_IsOK(ecode7)) {
  79865. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic" "', argument " "7"" of type '" "int""'");
  79866. - }
  79867. - arg7 = static_cast< int >(val7);
  79868. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  79869. - if (!SWIG_IsOK(ecode8)) {
  79870. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic" "', argument " "8"" of type '" "int""'");
  79871. - }
  79872. - arg8 = static_cast< int >(val8);
  79873. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  79874. - if (!SWIG_IsOK(ecode9)) {
  79875. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic" "', argument " "9"" of type '" "int""'");
  79876. - }
  79877. - arg9 = static_cast< int >(val9);
  79878. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  79879. - if (!SWIG_IsOK(ecode10)) {
  79880. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic" "', argument " "10"" of type '" "int""'");
  79881. - }
  79882. - arg10 = static_cast< int >(val10);
  79883. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  79884. - if (!SWIG_IsOK(ecode11)) {
  79885. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic" "', argument " "11"" of type '" "int""'");
  79886. - }
  79887. - arg11 = static_cast< int >(val11);
  79888. - try {
  79889. - result = (arg1)->tbmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  79890. - }
  79891. - catch(vips::VError &_e) {
  79892. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  79893. - }
  79894. -
  79895. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  79896. - return resultobj;
  79897. -fail:
  79898. - return NULL;
  79899. -}
  79900. -
  79901. -
  79902. -SWIGINTERN PyObject *_wrap_VImage_tbmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  79903. - PyObject *resultobj = 0;
  79904. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  79905. - vips::VImage arg2 ;
  79906. - int arg3 ;
  79907. - int arg4 ;
  79908. - int arg5 ;
  79909. - int arg6 ;
  79910. - int arg7 ;
  79911. - int arg8 ;
  79912. - int arg9 ;
  79913. - int arg10 ;
  79914. - int arg11 ;
  79915. - int arg12 ;
  79916. - int arg13 ;
  79917. - int arg14 ;
  79918. - int arg15 ;
  79919. - void *argp1 = 0 ;
  79920. - int res1 = 0 ;
  79921. - void *argp2 ;
  79922. - int res2 = 0 ;
  79923. - int val3 ;
  79924. - int ecode3 = 0 ;
  79925. - int val4 ;
  79926. - int ecode4 = 0 ;
  79927. - int val5 ;
  79928. - int ecode5 = 0 ;
  79929. - int val6 ;
  79930. - int ecode6 = 0 ;
  79931. - int val7 ;
  79932. - int ecode7 = 0 ;
  79933. - int val8 ;
  79934. - int ecode8 = 0 ;
  79935. - int val9 ;
  79936. - int ecode9 = 0 ;
  79937. - int val10 ;
  79938. - int ecode10 = 0 ;
  79939. - int val11 ;
  79940. - int ecode11 = 0 ;
  79941. - int val12 ;
  79942. - int ecode12 = 0 ;
  79943. - int val13 ;
  79944. - int ecode13 = 0 ;
  79945. - int val14 ;
  79946. - int ecode14 = 0 ;
  79947. - int val15 ;
  79948. - int ecode15 = 0 ;
  79949. - PyObject * obj0 = 0 ;
  79950. - PyObject * obj1 = 0 ;
  79951. - PyObject * obj2 = 0 ;
  79952. - PyObject * obj3 = 0 ;
  79953. - PyObject * obj4 = 0 ;
  79954. - PyObject * obj5 = 0 ;
  79955. - PyObject * obj6 = 0 ;
  79956. - PyObject * obj7 = 0 ;
  79957. - PyObject * obj8 = 0 ;
  79958. - PyObject * obj9 = 0 ;
  79959. - PyObject * obj10 = 0 ;
  79960. - PyObject * obj11 = 0 ;
  79961. - PyObject * obj12 = 0 ;
  79962. - PyObject * obj13 = 0 ;
  79963. - PyObject * obj14 = 0 ;
  79964. - vips::VImage result;
  79965. -
  79966. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_tbmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail;
  79967. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  79968. - if (!SWIG_IsOK(res1)) {
  79969. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic1" "', argument " "1"" of type '" "vips::VImage *""'");
  79970. - }
  79971. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  79972. - {
  79973. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0);
  79974. - if (!SWIG_IsOK(res2)) {
  79975. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
  79976. - }
  79977. - if (!argp2) {
  79978. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'");
  79979. - } else {
  79980. - vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2);
  79981. - arg2 = *temp;
  79982. - if (SWIG_IsNewObj(res2)) delete temp;
  79983. - }
  79984. - }
  79985. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  79986. - if (!SWIG_IsOK(ecode3)) {
  79987. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic1" "', argument " "3"" of type '" "int""'");
  79988. - }
  79989. - arg3 = static_cast< int >(val3);
  79990. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  79991. - if (!SWIG_IsOK(ecode4)) {
  79992. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic1" "', argument " "4"" of type '" "int""'");
  79993. - }
  79994. - arg4 = static_cast< int >(val4);
  79995. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  79996. - if (!SWIG_IsOK(ecode5)) {
  79997. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic1" "', argument " "5"" of type '" "int""'");
  79998. - }
  79999. - arg5 = static_cast< int >(val5);
  80000. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  80001. - if (!SWIG_IsOK(ecode6)) {
  80002. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic1" "', argument " "6"" of type '" "int""'");
  80003. - }
  80004. - arg6 = static_cast< int >(val6);
  80005. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  80006. - if (!SWIG_IsOK(ecode7)) {
  80007. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic1" "', argument " "7"" of type '" "int""'");
  80008. - }
  80009. - arg7 = static_cast< int >(val7);
  80010. - ecode8 = SWIG_AsVal_int(obj7, &val8);
  80011. - if (!SWIG_IsOK(ecode8)) {
  80012. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic1" "', argument " "8"" of type '" "int""'");
  80013. - }
  80014. - arg8 = static_cast< int >(val8);
  80015. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  80016. - if (!SWIG_IsOK(ecode9)) {
  80017. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic1" "', argument " "9"" of type '" "int""'");
  80018. - }
  80019. - arg9 = static_cast< int >(val9);
  80020. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  80021. - if (!SWIG_IsOK(ecode10)) {
  80022. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic1" "', argument " "10"" of type '" "int""'");
  80023. - }
  80024. - arg10 = static_cast< int >(val10);
  80025. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  80026. - if (!SWIG_IsOK(ecode11)) {
  80027. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic1" "', argument " "11"" of type '" "int""'");
  80028. - }
  80029. - arg11 = static_cast< int >(val11);
  80030. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  80031. - if (!SWIG_IsOK(ecode12)) {
  80032. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_tbmosaic1" "', argument " "12"" of type '" "int""'");
  80033. - }
  80034. - arg12 = static_cast< int >(val12);
  80035. - ecode13 = SWIG_AsVal_int(obj12, &val13);
  80036. - if (!SWIG_IsOK(ecode13)) {
  80037. - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_tbmosaic1" "', argument " "13"" of type '" "int""'");
  80038. - }
  80039. - arg13 = static_cast< int >(val13);
  80040. - ecode14 = SWIG_AsVal_int(obj13, &val14);
  80041. - if (!SWIG_IsOK(ecode14)) {
  80042. - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_tbmosaic1" "', argument " "14"" of type '" "int""'");
  80043. - }
  80044. - arg14 = static_cast< int >(val14);
  80045. - ecode15 = SWIG_AsVal_int(obj14, &val15);
  80046. - if (!SWIG_IsOK(ecode15)) {
  80047. - SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_tbmosaic1" "', argument " "15"" of type '" "int""'");
  80048. - }
  80049. - arg15 = static_cast< int >(val15);
  80050. - try {
  80051. - result = (arg1)->tbmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
  80052. - }
  80053. - catch(vips::VError &_e) {
  80054. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80055. - }
  80056. -
  80057. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80058. - return resultobj;
  80059. -fail:
  80060. - return NULL;
  80061. -}
  80062. -
  80063. -
  80064. -SWIGINTERN PyObject *_wrap_VImage_benchmark(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80065. - PyObject *resultobj = 0;
  80066. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80067. - void *argp1 = 0 ;
  80068. - int res1 = 0 ;
  80069. - PyObject * obj0 = 0 ;
  80070. - vips::VImage result;
  80071. -
  80072. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark",&obj0)) SWIG_fail;
  80073. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80074. - if (!SWIG_IsOK(res1)) {
  80075. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark" "', argument " "1"" of type '" "vips::VImage *""'");
  80076. - }
  80077. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80078. - try {
  80079. - result = (arg1)->benchmark();
  80080. - }
  80081. - catch(vips::VError &_e) {
  80082. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80083. - }
  80084. -
  80085. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80086. - return resultobj;
  80087. -fail:
  80088. - return NULL;
  80089. -}
  80090. -
  80091. -
  80092. -SWIGINTERN PyObject *_wrap_VImage_benchmark2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80093. - PyObject *resultobj = 0;
  80094. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80095. - void *argp1 = 0 ;
  80096. - int res1 = 0 ;
  80097. - PyObject * obj0 = 0 ;
  80098. - double result;
  80099. -
  80100. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark2",&obj0)) SWIG_fail;
  80101. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80102. - if (!SWIG_IsOK(res1)) {
  80103. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark2" "', argument " "1"" of type '" "vips::VImage *""'");
  80104. - }
  80105. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80106. - try {
  80107. - result = (double)(arg1)->benchmark2();
  80108. - }
  80109. - catch(vips::VError &_e) {
  80110. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80111. - }
  80112. -
  80113. - resultobj = SWIG_From_double(static_cast< double >(result));
  80114. - return resultobj;
  80115. -fail:
  80116. - return NULL;
  80117. -}
  80118. -
  80119. -
  80120. -SWIGINTERN PyObject *_wrap_VImage_benchmarkn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80121. - PyObject *resultobj = 0;
  80122. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80123. - int arg2 ;
  80124. - void *argp1 = 0 ;
  80125. - int res1 = 0 ;
  80126. - int val2 ;
  80127. - int ecode2 = 0 ;
  80128. - PyObject * obj0 = 0 ;
  80129. - PyObject * obj1 = 0 ;
  80130. - vips::VImage result;
  80131. -
  80132. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_benchmarkn",&obj0,&obj1)) SWIG_fail;
  80133. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80134. - if (!SWIG_IsOK(res1)) {
  80135. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmarkn" "', argument " "1"" of type '" "vips::VImage *""'");
  80136. - }
  80137. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80138. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80139. - if (!SWIG_IsOK(ecode2)) {
  80140. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_benchmarkn" "', argument " "2"" of type '" "int""'");
  80141. - }
  80142. - arg2 = static_cast< int >(val2);
  80143. - try {
  80144. - result = (arg1)->benchmarkn(arg2);
  80145. - }
  80146. - catch(vips::VError &_e) {
  80147. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80148. - }
  80149. -
  80150. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80151. - return resultobj;
  80152. -fail:
  80153. - return NULL;
  80154. -}
  80155. -
  80156. -
  80157. -SWIGINTERN PyObject *_wrap_VImage_eye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80158. - PyObject *resultobj = 0;
  80159. - int arg1 ;
  80160. - int arg2 ;
  80161. - double arg3 ;
  80162. - int val1 ;
  80163. - int ecode1 = 0 ;
  80164. - int val2 ;
  80165. - int ecode2 = 0 ;
  80166. - double val3 ;
  80167. - int ecode3 = 0 ;
  80168. - PyObject * obj0 = 0 ;
  80169. - PyObject * obj1 = 0 ;
  80170. - PyObject * obj2 = 0 ;
  80171. - vips::VImage result;
  80172. -
  80173. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_eye",&obj0,&obj1,&obj2)) SWIG_fail;
  80174. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80175. - if (!SWIG_IsOK(ecode1)) {
  80176. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_eye" "', argument " "1"" of type '" "int""'");
  80177. - }
  80178. - arg1 = static_cast< int >(val1);
  80179. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80180. - if (!SWIG_IsOK(ecode2)) {
  80181. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eye" "', argument " "2"" of type '" "int""'");
  80182. - }
  80183. - arg2 = static_cast< int >(val2);
  80184. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80185. - if (!SWIG_IsOK(ecode3)) {
  80186. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_eye" "', argument " "3"" of type '" "double""'");
  80187. - }
  80188. - arg3 = static_cast< double >(val3);
  80189. - try {
  80190. - result = vips::VImage::eye(arg1,arg2,arg3);
  80191. - }
  80192. - catch(vips::VError &_e) {
  80193. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80194. - }
  80195. -
  80196. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80197. - return resultobj;
  80198. -fail:
  80199. - return NULL;
  80200. -}
  80201. -
  80202. -
  80203. -SWIGINTERN PyObject *_wrap_VImage_grey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80204. - PyObject *resultobj = 0;
  80205. - int arg1 ;
  80206. - int arg2 ;
  80207. - int val1 ;
  80208. - int ecode1 = 0 ;
  80209. - int val2 ;
  80210. - int ecode2 = 0 ;
  80211. - PyObject * obj0 = 0 ;
  80212. - PyObject * obj1 = 0 ;
  80213. - vips::VImage result;
  80214. -
  80215. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_grey",&obj0,&obj1)) SWIG_fail;
  80216. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80217. - if (!SWIG_IsOK(ecode1)) {
  80218. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_grey" "', argument " "1"" of type '" "int""'");
  80219. - }
  80220. - arg1 = static_cast< int >(val1);
  80221. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80222. - if (!SWIG_IsOK(ecode2)) {
  80223. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grey" "', argument " "2"" of type '" "int""'");
  80224. - }
  80225. - arg2 = static_cast< int >(val2);
  80226. - try {
  80227. - result = vips::VImage::grey(arg1,arg2);
  80228. - }
  80229. - catch(vips::VError &_e) {
  80230. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80231. - }
  80232. -
  80233. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80234. - return resultobj;
  80235. -fail:
  80236. - return NULL;
  80237. -}
  80238. -
  80239. -
  80240. -SWIGINTERN PyObject *_wrap_VImage_feye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80241. - PyObject *resultobj = 0;
  80242. - int arg1 ;
  80243. - int arg2 ;
  80244. - double arg3 ;
  80245. - int val1 ;
  80246. - int ecode1 = 0 ;
  80247. - int val2 ;
  80248. - int ecode2 = 0 ;
  80249. - double val3 ;
  80250. - int ecode3 = 0 ;
  80251. - PyObject * obj0 = 0 ;
  80252. - PyObject * obj1 = 0 ;
  80253. - PyObject * obj2 = 0 ;
  80254. - vips::VImage result;
  80255. -
  80256. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_feye",&obj0,&obj1,&obj2)) SWIG_fail;
  80257. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80258. - if (!SWIG_IsOK(ecode1)) {
  80259. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_feye" "', argument " "1"" of type '" "int""'");
  80260. - }
  80261. - arg1 = static_cast< int >(val1);
  80262. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80263. - if (!SWIG_IsOK(ecode2)) {
  80264. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_feye" "', argument " "2"" of type '" "int""'");
  80265. - }
  80266. - arg2 = static_cast< int >(val2);
  80267. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80268. - if (!SWIG_IsOK(ecode3)) {
  80269. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_feye" "', argument " "3"" of type '" "double""'");
  80270. - }
  80271. - arg3 = static_cast< double >(val3);
  80272. - try {
  80273. - result = vips::VImage::feye(arg1,arg2,arg3);
  80274. - }
  80275. - catch(vips::VError &_e) {
  80276. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80277. - }
  80278. -
  80279. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80280. - return resultobj;
  80281. -fail:
  80282. - return NULL;
  80283. -}
  80284. -
  80285. -
  80286. -SWIGINTERN PyObject *_wrap_VImage_fgrey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80287. - PyObject *resultobj = 0;
  80288. - int arg1 ;
  80289. - int arg2 ;
  80290. - int val1 ;
  80291. - int ecode1 = 0 ;
  80292. - int val2 ;
  80293. - int ecode2 = 0 ;
  80294. - PyObject * obj0 = 0 ;
  80295. - PyObject * obj1 = 0 ;
  80296. - vips::VImage result;
  80297. -
  80298. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fgrey",&obj0,&obj1)) SWIG_fail;
  80299. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80300. - if (!SWIG_IsOK(ecode1)) {
  80301. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fgrey" "', argument " "1"" of type '" "int""'");
  80302. - }
  80303. - arg1 = static_cast< int >(val1);
  80304. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80305. - if (!SWIG_IsOK(ecode2)) {
  80306. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fgrey" "', argument " "2"" of type '" "int""'");
  80307. - }
  80308. - arg2 = static_cast< int >(val2);
  80309. - try {
  80310. - result = vips::VImage::fgrey(arg1,arg2);
  80311. - }
  80312. - catch(vips::VError &_e) {
  80313. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80314. - }
  80315. -
  80316. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80317. - return resultobj;
  80318. -fail:
  80319. - return NULL;
  80320. -}
  80321. -
  80322. -
  80323. -SWIGINTERN PyObject *_wrap_VImage_fzone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80324. - PyObject *resultobj = 0;
  80325. - int arg1 ;
  80326. - int val1 ;
  80327. - int ecode1 = 0 ;
  80328. - PyObject * obj0 = 0 ;
  80329. - vips::VImage result;
  80330. -
  80331. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_fzone",&obj0)) SWIG_fail;
  80332. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80333. - if (!SWIG_IsOK(ecode1)) {
  80334. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fzone" "', argument " "1"" of type '" "int""'");
  80335. - }
  80336. - arg1 = static_cast< int >(val1);
  80337. - try {
  80338. - result = vips::VImage::fzone(arg1);
  80339. - }
  80340. - catch(vips::VError &_e) {
  80341. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80342. - }
  80343. -
  80344. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80345. - return resultobj;
  80346. -fail:
  80347. - return NULL;
  80348. -}
  80349. -
  80350. -
  80351. -SWIGINTERN PyObject *_wrap_VImage_make_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80352. - PyObject *resultobj = 0;
  80353. - int arg1 ;
  80354. - int arg2 ;
  80355. - int val1 ;
  80356. - int ecode1 = 0 ;
  80357. - int val2 ;
  80358. - int ecode2 = 0 ;
  80359. - PyObject * obj0 = 0 ;
  80360. - PyObject * obj1 = 0 ;
  80361. - vips::VImage result;
  80362. -
  80363. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_make_xy",&obj0,&obj1)) SWIG_fail;
  80364. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80365. - if (!SWIG_IsOK(ecode1)) {
  80366. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_make_xy" "', argument " "1"" of type '" "int""'");
  80367. - }
  80368. - arg1 = static_cast< int >(val1);
  80369. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80370. - if (!SWIG_IsOK(ecode2)) {
  80371. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_make_xy" "', argument " "2"" of type '" "int""'");
  80372. - }
  80373. - arg2 = static_cast< int >(val2);
  80374. - try {
  80375. - result = vips::VImage::make_xy(arg1,arg2);
  80376. - }
  80377. - catch(vips::VError &_e) {
  80378. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80379. - }
  80380. -
  80381. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80382. - return resultobj;
  80383. -fail:
  80384. - return NULL;
  80385. -}
  80386. -
  80387. -
  80388. -SWIGINTERN PyObject *_wrap_VImage_sines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80389. - PyObject *resultobj = 0;
  80390. - int arg1 ;
  80391. - int arg2 ;
  80392. - double arg3 ;
  80393. - double arg4 ;
  80394. - int val1 ;
  80395. - int ecode1 = 0 ;
  80396. - int val2 ;
  80397. - int ecode2 = 0 ;
  80398. - double val3 ;
  80399. - int ecode3 = 0 ;
  80400. - double val4 ;
  80401. - int ecode4 = 0 ;
  80402. - PyObject * obj0 = 0 ;
  80403. - PyObject * obj1 = 0 ;
  80404. - PyObject * obj2 = 0 ;
  80405. - PyObject * obj3 = 0 ;
  80406. - vips::VImage result;
  80407. -
  80408. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_sines",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  80409. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80410. - if (!SWIG_IsOK(ecode1)) {
  80411. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_sines" "', argument " "1"" of type '" "int""'");
  80412. - }
  80413. - arg1 = static_cast< int >(val1);
  80414. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80415. - if (!SWIG_IsOK(ecode2)) {
  80416. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sines" "', argument " "2"" of type '" "int""'");
  80417. - }
  80418. - arg2 = static_cast< int >(val2);
  80419. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80420. - if (!SWIG_IsOK(ecode3)) {
  80421. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sines" "', argument " "3"" of type '" "double""'");
  80422. - }
  80423. - arg3 = static_cast< double >(val3);
  80424. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  80425. - if (!SWIG_IsOK(ecode4)) {
  80426. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sines" "', argument " "4"" of type '" "double""'");
  80427. - }
  80428. - arg4 = static_cast< double >(val4);
  80429. - try {
  80430. - result = vips::VImage::sines(arg1,arg2,arg3,arg4);
  80431. - }
  80432. - catch(vips::VError &_e) {
  80433. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80434. - }
  80435. -
  80436. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80437. - return resultobj;
  80438. -fail:
  80439. - return NULL;
  80440. -}
  80441. -
  80442. -
  80443. -SWIGINTERN PyObject *_wrap_VImage_zone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80444. - PyObject *resultobj = 0;
  80445. - int arg1 ;
  80446. - int val1 ;
  80447. - int ecode1 = 0 ;
  80448. - PyObject * obj0 = 0 ;
  80449. - vips::VImage result;
  80450. -
  80451. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_zone",&obj0)) SWIG_fail;
  80452. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80453. - if (!SWIG_IsOK(ecode1)) {
  80454. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_zone" "', argument " "1"" of type '" "int""'");
  80455. - }
  80456. - arg1 = static_cast< int >(val1);
  80457. - try {
  80458. - result = vips::VImage::zone(arg1);
  80459. - }
  80460. - catch(vips::VError &_e) {
  80461. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80462. - }
  80463. -
  80464. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80465. - return resultobj;
  80466. -fail:
  80467. - return NULL;
  80468. -}
  80469. -
  80470. -
  80471. -SWIGINTERN PyObject *_wrap_VImage_rightshift_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80472. - PyObject *resultobj = 0;
  80473. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80474. - int arg2 ;
  80475. - int arg3 ;
  80476. - int arg4 ;
  80477. - void *argp1 = 0 ;
  80478. - int res1 = 0 ;
  80479. - int val2 ;
  80480. - int ecode2 = 0 ;
  80481. - int val3 ;
  80482. - int ecode3 = 0 ;
  80483. - int val4 ;
  80484. - int ecode4 = 0 ;
  80485. - PyObject * obj0 = 0 ;
  80486. - PyObject * obj1 = 0 ;
  80487. - PyObject * obj2 = 0 ;
  80488. - PyObject * obj3 = 0 ;
  80489. - vips::VImage result;
  80490. -
  80491. - if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rightshift_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  80492. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80493. - if (!SWIG_IsOK(res1)) {
  80494. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rightshift_size" "', argument " "1"" of type '" "vips::VImage *""'");
  80495. - }
  80496. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80497. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80498. - if (!SWIG_IsOK(ecode2)) {
  80499. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rightshift_size" "', argument " "2"" of type '" "int""'");
  80500. - }
  80501. - arg2 = static_cast< int >(val2);
  80502. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  80503. - if (!SWIG_IsOK(ecode3)) {
  80504. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rightshift_size" "', argument " "3"" of type '" "int""'");
  80505. - }
  80506. - arg3 = static_cast< int >(val3);
  80507. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  80508. - if (!SWIG_IsOK(ecode4)) {
  80509. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rightshift_size" "', argument " "4"" of type '" "int""'");
  80510. - }
  80511. - arg4 = static_cast< int >(val4);
  80512. - try {
  80513. - result = (arg1)->rightshift_size(arg2,arg3,arg4);
  80514. - }
  80515. - catch(vips::VError &_e) {
  80516. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80517. - }
  80518. -
  80519. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80520. - return resultobj;
  80521. -fail:
  80522. - return NULL;
  80523. -}
  80524. -
  80525. -
  80526. -SWIGINTERN PyObject *_wrap_VImage_shrink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80527. - PyObject *resultobj = 0;
  80528. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80529. - double arg2 ;
  80530. - double arg3 ;
  80531. - void *argp1 = 0 ;
  80532. - int res1 = 0 ;
  80533. - double val2 ;
  80534. - int ecode2 = 0 ;
  80535. - double val3 ;
  80536. - int ecode3 = 0 ;
  80537. - PyObject * obj0 = 0 ;
  80538. - PyObject * obj1 = 0 ;
  80539. - PyObject * obj2 = 0 ;
  80540. - vips::VImage result;
  80541. -
  80542. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_shrink",&obj0,&obj1,&obj2)) SWIG_fail;
  80543. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80544. - if (!SWIG_IsOK(res1)) {
  80545. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shrink" "', argument " "1"" of type '" "vips::VImage *""'");
  80546. - }
  80547. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80548. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  80549. - if (!SWIG_IsOK(ecode2)) {
  80550. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shrink" "', argument " "2"" of type '" "double""'");
  80551. - }
  80552. - arg2 = static_cast< double >(val2);
  80553. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80554. - if (!SWIG_IsOK(ecode3)) {
  80555. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_shrink" "', argument " "3"" of type '" "double""'");
  80556. - }
  80557. - arg3 = static_cast< double >(val3);
  80558. - try {
  80559. - result = (arg1)->shrink(arg2,arg3);
  80560. - }
  80561. - catch(vips::VError &_e) {
  80562. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80563. - }
  80564. -
  80565. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80566. - return resultobj;
  80567. -fail:
  80568. - return NULL;
  80569. -}
  80570. -
  80571. -
  80572. -SWIGINTERN PyObject *_wrap_VImage_stretch3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80573. - PyObject *resultobj = 0;
  80574. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80575. - double arg2 ;
  80576. - double arg3 ;
  80577. - void *argp1 = 0 ;
  80578. - int res1 = 0 ;
  80579. - double val2 ;
  80580. - int ecode2 = 0 ;
  80581. - double val3 ;
  80582. - int ecode3 = 0 ;
  80583. - PyObject * obj0 = 0 ;
  80584. - PyObject * obj1 = 0 ;
  80585. - PyObject * obj2 = 0 ;
  80586. - vips::VImage result;
  80587. -
  80588. - if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_stretch3",&obj0,&obj1,&obj2)) SWIG_fail;
  80589. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80590. - if (!SWIG_IsOK(res1)) {
  80591. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stretch3" "', argument " "1"" of type '" "vips::VImage *""'");
  80592. - }
  80593. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80594. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  80595. - if (!SWIG_IsOK(ecode2)) {
  80596. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stretch3" "', argument " "2"" of type '" "double""'");
  80597. - }
  80598. - arg2 = static_cast< double >(val2);
  80599. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80600. - if (!SWIG_IsOK(ecode3)) {
  80601. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stretch3" "', argument " "3"" of type '" "double""'");
  80602. - }
  80603. - arg3 = static_cast< double >(val3);
  80604. - try {
  80605. - result = (arg1)->stretch3(arg2,arg3);
  80606. - }
  80607. - catch(vips::VError &_e) {
  80608. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80609. - }
  80610. -
  80611. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80612. - return resultobj;
  80613. -fail:
  80614. - return NULL;
  80615. -}
  80616. -
  80617. -
  80618. -SWIGINTERN PyObject *_wrap_VImage_affinei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80619. - PyObject *resultobj = 0;
  80620. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80621. - char *arg2 = (char *) 0 ;
  80622. - double arg3 ;
  80623. - double arg4 ;
  80624. - double arg5 ;
  80625. - double arg6 ;
  80626. - double arg7 ;
  80627. - double arg8 ;
  80628. - int arg9 ;
  80629. - int arg10 ;
  80630. - int arg11 ;
  80631. - int arg12 ;
  80632. - void *argp1 = 0 ;
  80633. - int res1 = 0 ;
  80634. - int res2 ;
  80635. - char *buf2 = 0 ;
  80636. - int alloc2 = 0 ;
  80637. - double val3 ;
  80638. - int ecode3 = 0 ;
  80639. - double val4 ;
  80640. - int ecode4 = 0 ;
  80641. - double val5 ;
  80642. - int ecode5 = 0 ;
  80643. - double val6 ;
  80644. - int ecode6 = 0 ;
  80645. - double val7 ;
  80646. - int ecode7 = 0 ;
  80647. - double val8 ;
  80648. - int ecode8 = 0 ;
  80649. - int val9 ;
  80650. - int ecode9 = 0 ;
  80651. - int val10 ;
  80652. - int ecode10 = 0 ;
  80653. - int val11 ;
  80654. - int ecode11 = 0 ;
  80655. - int val12 ;
  80656. - int ecode12 = 0 ;
  80657. - PyObject * obj0 = 0 ;
  80658. - PyObject * obj1 = 0 ;
  80659. - PyObject * obj2 = 0 ;
  80660. - PyObject * obj3 = 0 ;
  80661. - PyObject * obj4 = 0 ;
  80662. - PyObject * obj5 = 0 ;
  80663. - PyObject * obj6 = 0 ;
  80664. - PyObject * obj7 = 0 ;
  80665. - PyObject * obj8 = 0 ;
  80666. - PyObject * obj9 = 0 ;
  80667. - PyObject * obj10 = 0 ;
  80668. - PyObject * obj11 = 0 ;
  80669. - vips::VImage result;
  80670. -
  80671. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_affinei",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
  80672. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80673. - if (!SWIG_IsOK(res1)) {
  80674. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei" "', argument " "1"" of type '" "vips::VImage *""'");
  80675. - }
  80676. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80677. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  80678. - if (!SWIG_IsOK(res2)) {
  80679. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei" "', argument " "2"" of type '" "char *""'");
  80680. - }
  80681. - arg2 = reinterpret_cast< char * >(buf2);
  80682. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80683. - if (!SWIG_IsOK(ecode3)) {
  80684. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei" "', argument " "3"" of type '" "double""'");
  80685. - }
  80686. - arg3 = static_cast< double >(val3);
  80687. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  80688. - if (!SWIG_IsOK(ecode4)) {
  80689. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei" "', argument " "4"" of type '" "double""'");
  80690. - }
  80691. - arg4 = static_cast< double >(val4);
  80692. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  80693. - if (!SWIG_IsOK(ecode5)) {
  80694. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei" "', argument " "5"" of type '" "double""'");
  80695. - }
  80696. - arg5 = static_cast< double >(val5);
  80697. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  80698. - if (!SWIG_IsOK(ecode6)) {
  80699. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei" "', argument " "6"" of type '" "double""'");
  80700. - }
  80701. - arg6 = static_cast< double >(val6);
  80702. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  80703. - if (!SWIG_IsOK(ecode7)) {
  80704. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei" "', argument " "7"" of type '" "double""'");
  80705. - }
  80706. - arg7 = static_cast< double >(val7);
  80707. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  80708. - if (!SWIG_IsOK(ecode8)) {
  80709. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei" "', argument " "8"" of type '" "double""'");
  80710. - }
  80711. - arg8 = static_cast< double >(val8);
  80712. - ecode9 = SWIG_AsVal_int(obj8, &val9);
  80713. - if (!SWIG_IsOK(ecode9)) {
  80714. - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affinei" "', argument " "9"" of type '" "int""'");
  80715. - }
  80716. - arg9 = static_cast< int >(val9);
  80717. - ecode10 = SWIG_AsVal_int(obj9, &val10);
  80718. - if (!SWIG_IsOK(ecode10)) {
  80719. - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affinei" "', argument " "10"" of type '" "int""'");
  80720. - }
  80721. - arg10 = static_cast< int >(val10);
  80722. - ecode11 = SWIG_AsVal_int(obj10, &val11);
  80723. - if (!SWIG_IsOK(ecode11)) {
  80724. - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affinei" "', argument " "11"" of type '" "int""'");
  80725. - }
  80726. - arg11 = static_cast< int >(val11);
  80727. - ecode12 = SWIG_AsVal_int(obj11, &val12);
  80728. - if (!SWIG_IsOK(ecode12)) {
  80729. - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_affinei" "', argument " "12"" of type '" "int""'");
  80730. - }
  80731. - arg12 = static_cast< int >(val12);
  80732. - try {
  80733. - result = (arg1)->affinei(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
  80734. - }
  80735. - catch(vips::VError &_e) {
  80736. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80737. - }
  80738. -
  80739. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80740. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  80741. - return resultobj;
  80742. -fail:
  80743. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  80744. - return NULL;
  80745. -}
  80746. -
  80747. -
  80748. -SWIGINTERN PyObject *_wrap_VImage_affinei_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80749. - PyObject *resultobj = 0;
  80750. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80751. - char *arg2 = (char *) 0 ;
  80752. - double arg3 ;
  80753. - double arg4 ;
  80754. - double arg5 ;
  80755. - double arg6 ;
  80756. - double arg7 ;
  80757. - double arg8 ;
  80758. - void *argp1 = 0 ;
  80759. - int res1 = 0 ;
  80760. - int res2 ;
  80761. - char *buf2 = 0 ;
  80762. - int alloc2 = 0 ;
  80763. - double val3 ;
  80764. - int ecode3 = 0 ;
  80765. - double val4 ;
  80766. - int ecode4 = 0 ;
  80767. - double val5 ;
  80768. - int ecode5 = 0 ;
  80769. - double val6 ;
  80770. - int ecode6 = 0 ;
  80771. - double val7 ;
  80772. - int ecode7 = 0 ;
  80773. - double val8 ;
  80774. - int ecode8 = 0 ;
  80775. - PyObject * obj0 = 0 ;
  80776. - PyObject * obj1 = 0 ;
  80777. - PyObject * obj2 = 0 ;
  80778. - PyObject * obj3 = 0 ;
  80779. - PyObject * obj4 = 0 ;
  80780. - PyObject * obj5 = 0 ;
  80781. - PyObject * obj6 = 0 ;
  80782. - PyObject * obj7 = 0 ;
  80783. - vips::VImage result;
  80784. -
  80785. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_affinei_all",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  80786. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80787. - if (!SWIG_IsOK(res1)) {
  80788. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei_all" "', argument " "1"" of type '" "vips::VImage *""'");
  80789. - }
  80790. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80791. - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  80792. - if (!SWIG_IsOK(res2)) {
  80793. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei_all" "', argument " "2"" of type '" "char *""'");
  80794. - }
  80795. - arg2 = reinterpret_cast< char * >(buf2);
  80796. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  80797. - if (!SWIG_IsOK(ecode3)) {
  80798. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei_all" "', argument " "3"" of type '" "double""'");
  80799. - }
  80800. - arg3 = static_cast< double >(val3);
  80801. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  80802. - if (!SWIG_IsOK(ecode4)) {
  80803. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei_all" "', argument " "4"" of type '" "double""'");
  80804. - }
  80805. - arg4 = static_cast< double >(val4);
  80806. - ecode5 = SWIG_AsVal_double(obj4, &val5);
  80807. - if (!SWIG_IsOK(ecode5)) {
  80808. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei_all" "', argument " "5"" of type '" "double""'");
  80809. - }
  80810. - arg5 = static_cast< double >(val5);
  80811. - ecode6 = SWIG_AsVal_double(obj5, &val6);
  80812. - if (!SWIG_IsOK(ecode6)) {
  80813. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei_all" "', argument " "6"" of type '" "double""'");
  80814. - }
  80815. - arg6 = static_cast< double >(val6);
  80816. - ecode7 = SWIG_AsVal_double(obj6, &val7);
  80817. - if (!SWIG_IsOK(ecode7)) {
  80818. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei_all" "', argument " "7"" of type '" "double""'");
  80819. - }
  80820. - arg7 = static_cast< double >(val7);
  80821. - ecode8 = SWIG_AsVal_double(obj7, &val8);
  80822. - if (!SWIG_IsOK(ecode8)) {
  80823. - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei_all" "', argument " "8"" of type '" "double""'");
  80824. - }
  80825. - arg8 = static_cast< double >(val8);
  80826. - try {
  80827. - result = (arg1)->affinei_all(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  80828. - }
  80829. - catch(vips::VError &_e) {
  80830. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80831. - }
  80832. -
  80833. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80834. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  80835. - return resultobj;
  80836. -fail:
  80837. - if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  80838. - return NULL;
  80839. -}
  80840. -
  80841. -
  80842. -SWIGINTERN PyObject *_wrap_VImage_video_test(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80843. - PyObject *resultobj = 0;
  80844. - int arg1 ;
  80845. - int arg2 ;
  80846. - int val1 ;
  80847. - int ecode1 = 0 ;
  80848. - int val2 ;
  80849. - int ecode2 = 0 ;
  80850. - PyObject * obj0 = 0 ;
  80851. - PyObject * obj1 = 0 ;
  80852. - vips::VImage result;
  80853. -
  80854. - if (!PyArg_ParseTuple(args,(char *)"OO:VImage_video_test",&obj0,&obj1)) SWIG_fail;
  80855. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  80856. - if (!SWIG_IsOK(ecode1)) {
  80857. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_video_test" "', argument " "1"" of type '" "int""'");
  80858. - }
  80859. - arg1 = static_cast< int >(val1);
  80860. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80861. - if (!SWIG_IsOK(ecode2)) {
  80862. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_test" "', argument " "2"" of type '" "int""'");
  80863. - }
  80864. - arg2 = static_cast< int >(val2);
  80865. - try {
  80866. - result = vips::VImage::video_test(arg1,arg2);
  80867. - }
  80868. - catch(vips::VError &_e) {
  80869. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80870. - }
  80871. -
  80872. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80873. - return resultobj;
  80874. -fail:
  80875. - return NULL;
  80876. -}
  80877. -
  80878. -
  80879. -SWIGINTERN PyObject *_wrap_VImage_video_v4l1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80880. - PyObject *resultobj = 0;
  80881. - char *arg1 = (char *) 0 ;
  80882. - int arg2 ;
  80883. - int arg3 ;
  80884. - int arg4 ;
  80885. - int arg5 ;
  80886. - int arg6 ;
  80887. - int arg7 ;
  80888. - int res1 ;
  80889. - char *buf1 = 0 ;
  80890. - int alloc1 = 0 ;
  80891. - int val2 ;
  80892. - int ecode2 = 0 ;
  80893. - int val3 ;
  80894. - int ecode3 = 0 ;
  80895. - int val4 ;
  80896. - int ecode4 = 0 ;
  80897. - int val5 ;
  80898. - int ecode5 = 0 ;
  80899. - int val6 ;
  80900. - int ecode6 = 0 ;
  80901. - int val7 ;
  80902. - int ecode7 = 0 ;
  80903. - PyObject * obj0 = 0 ;
  80904. - PyObject * obj1 = 0 ;
  80905. - PyObject * obj2 = 0 ;
  80906. - PyObject * obj3 = 0 ;
  80907. - PyObject * obj4 = 0 ;
  80908. - PyObject * obj5 = 0 ;
  80909. - PyObject * obj6 = 0 ;
  80910. - vips::VImage result;
  80911. -
  80912. - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_video_v4l1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  80913. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  80914. - if (!SWIG_IsOK(res1)) {
  80915. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_video_v4l1" "', argument " "1"" of type '" "char *""'");
  80916. - }
  80917. - arg1 = reinterpret_cast< char * >(buf1);
  80918. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  80919. - if (!SWIG_IsOK(ecode2)) {
  80920. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_v4l1" "', argument " "2"" of type '" "int""'");
  80921. - }
  80922. - arg2 = static_cast< int >(val2);
  80923. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  80924. - if (!SWIG_IsOK(ecode3)) {
  80925. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_video_v4l1" "', argument " "3"" of type '" "int""'");
  80926. - }
  80927. - arg3 = static_cast< int >(val3);
  80928. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  80929. - if (!SWIG_IsOK(ecode4)) {
  80930. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_video_v4l1" "', argument " "4"" of type '" "int""'");
  80931. - }
  80932. - arg4 = static_cast< int >(val4);
  80933. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  80934. - if (!SWIG_IsOK(ecode5)) {
  80935. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_video_v4l1" "', argument " "5"" of type '" "int""'");
  80936. - }
  80937. - arg5 = static_cast< int >(val5);
  80938. - ecode6 = SWIG_AsVal_int(obj5, &val6);
  80939. - if (!SWIG_IsOK(ecode6)) {
  80940. - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_video_v4l1" "', argument " "6"" of type '" "int""'");
  80941. - }
  80942. - arg6 = static_cast< int >(val6);
  80943. - ecode7 = SWIG_AsVal_int(obj6, &val7);
  80944. - if (!SWIG_IsOK(ecode7)) {
  80945. - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_video_v4l1" "', argument " "7"" of type '" "int""'");
  80946. - }
  80947. - arg7 = static_cast< int >(val7);
  80948. - try {
  80949. - result = vips::VImage::video_v4l1(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  80950. - }
  80951. - catch(vips::VError &_e) {
  80952. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80953. - }
  80954. -
  80955. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  80956. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  80957. - return resultobj;
  80958. -fail:
  80959. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  80960. - return NULL;
  80961. -}
  80962. -
  80963. -
  80964. -SWIGINTERN PyObject *_wrap_VImage_tobuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80965. - PyObject *resultobj = 0;
  80966. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  80967. - void *argp1 = 0 ;
  80968. - int res1 = 0 ;
  80969. - PyObject * obj0 = 0 ;
  80970. - VBuffer result;
  80971. -
  80972. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tobuffer",&obj0)) SWIG_fail;
  80973. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  80974. - if (!SWIG_IsOK(res1)) {
  80975. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tobuffer" "', argument " "1"" of type '" "vips::VImage *""'");
  80976. - }
  80977. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  80978. - try {
  80979. - result = vips_VImage_tobuffer(arg1);
  80980. - }
  80981. - catch(vips::VError &_e) {
  80982. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  80983. - }
  80984. -
  80985. - {
  80986. - resultobj = PyBuffer_FromMemory ((&result)->data, (&result)->size);
  80987. - }
  80988. - return resultobj;
  80989. -fail:
  80990. - return NULL;
  80991. -}
  80992. -
  80993. -
  80994. -SWIGINTERN PyObject *_wrap_VImage_frombuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  80995. - PyObject *resultobj = 0;
  80996. - VBuffer arg1 ;
  80997. - int arg2 ;
  80998. - int arg3 ;
  80999. - int arg4 ;
  81000. - vips::VImage::TBandFmt arg5 ;
  81001. - int val2 ;
  81002. - int ecode2 = 0 ;
  81003. - int val3 ;
  81004. - int ecode3 = 0 ;
  81005. - int val4 ;
  81006. - int ecode4 = 0 ;
  81007. - int val5 ;
  81008. - int ecode5 = 0 ;
  81009. - PyObject * obj0 = 0 ;
  81010. - PyObject * obj1 = 0 ;
  81011. - PyObject * obj2 = 0 ;
  81012. - PyObject * obj3 = 0 ;
  81013. - PyObject * obj4 = 0 ;
  81014. - vips::VImage result;
  81015. -
  81016. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_frombuffer",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  81017. - {
  81018. - const char *buffer;
  81019. - Py_ssize_t buffer_len;
  81020. -
  81021. - if (PyObject_AsCharBuffer (obj0, &buffer, &buffer_len) == -1) {
  81022. - PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer");
  81023. - return NULL;
  81024. - }
  81025. -
  81026. - (&arg1)->data = (void *) buffer;
  81027. - (&arg1)->size = buffer_len;
  81028. - }
  81029. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  81030. - if (!SWIG_IsOK(ecode2)) {
  81031. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_frombuffer" "', argument " "2"" of type '" "int""'");
  81032. - }
  81033. - arg2 = static_cast< int >(val2);
  81034. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  81035. - if (!SWIG_IsOK(ecode3)) {
  81036. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_frombuffer" "', argument " "3"" of type '" "int""'");
  81037. - }
  81038. - arg3 = static_cast< int >(val3);
  81039. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  81040. - if (!SWIG_IsOK(ecode4)) {
  81041. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_frombuffer" "', argument " "4"" of type '" "int""'");
  81042. - }
  81043. - arg4 = static_cast< int >(val4);
  81044. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  81045. - if (!SWIG_IsOK(ecode5)) {
  81046. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_frombuffer" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  81047. - }
  81048. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  81049. - try {
  81050. - result = vips_VImage_frombuffer(arg1,arg2,arg3,arg4,arg5);
  81051. - }
  81052. - catch(vips::VError &_e) {
  81053. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  81054. - }
  81055. -
  81056. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  81057. - return resultobj;
  81058. -fail:
  81059. - return NULL;
  81060. -}
  81061. -
  81062. -
  81063. -SWIGINTERN PyObject *_wrap_VImage_tostring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81064. - PyObject *resultobj = 0;
  81065. - vips::VImage *arg1 = (vips::VImage *) 0 ;
  81066. - char **arg2 = (char **) 0 ;
  81067. - int *arg3 = (int *) 0 ;
  81068. - void *argp1 = 0 ;
  81069. - int res1 = 0 ;
  81070. - char *temp2 = 0 ;
  81071. - int tempn2 ;
  81072. - PyObject * obj0 = 0 ;
  81073. -
  81074. - arg2 = &temp2; arg3 = &tempn2;
  81075. - if (!PyArg_ParseTuple(args,(char *)"O:VImage_tostring",&obj0)) SWIG_fail;
  81076. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 );
  81077. - if (!SWIG_IsOK(res1)) {
  81078. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tostring" "', argument " "1"" of type '" "vips::VImage *""'");
  81079. - }
  81080. - arg1 = reinterpret_cast< vips::VImage * >(argp1);
  81081. - try {
  81082. - vips_VImage_tostring(arg1,arg2,arg3);
  81083. - }
  81084. - catch(vips::VError &_e) {
  81085. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  81086. - }
  81087. -
  81088. - resultobj = SWIG_Py_Void();
  81089. - if (*arg2) {
  81090. - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3));
  81091. - im_free (*arg2);
  81092. - }
  81093. - return resultobj;
  81094. -fail:
  81095. - return NULL;
  81096. -}
  81097. -
  81098. -
  81099. -SWIGINTERN PyObject *_wrap_VImage_fromstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81100. - PyObject *resultobj = 0;
  81101. - std::string arg1 ;
  81102. - int arg2 ;
  81103. - int arg3 ;
  81104. - int arg4 ;
  81105. - vips::VImage::TBandFmt arg5 ;
  81106. - int val2 ;
  81107. - int ecode2 = 0 ;
  81108. - int val3 ;
  81109. - int ecode3 = 0 ;
  81110. - int val4 ;
  81111. - int ecode4 = 0 ;
  81112. - int val5 ;
  81113. - int ecode5 = 0 ;
  81114. - PyObject * obj0 = 0 ;
  81115. - PyObject * obj1 = 0 ;
  81116. - PyObject * obj2 = 0 ;
  81117. - PyObject * obj3 = 0 ;
  81118. - PyObject * obj4 = 0 ;
  81119. - vips::VImage result;
  81120. -
  81121. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_fromstring",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  81122. - {
  81123. - std::string *ptr = (std::string *)0;
  81124. - int res = SWIG_AsPtr_std_string(obj0, &ptr);
  81125. - if (!SWIG_IsOK(res) || !ptr) {
  81126. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_fromstring" "', argument " "1"" of type '" "std::string""'");
  81127. - }
  81128. - arg1 = *ptr;
  81129. - if (SWIG_IsNewObj(res)) delete ptr;
  81130. - }
  81131. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  81132. - if (!SWIG_IsOK(ecode2)) {
  81133. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fromstring" "', argument " "2"" of type '" "int""'");
  81134. - }
  81135. - arg2 = static_cast< int >(val2);
  81136. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  81137. - if (!SWIG_IsOK(ecode3)) {
  81138. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_fromstring" "', argument " "3"" of type '" "int""'");
  81139. - }
  81140. - arg3 = static_cast< int >(val3);
  81141. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  81142. - if (!SWIG_IsOK(ecode4)) {
  81143. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_fromstring" "', argument " "4"" of type '" "int""'");
  81144. - }
  81145. - arg4 = static_cast< int >(val4);
  81146. - ecode5 = SWIG_AsVal_int(obj4, &val5);
  81147. - if (!SWIG_IsOK(ecode5)) {
  81148. - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_fromstring" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'");
  81149. - }
  81150. - arg5 = static_cast< vips::VImage::TBandFmt >(val5);
  81151. - try {
  81152. - result = vips_VImage_fromstring(arg1,arg2,arg3,arg4,arg5);
  81153. - }
  81154. - catch(vips::VError &_e) {
  81155. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  81156. - }
  81157. -
  81158. - resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 );
  81159. - return resultobj;
  81160. -fail:
  81161. - return NULL;
  81162. -}
  81163. -
  81164. -
  81165. -SWIGINTERN PyObject *VImage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81166. - PyObject *obj;
  81167. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  81168. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VImage, SWIG_NewClientData(obj));
  81169. - return SWIG_Py_Void();
  81170. -}
  81171. -
  81172. -SWIGINTERN PyObject *_wrap_im_init_world(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81173. - PyObject *resultobj = 0;
  81174. - char *arg1 = (char *) 0 ;
  81175. - int res1 ;
  81176. - char *buf1 = 0 ;
  81177. - int alloc1 = 0 ;
  81178. - PyObject * obj0 = 0 ;
  81179. - int result;
  81180. -
  81181. - if (!PyArg_ParseTuple(args,(char *)"O:im_init_world",&obj0)) SWIG_fail;
  81182. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  81183. - if (!SWIG_IsOK(res1)) {
  81184. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "im_init_world" "', argument " "1"" of type '" "char const *""'");
  81185. - }
  81186. - arg1 = reinterpret_cast< char * >(buf1);
  81187. - result = (int)im_init_world((char const *)arg1);
  81188. - resultobj = SWIG_From_int(static_cast< int >(result));
  81189. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  81190. - return resultobj;
  81191. -fail:
  81192. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  81193. - return NULL;
  81194. -}
  81195. -
  81196. -
  81197. -SWIGINTERN PyObject *_wrap_im__print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81198. - PyObject *resultobj = 0;
  81199. -
  81200. - if (!PyArg_ParseTuple(args,(char *)":im__print_all")) SWIG_fail;
  81201. - im__print_all();
  81202. - resultobj = SWIG_Py_Void();
  81203. - return resultobj;
  81204. -fail:
  81205. - return NULL;
  81206. -}
  81207. -
  81208. -
  81209. -SWIGINTERN PyObject *_wrap_im_col_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  81210. - PyObject *resultobj = 0;
  81211. - float arg1 ;
  81212. - float arg2 ;
  81213. - float arg3 ;
  81214. - float *arg4 = (float *) 0 ;
  81215. - float *arg5 = (float *) 0 ;
  81216. - float *arg6 = (float *) 0 ;
  81217. - float val1 ;
  81218. - int ecode1 = 0 ;
  81219. - float val2 ;
  81220. - int ecode2 = 0 ;
  81221. - float val3 ;
  81222. - int ecode3 = 0 ;
  81223. - void *argp4 = 0 ;
  81224. - int res4 = 0 ;
  81225. - void *argp5 = 0 ;
  81226. - int res5 = 0 ;
  81227. - void *argp6 = 0 ;
  81228. - int res6 = 0 ;
  81229. - PyObject * obj0 = 0 ;
  81230. - PyObject * obj1 = 0 ;
  81231. - PyObject * obj2 = 0 ;
  81232. - PyObject * obj3 = 0 ;
  81233. - PyObject * obj4 = 0 ;
  81234. - PyObject * obj5 = 0 ;
  81235. -
  81236. - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:im_col_Lab2XYZ",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  81237. - ecode1 = SWIG_AsVal_float(obj0, &val1);
  81238. - if (!SWIG_IsOK(ecode1)) {
  81239. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "im_col_Lab2XYZ" "', argument " "1"" of type '" "float""'");
  81240. - }
  81241. - arg1 = static_cast< float >(val1);
  81242. - ecode2 = SWIG_AsVal_float(obj1, &val2);
  81243. - if (!SWIG_IsOK(ecode2)) {
  81244. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "im_col_Lab2XYZ" "', argument " "2"" of type '" "float""'");
  81245. - }
  81246. - arg2 = static_cast< float >(val2);
  81247. - ecode3 = SWIG_AsVal_float(obj2, &val3);
  81248. - if (!SWIG_IsOK(ecode3)) {
  81249. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "im_col_Lab2XYZ" "', argument " "3"" of type '" "float""'");
  81250. - }
  81251. - arg3 = static_cast< float >(val3);
  81252. - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
  81253. - if (!SWIG_IsOK(res4)) {
  81254. - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "im_col_Lab2XYZ" "', argument " "4"" of type '" "float *""'");
  81255. - }
  81256. - arg4 = reinterpret_cast< float * >(argp4);
  81257. - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
  81258. - if (!SWIG_IsOK(res5)) {
  81259. - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "im_col_Lab2XYZ" "', argument " "5"" of type '" "float *""'");
  81260. - }
  81261. - arg5 = reinterpret_cast< float * >(argp5);
  81262. - res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
  81263. - if (!SWIG_IsOK(res6)) {
  81264. - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "im_col_Lab2XYZ" "', argument " "6"" of type '" "float *""'");
  81265. - }
  81266. - arg6 = reinterpret_cast< float * >(argp6);
  81267. - im_col_Lab2XYZ(arg1,arg2,arg3,arg4,arg5,arg6);
  81268. - resultobj = SWIG_Py_Void();
  81269. - return resultobj;
  81270. -fail:
  81271. - return NULL;
  81272. -}
  81273. -
  81274. -
  81275. -static PyMethodDef SwigMethods[] = {
  81276. - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
  81277. - { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL},
  81278. - { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL},
  81279. - { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL},
  81280. - { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL},
  81281. - { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL},
  81282. - { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL},
  81283. - { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL},
  81284. - { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL},
  81285. - { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL},
  81286. - { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL},
  81287. - { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL},
  81288. - { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL},
  81289. - { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL},
  81290. - { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL},
  81291. - { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL},
  81292. - { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL},
  81293. - { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL},
  81294. - { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
  81295. - { (char *)"IntVector_iterator", _wrap_IntVector_iterator, METH_VARARGS, NULL},
  81296. - { (char *)"IntVector___nonzero__", _wrap_IntVector___nonzero__, METH_VARARGS, NULL},
  81297. - { (char *)"IntVector___bool__", _wrap_IntVector___bool__, METH_VARARGS, NULL},
  81298. - { (char *)"IntVector___len__", _wrap_IntVector___len__, METH_VARARGS, NULL},
  81299. - { (char *)"IntVector_pop", _wrap_IntVector_pop, METH_VARARGS, NULL},
  81300. - { (char *)"IntVector___getslice__", _wrap_IntVector___getslice__, METH_VARARGS, NULL},
  81301. - { (char *)"IntVector___setslice__", _wrap_IntVector___setslice__, METH_VARARGS, NULL},
  81302. - { (char *)"IntVector___delslice__", _wrap_IntVector___delslice__, METH_VARARGS, NULL},
  81303. - { (char *)"IntVector___delitem__", _wrap_IntVector___delitem__, METH_VARARGS, NULL},
  81304. - { (char *)"IntVector___getitem__", _wrap_IntVector___getitem__, METH_VARARGS, NULL},
  81305. - { (char *)"IntVector___setitem__", _wrap_IntVector___setitem__, METH_VARARGS, NULL},
  81306. - { (char *)"IntVector_append", _wrap_IntVector_append, METH_VARARGS, NULL},
  81307. - { (char *)"IntVector_empty", _wrap_IntVector_empty, METH_VARARGS, NULL},
  81308. - { (char *)"IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL},
  81309. - { (char *)"IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL},
  81310. - { (char *)"IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL},
  81311. - { (char *)"IntVector_get_allocator", _wrap_IntVector_get_allocator, METH_VARARGS, NULL},
  81312. - { (char *)"IntVector_begin", _wrap_IntVector_begin, METH_VARARGS, NULL},
  81313. - { (char *)"IntVector_end", _wrap_IntVector_end, METH_VARARGS, NULL},
  81314. - { (char *)"IntVector_rbegin", _wrap_IntVector_rbegin, METH_VARARGS, NULL},
  81315. - { (char *)"IntVector_rend", _wrap_IntVector_rend, METH_VARARGS, NULL},
  81316. - { (char *)"IntVector_pop_back", _wrap_IntVector_pop_back, METH_VARARGS, NULL},
  81317. - { (char *)"IntVector_erase", _wrap_IntVector_erase, METH_VARARGS, NULL},
  81318. - { (char *)"new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL},
  81319. - { (char *)"IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL},
  81320. - { (char *)"IntVector_front", _wrap_IntVector_front, METH_VARARGS, NULL},
  81321. - { (char *)"IntVector_back", _wrap_IntVector_back, METH_VARARGS, NULL},
  81322. - { (char *)"IntVector_assign", _wrap_IntVector_assign, METH_VARARGS, NULL},
  81323. - { (char *)"IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL},
  81324. - { (char *)"IntVector_insert", _wrap_IntVector_insert, METH_VARARGS, NULL},
  81325. - { (char *)"IntVector_reserve", _wrap_IntVector_reserve, METH_VARARGS, NULL},
  81326. - { (char *)"IntVector_capacity", _wrap_IntVector_capacity, METH_VARARGS, NULL},
  81327. - { (char *)"delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL},
  81328. - { (char *)"IntVector_swigregister", IntVector_swigregister, METH_VARARGS, NULL},
  81329. - { (char *)"DoubleVector_iterator", _wrap_DoubleVector_iterator, METH_VARARGS, NULL},
  81330. - { (char *)"DoubleVector___nonzero__", _wrap_DoubleVector___nonzero__, METH_VARARGS, NULL},
  81331. - { (char *)"DoubleVector___bool__", _wrap_DoubleVector___bool__, METH_VARARGS, NULL},
  81332. - { (char *)"DoubleVector___len__", _wrap_DoubleVector___len__, METH_VARARGS, NULL},
  81333. - { (char *)"DoubleVector_pop", _wrap_DoubleVector_pop, METH_VARARGS, NULL},
  81334. - { (char *)"DoubleVector___getslice__", _wrap_DoubleVector___getslice__, METH_VARARGS, NULL},
  81335. - { (char *)"DoubleVector___setslice__", _wrap_DoubleVector___setslice__, METH_VARARGS, NULL},
  81336. - { (char *)"DoubleVector___delslice__", _wrap_DoubleVector___delslice__, METH_VARARGS, NULL},
  81337. - { (char *)"DoubleVector___delitem__", _wrap_DoubleVector___delitem__, METH_VARARGS, NULL},
  81338. - { (char *)"DoubleVector___getitem__", _wrap_DoubleVector___getitem__, METH_VARARGS, NULL},
  81339. - { (char *)"DoubleVector___setitem__", _wrap_DoubleVector___setitem__, METH_VARARGS, NULL},
  81340. - { (char *)"DoubleVector_append", _wrap_DoubleVector_append, METH_VARARGS, NULL},
  81341. - { (char *)"DoubleVector_empty", _wrap_DoubleVector_empty, METH_VARARGS, NULL},
  81342. - { (char *)"DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL},
  81343. - { (char *)"DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL},
  81344. - { (char *)"DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL},
  81345. - { (char *)"DoubleVector_get_allocator", _wrap_DoubleVector_get_allocator, METH_VARARGS, NULL},
  81346. - { (char *)"DoubleVector_begin", _wrap_DoubleVector_begin, METH_VARARGS, NULL},
  81347. - { (char *)"DoubleVector_end", _wrap_DoubleVector_end, METH_VARARGS, NULL},
  81348. - { (char *)"DoubleVector_rbegin", _wrap_DoubleVector_rbegin, METH_VARARGS, NULL},
  81349. - { (char *)"DoubleVector_rend", _wrap_DoubleVector_rend, METH_VARARGS, NULL},
  81350. - { (char *)"DoubleVector_pop_back", _wrap_DoubleVector_pop_back, METH_VARARGS, NULL},
  81351. - { (char *)"DoubleVector_erase", _wrap_DoubleVector_erase, METH_VARARGS, NULL},
  81352. - { (char *)"new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL},
  81353. - { (char *)"DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL},
  81354. - { (char *)"DoubleVector_front", _wrap_DoubleVector_front, METH_VARARGS, NULL},
  81355. - { (char *)"DoubleVector_back", _wrap_DoubleVector_back, METH_VARARGS, NULL},
  81356. - { (char *)"DoubleVector_assign", _wrap_DoubleVector_assign, METH_VARARGS, NULL},
  81357. - { (char *)"DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL},
  81358. - { (char *)"DoubleVector_insert", _wrap_DoubleVector_insert, METH_VARARGS, NULL},
  81359. - { (char *)"DoubleVector_reserve", _wrap_DoubleVector_reserve, METH_VARARGS, NULL},
  81360. - { (char *)"DoubleVector_capacity", _wrap_DoubleVector_capacity, METH_VARARGS, NULL},
  81361. - { (char *)"delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL},
  81362. - { (char *)"DoubleVector_swigregister", DoubleVector_swigregister, METH_VARARGS, NULL},
  81363. - { (char *)"ImageVector_iterator", _wrap_ImageVector_iterator, METH_VARARGS, NULL},
  81364. - { (char *)"ImageVector___nonzero__", _wrap_ImageVector___nonzero__, METH_VARARGS, NULL},
  81365. - { (char *)"ImageVector___bool__", _wrap_ImageVector___bool__, METH_VARARGS, NULL},
  81366. - { (char *)"ImageVector___len__", _wrap_ImageVector___len__, METH_VARARGS, NULL},
  81367. - { (char *)"ImageVector_pop", _wrap_ImageVector_pop, METH_VARARGS, NULL},
  81368. - { (char *)"ImageVector___getslice__", _wrap_ImageVector___getslice__, METH_VARARGS, NULL},
  81369. - { (char *)"ImageVector___setslice__", _wrap_ImageVector___setslice__, METH_VARARGS, NULL},
  81370. - { (char *)"ImageVector___delslice__", _wrap_ImageVector___delslice__, METH_VARARGS, NULL},
  81371. - { (char *)"ImageVector___delitem__", _wrap_ImageVector___delitem__, METH_VARARGS, NULL},
  81372. - { (char *)"ImageVector___getitem__", _wrap_ImageVector___getitem__, METH_VARARGS, NULL},
  81373. - { (char *)"ImageVector___setitem__", _wrap_ImageVector___setitem__, METH_VARARGS, NULL},
  81374. - { (char *)"ImageVector_append", _wrap_ImageVector_append, METH_VARARGS, NULL},
  81375. - { (char *)"ImageVector_empty", _wrap_ImageVector_empty, METH_VARARGS, NULL},
  81376. - { (char *)"ImageVector_size", _wrap_ImageVector_size, METH_VARARGS, NULL},
  81377. - { (char *)"ImageVector_clear", _wrap_ImageVector_clear, METH_VARARGS, NULL},
  81378. - { (char *)"ImageVector_swap", _wrap_ImageVector_swap, METH_VARARGS, NULL},
  81379. - { (char *)"ImageVector_get_allocator", _wrap_ImageVector_get_allocator, METH_VARARGS, NULL},
  81380. - { (char *)"ImageVector_begin", _wrap_ImageVector_begin, METH_VARARGS, NULL},
  81381. - { (char *)"ImageVector_end", _wrap_ImageVector_end, METH_VARARGS, NULL},
  81382. - { (char *)"ImageVector_rbegin", _wrap_ImageVector_rbegin, METH_VARARGS, NULL},
  81383. - { (char *)"ImageVector_rend", _wrap_ImageVector_rend, METH_VARARGS, NULL},
  81384. - { (char *)"ImageVector_pop_back", _wrap_ImageVector_pop_back, METH_VARARGS, NULL},
  81385. - { (char *)"ImageVector_erase", _wrap_ImageVector_erase, METH_VARARGS, NULL},
  81386. - { (char *)"new_ImageVector", _wrap_new_ImageVector, METH_VARARGS, NULL},
  81387. - { (char *)"ImageVector_push_back", _wrap_ImageVector_push_back, METH_VARARGS, NULL},
  81388. - { (char *)"ImageVector_front", _wrap_ImageVector_front, METH_VARARGS, NULL},
  81389. - { (char *)"ImageVector_back", _wrap_ImageVector_back, METH_VARARGS, NULL},
  81390. - { (char *)"ImageVector_assign", _wrap_ImageVector_assign, METH_VARARGS, NULL},
  81391. - { (char *)"ImageVector_resize", _wrap_ImageVector_resize, METH_VARARGS, NULL},
  81392. - { (char *)"ImageVector_insert", _wrap_ImageVector_insert, METH_VARARGS, NULL},
  81393. - { (char *)"ImageVector_reserve", _wrap_ImageVector_reserve, METH_VARARGS, NULL},
  81394. - { (char *)"ImageVector_capacity", _wrap_ImageVector_capacity, METH_VARARGS, NULL},
  81395. - { (char *)"delete_ImageVector", _wrap_delete_ImageVector, METH_VARARGS, NULL},
  81396. - { (char *)"ImageVector_swigregister", ImageVector_swigregister, METH_VARARGS, NULL},
  81397. - { (char *)"init", _wrap_init, METH_VARARGS, NULL},
  81398. - { (char *)"shutdown", _wrap_shutdown, METH_VARARGS, NULL},
  81399. - { (char *)"VImage_print_all", _wrap_VImage_print_all, METH_VARARGS, NULL},
  81400. - { (char *)"VImage_convert2disc", _wrap_VImage_convert2disc, METH_VARARGS, NULL},
  81401. - { (char *)"new_VImage", _wrap_new_VImage, METH_VARARGS, NULL},
  81402. - { (char *)"VImage___assign__", _wrap_VImage___assign__, METH_VARARGS, NULL},
  81403. - { (char *)"delete_VImage", _wrap_delete_VImage, METH_VARARGS, NULL},
  81404. - { (char *)"VImage_image", _wrap_VImage_image, METH_VARARGS, NULL},
  81405. - { (char *)"VImage_data", _wrap_VImage_data, METH_VARARGS, NULL},
  81406. - { (char *)"VImage_write", _wrap_VImage_write, METH_VARARGS, NULL},
  81407. - { (char *)"VImage_debug_print", _wrap_VImage_debug_print, METH_VARARGS, NULL},
  81408. - { (char *)"VImage_Xsize", _wrap_VImage_Xsize, METH_VARARGS, NULL},
  81409. - { (char *)"VImage_Ysize", _wrap_VImage_Ysize, METH_VARARGS, NULL},
  81410. - { (char *)"VImage_Bands", _wrap_VImage_Bands, METH_VARARGS, NULL},
  81411. - { (char *)"VImage_BandFmt", _wrap_VImage_BandFmt, METH_VARARGS, NULL},
  81412. - { (char *)"VImage_Coding", _wrap_VImage_Coding, METH_VARARGS, NULL},
  81413. - { (char *)"VImage_Type", _wrap_VImage_Type, METH_VARARGS, NULL},
  81414. - { (char *)"VImage_Xres", _wrap_VImage_Xres, METH_VARARGS, NULL},
  81415. - { (char *)"VImage_Yres", _wrap_VImage_Yres, METH_VARARGS, NULL},
  81416. - { (char *)"VImage_Length", _wrap_VImage_Length, METH_VARARGS, NULL},
  81417. - { (char *)"VImage_Compression", _wrap_VImage_Compression, METH_VARARGS, NULL},
  81418. - { (char *)"VImage_Level", _wrap_VImage_Level, METH_VARARGS, NULL},
  81419. - { (char *)"VImage_Xoffset", _wrap_VImage_Xoffset, METH_VARARGS, NULL},
  81420. - { (char *)"VImage_Yoffset", _wrap_VImage_Yoffset, METH_VARARGS, NULL},
  81421. - { (char *)"VImage_filename", _wrap_VImage_filename, METH_VARARGS, NULL},
  81422. - { (char *)"VImage_Hist", _wrap_VImage_Hist, METH_VARARGS, NULL},
  81423. - { (char *)"VImage_meta_remove", _wrap_VImage_meta_remove, METH_VARARGS, NULL},
  81424. - { (char *)"VImage_meta_get_typeof", _wrap_VImage_meta_get_typeof, METH_VARARGS, NULL},
  81425. - { (char *)"VImage_meta_get_int", _wrap_VImage_meta_get_int, METH_VARARGS, NULL},
  81426. - { (char *)"VImage_meta_get_double", _wrap_VImage_meta_get_double, METH_VARARGS, NULL},
  81427. - { (char *)"VImage_meta_get_string", _wrap_VImage_meta_get_string, METH_VARARGS, NULL},
  81428. - { (char *)"VImage_meta_get_area", _wrap_VImage_meta_get_area, METH_VARARGS, NULL},
  81429. - { (char *)"VImage_meta_get_blob", _wrap_VImage_meta_get_blob, METH_VARARGS, NULL},
  81430. - { (char *)"VImage_meta_set", _wrap_VImage_meta_set, METH_VARARGS, NULL},
  81431. - { (char *)"VImage_initdesc", _wrap_VImage_initdesc, METH_VARARGS, NULL},
  81432. - { (char *)"VImage_abs", _wrap_VImage_abs, METH_VARARGS, NULL},
  81433. - { (char *)"VImage_acos", _wrap_VImage_acos, METH_VARARGS, NULL},
  81434. - { (char *)"VImage_add", _wrap_VImage_add, METH_VARARGS, NULL},
  81435. - { (char *)"VImage_asin", _wrap_VImage_asin, METH_VARARGS, NULL},
  81436. - { (char *)"VImage_atan", _wrap_VImage_atan, METH_VARARGS, NULL},
  81437. - { (char *)"VImage_avg", _wrap_VImage_avg, METH_VARARGS, NULL},
  81438. - { (char *)"VImage_point", _wrap_VImage_point, METH_VARARGS, NULL},
  81439. - { (char *)"VImage_point_bilinear", _wrap_VImage_point_bilinear, METH_VARARGS, NULL},
  81440. - { (char *)"VImage_bandmean", _wrap_VImage_bandmean, METH_VARARGS, NULL},
  81441. - { (char *)"VImage_ceil", _wrap_VImage_ceil, METH_VARARGS, NULL},
  81442. - { (char *)"VImage_cos", _wrap_VImage_cos, METH_VARARGS, NULL},
  81443. - { (char *)"VImage_cross_phase", _wrap_VImage_cross_phase, METH_VARARGS, NULL},
  81444. - { (char *)"VImage_deviate", _wrap_VImage_deviate, METH_VARARGS, NULL},
  81445. - { (char *)"VImage_divide", _wrap_VImage_divide, METH_VARARGS, NULL},
  81446. - { (char *)"VImage_exp10", _wrap_VImage_exp10, METH_VARARGS, NULL},
  81447. - { (char *)"VImage_expn", _wrap_VImage_expn, METH_VARARGS, NULL},
  81448. - { (char *)"VImage_exp", _wrap_VImage_exp, METH_VARARGS, NULL},
  81449. - { (char *)"VImage_floor", _wrap_VImage_floor, METH_VARARGS, NULL},
  81450. - { (char *)"VImage_invert", _wrap_VImage_invert, METH_VARARGS, NULL},
  81451. - { (char *)"VImage_linreg", _wrap_VImage_linreg, METH_VARARGS, NULL},
  81452. - { (char *)"VImage_lin", _wrap_VImage_lin, METH_VARARGS, NULL},
  81453. - { (char *)"VImage_log10", _wrap_VImage_log10, METH_VARARGS, NULL},
  81454. - { (char *)"VImage_log", _wrap_VImage_log, METH_VARARGS, NULL},
  81455. - { (char *)"VImage_max", _wrap_VImage_max, METH_VARARGS, NULL},
  81456. - { (char *)"VImage_maxpos", _wrap_VImage_maxpos, METH_VARARGS, NULL},
  81457. - { (char *)"VImage_maxpos_avg", _wrap_VImage_maxpos_avg, METH_VARARGS, NULL},
  81458. - { (char *)"VImage_measure", _wrap_VImage_measure, METH_VARARGS, NULL},
  81459. - { (char *)"VImage_min", _wrap_VImage_min, METH_VARARGS, NULL},
  81460. - { (char *)"VImage_minpos", _wrap_VImage_minpos, METH_VARARGS, NULL},
  81461. - { (char *)"VImage_multiply", _wrap_VImage_multiply, METH_VARARGS, NULL},
  81462. - { (char *)"VImage_pow", _wrap_VImage_pow, METH_VARARGS, NULL},
  81463. - { (char *)"VImage_recomb", _wrap_VImage_recomb, METH_VARARGS, NULL},
  81464. - { (char *)"VImage_remainder", _wrap_VImage_remainder, METH_VARARGS, NULL},
  81465. - { (char *)"VImage_rint", _wrap_VImage_rint, METH_VARARGS, NULL},
  81466. - { (char *)"VImage_sign", _wrap_VImage_sign, METH_VARARGS, NULL},
  81467. - { (char *)"VImage_sin", _wrap_VImage_sin, METH_VARARGS, NULL},
  81468. - { (char *)"VImage_stats", _wrap_VImage_stats, METH_VARARGS, NULL},
  81469. - { (char *)"VImage_subtract", _wrap_VImage_subtract, METH_VARARGS, NULL},
  81470. - { (char *)"VImage_tan", _wrap_VImage_tan, METH_VARARGS, NULL},
  81471. - { (char *)"VImage_greyc", _wrap_VImage_greyc, METH_VARARGS, NULL},
  81472. - { (char *)"VImage_greyc_mask", _wrap_VImage_greyc_mask, METH_VARARGS, NULL},
  81473. - { (char *)"VImage_LCh2Lab", _wrap_VImage_LCh2Lab, METH_VARARGS, NULL},
  81474. - { (char *)"VImage_LCh2UCS", _wrap_VImage_LCh2UCS, METH_VARARGS, NULL},
  81475. - { (char *)"VImage_Lab2LCh", _wrap_VImage_Lab2LCh, METH_VARARGS, NULL},
  81476. - { (char *)"VImage_Lab2LabQ", _wrap_VImage_Lab2LabQ, METH_VARARGS, NULL},
  81477. - { (char *)"VImage_Lab2LabS", _wrap_VImage_Lab2LabS, METH_VARARGS, NULL},
  81478. - { (char *)"VImage_Lab2UCS", _wrap_VImage_Lab2UCS, METH_VARARGS, NULL},
  81479. - { (char *)"VImage_Lab2XYZ", _wrap_VImage_Lab2XYZ, METH_VARARGS, NULL},
  81480. - { (char *)"VImage_Lab2XYZ_temp", _wrap_VImage_Lab2XYZ_temp, METH_VARARGS, NULL},
  81481. - { (char *)"VImage_Lab2disp", _wrap_VImage_Lab2disp, METH_VARARGS, NULL},
  81482. - { (char *)"VImage_LabQ2LabS", _wrap_VImage_LabQ2LabS, METH_VARARGS, NULL},
  81483. - { (char *)"VImage_LabQ2Lab", _wrap_VImage_LabQ2Lab, METH_VARARGS, NULL},
  81484. - { (char *)"VImage_LabQ2XYZ", _wrap_VImage_LabQ2XYZ, METH_VARARGS, NULL},
  81485. - { (char *)"VImage_LabQ2disp", _wrap_VImage_LabQ2disp, METH_VARARGS, NULL},
  81486. - { (char *)"VImage_LabS2LabQ", _wrap_VImage_LabS2LabQ, METH_VARARGS, NULL},
  81487. - { (char *)"VImage_LabS2Lab", _wrap_VImage_LabS2Lab, METH_VARARGS, NULL},
  81488. - { (char *)"VImage_UCS2LCh", _wrap_VImage_UCS2LCh, METH_VARARGS, NULL},
  81489. - { (char *)"VImage_UCS2Lab", _wrap_VImage_UCS2Lab, METH_VARARGS, NULL},
  81490. - { (char *)"VImage_UCS2XYZ", _wrap_VImage_UCS2XYZ, METH_VARARGS, NULL},
  81491. - { (char *)"VImage_XYZ2Lab", _wrap_VImage_XYZ2Lab, METH_VARARGS, NULL},
  81492. - { (char *)"VImage_XYZ2Lab_temp", _wrap_VImage_XYZ2Lab_temp, METH_VARARGS, NULL},
  81493. - { (char *)"VImage_XYZ2UCS", _wrap_VImage_XYZ2UCS, METH_VARARGS, NULL},
  81494. - { (char *)"VImage_XYZ2Yxy", _wrap_VImage_XYZ2Yxy, METH_VARARGS, NULL},
  81495. - { (char *)"VImage_XYZ2disp", _wrap_VImage_XYZ2disp, METH_VARARGS, NULL},
  81496. - { (char *)"VImage_XYZ2sRGB", _wrap_VImage_XYZ2sRGB, METH_VARARGS, NULL},
  81497. - { (char *)"VImage_Yxy2XYZ", _wrap_VImage_Yxy2XYZ, METH_VARARGS, NULL},
  81498. - { (char *)"VImage_dE00_fromLab", _wrap_VImage_dE00_fromLab, METH_VARARGS, NULL},
  81499. - { (char *)"VImage_dECMC_fromLab", _wrap_VImage_dECMC_fromLab, METH_VARARGS, NULL},
  81500. - { (char *)"VImage_dECMC_fromdisp", _wrap_VImage_dECMC_fromdisp, METH_VARARGS, NULL},
  81501. - { (char *)"VImage_dE_fromLab", _wrap_VImage_dE_fromLab, METH_VARARGS, NULL},
  81502. - { (char *)"VImage_dE_fromXYZ", _wrap_VImage_dE_fromXYZ, METH_VARARGS, NULL},
  81503. - { (char *)"VImage_dE_fromdisp", _wrap_VImage_dE_fromdisp, METH_VARARGS, NULL},
  81504. - { (char *)"VImage_disp2Lab", _wrap_VImage_disp2Lab, METH_VARARGS, NULL},
  81505. - { (char *)"VImage_disp2XYZ", _wrap_VImage_disp2XYZ, METH_VARARGS, NULL},
  81506. - { (char *)"VImage_float2rad", _wrap_VImage_float2rad, METH_VARARGS, NULL},
  81507. - { (char *)"VImage_icc_ac2rc", _wrap_VImage_icc_ac2rc, METH_VARARGS, NULL},
  81508. - { (char *)"VImage_icc_export_depth", _wrap_VImage_icc_export_depth, METH_VARARGS, NULL},
  81509. - { (char *)"VImage_icc_import", _wrap_VImage_icc_import, METH_VARARGS, NULL},
  81510. - { (char *)"VImage_icc_import_embedded", _wrap_VImage_icc_import_embedded, METH_VARARGS, NULL},
  81511. - { (char *)"VImage_icc_transform", _wrap_VImage_icc_transform, METH_VARARGS, NULL},
  81512. - { (char *)"VImage_lab_morph", _wrap_VImage_lab_morph, METH_VARARGS, NULL},
  81513. - { (char *)"VImage_rad2float", _wrap_VImage_rad2float, METH_VARARGS, NULL},
  81514. - { (char *)"VImage_sRGB2XYZ", _wrap_VImage_sRGB2XYZ, METH_VARARGS, NULL},
  81515. - { (char *)"VImage_gaussnoise", _wrap_VImage_gaussnoise, METH_VARARGS, NULL},
  81516. - { (char *)"VImage_bandjoin", _wrap_VImage_bandjoin, METH_VARARGS, NULL},
  81517. - { (char *)"VImage_black", _wrap_VImage_black, METH_VARARGS, NULL},
  81518. - { (char *)"VImage_c2amph", _wrap_VImage_c2amph, METH_VARARGS, NULL},
  81519. - { (char *)"VImage_c2imag", _wrap_VImage_c2imag, METH_VARARGS, NULL},
  81520. - { (char *)"VImage_c2real", _wrap_VImage_c2real, METH_VARARGS, NULL},
  81521. - { (char *)"VImage_c2rect", _wrap_VImage_c2rect, METH_VARARGS, NULL},
  81522. - { (char *)"VImage_clip2fmt", _wrap_VImage_clip2fmt, METH_VARARGS, NULL},
  81523. - { (char *)"VImage_copy", _wrap_VImage_copy, METH_VARARGS, NULL},
  81524. - { (char *)"VImage_copy_file", _wrap_VImage_copy_file, METH_VARARGS, NULL},
  81525. - { (char *)"VImage_copy_morph", _wrap_VImage_copy_morph, METH_VARARGS, NULL},
  81526. - { (char *)"VImage_copy_swap", _wrap_VImage_copy_swap, METH_VARARGS, NULL},
  81527. - { (char *)"VImage_copy_set", _wrap_VImage_copy_set, METH_VARARGS, NULL},
  81528. - { (char *)"VImage_extract_area", _wrap_VImage_extract_area, METH_VARARGS, NULL},
  81529. - { (char *)"VImage_extract_areabands", _wrap_VImage_extract_areabands, METH_VARARGS, NULL},
  81530. - { (char *)"VImage_extract_band", _wrap_VImage_extract_band, METH_VARARGS, NULL},
  81531. - { (char *)"VImage_extract_bands", _wrap_VImage_extract_bands, METH_VARARGS, NULL},
  81532. - { (char *)"VImage_extract", _wrap_VImage_extract, METH_VARARGS, NULL},
  81533. - { (char *)"VImage_falsecolour", _wrap_VImage_falsecolour, METH_VARARGS, NULL},
  81534. - { (char *)"VImage_fliphor", _wrap_VImage_fliphor, METH_VARARGS, NULL},
  81535. - { (char *)"VImage_flipver", _wrap_VImage_flipver, METH_VARARGS, NULL},
  81536. - { (char *)"VImage_gbandjoin", _wrap_VImage_gbandjoin, METH_VARARGS, NULL},
  81537. - { (char *)"VImage_grid", _wrap_VImage_grid, METH_VARARGS, NULL},
  81538. - { (char *)"VImage_insert", _wrap_VImage_insert, METH_VARARGS, NULL},
  81539. - { (char *)"VImage_insert_noexpand", _wrap_VImage_insert_noexpand, METH_VARARGS, NULL},
  81540. - { (char *)"VImage_embed", _wrap_VImage_embed, METH_VARARGS, NULL},
  81541. - { (char *)"VImage_lrjoin", _wrap_VImage_lrjoin, METH_VARARGS, NULL},
  81542. - { (char *)"VImage_msb", _wrap_VImage_msb, METH_VARARGS, NULL},
  81543. - { (char *)"VImage_msb_band", _wrap_VImage_msb_band, METH_VARARGS, NULL},
  81544. - { (char *)"VImage_replicate", _wrap_VImage_replicate, METH_VARARGS, NULL},
  81545. - { (char *)"VImage_ri2c", _wrap_VImage_ri2c, METH_VARARGS, NULL},
  81546. - { (char *)"VImage_rot180", _wrap_VImage_rot180, METH_VARARGS, NULL},
  81547. - { (char *)"VImage_rot270", _wrap_VImage_rot270, METH_VARARGS, NULL},
  81548. - { (char *)"VImage_rot90", _wrap_VImage_rot90, METH_VARARGS, NULL},
  81549. - { (char *)"VImage_scale", _wrap_VImage_scale, METH_VARARGS, NULL},
  81550. - { (char *)"VImage_scaleps", _wrap_VImage_scaleps, METH_VARARGS, NULL},
  81551. - { (char *)"VImage_subsample", _wrap_VImage_subsample, METH_VARARGS, NULL},
  81552. - { (char *)"VImage_system", _wrap_VImage_system, METH_VARARGS, NULL},
  81553. - { (char *)"VImage_system_image", _wrap_VImage_system_image, METH_VARARGS, NULL},
  81554. - { (char *)"VImage_tbjoin", _wrap_VImage_tbjoin, METH_VARARGS, NULL},
  81555. - { (char *)"VImage_text", _wrap_VImage_text, METH_VARARGS, NULL},
  81556. - { (char *)"VImage_wrap", _wrap_VImage_wrap, METH_VARARGS, NULL},
  81557. - { (char *)"VImage_zoom", _wrap_VImage_zoom, METH_VARARGS, NULL},
  81558. - { (char *)"VImage_aconvsep", _wrap_VImage_aconvsep, METH_VARARGS, NULL},
  81559. - { (char *)"VImage_aconv", _wrap_VImage_aconv, METH_VARARGS, NULL},
  81560. - { (char *)"VImage_addgnoise", _wrap_VImage_addgnoise, METH_VARARGS, NULL},
  81561. - { (char *)"VImage_compass", _wrap_VImage_compass, METH_VARARGS, NULL},
  81562. - { (char *)"VImage_contrast_surface", _wrap_VImage_contrast_surface, METH_VARARGS, NULL},
  81563. - { (char *)"VImage_conv", _wrap_VImage_conv, METH_VARARGS, NULL},
  81564. - { (char *)"VImage_convsep", _wrap_VImage_convsep, METH_VARARGS, NULL},
  81565. - { (char *)"VImage_fastcor", _wrap_VImage_fastcor, METH_VARARGS, NULL},
  81566. - { (char *)"VImage_gradcor", _wrap_VImage_gradcor, METH_VARARGS, NULL},
  81567. - { (char *)"VImage_gradient", _wrap_VImage_gradient, METH_VARARGS, NULL},
  81568. - { (char *)"VImage_grad_x", _wrap_VImage_grad_x, METH_VARARGS, NULL},
  81569. - { (char *)"VImage_grad_y", _wrap_VImage_grad_y, METH_VARARGS, NULL},
  81570. - { (char *)"VImage_lindetect", _wrap_VImage_lindetect, METH_VARARGS, NULL},
  81571. - { (char *)"VImage_sharpen", _wrap_VImage_sharpen, METH_VARARGS, NULL},
  81572. - { (char *)"VImage_spcor", _wrap_VImage_spcor, METH_VARARGS, NULL},
  81573. - { (char *)"VImage_argb2rgba", _wrap_VImage_argb2rgba, METH_VARARGS, NULL},
  81574. - { (char *)"VImage_flood_copy", _wrap_VImage_flood_copy, METH_VARARGS, NULL},
  81575. - { (char *)"VImage_flood_blob_copy", _wrap_VImage_flood_blob_copy, METH_VARARGS, NULL},
  81576. - { (char *)"VImage_flood_other_copy", _wrap_VImage_flood_other_copy, METH_VARARGS, NULL},
  81577. - { (char *)"VImage_clip", _wrap_VImage_clip, METH_VARARGS, NULL},
  81578. - { (char *)"VImage_c2ps", _wrap_VImage_c2ps, METH_VARARGS, NULL},
  81579. - { (char *)"VImage_resize_linear", _wrap_VImage_resize_linear, METH_VARARGS, NULL},
  81580. - { (char *)"VImage_cmulnorm", _wrap_VImage_cmulnorm, METH_VARARGS, NULL},
  81581. - { (char *)"VImage_fav4", _wrap_VImage_fav4, METH_VARARGS, NULL},
  81582. - { (char *)"VImage_gadd", _wrap_VImage_gadd, METH_VARARGS, NULL},
  81583. - { (char *)"VImage_icc_export", _wrap_VImage_icc_export, METH_VARARGS, NULL},
  81584. - { (char *)"VImage_litecor", _wrap_VImage_litecor, METH_VARARGS, NULL},
  81585. - { (char *)"VImage_affine", _wrap_VImage_affine, METH_VARARGS, NULL},
  81586. - { (char *)"VImage_clip2c", _wrap_VImage_clip2c, METH_VARARGS, NULL},
  81587. - { (char *)"VImage_clip2cm", _wrap_VImage_clip2cm, METH_VARARGS, NULL},
  81588. - { (char *)"VImage_clip2d", _wrap_VImage_clip2d, METH_VARARGS, NULL},
  81589. - { (char *)"VImage_clip2dcm", _wrap_VImage_clip2dcm, METH_VARARGS, NULL},
  81590. - { (char *)"VImage_clip2f", _wrap_VImage_clip2f, METH_VARARGS, NULL},
  81591. - { (char *)"VImage_clip2i", _wrap_VImage_clip2i, METH_VARARGS, NULL},
  81592. - { (char *)"VImage_convsub", _wrap_VImage_convsub, METH_VARARGS, NULL},
  81593. - { (char *)"VImage_convf", _wrap_VImage_convf, METH_VARARGS, NULL},
  81594. - { (char *)"VImage_convsepf", _wrap_VImage_convsepf, METH_VARARGS, NULL},
  81595. - { (char *)"VImage_clip2s", _wrap_VImage_clip2s, METH_VARARGS, NULL},
  81596. - { (char *)"VImage_clip2ui", _wrap_VImage_clip2ui, METH_VARARGS, NULL},
  81597. - { (char *)"VImage_clip2us", _wrap_VImage_clip2us, METH_VARARGS, NULL},
  81598. - { (char *)"VImage_slice", _wrap_VImage_slice, METH_VARARGS, NULL},
  81599. - { (char *)"VImage_segment", _wrap_VImage_segment, METH_VARARGS, NULL},
  81600. - { (char *)"VImage_thresh", _wrap_VImage_thresh, METH_VARARGS, NULL},
  81601. - { (char *)"VImage_convf_raw", _wrap_VImage_convf_raw, METH_VARARGS, NULL},
  81602. - { (char *)"VImage_conv_raw", _wrap_VImage_conv_raw, METH_VARARGS, NULL},
  81603. - { (char *)"VImage_contrast_surface_raw", _wrap_VImage_contrast_surface_raw, METH_VARARGS, NULL},
  81604. - { (char *)"VImage_convsepf_raw", _wrap_VImage_convsepf_raw, METH_VARARGS, NULL},
  81605. - { (char *)"VImage_convsep_raw", _wrap_VImage_convsep_raw, METH_VARARGS, NULL},
  81606. - { (char *)"VImage_fastcor_raw", _wrap_VImage_fastcor_raw, METH_VARARGS, NULL},
  81607. - { (char *)"VImage_gradcor_raw", _wrap_VImage_gradcor_raw, METH_VARARGS, NULL},
  81608. - { (char *)"VImage_spcor_raw", _wrap_VImage_spcor_raw, METH_VARARGS, NULL},
  81609. - { (char *)"VImage_lhisteq_raw", _wrap_VImage_lhisteq_raw, METH_VARARGS, NULL},
  81610. - { (char *)"VImage_stdif_raw", _wrap_VImage_stdif_raw, METH_VARARGS, NULL},
  81611. - { (char *)"VImage_rank_raw", _wrap_VImage_rank_raw, METH_VARARGS, NULL},
  81612. - { (char *)"VImage_dilate_raw", _wrap_VImage_dilate_raw, METH_VARARGS, NULL},
  81613. - { (char *)"VImage_erode_raw", _wrap_VImage_erode_raw, METH_VARARGS, NULL},
  81614. - { (char *)"VImage_similarity_area", _wrap_VImage_similarity_area, METH_VARARGS, NULL},
  81615. - { (char *)"VImage_similarity", _wrap_VImage_similarity, METH_VARARGS, NULL},
  81616. - { (char *)"VImage_mask2vips", _wrap_VImage_mask2vips, METH_VARARGS, NULL},
  81617. - { (char *)"VImage_vips2mask", _wrap_VImage_vips2mask, METH_VARARGS, NULL},
  81618. - { (char *)"VImage_insertplace", _wrap_VImage_insertplace, METH_VARARGS, NULL},
  81619. - { (char *)"VImage_circle", _wrap_VImage_circle, METH_VARARGS, NULL},
  81620. - { (char *)"VImage_andimage", _wrap_VImage_andimage, METH_VARARGS, NULL},
  81621. - { (char *)"VImage_orimage", _wrap_VImage_orimage, METH_VARARGS, NULL},
  81622. - { (char *)"VImage_eorimage", _wrap_VImage_eorimage, METH_VARARGS, NULL},
  81623. - { (char *)"VImage_shiftleft", _wrap_VImage_shiftleft, METH_VARARGS, NULL},
  81624. - { (char *)"VImage_shiftright", _wrap_VImage_shiftright, METH_VARARGS, NULL},
  81625. - { (char *)"VImage_blend", _wrap_VImage_blend, METH_VARARGS, NULL},
  81626. - { (char *)"VImage_equal", _wrap_VImage_equal, METH_VARARGS, NULL},
  81627. - { (char *)"VImage_ifthenelse", _wrap_VImage_ifthenelse, METH_VARARGS, NULL},
  81628. - { (char *)"VImage_less", _wrap_VImage_less, METH_VARARGS, NULL},
  81629. - { (char *)"VImage_lesseq", _wrap_VImage_lesseq, METH_VARARGS, NULL},
  81630. - { (char *)"VImage_more", _wrap_VImage_more, METH_VARARGS, NULL},
  81631. - { (char *)"VImage_moreeq", _wrap_VImage_moreeq, METH_VARARGS, NULL},
  81632. - { (char *)"VImage_notequal", _wrap_VImage_notequal, METH_VARARGS, NULL},
  81633. - { (char *)"VImage_quadratic", _wrap_VImage_quadratic, METH_VARARGS, NULL},
  81634. - { (char *)"VImage_csv2vips", _wrap_VImage_csv2vips, METH_VARARGS, NULL},
  81635. - { (char *)"VImage_fits2vips", _wrap_VImage_fits2vips, METH_VARARGS, NULL},
  81636. - { (char *)"VImage_jpeg2vips", _wrap_VImage_jpeg2vips, METH_VARARGS, NULL},
  81637. - { (char *)"VImage_magick2vips", _wrap_VImage_magick2vips, METH_VARARGS, NULL},
  81638. - { (char *)"VImage_png2vips", _wrap_VImage_png2vips, METH_VARARGS, NULL},
  81639. - { (char *)"VImage_exr2vips", _wrap_VImage_exr2vips, METH_VARARGS, NULL},
  81640. - { (char *)"VImage_ppm2vips", _wrap_VImage_ppm2vips, METH_VARARGS, NULL},
  81641. - { (char *)"VImage_analyze2vips", _wrap_VImage_analyze2vips, METH_VARARGS, NULL},
  81642. - { (char *)"VImage_tiff2vips", _wrap_VImage_tiff2vips, METH_VARARGS, NULL},
  81643. - { (char *)"VImage_vips2csv", _wrap_VImage_vips2csv, METH_VARARGS, NULL},
  81644. - { (char *)"VImage_vips2dz", _wrap_VImage_vips2dz, METH_VARARGS, NULL},
  81645. - { (char *)"VImage_vips2jpeg", _wrap_VImage_vips2jpeg, METH_VARARGS, NULL},
  81646. - { (char *)"VImage_vips2mimejpeg", _wrap_VImage_vips2mimejpeg, METH_VARARGS, NULL},
  81647. - { (char *)"VImage_vips2png", _wrap_VImage_vips2png, METH_VARARGS, NULL},
  81648. - { (char *)"VImage_vips2ppm", _wrap_VImage_vips2ppm, METH_VARARGS, NULL},
  81649. - { (char *)"VImage_vips2tiff", _wrap_VImage_vips2tiff, METH_VARARGS, NULL},
  81650. - { (char *)"VImage_create_fmask", _wrap_VImage_create_fmask, METH_VARARGS, NULL},
  81651. - { (char *)"VImage_disp_ps", _wrap_VImage_disp_ps, METH_VARARGS, NULL},
  81652. - { (char *)"VImage_flt_image_freq", _wrap_VImage_flt_image_freq, METH_VARARGS, NULL},
  81653. - { (char *)"VImage_fractsurf", _wrap_VImage_fractsurf, METH_VARARGS, NULL},
  81654. - { (char *)"VImage_freqflt", _wrap_VImage_freqflt, METH_VARARGS, NULL},
  81655. - { (char *)"VImage_fwfft", _wrap_VImage_fwfft, METH_VARARGS, NULL},
  81656. - { (char *)"VImage_rotquad", _wrap_VImage_rotquad, METH_VARARGS, NULL},
  81657. - { (char *)"VImage_invfft", _wrap_VImage_invfft, METH_VARARGS, NULL},
  81658. - { (char *)"VImage_phasecor_fft", _wrap_VImage_phasecor_fft, METH_VARARGS, NULL},
  81659. - { (char *)"VImage_invfftr", _wrap_VImage_invfftr, METH_VARARGS, NULL},
  81660. - { (char *)"VImage_gammacorrect", _wrap_VImage_gammacorrect, METH_VARARGS, NULL},
  81661. - { (char *)"VImage_heq", _wrap_VImage_heq, METH_VARARGS, NULL},
  81662. - { (char *)"VImage_hist", _wrap_VImage_hist, METH_VARARGS, NULL},
  81663. - { (char *)"VImage_histcum", _wrap_VImage_histcum, METH_VARARGS, NULL},
  81664. - { (char *)"VImage_histeq", _wrap_VImage_histeq, METH_VARARGS, NULL},
  81665. - { (char *)"VImage_hist_indexed", _wrap_VImage_hist_indexed, METH_VARARGS, NULL},
  81666. - { (char *)"VImage_histgr", _wrap_VImage_histgr, METH_VARARGS, NULL},
  81667. - { (char *)"VImage_histnD", _wrap_VImage_histnD, METH_VARARGS, NULL},
  81668. - { (char *)"VImage_histnorm", _wrap_VImage_histnorm, METH_VARARGS, NULL},
  81669. - { (char *)"VImage_histplot", _wrap_VImage_histplot, METH_VARARGS, NULL},
  81670. - { (char *)"VImage_histspec", _wrap_VImage_histspec, METH_VARARGS, NULL},
  81671. - { (char *)"VImage_hsp", _wrap_VImage_hsp, METH_VARARGS, NULL},
  81672. - { (char *)"VImage_identity", _wrap_VImage_identity, METH_VARARGS, NULL},
  81673. - { (char *)"VImage_identity_ushort", _wrap_VImage_identity_ushort, METH_VARARGS, NULL},
  81674. - { (char *)"VImage_ismonotonic", _wrap_VImage_ismonotonic, METH_VARARGS, NULL},
  81675. - { (char *)"VImage_lhisteq", _wrap_VImage_lhisteq, METH_VARARGS, NULL},
  81676. - { (char *)"VImage_mpercent", _wrap_VImage_mpercent, METH_VARARGS, NULL},
  81677. - { (char *)"VImage_invertlut", _wrap_VImage_invertlut, METH_VARARGS, NULL},
  81678. - { (char *)"VImage_buildlut", _wrap_VImage_buildlut, METH_VARARGS, NULL},
  81679. - { (char *)"VImage_maplut", _wrap_VImage_maplut, METH_VARARGS, NULL},
  81680. - { (char *)"VImage_project", _wrap_VImage_project, METH_VARARGS, NULL},
  81681. - { (char *)"VImage_stdif", _wrap_VImage_stdif, METH_VARARGS, NULL},
  81682. - { (char *)"VImage_tone_analyse", _wrap_VImage_tone_analyse, METH_VARARGS, NULL},
  81683. - { (char *)"VImage_tone_build", _wrap_VImage_tone_build, METH_VARARGS, NULL},
  81684. - { (char *)"VImage_tone_build_range", _wrap_VImage_tone_build_range, METH_VARARGS, NULL},
  81685. - { (char *)"VImage_tone_map", _wrap_VImage_tone_map, METH_VARARGS, NULL},
  81686. - { (char *)"VImage_draw_circle", _wrap_VImage_draw_circle, METH_VARARGS, NULL},
  81687. - { (char *)"VImage_draw_rect", _wrap_VImage_draw_rect, METH_VARARGS, NULL},
  81688. - { (char *)"VImage_draw_line", _wrap_VImage_draw_line, METH_VARARGS, NULL},
  81689. - { (char *)"VImage_draw_point", _wrap_VImage_draw_point, METH_VARARGS, NULL},
  81690. - { (char *)"VImage_draw_smudge", _wrap_VImage_draw_smudge, METH_VARARGS, NULL},
  81691. - { (char *)"VImage_draw_flood", _wrap_VImage_draw_flood, METH_VARARGS, NULL},
  81692. - { (char *)"VImage_draw_flood_blob", _wrap_VImage_draw_flood_blob, METH_VARARGS, NULL},
  81693. - { (char *)"VImage_draw_flood_other", _wrap_VImage_draw_flood_other, METH_VARARGS, NULL},
  81694. - { (char *)"VImage_draw_image", _wrap_VImage_draw_image, METH_VARARGS, NULL},
  81695. - { (char *)"VImage_draw_mask", _wrap_VImage_draw_mask, METH_VARARGS, NULL},
  81696. - { (char *)"VImage_line", _wrap_VImage_line, METH_VARARGS, NULL},
  81697. - { (char *)"VImage_binfile", _wrap_VImage_binfile, METH_VARARGS, NULL},
  81698. - { (char *)"VImage_cache", _wrap_VImage_cache, METH_VARARGS, NULL},
  81699. - { (char *)"VImage_getext", _wrap_VImage_getext, METH_VARARGS, NULL},
  81700. - { (char *)"VImage_header_get_typeof", _wrap_VImage_header_get_typeof, METH_VARARGS, NULL},
  81701. - { (char *)"VImage_header_int", _wrap_VImage_header_int, METH_VARARGS, NULL},
  81702. - { (char *)"VImage_header_double", _wrap_VImage_header_double, METH_VARARGS, NULL},
  81703. - { (char *)"VImage_header_string", _wrap_VImage_header_string, METH_VARARGS, NULL},
  81704. - { (char *)"VImage_history_get", _wrap_VImage_history_get, METH_VARARGS, NULL},
  81705. - { (char *)"VImage_printdesc", _wrap_VImage_printdesc, METH_VARARGS, NULL},
  81706. - { (char *)"VImage_cntlines", _wrap_VImage_cntlines, METH_VARARGS, NULL},
  81707. - { (char *)"VImage_dilate", _wrap_VImage_dilate, METH_VARARGS, NULL},
  81708. - { (char *)"VImage_rank", _wrap_VImage_rank, METH_VARARGS, NULL},
  81709. - { (char *)"VImage_rank_image", _wrap_VImage_rank_image, METH_VARARGS, NULL},
  81710. - { (char *)"VImage_maxvalue", _wrap_VImage_maxvalue, METH_VARARGS, NULL},
  81711. - { (char *)"VImage_label_regions", _wrap_VImage_label_regions, METH_VARARGS, NULL},
  81712. - { (char *)"VImage_zerox", _wrap_VImage_zerox, METH_VARARGS, NULL},
  81713. - { (char *)"VImage_erode", _wrap_VImage_erode, METH_VARARGS, NULL},
  81714. - { (char *)"VImage_profile", _wrap_VImage_profile, METH_VARARGS, NULL},
  81715. - { (char *)"VImage_align_bands", _wrap_VImage_align_bands, METH_VARARGS, NULL},
  81716. - { (char *)"VImage_correl", _wrap_VImage_correl, METH_VARARGS, NULL},
  81717. - { (char *)"VImage__find_lroverlap", _wrap_VImage__find_lroverlap, METH_VARARGS, NULL},
  81718. - { (char *)"VImage__find_tboverlap", _wrap_VImage__find_tboverlap, METH_VARARGS, NULL},
  81719. - { (char *)"VImage_global_balance", _wrap_VImage_global_balance, METH_VARARGS, NULL},
  81720. - { (char *)"VImage_global_balancef", _wrap_VImage_global_balancef, METH_VARARGS, NULL},
  81721. - { (char *)"VImage_lrmerge", _wrap_VImage_lrmerge, METH_VARARGS, NULL},
  81722. - { (char *)"VImage_lrmerge1", _wrap_VImage_lrmerge1, METH_VARARGS, NULL},
  81723. - { (char *)"VImage_lrmosaic", _wrap_VImage_lrmosaic, METH_VARARGS, NULL},
  81724. - { (char *)"VImage_lrmosaic1", _wrap_VImage_lrmosaic1, METH_VARARGS, NULL},
  81725. - { (char *)"VImage_match_linear", _wrap_VImage_match_linear, METH_VARARGS, NULL},
  81726. - { (char *)"VImage_match_linear_search", _wrap_VImage_match_linear_search, METH_VARARGS, NULL},
  81727. - { (char *)"VImage_maxpos_subpel", _wrap_VImage_maxpos_subpel, METH_VARARGS, NULL},
  81728. - { (char *)"VImage_remosaic", _wrap_VImage_remosaic, METH_VARARGS, NULL},
  81729. - { (char *)"VImage_tbmerge", _wrap_VImage_tbmerge, METH_VARARGS, NULL},
  81730. - { (char *)"VImage_tbmerge1", _wrap_VImage_tbmerge1, METH_VARARGS, NULL},
  81731. - { (char *)"VImage_tbmosaic", _wrap_VImage_tbmosaic, METH_VARARGS, NULL},
  81732. - { (char *)"VImage_tbmosaic1", _wrap_VImage_tbmosaic1, METH_VARARGS, NULL},
  81733. - { (char *)"VImage_benchmark", _wrap_VImage_benchmark, METH_VARARGS, NULL},
  81734. - { (char *)"VImage_benchmark2", _wrap_VImage_benchmark2, METH_VARARGS, NULL},
  81735. - { (char *)"VImage_benchmarkn", _wrap_VImage_benchmarkn, METH_VARARGS, NULL},
  81736. - { (char *)"VImage_eye", _wrap_VImage_eye, METH_VARARGS, NULL},
  81737. - { (char *)"VImage_grey", _wrap_VImage_grey, METH_VARARGS, NULL},
  81738. - { (char *)"VImage_feye", _wrap_VImage_feye, METH_VARARGS, NULL},
  81739. - { (char *)"VImage_fgrey", _wrap_VImage_fgrey, METH_VARARGS, NULL},
  81740. - { (char *)"VImage_fzone", _wrap_VImage_fzone, METH_VARARGS, NULL},
  81741. - { (char *)"VImage_make_xy", _wrap_VImage_make_xy, METH_VARARGS, NULL},
  81742. - { (char *)"VImage_sines", _wrap_VImage_sines, METH_VARARGS, NULL},
  81743. - { (char *)"VImage_zone", _wrap_VImage_zone, METH_VARARGS, NULL},
  81744. - { (char *)"VImage_rightshift_size", _wrap_VImage_rightshift_size, METH_VARARGS, NULL},
  81745. - { (char *)"VImage_shrink", _wrap_VImage_shrink, METH_VARARGS, NULL},
  81746. - { (char *)"VImage_stretch3", _wrap_VImage_stretch3, METH_VARARGS, NULL},
  81747. - { (char *)"VImage_affinei", _wrap_VImage_affinei, METH_VARARGS, NULL},
  81748. - { (char *)"VImage_affinei_all", _wrap_VImage_affinei_all, METH_VARARGS, NULL},
  81749. - { (char *)"VImage_video_test", _wrap_VImage_video_test, METH_VARARGS, NULL},
  81750. - { (char *)"VImage_video_v4l1", _wrap_VImage_video_v4l1, METH_VARARGS, NULL},
  81751. - { (char *)"VImage_tobuffer", _wrap_VImage_tobuffer, METH_VARARGS, NULL},
  81752. - { (char *)"VImage_frombuffer", _wrap_VImage_frombuffer, METH_VARARGS, NULL},
  81753. - { (char *)"VImage_tostring", _wrap_VImage_tostring, METH_VARARGS, NULL},
  81754. - { (char *)"VImage_fromstring", _wrap_VImage_fromstring, METH_VARARGS, NULL},
  81755. - { (char *)"VImage_swigregister", VImage_swigregister, METH_VARARGS, NULL},
  81756. - { (char *)"im_init_world", _wrap_im_init_world, METH_VARARGS, NULL},
  81757. - { (char *)"im__print_all", _wrap_im__print_all, METH_VARARGS, NULL},
  81758. - { (char *)"im_col_Lab2XYZ", _wrap_im_col_Lab2XYZ, METH_VARARGS, NULL},
  81759. - { NULL, NULL, 0, NULL }
  81760. -};
  81761. -
  81762. -
  81763. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  81764. -
  81765. -static swig_type_info _swigt__p_GType = {"_p_GType", "GType *", 0, 0, (void*)0, 0};
  81766. -static swig_type_info _swigt__p_VBuffer = {"_p_VBuffer", "VBuffer *", 0, 0, (void*)0, 0};
  81767. -static swig_type_info _swigt__p__VipsImage = {"_p__VipsImage", "_VipsImage *", 0, 0, (void*)0, 0};
  81768. -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
  81769. -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  81770. -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
  81771. -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
  81772. -static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
  81773. -static swig_type_info _swigt__p_gboolean = {"_p_gboolean", "gboolean *", 0, 0, (void*)0, 0};
  81774. -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
  81775. -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
  81776. -static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0};
  81777. -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
  81778. -static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
  81779. -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
  81780. -static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0};
  81781. -static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0};
  81782. -static swig_type_info _swigt__p_std__allocatorT_vips__VImage_t = {"_p_std__allocatorT_vips__VImage_t", "std::vector< vips::VImage >::allocator_type *|std::allocator< vips::VImage > *", 0, 0, (void*)0, 0};
  81783. -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
  81784. -static swig_type_info _swigt__p_std__vectorT__Tp__Alloc_t = {"_p_std__vectorT__Tp__Alloc_t", "std::vector< _Tp,_Alloc > *", 0, 0, (void*)0, 0};
  81785. -static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0};
  81786. -static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0};
  81787. -static swig_type_info _swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t = {"_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t", "std::vector< vips::VImage > *|std::vector< vips::VImage,std::allocator< vips::VImage > > *", 0, 0, (void*)0, 0};
  81788. -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
  81789. -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
  81790. -static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0};
  81791. -static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0};
  81792. -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
  81793. -static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0};
  81794. -static swig_type_info _swigt__p_vips__VImage = {"_p_vips__VImage", "vips::VImage *|std::vector< vips::VImage >::value_type *", 0, 0, (void*)0, 0};
  81795. -static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
  81796. -
  81797. -static swig_type_info *swig_type_initial[] = {
  81798. - &_swigt__p_GType,
  81799. - &_swigt__p_VBuffer,
  81800. - &_swigt__p__VipsImage,
  81801. - &_swigt__p_allocator_type,
  81802. - &_swigt__p_char,
  81803. - &_swigt__p_difference_type,
  81804. - &_swigt__p_double,
  81805. - &_swigt__p_float,
  81806. - &_swigt__p_gboolean,
  81807. - &_swigt__p_int,
  81808. - &_swigt__p_matrix,
  81809. - &_swigt__p_p_PyObject,
  81810. - &_swigt__p_p_char,
  81811. - &_swigt__p_size_t,
  81812. - &_swigt__p_size_type,
  81813. - &_swigt__p_std__allocatorT_double_t,
  81814. - &_swigt__p_std__allocatorT_int_t,
  81815. - &_swigt__p_std__allocatorT_vips__VImage_t,
  81816. - &_swigt__p_std__invalid_argument,
  81817. - &_swigt__p_std__vectorT__Tp__Alloc_t,
  81818. - &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t,
  81819. - &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t,
  81820. - &_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t,
  81821. - &_swigt__p_swig__SwigPyIterator,
  81822. - &_swigt__p_value_type,
  81823. - &_swigt__p_vips__VDMask,
  81824. - &_swigt__p_vips__VDisplay,
  81825. - &_swigt__p_vips__VError,
  81826. - &_swigt__p_vips__VIMask,
  81827. - &_swigt__p_vips__VImage,
  81828. - &_swigt__p_void,
  81829. -};
  81830. -
  81831. -static swig_cast_info _swigc__p_GType[] = { {&_swigt__p_GType, 0, 0, 0},{0, 0, 0, 0}};
  81832. -static swig_cast_info _swigc__p_VBuffer[] = { {&_swigt__p_VBuffer, 0, 0, 0},{0, 0, 0, 0}};
  81833. -static swig_cast_info _swigc__p__VipsImage[] = { {&_swigt__p__VipsImage, 0, 0, 0},{0, 0, 0, 0}};
  81834. -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
  81835. -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  81836. -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
  81837. -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
  81838. -static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
  81839. -static swig_cast_info _swigc__p_gboolean[] = { {&_swigt__p_gboolean, 0, 0, 0},{0, 0, 0, 0}};
  81840. -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
  81841. -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
  81842. -static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}};
  81843. -static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
  81844. -static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
  81845. -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
  81846. -static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
  81847. -static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
  81848. -static swig_cast_info _swigc__p_std__allocatorT_vips__VImage_t[] = { {&_swigt__p_std__allocatorT_vips__VImage_t, 0, 0, 0},{0, 0, 0, 0}};
  81849. -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
  81850. -static swig_cast_info _swigc__p_std__vectorT__Tp__Alloc_t[] = { {&_swigt__p_std__vectorT__Tp__Alloc_t, 0, 0, 0},{0, 0, 0, 0}};
  81851. -static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
  81852. -static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
  81853. -static swig_cast_info _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t[] = { {&_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0, 0, 0},{0, 0, 0, 0}};
  81854. -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
  81855. -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
  81856. -static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}};
  81857. -static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}};
  81858. -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
  81859. -static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}};
  81860. -static swig_cast_info _swigc__p_vips__VImage[] = { {&_swigt__p_vips__VImage, 0, 0, 0},{0, 0, 0, 0}};
  81861. -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
  81862. -
  81863. -static swig_cast_info *swig_cast_initial[] = {
  81864. - _swigc__p_GType,
  81865. - _swigc__p_VBuffer,
  81866. - _swigc__p__VipsImage,
  81867. - _swigc__p_allocator_type,
  81868. - _swigc__p_char,
  81869. - _swigc__p_difference_type,
  81870. - _swigc__p_double,
  81871. - _swigc__p_float,
  81872. - _swigc__p_gboolean,
  81873. - _swigc__p_int,
  81874. - _swigc__p_matrix,
  81875. - _swigc__p_p_PyObject,
  81876. - _swigc__p_p_char,
  81877. - _swigc__p_size_t,
  81878. - _swigc__p_size_type,
  81879. - _swigc__p_std__allocatorT_double_t,
  81880. - _swigc__p_std__allocatorT_int_t,
  81881. - _swigc__p_std__allocatorT_vips__VImage_t,
  81882. - _swigc__p_std__invalid_argument,
  81883. - _swigc__p_std__vectorT__Tp__Alloc_t,
  81884. - _swigc__p_std__vectorT_double_std__allocatorT_double_t_t,
  81885. - _swigc__p_std__vectorT_int_std__allocatorT_int_t_t,
  81886. - _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t,
  81887. - _swigc__p_swig__SwigPyIterator,
  81888. - _swigc__p_value_type,
  81889. - _swigc__p_vips__VDMask,
  81890. - _swigc__p_vips__VDisplay,
  81891. - _swigc__p_vips__VError,
  81892. - _swigc__p_vips__VIMask,
  81893. - _swigc__p_vips__VImage,
  81894. - _swigc__p_void,
  81895. -};
  81896. -
  81897. -
  81898. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  81899. -
  81900. -static swig_const_info swig_const_table[] = {
  81901. -{0, 0, 0, 0.0, 0, 0}};
  81902. -
  81903. -#ifdef __cplusplus
  81904. -}
  81905. -#endif
  81906. -/* -----------------------------------------------------------------------------
  81907. - * Type initialization:
  81908. - * This problem is tough by the requirement that no dynamic
  81909. - * memory is used. Also, since swig_type_info structures store pointers to
  81910. - * swig_cast_info structures and swig_cast_info structures store pointers back
  81911. - * to swig_type_info structures, we need some lookup code at initialization.
  81912. - * The idea is that swig generates all the structures that are needed.
  81913. - * The runtime then collects these partially filled structures.
  81914. - * The SWIG_InitializeModule function takes these initial arrays out of
  81915. - * swig_module, and does all the lookup, filling in the swig_module.types
  81916. - * array with the correct data and linking the correct swig_cast_info
  81917. - * structures together.
  81918. - *
  81919. - * The generated swig_type_info structures are assigned staticly to an initial
  81920. - * array. We just loop through that array, and handle each type individually.
  81921. - * First we lookup if this type has been already loaded, and if so, use the
  81922. - * loaded structure instead of the generated one. Then we have to fill in the
  81923. - * cast linked list. The cast data is initially stored in something like a
  81924. - * two-dimensional array. Each row corresponds to a type (there are the same
  81925. - * number of rows as there are in the swig_type_initial array). Each entry in
  81926. - * a column is one of the swig_cast_info structures for that type.
  81927. - * The cast_initial array is actually an array of arrays, because each row has
  81928. - * a variable number of columns. So to actually build the cast linked list,
  81929. - * we find the array of casts associated with the type, and loop through it
  81930. - * adding the casts to the list. The one last trick we need to do is making
  81931. - * sure the type pointer in the swig_cast_info struct is correct.
  81932. - *
  81933. - * First off, we lookup the cast->type name to see if it is already loaded.
  81934. - * There are three cases to handle:
  81935. - * 1) If the cast->type has already been loaded AND the type we are adding
  81936. - * casting info to has not been loaded (it is in this module), THEN we
  81937. - * replace the cast->type pointer with the type pointer that has already
  81938. - * been loaded.
  81939. - * 2) If BOTH types (the one we are adding casting info to, and the
  81940. - * cast->type) are loaded, THEN the cast info has already been loaded by
  81941. - * the previous module so we just ignore it.
  81942. - * 3) Finally, if cast->type has not already been loaded, then we add that
  81943. - * swig_cast_info to the linked list (because the cast->type) pointer will
  81944. - * be correct.
  81945. - * ----------------------------------------------------------------------------- */
  81946. -
  81947. -#ifdef __cplusplus
  81948. -extern "C" {
  81949. -#if 0
  81950. -} /* c-mode */
  81951. -#endif
  81952. -#endif
  81953. -
  81954. -#if 0
  81955. -#define SWIGRUNTIME_DEBUG
  81956. -#endif
  81957. -
  81958. -
  81959. -SWIGRUNTIME void
  81960. -SWIG_InitializeModule(void *clientdata) {
  81961. - size_t i;
  81962. - swig_module_info *module_head, *iter;
  81963. - int found, init;
  81964. -
  81965. - /* check to see if the circular list has been setup, if not, set it up */
  81966. - if (swig_module.next==0) {
  81967. - /* Initialize the swig_module */
  81968. - swig_module.type_initial = swig_type_initial;
  81969. - swig_module.cast_initial = swig_cast_initial;
  81970. - swig_module.next = &swig_module;
  81971. - init = 1;
  81972. - } else {
  81973. - init = 0;
  81974. - }
  81975. -
  81976. - /* Try and load any already created modules */
  81977. - module_head = SWIG_GetModule(clientdata);
  81978. - if (!module_head) {
  81979. - /* This is the first module loaded for this interpreter */
  81980. - /* so set the swig module into the interpreter */
  81981. - SWIG_SetModule(clientdata, &swig_module);
  81982. - module_head = &swig_module;
  81983. - } else {
  81984. - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  81985. - found=0;
  81986. - iter=module_head;
  81987. - do {
  81988. - if (iter==&swig_module) {
  81989. - found=1;
  81990. - break;
  81991. - }
  81992. - iter=iter->next;
  81993. - } while (iter!= module_head);
  81994. -
  81995. - /* if the is found in the list, then all is done and we may leave */
  81996. - if (found) return;
  81997. - /* otherwise we must add out module into the list */
  81998. - swig_module.next = module_head->next;
  81999. - module_head->next = &swig_module;
  82000. - }
  82001. -
  82002. - /* When multiple interpeters are used, a module could have already been initialized in
  82003. - a different interpreter, but not yet have a pointer in this interpreter.
  82004. - In this case, we do not want to continue adding types... everything should be
  82005. - set up already */
  82006. - if (init == 0) return;
  82007. -
  82008. - /* Now work on filling in swig_module.types */
  82009. -#ifdef SWIGRUNTIME_DEBUG
  82010. - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  82011. -#endif
  82012. - for (i = 0; i < swig_module.size; ++i) {
  82013. - swig_type_info *type = 0;
  82014. - swig_type_info *ret;
  82015. - swig_cast_info *cast;
  82016. -
  82017. -#ifdef SWIGRUNTIME_DEBUG
  82018. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  82019. -#endif
  82020. -
  82021. - /* if there is another module already loaded */
  82022. - if (swig_module.next != &swig_module) {
  82023. - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  82024. - }
  82025. - if (type) {
  82026. - /* Overwrite clientdata field */
  82027. -#ifdef SWIGRUNTIME_DEBUG
  82028. - printf("SWIG_InitializeModule: found type %s\n", type->name);
  82029. -#endif
  82030. - if (swig_module.type_initial[i]->clientdata) {
  82031. - type->clientdata = swig_module.type_initial[i]->clientdata;
  82032. -#ifdef SWIGRUNTIME_DEBUG
  82033. - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  82034. -#endif
  82035. - }
  82036. - } else {
  82037. - type = swig_module.type_initial[i];
  82038. - }
  82039. -
  82040. - /* Insert casting types */
  82041. - cast = swig_module.cast_initial[i];
  82042. - while (cast->type) {
  82043. - /* Don't need to add information already in the list */
  82044. - ret = 0;
  82045. -#ifdef SWIGRUNTIME_DEBUG
  82046. - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  82047. -#endif
  82048. - if (swig_module.next != &swig_module) {
  82049. - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  82050. -#ifdef SWIGRUNTIME_DEBUG
  82051. - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  82052. -#endif
  82053. - }
  82054. - if (ret) {
  82055. - if (type == swig_module.type_initial[i]) {
  82056. -#ifdef SWIGRUNTIME_DEBUG
  82057. - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  82058. -#endif
  82059. - cast->type = ret;
  82060. - ret = 0;
  82061. - } else {
  82062. - /* Check for casting already in the list */
  82063. - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  82064. -#ifdef SWIGRUNTIME_DEBUG
  82065. - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  82066. -#endif
  82067. - if (!ocast) ret = 0;
  82068. - }
  82069. - }
  82070. -
  82071. - if (!ret) {
  82072. -#ifdef SWIGRUNTIME_DEBUG
  82073. - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  82074. -#endif
  82075. - if (type->cast) {
  82076. - type->cast->prev = cast;
  82077. - cast->next = type->cast;
  82078. - }
  82079. - type->cast = cast;
  82080. - }
  82081. - cast++;
  82082. - }
  82083. - /* Set entry in modules->types array equal to the type */
  82084. - swig_module.types[i] = type;
  82085. - }
  82086. - swig_module.types[i] = 0;
  82087. -
  82088. -#ifdef SWIGRUNTIME_DEBUG
  82089. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  82090. - for (i = 0; i < swig_module.size; ++i) {
  82091. - int j = 0;
  82092. - swig_cast_info *cast = swig_module.cast_initial[i];
  82093. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  82094. - while (cast->type) {
  82095. - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  82096. - cast++;
  82097. - ++j;
  82098. - }
  82099. - printf("---- Total casts: %d\n",j);
  82100. - }
  82101. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  82102. -#endif
  82103. -}
  82104. -
  82105. -/* This function will propagate the clientdata field of type to
  82106. -* any new swig_type_info structures that have been added into the list
  82107. -* of equivalent types. It is like calling
  82108. -* SWIG_TypeClientData(type, clientdata) a second time.
  82109. -*/
  82110. -SWIGRUNTIME void
  82111. -SWIG_PropagateClientData(void) {
  82112. - size_t i;
  82113. - swig_cast_info *equiv;
  82114. - static int init_run = 0;
  82115. -
  82116. - if (init_run) return;
  82117. - init_run = 1;
  82118. -
  82119. - for (i = 0; i < swig_module.size; i++) {
  82120. - if (swig_module.types[i]->clientdata) {
  82121. - equiv = swig_module.types[i]->cast;
  82122. - while (equiv) {
  82123. - if (!equiv->converter) {
  82124. - if (equiv->type && !equiv->type->clientdata)
  82125. - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  82126. - }
  82127. - equiv = equiv->next;
  82128. - }
  82129. - }
  82130. - }
  82131. -}
  82132. -
  82133. -#ifdef __cplusplus
  82134. -#if 0
  82135. -{
  82136. - /* c-mode */
  82137. -#endif
  82138. -}
  82139. -#endif
  82140. -
  82141. -
  82142. -
  82143. -#ifdef __cplusplus
  82144. -extern "C" {
  82145. -#endif
  82146. -
  82147. - /* Python-specific SWIG API */
  82148. -#define SWIG_newvarlink() SWIG_Python_newvarlink()
  82149. -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  82150. -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  82151. -
  82152. - /* -----------------------------------------------------------------------------
  82153. - * global variable support code.
  82154. - * ----------------------------------------------------------------------------- */
  82155. -
  82156. - typedef struct swig_globalvar {
  82157. - char *name; /* Name of global variable */
  82158. - PyObject *(*get_attr)(void); /* Return the current value */
  82159. - int (*set_attr)(PyObject *); /* Set the value */
  82160. - struct swig_globalvar *next;
  82161. - } swig_globalvar;
  82162. -
  82163. - typedef struct swig_varlinkobject {
  82164. - PyObject_HEAD
  82165. - swig_globalvar *vars;
  82166. - } swig_varlinkobject;
  82167. -
  82168. - SWIGINTERN PyObject *
  82169. - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  82170. -#if PY_VERSION_HEX >= 0x03000000
  82171. - return PyUnicode_InternFromString("<Swig global variables>");
  82172. -#else
  82173. - return PyString_FromString("<Swig global variables>");
  82174. -#endif
  82175. - }
  82176. -
  82177. - SWIGINTERN PyObject *
  82178. - swig_varlink_str(swig_varlinkobject *v) {
  82179. -#if PY_VERSION_HEX >= 0x03000000
  82180. - PyObject *str = PyUnicode_InternFromString("(");
  82181. - PyObject *tail;
  82182. - PyObject *joined;
  82183. - swig_globalvar *var;
  82184. - for (var = v->vars; var; var=var->next) {
  82185. - tail = PyUnicode_FromString(var->name);
  82186. - joined = PyUnicode_Concat(str, tail);
  82187. - Py_DecRef(str);
  82188. - Py_DecRef(tail);
  82189. - str = joined;
  82190. - if (var->next) {
  82191. - tail = PyUnicode_InternFromString(", ");
  82192. - joined = PyUnicode_Concat(str, tail);
  82193. - Py_DecRef(str);
  82194. - Py_DecRef(tail);
  82195. - str = joined;
  82196. - }
  82197. - }
  82198. - tail = PyUnicode_InternFromString(")");
  82199. - joined = PyUnicode_Concat(str, tail);
  82200. - Py_DecRef(str);
  82201. - Py_DecRef(tail);
  82202. - str = joined;
  82203. -#else
  82204. - PyObject *str = PyString_FromString("(");
  82205. - swig_globalvar *var;
  82206. - for (var = v->vars; var; var=var->next) {
  82207. - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  82208. - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  82209. - }
  82210. - PyString_ConcatAndDel(&str,PyString_FromString(")"));
  82211. -#endif
  82212. - return str;
  82213. - }
  82214. -
  82215. - SWIGINTERN int
  82216. - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
  82217. - char *tmp;
  82218. - PyObject *str = swig_varlink_str(v);
  82219. - fprintf(fp,"Swig global variables ");
  82220. - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
  82221. - SWIG_Python_str_DelForPy3(tmp);
  82222. - Py_DECREF(str);
  82223. - return 0;
  82224. - }
  82225. -
  82226. - SWIGINTERN void
  82227. - swig_varlink_dealloc(swig_varlinkobject *v) {
  82228. - swig_globalvar *var = v->vars;
  82229. - while (var) {
  82230. - swig_globalvar *n = var->next;
  82231. - free(var->name);
  82232. - free(var);
  82233. - var = n;
  82234. - }
  82235. - }
  82236. -
  82237. - SWIGINTERN PyObject *
  82238. - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  82239. - PyObject *res = NULL;
  82240. - swig_globalvar *var = v->vars;
  82241. - while (var) {
  82242. - if (strcmp(var->name,n) == 0) {
  82243. - res = (*var->get_attr)();
  82244. - break;
  82245. - }
  82246. - var = var->next;
  82247. - }
  82248. - if (res == NULL && !PyErr_Occurred()) {
  82249. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  82250. - }
  82251. - return res;
  82252. - }
  82253. -
  82254. - SWIGINTERN int
  82255. - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  82256. - int res = 1;
  82257. - swig_globalvar *var = v->vars;
  82258. - while (var) {
  82259. - if (strcmp(var->name,n) == 0) {
  82260. - res = (*var->set_attr)(p);
  82261. - break;
  82262. - }
  82263. - var = var->next;
  82264. - }
  82265. - if (res == 1 && !PyErr_Occurred()) {
  82266. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  82267. - }
  82268. - return res;
  82269. - }
  82270. -
  82271. - SWIGINTERN PyTypeObject*
  82272. - swig_varlink_type(void) {
  82273. - static char varlink__doc__[] = "Swig var link object";
  82274. - static PyTypeObject varlink_type;
  82275. - static int type_init = 0;
  82276. - if (!type_init) {
  82277. - const PyTypeObject tmp = {
  82278. - /* PyObject header changed in Python 3 */
  82279. -#if PY_VERSION_HEX >= 0x03000000
  82280. - PyVarObject_HEAD_INIT(NULL, 0)
  82281. -#else
  82282. - PyObject_HEAD_INIT(NULL)
  82283. - 0, /* ob_size */
  82284. -#endif
  82285. - (char *)"swigvarlink", /* tp_name */
  82286. - sizeof(swig_varlinkobject), /* tp_basicsize */
  82287. - 0, /* tp_itemsize */
  82288. - (destructor) swig_varlink_dealloc, /* tp_dealloc */
  82289. - (printfunc) swig_varlink_print, /* tp_print */
  82290. - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  82291. - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  82292. - 0, /* tp_compare */
  82293. - (reprfunc) swig_varlink_repr, /* tp_repr */
  82294. - 0, /* tp_as_number */
  82295. - 0, /* tp_as_sequence */
  82296. - 0, /* tp_as_mapping */
  82297. - 0, /* tp_hash */
  82298. - 0, /* tp_call */
  82299. - (reprfunc) swig_varlink_str, /* tp_str */
  82300. - 0, /* tp_getattro */
  82301. - 0, /* tp_setattro */
  82302. - 0, /* tp_as_buffer */
  82303. - 0, /* tp_flags */
  82304. - varlink__doc__, /* tp_doc */
  82305. - 0, /* tp_traverse */
  82306. - 0, /* tp_clear */
  82307. - 0, /* tp_richcompare */
  82308. - 0, /* tp_weaklistoffset */
  82309. -#if PY_VERSION_HEX >= 0x02020000
  82310. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  82311. -#endif
  82312. -#if PY_VERSION_HEX >= 0x02030000
  82313. - 0, /* tp_del */
  82314. -#endif
  82315. -#if PY_VERSION_HEX >= 0x02060000
  82316. - 0, /* tp_version */
  82317. -#endif
  82318. -#ifdef COUNT_ALLOCS
  82319. - 0,0,0,0 /* tp_alloc -> tp_next */
  82320. -#endif
  82321. - };
  82322. - varlink_type = tmp;
  82323. - type_init = 1;
  82324. -#if PY_VERSION_HEX < 0x02020000
  82325. - varlink_type.ob_type = &PyType_Type;
  82326. -#else
  82327. - if (PyType_Ready(&varlink_type) < 0)
  82328. - return NULL;
  82329. -#endif
  82330. - }
  82331. - return &varlink_type;
  82332. - }
  82333. -
  82334. - /* Create a variable linking object for use later */
  82335. - SWIGINTERN PyObject *
  82336. - SWIG_Python_newvarlink(void) {
  82337. - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  82338. - if (result) {
  82339. - result->vars = 0;
  82340. - }
  82341. - return ((PyObject*) result);
  82342. - }
  82343. -
  82344. - SWIGINTERN void
  82345. - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  82346. - swig_varlinkobject *v = (swig_varlinkobject *) p;
  82347. - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  82348. - if (gv) {
  82349. - size_t size = strlen(name)+1;
  82350. - gv->name = (char *)malloc(size);
  82351. - if (gv->name) {
  82352. - strncpy(gv->name,name,size);
  82353. - gv->get_attr = get_attr;
  82354. - gv->set_attr = set_attr;
  82355. - gv->next = v->vars;
  82356. - }
  82357. - }
  82358. - v->vars = gv;
  82359. - }
  82360. -
  82361. - SWIGINTERN PyObject *
  82362. - SWIG_globals(void) {
  82363. - static PyObject *_SWIG_globals = 0;
  82364. - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
  82365. - return _SWIG_globals;
  82366. - }
  82367. -
  82368. - /* -----------------------------------------------------------------------------
  82369. - * constants/methods manipulation
  82370. - * ----------------------------------------------------------------------------- */
  82371. -
  82372. - /* Install Constants */
  82373. - SWIGINTERN void
  82374. - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  82375. - PyObject *obj = 0;
  82376. - size_t i;
  82377. - for (i = 0; constants[i].type; ++i) {
  82378. - switch(constants[i].type) {
  82379. - case SWIG_PY_POINTER:
  82380. - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  82381. - break;
  82382. - case SWIG_PY_BINARY:
  82383. - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  82384. - break;
  82385. - default:
  82386. - obj = 0;
  82387. - break;
  82388. - }
  82389. - if (obj) {
  82390. - PyDict_SetItemString(d, constants[i].name, obj);
  82391. - Py_DECREF(obj);
  82392. - }
  82393. - }
  82394. - }
  82395. -
  82396. - /* -----------------------------------------------------------------------------*/
  82397. - /* Fix SwigMethods to carry the callback ptrs when needed */
  82398. - /* -----------------------------------------------------------------------------*/
  82399. -
  82400. - SWIGINTERN void
  82401. - SWIG_Python_FixMethods(PyMethodDef *methods,
  82402. - swig_const_info *const_table,
  82403. - swig_type_info **types,
  82404. - swig_type_info **types_initial) {
  82405. - size_t i;
  82406. - for (i = 0; methods[i].ml_name; ++i) {
  82407. - const char *c = methods[i].ml_doc;
  82408. - if (c && (c = strstr(c, "swig_ptr: "))) {
  82409. - int j;
  82410. - swig_const_info *ci = 0;
  82411. - const char *name = c + 10;
  82412. - for (j = 0; const_table[j].type; ++j) {
  82413. - if (strncmp(const_table[j].name, name,
  82414. - strlen(const_table[j].name)) == 0) {
  82415. - ci = &(const_table[j]);
  82416. - break;
  82417. - }
  82418. - }
  82419. - if (ci) {
  82420. - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  82421. - if (ptr) {
  82422. - size_t shift = (ci->ptype) - types;
  82423. - swig_type_info *ty = types_initial[shift];
  82424. - size_t ldoc = (c - methods[i].ml_doc);
  82425. - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  82426. - char *ndoc = (char*)malloc(ldoc + lptr + 10);
  82427. - if (ndoc) {
  82428. - char *buff = ndoc;
  82429. - strncpy(buff, methods[i].ml_doc, ldoc);
  82430. - buff += ldoc;
  82431. - strncpy(buff, "swig_ptr: ", 10);
  82432. - buff += 10;
  82433. - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  82434. - methods[i].ml_doc = ndoc;
  82435. - }
  82436. - }
  82437. - }
  82438. - }
  82439. - }
  82440. - }
  82441. -
  82442. -#ifdef __cplusplus
  82443. -}
  82444. -#endif
  82445. -
  82446. -/* -----------------------------------------------------------------------------*
  82447. - * Partial Init method
  82448. - * -----------------------------------------------------------------------------*/
  82449. -
  82450. -#ifdef __cplusplus
  82451. -extern "C"
  82452. -#endif
  82453. -
  82454. -SWIGEXPORT
  82455. -#if PY_VERSION_HEX >= 0x03000000
  82456. -PyObject*
  82457. -#else
  82458. -void
  82459. -#endif
  82460. -SWIG_init(void) {
  82461. - PyObject *m, *d, *md;
  82462. -#if PY_VERSION_HEX >= 0x03000000
  82463. - static struct PyModuleDef SWIG_module = {
  82464. -# if PY_VERSION_HEX >= 0x03020000
  82465. - PyModuleDef_HEAD_INIT,
  82466. -# else
  82467. - {
  82468. - PyObject_HEAD_INIT(NULL)
  82469. - NULL, /* m_init */
  82470. - 0, /* m_index */
  82471. - NULL, /* m_copy */
  82472. - },
  82473. -# endif
  82474. - (char *) SWIG_name,
  82475. - NULL,
  82476. - -1,
  82477. - SwigMethods,
  82478. - NULL,
  82479. - NULL,
  82480. - NULL,
  82481. - NULL
  82482. - };
  82483. -#endif
  82484. -
  82485. -#if defined(SWIGPYTHON_BUILTIN)
  82486. - static SwigPyClientData SwigPyObject_clientdata = {
  82487. - 0, 0, 0, 0, 0, 0, 0
  82488. - };
  82489. - static PyGetSetDef this_getset_def = {
  82490. - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  82491. - };
  82492. - static SwigPyGetSet thisown_getset_closure = {
  82493. - (PyCFunction) SwigPyObject_own,
  82494. - (PyCFunction) SwigPyObject_own
  82495. - };
  82496. - static PyGetSetDef thisown_getset_def = {
  82497. - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  82498. - };
  82499. - PyObject *metatype_args;
  82500. - PyTypeObject *builtin_pytype;
  82501. - int builtin_base_count;
  82502. - swig_type_info *builtin_basetype;
  82503. - PyObject *tuple;
  82504. - PyGetSetDescrObject *static_getset;
  82505. - PyTypeObject *metatype;
  82506. - SwigPyClientData *cd;
  82507. - PyObject *public_interface, *public_symbol;
  82508. - PyObject *this_descr;
  82509. - PyObject *thisown_descr;
  82510. - int i;
  82511. -
  82512. - (void)builtin_pytype;
  82513. - (void)builtin_base_count;
  82514. - (void)builtin_basetype;
  82515. - (void)tuple;
  82516. - (void)static_getset;
  82517. -
  82518. - /* metatype is used to implement static member variables. */
  82519. - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  82520. - assert(metatype_args);
  82521. - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  82522. - assert(metatype);
  82523. - Py_DECREF(metatype_args);
  82524. - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  82525. - assert(PyType_Ready(metatype) >= 0);
  82526. -#endif
  82527. -
  82528. - /* Fix SwigMethods to carry the callback ptrs when needed */
  82529. - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  82530. -
  82531. -#if PY_VERSION_HEX >= 0x03000000
  82532. - m = PyModule_Create(&SWIG_module);
  82533. -#else
  82534. - m = Py_InitModule((char *) SWIG_name, SwigMethods);
  82535. -#endif
  82536. - md = d = PyModule_GetDict(m);
  82537. - (void)md;
  82538. -
  82539. - SWIG_InitializeModule(0);
  82540. -
  82541. -#ifdef SWIGPYTHON_BUILTIN
  82542. - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  82543. - assert(SwigPyObject_stype);
  82544. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  82545. - if (!cd) {
  82546. - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  82547. - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  82548. - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
  82549. - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  82550. -# if PY_VERSION_HEX >= 0x03000000
  82551. - return NULL;
  82552. -# else
  82553. - return;
  82554. -# endif
  82555. - }
  82556. -
  82557. - /* All objects have a 'this' attribute */
  82558. - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  82559. - (void)this_descr;
  82560. -
  82561. - /* All objects have a 'thisown' attribute */
  82562. - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  82563. - (void)thisown_descr;
  82564. -
  82565. - public_interface = PyList_New(0);
  82566. - public_symbol = 0;
  82567. - (void)public_symbol;
  82568. -
  82569. - PyDict_SetItemString(md, "__all__", public_interface);
  82570. - Py_DECREF(public_interface);
  82571. - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  82572. - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  82573. - for (i = 0; swig_const_table[i].name != 0; ++i)
  82574. - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  82575. -#endif
  82576. -
  82577. - SWIG_InstallConstants(d,swig_const_table);
  82578. -
  82579. - SWIG_Python_SetConstant(d, "VImage_MULTIBAND",SWIG_From_int(static_cast< int >(vips::VImage::MULTIBAND)));
  82580. - SWIG_Python_SetConstant(d, "VImage_B_W",SWIG_From_int(static_cast< int >(vips::VImage::B_W)));
  82581. - SWIG_Python_SetConstant(d, "VImage_LUMINACE",SWIG_From_int(static_cast< int >(vips::VImage::LUMINACE)));
  82582. - SWIG_Python_SetConstant(d, "VImage_XRAY",SWIG_From_int(static_cast< int >(vips::VImage::XRAY)));
  82583. - SWIG_Python_SetConstant(d, "VImage_IR",SWIG_From_int(static_cast< int >(vips::VImage::IR)));
  82584. - SWIG_Python_SetConstant(d, "VImage_YUV",SWIG_From_int(static_cast< int >(vips::VImage::YUV)));
  82585. - SWIG_Python_SetConstant(d, "VImage_RED_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::RED_ONLY)));
  82586. - SWIG_Python_SetConstant(d, "VImage_GREEN_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::GREEN_ONLY)));
  82587. - SWIG_Python_SetConstant(d, "VImage_BLUE_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::BLUE_ONLY)));
  82588. - SWIG_Python_SetConstant(d, "VImage_POWER_SPECTRUM",SWIG_From_int(static_cast< int >(vips::VImage::POWER_SPECTRUM)));
  82589. - SWIG_Python_SetConstant(d, "VImage_HISTOGRAM",SWIG_From_int(static_cast< int >(vips::VImage::HISTOGRAM)));
  82590. - SWIG_Python_SetConstant(d, "VImage_LUT",SWIG_From_int(static_cast< int >(vips::VImage::LUT)));
  82591. - SWIG_Python_SetConstant(d, "VImage_XYZ",SWIG_From_int(static_cast< int >(vips::VImage::XYZ)));
  82592. - SWIG_Python_SetConstant(d, "VImage_LAB",SWIG_From_int(static_cast< int >(vips::VImage::LAB)));
  82593. - SWIG_Python_SetConstant(d, "VImage_CMC",SWIG_From_int(static_cast< int >(vips::VImage::CMC)));
  82594. - SWIG_Python_SetConstant(d, "VImage_CMYK",SWIG_From_int(static_cast< int >(vips::VImage::CMYK)));
  82595. - SWIG_Python_SetConstant(d, "VImage_LABQ",SWIG_From_int(static_cast< int >(vips::VImage::LABQ)));
  82596. - SWIG_Python_SetConstant(d, "VImage_RGB",SWIG_From_int(static_cast< int >(vips::VImage::RGB)));
  82597. - SWIG_Python_SetConstant(d, "VImage_UCS",SWIG_From_int(static_cast< int >(vips::VImage::UCS)));
  82598. - SWIG_Python_SetConstant(d, "VImage_LCH",SWIG_From_int(static_cast< int >(vips::VImage::LCH)));
  82599. - SWIG_Python_SetConstant(d, "VImage_LABS",SWIG_From_int(static_cast< int >(vips::VImage::LABS)));
  82600. - SWIG_Python_SetConstant(d, "VImage_sRGB",SWIG_From_int(static_cast< int >(vips::VImage::sRGB)));
  82601. - SWIG_Python_SetConstant(d, "VImage_YXY",SWIG_From_int(static_cast< int >(vips::VImage::YXY)));
  82602. - SWIG_Python_SetConstant(d, "VImage_FOURIER",SWIG_From_int(static_cast< int >(vips::VImage::FOURIER)));
  82603. - SWIG_Python_SetConstant(d, "VImage_RGB16",SWIG_From_int(static_cast< int >(vips::VImage::RGB16)));
  82604. - SWIG_Python_SetConstant(d, "VImage_GREY16",SWIG_From_int(static_cast< int >(vips::VImage::GREY16)));
  82605. - SWIG_Python_SetConstant(d, "VImage_FMTNOTSET",SWIG_From_int(static_cast< int >(vips::VImage::FMTNOTSET)));
  82606. - SWIG_Python_SetConstant(d, "VImage_FMTUCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTUCHAR)));
  82607. - SWIG_Python_SetConstant(d, "VImage_FMTCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTCHAR)));
  82608. - SWIG_Python_SetConstant(d, "VImage_FMTUSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUSHORT)));
  82609. - SWIG_Python_SetConstant(d, "VImage_FMTSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTSHORT)));
  82610. - SWIG_Python_SetConstant(d, "VImage_FMTUINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUINT)));
  82611. - SWIG_Python_SetConstant(d, "VImage_FMTINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTINT)));
  82612. - SWIG_Python_SetConstant(d, "VImage_FMTFLOAT",SWIG_From_int(static_cast< int >(vips::VImage::FMTFLOAT)));
  82613. - SWIG_Python_SetConstant(d, "VImage_FMTCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTCOMPLEX)));
  82614. - SWIG_Python_SetConstant(d, "VImage_FMTDOUBLE",SWIG_From_int(static_cast< int >(vips::VImage::FMTDOUBLE)));
  82615. - SWIG_Python_SetConstant(d, "VImage_FMTDPCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTDPCOMPLEX)));
  82616. - SWIG_Python_SetConstant(d, "VImage_NOCODING",SWIG_From_int(static_cast< int >(vips::VImage::NOCODING)));
  82617. - SWIG_Python_SetConstant(d, "VImage_COLQUANT",SWIG_From_int(static_cast< int >(vips::VImage::COLQUANT)));
  82618. - SWIG_Python_SetConstant(d, "VImage_LABPACK",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK)));
  82619. - SWIG_Python_SetConstant(d, "VImage_LABPACK_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK_COMPRESSED)));
  82620. - SWIG_Python_SetConstant(d, "VImage_RGB_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::RGB_COMPRESSED)));
  82621. - SWIG_Python_SetConstant(d, "VImage_LUM_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LUM_COMPRESSED)));
  82622. - SWIG_Python_SetConstant(d, "VImage_RAD",SWIG_From_int(static_cast< int >(vips::VImage::RAD)));
  82623. - SWIG_Python_SetConstant(d, "VImage_NO_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::NO_COMPRESSION)));
  82624. - SWIG_Python_SetConstant(d, "VImage_TCSF_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::TCSF_COMPRESSION)));
  82625. - SWIG_Python_SetConstant(d, "VImage_JPEG_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::JPEG_COMPRESSION)));
  82626. -
  82627. - {
  82628. - Args *args;
  82629. -
  82630. - args = args_new ();
  82631. -
  82632. -#ifdef DEBUG
  82633. - printf ("on startup:\n");
  82634. - args_print (args);
  82635. -#endif /*DEBUG*/
  82636. -
  82637. - if (im_init_world (args->argv[0])) {
  82638. - args_free (args);
  82639. - vips_fatal ("can't initialise module vips");
  82640. - }
  82641. -
  82642. - /* Now parse any GOptions.
  82643. - */
  82644. - GError *error = NULL;
  82645. - GOptionContext *context;
  82646. -
  82647. - context = g_option_context_new ("- vips");
  82648. - g_option_context_add_group (context, im_get_option_group());
  82649. -
  82650. - g_option_context_set_ignore_unknown_options (context, TRUE);
  82651. - if (!g_option_context_parse (context,
  82652. - &args->argc, &args->argv, &error)) {
  82653. - g_option_context_free (context);
  82654. - args_free (args);
  82655. - im_error ("vipsmodule", "%s", error->message);
  82656. - g_error_free (error);
  82657. - vips_fatal ("can't initialise module vips");
  82658. - }
  82659. - g_option_context_free (context);
  82660. -
  82661. -#ifdef DEBUG
  82662. - printf ("after parse:\n");
  82663. - args_print (args);
  82664. -#endif /*DEBUG*/
  82665. -
  82666. - // Write (possibly) modified argc/argv back again.
  82667. - if (args->argv)
  82668. - PySys_SetArgv (args->argc, args->argv);
  82669. -
  82670. - args_free (args);
  82671. - }
  82672. -
  82673. -#if PY_VERSION_HEX >= 0x03000000
  82674. - return m;
  82675. -#else
  82676. - return;
  82677. -#endif
  82678. -}
  82679. -
  82680. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VImage.py vips-7.38.5/swig/vipsCC/VImage.py
  82681. --- vips-7.38.5-vanilla/swig/vipsCC/VImage.py 2014-07-17 23:48:36.208794473 -0400
  82682. +++ vips-7.38.5/swig/vipsCC/VImage.py 1969-12-31 19:00:00.000000000 -0500
  82683. @@ -1,919 +0,0 @@
  82684. -# This file was automatically generated by SWIG (http://www.swig.org).
  82685. -# Version 2.0.10
  82686. -#
  82687. -# Do not make changes to this file unless you know what you are doing--modify
  82688. -# the SWIG interface file instead.
  82689. -
  82690. -
  82691. -
  82692. -from sys import version_info
  82693. -if version_info >= (2,6,0):
  82694. - def swig_import_helper():
  82695. - from os.path import dirname
  82696. - import imp
  82697. - fp = None
  82698. - try:
  82699. - fp, pathname, description = imp.find_module('vimagemodule', [dirname(__file__)])
  82700. - except ImportError:
  82701. - import vimagemodule
  82702. - return vimagemodule
  82703. - if fp is not None:
  82704. - try:
  82705. - _mod = imp.load_module('vimagemodule', fp, pathname, description)
  82706. - finally:
  82707. - fp.close()
  82708. - return _mod
  82709. - vimagemodule = swig_import_helper()
  82710. - del swig_import_helper
  82711. -else:
  82712. - import vimagemodule
  82713. -del version_info
  82714. -try:
  82715. - _swig_property = property
  82716. -except NameError:
  82717. - pass # Python < 2.2 doesn't have 'property'.
  82718. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
  82719. - if (name == "thisown"): return self.this.own(value)
  82720. - if (name == "this"):
  82721. - if type(value).__name__ == 'SwigPyObject':
  82722. - self.__dict__[name] = value
  82723. - return
  82724. - method = class_type.__swig_setmethods__.get(name,None)
  82725. - if method: return method(self,value)
  82726. - if (not static):
  82727. - self.__dict__[name] = value
  82728. - else:
  82729. - raise AttributeError("You cannot add attributes to %s" % self)
  82730. -
  82731. -def _swig_setattr(self,class_type,name,value):
  82732. - return _swig_setattr_nondynamic(self,class_type,name,value,0)
  82733. -
  82734. -def _swig_getattr(self,class_type,name):
  82735. - if (name == "thisown"): return self.this.own()
  82736. - method = class_type.__swig_getmethods__.get(name,None)
  82737. - if method: return method(self)
  82738. - raise AttributeError(name)
  82739. -
  82740. -def _swig_repr(self):
  82741. - try: strthis = "proxy of " + self.this.__repr__()
  82742. - except: strthis = ""
  82743. - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  82744. -
  82745. -try:
  82746. - _object = object
  82747. - _newclass = 1
  82748. -except AttributeError:
  82749. - class _object : pass
  82750. - _newclass = 0
  82751. -
  82752. -
  82753. -class SwigPyIterator(_object):
  82754. - __swig_setmethods__ = {}
  82755. - __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
  82756. - __swig_getmethods__ = {}
  82757. - __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
  82758. - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
  82759. - __repr__ = _swig_repr
  82760. - __swig_destroy__ = vimagemodule.delete_SwigPyIterator
  82761. - __del__ = lambda self : None;
  82762. - def value(self): return vimagemodule.SwigPyIterator_value(self)
  82763. - def incr(self, n=1): return vimagemodule.SwigPyIterator_incr(self, n)
  82764. - def decr(self, n=1): return vimagemodule.SwigPyIterator_decr(self, n)
  82765. - def distance(self, *args): return vimagemodule.SwigPyIterator_distance(self, *args)
  82766. - def equal(self, *args): return vimagemodule.SwigPyIterator_equal(self, *args)
  82767. - def copy(self): return vimagemodule.SwigPyIterator_copy(self)
  82768. - def next(self): return vimagemodule.SwigPyIterator_next(self)
  82769. - def __next__(self): return vimagemodule.SwigPyIterator___next__(self)
  82770. - def previous(self): return vimagemodule.SwigPyIterator_previous(self)
  82771. - def advance(self, *args): return vimagemodule.SwigPyIterator_advance(self, *args)
  82772. - def __eq__(self, *args): return vimagemodule.SwigPyIterator___eq__(self, *args)
  82773. - def __ne__(self, *args): return vimagemodule.SwigPyIterator___ne__(self, *args)
  82774. - def __iadd__(self, *args): return vimagemodule.SwigPyIterator___iadd__(self, *args)
  82775. - def __isub__(self, *args): return vimagemodule.SwigPyIterator___isub__(self, *args)
  82776. - def __add__(self, *args): return vimagemodule.SwigPyIterator___add__(self, *args)
  82777. - def __sub__(self, *args): return vimagemodule.SwigPyIterator___sub__(self, *args)
  82778. - def __iter__(self): return self
  82779. -SwigPyIterator_swigregister = vimagemodule.SwigPyIterator_swigregister
  82780. -SwigPyIterator_swigregister(SwigPyIterator)
  82781. -
  82782. -import VError
  82783. -import VMask
  82784. -import VDisplay
  82785. -class IntVector(_object):
  82786. - __swig_setmethods__ = {}
  82787. - __setattr__ = lambda self, name, value: _swig_setattr(self, IntVector, name, value)
  82788. - __swig_getmethods__ = {}
  82789. - __getattr__ = lambda self, name: _swig_getattr(self, IntVector, name)
  82790. - __repr__ = _swig_repr
  82791. - def iterator(self): return vimagemodule.IntVector_iterator(self)
  82792. - def __iter__(self): return self.iterator()
  82793. - def __nonzero__(self): return vimagemodule.IntVector___nonzero__(self)
  82794. - def __bool__(self): return vimagemodule.IntVector___bool__(self)
  82795. - def __len__(self): return vimagemodule.IntVector___len__(self)
  82796. - def pop(self): return vimagemodule.IntVector_pop(self)
  82797. - def __getslice__(self, *args): return vimagemodule.IntVector___getslice__(self, *args)
  82798. - def __setslice__(self, *args): return vimagemodule.IntVector___setslice__(self, *args)
  82799. - def __delslice__(self, *args): return vimagemodule.IntVector___delslice__(self, *args)
  82800. - def __delitem__(self, *args): return vimagemodule.IntVector___delitem__(self, *args)
  82801. - def __getitem__(self, *args): return vimagemodule.IntVector___getitem__(self, *args)
  82802. - def __setitem__(self, *args): return vimagemodule.IntVector___setitem__(self, *args)
  82803. - def append(self, *args): return vimagemodule.IntVector_append(self, *args)
  82804. - def empty(self): return vimagemodule.IntVector_empty(self)
  82805. - def size(self): return vimagemodule.IntVector_size(self)
  82806. - def clear(self): return vimagemodule.IntVector_clear(self)
  82807. - def swap(self, *args): return vimagemodule.IntVector_swap(self, *args)
  82808. - def get_allocator(self): return vimagemodule.IntVector_get_allocator(self)
  82809. - def begin(self): return vimagemodule.IntVector_begin(self)
  82810. - def end(self): return vimagemodule.IntVector_end(self)
  82811. - def rbegin(self): return vimagemodule.IntVector_rbegin(self)
  82812. - def rend(self): return vimagemodule.IntVector_rend(self)
  82813. - def pop_back(self): return vimagemodule.IntVector_pop_back(self)
  82814. - def erase(self, *args): return vimagemodule.IntVector_erase(self, *args)
  82815. - def __init__(self, *args):
  82816. - this = vimagemodule.new_IntVector(*args)
  82817. - try: self.this.append(this)
  82818. - except: self.this = this
  82819. - def push_back(self, *args): return vimagemodule.IntVector_push_back(self, *args)
  82820. - def front(self): return vimagemodule.IntVector_front(self)
  82821. - def back(self): return vimagemodule.IntVector_back(self)
  82822. - def assign(self, *args): return vimagemodule.IntVector_assign(self, *args)
  82823. - def resize(self, *args): return vimagemodule.IntVector_resize(self, *args)
  82824. - def insert(self, *args): return vimagemodule.IntVector_insert(self, *args)
  82825. - def reserve(self, *args): return vimagemodule.IntVector_reserve(self, *args)
  82826. - def capacity(self): return vimagemodule.IntVector_capacity(self)
  82827. - __swig_destroy__ = vimagemodule.delete_IntVector
  82828. - __del__ = lambda self : None;
  82829. -IntVector_swigregister = vimagemodule.IntVector_swigregister
  82830. -IntVector_swigregister(IntVector)
  82831. -
  82832. -class DoubleVector(_object):
  82833. - __swig_setmethods__ = {}
  82834. - __setattr__ = lambda self, name, value: _swig_setattr(self, DoubleVector, name, value)
  82835. - __swig_getmethods__ = {}
  82836. - __getattr__ = lambda self, name: _swig_getattr(self, DoubleVector, name)
  82837. - __repr__ = _swig_repr
  82838. - def iterator(self): return vimagemodule.DoubleVector_iterator(self)
  82839. - def __iter__(self): return self.iterator()
  82840. - def __nonzero__(self): return vimagemodule.DoubleVector___nonzero__(self)
  82841. - def __bool__(self): return vimagemodule.DoubleVector___bool__(self)
  82842. - def __len__(self): return vimagemodule.DoubleVector___len__(self)
  82843. - def pop(self): return vimagemodule.DoubleVector_pop(self)
  82844. - def __getslice__(self, *args): return vimagemodule.DoubleVector___getslice__(self, *args)
  82845. - def __setslice__(self, *args): return vimagemodule.DoubleVector___setslice__(self, *args)
  82846. - def __delslice__(self, *args): return vimagemodule.DoubleVector___delslice__(self, *args)
  82847. - def __delitem__(self, *args): return vimagemodule.DoubleVector___delitem__(self, *args)
  82848. - def __getitem__(self, *args): return vimagemodule.DoubleVector___getitem__(self, *args)
  82849. - def __setitem__(self, *args): return vimagemodule.DoubleVector___setitem__(self, *args)
  82850. - def append(self, *args): return vimagemodule.DoubleVector_append(self, *args)
  82851. - def empty(self): return vimagemodule.DoubleVector_empty(self)
  82852. - def size(self): return vimagemodule.DoubleVector_size(self)
  82853. - def clear(self): return vimagemodule.DoubleVector_clear(self)
  82854. - def swap(self, *args): return vimagemodule.DoubleVector_swap(self, *args)
  82855. - def get_allocator(self): return vimagemodule.DoubleVector_get_allocator(self)
  82856. - def begin(self): return vimagemodule.DoubleVector_begin(self)
  82857. - def end(self): return vimagemodule.DoubleVector_end(self)
  82858. - def rbegin(self): return vimagemodule.DoubleVector_rbegin(self)
  82859. - def rend(self): return vimagemodule.DoubleVector_rend(self)
  82860. - def pop_back(self): return vimagemodule.DoubleVector_pop_back(self)
  82861. - def erase(self, *args): return vimagemodule.DoubleVector_erase(self, *args)
  82862. - def __init__(self, *args):
  82863. - this = vimagemodule.new_DoubleVector(*args)
  82864. - try: self.this.append(this)
  82865. - except: self.this = this
  82866. - def push_back(self, *args): return vimagemodule.DoubleVector_push_back(self, *args)
  82867. - def front(self): return vimagemodule.DoubleVector_front(self)
  82868. - def back(self): return vimagemodule.DoubleVector_back(self)
  82869. - def assign(self, *args): return vimagemodule.DoubleVector_assign(self, *args)
  82870. - def resize(self, *args): return vimagemodule.DoubleVector_resize(self, *args)
  82871. - def insert(self, *args): return vimagemodule.DoubleVector_insert(self, *args)
  82872. - def reserve(self, *args): return vimagemodule.DoubleVector_reserve(self, *args)
  82873. - def capacity(self): return vimagemodule.DoubleVector_capacity(self)
  82874. - __swig_destroy__ = vimagemodule.delete_DoubleVector
  82875. - __del__ = lambda self : None;
  82876. -DoubleVector_swigregister = vimagemodule.DoubleVector_swigregister
  82877. -DoubleVector_swigregister(DoubleVector)
  82878. -
  82879. -class ImageVector(_object):
  82880. - __swig_setmethods__ = {}
  82881. - __setattr__ = lambda self, name, value: _swig_setattr(self, ImageVector, name, value)
  82882. - __swig_getmethods__ = {}
  82883. - __getattr__ = lambda self, name: _swig_getattr(self, ImageVector, name)
  82884. - __repr__ = _swig_repr
  82885. - def iterator(self): return vimagemodule.ImageVector_iterator(self)
  82886. - def __iter__(self): return self.iterator()
  82887. - def __nonzero__(self): return vimagemodule.ImageVector___nonzero__(self)
  82888. - def __bool__(self): return vimagemodule.ImageVector___bool__(self)
  82889. - def __len__(self): return vimagemodule.ImageVector___len__(self)
  82890. - def pop(self): return vimagemodule.ImageVector_pop(self)
  82891. - def __getslice__(self, *args): return vimagemodule.ImageVector___getslice__(self, *args)
  82892. - def __setslice__(self, *args): return vimagemodule.ImageVector___setslice__(self, *args)
  82893. - def __delslice__(self, *args): return vimagemodule.ImageVector___delslice__(self, *args)
  82894. - def __delitem__(self, *args): return vimagemodule.ImageVector___delitem__(self, *args)
  82895. - def __getitem__(self, *args): return vimagemodule.ImageVector___getitem__(self, *args)
  82896. - def __setitem__(self, *args): return vimagemodule.ImageVector___setitem__(self, *args)
  82897. - def append(self, *args): return vimagemodule.ImageVector_append(self, *args)
  82898. - def empty(self): return vimagemodule.ImageVector_empty(self)
  82899. - def size(self): return vimagemodule.ImageVector_size(self)
  82900. - def clear(self): return vimagemodule.ImageVector_clear(self)
  82901. - def swap(self, *args): return vimagemodule.ImageVector_swap(self, *args)
  82902. - def get_allocator(self): return vimagemodule.ImageVector_get_allocator(self)
  82903. - def begin(self): return vimagemodule.ImageVector_begin(self)
  82904. - def end(self): return vimagemodule.ImageVector_end(self)
  82905. - def rbegin(self): return vimagemodule.ImageVector_rbegin(self)
  82906. - def rend(self): return vimagemodule.ImageVector_rend(self)
  82907. - def pop_back(self): return vimagemodule.ImageVector_pop_back(self)
  82908. - def erase(self, *args): return vimagemodule.ImageVector_erase(self, *args)
  82909. - def __init__(self, *args):
  82910. - this = vimagemodule.new_ImageVector(*args)
  82911. - try: self.this.append(this)
  82912. - except: self.this = this
  82913. - def push_back(self, *args): return vimagemodule.ImageVector_push_back(self, *args)
  82914. - def front(self): return vimagemodule.ImageVector_front(self)
  82915. - def back(self): return vimagemodule.ImageVector_back(self)
  82916. - def assign(self, *args): return vimagemodule.ImageVector_assign(self, *args)
  82917. - def resize(self, *args): return vimagemodule.ImageVector_resize(self, *args)
  82918. - def insert(self, *args): return vimagemodule.ImageVector_insert(self, *args)
  82919. - def reserve(self, *args): return vimagemodule.ImageVector_reserve(self, *args)
  82920. - def capacity(self): return vimagemodule.ImageVector_capacity(self)
  82921. - __swig_destroy__ = vimagemodule.delete_ImageVector
  82922. - __del__ = lambda self : None;
  82923. -ImageVector_swigregister = vimagemodule.ImageVector_swigregister
  82924. -ImageVector_swigregister(ImageVector)
  82925. -
  82926. -
  82927. -def init(argv0="nothing"):
  82928. - return vimagemodule.init(argv0)
  82929. -init = vimagemodule.init
  82930. -
  82931. -def shutdown():
  82932. - return vimagemodule.shutdown()
  82933. -shutdown = vimagemodule.shutdown
  82934. -class VImage(_object):
  82935. - __swig_setmethods__ = {}
  82936. - __setattr__ = lambda self, name, value: _swig_setattr(self, VImage, name, value)
  82937. - __swig_getmethods__ = {}
  82938. - __getattr__ = lambda self, name: _swig_getattr(self, VImage, name)
  82939. - __repr__ = _swig_repr
  82940. - __swig_getmethods__["print_all"] = lambda x: vimagemodule.VImage_print_all
  82941. - if _newclass:print_all = staticmethod(vimagemodule.VImage_print_all)
  82942. - MULTIBAND = vimagemodule.VImage_MULTIBAND
  82943. - B_W = vimagemodule.VImage_B_W
  82944. - LUMINACE = vimagemodule.VImage_LUMINACE
  82945. - XRAY = vimagemodule.VImage_XRAY
  82946. - IR = vimagemodule.VImage_IR
  82947. - YUV = vimagemodule.VImage_YUV
  82948. - RED_ONLY = vimagemodule.VImage_RED_ONLY
  82949. - GREEN_ONLY = vimagemodule.VImage_GREEN_ONLY
  82950. - BLUE_ONLY = vimagemodule.VImage_BLUE_ONLY
  82951. - POWER_SPECTRUM = vimagemodule.VImage_POWER_SPECTRUM
  82952. - HISTOGRAM = vimagemodule.VImage_HISTOGRAM
  82953. - LUT = vimagemodule.VImage_LUT
  82954. - XYZ = vimagemodule.VImage_XYZ
  82955. - LAB = vimagemodule.VImage_LAB
  82956. - CMC = vimagemodule.VImage_CMC
  82957. - CMYK = vimagemodule.VImage_CMYK
  82958. - LABQ = vimagemodule.VImage_LABQ
  82959. - RGB = vimagemodule.VImage_RGB
  82960. - UCS = vimagemodule.VImage_UCS
  82961. - LCH = vimagemodule.VImage_LCH
  82962. - LABS = vimagemodule.VImage_LABS
  82963. - sRGB = vimagemodule.VImage_sRGB
  82964. - YXY = vimagemodule.VImage_YXY
  82965. - FOURIER = vimagemodule.VImage_FOURIER
  82966. - RGB16 = vimagemodule.VImage_RGB16
  82967. - GREY16 = vimagemodule.VImage_GREY16
  82968. - FMTNOTSET = vimagemodule.VImage_FMTNOTSET
  82969. - FMTUCHAR = vimagemodule.VImage_FMTUCHAR
  82970. - FMTCHAR = vimagemodule.VImage_FMTCHAR
  82971. - FMTUSHORT = vimagemodule.VImage_FMTUSHORT
  82972. - FMTSHORT = vimagemodule.VImage_FMTSHORT
  82973. - FMTUINT = vimagemodule.VImage_FMTUINT
  82974. - FMTINT = vimagemodule.VImage_FMTINT
  82975. - FMTFLOAT = vimagemodule.VImage_FMTFLOAT
  82976. - FMTCOMPLEX = vimagemodule.VImage_FMTCOMPLEX
  82977. - FMTDOUBLE = vimagemodule.VImage_FMTDOUBLE
  82978. - FMTDPCOMPLEX = vimagemodule.VImage_FMTDPCOMPLEX
  82979. - NOCODING = vimagemodule.VImage_NOCODING
  82980. - COLQUANT = vimagemodule.VImage_COLQUANT
  82981. - LABPACK = vimagemodule.VImage_LABPACK
  82982. - LABPACK_COMPRESSED = vimagemodule.VImage_LABPACK_COMPRESSED
  82983. - RGB_COMPRESSED = vimagemodule.VImage_RGB_COMPRESSED
  82984. - LUM_COMPRESSED = vimagemodule.VImage_LUM_COMPRESSED
  82985. - RAD = vimagemodule.VImage_RAD
  82986. - NO_COMPRESSION = vimagemodule.VImage_NO_COMPRESSION
  82987. - TCSF_COMPRESSION = vimagemodule.VImage_TCSF_COMPRESSION
  82988. - JPEG_COMPRESSION = vimagemodule.VImage_JPEG_COMPRESSION
  82989. - __swig_getmethods__["convert2disc"] = lambda x: vimagemodule.VImage_convert2disc
  82990. - if _newclass:convert2disc = staticmethod(vimagemodule.VImage_convert2disc)
  82991. - def __init__(self, *args):
  82992. - this = vimagemodule.new_VImage(*args)
  82993. - try: self.this.append(this)
  82994. - except: self.this = this
  82995. - def __assign__(self, *args): return vimagemodule.VImage___assign__(self, *args)
  82996. - __swig_destroy__ = vimagemodule.delete_VImage
  82997. - __del__ = lambda self : None;
  82998. - def image(self): return vimagemodule.VImage_image(self)
  82999. - def data(self): return vimagemodule.VImage_data(self)
  83000. - def write(self, *args): return vimagemodule.VImage_write(self, *args)
  83001. - def debug_print(self): return vimagemodule.VImage_debug_print(self)
  83002. - def Xsize(self): return vimagemodule.VImage_Xsize(self)
  83003. - def Ysize(self): return vimagemodule.VImage_Ysize(self)
  83004. - def Bands(self): return vimagemodule.VImage_Bands(self)
  83005. - def BandFmt(self): return vimagemodule.VImage_BandFmt(self)
  83006. - def Coding(self): return vimagemodule.VImage_Coding(self)
  83007. - def Type(self): return vimagemodule.VImage_Type(self)
  83008. - def Xres(self): return vimagemodule.VImage_Xres(self)
  83009. - def Yres(self): return vimagemodule.VImage_Yres(self)
  83010. - def Length(self): return vimagemodule.VImage_Length(self)
  83011. - def Compression(self): return vimagemodule.VImage_Compression(self)
  83012. - def Level(self): return vimagemodule.VImage_Level(self)
  83013. - def Xoffset(self): return vimagemodule.VImage_Xoffset(self)
  83014. - def Yoffset(self): return vimagemodule.VImage_Yoffset(self)
  83015. - def filename(self): return vimagemodule.VImage_filename(self)
  83016. - def Hist(self): return vimagemodule.VImage_Hist(self)
  83017. - def meta_remove(self, *args): return vimagemodule.VImage_meta_remove(self, *args)
  83018. - def meta_get_typeof(self, *args): return vimagemodule.VImage_meta_get_typeof(self, *args)
  83019. - def meta_get_int(self, *args): return vimagemodule.VImage_meta_get_int(self, *args)
  83020. - def meta_get_double(self, *args): return vimagemodule.VImage_meta_get_double(self, *args)
  83021. - def meta_get_string(self, *args): return vimagemodule.VImage_meta_get_string(self, *args)
  83022. - def meta_get_area(self, *args): return vimagemodule.VImage_meta_get_area(self, *args)
  83023. - def meta_get_blob(self, *args): return vimagemodule.VImage_meta_get_blob(self, *args)
  83024. - def meta_set(self, *args): return vimagemodule.VImage_meta_set(self, *args)
  83025. - def initdesc(self, *args): return vimagemodule.VImage_initdesc(self, *args)
  83026. - def abs(self): return vimagemodule.VImage_abs(self)
  83027. - def acos(self): return vimagemodule.VImage_acos(self)
  83028. - def add(self, *args): return vimagemodule.VImage_add(self, *args)
  83029. - def asin(self): return vimagemodule.VImage_asin(self)
  83030. - def atan(self): return vimagemodule.VImage_atan(self)
  83031. - def avg(self): return vimagemodule.VImage_avg(self)
  83032. - def point(self, *args): return vimagemodule.VImage_point(self, *args)
  83033. - def point_bilinear(self, *args): return vimagemodule.VImage_point_bilinear(self, *args)
  83034. - def bandmean(self): return vimagemodule.VImage_bandmean(self)
  83035. - def ceil(self): return vimagemodule.VImage_ceil(self)
  83036. - def cos(self): return vimagemodule.VImage_cos(self)
  83037. - def cross_phase(self, *args): return vimagemodule.VImage_cross_phase(self, *args)
  83038. - def deviate(self): return vimagemodule.VImage_deviate(self)
  83039. - def divide(self, *args): return vimagemodule.VImage_divide(self, *args)
  83040. - def exp10(self): return vimagemodule.VImage_exp10(self)
  83041. - def expn(self, *args): return vimagemodule.VImage_expn(self, *args)
  83042. - def exp(self): return vimagemodule.VImage_exp(self)
  83043. - def floor(self): return vimagemodule.VImage_floor(self)
  83044. - def invert(self): return vimagemodule.VImage_invert(self)
  83045. - __swig_getmethods__["linreg"] = lambda x: vimagemodule.VImage_linreg
  83046. - if _newclass:linreg = staticmethod(vimagemodule.VImage_linreg)
  83047. - def lin(self, *args): return vimagemodule.VImage_lin(self, *args)
  83048. - def log10(self): return vimagemodule.VImage_log10(self)
  83049. - def log(self): return vimagemodule.VImage_log(self)
  83050. - def max(self): return vimagemodule.VImage_max(self)
  83051. - def maxpos(self): return vimagemodule.VImage_maxpos(self)
  83052. - def maxpos_avg(self): return vimagemodule.VImage_maxpos_avg(self)
  83053. - def measure(self, *args): return vimagemodule.VImage_measure(self, *args)
  83054. - def min(self): return vimagemodule.VImage_min(self)
  83055. - def minpos(self): return vimagemodule.VImage_minpos(self)
  83056. - def multiply(self, *args): return vimagemodule.VImage_multiply(self, *args)
  83057. - def pow(self, *args): return vimagemodule.VImage_pow(self, *args)
  83058. - def recomb(self, *args): return vimagemodule.VImage_recomb(self, *args)
  83059. - def remainder(self, *args): return vimagemodule.VImage_remainder(self, *args)
  83060. - def rint(self): return vimagemodule.VImage_rint(self)
  83061. - def sign(self): return vimagemodule.VImage_sign(self)
  83062. - def sin(self): return vimagemodule.VImage_sin(self)
  83063. - def stats(self): return vimagemodule.VImage_stats(self)
  83064. - def subtract(self, *args): return vimagemodule.VImage_subtract(self, *args)
  83065. - def tan(self): return vimagemodule.VImage_tan(self)
  83066. - def greyc(self, *args): return vimagemodule.VImage_greyc(self, *args)
  83067. - def greyc_mask(self, *args): return vimagemodule.VImage_greyc_mask(self, *args)
  83068. - def LCh2Lab(self): return vimagemodule.VImage_LCh2Lab(self)
  83069. - def LCh2UCS(self): return vimagemodule.VImage_LCh2UCS(self)
  83070. - def Lab2LCh(self): return vimagemodule.VImage_Lab2LCh(self)
  83071. - def Lab2LabQ(self): return vimagemodule.VImage_Lab2LabQ(self)
  83072. - def Lab2LabS(self): return vimagemodule.VImage_Lab2LabS(self)
  83073. - def Lab2UCS(self): return vimagemodule.VImage_Lab2UCS(self)
  83074. - def Lab2XYZ(self): return vimagemodule.VImage_Lab2XYZ(self)
  83075. - def Lab2XYZ_temp(self, *args): return vimagemodule.VImage_Lab2XYZ_temp(self, *args)
  83076. - def Lab2disp(self, *args): return vimagemodule.VImage_Lab2disp(self, *args)
  83077. - def LabQ2LabS(self): return vimagemodule.VImage_LabQ2LabS(self)
  83078. - def LabQ2Lab(self): return vimagemodule.VImage_LabQ2Lab(self)
  83079. - def LabQ2XYZ(self): return vimagemodule.VImage_LabQ2XYZ(self)
  83080. - def LabQ2disp(self, *args): return vimagemodule.VImage_LabQ2disp(self, *args)
  83081. - def LabS2LabQ(self): return vimagemodule.VImage_LabS2LabQ(self)
  83082. - def LabS2Lab(self): return vimagemodule.VImage_LabS2Lab(self)
  83083. - def UCS2LCh(self): return vimagemodule.VImage_UCS2LCh(self)
  83084. - def UCS2Lab(self): return vimagemodule.VImage_UCS2Lab(self)
  83085. - def UCS2XYZ(self): return vimagemodule.VImage_UCS2XYZ(self)
  83086. - def XYZ2Lab(self): return vimagemodule.VImage_XYZ2Lab(self)
  83087. - def XYZ2Lab_temp(self, *args): return vimagemodule.VImage_XYZ2Lab_temp(self, *args)
  83088. - def XYZ2UCS(self): return vimagemodule.VImage_XYZ2UCS(self)
  83089. - def XYZ2Yxy(self): return vimagemodule.VImage_XYZ2Yxy(self)
  83090. - def XYZ2disp(self, *args): return vimagemodule.VImage_XYZ2disp(self, *args)
  83091. - def XYZ2sRGB(self): return vimagemodule.VImage_XYZ2sRGB(self)
  83092. - def Yxy2XYZ(self): return vimagemodule.VImage_Yxy2XYZ(self)
  83093. - def dE00_fromLab(self, *args): return vimagemodule.VImage_dE00_fromLab(self, *args)
  83094. - def dECMC_fromLab(self, *args): return vimagemodule.VImage_dECMC_fromLab(self, *args)
  83095. - def dECMC_fromdisp(self, *args): return vimagemodule.VImage_dECMC_fromdisp(self, *args)
  83096. - def dE_fromLab(self, *args): return vimagemodule.VImage_dE_fromLab(self, *args)
  83097. - def dE_fromXYZ(self, *args): return vimagemodule.VImage_dE_fromXYZ(self, *args)
  83098. - def dE_fromdisp(self, *args): return vimagemodule.VImage_dE_fromdisp(self, *args)
  83099. - def disp2Lab(self, *args): return vimagemodule.VImage_disp2Lab(self, *args)
  83100. - def disp2XYZ(self, *args): return vimagemodule.VImage_disp2XYZ(self, *args)
  83101. - def float2rad(self): return vimagemodule.VImage_float2rad(self)
  83102. - def icc_ac2rc(self, *args): return vimagemodule.VImage_icc_ac2rc(self, *args)
  83103. - def icc_export_depth(self, *args): return vimagemodule.VImage_icc_export_depth(self, *args)
  83104. - def icc_import(self, *args): return vimagemodule.VImage_icc_import(self, *args)
  83105. - def icc_import_embedded(self, *args): return vimagemodule.VImage_icc_import_embedded(self, *args)
  83106. - def icc_transform(self, *args): return vimagemodule.VImage_icc_transform(self, *args)
  83107. - def lab_morph(self, *args): return vimagemodule.VImage_lab_morph(self, *args)
  83108. - def rad2float(self): return vimagemodule.VImage_rad2float(self)
  83109. - def sRGB2XYZ(self): return vimagemodule.VImage_sRGB2XYZ(self)
  83110. - __swig_getmethods__["gaussnoise"] = lambda x: vimagemodule.VImage_gaussnoise
  83111. - if _newclass:gaussnoise = staticmethod(vimagemodule.VImage_gaussnoise)
  83112. - def bandjoin(self, *args): return vimagemodule.VImage_bandjoin(self, *args)
  83113. - __swig_getmethods__["black"] = lambda x: vimagemodule.VImage_black
  83114. - if _newclass:black = staticmethod(vimagemodule.VImage_black)
  83115. - def c2amph(self): return vimagemodule.VImage_c2amph(self)
  83116. - def c2imag(self): return vimagemodule.VImage_c2imag(self)
  83117. - def c2real(self): return vimagemodule.VImage_c2real(self)
  83118. - def c2rect(self): return vimagemodule.VImage_c2rect(self)
  83119. - def clip2fmt(self, *args): return vimagemodule.VImage_clip2fmt(self, *args)
  83120. - def copy(self): return vimagemodule.VImage_copy(self)
  83121. - def copy_file(self): return vimagemodule.VImage_copy_file(self)
  83122. - def copy_morph(self, *args): return vimagemodule.VImage_copy_morph(self, *args)
  83123. - def copy_swap(self): return vimagemodule.VImage_copy_swap(self)
  83124. - def copy_set(self, *args): return vimagemodule.VImage_copy_set(self, *args)
  83125. - def extract_area(self, *args): return vimagemodule.VImage_extract_area(self, *args)
  83126. - def extract_areabands(self, *args): return vimagemodule.VImage_extract_areabands(self, *args)
  83127. - def extract_band(self, *args): return vimagemodule.VImage_extract_band(self, *args)
  83128. - def extract_bands(self, *args): return vimagemodule.VImage_extract_bands(self, *args)
  83129. - def extract(self, *args): return vimagemodule.VImage_extract(self, *args)
  83130. - def falsecolour(self): return vimagemodule.VImage_falsecolour(self)
  83131. - def fliphor(self): return vimagemodule.VImage_fliphor(self)
  83132. - def flipver(self): return vimagemodule.VImage_flipver(self)
  83133. - __swig_getmethods__["gbandjoin"] = lambda x: vimagemodule.VImage_gbandjoin
  83134. - if _newclass:gbandjoin = staticmethod(vimagemodule.VImage_gbandjoin)
  83135. - def grid(self, *args): return vimagemodule.VImage_grid(self, *args)
  83136. - def insert(self, *args): return vimagemodule.VImage_insert(self, *args)
  83137. - def insert_noexpand(self, *args): return vimagemodule.VImage_insert_noexpand(self, *args)
  83138. - def embed(self, *args): return vimagemodule.VImage_embed(self, *args)
  83139. - def lrjoin(self, *args): return vimagemodule.VImage_lrjoin(self, *args)
  83140. - def msb(self): return vimagemodule.VImage_msb(self)
  83141. - def msb_band(self, *args): return vimagemodule.VImage_msb_band(self, *args)
  83142. - def replicate(self, *args): return vimagemodule.VImage_replicate(self, *args)
  83143. - def ri2c(self, *args): return vimagemodule.VImage_ri2c(self, *args)
  83144. - def rot180(self): return vimagemodule.VImage_rot180(self)
  83145. - def rot270(self): return vimagemodule.VImage_rot270(self)
  83146. - def rot90(self): return vimagemodule.VImage_rot90(self)
  83147. - def scale(self): return vimagemodule.VImage_scale(self)
  83148. - def scaleps(self): return vimagemodule.VImage_scaleps(self)
  83149. - def subsample(self, *args): return vimagemodule.VImage_subsample(self, *args)
  83150. - def system(self, *args): return vimagemodule.VImage_system(self, *args)
  83151. - def system_image(self, *args): return vimagemodule.VImage_system_image(self, *args)
  83152. - def tbjoin(self, *args): return vimagemodule.VImage_tbjoin(self, *args)
  83153. - __swig_getmethods__["text"] = lambda x: vimagemodule.VImage_text
  83154. - if _newclass:text = staticmethod(vimagemodule.VImage_text)
  83155. - def wrap(self, *args): return vimagemodule.VImage_wrap(self, *args)
  83156. - def zoom(self, *args): return vimagemodule.VImage_zoom(self, *args)
  83157. - def aconvsep(self, *args): return vimagemodule.VImage_aconvsep(self, *args)
  83158. - def aconv(self, *args): return vimagemodule.VImage_aconv(self, *args)
  83159. - def addgnoise(self, *args): return vimagemodule.VImage_addgnoise(self, *args)
  83160. - def compass(self, *args): return vimagemodule.VImage_compass(self, *args)
  83161. - def contrast_surface(self, *args): return vimagemodule.VImage_contrast_surface(self, *args)
  83162. - def conv(self, *args): return vimagemodule.VImage_conv(self, *args)
  83163. - def convsep(self, *args): return vimagemodule.VImage_convsep(self, *args)
  83164. - def fastcor(self, *args): return vimagemodule.VImage_fastcor(self, *args)
  83165. - def gradcor(self, *args): return vimagemodule.VImage_gradcor(self, *args)
  83166. - def gradient(self, *args): return vimagemodule.VImage_gradient(self, *args)
  83167. - def grad_x(self): return vimagemodule.VImage_grad_x(self)
  83168. - def grad_y(self): return vimagemodule.VImage_grad_y(self)
  83169. - def lindetect(self, *args): return vimagemodule.VImage_lindetect(self, *args)
  83170. - def sharpen(self, *args): return vimagemodule.VImage_sharpen(self, *args)
  83171. - def spcor(self, *args): return vimagemodule.VImage_spcor(self, *args)
  83172. - def argb2rgba(self): return vimagemodule.VImage_argb2rgba(self)
  83173. - def flood_copy(self, *args): return vimagemodule.VImage_flood_copy(self, *args)
  83174. - def flood_blob_copy(self, *args): return vimagemodule.VImage_flood_blob_copy(self, *args)
  83175. - def flood_other_copy(self, *args): return vimagemodule.VImage_flood_other_copy(self, *args)
  83176. - def clip(self): return vimagemodule.VImage_clip(self)
  83177. - def c2ps(self): return vimagemodule.VImage_c2ps(self)
  83178. - def resize_linear(self, *args): return vimagemodule.VImage_resize_linear(self, *args)
  83179. - def cmulnorm(self, *args): return vimagemodule.VImage_cmulnorm(self, *args)
  83180. - def fav4(self, *args): return vimagemodule.VImage_fav4(self, *args)
  83181. - def gadd(self, *args): return vimagemodule.VImage_gadd(self, *args)
  83182. - def icc_export(self, *args): return vimagemodule.VImage_icc_export(self, *args)
  83183. - def litecor(self, *args): return vimagemodule.VImage_litecor(self, *args)
  83184. - def affine(self, *args): return vimagemodule.VImage_affine(self, *args)
  83185. - def clip2c(self): return vimagemodule.VImage_clip2c(self)
  83186. - def clip2cm(self): return vimagemodule.VImage_clip2cm(self)
  83187. - def clip2d(self): return vimagemodule.VImage_clip2d(self)
  83188. - def clip2dcm(self): return vimagemodule.VImage_clip2dcm(self)
  83189. - def clip2f(self): return vimagemodule.VImage_clip2f(self)
  83190. - def clip2i(self): return vimagemodule.VImage_clip2i(self)
  83191. - def convsub(self, *args): return vimagemodule.VImage_convsub(self, *args)
  83192. - def convf(self, *args): return vimagemodule.VImage_convf(self, *args)
  83193. - def convsepf(self, *args): return vimagemodule.VImage_convsepf(self, *args)
  83194. - def clip2s(self): return vimagemodule.VImage_clip2s(self)
  83195. - def clip2ui(self): return vimagemodule.VImage_clip2ui(self)
  83196. - def clip2us(self): return vimagemodule.VImage_clip2us(self)
  83197. - def slice(self, *args): return vimagemodule.VImage_slice(self, *args)
  83198. - def segment(self): return vimagemodule.VImage_segment(self)
  83199. - def thresh(self, *args): return vimagemodule.VImage_thresh(self, *args)
  83200. - def convf_raw(self, *args): return vimagemodule.VImage_convf_raw(self, *args)
  83201. - def conv_raw(self, *args): return vimagemodule.VImage_conv_raw(self, *args)
  83202. - def contrast_surface_raw(self, *args): return vimagemodule.VImage_contrast_surface_raw(self, *args)
  83203. - def convsepf_raw(self, *args): return vimagemodule.VImage_convsepf_raw(self, *args)
  83204. - def convsep_raw(self, *args): return vimagemodule.VImage_convsep_raw(self, *args)
  83205. - def fastcor_raw(self, *args): return vimagemodule.VImage_fastcor_raw(self, *args)
  83206. - def gradcor_raw(self, *args): return vimagemodule.VImage_gradcor_raw(self, *args)
  83207. - def spcor_raw(self, *args): return vimagemodule.VImage_spcor_raw(self, *args)
  83208. - def lhisteq_raw(self, *args): return vimagemodule.VImage_lhisteq_raw(self, *args)
  83209. - def stdif_raw(self, *args): return vimagemodule.VImage_stdif_raw(self, *args)
  83210. - def rank_raw(self, *args): return vimagemodule.VImage_rank_raw(self, *args)
  83211. - def dilate_raw(self, *args): return vimagemodule.VImage_dilate_raw(self, *args)
  83212. - def erode_raw(self, *args): return vimagemodule.VImage_erode_raw(self, *args)
  83213. - def similarity_area(self, *args): return vimagemodule.VImage_similarity_area(self, *args)
  83214. - def similarity(self, *args): return vimagemodule.VImage_similarity(self, *args)
  83215. - __swig_getmethods__["mask2vips"] = lambda x: vimagemodule.VImage_mask2vips
  83216. - if _newclass:mask2vips = staticmethod(vimagemodule.VImage_mask2vips)
  83217. - def vips2mask(self): return vimagemodule.VImage_vips2mask(self)
  83218. - def insertplace(self, *args): return vimagemodule.VImage_insertplace(self, *args)
  83219. - def circle(self, *args): return vimagemodule.VImage_circle(self, *args)
  83220. - def andimage(self, *args): return vimagemodule.VImage_andimage(self, *args)
  83221. - def orimage(self, *args): return vimagemodule.VImage_orimage(self, *args)
  83222. - def eorimage(self, *args): return vimagemodule.VImage_eorimage(self, *args)
  83223. - def shiftleft(self, *args): return vimagemodule.VImage_shiftleft(self, *args)
  83224. - def shiftright(self, *args): return vimagemodule.VImage_shiftright(self, *args)
  83225. - def blend(self, *args): return vimagemodule.VImage_blend(self, *args)
  83226. - def equal(self, *args): return vimagemodule.VImage_equal(self, *args)
  83227. - def ifthenelse(self, *args): return vimagemodule.VImage_ifthenelse(self, *args)
  83228. - def less(self, *args): return vimagemodule.VImage_less(self, *args)
  83229. - def lesseq(self, *args): return vimagemodule.VImage_lesseq(self, *args)
  83230. - def more(self, *args): return vimagemodule.VImage_more(self, *args)
  83231. - def moreeq(self, *args): return vimagemodule.VImage_moreeq(self, *args)
  83232. - def notequal(self, *args): return vimagemodule.VImage_notequal(self, *args)
  83233. - def quadratic(self, *args): return vimagemodule.VImage_quadratic(self, *args)
  83234. - __swig_getmethods__["csv2vips"] = lambda x: vimagemodule.VImage_csv2vips
  83235. - if _newclass:csv2vips = staticmethod(vimagemodule.VImage_csv2vips)
  83236. - __swig_getmethods__["fits2vips"] = lambda x: vimagemodule.VImage_fits2vips
  83237. - if _newclass:fits2vips = staticmethod(vimagemodule.VImage_fits2vips)
  83238. - __swig_getmethods__["jpeg2vips"] = lambda x: vimagemodule.VImage_jpeg2vips
  83239. - if _newclass:jpeg2vips = staticmethod(vimagemodule.VImage_jpeg2vips)
  83240. - __swig_getmethods__["magick2vips"] = lambda x: vimagemodule.VImage_magick2vips
  83241. - if _newclass:magick2vips = staticmethod(vimagemodule.VImage_magick2vips)
  83242. - __swig_getmethods__["png2vips"] = lambda x: vimagemodule.VImage_png2vips
  83243. - if _newclass:png2vips = staticmethod(vimagemodule.VImage_png2vips)
  83244. - __swig_getmethods__["exr2vips"] = lambda x: vimagemodule.VImage_exr2vips
  83245. - if _newclass:exr2vips = staticmethod(vimagemodule.VImage_exr2vips)
  83246. - __swig_getmethods__["ppm2vips"] = lambda x: vimagemodule.VImage_ppm2vips
  83247. - if _newclass:ppm2vips = staticmethod(vimagemodule.VImage_ppm2vips)
  83248. - __swig_getmethods__["analyze2vips"] = lambda x: vimagemodule.VImage_analyze2vips
  83249. - if _newclass:analyze2vips = staticmethod(vimagemodule.VImage_analyze2vips)
  83250. - __swig_getmethods__["tiff2vips"] = lambda x: vimagemodule.VImage_tiff2vips
  83251. - if _newclass:tiff2vips = staticmethod(vimagemodule.VImage_tiff2vips)
  83252. - def vips2csv(self, *args): return vimagemodule.VImage_vips2csv(self, *args)
  83253. - def vips2dz(self, *args): return vimagemodule.VImage_vips2dz(self, *args)
  83254. - def vips2jpeg(self, *args): return vimagemodule.VImage_vips2jpeg(self, *args)
  83255. - def vips2mimejpeg(self, *args): return vimagemodule.VImage_vips2mimejpeg(self, *args)
  83256. - def vips2png(self, *args): return vimagemodule.VImage_vips2png(self, *args)
  83257. - def vips2ppm(self, *args): return vimagemodule.VImage_vips2ppm(self, *args)
  83258. - def vips2tiff(self, *args): return vimagemodule.VImage_vips2tiff(self, *args)
  83259. - __swig_getmethods__["create_fmask"] = lambda x: vimagemodule.VImage_create_fmask
  83260. - if _newclass:create_fmask = staticmethod(vimagemodule.VImage_create_fmask)
  83261. - def disp_ps(self): return vimagemodule.VImage_disp_ps(self)
  83262. - def flt_image_freq(self, *args): return vimagemodule.VImage_flt_image_freq(self, *args)
  83263. - __swig_getmethods__["fractsurf"] = lambda x: vimagemodule.VImage_fractsurf
  83264. - if _newclass:fractsurf = staticmethod(vimagemodule.VImage_fractsurf)
  83265. - def freqflt(self, *args): return vimagemodule.VImage_freqflt(self, *args)
  83266. - def fwfft(self): return vimagemodule.VImage_fwfft(self)
  83267. - def rotquad(self): return vimagemodule.VImage_rotquad(self)
  83268. - def invfft(self): return vimagemodule.VImage_invfft(self)
  83269. - def phasecor_fft(self, *args): return vimagemodule.VImage_phasecor_fft(self, *args)
  83270. - def invfftr(self): return vimagemodule.VImage_invfftr(self)
  83271. - def gammacorrect(self, *args): return vimagemodule.VImage_gammacorrect(self, *args)
  83272. - def heq(self, *args): return vimagemodule.VImage_heq(self, *args)
  83273. - def hist(self, *args): return vimagemodule.VImage_hist(self, *args)
  83274. - def histcum(self): return vimagemodule.VImage_histcum(self)
  83275. - def histeq(self): return vimagemodule.VImage_histeq(self)
  83276. - def hist_indexed(self, *args): return vimagemodule.VImage_hist_indexed(self, *args)
  83277. - def histgr(self, *args): return vimagemodule.VImage_histgr(self, *args)
  83278. - def histnD(self, *args): return vimagemodule.VImage_histnD(self, *args)
  83279. - def histnorm(self): return vimagemodule.VImage_histnorm(self)
  83280. - def histplot(self): return vimagemodule.VImage_histplot(self)
  83281. - def histspec(self, *args): return vimagemodule.VImage_histspec(self, *args)
  83282. - def hsp(self, *args): return vimagemodule.VImage_hsp(self, *args)
  83283. - __swig_getmethods__["identity"] = lambda x: vimagemodule.VImage_identity
  83284. - if _newclass:identity = staticmethod(vimagemodule.VImage_identity)
  83285. - __swig_getmethods__["identity_ushort"] = lambda x: vimagemodule.VImage_identity_ushort
  83286. - if _newclass:identity_ushort = staticmethod(vimagemodule.VImage_identity_ushort)
  83287. - def ismonotonic(self): return vimagemodule.VImage_ismonotonic(self)
  83288. - def lhisteq(self, *args): return vimagemodule.VImage_lhisteq(self, *args)
  83289. - def mpercent(self, *args): return vimagemodule.VImage_mpercent(self, *args)
  83290. - __swig_getmethods__["invertlut"] = lambda x: vimagemodule.VImage_invertlut
  83291. - if _newclass:invertlut = staticmethod(vimagemodule.VImage_invertlut)
  83292. - __swig_getmethods__["buildlut"] = lambda x: vimagemodule.VImage_buildlut
  83293. - if _newclass:buildlut = staticmethod(vimagemodule.VImage_buildlut)
  83294. - def maplut(self, *args): return vimagemodule.VImage_maplut(self, *args)
  83295. - def project(self, *args): return vimagemodule.VImage_project(self, *args)
  83296. - def stdif(self, *args): return vimagemodule.VImage_stdif(self, *args)
  83297. - def tone_analyse(self, *args): return vimagemodule.VImage_tone_analyse(self, *args)
  83298. - __swig_getmethods__["tone_build"] = lambda x: vimagemodule.VImage_tone_build
  83299. - if _newclass:tone_build = staticmethod(vimagemodule.VImage_tone_build)
  83300. - __swig_getmethods__["tone_build_range"] = lambda x: vimagemodule.VImage_tone_build_range
  83301. - if _newclass:tone_build_range = staticmethod(vimagemodule.VImage_tone_build_range)
  83302. - def tone_map(self, *args): return vimagemodule.VImage_tone_map(self, *args)
  83303. - def draw_circle(self, *args): return vimagemodule.VImage_draw_circle(self, *args)
  83304. - def draw_rect(self, *args): return vimagemodule.VImage_draw_rect(self, *args)
  83305. - def draw_line(self, *args): return vimagemodule.VImage_draw_line(self, *args)
  83306. - def draw_point(self, *args): return vimagemodule.VImage_draw_point(self, *args)
  83307. - def draw_smudge(self, *args): return vimagemodule.VImage_draw_smudge(self, *args)
  83308. - def draw_flood(self, *args): return vimagemodule.VImage_draw_flood(self, *args)
  83309. - def draw_flood_blob(self, *args): return vimagemodule.VImage_draw_flood_blob(self, *args)
  83310. - def draw_flood_other(self, *args): return vimagemodule.VImage_draw_flood_other(self, *args)
  83311. - def draw_image(self, *args): return vimagemodule.VImage_draw_image(self, *args)
  83312. - def draw_mask(self, *args): return vimagemodule.VImage_draw_mask(self, *args)
  83313. - def line(self, *args): return vimagemodule.VImage_line(self, *args)
  83314. - __swig_getmethods__["binfile"] = lambda x: vimagemodule.VImage_binfile
  83315. - if _newclass:binfile = staticmethod(vimagemodule.VImage_binfile)
  83316. - def cache(self, *args): return vimagemodule.VImage_cache(self, *args)
  83317. - def getext(self): return vimagemodule.VImage_getext(self)
  83318. - def header_get_typeof(self, *args): return vimagemodule.VImage_header_get_typeof(self, *args)
  83319. - def header_int(self, *args): return vimagemodule.VImage_header_int(self, *args)
  83320. - def header_double(self, *args): return vimagemodule.VImage_header_double(self, *args)
  83321. - def header_string(self, *args): return vimagemodule.VImage_header_string(self, *args)
  83322. - def history_get(self): return vimagemodule.VImage_history_get(self)
  83323. - def printdesc(self): return vimagemodule.VImage_printdesc(self)
  83324. - def cntlines(self, *args): return vimagemodule.VImage_cntlines(self, *args)
  83325. - def dilate(self, *args): return vimagemodule.VImage_dilate(self, *args)
  83326. - def rank(self, *args): return vimagemodule.VImage_rank(self, *args)
  83327. - __swig_getmethods__["rank_image"] = lambda x: vimagemodule.VImage_rank_image
  83328. - if _newclass:rank_image = staticmethod(vimagemodule.VImage_rank_image)
  83329. - __swig_getmethods__["maxvalue"] = lambda x: vimagemodule.VImage_maxvalue
  83330. - if _newclass:maxvalue = staticmethod(vimagemodule.VImage_maxvalue)
  83331. - def label_regions(self): return vimagemodule.VImage_label_regions(self)
  83332. - def zerox(self, *args): return vimagemodule.VImage_zerox(self, *args)
  83333. - def erode(self, *args): return vimagemodule.VImage_erode(self, *args)
  83334. - def profile(self, *args): return vimagemodule.VImage_profile(self, *args)
  83335. - def align_bands(self): return vimagemodule.VImage_align_bands(self)
  83336. - def correl(self, *args): return vimagemodule.VImage_correl(self, *args)
  83337. - def _find_lroverlap(self, *args): return vimagemodule.VImage__find_lroverlap(self, *args)
  83338. - def _find_tboverlap(self, *args): return vimagemodule.VImage__find_tboverlap(self, *args)
  83339. - def global_balance(self, *args): return vimagemodule.VImage_global_balance(self, *args)
  83340. - def global_balancef(self, *args): return vimagemodule.VImage_global_balancef(self, *args)
  83341. - def lrmerge(self, *args): return vimagemodule.VImage_lrmerge(self, *args)
  83342. - def lrmerge1(self, *args): return vimagemodule.VImage_lrmerge1(self, *args)
  83343. - def lrmosaic(self, *args): return vimagemodule.VImage_lrmosaic(self, *args)
  83344. - def lrmosaic1(self, *args): return vimagemodule.VImage_lrmosaic1(self, *args)
  83345. - def match_linear(self, *args): return vimagemodule.VImage_match_linear(self, *args)
  83346. - def match_linear_search(self, *args): return vimagemodule.VImage_match_linear_search(self, *args)
  83347. - def maxpos_subpel(self): return vimagemodule.VImage_maxpos_subpel(self)
  83348. - def remosaic(self, *args): return vimagemodule.VImage_remosaic(self, *args)
  83349. - def tbmerge(self, *args): return vimagemodule.VImage_tbmerge(self, *args)
  83350. - def tbmerge1(self, *args): return vimagemodule.VImage_tbmerge1(self, *args)
  83351. - def tbmosaic(self, *args): return vimagemodule.VImage_tbmosaic(self, *args)
  83352. - def tbmosaic1(self, *args): return vimagemodule.VImage_tbmosaic1(self, *args)
  83353. - def benchmark(self): return vimagemodule.VImage_benchmark(self)
  83354. - def benchmark2(self): return vimagemodule.VImage_benchmark2(self)
  83355. - def benchmarkn(self, *args): return vimagemodule.VImage_benchmarkn(self, *args)
  83356. - __swig_getmethods__["eye"] = lambda x: vimagemodule.VImage_eye
  83357. - if _newclass:eye = staticmethod(vimagemodule.VImage_eye)
  83358. - __swig_getmethods__["grey"] = lambda x: vimagemodule.VImage_grey
  83359. - if _newclass:grey = staticmethod(vimagemodule.VImage_grey)
  83360. - __swig_getmethods__["feye"] = lambda x: vimagemodule.VImage_feye
  83361. - if _newclass:feye = staticmethod(vimagemodule.VImage_feye)
  83362. - __swig_getmethods__["fgrey"] = lambda x: vimagemodule.VImage_fgrey
  83363. - if _newclass:fgrey = staticmethod(vimagemodule.VImage_fgrey)
  83364. - __swig_getmethods__["fzone"] = lambda x: vimagemodule.VImage_fzone
  83365. - if _newclass:fzone = staticmethod(vimagemodule.VImage_fzone)
  83366. - __swig_getmethods__["make_xy"] = lambda x: vimagemodule.VImage_make_xy
  83367. - if _newclass:make_xy = staticmethod(vimagemodule.VImage_make_xy)
  83368. - __swig_getmethods__["sines"] = lambda x: vimagemodule.VImage_sines
  83369. - if _newclass:sines = staticmethod(vimagemodule.VImage_sines)
  83370. - __swig_getmethods__["zone"] = lambda x: vimagemodule.VImage_zone
  83371. - if _newclass:zone = staticmethod(vimagemodule.VImage_zone)
  83372. - def rightshift_size(self, *args): return vimagemodule.VImage_rightshift_size(self, *args)
  83373. - def shrink(self, *args): return vimagemodule.VImage_shrink(self, *args)
  83374. - def stretch3(self, *args): return vimagemodule.VImage_stretch3(self, *args)
  83375. - def affinei(self, *args): return vimagemodule.VImage_affinei(self, *args)
  83376. - def affinei_all(self, *args): return vimagemodule.VImage_affinei_all(self, *args)
  83377. - __swig_getmethods__["video_test"] = lambda x: vimagemodule.VImage_video_test
  83378. - if _newclass:video_test = staticmethod(vimagemodule.VImage_video_test)
  83379. - __swig_getmethods__["video_v4l1"] = lambda x: vimagemodule.VImage_video_v4l1
  83380. - if _newclass:video_v4l1 = staticmethod(vimagemodule.VImage_video_v4l1)
  83381. - def tobuffer(self): return vimagemodule.VImage_tobuffer(self)
  83382. - __swig_getmethods__["frombuffer"] = lambda x: vimagemodule.VImage_frombuffer
  83383. - if _newclass:frombuffer = staticmethod(vimagemodule.VImage_frombuffer)
  83384. - def tostring(self): return vimagemodule.VImage_tostring(self)
  83385. - __swig_getmethods__["fromstring"] = lambda x: vimagemodule.VImage_fromstring
  83386. - if _newclass:fromstring = staticmethod(vimagemodule.VImage_fromstring)
  83387. -VImage_swigregister = vimagemodule.VImage_swigregister
  83388. -VImage_swigregister(VImage)
  83389. -
  83390. -def VImage_print_all():
  83391. - return vimagemodule.VImage_print_all()
  83392. -VImage_print_all = vimagemodule.VImage_print_all
  83393. -
  83394. -def VImage_convert2disc(*args):
  83395. - return vimagemodule.VImage_convert2disc(*args)
  83396. -VImage_convert2disc = vimagemodule.VImage_convert2disc
  83397. -
  83398. -def VImage_linreg(*args):
  83399. - return vimagemodule.VImage_linreg(*args)
  83400. -VImage_linreg = vimagemodule.VImage_linreg
  83401. -
  83402. -def VImage_gaussnoise(*args):
  83403. - return vimagemodule.VImage_gaussnoise(*args)
  83404. -VImage_gaussnoise = vimagemodule.VImage_gaussnoise
  83405. -
  83406. -def VImage_black(*args):
  83407. - return vimagemodule.VImage_black(*args)
  83408. -VImage_black = vimagemodule.VImage_black
  83409. -
  83410. -def VImage_gbandjoin(*args):
  83411. - return vimagemodule.VImage_gbandjoin(*args)
  83412. -VImage_gbandjoin = vimagemodule.VImage_gbandjoin
  83413. -
  83414. -def VImage_text(*args):
  83415. - return vimagemodule.VImage_text(*args)
  83416. -VImage_text = vimagemodule.VImage_text
  83417. -
  83418. -def VImage_mask2vips(*args):
  83419. - return vimagemodule.VImage_mask2vips(*args)
  83420. -VImage_mask2vips = vimagemodule.VImage_mask2vips
  83421. -
  83422. -def VImage_csv2vips(*args):
  83423. - return vimagemodule.VImage_csv2vips(*args)
  83424. -VImage_csv2vips = vimagemodule.VImage_csv2vips
  83425. -
  83426. -def VImage_fits2vips(*args):
  83427. - return vimagemodule.VImage_fits2vips(*args)
  83428. -VImage_fits2vips = vimagemodule.VImage_fits2vips
  83429. -
  83430. -def VImage_jpeg2vips(*args):
  83431. - return vimagemodule.VImage_jpeg2vips(*args)
  83432. -VImage_jpeg2vips = vimagemodule.VImage_jpeg2vips
  83433. -
  83434. -def VImage_magick2vips(*args):
  83435. - return vimagemodule.VImage_magick2vips(*args)
  83436. -VImage_magick2vips = vimagemodule.VImage_magick2vips
  83437. -
  83438. -def VImage_png2vips(*args):
  83439. - return vimagemodule.VImage_png2vips(*args)
  83440. -VImage_png2vips = vimagemodule.VImage_png2vips
  83441. -
  83442. -def VImage_exr2vips(*args):
  83443. - return vimagemodule.VImage_exr2vips(*args)
  83444. -VImage_exr2vips = vimagemodule.VImage_exr2vips
  83445. -
  83446. -def VImage_ppm2vips(*args):
  83447. - return vimagemodule.VImage_ppm2vips(*args)
  83448. -VImage_ppm2vips = vimagemodule.VImage_ppm2vips
  83449. -
  83450. -def VImage_analyze2vips(*args):
  83451. - return vimagemodule.VImage_analyze2vips(*args)
  83452. -VImage_analyze2vips = vimagemodule.VImage_analyze2vips
  83453. -
  83454. -def VImage_tiff2vips(*args):
  83455. - return vimagemodule.VImage_tiff2vips(*args)
  83456. -VImage_tiff2vips = vimagemodule.VImage_tiff2vips
  83457. -
  83458. -def VImage_create_fmask(*args):
  83459. - return vimagemodule.VImage_create_fmask(*args)
  83460. -VImage_create_fmask = vimagemodule.VImage_create_fmask
  83461. -
  83462. -def VImage_fractsurf(*args):
  83463. - return vimagemodule.VImage_fractsurf(*args)
  83464. -VImage_fractsurf = vimagemodule.VImage_fractsurf
  83465. -
  83466. -def VImage_identity(*args):
  83467. - return vimagemodule.VImage_identity(*args)
  83468. -VImage_identity = vimagemodule.VImage_identity
  83469. -
  83470. -def VImage_identity_ushort(*args):
  83471. - return vimagemodule.VImage_identity_ushort(*args)
  83472. -VImage_identity_ushort = vimagemodule.VImage_identity_ushort
  83473. -
  83474. -def VImage_invertlut(*args):
  83475. - return vimagemodule.VImage_invertlut(*args)
  83476. -VImage_invertlut = vimagemodule.VImage_invertlut
  83477. -
  83478. -def VImage_buildlut(*args):
  83479. - return vimagemodule.VImage_buildlut(*args)
  83480. -VImage_buildlut = vimagemodule.VImage_buildlut
  83481. -
  83482. -def VImage_tone_build(*args):
  83483. - return vimagemodule.VImage_tone_build(*args)
  83484. -VImage_tone_build = vimagemodule.VImage_tone_build
  83485. -
  83486. -def VImage_tone_build_range(*args):
  83487. - return vimagemodule.VImage_tone_build_range(*args)
  83488. -VImage_tone_build_range = vimagemodule.VImage_tone_build_range
  83489. -
  83490. -def VImage_binfile(*args):
  83491. - return vimagemodule.VImage_binfile(*args)
  83492. -VImage_binfile = vimagemodule.VImage_binfile
  83493. -
  83494. -def VImage_rank_image(*args):
  83495. - return vimagemodule.VImage_rank_image(*args)
  83496. -VImage_rank_image = vimagemodule.VImage_rank_image
  83497. -
  83498. -def VImage_maxvalue(*args):
  83499. - return vimagemodule.VImage_maxvalue(*args)
  83500. -VImage_maxvalue = vimagemodule.VImage_maxvalue
  83501. -
  83502. -def VImage_eye(*args):
  83503. - return vimagemodule.VImage_eye(*args)
  83504. -VImage_eye = vimagemodule.VImage_eye
  83505. -
  83506. -def VImage_grey(*args):
  83507. - return vimagemodule.VImage_grey(*args)
  83508. -VImage_grey = vimagemodule.VImage_grey
  83509. -
  83510. -def VImage_feye(*args):
  83511. - return vimagemodule.VImage_feye(*args)
  83512. -VImage_feye = vimagemodule.VImage_feye
  83513. -
  83514. -def VImage_fgrey(*args):
  83515. - return vimagemodule.VImage_fgrey(*args)
  83516. -VImage_fgrey = vimagemodule.VImage_fgrey
  83517. -
  83518. -def VImage_fzone(*args):
  83519. - return vimagemodule.VImage_fzone(*args)
  83520. -VImage_fzone = vimagemodule.VImage_fzone
  83521. -
  83522. -def VImage_make_xy(*args):
  83523. - return vimagemodule.VImage_make_xy(*args)
  83524. -VImage_make_xy = vimagemodule.VImage_make_xy
  83525. -
  83526. -def VImage_sines(*args):
  83527. - return vimagemodule.VImage_sines(*args)
  83528. -VImage_sines = vimagemodule.VImage_sines
  83529. -
  83530. -def VImage_zone(*args):
  83531. - return vimagemodule.VImage_zone(*args)
  83532. -VImage_zone = vimagemodule.VImage_zone
  83533. -
  83534. -def VImage_video_test(*args):
  83535. - return vimagemodule.VImage_video_test(*args)
  83536. -VImage_video_test = vimagemodule.VImage_video_test
  83537. -
  83538. -def VImage_video_v4l1(*args):
  83539. - return vimagemodule.VImage_video_v4l1(*args)
  83540. -VImage_video_v4l1 = vimagemodule.VImage_video_v4l1
  83541. -
  83542. -def VImage_frombuffer(*args):
  83543. - return vimagemodule.VImage_frombuffer(*args)
  83544. -VImage_frombuffer = vimagemodule.VImage_frombuffer
  83545. -
  83546. -def VImage_fromstring(*args):
  83547. - return vimagemodule.VImage_fromstring(*args)
  83548. -VImage_fromstring = vimagemodule.VImage_fromstring
  83549. -
  83550. -
  83551. -def im_init_world(*args):
  83552. - return vimagemodule.im_init_world(*args)
  83553. -im_init_world = vimagemodule.im_init_world
  83554. -
  83555. -def im__print_all():
  83556. - return vimagemodule.im__print_all()
  83557. -im__print_all = vimagemodule.im__print_all
  83558. -
  83559. -def im_col_Lab2XYZ(*args):
  83560. - return vimagemodule.im_col_Lab2XYZ(*args)
  83561. -im_col_Lab2XYZ = vimagemodule.im_col_Lab2XYZ
  83562. -# try to guess a PIL mode string from a VIPS image
  83563. -def PIL_mode_from_vips (vim):
  83564. - if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR:
  83565. - return 'RGB'
  83566. - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB:
  83567. - return 'RGBA'
  83568. - elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK:
  83569. - return 'CMYK'
  83570. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR:
  83571. - return 'L'
  83572. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT:
  83573. - return 'I'
  83574. - elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT:
  83575. - return 'F'
  83576. - elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR:
  83577. - return 'LA'
  83578. - else:
  83579. - raise ValueError ('unsupported vips -> pil image')
  83580. -
  83581. -# return vips (bands, format, type) for a PIL mode
  83582. -def vips_from_PIL_mode (mode):
  83583. - if mode == 'RGB':
  83584. - return (3, VImage.FMTUCHAR, VImage.RGB)
  83585. - elif mode == 'RGBA':
  83586. - return (4, VImage.FMTUCHAR, VImage.RGB)
  83587. - elif mode == 'CMYK':
  83588. - return (4, VImage.FMTUCHAR, VImage.CMYK)
  83589. - elif mode == 'L':
  83590. - return (1, VImage.FMTUCHAR, VImage.B_W)
  83591. - elif mode == 'I':
  83592. - return (1, VImage.FMTINT, VImage.B_W)
  83593. - elif mode == 'F':
  83594. - return (1, VImage.FMTFLOAT, VImage.B_W)
  83595. - elif mode == 'LA':
  83596. - return (2, VImage.FMTUCHAR, VImage.B_W)
  83597. - else:
  83598. - raise ValueError ('unsupported pil -> vips image')
  83599. -
  83600. -# This file is compatible with both classic and new-style classes.
  83601. -
  83602. -
  83603. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VMask.i vips-7.38.5/swig/vipsCC/VMask.i
  83604. --- vips-7.38.5-vanilla/swig/vipsCC/VMask.i 2014-07-17 23:48:36.207794473 -0400
  83605. +++ vips-7.38.5/swig/vipsCC/VMask.i 1969-12-31 19:00:00.000000000 -0500
  83606. @@ -1,35 +0,0 @@
  83607. -/* SWIG interface file for VMask.
  83608. - */
  83609. -
  83610. -%module VMask
  83611. -%{
  83612. -#include <stdexcept>
  83613. -#include <vips/vipscpp.h>
  83614. -%}
  83615. -
  83616. -%import "VError.i"
  83617. -%import "VImage.i"
  83618. -
  83619. -/* Need to override assignment to get refcounting working.
  83620. - */
  83621. -%rename(__assign__) *::operator=;
  83622. -
  83623. -/* [] is array subscript, as you'd expect.
  83624. - */
  83625. -%rename(__index__) vips::VIMask::operator[];
  83626. -%rename(__index__) vips::VDMask::operator[];
  83627. -
  83628. -/* () is 2d array subscript, how odd!
  83629. - */
  83630. -%rename(__call__) vips::VIMask::operator();
  83631. -%rename(__call__) vips::VDMask::operator();
  83632. -
  83633. -/* Type conversion operators renamed as functions.
  83634. - */
  83635. -%rename(convert_VImage) vips::VIMask::operator vips::VImage;
  83636. -%rename(convert_VImage) vips::VDMask::operator vips::VImage;
  83637. -
  83638. -%rename(convert_VIMask) vips::VDMask::operator vips::VIMask;
  83639. -%rename(convert_VDMask) vips::VIMask::operator vips::VDMask;
  83640. -
  83641. -%include vips/VMask.h
  83642. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/vmaskmodule.cxx vips-7.38.5/swig/vipsCC/vmaskmodule.cxx
  83643. --- vips-7.38.5-vanilla/swig/vipsCC/vmaskmodule.cxx 2014-07-17 23:48:36.208794473 -0400
  83644. +++ vips-7.38.5/swig/vipsCC/vmaskmodule.cxx 1969-12-31 19:00:00.000000000 -0500
  83645. @@ -1,7363 +0,0 @@
  83646. -/* ----------------------------------------------------------------------------
  83647. - * This file was automatically generated by SWIG (http://www.swig.org).
  83648. - * Version 2.0.10
  83649. - *
  83650. - * This file is not intended to be easily readable and contains a number of
  83651. - * coding conventions designed to improve portability and efficiency. Do not make
  83652. - * changes to this file unless you know what you are doing--modify the SWIG
  83653. - * interface file instead.
  83654. - * ----------------------------------------------------------------------------- */
  83655. -
  83656. -#define SWIGPYTHON
  83657. -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  83658. -
  83659. -
  83660. -#ifdef __cplusplus
  83661. -/* SwigValueWrapper is described in swig.swg */
  83662. -template<typename T> class SwigValueWrapper {
  83663. - struct SwigMovePointer {
  83664. - T *ptr;
  83665. - SwigMovePointer(T *p) : ptr(p) { }
  83666. - ~SwigMovePointer() { delete ptr; }
  83667. - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  83668. - } pointer;
  83669. - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  83670. - SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  83671. -public:
  83672. - SwigValueWrapper() : pointer(0) { }
  83673. - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  83674. - operator T&() const { return *pointer.ptr; }
  83675. - T *operator&() { return pointer.ptr; }
  83676. -};
  83677. -
  83678. -template <typename T> T SwigValueInit() {
  83679. - return T();
  83680. -}
  83681. -#endif
  83682. -
  83683. -/* -----------------------------------------------------------------------------
  83684. - * This section contains generic SWIG labels for method/variable
  83685. - * declarations/attributes, and other compiler dependent labels.
  83686. - * ----------------------------------------------------------------------------- */
  83687. -
  83688. -/* template workaround for compilers that cannot correctly implement the C++ standard */
  83689. -#ifndef SWIGTEMPLATEDISAMBIGUATOR
  83690. -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  83691. -# define SWIGTEMPLATEDISAMBIGUATOR template
  83692. -# elif defined(__HP_aCC)
  83693. -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  83694. -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  83695. -# define SWIGTEMPLATEDISAMBIGUATOR template
  83696. -# else
  83697. -# define SWIGTEMPLATEDISAMBIGUATOR
  83698. -# endif
  83699. -#endif
  83700. -
  83701. -/* inline attribute */
  83702. -#ifndef SWIGINLINE
  83703. -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  83704. -# define SWIGINLINE inline
  83705. -# else
  83706. -# define SWIGINLINE
  83707. -# endif
  83708. -#endif
  83709. -
  83710. -/* attribute recognised by some compilers to avoid 'unused' warnings */
  83711. -#ifndef SWIGUNUSED
  83712. -# if defined(__GNUC__)
  83713. -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  83714. -# define SWIGUNUSED __attribute__ ((__unused__))
  83715. -# else
  83716. -# define SWIGUNUSED
  83717. -# endif
  83718. -# elif defined(__ICC)
  83719. -# define SWIGUNUSED __attribute__ ((__unused__))
  83720. -# else
  83721. -# define SWIGUNUSED
  83722. -# endif
  83723. -#endif
  83724. -
  83725. -#ifndef SWIG_MSC_UNSUPPRESS_4505
  83726. -# if defined(_MSC_VER)
  83727. -# pragma warning(disable : 4505) /* unreferenced local function has been removed */
  83728. -# endif
  83729. -#endif
  83730. -
  83731. -#ifndef SWIGUNUSEDPARM
  83732. -# ifdef __cplusplus
  83733. -# define SWIGUNUSEDPARM(p)
  83734. -# else
  83735. -# define SWIGUNUSEDPARM(p) p SWIGUNUSED
  83736. -# endif
  83737. -#endif
  83738. -
  83739. -/* internal SWIG method */
  83740. -#ifndef SWIGINTERN
  83741. -# define SWIGINTERN static SWIGUNUSED
  83742. -#endif
  83743. -
  83744. -/* internal inline SWIG method */
  83745. -#ifndef SWIGINTERNINLINE
  83746. -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  83747. -#endif
  83748. -
  83749. -/* exporting methods */
  83750. -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  83751. -# ifndef GCC_HASCLASSVISIBILITY
  83752. -# define GCC_HASCLASSVISIBILITY
  83753. -# endif
  83754. -#endif
  83755. -
  83756. -#ifndef SWIGEXPORT
  83757. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  83758. -# if defined(STATIC_LINKED)
  83759. -# define SWIGEXPORT
  83760. -# else
  83761. -# define SWIGEXPORT __declspec(dllexport)
  83762. -# endif
  83763. -# else
  83764. -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  83765. -# define SWIGEXPORT __attribute__ ((visibility("default")))
  83766. -# else
  83767. -# define SWIGEXPORT
  83768. -# endif
  83769. -# endif
  83770. -#endif
  83771. -
  83772. -/* calling conventions for Windows */
  83773. -#ifndef SWIGSTDCALL
  83774. -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  83775. -# define SWIGSTDCALL __stdcall
  83776. -# else
  83777. -# define SWIGSTDCALL
  83778. -# endif
  83779. -#endif
  83780. -
  83781. -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  83782. -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  83783. -# define _CRT_SECURE_NO_DEPRECATE
  83784. -#endif
  83785. -
  83786. -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  83787. -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  83788. -# define _SCL_SECURE_NO_DEPRECATE
  83789. -#endif
  83790. -
  83791. -
  83792. -
  83793. -/* Python.h has to appear first */
  83794. -#include <Python.h>
  83795. -
  83796. -/* -----------------------------------------------------------------------------
  83797. - * swigrun.swg
  83798. - *
  83799. - * This file contains generic C API SWIG runtime support for pointer
  83800. - * type checking.
  83801. - * ----------------------------------------------------------------------------- */
  83802. -
  83803. -/* This should only be incremented when either the layout of swig_type_info changes,
  83804. - or for whatever reason, the runtime changes incompatibly */
  83805. -#define SWIG_RUNTIME_VERSION "4"
  83806. -
  83807. -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  83808. -#ifdef SWIG_TYPE_TABLE
  83809. -# define SWIG_QUOTE_STRING(x) #x
  83810. -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  83811. -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  83812. -#else
  83813. -# define SWIG_TYPE_TABLE_NAME
  83814. -#endif
  83815. -
  83816. -/*
  83817. - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  83818. - creating a static or dynamic library from the SWIG runtime code.
  83819. - In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  83820. -
  83821. - But only do this if strictly necessary, ie, if you have problems
  83822. - with your compiler or suchlike.
  83823. -*/
  83824. -
  83825. -#ifndef SWIGRUNTIME
  83826. -# define SWIGRUNTIME SWIGINTERN
  83827. -#endif
  83828. -
  83829. -#ifndef SWIGRUNTIMEINLINE
  83830. -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  83831. -#endif
  83832. -
  83833. -/* Generic buffer size */
  83834. -#ifndef SWIG_BUFFER_SIZE
  83835. -# define SWIG_BUFFER_SIZE 1024
  83836. -#endif
  83837. -
  83838. -/* Flags for pointer conversions */
  83839. -#define SWIG_POINTER_DISOWN 0x1
  83840. -#define SWIG_CAST_NEW_MEMORY 0x2
  83841. -
  83842. -/* Flags for new pointer objects */
  83843. -#define SWIG_POINTER_OWN 0x1
  83844. -
  83845. -
  83846. -/*
  83847. - Flags/methods for returning states.
  83848. -
  83849. - The SWIG conversion methods, as ConvertPtr, return an integer
  83850. - that tells if the conversion was successful or not. And if not,
  83851. - an error code can be returned (see swigerrors.swg for the codes).
  83852. -
  83853. - Use the following macros/flags to set or process the returning
  83854. - states.
  83855. -
  83856. - In old versions of SWIG, code such as the following was usually written:
  83857. -
  83858. - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  83859. - // success code
  83860. - } else {
  83861. - //fail code
  83862. - }
  83863. -
  83864. - Now you can be more explicit:
  83865. -
  83866. - int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  83867. - if (SWIG_IsOK(res)) {
  83868. - // success code
  83869. - } else {
  83870. - // fail code
  83871. - }
  83872. -
  83873. - which is the same really, but now you can also do
  83874. -
  83875. - Type *ptr;
  83876. - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  83877. - if (SWIG_IsOK(res)) {
  83878. - // success code
  83879. - if (SWIG_IsNewObj(res) {
  83880. - ...
  83881. - delete *ptr;
  83882. - } else {
  83883. - ...
  83884. - }
  83885. - } else {
  83886. - // fail code
  83887. - }
  83888. -
  83889. - I.e., now SWIG_ConvertPtr can return new objects and you can
  83890. - identify the case and take care of the deallocation. Of course that
  83891. - also requires SWIG_ConvertPtr to return new result values, such as
  83892. -
  83893. - int SWIG_ConvertPtr(obj, ptr,...) {
  83894. - if (<obj is ok>) {
  83895. - if (<need new object>) {
  83896. - *ptr = <ptr to new allocated object>;
  83897. - return SWIG_NEWOBJ;
  83898. - } else {
  83899. - *ptr = <ptr to old object>;
  83900. - return SWIG_OLDOBJ;
  83901. - }
  83902. - } else {
  83903. - return SWIG_BADOBJ;
  83904. - }
  83905. - }
  83906. -
  83907. - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  83908. - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  83909. - SWIG errors code.
  83910. -
  83911. - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  83912. - allows to return the 'cast rank', for example, if you have this
  83913. -
  83914. - int food(double)
  83915. - int fooi(int);
  83916. -
  83917. - and you call
  83918. -
  83919. - food(1) // cast rank '1' (1 -> 1.0)
  83920. - fooi(1) // cast rank '0'
  83921. -
  83922. - just use the SWIG_AddCast()/SWIG_CheckState()
  83923. -*/
  83924. -
  83925. -#define SWIG_OK (0)
  83926. -#define SWIG_ERROR (-1)
  83927. -#define SWIG_IsOK(r) (r >= 0)
  83928. -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  83929. -
  83930. -/* The CastRankLimit says how many bits are used for the cast rank */
  83931. -#define SWIG_CASTRANKLIMIT (1 << 8)
  83932. -/* The NewMask denotes the object was created (using new/malloc) */
  83933. -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  83934. -/* The TmpMask is for in/out typemaps that use temporal objects */
  83935. -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  83936. -/* Simple returning values */
  83937. -#define SWIG_BADOBJ (SWIG_ERROR)
  83938. -#define SWIG_OLDOBJ (SWIG_OK)
  83939. -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  83940. -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  83941. -/* Check, add and del mask methods */
  83942. -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  83943. -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  83944. -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  83945. -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  83946. -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  83947. -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  83948. -
  83949. -/* Cast-Rank Mode */
  83950. -#if defined(SWIG_CASTRANK_MODE)
  83951. -# ifndef SWIG_TypeRank
  83952. -# define SWIG_TypeRank unsigned long
  83953. -# endif
  83954. -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  83955. -# define SWIG_MAXCASTRANK (2)
  83956. -# endif
  83957. -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  83958. -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  83959. -SWIGINTERNINLINE int SWIG_AddCast(int r) {
  83960. - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  83961. -}
  83962. -SWIGINTERNINLINE int SWIG_CheckState(int r) {
  83963. - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  83964. -}
  83965. -#else /* no cast-rank mode */
  83966. -# define SWIG_AddCast(r) (r)
  83967. -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  83968. -#endif
  83969. -
  83970. -
  83971. -#include <string.h>
  83972. -
  83973. -#ifdef __cplusplus
  83974. -extern "C" {
  83975. -#endif
  83976. -
  83977. -typedef void *(*swig_converter_func)(void *, int *);
  83978. -typedef struct swig_type_info *(*swig_dycast_func)(void **);
  83979. -
  83980. -/* Structure to store information on one type */
  83981. -typedef struct swig_type_info {
  83982. - const char *name; /* mangled name of this type */
  83983. - const char *str; /* human readable name of this type */
  83984. - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  83985. - struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  83986. - void *clientdata; /* language specific type data */
  83987. - int owndata; /* flag if the structure owns the clientdata */
  83988. -} swig_type_info;
  83989. -
  83990. -/* Structure to store a type and conversion function used for casting */
  83991. -typedef struct swig_cast_info {
  83992. - swig_type_info *type; /* pointer to type that is equivalent to this type */
  83993. - swig_converter_func converter; /* function to cast the void pointers */
  83994. - struct swig_cast_info *next; /* pointer to next cast in linked list */
  83995. - struct swig_cast_info *prev; /* pointer to the previous cast */
  83996. -} swig_cast_info;
  83997. -
  83998. -/* Structure used to store module information
  83999. - * Each module generates one structure like this, and the runtime collects
  84000. - * all of these structures and stores them in a circularly linked list.*/
  84001. -typedef struct swig_module_info {
  84002. - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  84003. - size_t size; /* Number of types in this module */
  84004. - struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  84005. - swig_type_info **type_initial; /* Array of initially generated type structures */
  84006. - swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  84007. - void *clientdata; /* Language specific module data */
  84008. -} swig_module_info;
  84009. -
  84010. -/*
  84011. - Compare two type names skipping the space characters, therefore
  84012. - "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  84013. -
  84014. - Return 0 when the two name types are equivalent, as in
  84015. - strncmp, but skipping ' '.
  84016. -*/
  84017. -SWIGRUNTIME int
  84018. -SWIG_TypeNameComp(const char *f1, const char *l1,
  84019. - const char *f2, const char *l2) {
  84020. - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  84021. - while ((*f1 == ' ') && (f1 != l1)) ++f1;
  84022. - while ((*f2 == ' ') && (f2 != l2)) ++f2;
  84023. - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  84024. - }
  84025. - return (int)((l1 - f1) - (l2 - f2));
  84026. -}
  84027. -
  84028. -/*
  84029. - Check type equivalence in a name list like <name1>|<name2>|...
  84030. - Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  84031. -*/
  84032. -SWIGRUNTIME int
  84033. -SWIG_TypeCmp(const char *nb, const char *tb) {
  84034. - int equiv = 1;
  84035. - const char* te = tb + strlen(tb);
  84036. - const char* ne = nb;
  84037. - while (equiv != 0 && *ne) {
  84038. - for (nb = ne; *ne; ++ne) {
  84039. - if (*ne == '|') break;
  84040. - }
  84041. - equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  84042. - if (*ne) ++ne;
  84043. - }
  84044. - return equiv;
  84045. -}
  84046. -
  84047. -/*
  84048. - Check type equivalence in a name list like <name1>|<name2>|...
  84049. - Return 0 if not equal, 1 if equal
  84050. -*/
  84051. -SWIGRUNTIME int
  84052. -SWIG_TypeEquiv(const char *nb, const char *tb) {
  84053. - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  84054. -}
  84055. -
  84056. -/*
  84057. - Check the typename
  84058. -*/
  84059. -SWIGRUNTIME swig_cast_info *
  84060. -SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  84061. - if (ty) {
  84062. - swig_cast_info *iter = ty->cast;
  84063. - while (iter) {
  84064. - if (strcmp(iter->type->name, c) == 0) {
  84065. - if (iter == ty->cast)
  84066. - return iter;
  84067. - /* Move iter to the top of the linked list */
  84068. - iter->prev->next = iter->next;
  84069. - if (iter->next)
  84070. - iter->next->prev = iter->prev;
  84071. - iter->next = ty->cast;
  84072. - iter->prev = 0;
  84073. - if (ty->cast) ty->cast->prev = iter;
  84074. - ty->cast = iter;
  84075. - return iter;
  84076. - }
  84077. - iter = iter->next;
  84078. - }
  84079. - }
  84080. - return 0;
  84081. -}
  84082. -
  84083. -/*
  84084. - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  84085. -*/
  84086. -SWIGRUNTIME swig_cast_info *
  84087. -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  84088. - if (ty) {
  84089. - swig_cast_info *iter = ty->cast;
  84090. - while (iter) {
  84091. - if (iter->type == from) {
  84092. - if (iter == ty->cast)
  84093. - return iter;
  84094. - /* Move iter to the top of the linked list */
  84095. - iter->prev->next = iter->next;
  84096. - if (iter->next)
  84097. - iter->next->prev = iter->prev;
  84098. - iter->next = ty->cast;
  84099. - iter->prev = 0;
  84100. - if (ty->cast) ty->cast->prev = iter;
  84101. - ty->cast = iter;
  84102. - return iter;
  84103. - }
  84104. - iter = iter->next;
  84105. - }
  84106. - }
  84107. - return 0;
  84108. -}
  84109. -
  84110. -/*
  84111. - Cast a pointer up an inheritance hierarchy
  84112. -*/
  84113. -SWIGRUNTIMEINLINE void *
  84114. -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  84115. - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  84116. -}
  84117. -
  84118. -/*
  84119. - Dynamic pointer casting. Down an inheritance hierarchy
  84120. -*/
  84121. -SWIGRUNTIME swig_type_info *
  84122. -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  84123. - swig_type_info *lastty = ty;
  84124. - if (!ty || !ty->dcast) return ty;
  84125. - while (ty && (ty->dcast)) {
  84126. - ty = (*ty->dcast)(ptr);
  84127. - if (ty) lastty = ty;
  84128. - }
  84129. - return lastty;
  84130. -}
  84131. -
  84132. -/*
  84133. - Return the name associated with this type
  84134. -*/
  84135. -SWIGRUNTIMEINLINE const char *
  84136. -SWIG_TypeName(const swig_type_info *ty) {
  84137. - return ty->name;
  84138. -}
  84139. -
  84140. -/*
  84141. - Return the pretty name associated with this type,
  84142. - that is an unmangled type name in a form presentable to the user.
  84143. -*/
  84144. -SWIGRUNTIME const char *
  84145. -SWIG_TypePrettyName(const swig_type_info *type) {
  84146. - /* The "str" field contains the equivalent pretty names of the
  84147. - type, separated by vertical-bar characters. We choose
  84148. - to print the last name, as it is often (?) the most
  84149. - specific. */
  84150. - if (!type) return NULL;
  84151. - if (type->str != NULL) {
  84152. - const char *last_name = type->str;
  84153. - const char *s;
  84154. - for (s = type->str; *s; s++)
  84155. - if (*s == '|') last_name = s+1;
  84156. - return last_name;
  84157. - }
  84158. - else
  84159. - return type->name;
  84160. -}
  84161. -
  84162. -/*
  84163. - Set the clientdata field for a type
  84164. -*/
  84165. -SWIGRUNTIME void
  84166. -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  84167. - swig_cast_info *cast = ti->cast;
  84168. - /* if (ti->clientdata == clientdata) return; */
  84169. - ti->clientdata = clientdata;
  84170. -
  84171. - while (cast) {
  84172. - if (!cast->converter) {
  84173. - swig_type_info *tc = cast->type;
  84174. - if (!tc->clientdata) {
  84175. - SWIG_TypeClientData(tc, clientdata);
  84176. - }
  84177. - }
  84178. - cast = cast->next;
  84179. - }
  84180. -}
  84181. -SWIGRUNTIME void
  84182. -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  84183. - SWIG_TypeClientData(ti, clientdata);
  84184. - ti->owndata = 1;
  84185. -}
  84186. -
  84187. -/*
  84188. - Search for a swig_type_info structure only by mangled name
  84189. - Search is a O(log #types)
  84190. -
  84191. - We start searching at module start, and finish searching when start == end.
  84192. - Note: if start == end at the beginning of the function, we go all the way around
  84193. - the circular list.
  84194. -*/
  84195. -SWIGRUNTIME swig_type_info *
  84196. -SWIG_MangledTypeQueryModule(swig_module_info *start,
  84197. - swig_module_info *end,
  84198. - const char *name) {
  84199. - swig_module_info *iter = start;
  84200. - do {
  84201. - if (iter->size) {
  84202. - register size_t l = 0;
  84203. - register size_t r = iter->size - 1;
  84204. - do {
  84205. - /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  84206. - register size_t i = (l + r) >> 1;
  84207. - const char *iname = iter->types[i]->name;
  84208. - if (iname) {
  84209. - register int compare = strcmp(name, iname);
  84210. - if (compare == 0) {
  84211. - return iter->types[i];
  84212. - } else if (compare < 0) {
  84213. - if (i) {
  84214. - r = i - 1;
  84215. - } else {
  84216. - break;
  84217. - }
  84218. - } else if (compare > 0) {
  84219. - l = i + 1;
  84220. - }
  84221. - } else {
  84222. - break; /* should never happen */
  84223. - }
  84224. - } while (l <= r);
  84225. - }
  84226. - iter = iter->next;
  84227. - } while (iter != end);
  84228. - return 0;
  84229. -}
  84230. -
  84231. -/*
  84232. - Search for a swig_type_info structure for either a mangled name or a human readable name.
  84233. - It first searches the mangled names of the types, which is a O(log #types)
  84234. - If a type is not found it then searches the human readable names, which is O(#types).
  84235. -
  84236. - We start searching at module start, and finish searching when start == end.
  84237. - Note: if start == end at the beginning of the function, we go all the way around
  84238. - the circular list.
  84239. -*/
  84240. -SWIGRUNTIME swig_type_info *
  84241. -SWIG_TypeQueryModule(swig_module_info *start,
  84242. - swig_module_info *end,
  84243. - const char *name) {
  84244. - /* STEP 1: Search the name field using binary search */
  84245. - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  84246. - if (ret) {
  84247. - return ret;
  84248. - } else {
  84249. - /* STEP 2: If the type hasn't been found, do a complete search
  84250. - of the str field (the human readable name) */
  84251. - swig_module_info *iter = start;
  84252. - do {
  84253. - register size_t i = 0;
  84254. - for (; i < iter->size; ++i) {
  84255. - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  84256. - return iter->types[i];
  84257. - }
  84258. - iter = iter->next;
  84259. - } while (iter != end);
  84260. - }
  84261. -
  84262. - /* neither found a match */
  84263. - return 0;
  84264. -}
  84265. -
  84266. -/*
  84267. - Pack binary data into a string
  84268. -*/
  84269. -SWIGRUNTIME char *
  84270. -SWIG_PackData(char *c, void *ptr, size_t sz) {
  84271. - static const char hex[17] = "0123456789abcdef";
  84272. - register const unsigned char *u = (unsigned char *) ptr;
  84273. - register const unsigned char *eu = u + sz;
  84274. - for (; u != eu; ++u) {
  84275. - register unsigned char uu = *u;
  84276. - *(c++) = hex[(uu & 0xf0) >> 4];
  84277. - *(c++) = hex[uu & 0xf];
  84278. - }
  84279. - return c;
  84280. -}
  84281. -
  84282. -/*
  84283. - Unpack binary data from a string
  84284. -*/
  84285. -SWIGRUNTIME const char *
  84286. -SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  84287. - register unsigned char *u = (unsigned char *) ptr;
  84288. - register const unsigned char *eu = u + sz;
  84289. - for (; u != eu; ++u) {
  84290. - register char d = *(c++);
  84291. - register unsigned char uu;
  84292. - if ((d >= '0') && (d <= '9'))
  84293. - uu = ((d - '0') << 4);
  84294. - else if ((d >= 'a') && (d <= 'f'))
  84295. - uu = ((d - ('a'-10)) << 4);
  84296. - else
  84297. - return (char *) 0;
  84298. - d = *(c++);
  84299. - if ((d >= '0') && (d <= '9'))
  84300. - uu |= (d - '0');
  84301. - else if ((d >= 'a') && (d <= 'f'))
  84302. - uu |= (d - ('a'-10));
  84303. - else
  84304. - return (char *) 0;
  84305. - *u = uu;
  84306. - }
  84307. - return c;
  84308. -}
  84309. -
  84310. -/*
  84311. - Pack 'void *' into a string buffer.
  84312. -*/
  84313. -SWIGRUNTIME char *
  84314. -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  84315. - char *r = buff;
  84316. - if ((2*sizeof(void *) + 2) > bsz) return 0;
  84317. - *(r++) = '_';
  84318. - r = SWIG_PackData(r,&ptr,sizeof(void *));
  84319. - if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  84320. - strcpy(r,name);
  84321. - return buff;
  84322. -}
  84323. -
  84324. -SWIGRUNTIME const char *
  84325. -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  84326. - if (*c != '_') {
  84327. - if (strcmp(c,"NULL") == 0) {
  84328. - *ptr = (void *) 0;
  84329. - return name;
  84330. - } else {
  84331. - return 0;
  84332. - }
  84333. - }
  84334. - return SWIG_UnpackData(++c,ptr,sizeof(void *));
  84335. -}
  84336. -
  84337. -SWIGRUNTIME char *
  84338. -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  84339. - char *r = buff;
  84340. - size_t lname = (name ? strlen(name) : 0);
  84341. - if ((2*sz + 2 + lname) > bsz) return 0;
  84342. - *(r++) = '_';
  84343. - r = SWIG_PackData(r,ptr,sz);
  84344. - if (lname) {
  84345. - strncpy(r,name,lname+1);
  84346. - } else {
  84347. - *r = 0;
  84348. - }
  84349. - return buff;
  84350. -}
  84351. -
  84352. -SWIGRUNTIME const char *
  84353. -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  84354. - if (*c != '_') {
  84355. - if (strcmp(c,"NULL") == 0) {
  84356. - memset(ptr,0,sz);
  84357. - return name;
  84358. - } else {
  84359. - return 0;
  84360. - }
  84361. - }
  84362. - return SWIG_UnpackData(++c,ptr,sz);
  84363. -}
  84364. -
  84365. -#ifdef __cplusplus
  84366. -}
  84367. -#endif
  84368. -
  84369. -/* Errors in SWIG */
  84370. -#define SWIG_UnknownError -1
  84371. -#define SWIG_IOError -2
  84372. -#define SWIG_RuntimeError -3
  84373. -#define SWIG_IndexError -4
  84374. -#define SWIG_TypeError -5
  84375. -#define SWIG_DivisionByZero -6
  84376. -#define SWIG_OverflowError -7
  84377. -#define SWIG_SyntaxError -8
  84378. -#define SWIG_ValueError -9
  84379. -#define SWIG_SystemError -10
  84380. -#define SWIG_AttributeError -11
  84381. -#define SWIG_MemoryError -12
  84382. -#define SWIG_NullReferenceError -13
  84383. -
  84384. -
  84385. -
  84386. -/* Compatibility macros for Python 3 */
  84387. -#if PY_VERSION_HEX >= 0x03000000
  84388. -
  84389. -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  84390. -#define PyInt_Check(x) PyLong_Check(x)
  84391. -#define PyInt_AsLong(x) PyLong_AsLong(x)
  84392. -#define PyInt_FromLong(x) PyLong_FromLong(x)
  84393. -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  84394. -#define PyString_Check(name) PyBytes_Check(name)
  84395. -#define PyString_FromString(x) PyUnicode_FromString(x)
  84396. -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  84397. -#define PyString_AsString(str) PyBytes_AsString(str)
  84398. -#define PyString_Size(str) PyBytes_Size(str)
  84399. -#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  84400. -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  84401. -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  84402. -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  84403. -
  84404. -#endif
  84405. -
  84406. -#ifndef Py_TYPE
  84407. -# define Py_TYPE(op) ((op)->ob_type)
  84408. -#endif
  84409. -
  84410. -/* SWIG APIs for compatibility of both Python 2 & 3 */
  84411. -
  84412. -#if PY_VERSION_HEX >= 0x03000000
  84413. -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  84414. -#else
  84415. -# define SWIG_Python_str_FromFormat PyString_FromFormat
  84416. -#endif
  84417. -
  84418. -
  84419. -/* Warning: This function will allocate a new string in Python 3,
  84420. - * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  84421. - */
  84422. -SWIGINTERN char*
  84423. -SWIG_Python_str_AsChar(PyObject *str)
  84424. -{
  84425. -#if PY_VERSION_HEX >= 0x03000000
  84426. - char *cstr;
  84427. - char *newstr;
  84428. - Py_ssize_t len;
  84429. - str = PyUnicode_AsUTF8String(str);
  84430. - PyBytes_AsStringAndSize(str, &cstr, &len);
  84431. - newstr = (char *) malloc(len+1);
  84432. - memcpy(newstr, cstr, len+1);
  84433. - Py_XDECREF(str);
  84434. - return newstr;
  84435. -#else
  84436. - return PyString_AsString(str);
  84437. -#endif
  84438. -}
  84439. -
  84440. -#if PY_VERSION_HEX >= 0x03000000
  84441. -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  84442. -#else
  84443. -# define SWIG_Python_str_DelForPy3(x)
  84444. -#endif
  84445. -
  84446. -
  84447. -SWIGINTERN PyObject*
  84448. -SWIG_Python_str_FromChar(const char *c)
  84449. -{
  84450. -#if PY_VERSION_HEX >= 0x03000000
  84451. - return PyUnicode_FromString(c);
  84452. -#else
  84453. - return PyString_FromString(c);
  84454. -#endif
  84455. -}
  84456. -
  84457. -/* Add PyOS_snprintf for old Pythons */
  84458. -#if PY_VERSION_HEX < 0x02020000
  84459. -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
  84460. -# define PyOS_snprintf _snprintf
  84461. -# else
  84462. -# define PyOS_snprintf snprintf
  84463. -# endif
  84464. -#endif
  84465. -
  84466. -/* A crude PyString_FromFormat implementation for old Pythons */
  84467. -#if PY_VERSION_HEX < 0x02020000
  84468. -
  84469. -#ifndef SWIG_PYBUFFER_SIZE
  84470. -# define SWIG_PYBUFFER_SIZE 1024
  84471. -#endif
  84472. -
  84473. -static PyObject *
  84474. -PyString_FromFormat(const char *fmt, ...) {
  84475. - va_list ap;
  84476. - char buf[SWIG_PYBUFFER_SIZE * 2];
  84477. - int res;
  84478. - va_start(ap, fmt);
  84479. - res = vsnprintf(buf, sizeof(buf), fmt, ap);
  84480. - va_end(ap);
  84481. - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
  84482. -}
  84483. -#endif
  84484. -
  84485. -/* Add PyObject_Del for old Pythons */
  84486. -#if PY_VERSION_HEX < 0x01060000
  84487. -# define PyObject_Del(op) PyMem_DEL((op))
  84488. -#endif
  84489. -#ifndef PyObject_DEL
  84490. -# define PyObject_DEL PyObject_Del
  84491. -#endif
  84492. -
  84493. -/* A crude PyExc_StopIteration exception for old Pythons */
  84494. -#if PY_VERSION_HEX < 0x02020000
  84495. -# ifndef PyExc_StopIteration
  84496. -# define PyExc_StopIteration PyExc_RuntimeError
  84497. -# endif
  84498. -# ifndef PyObject_GenericGetAttr
  84499. -# define PyObject_GenericGetAttr 0
  84500. -# endif
  84501. -#endif
  84502. -
  84503. -/* Py_NotImplemented is defined in 2.1 and up. */
  84504. -#if PY_VERSION_HEX < 0x02010000
  84505. -# ifndef Py_NotImplemented
  84506. -# define Py_NotImplemented PyExc_RuntimeError
  84507. -# endif
  84508. -#endif
  84509. -
  84510. -/* A crude PyString_AsStringAndSize implementation for old Pythons */
  84511. -#if PY_VERSION_HEX < 0x02010000
  84512. -# ifndef PyString_AsStringAndSize
  84513. -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
  84514. -# endif
  84515. -#endif
  84516. -
  84517. -/* PySequence_Size for old Pythons */
  84518. -#if PY_VERSION_HEX < 0x02000000
  84519. -# ifndef PySequence_Size
  84520. -# define PySequence_Size PySequence_Length
  84521. -# endif
  84522. -#endif
  84523. -
  84524. -/* PyBool_FromLong for old Pythons */
  84525. -#if PY_VERSION_HEX < 0x02030000
  84526. -static
  84527. -PyObject *PyBool_FromLong(long ok)
  84528. -{
  84529. - PyObject *result = ok ? Py_True : Py_False;
  84530. - Py_INCREF(result);
  84531. - return result;
  84532. -}
  84533. -#endif
  84534. -
  84535. -/* Py_ssize_t for old Pythons */
  84536. -/* This code is as recommended by: */
  84537. -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
  84538. -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
  84539. -typedef int Py_ssize_t;
  84540. -# define PY_SSIZE_T_MAX INT_MAX
  84541. -# define PY_SSIZE_T_MIN INT_MIN
  84542. -typedef inquiry lenfunc;
  84543. -typedef intargfunc ssizeargfunc;
  84544. -typedef intintargfunc ssizessizeargfunc;
  84545. -typedef intobjargproc ssizeobjargproc;
  84546. -typedef intintobjargproc ssizessizeobjargproc;
  84547. -typedef getreadbufferproc readbufferproc;
  84548. -typedef getwritebufferproc writebufferproc;
  84549. -typedef getsegcountproc segcountproc;
  84550. -typedef getcharbufferproc charbufferproc;
  84551. -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  84552. -{
  84553. - long result = 0;
  84554. - PyObject *i = PyNumber_Int(x);
  84555. - if (i) {
  84556. - result = PyInt_AsLong(i);
  84557. - Py_DECREF(i);
  84558. - }
  84559. - return result;
  84560. -}
  84561. -#endif
  84562. -
  84563. -#if PY_VERSION_HEX < 0x02050000
  84564. -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
  84565. -#endif
  84566. -
  84567. -#if PY_VERSION_HEX < 0x02040000
  84568. -#define Py_VISIT(op) \
  84569. - do { \
  84570. - if (op) { \
  84571. - int vret = visit((op), arg); \
  84572. - if (vret) \
  84573. - return vret; \
  84574. - } \
  84575. - } while (0)
  84576. -#endif
  84577. -
  84578. -#if PY_VERSION_HEX < 0x02030000
  84579. -typedef struct {
  84580. - PyTypeObject type;
  84581. - PyNumberMethods as_number;
  84582. - PyMappingMethods as_mapping;
  84583. - PySequenceMethods as_sequence;
  84584. - PyBufferProcs as_buffer;
  84585. - PyObject *name, *slots;
  84586. -} PyHeapTypeObject;
  84587. -#endif
  84588. -
  84589. -#if PY_VERSION_HEX < 0x02030000
  84590. -typedef destructor freefunc;
  84591. -#endif
  84592. -
  84593. -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
  84594. - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
  84595. - (PY_MAJOR_VERSION > 3))
  84596. -# define SWIGPY_USE_CAPSULE
  84597. -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  84598. -#endif
  84599. -
  84600. -#if PY_VERSION_HEX < 0x03020000
  84601. -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  84602. -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  84603. -#endif
  84604. -
  84605. -/* -----------------------------------------------------------------------------
  84606. - * error manipulation
  84607. - * ----------------------------------------------------------------------------- */
  84608. -
  84609. -SWIGRUNTIME PyObject*
  84610. -SWIG_Python_ErrorType(int code) {
  84611. - PyObject* type = 0;
  84612. - switch(code) {
  84613. - case SWIG_MemoryError:
  84614. - type = PyExc_MemoryError;
  84615. - break;
  84616. - case SWIG_IOError:
  84617. - type = PyExc_IOError;
  84618. - break;
  84619. - case SWIG_RuntimeError:
  84620. - type = PyExc_RuntimeError;
  84621. - break;
  84622. - case SWIG_IndexError:
  84623. - type = PyExc_IndexError;
  84624. - break;
  84625. - case SWIG_TypeError:
  84626. - type = PyExc_TypeError;
  84627. - break;
  84628. - case SWIG_DivisionByZero:
  84629. - type = PyExc_ZeroDivisionError;
  84630. - break;
  84631. - case SWIG_OverflowError:
  84632. - type = PyExc_OverflowError;
  84633. - break;
  84634. - case SWIG_SyntaxError:
  84635. - type = PyExc_SyntaxError;
  84636. - break;
  84637. - case SWIG_ValueError:
  84638. - type = PyExc_ValueError;
  84639. - break;
  84640. - case SWIG_SystemError:
  84641. - type = PyExc_SystemError;
  84642. - break;
  84643. - case SWIG_AttributeError:
  84644. - type = PyExc_AttributeError;
  84645. - break;
  84646. - default:
  84647. - type = PyExc_RuntimeError;
  84648. - }
  84649. - return type;
  84650. -}
  84651. -
  84652. -
  84653. -SWIGRUNTIME void
  84654. -SWIG_Python_AddErrorMsg(const char* mesg)
  84655. -{
  84656. - PyObject *type = 0;
  84657. - PyObject *value = 0;
  84658. - PyObject *traceback = 0;
  84659. -
  84660. - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  84661. - if (value) {
  84662. - char *tmp;
  84663. - PyObject *old_str = PyObject_Str(value);
  84664. - PyErr_Clear();
  84665. - Py_XINCREF(type);
  84666. -
  84667. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  84668. - SWIG_Python_str_DelForPy3(tmp);
  84669. - Py_DECREF(old_str);
  84670. - Py_DECREF(value);
  84671. - } else {
  84672. - PyErr_SetString(PyExc_RuntimeError, mesg);
  84673. - }
  84674. -}
  84675. -
  84676. -#if defined(SWIG_PYTHON_NO_THREADS)
  84677. -# if defined(SWIG_PYTHON_THREADS)
  84678. -# undef SWIG_PYTHON_THREADS
  84679. -# endif
  84680. -#endif
  84681. -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  84682. -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  84683. -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
  84684. -# define SWIG_PYTHON_USE_GIL
  84685. -# endif
  84686. -# endif
  84687. -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  84688. -# ifndef SWIG_PYTHON_INITIALIZE_THREADS
  84689. -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  84690. -# endif
  84691. -# ifdef __cplusplus /* C++ code */
  84692. - class SWIG_Python_Thread_Block {
  84693. - bool status;
  84694. - PyGILState_STATE state;
  84695. - public:
  84696. - void end() { if (status) { PyGILState_Release(state); status = false;} }
  84697. - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  84698. - ~SWIG_Python_Thread_Block() { end(); }
  84699. - };
  84700. - class SWIG_Python_Thread_Allow {
  84701. - bool status;
  84702. - PyThreadState *save;
  84703. - public:
  84704. - void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  84705. - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  84706. - ~SWIG_Python_Thread_Allow() { end(); }
  84707. - };
  84708. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  84709. -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  84710. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  84711. -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  84712. -# else /* C code */
  84713. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  84714. -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  84715. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  84716. -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  84717. -# endif
  84718. -# else /* Old thread way, not implemented, user must provide it */
  84719. -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  84720. -# define SWIG_PYTHON_INITIALIZE_THREADS
  84721. -# endif
  84722. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  84723. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  84724. -# endif
  84725. -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  84726. -# define SWIG_PYTHON_THREAD_END_BLOCK
  84727. -# endif
  84728. -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  84729. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  84730. -# endif
  84731. -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  84732. -# define SWIG_PYTHON_THREAD_END_ALLOW
  84733. -# endif
  84734. -# endif
  84735. -#else /* No thread support */
  84736. -# define SWIG_PYTHON_INITIALIZE_THREADS
  84737. -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  84738. -# define SWIG_PYTHON_THREAD_END_BLOCK
  84739. -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  84740. -# define SWIG_PYTHON_THREAD_END_ALLOW
  84741. -#endif
  84742. -
  84743. -/* -----------------------------------------------------------------------------
  84744. - * Python API portion that goes into the runtime
  84745. - * ----------------------------------------------------------------------------- */
  84746. -
  84747. -#ifdef __cplusplus
  84748. -extern "C" {
  84749. -#endif
  84750. -
  84751. -/* -----------------------------------------------------------------------------
  84752. - * Constant declarations
  84753. - * ----------------------------------------------------------------------------- */
  84754. -
  84755. -/* Constant Types */
  84756. -#define SWIG_PY_POINTER 4
  84757. -#define SWIG_PY_BINARY 5
  84758. -
  84759. -/* Constant information structure */
  84760. -typedef struct swig_const_info {
  84761. - int type;
  84762. - char *name;
  84763. - long lvalue;
  84764. - double dvalue;
  84765. - void *pvalue;
  84766. - swig_type_info **ptype;
  84767. -} swig_const_info;
  84768. -
  84769. -
  84770. -/* -----------------------------------------------------------------------------
  84771. - * Wrapper of PyInstanceMethod_New() used in Python 3
  84772. - * It is exported to the generated module, used for -fastproxy
  84773. - * ----------------------------------------------------------------------------- */
  84774. -#if PY_VERSION_HEX >= 0x03000000
  84775. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
  84776. -{
  84777. - return PyInstanceMethod_New(func);
  84778. -}
  84779. -#else
  84780. -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
  84781. -{
  84782. - return NULL;
  84783. -}
  84784. -#endif
  84785. -
  84786. -#ifdef __cplusplus
  84787. -}
  84788. -#endif
  84789. -
  84790. -
  84791. -/* -----------------------------------------------------------------------------
  84792. - * pyrun.swg
  84793. - *
  84794. - * This file contains the runtime support for Python modules
  84795. - * and includes code for managing global variables and pointer
  84796. - * type checking.
  84797. - *
  84798. - * ----------------------------------------------------------------------------- */
  84799. -
  84800. -/* Common SWIG API */
  84801. -
  84802. -/* for raw pointers */
  84803. -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  84804. -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  84805. -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  84806. -
  84807. -#ifdef SWIGPYTHON_BUILTIN
  84808. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  84809. -#else
  84810. -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  84811. -#endif
  84812. -
  84813. -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  84814. -
  84815. -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  84816. -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  84817. -#define swig_owntype int
  84818. -
  84819. -/* for raw packed data */
  84820. -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  84821. -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  84822. -
  84823. -/* for class or struct pointers */
  84824. -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  84825. -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  84826. -
  84827. -/* for C or C++ function pointers */
  84828. -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  84829. -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  84830. -
  84831. -/* for C++ member pointers, ie, member methods */
  84832. -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  84833. -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  84834. -
  84835. -
  84836. -/* Runtime API */
  84837. -
  84838. -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  84839. -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  84840. -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  84841. -
  84842. -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  84843. -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  84844. -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  84845. -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  84846. -#define SWIG_fail goto fail
  84847. -
  84848. -
  84849. -/* Runtime API implementation */
  84850. -
  84851. -/* Error manipulation */
  84852. -
  84853. -SWIGINTERN void
  84854. -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  84855. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  84856. - PyErr_SetObject(errtype, obj);
  84857. - Py_DECREF(obj);
  84858. - SWIG_PYTHON_THREAD_END_BLOCK;
  84859. -}
  84860. -
  84861. -SWIGINTERN void
  84862. -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  84863. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  84864. - PyErr_SetString(errtype, msg);
  84865. - SWIG_PYTHON_THREAD_END_BLOCK;
  84866. -}
  84867. -
  84868. -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  84869. -
  84870. -/* Set a constant value */
  84871. -
  84872. -#if defined(SWIGPYTHON_BUILTIN)
  84873. -
  84874. -SWIGINTERN void
  84875. -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  84876. - PyObject *s = PyString_InternFromString(key);
  84877. - PyList_Append(seq, s);
  84878. - Py_DECREF(s);
  84879. -}
  84880. -
  84881. -SWIGINTERN void
  84882. -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  84883. -#if PY_VERSION_HEX < 0x02030000
  84884. - PyDict_SetItemString(d, (char *)name, obj);
  84885. -#else
  84886. - PyDict_SetItemString(d, name, obj);
  84887. -#endif
  84888. - Py_DECREF(obj);
  84889. - if (public_interface)
  84890. - SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  84891. -}
  84892. -
  84893. -#else
  84894. -
  84895. -SWIGINTERN void
  84896. -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  84897. -#if PY_VERSION_HEX < 0x02030000
  84898. - PyDict_SetItemString(d, (char *)name, obj);
  84899. -#else
  84900. - PyDict_SetItemString(d, name, obj);
  84901. -#endif
  84902. - Py_DECREF(obj);
  84903. -}
  84904. -
  84905. -#endif
  84906. -
  84907. -/* Append a value to the result obj */
  84908. -
  84909. -SWIGINTERN PyObject*
  84910. -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  84911. -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  84912. - if (!result) {
  84913. - result = obj;
  84914. - } else if (result == Py_None) {
  84915. - Py_DECREF(result);
  84916. - result = obj;
  84917. - } else {
  84918. - if (!PyList_Check(result)) {
  84919. - PyObject *o2 = result;
  84920. - result = PyList_New(1);
  84921. - PyList_SetItem(result, 0, o2);
  84922. - }
  84923. - PyList_Append(result,obj);
  84924. - Py_DECREF(obj);
  84925. - }
  84926. - return result;
  84927. -#else
  84928. - PyObject* o2;
  84929. - PyObject* o3;
  84930. - if (!result) {
  84931. - result = obj;
  84932. - } else if (result == Py_None) {
  84933. - Py_DECREF(result);
  84934. - result = obj;
  84935. - } else {
  84936. - if (!PyTuple_Check(result)) {
  84937. - o2 = result;
  84938. - result = PyTuple_New(1);
  84939. - PyTuple_SET_ITEM(result, 0, o2);
  84940. - }
  84941. - o3 = PyTuple_New(1);
  84942. - PyTuple_SET_ITEM(o3, 0, obj);
  84943. - o2 = result;
  84944. - result = PySequence_Concat(o2, o3);
  84945. - Py_DECREF(o2);
  84946. - Py_DECREF(o3);
  84947. - }
  84948. - return result;
  84949. -#endif
  84950. -}
  84951. -
  84952. -/* Unpack the argument tuple */
  84953. -
  84954. -SWIGINTERN int
  84955. -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  84956. -{
  84957. - if (!args) {
  84958. - if (!min && !max) {
  84959. - return 1;
  84960. - } else {
  84961. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  84962. - name, (min == max ? "" : "at least "), (int)min);
  84963. - return 0;
  84964. - }
  84965. - }
  84966. - if (!PyTuple_Check(args)) {
  84967. - if (min <= 1 && max >= 1) {
  84968. - register int i;
  84969. - objs[0] = args;
  84970. - for (i = 1; i < max; ++i) {
  84971. - objs[i] = 0;
  84972. - }
  84973. - return 2;
  84974. - }
  84975. - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  84976. - return 0;
  84977. - } else {
  84978. - register Py_ssize_t l = PyTuple_GET_SIZE(args);
  84979. - if (l < min) {
  84980. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  84981. - name, (min == max ? "" : "at least "), (int)min, (int)l);
  84982. - return 0;
  84983. - } else if (l > max) {
  84984. - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  84985. - name, (min == max ? "" : "at most "), (int)max, (int)l);
  84986. - return 0;
  84987. - } else {
  84988. - register int i;
  84989. - for (i = 0; i < l; ++i) {
  84990. - objs[i] = PyTuple_GET_ITEM(args, i);
  84991. - }
  84992. - for (; l < max; ++l) {
  84993. - objs[l] = 0;
  84994. - }
  84995. - return i + 1;
  84996. - }
  84997. - }
  84998. -}
  84999. -
  85000. -/* A functor is a function object with one single object argument */
  85001. -#if PY_VERSION_HEX >= 0x02020000
  85002. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  85003. -#else
  85004. -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
  85005. -#endif
  85006. -
  85007. -/*
  85008. - Helper for static pointer initialization for both C and C++ code, for example
  85009. - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  85010. -*/
  85011. -#ifdef __cplusplus
  85012. -#define SWIG_STATIC_POINTER(var) var
  85013. -#else
  85014. -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  85015. -#endif
  85016. -
  85017. -/* -----------------------------------------------------------------------------
  85018. - * Pointer declarations
  85019. - * ----------------------------------------------------------------------------- */
  85020. -
  85021. -/* Flags for new pointer objects */
  85022. -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  85023. -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  85024. -
  85025. -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  85026. -
  85027. -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  85028. -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  85029. -
  85030. -#ifdef __cplusplus
  85031. -extern "C" {
  85032. -#endif
  85033. -
  85034. -/* How to access Py_None */
  85035. -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  85036. -# ifndef SWIG_PYTHON_NO_BUILD_NONE
  85037. -# ifndef SWIG_PYTHON_BUILD_NONE
  85038. -# define SWIG_PYTHON_BUILD_NONE
  85039. -# endif
  85040. -# endif
  85041. -#endif
  85042. -
  85043. -#ifdef SWIG_PYTHON_BUILD_NONE
  85044. -# ifdef Py_None
  85045. -# undef Py_None
  85046. -# define Py_None SWIG_Py_None()
  85047. -# endif
  85048. -SWIGRUNTIMEINLINE PyObject *
  85049. -_SWIG_Py_None(void)
  85050. -{
  85051. - PyObject *none = Py_BuildValue((char*)"");
  85052. - Py_DECREF(none);
  85053. - return none;
  85054. -}
  85055. -SWIGRUNTIME PyObject *
  85056. -SWIG_Py_None(void)
  85057. -{
  85058. - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  85059. - return none;
  85060. -}
  85061. -#endif
  85062. -
  85063. -/* The python void return value */
  85064. -
  85065. -SWIGRUNTIMEINLINE PyObject *
  85066. -SWIG_Py_Void(void)
  85067. -{
  85068. - PyObject *none = Py_None;
  85069. - Py_INCREF(none);
  85070. - return none;
  85071. -}
  85072. -
  85073. -/* SwigPyClientData */
  85074. -
  85075. -typedef struct {
  85076. - PyObject *klass;
  85077. - PyObject *newraw;
  85078. - PyObject *newargs;
  85079. - PyObject *destroy;
  85080. - int delargs;
  85081. - int implicitconv;
  85082. - PyTypeObject *pytype;
  85083. -} SwigPyClientData;
  85084. -
  85085. -SWIGRUNTIMEINLINE int
  85086. -SWIG_Python_CheckImplicit(swig_type_info *ty)
  85087. -{
  85088. - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  85089. - return data ? data->implicitconv : 0;
  85090. -}
  85091. -
  85092. -SWIGRUNTIMEINLINE PyObject *
  85093. -SWIG_Python_ExceptionType(swig_type_info *desc) {
  85094. - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  85095. - PyObject *klass = data ? data->klass : 0;
  85096. - return (klass ? klass : PyExc_RuntimeError);
  85097. -}
  85098. -
  85099. -
  85100. -SWIGRUNTIME SwigPyClientData *
  85101. -SwigPyClientData_New(PyObject* obj)
  85102. -{
  85103. - if (!obj) {
  85104. - return 0;
  85105. - } else {
  85106. - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  85107. - /* the klass element */
  85108. - data->klass = obj;
  85109. - Py_INCREF(data->klass);
  85110. - /* the newraw method and newargs arguments used to create a new raw instance */
  85111. - if (PyClass_Check(obj)) {
  85112. - data->newraw = 0;
  85113. - data->newargs = obj;
  85114. - Py_INCREF(obj);
  85115. - } else {
  85116. -#if (PY_VERSION_HEX < 0x02020000)
  85117. - data->newraw = 0;
  85118. -#else
  85119. - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
  85120. -#endif
  85121. - if (data->newraw) {
  85122. - Py_INCREF(data->newraw);
  85123. - data->newargs = PyTuple_New(1);
  85124. - PyTuple_SetItem(data->newargs, 0, obj);
  85125. - } else {
  85126. - data->newargs = obj;
  85127. - }
  85128. - Py_INCREF(data->newargs);
  85129. - }
  85130. - /* the destroy method, aka as the C++ delete method */
  85131. - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
  85132. - if (PyErr_Occurred()) {
  85133. - PyErr_Clear();
  85134. - data->destroy = 0;
  85135. - }
  85136. - if (data->destroy) {
  85137. - int flags;
  85138. - Py_INCREF(data->destroy);
  85139. - flags = PyCFunction_GET_FLAGS(data->destroy);
  85140. -#ifdef METH_O
  85141. - data->delargs = !(flags & (METH_O));
  85142. -#else
  85143. - data->delargs = 0;
  85144. -#endif
  85145. - } else {
  85146. - data->delargs = 0;
  85147. - }
  85148. - data->implicitconv = 0;
  85149. - data->pytype = 0;
  85150. - return data;
  85151. - }
  85152. -}
  85153. -
  85154. -SWIGRUNTIME void
  85155. -SwigPyClientData_Del(SwigPyClientData *data) {
  85156. - Py_XDECREF(data->newraw);
  85157. - Py_XDECREF(data->newargs);
  85158. - Py_XDECREF(data->destroy);
  85159. -}
  85160. -
  85161. -/* =============== SwigPyObject =====================*/
  85162. -
  85163. -typedef struct {
  85164. - PyObject_HEAD
  85165. - void *ptr;
  85166. - swig_type_info *ty;
  85167. - int own;
  85168. - PyObject *next;
  85169. -#ifdef SWIGPYTHON_BUILTIN
  85170. - PyObject *dict;
  85171. -#endif
  85172. -} SwigPyObject;
  85173. -
  85174. -SWIGRUNTIME PyObject *
  85175. -SwigPyObject_long(SwigPyObject *v)
  85176. -{
  85177. - return PyLong_FromVoidPtr(v->ptr);
  85178. -}
  85179. -
  85180. -SWIGRUNTIME PyObject *
  85181. -SwigPyObject_format(const char* fmt, SwigPyObject *v)
  85182. -{
  85183. - PyObject *res = NULL;
  85184. - PyObject *args = PyTuple_New(1);
  85185. - if (args) {
  85186. - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  85187. - PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  85188. - if (ofmt) {
  85189. -#if PY_VERSION_HEX >= 0x03000000
  85190. - res = PyUnicode_Format(ofmt,args);
  85191. -#else
  85192. - res = PyString_Format(ofmt,args);
  85193. -#endif
  85194. - Py_DECREF(ofmt);
  85195. - }
  85196. - Py_DECREF(args);
  85197. - }
  85198. - }
  85199. - return res;
  85200. -}
  85201. -
  85202. -SWIGRUNTIME PyObject *
  85203. -SwigPyObject_oct(SwigPyObject *v)
  85204. -{
  85205. - return SwigPyObject_format("%o",v);
  85206. -}
  85207. -
  85208. -SWIGRUNTIME PyObject *
  85209. -SwigPyObject_hex(SwigPyObject *v)
  85210. -{
  85211. - return SwigPyObject_format("%x",v);
  85212. -}
  85213. -
  85214. -SWIGRUNTIME PyObject *
  85215. -#ifdef METH_NOARGS
  85216. -SwigPyObject_repr(SwigPyObject *v)
  85217. -#else
  85218. -SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  85219. -#endif
  85220. -{
  85221. - const char *name = SWIG_TypePrettyName(v->ty);
  85222. - PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  85223. - if (v->next) {
  85224. -# ifdef METH_NOARGS
  85225. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  85226. -# else
  85227. - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
  85228. -# endif
  85229. -# if PY_VERSION_HEX >= 0x03000000
  85230. - PyObject *joined = PyUnicode_Concat(repr, nrep);
  85231. - Py_DecRef(repr);
  85232. - Py_DecRef(nrep);
  85233. - repr = joined;
  85234. -# else
  85235. - PyString_ConcatAndDel(&repr,nrep);
  85236. -# endif
  85237. - }
  85238. - return repr;
  85239. -}
  85240. -
  85241. -SWIGRUNTIME int
  85242. -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  85243. -{
  85244. - char *str;
  85245. -#ifdef METH_NOARGS
  85246. - PyObject *repr = SwigPyObject_repr(v);
  85247. -#else
  85248. - PyObject *repr = SwigPyObject_repr(v, NULL);
  85249. -#endif
  85250. - if (repr) {
  85251. - str = SWIG_Python_str_AsChar(repr);
  85252. - fputs(str, fp);
  85253. - SWIG_Python_str_DelForPy3(str);
  85254. - Py_DECREF(repr);
  85255. - return 0;
  85256. - } else {
  85257. - return 1;
  85258. - }
  85259. -}
  85260. -
  85261. -SWIGRUNTIME PyObject *
  85262. -SwigPyObject_str(SwigPyObject *v)
  85263. -{
  85264. - char result[SWIG_BUFFER_SIZE];
  85265. - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
  85266. - SWIG_Python_str_FromChar(result) : 0;
  85267. -}
  85268. -
  85269. -SWIGRUNTIME int
  85270. -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  85271. -{
  85272. - void *i = v->ptr;
  85273. - void *j = w->ptr;
  85274. - return (i < j) ? -1 : ((i > j) ? 1 : 0);
  85275. -}
  85276. -
  85277. -/* Added for Python 3.x, would it also be useful for Python 2.x? */
  85278. -SWIGRUNTIME PyObject*
  85279. -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  85280. -{
  85281. - PyObject* res;
  85282. - if( op != Py_EQ && op != Py_NE ) {
  85283. - Py_INCREF(Py_NotImplemented);
  85284. - return Py_NotImplemented;
  85285. - }
  85286. - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  85287. - return res;
  85288. -}
  85289. -
  85290. -
  85291. -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  85292. -
  85293. -#ifdef SWIGPYTHON_BUILTIN
  85294. -static swig_type_info *SwigPyObject_stype = 0;
  85295. -SWIGRUNTIME PyTypeObject*
  85296. -SwigPyObject_type(void) {
  85297. - SwigPyClientData *cd;
  85298. - assert(SwigPyObject_stype);
  85299. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  85300. - assert(cd);
  85301. - assert(cd->pytype);
  85302. - return cd->pytype;
  85303. -}
  85304. -#else
  85305. -SWIGRUNTIME PyTypeObject*
  85306. -SwigPyObject_type(void) {
  85307. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  85308. - return type;
  85309. -}
  85310. -#endif
  85311. -
  85312. -SWIGRUNTIMEINLINE int
  85313. -SwigPyObject_Check(PyObject *op) {
  85314. -#ifdef SWIGPYTHON_BUILTIN
  85315. - PyTypeObject *target_tp = SwigPyObject_type();
  85316. - if (PyType_IsSubtype(op->ob_type, target_tp))
  85317. - return 1;
  85318. - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  85319. -#else
  85320. - return (Py_TYPE(op) == SwigPyObject_type())
  85321. - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  85322. -#endif
  85323. -}
  85324. -
  85325. -SWIGRUNTIME PyObject *
  85326. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  85327. -
  85328. -SWIGRUNTIME void
  85329. -SwigPyObject_dealloc(PyObject *v)
  85330. -{
  85331. - SwigPyObject *sobj = (SwigPyObject *) v;
  85332. - PyObject *next = sobj->next;
  85333. - if (sobj->own == SWIG_POINTER_OWN) {
  85334. - swig_type_info *ty = sobj->ty;
  85335. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  85336. - PyObject *destroy = data ? data->destroy : 0;
  85337. - if (destroy) {
  85338. - /* destroy is always a VARARGS method */
  85339. - PyObject *res;
  85340. - if (data->delargs) {
  85341. - /* we need to create a temporary object to carry the destroy operation */
  85342. - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  85343. - res = SWIG_Python_CallFunctor(destroy, tmp);
  85344. - Py_DECREF(tmp);
  85345. - } else {
  85346. - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  85347. - PyObject *mself = PyCFunction_GET_SELF(destroy);
  85348. - res = ((*meth)(mself, v));
  85349. - }
  85350. - Py_XDECREF(res);
  85351. - }
  85352. -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  85353. - else {
  85354. - const char *name = SWIG_TypePrettyName(ty);
  85355. - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  85356. - }
  85357. -#endif
  85358. - }
  85359. - Py_XDECREF(next);
  85360. - PyObject_DEL(v);
  85361. -}
  85362. -
  85363. -SWIGRUNTIME PyObject*
  85364. -SwigPyObject_append(PyObject* v, PyObject* next)
  85365. -{
  85366. - SwigPyObject *sobj = (SwigPyObject *) v;
  85367. -#ifndef METH_O
  85368. - PyObject *tmp = 0;
  85369. - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  85370. - next = tmp;
  85371. -#endif
  85372. - if (!SwigPyObject_Check(next)) {
  85373. - return NULL;
  85374. - }
  85375. - sobj->next = next;
  85376. - Py_INCREF(next);
  85377. - return SWIG_Py_Void();
  85378. -}
  85379. -
  85380. -SWIGRUNTIME PyObject*
  85381. -#ifdef METH_NOARGS
  85382. -SwigPyObject_next(PyObject* v)
  85383. -#else
  85384. -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  85385. -#endif
  85386. -{
  85387. - SwigPyObject *sobj = (SwigPyObject *) v;
  85388. - if (sobj->next) {
  85389. - Py_INCREF(sobj->next);
  85390. - return sobj->next;
  85391. - } else {
  85392. - return SWIG_Py_Void();
  85393. - }
  85394. -}
  85395. -
  85396. -SWIGINTERN PyObject*
  85397. -#ifdef METH_NOARGS
  85398. -SwigPyObject_disown(PyObject *v)
  85399. -#else
  85400. -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  85401. -#endif
  85402. -{
  85403. - SwigPyObject *sobj = (SwigPyObject *)v;
  85404. - sobj->own = 0;
  85405. - return SWIG_Py_Void();
  85406. -}
  85407. -
  85408. -SWIGINTERN PyObject*
  85409. -#ifdef METH_NOARGS
  85410. -SwigPyObject_acquire(PyObject *v)
  85411. -#else
  85412. -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  85413. -#endif
  85414. -{
  85415. - SwigPyObject *sobj = (SwigPyObject *)v;
  85416. - sobj->own = SWIG_POINTER_OWN;
  85417. - return SWIG_Py_Void();
  85418. -}
  85419. -
  85420. -SWIGINTERN PyObject*
  85421. -SwigPyObject_own(PyObject *v, PyObject *args)
  85422. -{
  85423. - PyObject *val = 0;
  85424. -#if (PY_VERSION_HEX < 0x02020000)
  85425. - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
  85426. -#elif (PY_VERSION_HEX < 0x02050000)
  85427. - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
  85428. -#else
  85429. - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
  85430. -#endif
  85431. - {
  85432. - return NULL;
  85433. - }
  85434. - else
  85435. - {
  85436. - SwigPyObject *sobj = (SwigPyObject *)v;
  85437. - PyObject *obj = PyBool_FromLong(sobj->own);
  85438. - if (val) {
  85439. -#ifdef METH_NOARGS
  85440. - if (PyObject_IsTrue(val)) {
  85441. - SwigPyObject_acquire(v);
  85442. - } else {
  85443. - SwigPyObject_disown(v);
  85444. - }
  85445. -#else
  85446. - if (PyObject_IsTrue(val)) {
  85447. - SwigPyObject_acquire(v,args);
  85448. - } else {
  85449. - SwigPyObject_disown(v,args);
  85450. - }
  85451. -#endif
  85452. - }
  85453. - return obj;
  85454. - }
  85455. -}
  85456. -
  85457. -#ifdef METH_O
  85458. -static PyMethodDef
  85459. -swigobject_methods[] = {
  85460. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
  85461. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
  85462. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  85463. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
  85464. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
  85465. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
  85466. - {0, 0, 0, 0}
  85467. -};
  85468. -#else
  85469. -static PyMethodDef
  85470. -swigobject_methods[] = {
  85471. - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
  85472. - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
  85473. - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  85474. - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
  85475. - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
  85476. - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
  85477. - {0, 0, 0, 0}
  85478. -};
  85479. -#endif
  85480. -
  85481. -#if PY_VERSION_HEX < 0x02020000
  85482. -SWIGINTERN PyObject *
  85483. -SwigPyObject_getattr(SwigPyObject *sobj,char *name)
  85484. -{
  85485. - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
  85486. -}
  85487. -#endif
  85488. -
  85489. -SWIGRUNTIME PyTypeObject*
  85490. -SwigPyObject_TypeOnce(void) {
  85491. - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  85492. -
  85493. - static PyNumberMethods SwigPyObject_as_number = {
  85494. - (binaryfunc)0, /*nb_add*/
  85495. - (binaryfunc)0, /*nb_subtract*/
  85496. - (binaryfunc)0, /*nb_multiply*/
  85497. - /* nb_divide removed in Python 3 */
  85498. -#if PY_VERSION_HEX < 0x03000000
  85499. - (binaryfunc)0, /*nb_divide*/
  85500. -#endif
  85501. - (binaryfunc)0, /*nb_remainder*/
  85502. - (binaryfunc)0, /*nb_divmod*/
  85503. - (ternaryfunc)0,/*nb_power*/
  85504. - (unaryfunc)0, /*nb_negative*/
  85505. - (unaryfunc)0, /*nb_positive*/
  85506. - (unaryfunc)0, /*nb_absolute*/
  85507. - (inquiry)0, /*nb_nonzero*/
  85508. - 0, /*nb_invert*/
  85509. - 0, /*nb_lshift*/
  85510. - 0, /*nb_rshift*/
  85511. - 0, /*nb_and*/
  85512. - 0, /*nb_xor*/
  85513. - 0, /*nb_or*/
  85514. -#if PY_VERSION_HEX < 0x03000000
  85515. - 0, /*nb_coerce*/
  85516. -#endif
  85517. - (unaryfunc)SwigPyObject_long, /*nb_int*/
  85518. -#if PY_VERSION_HEX < 0x03000000
  85519. - (unaryfunc)SwigPyObject_long, /*nb_long*/
  85520. -#else
  85521. - 0, /*nb_reserved*/
  85522. -#endif
  85523. - (unaryfunc)0, /*nb_float*/
  85524. -#if PY_VERSION_HEX < 0x03000000
  85525. - (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  85526. - (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  85527. -#endif
  85528. -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  85529. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  85530. -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
  85531. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  85532. -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
  85533. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
  85534. -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
  85535. - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
  85536. -#endif
  85537. - };
  85538. -
  85539. - static PyTypeObject swigpyobject_type;
  85540. - static int type_init = 0;
  85541. - if (!type_init) {
  85542. - const PyTypeObject tmp = {
  85543. - /* PyObject header changed in Python 3 */
  85544. -#if PY_VERSION_HEX >= 0x03000000
  85545. - PyVarObject_HEAD_INIT(NULL, 0)
  85546. -#else
  85547. - PyObject_HEAD_INIT(NULL)
  85548. - 0, /* ob_size */
  85549. -#endif
  85550. - (char *)"SwigPyObject", /* tp_name */
  85551. - sizeof(SwigPyObject), /* tp_basicsize */
  85552. - 0, /* tp_itemsize */
  85553. - (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  85554. - (printfunc)SwigPyObject_print, /* tp_print */
  85555. -#if PY_VERSION_HEX < 0x02020000
  85556. - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
  85557. -#else
  85558. - (getattrfunc)0, /* tp_getattr */
  85559. -#endif
  85560. - (setattrfunc)0, /* tp_setattr */
  85561. -#if PY_VERSION_HEX >= 0x03000000
  85562. - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  85563. -#else
  85564. - (cmpfunc)SwigPyObject_compare, /* tp_compare */
  85565. -#endif
  85566. - (reprfunc)SwigPyObject_repr, /* tp_repr */
  85567. - &SwigPyObject_as_number, /* tp_as_number */
  85568. - 0, /* tp_as_sequence */
  85569. - 0, /* tp_as_mapping */
  85570. - (hashfunc)0, /* tp_hash */
  85571. - (ternaryfunc)0, /* tp_call */
  85572. - (reprfunc)SwigPyObject_str, /* tp_str */
  85573. - PyObject_GenericGetAttr, /* tp_getattro */
  85574. - 0, /* tp_setattro */
  85575. - 0, /* tp_as_buffer */
  85576. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  85577. - swigobject_doc, /* tp_doc */
  85578. - 0, /* tp_traverse */
  85579. - 0, /* tp_clear */
  85580. - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  85581. - 0, /* tp_weaklistoffset */
  85582. -#if PY_VERSION_HEX >= 0x02020000
  85583. - 0, /* tp_iter */
  85584. - 0, /* tp_iternext */
  85585. - swigobject_methods, /* tp_methods */
  85586. - 0, /* tp_members */
  85587. - 0, /* tp_getset */
  85588. - 0, /* tp_base */
  85589. - 0, /* tp_dict */
  85590. - 0, /* tp_descr_get */
  85591. - 0, /* tp_descr_set */
  85592. - 0, /* tp_dictoffset */
  85593. - 0, /* tp_init */
  85594. - 0, /* tp_alloc */
  85595. - 0, /* tp_new */
  85596. - 0, /* tp_free */
  85597. - 0, /* tp_is_gc */
  85598. - 0, /* tp_bases */
  85599. - 0, /* tp_mro */
  85600. - 0, /* tp_cache */
  85601. - 0, /* tp_subclasses */
  85602. - 0, /* tp_weaklist */
  85603. -#endif
  85604. -#if PY_VERSION_HEX >= 0x02030000
  85605. - 0, /* tp_del */
  85606. -#endif
  85607. -#if PY_VERSION_HEX >= 0x02060000
  85608. - 0, /* tp_version */
  85609. -#endif
  85610. -#ifdef COUNT_ALLOCS
  85611. - 0,0,0,0 /* tp_alloc -> tp_next */
  85612. -#endif
  85613. - };
  85614. - swigpyobject_type = tmp;
  85615. - type_init = 1;
  85616. -#if PY_VERSION_HEX < 0x02020000
  85617. - swigpyobject_type.ob_type = &PyType_Type;
  85618. -#else
  85619. - if (PyType_Ready(&swigpyobject_type) < 0)
  85620. - return NULL;
  85621. -#endif
  85622. - }
  85623. - return &swigpyobject_type;
  85624. -}
  85625. -
  85626. -SWIGRUNTIME PyObject *
  85627. -SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  85628. -{
  85629. - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  85630. - if (sobj) {
  85631. - sobj->ptr = ptr;
  85632. - sobj->ty = ty;
  85633. - sobj->own = own;
  85634. - sobj->next = 0;
  85635. - }
  85636. - return (PyObject *)sobj;
  85637. -}
  85638. -
  85639. -/* -----------------------------------------------------------------------------
  85640. - * Implements a simple Swig Packed type, and use it instead of string
  85641. - * ----------------------------------------------------------------------------- */
  85642. -
  85643. -typedef struct {
  85644. - PyObject_HEAD
  85645. - void *pack;
  85646. - swig_type_info *ty;
  85647. - size_t size;
  85648. -} SwigPyPacked;
  85649. -
  85650. -SWIGRUNTIME int
  85651. -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  85652. -{
  85653. - char result[SWIG_BUFFER_SIZE];
  85654. - fputs("<Swig Packed ", fp);
  85655. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  85656. - fputs("at ", fp);
  85657. - fputs(result, fp);
  85658. - }
  85659. - fputs(v->ty->name,fp);
  85660. - fputs(">", fp);
  85661. - return 0;
  85662. -}
  85663. -
  85664. -SWIGRUNTIME PyObject *
  85665. -SwigPyPacked_repr(SwigPyPacked *v)
  85666. -{
  85667. - char result[SWIG_BUFFER_SIZE];
  85668. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  85669. - return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  85670. - } else {
  85671. - return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  85672. - }
  85673. -}
  85674. -
  85675. -SWIGRUNTIME PyObject *
  85676. -SwigPyPacked_str(SwigPyPacked *v)
  85677. -{
  85678. - char result[SWIG_BUFFER_SIZE];
  85679. - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  85680. - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  85681. - } else {
  85682. - return SWIG_Python_str_FromChar(v->ty->name);
  85683. - }
  85684. -}
  85685. -
  85686. -SWIGRUNTIME int
  85687. -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  85688. -{
  85689. - size_t i = v->size;
  85690. - size_t j = w->size;
  85691. - int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  85692. - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  85693. -}
  85694. -
  85695. -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  85696. -
  85697. -SWIGRUNTIME PyTypeObject*
  85698. -SwigPyPacked_type(void) {
  85699. - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  85700. - return type;
  85701. -}
  85702. -
  85703. -SWIGRUNTIMEINLINE int
  85704. -SwigPyPacked_Check(PyObject *op) {
  85705. - return ((op)->ob_type == SwigPyPacked_TypeOnce())
  85706. - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  85707. -}
  85708. -
  85709. -SWIGRUNTIME void
  85710. -SwigPyPacked_dealloc(PyObject *v)
  85711. -{
  85712. - if (SwigPyPacked_Check(v)) {
  85713. - SwigPyPacked *sobj = (SwigPyPacked *) v;
  85714. - free(sobj->pack);
  85715. - }
  85716. - PyObject_DEL(v);
  85717. -}
  85718. -
  85719. -SWIGRUNTIME PyTypeObject*
  85720. -SwigPyPacked_TypeOnce(void) {
  85721. - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  85722. - static PyTypeObject swigpypacked_type;
  85723. - static int type_init = 0;
  85724. - if (!type_init) {
  85725. - const PyTypeObject tmp = {
  85726. - /* PyObject header changed in Python 3 */
  85727. -#if PY_VERSION_HEX>=0x03000000
  85728. - PyVarObject_HEAD_INIT(NULL, 0)
  85729. -#else
  85730. - PyObject_HEAD_INIT(NULL)
  85731. - 0, /* ob_size */
  85732. -#endif
  85733. - (char *)"SwigPyPacked", /* tp_name */
  85734. - sizeof(SwigPyPacked), /* tp_basicsize */
  85735. - 0, /* tp_itemsize */
  85736. - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  85737. - (printfunc)SwigPyPacked_print, /* tp_print */
  85738. - (getattrfunc)0, /* tp_getattr */
  85739. - (setattrfunc)0, /* tp_setattr */
  85740. -#if PY_VERSION_HEX>=0x03000000
  85741. - 0, /* tp_reserved in 3.0.1 */
  85742. -#else
  85743. - (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  85744. -#endif
  85745. - (reprfunc)SwigPyPacked_repr, /* tp_repr */
  85746. - 0, /* tp_as_number */
  85747. - 0, /* tp_as_sequence */
  85748. - 0, /* tp_as_mapping */
  85749. - (hashfunc)0, /* tp_hash */
  85750. - (ternaryfunc)0, /* tp_call */
  85751. - (reprfunc)SwigPyPacked_str, /* tp_str */
  85752. - PyObject_GenericGetAttr, /* tp_getattro */
  85753. - 0, /* tp_setattro */
  85754. - 0, /* tp_as_buffer */
  85755. - Py_TPFLAGS_DEFAULT, /* tp_flags */
  85756. - swigpacked_doc, /* tp_doc */
  85757. - 0, /* tp_traverse */
  85758. - 0, /* tp_clear */
  85759. - 0, /* tp_richcompare */
  85760. - 0, /* tp_weaklistoffset */
  85761. -#if PY_VERSION_HEX >= 0x02020000
  85762. - 0, /* tp_iter */
  85763. - 0, /* tp_iternext */
  85764. - 0, /* tp_methods */
  85765. - 0, /* tp_members */
  85766. - 0, /* tp_getset */
  85767. - 0, /* tp_base */
  85768. - 0, /* tp_dict */
  85769. - 0, /* tp_descr_get */
  85770. - 0, /* tp_descr_set */
  85771. - 0, /* tp_dictoffset */
  85772. - 0, /* tp_init */
  85773. - 0, /* tp_alloc */
  85774. - 0, /* tp_new */
  85775. - 0, /* tp_free */
  85776. - 0, /* tp_is_gc */
  85777. - 0, /* tp_bases */
  85778. - 0, /* tp_mro */
  85779. - 0, /* tp_cache */
  85780. - 0, /* tp_subclasses */
  85781. - 0, /* tp_weaklist */
  85782. -#endif
  85783. -#if PY_VERSION_HEX >= 0x02030000
  85784. - 0, /* tp_del */
  85785. -#endif
  85786. -#if PY_VERSION_HEX >= 0x02060000
  85787. - 0, /* tp_version */
  85788. -#endif
  85789. -#ifdef COUNT_ALLOCS
  85790. - 0,0,0,0 /* tp_alloc -> tp_next */
  85791. -#endif
  85792. - };
  85793. - swigpypacked_type = tmp;
  85794. - type_init = 1;
  85795. -#if PY_VERSION_HEX < 0x02020000
  85796. - swigpypacked_type.ob_type = &PyType_Type;
  85797. -#else
  85798. - if (PyType_Ready(&swigpypacked_type) < 0)
  85799. - return NULL;
  85800. -#endif
  85801. - }
  85802. - return &swigpypacked_type;
  85803. -}
  85804. -
  85805. -SWIGRUNTIME PyObject *
  85806. -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  85807. -{
  85808. - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  85809. - if (sobj) {
  85810. - void *pack = malloc(size);
  85811. - if (pack) {
  85812. - memcpy(pack, ptr, size);
  85813. - sobj->pack = pack;
  85814. - sobj->ty = ty;
  85815. - sobj->size = size;
  85816. - } else {
  85817. - PyObject_DEL((PyObject *) sobj);
  85818. - sobj = 0;
  85819. - }
  85820. - }
  85821. - return (PyObject *) sobj;
  85822. -}
  85823. -
  85824. -SWIGRUNTIME swig_type_info *
  85825. -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  85826. -{
  85827. - if (SwigPyPacked_Check(obj)) {
  85828. - SwigPyPacked *sobj = (SwigPyPacked *)obj;
  85829. - if (sobj->size != size) return 0;
  85830. - memcpy(ptr, sobj->pack, size);
  85831. - return sobj->ty;
  85832. - } else {
  85833. - return 0;
  85834. - }
  85835. -}
  85836. -
  85837. -/* -----------------------------------------------------------------------------
  85838. - * pointers/data manipulation
  85839. - * ----------------------------------------------------------------------------- */
  85840. -
  85841. -SWIGRUNTIMEINLINE PyObject *
  85842. -_SWIG_This(void)
  85843. -{
  85844. - return SWIG_Python_str_FromChar("this");
  85845. -}
  85846. -
  85847. -static PyObject *swig_this = NULL;
  85848. -
  85849. -SWIGRUNTIME PyObject *
  85850. -SWIG_This(void)
  85851. -{
  85852. - if (swig_this == NULL)
  85853. - swig_this = _SWIG_This();
  85854. - return swig_this;
  85855. -}
  85856. -
  85857. -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  85858. -
  85859. -/* TODO: I don't know how to implement the fast getset in Python 3 right now */
  85860. -#if PY_VERSION_HEX>=0x03000000
  85861. -#define SWIG_PYTHON_SLOW_GETSET_THIS
  85862. -#endif
  85863. -
  85864. -SWIGRUNTIME SwigPyObject *
  85865. -SWIG_Python_GetSwigThis(PyObject *pyobj)
  85866. -{
  85867. - PyObject *obj;
  85868. -
  85869. - if (SwigPyObject_Check(pyobj))
  85870. - return (SwigPyObject *) pyobj;
  85871. -
  85872. -#ifdef SWIGPYTHON_BUILTIN
  85873. - (void)obj;
  85874. -# ifdef PyWeakref_CheckProxy
  85875. - if (PyWeakref_CheckProxy(pyobj)) {
  85876. - pyobj = PyWeakref_GET_OBJECT(pyobj);
  85877. - if (pyobj && SwigPyObject_Check(pyobj))
  85878. - return (SwigPyObject*) pyobj;
  85879. - }
  85880. -# endif
  85881. - return NULL;
  85882. -#else
  85883. -
  85884. - obj = 0;
  85885. -
  85886. -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  85887. - if (PyInstance_Check(pyobj)) {
  85888. - obj = _PyInstance_Lookup(pyobj, SWIG_This());
  85889. - } else {
  85890. - PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  85891. - if (dictptr != NULL) {
  85892. - PyObject *dict = *dictptr;
  85893. - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  85894. - } else {
  85895. -#ifdef PyWeakref_CheckProxy
  85896. - if (PyWeakref_CheckProxy(pyobj)) {
  85897. - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  85898. - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  85899. - }
  85900. -#endif
  85901. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  85902. - if (obj) {
  85903. - Py_DECREF(obj);
  85904. - } else {
  85905. - if (PyErr_Occurred()) PyErr_Clear();
  85906. - return 0;
  85907. - }
  85908. - }
  85909. - }
  85910. -#else
  85911. - obj = PyObject_GetAttr(pyobj,SWIG_This());
  85912. - if (obj) {
  85913. - Py_DECREF(obj);
  85914. - } else {
  85915. - if (PyErr_Occurred()) PyErr_Clear();
  85916. - return 0;
  85917. - }
  85918. -#endif
  85919. - if (obj && !SwigPyObject_Check(obj)) {
  85920. - /* a PyObject is called 'this', try to get the 'real this'
  85921. - SwigPyObject from it */
  85922. - return SWIG_Python_GetSwigThis(obj);
  85923. - }
  85924. - return (SwigPyObject *)obj;
  85925. -#endif
  85926. -}
  85927. -
  85928. -/* Acquire a pointer value */
  85929. -
  85930. -SWIGRUNTIME int
  85931. -SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  85932. - if (own == SWIG_POINTER_OWN) {
  85933. - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  85934. - if (sobj) {
  85935. - int oldown = sobj->own;
  85936. - sobj->own = own;
  85937. - return oldown;
  85938. - }
  85939. - }
  85940. - return 0;
  85941. -}
  85942. -
  85943. -/* Convert a pointer value */
  85944. -
  85945. -SWIGRUNTIME int
  85946. -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  85947. - int res;
  85948. - SwigPyObject *sobj;
  85949. -
  85950. - if (!obj)
  85951. - return SWIG_ERROR;
  85952. - if (obj == Py_None) {
  85953. - if (ptr)
  85954. - *ptr = 0;
  85955. - return SWIG_OK;
  85956. - }
  85957. -
  85958. - res = SWIG_ERROR;
  85959. -
  85960. - sobj = SWIG_Python_GetSwigThis(obj);
  85961. - if (own)
  85962. - *own = 0;
  85963. - while (sobj) {
  85964. - void *vptr = sobj->ptr;
  85965. - if (ty) {
  85966. - swig_type_info *to = sobj->ty;
  85967. - if (to == ty) {
  85968. - /* no type cast needed */
  85969. - if (ptr) *ptr = vptr;
  85970. - break;
  85971. - } else {
  85972. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  85973. - if (!tc) {
  85974. - sobj = (SwigPyObject *)sobj->next;
  85975. - } else {
  85976. - if (ptr) {
  85977. - int newmemory = 0;
  85978. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  85979. - if (newmemory == SWIG_CAST_NEW_MEMORY) {
  85980. - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  85981. - if (own)
  85982. - *own = *own | SWIG_CAST_NEW_MEMORY;
  85983. - }
  85984. - }
  85985. - break;
  85986. - }
  85987. - }
  85988. - } else {
  85989. - if (ptr) *ptr = vptr;
  85990. - break;
  85991. - }
  85992. - }
  85993. - if (sobj) {
  85994. - if (own)
  85995. - *own = *own | sobj->own;
  85996. - if (flags & SWIG_POINTER_DISOWN) {
  85997. - sobj->own = 0;
  85998. - }
  85999. - res = SWIG_OK;
  86000. - } else {
  86001. - if (flags & SWIG_POINTER_IMPLICIT_CONV) {
  86002. - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  86003. - if (data && !data->implicitconv) {
  86004. - PyObject *klass = data->klass;
  86005. - if (klass) {
  86006. - PyObject *impconv;
  86007. - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  86008. - impconv = SWIG_Python_CallFunctor(klass, obj);
  86009. - data->implicitconv = 0;
  86010. - if (PyErr_Occurred()) {
  86011. - PyErr_Clear();
  86012. - impconv = 0;
  86013. - }
  86014. - if (impconv) {
  86015. - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  86016. - if (iobj) {
  86017. - void *vptr;
  86018. - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  86019. - if (SWIG_IsOK(res)) {
  86020. - if (ptr) {
  86021. - *ptr = vptr;
  86022. - /* transfer the ownership to 'ptr' */
  86023. - iobj->own = 0;
  86024. - res = SWIG_AddCast(res);
  86025. - res = SWIG_AddNewMask(res);
  86026. - } else {
  86027. - res = SWIG_AddCast(res);
  86028. - }
  86029. - }
  86030. - }
  86031. - Py_DECREF(impconv);
  86032. - }
  86033. - }
  86034. - }
  86035. - }
  86036. - }
  86037. - return res;
  86038. -}
  86039. -
  86040. -/* Convert a function ptr value */
  86041. -
  86042. -SWIGRUNTIME int
  86043. -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  86044. - if (!PyCFunction_Check(obj)) {
  86045. - return SWIG_ConvertPtr(obj, ptr, ty, 0);
  86046. - } else {
  86047. - void *vptr = 0;
  86048. -
  86049. - /* here we get the method pointer for callbacks */
  86050. - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  86051. - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  86052. - if (desc)
  86053. - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  86054. - if (!desc)
  86055. - return SWIG_ERROR;
  86056. - if (ty) {
  86057. - swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
  86058. - if (tc) {
  86059. - int newmemory = 0;
  86060. - *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  86061. - assert(!newmemory); /* newmemory handling not yet implemented */
  86062. - } else {
  86063. - return SWIG_ERROR;
  86064. - }
  86065. - } else {
  86066. - *ptr = vptr;
  86067. - }
  86068. - return SWIG_OK;
  86069. - }
  86070. -}
  86071. -
  86072. -/* Convert a packed value value */
  86073. -
  86074. -SWIGRUNTIME int
  86075. -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  86076. - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  86077. - if (!to) return SWIG_ERROR;
  86078. - if (ty) {
  86079. - if (to != ty) {
  86080. - /* check type cast? */
  86081. - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  86082. - if (!tc) return SWIG_ERROR;
  86083. - }
  86084. - }
  86085. - return SWIG_OK;
  86086. -}
  86087. -
  86088. -/* -----------------------------------------------------------------------------
  86089. - * Create a new pointer object
  86090. - * ----------------------------------------------------------------------------- */
  86091. -
  86092. -/*
  86093. - Create a new instance object, without calling __init__, and set the
  86094. - 'this' attribute.
  86095. -*/
  86096. -
  86097. -SWIGRUNTIME PyObject*
  86098. -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  86099. -{
  86100. -#if (PY_VERSION_HEX >= 0x02020000)
  86101. - PyObject *inst = 0;
  86102. - PyObject *newraw = data->newraw;
  86103. - if (newraw) {
  86104. - inst = PyObject_Call(newraw, data->newargs, NULL);
  86105. - if (inst) {
  86106. -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  86107. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  86108. - if (dictptr != NULL) {
  86109. - PyObject *dict = *dictptr;
  86110. - if (dict == NULL) {
  86111. - dict = PyDict_New();
  86112. - *dictptr = dict;
  86113. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  86114. - }
  86115. - }
  86116. -#else
  86117. - PyObject *key = SWIG_This();
  86118. - PyObject_SetAttr(inst, key, swig_this);
  86119. -#endif
  86120. - }
  86121. - } else {
  86122. -#if PY_VERSION_HEX >= 0x03000000
  86123. - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
  86124. - if (inst) {
  86125. - PyObject_SetAttr(inst, SWIG_This(), swig_this);
  86126. - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  86127. - }
  86128. -#else
  86129. - PyObject *dict = PyDict_New();
  86130. - if (dict) {
  86131. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  86132. - inst = PyInstance_NewRaw(data->newargs, dict);
  86133. - Py_DECREF(dict);
  86134. - }
  86135. -#endif
  86136. - }
  86137. - return inst;
  86138. -#else
  86139. -#if (PY_VERSION_HEX >= 0x02010000)
  86140. - PyObject *inst = 0;
  86141. - PyObject *dict = PyDict_New();
  86142. - if (dict) {
  86143. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  86144. - inst = PyInstance_NewRaw(data->newargs, dict);
  86145. - Py_DECREF(dict);
  86146. - }
  86147. - return (PyObject *) inst;
  86148. -#else
  86149. - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  86150. - if (inst == NULL) {
  86151. - return NULL;
  86152. - }
  86153. - inst->in_class = (PyClassObject *)data->newargs;
  86154. - Py_INCREF(inst->in_class);
  86155. - inst->in_dict = PyDict_New();
  86156. - if (inst->in_dict == NULL) {
  86157. - Py_DECREF(inst);
  86158. - return NULL;
  86159. - }
  86160. -#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  86161. - inst->in_weakreflist = NULL;
  86162. -#endif
  86163. -#ifdef Py_TPFLAGS_GC
  86164. - PyObject_GC_Init(inst);
  86165. -#endif
  86166. - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  86167. - return (PyObject *) inst;
  86168. -#endif
  86169. -#endif
  86170. -}
  86171. -
  86172. -SWIGRUNTIME void
  86173. -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  86174. -{
  86175. - PyObject *dict;
  86176. -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  86177. - PyObject **dictptr = _PyObject_GetDictPtr(inst);
  86178. - if (dictptr != NULL) {
  86179. - dict = *dictptr;
  86180. - if (dict == NULL) {
  86181. - dict = PyDict_New();
  86182. - *dictptr = dict;
  86183. - }
  86184. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  86185. - return;
  86186. - }
  86187. -#endif
  86188. - dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  86189. - PyDict_SetItem(dict, SWIG_This(), swig_this);
  86190. - Py_DECREF(dict);
  86191. -}
  86192. -
  86193. -
  86194. -SWIGINTERN PyObject *
  86195. -SWIG_Python_InitShadowInstance(PyObject *args) {
  86196. - PyObject *obj[2];
  86197. - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  86198. - return NULL;
  86199. - } else {
  86200. - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  86201. - if (sthis) {
  86202. - SwigPyObject_append((PyObject*) sthis, obj[1]);
  86203. - } else {
  86204. - SWIG_Python_SetSwigThis(obj[0], obj[1]);
  86205. - }
  86206. - return SWIG_Py_Void();
  86207. - }
  86208. -}
  86209. -
  86210. -/* Create a new pointer object */
  86211. -
  86212. -SWIGRUNTIME PyObject *
  86213. -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  86214. - SwigPyClientData *clientdata;
  86215. - PyObject * robj;
  86216. - int own;
  86217. -
  86218. - if (!ptr)
  86219. - return SWIG_Py_Void();
  86220. -
  86221. - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  86222. - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  86223. - if (clientdata && clientdata->pytype) {
  86224. - SwigPyObject *newobj;
  86225. - if (flags & SWIG_BUILTIN_TP_INIT) {
  86226. - newobj = (SwigPyObject*) self;
  86227. - if (newobj->ptr) {
  86228. - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  86229. - while (newobj->next)
  86230. - newobj = (SwigPyObject *) newobj->next;
  86231. - newobj->next = next_self;
  86232. - newobj = (SwigPyObject *)next_self;
  86233. - }
  86234. - } else {
  86235. - newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  86236. - }
  86237. - if (newobj) {
  86238. - newobj->ptr = ptr;
  86239. - newobj->ty = type;
  86240. - newobj->own = own;
  86241. - newobj->next = 0;
  86242. -#ifdef SWIGPYTHON_BUILTIN
  86243. - newobj->dict = 0;
  86244. -#endif
  86245. - return (PyObject*) newobj;
  86246. - }
  86247. - return SWIG_Py_Void();
  86248. - }
  86249. -
  86250. - assert(!(flags & SWIG_BUILTIN_TP_INIT));
  86251. -
  86252. - robj = SwigPyObject_New(ptr, type, own);
  86253. - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  86254. - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  86255. - Py_DECREF(robj);
  86256. - robj = inst;
  86257. - }
  86258. - return robj;
  86259. -}
  86260. -
  86261. -/* Create a new packed object */
  86262. -
  86263. -SWIGRUNTIMEINLINE PyObject *
  86264. -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  86265. - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  86266. -}
  86267. -
  86268. -/* -----------------------------------------------------------------------------*
  86269. - * Get type list
  86270. - * -----------------------------------------------------------------------------*/
  86271. -
  86272. -#ifdef SWIG_LINK_RUNTIME
  86273. -void *SWIG_ReturnGlobalTypeList(void *);
  86274. -#endif
  86275. -
  86276. -SWIGRUNTIME swig_module_info *
  86277. -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  86278. - static void *type_pointer = (void *)0;
  86279. - /* first check if module already created */
  86280. - if (!type_pointer) {
  86281. -#ifdef SWIG_LINK_RUNTIME
  86282. - type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  86283. -#else
  86284. -# ifdef SWIGPY_USE_CAPSULE
  86285. - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  86286. -# else
  86287. - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
  86288. - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
  86289. -# endif
  86290. - if (PyErr_Occurred()) {
  86291. - PyErr_Clear();
  86292. - type_pointer = (void *)0;
  86293. - }
  86294. -#endif
  86295. - }
  86296. - return (swig_module_info *) type_pointer;
  86297. -}
  86298. -
  86299. -#if PY_MAJOR_VERSION < 2
  86300. -/* PyModule_AddObject function was introduced in Python 2.0. The following function
  86301. - is copied out of Python/modsupport.c in python version 2.3.4 */
  86302. -SWIGINTERN int
  86303. -PyModule_AddObject(PyObject *m, char *name, PyObject *o)
  86304. -{
  86305. - PyObject *dict;
  86306. - if (!PyModule_Check(m)) {
  86307. - PyErr_SetString(PyExc_TypeError,
  86308. - "PyModule_AddObject() needs module as first arg");
  86309. - return SWIG_ERROR;
  86310. - }
  86311. - if (!o) {
  86312. - PyErr_SetString(PyExc_TypeError,
  86313. - "PyModule_AddObject() needs non-NULL value");
  86314. - return SWIG_ERROR;
  86315. - }
  86316. -
  86317. - dict = PyModule_GetDict(m);
  86318. - if (dict == NULL) {
  86319. - /* Internal error -- modules must have a dict! */
  86320. - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
  86321. - PyModule_GetName(m));
  86322. - return SWIG_ERROR;
  86323. - }
  86324. - if (PyDict_SetItemString(dict, name, o))
  86325. - return SWIG_ERROR;
  86326. - Py_DECREF(o);
  86327. - return SWIG_OK;
  86328. -}
  86329. -#endif
  86330. -
  86331. -SWIGRUNTIME void
  86332. -#ifdef SWIGPY_USE_CAPSULE
  86333. -SWIG_Python_DestroyModule(PyObject *obj)
  86334. -#else
  86335. -SWIG_Python_DestroyModule(void *vptr)
  86336. -#endif
  86337. -{
  86338. -#ifdef SWIGPY_USE_CAPSULE
  86339. - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  86340. -#else
  86341. - swig_module_info *swig_module = (swig_module_info *) vptr;
  86342. -#endif
  86343. - swig_type_info **types = swig_module->types;
  86344. - size_t i;
  86345. - for (i =0; i < swig_module->size; ++i) {
  86346. - swig_type_info *ty = types[i];
  86347. - if (ty->owndata) {
  86348. - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  86349. - if (data) SwigPyClientData_Del(data);
  86350. - }
  86351. - }
  86352. - Py_DECREF(SWIG_This());
  86353. - swig_this = NULL;
  86354. -}
  86355. -
  86356. -SWIGRUNTIME void
  86357. -SWIG_Python_SetModule(swig_module_info *swig_module) {
  86358. -#if PY_VERSION_HEX >= 0x03000000
  86359. - /* Add a dummy module object into sys.modules */
  86360. - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  86361. -#else
  86362. - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  86363. - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  86364. -#endif
  86365. -#ifdef SWIGPY_USE_CAPSULE
  86366. - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  86367. - if (pointer && module) {
  86368. - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  86369. - } else {
  86370. - Py_XDECREF(pointer);
  86371. - }
  86372. -#else
  86373. - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  86374. - if (pointer && module) {
  86375. - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  86376. - } else {
  86377. - Py_XDECREF(pointer);
  86378. - }
  86379. -#endif
  86380. -}
  86381. -
  86382. -/* The python cached type query */
  86383. -SWIGRUNTIME PyObject *
  86384. -SWIG_Python_TypeCache(void) {
  86385. - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  86386. - return cache;
  86387. -}
  86388. -
  86389. -SWIGRUNTIME swig_type_info *
  86390. -SWIG_Python_TypeQuery(const char *type)
  86391. -{
  86392. - PyObject *cache = SWIG_Python_TypeCache();
  86393. - PyObject *key = SWIG_Python_str_FromChar(type);
  86394. - PyObject *obj = PyDict_GetItem(cache, key);
  86395. - swig_type_info *descriptor;
  86396. - if (obj) {
  86397. -#ifdef SWIGPY_USE_CAPSULE
  86398. - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  86399. -#else
  86400. - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
  86401. -#endif
  86402. - } else {
  86403. - swig_module_info *swig_module = SWIG_GetModule(0);
  86404. - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  86405. - if (descriptor) {
  86406. -#ifdef SWIGPY_USE_CAPSULE
  86407. - obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  86408. -#else
  86409. - obj = PyCObject_FromVoidPtr(descriptor, NULL);
  86410. -#endif
  86411. - PyDict_SetItem(cache, key, obj);
  86412. - Py_DECREF(obj);
  86413. - }
  86414. - }
  86415. - Py_DECREF(key);
  86416. - return descriptor;
  86417. -}
  86418. -
  86419. -/*
  86420. - For backward compatibility only
  86421. -*/
  86422. -#define SWIG_POINTER_EXCEPTION 0
  86423. -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  86424. -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  86425. -
  86426. -SWIGRUNTIME int
  86427. -SWIG_Python_AddErrMesg(const char* mesg, int infront)
  86428. -{
  86429. - if (PyErr_Occurred()) {
  86430. - PyObject *type = 0;
  86431. - PyObject *value = 0;
  86432. - PyObject *traceback = 0;
  86433. - PyErr_Fetch(&type, &value, &traceback);
  86434. - if (value) {
  86435. - char *tmp;
  86436. - PyObject *old_str = PyObject_Str(value);
  86437. - Py_XINCREF(type);
  86438. - PyErr_Clear();
  86439. - if (infront) {
  86440. - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
  86441. - } else {
  86442. - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  86443. - }
  86444. - SWIG_Python_str_DelForPy3(tmp);
  86445. - Py_DECREF(old_str);
  86446. - }
  86447. - return 1;
  86448. - } else {
  86449. - return 0;
  86450. - }
  86451. -}
  86452. -
  86453. -SWIGRUNTIME int
  86454. -SWIG_Python_ArgFail(int argnum)
  86455. -{
  86456. - if (PyErr_Occurred()) {
  86457. - /* add information about failing argument */
  86458. - char mesg[256];
  86459. - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  86460. - return SWIG_Python_AddErrMesg(mesg, 1);
  86461. - } else {
  86462. - return 0;
  86463. - }
  86464. -}
  86465. -
  86466. -SWIGRUNTIMEINLINE const char *
  86467. -SwigPyObject_GetDesc(PyObject *self)
  86468. -{
  86469. - SwigPyObject *v = (SwigPyObject *)self;
  86470. - swig_type_info *ty = v ? v->ty : 0;
  86471. - return ty ? ty->str : "";
  86472. -}
  86473. -
  86474. -SWIGRUNTIME void
  86475. -SWIG_Python_TypeError(const char *type, PyObject *obj)
  86476. -{
  86477. - if (type) {
  86478. -#if defined(SWIG_COBJECT_TYPES)
  86479. - if (obj && SwigPyObject_Check(obj)) {
  86480. - const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  86481. - if (otype) {
  86482. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  86483. - type, otype);
  86484. - return;
  86485. - }
  86486. - } else
  86487. -#endif
  86488. - {
  86489. - const char *otype = (obj ? obj->ob_type->tp_name : 0);
  86490. - if (otype) {
  86491. - PyObject *str = PyObject_Str(obj);
  86492. - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  86493. - if (cstr) {
  86494. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  86495. - type, otype, cstr);
  86496. - SWIG_Python_str_DelForPy3(cstr);
  86497. - } else {
  86498. - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  86499. - type, otype);
  86500. - }
  86501. - Py_XDECREF(str);
  86502. - return;
  86503. - }
  86504. - }
  86505. - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  86506. - } else {
  86507. - PyErr_Format(PyExc_TypeError, "unexpected type is received");
  86508. - }
  86509. -}
  86510. -
  86511. -
  86512. -/* Convert a pointer value, signal an exception on a type mismatch */
  86513. -SWIGRUNTIME void *
  86514. -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  86515. - void *result;
  86516. - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  86517. - PyErr_Clear();
  86518. -#if SWIG_POINTER_EXCEPTION
  86519. - if (flags) {
  86520. - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  86521. - SWIG_Python_ArgFail(argnum);
  86522. - }
  86523. -#endif
  86524. - }
  86525. - return result;
  86526. -}
  86527. -
  86528. -#ifdef SWIGPYTHON_BUILTIN
  86529. -SWIGRUNTIME int
  86530. -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  86531. - PyTypeObject *tp = obj->ob_type;
  86532. - PyObject *descr;
  86533. - PyObject *encoded_name;
  86534. - descrsetfunc f;
  86535. - int res;
  86536. -
  86537. -# ifdef Py_USING_UNICODE
  86538. - if (PyString_Check(name)) {
  86539. - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  86540. - if (!name)
  86541. - return -1;
  86542. - } else if (!PyUnicode_Check(name))
  86543. -# else
  86544. - if (!PyString_Check(name))
  86545. -# endif
  86546. - {
  86547. - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  86548. - return -1;
  86549. - } else {
  86550. - Py_INCREF(name);
  86551. - }
  86552. -
  86553. - if (!tp->tp_dict) {
  86554. - if (PyType_Ready(tp) < 0)
  86555. - goto done;
  86556. - }
  86557. -
  86558. - res = -1;
  86559. - descr = _PyType_Lookup(tp, name);
  86560. - f = NULL;
  86561. - if (descr != NULL)
  86562. - f = descr->ob_type->tp_descr_set;
  86563. - if (!f) {
  86564. - if (PyString_Check(name)) {
  86565. - encoded_name = name;
  86566. - Py_INCREF(name);
  86567. - } else {
  86568. - encoded_name = PyUnicode_AsUTF8String(name);
  86569. - }
  86570. - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  86571. - Py_DECREF(encoded_name);
  86572. - } else {
  86573. - res = f(descr, obj, value);
  86574. - }
  86575. -
  86576. - done:
  86577. - Py_DECREF(name);
  86578. - return res;
  86579. -}
  86580. -#endif
  86581. -
  86582. -
  86583. -#ifdef __cplusplus
  86584. -}
  86585. -#endif
  86586. -
  86587. -
  86588. -
  86589. -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  86590. -
  86591. -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  86592. -
  86593. -
  86594. -
  86595. -/* -------- TYPES TABLE (BEGIN) -------- */
  86596. -
  86597. -#define SWIGTYPE_p__private_detail__MASKUNION swig_types[0]
  86598. -#define SWIGTYPE_p__private_detail__VPMask__VMaskType swig_types[1]
  86599. -#define SWIGTYPE_p_allocator_type swig_types[2]
  86600. -#define SWIGTYPE_p_char swig_types[3]
  86601. -#define SWIGTYPE_p_difference_type swig_types[4]
  86602. -#define SWIGTYPE_p_double swig_types[5]
  86603. -#define SWIGTYPE_p_im__DOUBLEMASK swig_types[6]
  86604. -#define SWIGTYPE_p_im__INTMASK swig_types[7]
  86605. -#define SWIGTYPE_p_int swig_types[8]
  86606. -#define SWIGTYPE_p_matrix swig_types[9]
  86607. -#define SWIGTYPE_p_size_type swig_types[10]
  86608. -#define SWIGTYPE_p_std__ostream swig_types[11]
  86609. -#define SWIGTYPE_p_value_type swig_types[12]
  86610. -#define SWIGTYPE_p_vips__VDMask swig_types[13]
  86611. -#define SWIGTYPE_p_vips__VError swig_types[14]
  86612. -#define SWIGTYPE_p_vips__VIMask swig_types[15]
  86613. -#define SWIGTYPE_p_vips__VMask swig_types[16]
  86614. -static swig_type_info *swig_types[18];
  86615. -static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
  86616. -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  86617. -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  86618. -
  86619. -/* -------- TYPES TABLE (END) -------- */
  86620. -
  86621. -#if (PY_VERSION_HEX <= 0x02000000)
  86622. -# if !defined(SWIG_PYTHON_CLASSIC)
  86623. -# error "This python version requires swig to be run with the '-classic' option"
  86624. -# endif
  86625. -#endif
  86626. -
  86627. -/*-----------------------------------------------
  86628. - @(target):= vmaskmodule.so
  86629. - ------------------------------------------------*/
  86630. -#if PY_VERSION_HEX >= 0x03000000
  86631. -# define SWIG_init PyInit_vmaskmodule
  86632. -
  86633. -#else
  86634. -# define SWIG_init initvmaskmodule
  86635. -
  86636. -#endif
  86637. -#define SWIG_name "vmaskmodule"
  86638. -
  86639. -#define SWIGVERSION 0x020010
  86640. -#define SWIG_VERSION SWIGVERSION
  86641. -
  86642. -
  86643. -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  86644. -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  86645. -
  86646. -
  86647. -#include <stdexcept>
  86648. -
  86649. -
  86650. -namespace swig {
  86651. - class SwigPtr_PyObject {
  86652. - protected:
  86653. - PyObject *_obj;
  86654. -
  86655. - public:
  86656. - SwigPtr_PyObject() :_obj(0)
  86657. - {
  86658. - }
  86659. -
  86660. - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
  86661. - {
  86662. - Py_XINCREF(_obj);
  86663. - }
  86664. -
  86665. - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
  86666. - {
  86667. - if (initial_ref) {
  86668. - Py_XINCREF(_obj);
  86669. - }
  86670. - }
  86671. -
  86672. - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
  86673. - {
  86674. - Py_XINCREF(item._obj);
  86675. - Py_XDECREF(_obj);
  86676. - _obj = item._obj;
  86677. - return *this;
  86678. - }
  86679. -
  86680. - ~SwigPtr_PyObject()
  86681. - {
  86682. - Py_XDECREF(_obj);
  86683. - }
  86684. -
  86685. - operator PyObject *() const
  86686. - {
  86687. - return _obj;
  86688. - }
  86689. -
  86690. - PyObject *operator->() const
  86691. - {
  86692. - return _obj;
  86693. - }
  86694. - };
  86695. -}
  86696. -
  86697. -
  86698. -namespace swig {
  86699. - struct SwigVar_PyObject : SwigPtr_PyObject {
  86700. - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
  86701. -
  86702. - SwigVar_PyObject & operator = (PyObject* obj)
  86703. - {
  86704. - Py_XDECREF(_obj);
  86705. - _obj = obj;
  86706. - return *this;
  86707. - }
  86708. - };
  86709. -}
  86710. -
  86711. -
  86712. -#include <stdexcept>
  86713. -#include <vips/vipscpp.h>
  86714. -
  86715. -
  86716. - #include <stddef.h>
  86717. -
  86718. -
  86719. -namespace swig {
  86720. - struct stop_iteration {
  86721. - };
  86722. -
  86723. - struct SwigPyIterator {
  86724. - private:
  86725. - SwigPtr_PyObject _seq;
  86726. -
  86727. - protected:
  86728. - SwigPyIterator(PyObject *seq) : _seq(seq)
  86729. - {
  86730. - }
  86731. -
  86732. - public:
  86733. - virtual ~SwigPyIterator() {}
  86734. -
  86735. - // Access iterator method, required by Python
  86736. - virtual PyObject *value() const = 0;
  86737. -
  86738. - // Forward iterator method, required by Python
  86739. - virtual SwigPyIterator *incr(size_t n = 1) = 0;
  86740. -
  86741. - // Backward iterator method, very common in C++, but not required in Python
  86742. - virtual SwigPyIterator *decr(size_t /*n*/ = 1)
  86743. - {
  86744. - throw stop_iteration();
  86745. - }
  86746. -
  86747. - // Random access iterator methods, but not required in Python
  86748. - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
  86749. - {
  86750. - throw std::invalid_argument("operation not supported");
  86751. - }
  86752. -
  86753. - virtual bool equal (const SwigPyIterator &/*x*/) const
  86754. - {
  86755. - throw std::invalid_argument("operation not supported");
  86756. - }
  86757. -
  86758. - // C++ common/needed methods
  86759. - virtual SwigPyIterator *copy() const = 0;
  86760. -
  86761. - PyObject *next()
  86762. - {
  86763. - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
  86764. - PyObject *obj = value();
  86765. - incr();
  86766. - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
  86767. - return obj;
  86768. - }
  86769. -
  86770. - /* Make an alias for Python 3.x */
  86771. - PyObject *__next__()
  86772. - {
  86773. - return next();
  86774. - }
  86775. -
  86776. - PyObject *previous()
  86777. - {
  86778. - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
  86779. - decr();
  86780. - PyObject *obj = value();
  86781. - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
  86782. - return obj;
  86783. - }
  86784. -
  86785. - SwigPyIterator *advance(ptrdiff_t n)
  86786. - {
  86787. - return (n > 0) ? incr(n) : decr(-n);
  86788. - }
  86789. -
  86790. - bool operator == (const SwigPyIterator& x) const
  86791. - {
  86792. - return equal(x);
  86793. - }
  86794. -
  86795. - bool operator != (const SwigPyIterator& x) const
  86796. - {
  86797. - return ! operator==(x);
  86798. - }
  86799. -
  86800. - SwigPyIterator& operator += (ptrdiff_t n)
  86801. - {
  86802. - return *advance(n);
  86803. - }
  86804. -
  86805. - SwigPyIterator& operator -= (ptrdiff_t n)
  86806. - {
  86807. - return *advance(-n);
  86808. - }
  86809. -
  86810. - SwigPyIterator* operator + (ptrdiff_t n) const
  86811. - {
  86812. - return copy()->advance(n);
  86813. - }
  86814. -
  86815. - SwigPyIterator* operator - (ptrdiff_t n) const
  86816. - {
  86817. - return copy()->advance(-n);
  86818. - }
  86819. -
  86820. - ptrdiff_t operator - (const SwigPyIterator& x) const
  86821. - {
  86822. - return x.distance(*this);
  86823. - }
  86824. -
  86825. - static swig_type_info* descriptor() {
  86826. - static int init = 0;
  86827. - static swig_type_info* desc = 0;
  86828. - if (!init) {
  86829. - desc = SWIG_TypeQuery("swig::SwigPyIterator *");
  86830. - init = 1;
  86831. - }
  86832. - return desc;
  86833. - }
  86834. - };
  86835. -
  86836. -#if defined(SWIGPYTHON_BUILTIN)
  86837. - inline PyObject* make_output_iterator_builtin (PyObject *pyself)
  86838. - {
  86839. - Py_INCREF(pyself);
  86840. - return pyself;
  86841. - }
  86842. -#endif
  86843. -}
  86844. -
  86845. -
  86846. -namespace swig {
  86847. - template <class Type>
  86848. - struct noconst_traits {
  86849. - typedef Type noconst_type;
  86850. - };
  86851. -
  86852. - template <class Type>
  86853. - struct noconst_traits<const Type> {
  86854. - typedef Type noconst_type;
  86855. - };
  86856. -
  86857. - /*
  86858. - type categories
  86859. - */
  86860. - struct pointer_category { };
  86861. - struct value_category { };
  86862. -
  86863. - /*
  86864. - General traits that provides type_name and type_info
  86865. - */
  86866. - template <class Type> struct traits { };
  86867. -
  86868. - template <class Type>
  86869. - inline const char* type_name() {
  86870. - return traits<typename noconst_traits<Type >::noconst_type >::type_name();
  86871. - }
  86872. -
  86873. - template <class Type>
  86874. - struct traits_info {
  86875. - static swig_type_info *type_query(std::string name) {
  86876. - name += " *";
  86877. - return SWIG_TypeQuery(name.c_str());
  86878. - }
  86879. - static swig_type_info *type_info() {
  86880. - static swig_type_info *info = type_query(type_name<Type>());
  86881. - return info;
  86882. - }
  86883. - };
  86884. -
  86885. - template <class Type>
  86886. - inline swig_type_info *type_info() {
  86887. - return traits_info<Type>::type_info();
  86888. - }
  86889. -
  86890. - /*
  86891. - Partial specialization for pointers
  86892. - */
  86893. - template <class Type> struct traits <Type *> {
  86894. - typedef pointer_category category;
  86895. - static std::string make_ptr_name(const char* name) {
  86896. - std::string ptrname = name;
  86897. - ptrname += " *";
  86898. - return ptrname;
  86899. - }
  86900. - static const char* type_name() {
  86901. - static std::string name = make_ptr_name(swig::type_name<Type>());
  86902. - return name.c_str();
  86903. - }
  86904. - };
  86905. -
  86906. - template <class Type, class Category>
  86907. - struct traits_as { };
  86908. -
  86909. - template <class Type, class Category>
  86910. - struct traits_check { };
  86911. -
  86912. -}
  86913. -
  86914. -
  86915. -namespace swig {
  86916. - /*
  86917. - Traits that provides the from method
  86918. - */
  86919. - template <class Type> struct traits_from_ptr {
  86920. - static PyObject *from(Type *val, int owner = 0) {
  86921. - return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
  86922. - }
  86923. - };
  86924. -
  86925. - template <class Type> struct traits_from {
  86926. - static PyObject *from(const Type& val) {
  86927. - return traits_from_ptr<Type>::from(new Type(val), 1);
  86928. - }
  86929. - };
  86930. -
  86931. - template <class Type> struct traits_from<Type *> {
  86932. - static PyObject *from(Type* val) {
  86933. - return traits_from_ptr<Type>::from(val, 0);
  86934. - }
  86935. - };
  86936. -
  86937. - template <class Type> struct traits_from<const Type *> {
  86938. - static PyObject *from(const Type* val) {
  86939. - return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
  86940. - }
  86941. - };
  86942. -
  86943. -
  86944. - template <class Type>
  86945. - inline PyObject *from(const Type& val) {
  86946. - return traits_from<Type>::from(val);
  86947. - }
  86948. -
  86949. - template <class Type>
  86950. - inline PyObject *from_ptr(Type* val, int owner) {
  86951. - return traits_from_ptr<Type>::from(val, owner);
  86952. - }
  86953. -
  86954. - /*
  86955. - Traits that provides the asval/as/check method
  86956. - */
  86957. - template <class Type>
  86958. - struct traits_asptr {
  86959. - static int asptr(PyObject *obj, Type **val) {
  86960. - Type *p;
  86961. - int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
  86962. - if (SWIG_IsOK(res)) {
  86963. - if (val) *val = p;
  86964. - }
  86965. - return res;
  86966. - }
  86967. - };
  86968. -
  86969. - template <class Type>
  86970. - inline int asptr(PyObject *obj, Type **vptr) {
  86971. - return traits_asptr<Type>::asptr(obj, vptr);
  86972. - }
  86973. -
  86974. - template <class Type>
  86975. - struct traits_asval {
  86976. - static int asval(PyObject *obj, Type *val) {
  86977. - if (val) {
  86978. - Type *p = 0;
  86979. - int res = traits_asptr<Type>::asptr(obj, &p);
  86980. - if (!SWIG_IsOK(res)) return res;
  86981. - if (p) {
  86982. - typedef typename noconst_traits<Type>::noconst_type noconst_type;
  86983. - *(const_cast<noconst_type*>(val)) = *p;
  86984. - if (SWIG_IsNewObj(res)){
  86985. - delete p;
  86986. - res = SWIG_DelNewMask(res);
  86987. - }
  86988. - return res;
  86989. - } else {
  86990. - return SWIG_ERROR;
  86991. - }
  86992. - } else {
  86993. - return traits_asptr<Type>::asptr(obj, (Type **)(0));
  86994. - }
  86995. - }
  86996. - };
  86997. -
  86998. - template <class Type> struct traits_asval<Type*> {
  86999. - static int asval(PyObject *obj, Type **val) {
  87000. - if (val) {
  87001. - typedef typename noconst_traits<Type>::noconst_type noconst_type;
  87002. - noconst_type *p = 0;
  87003. - int res = traits_asptr<noconst_type>::asptr(obj, &p);
  87004. - if (SWIG_IsOK(res)) {
  87005. - *(const_cast<noconst_type**>(val)) = p;
  87006. - }
  87007. - return res;
  87008. - } else {
  87009. - return traits_asptr<Type>::asptr(obj, (Type **)(0));
  87010. - }
  87011. - }
  87012. - };
  87013. -
  87014. - template <class Type>
  87015. - inline int asval(PyObject *obj, Type *val) {
  87016. - return traits_asval<Type>::asval(obj, val);
  87017. - }
  87018. -
  87019. - template <class Type>
  87020. - struct traits_as<Type, value_category> {
  87021. - static Type as(PyObject *obj, bool throw_error) {
  87022. - Type v;
  87023. - int res = asval(obj, &v);
  87024. - if (!obj || !SWIG_IsOK(res)) {
  87025. - if (!PyErr_Occurred()) {
  87026. - ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  87027. - }
  87028. - if (throw_error) throw std::invalid_argument("bad type");
  87029. - }
  87030. - return v;
  87031. - }
  87032. - };
  87033. -
  87034. - template <class Type>
  87035. - struct traits_as<Type, pointer_category> {
  87036. - static Type as(PyObject *obj, bool throw_error) {
  87037. - Type *v = 0;
  87038. - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
  87039. - if (SWIG_IsOK(res) && v) {
  87040. - if (SWIG_IsNewObj(res)) {
  87041. - Type r(*v);
  87042. - delete v;
  87043. - return r;
  87044. - } else {
  87045. - return *v;
  87046. - }
  87047. - } else {
  87048. - // Uninitialized return value, no Type() constructor required.
  87049. - static Type *v_def = (Type*) malloc(sizeof(Type));
  87050. - if (!PyErr_Occurred()) {
  87051. - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  87052. - }
  87053. - if (throw_error) throw std::invalid_argument("bad type");
  87054. - memset(v_def,0,sizeof(Type));
  87055. - return *v_def;
  87056. - }
  87057. - }
  87058. - };
  87059. -
  87060. - template <class Type>
  87061. - struct traits_as<Type*, pointer_category> {
  87062. - static Type* as(PyObject *obj, bool throw_error) {
  87063. - Type *v = 0;
  87064. - int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
  87065. - if (SWIG_IsOK(res)) {
  87066. - return v;
  87067. - } else {
  87068. - if (!PyErr_Occurred()) {
  87069. - SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
  87070. - }
  87071. - if (throw_error) throw std::invalid_argument("bad type");
  87072. - return 0;
  87073. - }
  87074. - }
  87075. - };
  87076. -
  87077. - template <class Type>
  87078. - inline Type as(PyObject *obj, bool te = false) {
  87079. - return traits_as<Type, typename traits<Type>::category>::as(obj, te);
  87080. - }
  87081. -
  87082. - template <class Type>
  87083. - struct traits_check<Type, value_category> {
  87084. - static bool check(PyObject *obj) {
  87085. - int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
  87086. - return SWIG_IsOK(res) ? true : false;
  87087. - }
  87088. - };
  87089. -
  87090. - template <class Type>
  87091. - struct traits_check<Type, pointer_category> {
  87092. - static bool check(PyObject *obj) {
  87093. - int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
  87094. - return SWIG_IsOK(res) ? true : false;
  87095. - }
  87096. - };
  87097. -
  87098. - template <class Type>
  87099. - inline bool check(PyObject *obj) {
  87100. - return traits_check<Type, typename traits<Type>::category>::check(obj);
  87101. - }
  87102. -}
  87103. -
  87104. -
  87105. -#include <functional>
  87106. -
  87107. -namespace std {
  87108. - template <>
  87109. - struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
  87110. - {
  87111. - bool
  87112. - operator()(PyObject * v, PyObject *w) const
  87113. - {
  87114. - bool res;
  87115. - SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  87116. - res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
  87117. - /* This may fall into a case of inconsistent
  87118. - eg. ObjA > ObjX > ObjB
  87119. - but ObjA < ObjB
  87120. - */
  87121. - if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
  87122. - {
  87123. - /* Objects can't be compared, this mostly occurred in Python 3.0 */
  87124. - /* Compare their ptr directly for a workaround */
  87125. - res = (v < w);
  87126. - PyErr_Clear();
  87127. - }
  87128. - SWIG_PYTHON_THREAD_END_BLOCK;
  87129. - return res;
  87130. - }
  87131. - };
  87132. -
  87133. - template <>
  87134. - struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
  87135. - {
  87136. - bool
  87137. - operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
  87138. - {
  87139. - return std::less<PyObject *>()(v, w);
  87140. - }
  87141. - };
  87142. -
  87143. - template <>
  87144. - struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
  87145. - {
  87146. - bool
  87147. - operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
  87148. - {
  87149. - return std::less<PyObject *>()(v, w);
  87150. - }
  87151. - };
  87152. -
  87153. -}
  87154. -
  87155. -namespace swig {
  87156. - template <> struct traits<PyObject *> {
  87157. - typedef value_category category;
  87158. - static const char* type_name() { return "PyObject *"; }
  87159. - };
  87160. -
  87161. - template <> struct traits_asval<PyObject * > {
  87162. - typedef PyObject * value_type;
  87163. - static int asval(PyObject *obj, value_type *val) {
  87164. - if (val) *val = obj;
  87165. - return SWIG_OK;
  87166. - }
  87167. - };
  87168. -
  87169. - template <>
  87170. - struct traits_check<PyObject *, value_category> {
  87171. - static bool check(PyObject *) {
  87172. - return true;
  87173. - }
  87174. - };
  87175. -
  87176. - template <> struct traits_from<PyObject *> {
  87177. - typedef PyObject * value_type;
  87178. - static PyObject *from(const value_type& val) {
  87179. - Py_XINCREF(val);
  87180. - return val;
  87181. - }
  87182. - };
  87183. -
  87184. -}
  87185. -
  87186. -namespace swig {
  87187. - template <class Difference>
  87188. - inline size_t
  87189. - check_index(Difference i, size_t size, bool insert = false) {
  87190. - if ( i < 0 ) {
  87191. - if ((size_t) (-i) <= size)
  87192. - return (size_t) (i + size);
  87193. - } else if ( (size_t) i < size ) {
  87194. - return (size_t) i;
  87195. - } else if (insert && ((size_t) i == size)) {
  87196. - return size;
  87197. - }
  87198. - throw std::out_of_range("index out of range");
  87199. - }
  87200. -
  87201. - template <class Difference>
  87202. - void
  87203. - slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
  87204. - if (step == 0) {
  87205. - throw std::invalid_argument("slice step cannot be zero");
  87206. - } else if (step > 0) {
  87207. - // Required range: 0 <= i < size, 0 <= j < size
  87208. - if (i < 0) {
  87209. - ii = 0;
  87210. - } else if (i < (Difference)size) {
  87211. - ii = i;
  87212. - } else if (insert && (i >= (Difference)size)) {
  87213. - ii = (Difference)size;
  87214. - }
  87215. - if ( j < 0 ) {
  87216. - jj = 0;
  87217. - } else {
  87218. - jj = (j < (Difference)size) ? j : (Difference)size;
  87219. - }
  87220. - } else {
  87221. - // Required range: -1 <= i < size-1, -1 <= j < size-1
  87222. - if (i < -1) {
  87223. - ii = -1;
  87224. - } else if (i < (Difference) size) {
  87225. - ii = i;
  87226. - } else if (i >= (Difference)(size-1)) {
  87227. - ii = (Difference)(size-1);
  87228. - }
  87229. - if (j < -1) {
  87230. - jj = -1;
  87231. - } else {
  87232. - jj = (j < (Difference)size ) ? j : (Difference)(size-1);
  87233. - }
  87234. - }
  87235. - }
  87236. -
  87237. - template <class Sequence, class Difference>
  87238. - inline typename Sequence::iterator
  87239. - getpos(Sequence* self, Difference i) {
  87240. - typename Sequence::iterator pos = self->begin();
  87241. - std::advance(pos, check_index(i,self->size()));
  87242. - return pos;
  87243. - }
  87244. -
  87245. - template <class Sequence, class Difference>
  87246. - inline typename Sequence::const_iterator
  87247. - cgetpos(const Sequence* self, Difference i) {
  87248. - typename Sequence::const_iterator pos = self->begin();
  87249. - std::advance(pos, check_index(i,self->size()));
  87250. - return pos;
  87251. - }
  87252. -
  87253. - template <class Sequence, class Difference>
  87254. - inline Sequence*
  87255. - getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
  87256. - typename Sequence::size_type size = self->size();
  87257. - Difference ii = 0;
  87258. - Difference jj = 0;
  87259. - swig::slice_adjust(i, j, step, size, ii, jj);
  87260. -
  87261. - if (step > 0) {
  87262. - typename Sequence::const_iterator sb = self->begin();
  87263. - typename Sequence::const_iterator se = self->begin();
  87264. - std::advance(sb,ii);
  87265. - std::advance(se,jj);
  87266. - if (step == 1) {
  87267. - return new Sequence(sb, se);
  87268. - } else {
  87269. - Sequence *sequence = new Sequence();
  87270. - typename Sequence::const_iterator it = sb;
  87271. - while (it!=se) {
  87272. - sequence->push_back(*it);
  87273. - for (Py_ssize_t c=0; c<step && it!=se; ++c)
  87274. - it++;
  87275. - }
  87276. - return sequence;
  87277. - }
  87278. - } else {
  87279. - Sequence *sequence = new Sequence();
  87280. - if (ii > jj) {
  87281. - typename Sequence::const_reverse_iterator sb = self->rbegin();
  87282. - typename Sequence::const_reverse_iterator se = self->rbegin();
  87283. - std::advance(sb,size-ii-1);
  87284. - std::advance(se,size-jj-1);
  87285. - typename Sequence::const_reverse_iterator it = sb;
  87286. - while (it!=se) {
  87287. - sequence->push_back(*it);
  87288. - for (Py_ssize_t c=0; c<-step && it!=se; ++c)
  87289. - it++;
  87290. - }
  87291. - }
  87292. - return sequence;
  87293. - }
  87294. - }
  87295. -
  87296. - template <class Sequence, class Difference, class InputSeq>
  87297. - inline void
  87298. - setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
  87299. - typename Sequence::size_type size = self->size();
  87300. - Difference ii = 0;
  87301. - Difference jj = 0;
  87302. - swig::slice_adjust(i, j, step, size, ii, jj, true);
  87303. - if (step > 0) {
  87304. - if (jj < ii)
  87305. - jj = ii;
  87306. - if (step == 1) {
  87307. - size_t ssize = jj - ii;
  87308. - if (ssize <= is.size()) {
  87309. - // expanding/staying the same size
  87310. - typename Sequence::iterator sb = self->begin();
  87311. - typename InputSeq::const_iterator isit = is.begin();
  87312. - std::advance(sb,ii);
  87313. - std::advance(isit, jj - ii);
  87314. - self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
  87315. - } else {
  87316. - // shrinking
  87317. - typename Sequence::iterator sb = self->begin();
  87318. - typename Sequence::iterator se = self->begin();
  87319. - std::advance(sb,ii);
  87320. - std::advance(se,jj);
  87321. - self->erase(sb,se);
  87322. - sb = self->begin();
  87323. - std::advance(sb,ii);
  87324. - self->insert(sb, is.begin(), is.end());
  87325. - }
  87326. - } else {
  87327. - size_t replacecount = (jj - ii + step - 1) / step;
  87328. - if (is.size() != replacecount) {
  87329. - char msg[1024];
  87330. - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
  87331. - throw std::invalid_argument(msg);
  87332. - }
  87333. - typename Sequence::const_iterator isit = is.begin();
  87334. - typename Sequence::iterator it = self->begin();
  87335. - std::advance(it,ii);
  87336. - for (size_t rc=0; rc<replacecount; ++rc) {
  87337. - *it++ = *isit++;
  87338. - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
  87339. - it++;
  87340. - }
  87341. - }
  87342. - } else {
  87343. - if (jj > ii)
  87344. - jj = ii;
  87345. - size_t replacecount = (ii - jj - step - 1) / -step;
  87346. - if (is.size() != replacecount) {
  87347. - char msg[1024];
  87348. - sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
  87349. - throw std::invalid_argument(msg);
  87350. - }
  87351. - typename Sequence::const_iterator isit = is.begin();
  87352. - typename Sequence::reverse_iterator it = self->rbegin();
  87353. - std::advance(it,size-ii-1);
  87354. - for (size_t rc=0; rc<replacecount; ++rc) {
  87355. - *it++ = *isit++;
  87356. - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
  87357. - it++;
  87358. - }
  87359. - }
  87360. - }
  87361. -
  87362. - template <class Sequence, class Difference>
  87363. - inline void
  87364. - delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
  87365. - typename Sequence::size_type size = self->size();
  87366. - Difference ii = 0;
  87367. - Difference jj = 0;
  87368. - swig::slice_adjust(i, j, step, size, ii, jj, true);
  87369. - if (step > 0) {
  87370. - if (jj > ii) {
  87371. - typename Sequence::iterator sb = self->begin();
  87372. - std::advance(sb,ii);
  87373. - if (step == 1) {
  87374. - typename Sequence::iterator se = self->begin();
  87375. - std::advance(se,jj);
  87376. - self->erase(sb,se);
  87377. - } else {
  87378. - typename Sequence::iterator it = sb;
  87379. - size_t delcount = (jj - ii + step - 1) / step;
  87380. - while (delcount) {
  87381. - it = self->erase(it);
  87382. - for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
  87383. - it++;
  87384. - delcount--;
  87385. - }
  87386. - }
  87387. - }
  87388. - } else {
  87389. - if (ii > jj) {
  87390. - typename Sequence::reverse_iterator sb = self->rbegin();
  87391. - std::advance(sb,size-ii-1);
  87392. - typename Sequence::reverse_iterator it = sb;
  87393. - size_t delcount = (ii - jj - step - 1) / -step;
  87394. - while (delcount) {
  87395. - it = typename Sequence::reverse_iterator(self->erase((++it).base()));
  87396. - for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
  87397. - it++;
  87398. - delcount--;
  87399. - }
  87400. - }
  87401. - }
  87402. - }
  87403. -}
  87404. -
  87405. -
  87406. -#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
  87407. -# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
  87408. -# define SWIG_STD_NOITERATOR_TRAITS_STL
  87409. -# endif
  87410. -#endif
  87411. -
  87412. -#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
  87413. -#include <iterator>
  87414. -#else
  87415. -namespace std {
  87416. - template <class Iterator>
  87417. - struct iterator_traits {
  87418. - typedef ptrdiff_t difference_type;
  87419. - typedef typename Iterator::value_type value_type;
  87420. - };
  87421. -
  87422. - template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
  87423. - struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
  87424. - typedef Distance difference_type;
  87425. - typedef T value_type;
  87426. - };
  87427. -
  87428. - template <class T>
  87429. - struct iterator_traits<T*> {
  87430. - typedef T value_type;
  87431. - typedef ptrdiff_t difference_type;
  87432. - };
  87433. -
  87434. - template<typename _InputIterator>
  87435. - inline typename iterator_traits<_InputIterator>::difference_type
  87436. - distance(_InputIterator __first, _InputIterator __last)
  87437. - {
  87438. - typename iterator_traits<_InputIterator>::difference_type __n = 0;
  87439. - while (__first != __last) {
  87440. - ++__first; ++__n;
  87441. - }
  87442. - return __n;
  87443. - }
  87444. -}
  87445. -#endif
  87446. -
  87447. -
  87448. -namespace swig {
  87449. - template<typename OutIterator>
  87450. - class SwigPyIterator_T : public SwigPyIterator
  87451. - {
  87452. - public:
  87453. - typedef OutIterator out_iterator;
  87454. - typedef typename std::iterator_traits<out_iterator>::value_type value_type;
  87455. - typedef SwigPyIterator_T<out_iterator> self_type;
  87456. -
  87457. - SwigPyIterator_T(out_iterator curr, PyObject *seq)
  87458. - : SwigPyIterator(seq), current(curr)
  87459. - {
  87460. - }
  87461. -
  87462. - const out_iterator& get_current() const
  87463. - {
  87464. - return current;
  87465. - }
  87466. -
  87467. -
  87468. - bool equal (const SwigPyIterator &iter) const
  87469. - {
  87470. - const self_type *iters = dynamic_cast<const self_type *>(&iter);
  87471. - if (iters) {
  87472. - return (current == iters->get_current());
  87473. - } else {
  87474. - throw std::invalid_argument("bad iterator type");
  87475. - }
  87476. - }
  87477. -
  87478. - ptrdiff_t distance(const SwigPyIterator &iter) const
  87479. - {
  87480. - const self_type *iters = dynamic_cast<const self_type *>(&iter);
  87481. - if (iters) {
  87482. - return std::distance(current, iters->get_current());
  87483. - } else {
  87484. - throw std::invalid_argument("bad iterator type");
  87485. - }
  87486. - }
  87487. -
  87488. - protected:
  87489. - out_iterator current;
  87490. - };
  87491. -
  87492. - template <class ValueType>
  87493. - struct from_oper
  87494. - {
  87495. - typedef const ValueType& argument_type;
  87496. - typedef PyObject *result_type;
  87497. - result_type operator()(argument_type v) const
  87498. - {
  87499. - return swig::from(v);
  87500. - }
  87501. - };
  87502. -
  87503. - template<typename OutIterator,
  87504. - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
  87505. - typename FromOper = from_oper<ValueType> >
  87506. - class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
  87507. - {
  87508. - public:
  87509. - FromOper from;
  87510. - typedef OutIterator out_iterator;
  87511. - typedef ValueType value_type;
  87512. - typedef SwigPyIterator_T<out_iterator> base;
  87513. - typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
  87514. -
  87515. - SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
  87516. - : SwigPyIterator_T<OutIterator>(curr, seq)
  87517. - {
  87518. - }
  87519. -
  87520. - PyObject *value() const {
  87521. - return from(static_cast<const value_type&>(*(base::current)));
  87522. - }
  87523. -
  87524. - SwigPyIterator *copy() const
  87525. - {
  87526. - return new self_type(*this);
  87527. - }
  87528. -
  87529. - SwigPyIterator *incr(size_t n = 1)
  87530. - {
  87531. - while (n--) {
  87532. - ++base::current;
  87533. - }
  87534. - return this;
  87535. - }
  87536. -
  87537. - SwigPyIterator *decr(size_t n = 1)
  87538. - {
  87539. - while (n--) {
  87540. - --base::current;
  87541. - }
  87542. - return this;
  87543. - }
  87544. - };
  87545. -
  87546. - template<typename OutIterator,
  87547. - typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
  87548. - typename FromOper = from_oper<ValueType> >
  87549. - class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator>
  87550. - {
  87551. - public:
  87552. - FromOper from;
  87553. - typedef OutIterator out_iterator;
  87554. - typedef ValueType value_type;
  87555. - typedef SwigPyIterator_T<out_iterator> base;
  87556. - typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
  87557. -
  87558. - SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
  87559. - : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
  87560. - {
  87561. - }
  87562. -
  87563. - PyObject *value() const {
  87564. - if (base::current == end) {
  87565. - throw stop_iteration();
  87566. - } else {
  87567. - return from(static_cast<const value_type&>(*(base::current)));
  87568. - }
  87569. - }
  87570. -
  87571. - SwigPyIterator *copy() const
  87572. - {
  87573. - return new self_type(*this);
  87574. - }
  87575. -
  87576. - SwigPyIterator *incr(size_t n = 1)
  87577. - {
  87578. - while (n--) {
  87579. - if (base::current == end) {
  87580. - throw stop_iteration();
  87581. - } else {
  87582. - ++base::current;
  87583. - }
  87584. - }
  87585. - return this;
  87586. - }
  87587. -
  87588. - SwigPyIterator *decr(size_t n = 1)
  87589. - {
  87590. - while (n--) {
  87591. - if (base::current == begin) {
  87592. - throw stop_iteration();
  87593. - } else {
  87594. - --base::current;
  87595. - }
  87596. - }
  87597. - return this;
  87598. - }
  87599. -
  87600. - private:
  87601. - out_iterator begin;
  87602. - out_iterator end;
  87603. - };
  87604. -
  87605. - template<typename OutIter>
  87606. - inline SwigPyIterator*
  87607. - make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
  87608. - {
  87609. - return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
  87610. - }
  87611. -
  87612. - template<typename OutIter>
  87613. - inline SwigPyIterator*
  87614. - make_output_iterator(const OutIter& current, PyObject *seq = 0)
  87615. - {
  87616. - return new SwigPyIteratorOpen_T<OutIter>(current, seq);
  87617. - }
  87618. -
  87619. -}
  87620. -
  87621. -
  87622. -namespace swig
  87623. -{
  87624. - template <class T>
  87625. - struct SwigPySequence_Ref
  87626. - {
  87627. - SwigPySequence_Ref(PyObject* seq, int index)
  87628. - : _seq(seq), _index(index)
  87629. - {
  87630. - }
  87631. -
  87632. - operator T () const
  87633. - {
  87634. - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
  87635. - try {
  87636. - return swig::as<T>(item, true);
  87637. - } catch (std::exception& e) {
  87638. - char msg[1024];
  87639. - sprintf(msg, "in sequence element %d ", _index);
  87640. - if (!PyErr_Occurred()) {
  87641. - ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
  87642. - }
  87643. - SWIG_Python_AddErrorMsg(msg);
  87644. - SWIG_Python_AddErrorMsg(e.what());
  87645. - throw;
  87646. - }
  87647. - }
  87648. -
  87649. - SwigPySequence_Ref& operator=(const T& v)
  87650. - {
  87651. - PySequence_SetItem(_seq, _index, swig::from<T>(v));
  87652. - return *this;
  87653. - }
  87654. -
  87655. - private:
  87656. - PyObject* _seq;
  87657. - int _index;
  87658. - };
  87659. -
  87660. - template <class T>
  87661. - struct SwigPySequence_ArrowProxy
  87662. - {
  87663. - SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
  87664. - const T* operator->() const { return &m_value; }
  87665. - operator const T*() const { return &m_value; }
  87666. - T m_value;
  87667. - };
  87668. -
  87669. - template <class T, class Reference >
  87670. - struct SwigPySequence_InputIterator
  87671. - {
  87672. - typedef SwigPySequence_InputIterator<T, Reference > self;
  87673. -
  87674. - typedef std::random_access_iterator_tag iterator_category;
  87675. - typedef Reference reference;
  87676. - typedef T value_type;
  87677. - typedef T* pointer;
  87678. - typedef int difference_type;
  87679. -
  87680. - SwigPySequence_InputIterator()
  87681. - {
  87682. - }
  87683. -
  87684. - SwigPySequence_InputIterator(PyObject* seq, int index)
  87685. - : _seq(seq), _index(index)
  87686. - {
  87687. - }
  87688. -
  87689. - reference operator*() const
  87690. - {
  87691. - return reference(_seq, _index);
  87692. - }
  87693. -
  87694. - SwigPySequence_ArrowProxy<T>
  87695. - operator->() const {
  87696. - return SwigPySequence_ArrowProxy<T>(operator*());
  87697. - }
  87698. -
  87699. - bool operator==(const self& ri) const
  87700. - {
  87701. - return (_index == ri._index) && (_seq == ri._seq);
  87702. - }
  87703. -
  87704. - bool operator!=(const self& ri) const
  87705. - {
  87706. - return !(operator==(ri));
  87707. - }
  87708. -
  87709. - self& operator ++ ()
  87710. - {
  87711. - ++_index;
  87712. - return *this;
  87713. - }
  87714. -
  87715. - self& operator -- ()
  87716. - {
  87717. - --_index;
  87718. - return *this;
  87719. - }
  87720. -
  87721. - self& operator += (difference_type n)
  87722. - {
  87723. - _index += n;
  87724. - return *this;
  87725. - }
  87726. -
  87727. - self operator +(difference_type n) const
  87728. - {
  87729. - return self(_seq, _index + n);
  87730. - }
  87731. -
  87732. - self& operator -= (difference_type n)
  87733. - {
  87734. - _index -= n;
  87735. - return *this;
  87736. - }
  87737. -
  87738. - self operator -(difference_type n) const
  87739. - {
  87740. - return self(_seq, _index - n);
  87741. - }
  87742. -
  87743. - difference_type operator - (const self& ri) const
  87744. - {
  87745. - return _index - ri._index;
  87746. - }
  87747. -
  87748. - bool operator < (const self& ri) const
  87749. - {
  87750. - return _index < ri._index;
  87751. - }
  87752. -
  87753. - reference
  87754. - operator[](difference_type n) const
  87755. - {
  87756. - return reference(_seq, _index + n);
  87757. - }
  87758. -
  87759. - private:
  87760. - PyObject* _seq;
  87761. - difference_type _index;
  87762. - };
  87763. -
  87764. - template <class T>
  87765. - struct SwigPySequence_Cont
  87766. - {
  87767. - typedef SwigPySequence_Ref<T> reference;
  87768. - typedef const SwigPySequence_Ref<T> const_reference;
  87769. - typedef T value_type;
  87770. - typedef T* pointer;
  87771. - typedef int difference_type;
  87772. - typedef int size_type;
  87773. - typedef const pointer const_pointer;
  87774. - typedef SwigPySequence_InputIterator<T, reference> iterator;
  87775. - typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;
  87776. -
  87777. - SwigPySequence_Cont(PyObject* seq) : _seq(0)
  87778. - {
  87779. - if (!PySequence_Check(seq)) {
  87780. - throw std::invalid_argument("a sequence is expected");
  87781. - }
  87782. - _seq = seq;
  87783. - Py_INCREF(_seq);
  87784. - }
  87785. -
  87786. - ~SwigPySequence_Cont()
  87787. - {
  87788. - Py_XDECREF(_seq);
  87789. - }
  87790. -
  87791. - size_type size() const
  87792. - {
  87793. - return static_cast<size_type>(PySequence_Size(_seq));
  87794. - }
  87795. -
  87796. - bool empty() const
  87797. - {
  87798. - return size() == 0;
  87799. - }
  87800. -
  87801. - iterator begin()
  87802. - {
  87803. - return iterator(_seq, 0);
  87804. - }
  87805. -
  87806. - const_iterator begin() const
  87807. - {
  87808. - return const_iterator(_seq, 0);
  87809. - }
  87810. -
  87811. - iterator end()
  87812. - {
  87813. - return iterator(_seq, size());
  87814. - }
  87815. -
  87816. - const_iterator end() const
  87817. - {
  87818. - return const_iterator(_seq, size());
  87819. - }
  87820. -
  87821. - reference operator[](difference_type n)
  87822. - {
  87823. - return reference(_seq, n);
  87824. - }
  87825. -
  87826. - const_reference operator[](difference_type n) const
  87827. - {
  87828. - return const_reference(_seq, n);
  87829. - }
  87830. -
  87831. - bool check(bool set_err = true) const
  87832. - {
  87833. - int s = size();
  87834. - for (int i = 0; i < s; ++i) {
  87835. - swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
  87836. - if (!swig::check<value_type>(item)) {
  87837. - if (set_err) {
  87838. - char msg[1024];
  87839. - sprintf(msg, "in sequence element %d", i);
  87840. - SWIG_Error(SWIG_RuntimeError, msg);
  87841. - }
  87842. - return false;
  87843. - }
  87844. - }
  87845. - return true;
  87846. - }
  87847. -
  87848. - private:
  87849. - PyObject* _seq;
  87850. - };
  87851. -
  87852. -}
  87853. -
  87854. -
  87855. -SWIGINTERNINLINE PyObject*
  87856. - SWIG_From_int (int value)
  87857. -{
  87858. - return PyInt_FromLong((long) value);
  87859. -}
  87860. -
  87861. -
  87862. -SWIGINTERN swig_type_info*
  87863. -SWIG_pchar_descriptor(void)
  87864. -{
  87865. - static int init = 0;
  87866. - static swig_type_info* info = 0;
  87867. - if (!init) {
  87868. - info = SWIG_TypeQuery("_p_char");
  87869. - init = 1;
  87870. - }
  87871. - return info;
  87872. -}
  87873. -
  87874. -
  87875. -SWIGINTERNINLINE PyObject *
  87876. -SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  87877. -{
  87878. - if (carray) {
  87879. - if (size > INT_MAX) {
  87880. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  87881. - return pchar_descriptor ?
  87882. - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
  87883. - } else {
  87884. -#if PY_VERSION_HEX >= 0x03000000
  87885. - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
  87886. -#else
  87887. - return PyString_FromStringAndSize(carray, static_cast< int >(size));
  87888. -#endif
  87889. - }
  87890. - } else {
  87891. - return SWIG_Py_Void();
  87892. - }
  87893. -}
  87894. -
  87895. -
  87896. -SWIGINTERNINLINE PyObject *
  87897. -SWIG_FromCharPtr(const char *cptr)
  87898. -{
  87899. - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  87900. -}
  87901. -
  87902. -
  87903. -#include <limits.h>
  87904. -#if !defined(SWIG_NO_LLONG_MAX)
  87905. -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  87906. -# define LLONG_MAX __LONG_LONG_MAX__
  87907. -# define LLONG_MIN (-LLONG_MAX - 1LL)
  87908. -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  87909. -# endif
  87910. -#endif
  87911. -
  87912. -
  87913. -SWIGINTERN int
  87914. -SWIG_AsVal_double (PyObject *obj, double *val)
  87915. -{
  87916. - int res = SWIG_TypeError;
  87917. - if (PyFloat_Check(obj)) {
  87918. - if (val) *val = PyFloat_AsDouble(obj);
  87919. - return SWIG_OK;
  87920. - } else if (PyInt_Check(obj)) {
  87921. - if (val) *val = PyInt_AsLong(obj);
  87922. - return SWIG_OK;
  87923. - } else if (PyLong_Check(obj)) {
  87924. - double v = PyLong_AsDouble(obj);
  87925. - if (!PyErr_Occurred()) {
  87926. - if (val) *val = v;
  87927. - return SWIG_OK;
  87928. - } else {
  87929. - PyErr_Clear();
  87930. - }
  87931. - }
  87932. -#ifdef SWIG_PYTHON_CAST_MODE
  87933. - {
  87934. - int dispatch = 0;
  87935. - double d = PyFloat_AsDouble(obj);
  87936. - if (!PyErr_Occurred()) {
  87937. - if (val) *val = d;
  87938. - return SWIG_AddCast(SWIG_OK);
  87939. - } else {
  87940. - PyErr_Clear();
  87941. - }
  87942. - if (!dispatch) {
  87943. - long v = PyLong_AsLong(obj);
  87944. - if (!PyErr_Occurred()) {
  87945. - if (val) *val = v;
  87946. - return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
  87947. - } else {
  87948. - PyErr_Clear();
  87949. - }
  87950. - }
  87951. - }
  87952. -#endif
  87953. - return res;
  87954. -}
  87955. -
  87956. -
  87957. -#include <float.h>
  87958. -
  87959. -
  87960. -#include <math.h>
  87961. -
  87962. -
  87963. -SWIGINTERNINLINE int
  87964. -SWIG_CanCastAsInteger(double *d, double min, double max) {
  87965. - double x = *d;
  87966. - if ((min <= x && x <= max)) {
  87967. - double fx = floor(x);
  87968. - double cx = ceil(x);
  87969. - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  87970. - if ((errno == EDOM) || (errno == ERANGE)) {
  87971. - errno = 0;
  87972. - } else {
  87973. - double summ, reps, diff;
  87974. - if (rd < x) {
  87975. - diff = x - rd;
  87976. - } else if (rd > x) {
  87977. - diff = rd - x;
  87978. - } else {
  87979. - return 1;
  87980. - }
  87981. - summ = rd + x;
  87982. - reps = diff/summ;
  87983. - if (reps < 8*DBL_EPSILON) {
  87984. - *d = rd;
  87985. - return 1;
  87986. - }
  87987. - }
  87988. - }
  87989. - return 0;
  87990. -}
  87991. -
  87992. -
  87993. -SWIGINTERN int
  87994. -SWIG_AsVal_long (PyObject *obj, long* val)
  87995. -{
  87996. - if (PyInt_Check(obj)) {
  87997. - if (val) *val = PyInt_AsLong(obj);
  87998. - return SWIG_OK;
  87999. - } else if (PyLong_Check(obj)) {
  88000. - long v = PyLong_AsLong(obj);
  88001. - if (!PyErr_Occurred()) {
  88002. - if (val) *val = v;
  88003. - return SWIG_OK;
  88004. - } else {
  88005. - PyErr_Clear();
  88006. - }
  88007. - }
  88008. -#ifdef SWIG_PYTHON_CAST_MODE
  88009. - {
  88010. - int dispatch = 0;
  88011. - long v = PyInt_AsLong(obj);
  88012. - if (!PyErr_Occurred()) {
  88013. - if (val) *val = v;
  88014. - return SWIG_AddCast(SWIG_OK);
  88015. - } else {
  88016. - PyErr_Clear();
  88017. - }
  88018. - if (!dispatch) {
  88019. - double d;
  88020. - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  88021. - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  88022. - if (val) *val = (long)(d);
  88023. - return res;
  88024. - }
  88025. - }
  88026. - }
  88027. -#endif
  88028. - return SWIG_TypeError;
  88029. -}
  88030. -
  88031. -
  88032. -SWIGINTERN int
  88033. -SWIG_AsVal_int (PyObject * obj, int *val)
  88034. -{
  88035. - long v;
  88036. - int res = SWIG_AsVal_long (obj, &v);
  88037. - if (SWIG_IsOK(res)) {
  88038. - if ((v < INT_MIN || v > INT_MAX)) {
  88039. - return SWIG_OverflowError;
  88040. - } else {
  88041. - if (val) *val = static_cast< int >(v);
  88042. - }
  88043. - }
  88044. - return res;
  88045. -}
  88046. -
  88047. -
  88048. -namespace swig {
  88049. - template <> struct traits<int > {
  88050. - typedef value_category category;
  88051. - static const char* type_name() { return"int"; }
  88052. - };
  88053. - template <> struct traits_asval<int > {
  88054. - typedef int value_type;
  88055. - static int asval(PyObject *obj, value_type *val) {
  88056. - return SWIG_AsVal_int (obj, val);
  88057. - }
  88058. - };
  88059. - template <> struct traits_from<int > {
  88060. - typedef int value_type;
  88061. - static PyObject *from(const value_type& val) {
  88062. - return SWIG_From_int (val);
  88063. - }
  88064. - };
  88065. -}
  88066. -
  88067. -
  88068. -namespace swig {
  88069. - template <class SwigPySeq, class Seq>
  88070. - inline void
  88071. - assign(const SwigPySeq& swigpyseq, Seq* seq) {
  88072. - // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
  88073. - typedef typename SwigPySeq::value_type value_type;
  88074. - typename SwigPySeq::const_iterator it = swigpyseq.begin();
  88075. - for (;it != swigpyseq.end(); ++it) {
  88076. - seq->insert(seq->end(),(value_type)(*it));
  88077. - }
  88078. - }
  88079. -
  88080. - template <class Seq, class T = typename Seq::value_type >
  88081. - struct traits_asptr_stdseq {
  88082. - typedef Seq sequence;
  88083. - typedef T value_type;
  88084. -
  88085. - static int asptr(PyObject *obj, sequence **seq) {
  88086. - if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
  88087. - sequence *p;
  88088. - if (::SWIG_ConvertPtr(obj,(void**)&p,
  88089. - swig::type_info<sequence>(),0) == SWIG_OK) {
  88090. - if (seq) *seq = p;
  88091. - return SWIG_OLDOBJ;
  88092. - }
  88093. - } else if (PySequence_Check(obj)) {
  88094. - try {
  88095. - SwigPySequence_Cont<value_type> swigpyseq(obj);
  88096. - if (seq) {
  88097. - sequence *pseq = new sequence();
  88098. - assign(swigpyseq, pseq);
  88099. - *seq = pseq;
  88100. - return SWIG_NEWOBJ;
  88101. - } else {
  88102. - return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
  88103. - }
  88104. - } catch (std::exception& e) {
  88105. - if (seq) {
  88106. - if (!PyErr_Occurred()) {
  88107. - PyErr_SetString(PyExc_TypeError, e.what());
  88108. - }
  88109. - }
  88110. - return SWIG_ERROR;
  88111. - }
  88112. - }
  88113. - return SWIG_ERROR;
  88114. - }
  88115. - };
  88116. -
  88117. - template <class Seq, class T = typename Seq::value_type >
  88118. - struct traits_from_stdseq {
  88119. - typedef Seq sequence;
  88120. - typedef T value_type;
  88121. - typedef typename Seq::size_type size_type;
  88122. - typedef typename sequence::const_iterator const_iterator;
  88123. -
  88124. - static PyObject *from(const sequence& seq) {
  88125. -#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
  88126. - swig_type_info *desc = swig::type_info<sequence>();
  88127. - if (desc && desc->clientdata) {
  88128. - return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
  88129. - }
  88130. -#endif
  88131. - size_type size = seq.size();
  88132. - if (size <= (size_type)INT_MAX) {
  88133. - PyObject *obj = PyTuple_New((int)size);
  88134. - int i = 0;
  88135. - for (const_iterator it = seq.begin();
  88136. - it != seq.end(); ++it, ++i) {
  88137. - PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
  88138. - }
  88139. - return obj;
  88140. - } else {
  88141. - PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
  88142. - return NULL;
  88143. - }
  88144. - }
  88145. - };
  88146. -}
  88147. -
  88148. -
  88149. - namespace swig {
  88150. - template <class T>
  88151. - struct traits_asptr<std::vector<T> > {
  88152. - static int asptr(PyObject *obj, std::vector<T> **vec) {
  88153. - return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
  88154. - }
  88155. - };
  88156. -
  88157. - template <class T>
  88158. - struct traits_from<std::vector<T> > {
  88159. - static PyObject *from(const std::vector<T>& vec) {
  88160. - return traits_from_stdseq<std::vector<T> >::from(vec);
  88161. - }
  88162. - };
  88163. - }
  88164. -
  88165. -
  88166. - namespace swig {
  88167. - template <> struct traits<std::vector<int, std::allocator< int > > > {
  88168. - typedef pointer_category category;
  88169. - static const char* type_name() {
  88170. - return "std::vector<" "int" "," "std::allocator< int >" " >";
  88171. - }
  88172. - };
  88173. - }
  88174. -
  88175. -
  88176. -SWIGINTERN int
  88177. -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  88178. -{
  88179. -#if PY_VERSION_HEX>=0x03000000
  88180. - if (PyUnicode_Check(obj))
  88181. -#else
  88182. - if (PyString_Check(obj))
  88183. -#endif
  88184. - {
  88185. - char *cstr; Py_ssize_t len;
  88186. -#if PY_VERSION_HEX>=0x03000000
  88187. - if (!alloc && cptr) {
  88188. - /* We can't allow converting without allocation, since the internal
  88189. - representation of string in Python 3 is UCS-2/UCS-4 but we require
  88190. - a UTF-8 representation.
  88191. - TODO(bhy) More detailed explanation */
  88192. - return SWIG_RuntimeError;
  88193. - }
  88194. - obj = PyUnicode_AsUTF8String(obj);
  88195. - PyBytes_AsStringAndSize(obj, &cstr, &len);
  88196. - if(alloc) *alloc = SWIG_NEWOBJ;
  88197. -#else
  88198. - PyString_AsStringAndSize(obj, &cstr, &len);
  88199. -#endif
  88200. - if (cptr) {
  88201. - if (alloc) {
  88202. - /*
  88203. - In python the user should not be able to modify the inner
  88204. - string representation. To warranty that, if you define
  88205. - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
  88206. - buffer is always returned.
  88207. -
  88208. - The default behavior is just to return the pointer value,
  88209. - so, be careful.
  88210. - */
  88211. -#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
  88212. - if (*alloc != SWIG_OLDOBJ)
  88213. -#else
  88214. - if (*alloc == SWIG_NEWOBJ)
  88215. -#endif
  88216. - {
  88217. - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
  88218. - *alloc = SWIG_NEWOBJ;
  88219. - }
  88220. - else {
  88221. - *cptr = cstr;
  88222. - *alloc = SWIG_OLDOBJ;
  88223. - }
  88224. - } else {
  88225. - #if PY_VERSION_HEX>=0x03000000
  88226. - assert(0); /* Should never reach here in Python 3 */
  88227. - #endif
  88228. - *cptr = SWIG_Python_str_AsChar(obj);
  88229. - }
  88230. - }
  88231. - if (psize) *psize = len + 1;
  88232. -#if PY_VERSION_HEX>=0x03000000
  88233. - Py_XDECREF(obj);
  88234. -#endif
  88235. - return SWIG_OK;
  88236. - } else {
  88237. - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  88238. - if (pchar_descriptor) {
  88239. - void* vptr = 0;
  88240. - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  88241. - if (cptr) *cptr = (char *) vptr;
  88242. - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  88243. - if (alloc) *alloc = SWIG_OLDOBJ;
  88244. - return SWIG_OK;
  88245. - }
  88246. - }
  88247. - }
  88248. - return SWIG_TypeError;
  88249. -}
  88250. -
  88251. -
  88252. -
  88253. -
  88254. -
  88255. - #define SWIG_From_double PyFloat_FromDouble
  88256. -
  88257. -
  88258. -namespace swig {
  88259. - template <> struct traits<double > {
  88260. - typedef value_category category;
  88261. - static const char* type_name() { return"double"; }
  88262. - };
  88263. - template <> struct traits_asval<double > {
  88264. - typedef double value_type;
  88265. - static int asval(PyObject *obj, value_type *val) {
  88266. - return SWIG_AsVal_double (obj, val);
  88267. - }
  88268. - };
  88269. - template <> struct traits_from<double > {
  88270. - typedef double value_type;
  88271. - static PyObject *from(const value_type& val) {
  88272. - return SWIG_From_double (val);
  88273. - }
  88274. - };
  88275. -}
  88276. -
  88277. -
  88278. - namespace swig {
  88279. - template <> struct traits<std::vector<double, std::allocator< double > > > {
  88280. - typedef pointer_category category;
  88281. - static const char* type_name() {
  88282. - return "std::vector<" "double" "," "std::allocator< double >" " >";
  88283. - }
  88284. - };
  88285. - }
  88286. -
  88287. -#ifdef __cplusplus
  88288. -extern "C" {
  88289. -#endif
  88290. -SWIGINTERN PyObject *_wrap_new_VMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88291. - PyObject *resultobj = 0;
  88292. - vips::VMask *result = 0 ;
  88293. -
  88294. - if (!PyArg_ParseTuple(args,(char *)":new_VMask")) SWIG_fail;
  88295. - result = (vips::VMask *)new vips::VMask();
  88296. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 );
  88297. - return resultobj;
  88298. -fail:
  88299. - return NULL;
  88300. -}
  88301. -
  88302. -
  88303. -SWIGINTERN PyObject *_wrap_new_VMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88304. - PyObject *resultobj = 0;
  88305. - vips::VMask *arg1 = 0 ;
  88306. - void *argp1 = 0 ;
  88307. - int res1 = 0 ;
  88308. - PyObject * obj0 = 0 ;
  88309. - vips::VMask *result = 0 ;
  88310. -
  88311. - if (!PyArg_ParseTuple(args,(char *)"O:new_VMask",&obj0)) SWIG_fail;
  88312. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VMask, 0 | 0);
  88313. - if (!SWIG_IsOK(res1)) {
  88314. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'");
  88315. - }
  88316. - if (!argp1) {
  88317. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'");
  88318. - }
  88319. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88320. - result = (vips::VMask *)new vips::VMask((vips::VMask const &)*arg1);
  88321. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 );
  88322. - return resultobj;
  88323. -fail:
  88324. - return NULL;
  88325. -}
  88326. -
  88327. -
  88328. -SWIGINTERN PyObject *_wrap_new_VMask(PyObject *self, PyObject *args) {
  88329. - int argc;
  88330. - PyObject *argv[2];
  88331. - int ii;
  88332. -
  88333. - if (!PyTuple_Check(args)) SWIG_fail;
  88334. - argc = args ? (int)PyObject_Length(args) : 0;
  88335. - for (ii = 0; (ii < 1) && (ii < argc); ii++) {
  88336. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  88337. - }
  88338. - if (argc == 0) {
  88339. - return _wrap_new_VMask__SWIG_0(self, args);
  88340. - }
  88341. - if (argc == 1) {
  88342. - int _v;
  88343. - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VMask, 0);
  88344. - _v = SWIG_CheckState(res);
  88345. - if (_v) {
  88346. - return _wrap_new_VMask__SWIG_1(self, args);
  88347. - }
  88348. - }
  88349. -
  88350. -fail:
  88351. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VMask'.\n"
  88352. - " Possible C/C++ prototypes are:\n"
  88353. - " vips::VMask::VMask()\n"
  88354. - " vips::VMask::VMask(vips::VMask const &)\n");
  88355. - return 0;
  88356. -}
  88357. -
  88358. -
  88359. -SWIGINTERN PyObject *_wrap_VMask___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88360. - PyObject *resultobj = 0;
  88361. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88362. - vips::VMask *arg2 = 0 ;
  88363. - void *argp1 = 0 ;
  88364. - int res1 = 0 ;
  88365. - void *argp2 = 0 ;
  88366. - int res2 = 0 ;
  88367. - PyObject * obj0 = 0 ;
  88368. - PyObject * obj1 = 0 ;
  88369. - vips::VMask *result = 0 ;
  88370. -
  88371. - if (!PyArg_ParseTuple(args,(char *)"OO:VMask___assign__",&obj0,&obj1)) SWIG_fail;
  88372. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88373. - if (!SWIG_IsOK(res1)) {
  88374. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask___assign__" "', argument " "1"" of type '" "vips::VMask *""'");
  88375. - }
  88376. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88377. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0);
  88378. - if (!SWIG_IsOK(res2)) {
  88379. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'");
  88380. - }
  88381. - if (!argp2) {
  88382. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'");
  88383. - }
  88384. - arg2 = reinterpret_cast< vips::VMask * >(argp2);
  88385. - result = (vips::VMask *) &(arg1)->operator =((vips::VMask const &)*arg2);
  88386. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, 0 | 0 );
  88387. - return resultobj;
  88388. -fail:
  88389. - return NULL;
  88390. -}
  88391. -
  88392. -
  88393. -SWIGINTERN PyObject *_wrap_delete_VMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88394. - PyObject *resultobj = 0;
  88395. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88396. - void *argp1 = 0 ;
  88397. - int res1 = 0 ;
  88398. - PyObject * obj0 = 0 ;
  88399. -
  88400. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VMask",&obj0)) SWIG_fail;
  88401. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, SWIG_POINTER_DISOWN | 0 );
  88402. - if (!SWIG_IsOK(res1)) {
  88403. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VMask" "', argument " "1"" of type '" "vips::VMask *""'");
  88404. - }
  88405. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88406. - delete arg1;
  88407. - resultobj = SWIG_Py_Void();
  88408. - return resultobj;
  88409. -fail:
  88410. - return NULL;
  88411. -}
  88412. -
  88413. -
  88414. -SWIGINTERN PyObject *_wrap_VMask_xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88415. - PyObject *resultobj = 0;
  88416. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88417. - void *argp1 = 0 ;
  88418. - int res1 = 0 ;
  88419. - PyObject * obj0 = 0 ;
  88420. - int result;
  88421. -
  88422. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_xsize",&obj0)) SWIG_fail;
  88423. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88424. - if (!SWIG_IsOK(res1)) {
  88425. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_xsize" "', argument " "1"" of type '" "vips::VMask const *""'");
  88426. - }
  88427. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88428. - try {
  88429. - result = (int)((vips::VMask const *)arg1)->xsize();
  88430. - }
  88431. - catch(vips::VError &_e) {
  88432. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88433. - }
  88434. -
  88435. - resultobj = SWIG_From_int(static_cast< int >(result));
  88436. - return resultobj;
  88437. -fail:
  88438. - return NULL;
  88439. -}
  88440. -
  88441. -
  88442. -SWIGINTERN PyObject *_wrap_VMask_ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88443. - PyObject *resultobj = 0;
  88444. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88445. - void *argp1 = 0 ;
  88446. - int res1 = 0 ;
  88447. - PyObject * obj0 = 0 ;
  88448. - int result;
  88449. -
  88450. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_ysize",&obj0)) SWIG_fail;
  88451. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88452. - if (!SWIG_IsOK(res1)) {
  88453. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ysize" "', argument " "1"" of type '" "vips::VMask const *""'");
  88454. - }
  88455. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88456. - try {
  88457. - result = (int)((vips::VMask const *)arg1)->ysize();
  88458. - }
  88459. - catch(vips::VError &_e) {
  88460. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88461. - }
  88462. -
  88463. - resultobj = SWIG_From_int(static_cast< int >(result));
  88464. - return resultobj;
  88465. -fail:
  88466. - return NULL;
  88467. -}
  88468. -
  88469. -
  88470. -SWIGINTERN PyObject *_wrap_VMask_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88471. - PyObject *resultobj = 0;
  88472. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88473. - void *argp1 = 0 ;
  88474. - int res1 = 0 ;
  88475. - PyObject * obj0 = 0 ;
  88476. - int result;
  88477. -
  88478. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_size",&obj0)) SWIG_fail;
  88479. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88480. - if (!SWIG_IsOK(res1)) {
  88481. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_size" "', argument " "1"" of type '" "vips::VMask const *""'");
  88482. - }
  88483. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88484. - try {
  88485. - result = (int)((vips::VMask const *)arg1)->size();
  88486. - }
  88487. - catch(vips::VError &_e) {
  88488. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88489. - }
  88490. -
  88491. - resultobj = SWIG_From_int(static_cast< int >(result));
  88492. - return resultobj;
  88493. -fail:
  88494. - return NULL;
  88495. -}
  88496. -
  88497. -
  88498. -SWIGINTERN PyObject *_wrap_VMask_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88499. - PyObject *resultobj = 0;
  88500. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88501. - void *argp1 = 0 ;
  88502. - int res1 = 0 ;
  88503. - PyObject * obj0 = 0 ;
  88504. - char *result = 0 ;
  88505. -
  88506. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_filename",&obj0)) SWIG_fail;
  88507. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88508. - if (!SWIG_IsOK(res1)) {
  88509. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_filename" "', argument " "1"" of type '" "vips::VMask const *""'");
  88510. - }
  88511. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88512. - try {
  88513. - result = (char *)((vips::VMask const *)arg1)->filename();
  88514. - }
  88515. - catch(vips::VError &_e) {
  88516. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88517. - }
  88518. -
  88519. - resultobj = SWIG_FromCharPtr((const char *)result);
  88520. - return resultobj;
  88521. -fail:
  88522. - return NULL;
  88523. -}
  88524. -
  88525. -
  88526. -SWIGINTERN PyObject *_wrap_VMask_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88527. - PyObject *resultobj = 0;
  88528. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88529. - void *argp1 = 0 ;
  88530. - int res1 = 0 ;
  88531. - PyObject * obj0 = 0 ;
  88532. - _private_detail::VPMask::VMaskType result;
  88533. -
  88534. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_type",&obj0)) SWIG_fail;
  88535. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88536. - if (!SWIG_IsOK(res1)) {
  88537. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_type" "', argument " "1"" of type '" "vips::VMask const *""'");
  88538. - }
  88539. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88540. - result = ((vips::VMask const *)arg1)->type();
  88541. - resultobj = SWIG_NewPointerObj((new _private_detail::VPMask::VMaskType(static_cast< const _private_detail::VPMask::VMaskType& >(result))), SWIGTYPE_p__private_detail__VPMask__VMaskType, SWIG_POINTER_OWN | 0 );
  88542. - return resultobj;
  88543. -fail:
  88544. - return NULL;
  88545. -}
  88546. -
  88547. -
  88548. -SWIGINTERN PyObject *_wrap_VMask_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88549. - PyObject *resultobj = 0;
  88550. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88551. - void *argp1 = 0 ;
  88552. - int res1 = 0 ;
  88553. - PyObject * obj0 = 0 ;
  88554. - _private_detail::MASKUNION result;
  88555. -
  88556. - if (!PyArg_ParseTuple(args,(char *)"O:VMask_mask",&obj0)) SWIG_fail;
  88557. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88558. - if (!SWIG_IsOK(res1)) {
  88559. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_mask" "', argument " "1"" of type '" "vips::VMask const *""'");
  88560. - }
  88561. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88562. - result = ((vips::VMask const *)arg1)->mask();
  88563. - resultobj = SWIG_NewPointerObj((new _private_detail::MASKUNION(static_cast< const _private_detail::MASKUNION& >(result))), SWIGTYPE_p__private_detail__MASKUNION, SWIG_POINTER_OWN | 0 );
  88564. - return resultobj;
  88565. -fail:
  88566. - return NULL;
  88567. -}
  88568. -
  88569. -
  88570. -SWIGINTERN PyObject *_wrap_VMask_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88571. - PyObject *resultobj = 0;
  88572. - vips::VMask *arg1 = (vips::VMask *) 0 ;
  88573. - std::ostream *arg2 = 0 ;
  88574. - void *argp1 = 0 ;
  88575. - int res1 = 0 ;
  88576. - void *argp2 = 0 ;
  88577. - int res2 = 0 ;
  88578. - PyObject * obj0 = 0 ;
  88579. - PyObject * obj1 = 0 ;
  88580. -
  88581. - if (!PyArg_ParseTuple(args,(char *)"OO:VMask_ostream_print",&obj0,&obj1)) SWIG_fail;
  88582. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 );
  88583. - if (!SWIG_IsOK(res1)) {
  88584. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ostream_print" "', argument " "1"" of type '" "vips::VMask const *""'");
  88585. - }
  88586. - arg1 = reinterpret_cast< vips::VMask * >(argp1);
  88587. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 );
  88588. - if (!SWIG_IsOK(res2)) {
  88589. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
  88590. - }
  88591. - if (!argp2) {
  88592. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'");
  88593. - }
  88594. - arg2 = reinterpret_cast< std::ostream * >(argp2);
  88595. - ((vips::VMask const *)arg1)->ostream_print(*arg2);
  88596. - resultobj = SWIG_Py_Void();
  88597. - return resultobj;
  88598. -fail:
  88599. - return NULL;
  88600. -}
  88601. -
  88602. -
  88603. -SWIGINTERN PyObject *VMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88604. - PyObject *obj;
  88605. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  88606. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VMask, SWIG_NewClientData(obj));
  88607. - return SWIG_Py_Void();
  88608. -}
  88609. -
  88610. -SWIGINTERN PyObject *_wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88611. - PyObject *resultobj = 0;
  88612. - std::ostream *arg1 = 0 ;
  88613. - vips::VMask *arg2 = 0 ;
  88614. - void *argp1 = 0 ;
  88615. - int res1 = 0 ;
  88616. - void *argp2 = 0 ;
  88617. - int res2 = 0 ;
  88618. - PyObject * obj0 = 0 ;
  88619. - PyObject * obj1 = 0 ;
  88620. - std::ostream *result = 0 ;
  88621. -
  88622. - if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail;
  88623. - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 );
  88624. - if (!SWIG_IsOK(res1)) {
  88625. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
  88626. - }
  88627. - if (!argp1) {
  88628. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
  88629. - }
  88630. - arg1 = reinterpret_cast< std::ostream * >(argp1);
  88631. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0);
  88632. - if (!SWIG_IsOK(res2)) {
  88633. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'");
  88634. - }
  88635. - if (!argp2) {
  88636. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'");
  88637. - }
  88638. - arg2 = reinterpret_cast< vips::VMask * >(argp2);
  88639. - result = (std::ostream *) &vips::operator <<(*arg1,(vips::VMask const &)*arg2);
  88640. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
  88641. - return resultobj;
  88642. -fail:
  88643. - return NULL;
  88644. -}
  88645. -
  88646. -
  88647. -SWIGINTERN PyObject *_wrap___lshift__(PyObject *self, PyObject *args) {
  88648. - int argc;
  88649. - PyObject *argv[3];
  88650. - int ii;
  88651. -
  88652. - if (!PyTuple_Check(args)) SWIG_fail;
  88653. - argc = args ? (int)PyObject_Length(args) : 0;
  88654. - for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  88655. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  88656. - }
  88657. - if (argc == 2) {
  88658. - int _v;
  88659. - void *vptr = 0;
  88660. - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, 0);
  88661. - _v = SWIG_CheckState(res);
  88662. - if (_v) {
  88663. - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VMask, 0);
  88664. - _v = SWIG_CheckState(res);
  88665. - if (_v) {
  88666. - return _wrap___lshift____SWIG_1(self, args);
  88667. - }
  88668. - }
  88669. - }
  88670. -
  88671. -fail:
  88672. - Py_INCREF(Py_NotImplemented);
  88673. - return Py_NotImplemented;
  88674. -}
  88675. -
  88676. -
  88677. -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88678. - PyObject *resultobj = 0;
  88679. - int arg1 ;
  88680. - int arg2 ;
  88681. - int val1 ;
  88682. - int ecode1 = 0 ;
  88683. - int val2 ;
  88684. - int ecode2 = 0 ;
  88685. - PyObject * obj0 = 0 ;
  88686. - PyObject * obj1 = 0 ;
  88687. - vips::VIMask *result = 0 ;
  88688. -
  88689. - if (!PyArg_ParseTuple(args,(char *)"OO:new_VIMask",&obj0,&obj1)) SWIG_fail;
  88690. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  88691. - if (!SWIG_IsOK(ecode1)) {
  88692. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'");
  88693. - }
  88694. - arg1 = static_cast< int >(val1);
  88695. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  88696. - if (!SWIG_IsOK(ecode2)) {
  88697. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'");
  88698. - }
  88699. - arg2 = static_cast< int >(val2);
  88700. - result = (vips::VIMask *)new vips::VIMask(arg1,arg2);
  88701. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
  88702. - return resultobj;
  88703. -fail:
  88704. - return NULL;
  88705. -}
  88706. -
  88707. -
  88708. -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88709. - PyObject *resultobj = 0;
  88710. - int arg1 ;
  88711. - int arg2 ;
  88712. - int arg3 ;
  88713. - int arg4 ;
  88714. - std::vector< int,std::allocator< int > > arg5 ;
  88715. - int val1 ;
  88716. - int ecode1 = 0 ;
  88717. - int val2 ;
  88718. - int ecode2 = 0 ;
  88719. - int val3 ;
  88720. - int ecode3 = 0 ;
  88721. - int val4 ;
  88722. - int ecode4 = 0 ;
  88723. - PyObject * obj0 = 0 ;
  88724. - PyObject * obj1 = 0 ;
  88725. - PyObject * obj2 = 0 ;
  88726. - PyObject * obj3 = 0 ;
  88727. - PyObject * obj4 = 0 ;
  88728. - vips::VIMask *result = 0 ;
  88729. -
  88730. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VIMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  88731. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  88732. - if (!SWIG_IsOK(ecode1)) {
  88733. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'");
  88734. - }
  88735. - arg1 = static_cast< int >(val1);
  88736. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  88737. - if (!SWIG_IsOK(ecode2)) {
  88738. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'");
  88739. - }
  88740. - arg2 = static_cast< int >(val2);
  88741. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  88742. - if (!SWIG_IsOK(ecode3)) {
  88743. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VIMask" "', argument " "3"" of type '" "int""'");
  88744. - }
  88745. - arg3 = static_cast< int >(val3);
  88746. - ecode4 = SWIG_AsVal_int(obj3, &val4);
  88747. - if (!SWIG_IsOK(ecode4)) {
  88748. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VIMask" "', argument " "4"" of type '" "int""'");
  88749. - }
  88750. - arg4 = static_cast< int >(val4);
  88751. - {
  88752. - std::vector<int,std::allocator< int > > *ptr = (std::vector<int,std::allocator< int > > *)0;
  88753. - int res = swig::asptr(obj4, &ptr);
  88754. - if (!SWIG_IsOK(res) || !ptr) {
  88755. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VIMask" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'");
  88756. - }
  88757. - arg5 = *ptr;
  88758. - if (SWIG_IsNewObj(res)) delete ptr;
  88759. - }
  88760. - result = (vips::VIMask *)new vips::VIMask(arg1,arg2,arg3,arg4,arg5);
  88761. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
  88762. - return resultobj;
  88763. -fail:
  88764. - return NULL;
  88765. -}
  88766. -
  88767. -
  88768. -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88769. - PyObject *resultobj = 0;
  88770. - char *arg1 = (char *) 0 ;
  88771. - int res1 ;
  88772. - char *buf1 = 0 ;
  88773. - int alloc1 = 0 ;
  88774. - PyObject * obj0 = 0 ;
  88775. - vips::VIMask *result = 0 ;
  88776. -
  88777. - if (!PyArg_ParseTuple(args,(char *)"O:new_VIMask",&obj0)) SWIG_fail;
  88778. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  88779. - if (!SWIG_IsOK(res1)) {
  88780. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VIMask" "', argument " "1"" of type '" "char const *""'");
  88781. - }
  88782. - arg1 = reinterpret_cast< char * >(buf1);
  88783. - result = (vips::VIMask *)new vips::VIMask((char const *)arg1);
  88784. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
  88785. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  88786. - return resultobj;
  88787. -fail:
  88788. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  88789. - return NULL;
  88790. -}
  88791. -
  88792. -
  88793. -SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88794. - PyObject *resultobj = 0;
  88795. - vips::VIMask *result = 0 ;
  88796. -
  88797. - if (!PyArg_ParseTuple(args,(char *)":new_VIMask")) SWIG_fail;
  88798. - result = (vips::VIMask *)new vips::VIMask();
  88799. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 );
  88800. - return resultobj;
  88801. -fail:
  88802. - return NULL;
  88803. -}
  88804. -
  88805. -
  88806. -SWIGINTERN PyObject *_wrap_new_VIMask(PyObject *self, PyObject *args) {
  88807. - int argc;
  88808. - PyObject *argv[6];
  88809. - int ii;
  88810. -
  88811. - if (!PyTuple_Check(args)) SWIG_fail;
  88812. - argc = args ? (int)PyObject_Length(args) : 0;
  88813. - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
  88814. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  88815. - }
  88816. - if (argc == 0) {
  88817. - return _wrap_new_VIMask__SWIG_3(self, args);
  88818. - }
  88819. - if (argc == 1) {
  88820. - int _v;
  88821. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  88822. - _v = SWIG_CheckState(res);
  88823. - if (_v) {
  88824. - return _wrap_new_VIMask__SWIG_2(self, args);
  88825. - }
  88826. - }
  88827. - if (argc == 2) {
  88828. - int _v;
  88829. - {
  88830. - int res = SWIG_AsVal_int(argv[0], NULL);
  88831. - _v = SWIG_CheckState(res);
  88832. - }
  88833. - if (_v) {
  88834. - {
  88835. - int res = SWIG_AsVal_int(argv[1], NULL);
  88836. - _v = SWIG_CheckState(res);
  88837. - }
  88838. - if (_v) {
  88839. - return _wrap_new_VIMask__SWIG_0(self, args);
  88840. - }
  88841. - }
  88842. - }
  88843. - if (argc == 5) {
  88844. - int _v;
  88845. - {
  88846. - int res = SWIG_AsVal_int(argv[0], NULL);
  88847. - _v = SWIG_CheckState(res);
  88848. - }
  88849. - if (_v) {
  88850. - {
  88851. - int res = SWIG_AsVal_int(argv[1], NULL);
  88852. - _v = SWIG_CheckState(res);
  88853. - }
  88854. - if (_v) {
  88855. - {
  88856. - int res = SWIG_AsVal_int(argv[2], NULL);
  88857. - _v = SWIG_CheckState(res);
  88858. - }
  88859. - if (_v) {
  88860. - {
  88861. - int res = SWIG_AsVal_int(argv[3], NULL);
  88862. - _v = SWIG_CheckState(res);
  88863. - }
  88864. - if (_v) {
  88865. - int res = swig::asptr(argv[4], (std::vector<int,std::allocator< int > >**)(0));
  88866. - _v = SWIG_CheckState(res);
  88867. - if (_v) {
  88868. - return _wrap_new_VIMask__SWIG_1(self, args);
  88869. - }
  88870. - }
  88871. - }
  88872. - }
  88873. - }
  88874. - }
  88875. -
  88876. -fail:
  88877. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VIMask'.\n"
  88878. - " Possible C/C++ prototypes are:\n"
  88879. - " vips::VIMask::VIMask(int,int)\n"
  88880. - " vips::VIMask::VIMask(int,int,int,int,std::vector< int,std::allocator< int > >)\n"
  88881. - " vips::VIMask::VIMask(char const *)\n"
  88882. - " vips::VIMask::VIMask()\n");
  88883. - return 0;
  88884. -}
  88885. -
  88886. -
  88887. -SWIGINTERN PyObject *_wrap_VIMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88888. - PyObject *resultobj = 0;
  88889. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  88890. - void *argp1 = 0 ;
  88891. - int res1 = 0 ;
  88892. - PyObject * obj0 = 0 ;
  88893. - int result;
  88894. -
  88895. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_scale",&obj0)) SWIG_fail;
  88896. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  88897. - if (!SWIG_IsOK(res1)) {
  88898. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_scale" "', argument " "1"" of type '" "vips::VIMask *""'");
  88899. - }
  88900. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  88901. - result = (int)(arg1)->scale();
  88902. - resultobj = SWIG_From_int(static_cast< int >(result));
  88903. - return resultobj;
  88904. -fail:
  88905. - return NULL;
  88906. -}
  88907. -
  88908. -
  88909. -SWIGINTERN PyObject *_wrap_VIMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88910. - PyObject *resultobj = 0;
  88911. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  88912. - void *argp1 = 0 ;
  88913. - int res1 = 0 ;
  88914. - PyObject * obj0 = 0 ;
  88915. - int result;
  88916. -
  88917. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_offset",&obj0)) SWIG_fail;
  88918. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  88919. - if (!SWIG_IsOK(res1)) {
  88920. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_offset" "', argument " "1"" of type '" "vips::VIMask *""'");
  88921. - }
  88922. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  88923. - result = (int)(arg1)->offset();
  88924. - resultobj = SWIG_From_int(static_cast< int >(result));
  88925. - return resultobj;
  88926. -fail:
  88927. - return NULL;
  88928. -}
  88929. -
  88930. -
  88931. -SWIGINTERN PyObject *_wrap_VIMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88932. - PyObject *resultobj = 0;
  88933. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  88934. - im__INTMASK *arg2 = (im__INTMASK *) 0 ;
  88935. - void *argp1 = 0 ;
  88936. - int res1 = 0 ;
  88937. - void *argp2 = 0 ;
  88938. - int res2 = 0 ;
  88939. - PyObject * obj0 = 0 ;
  88940. - PyObject * obj1 = 0 ;
  88941. -
  88942. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_embed",&obj0,&obj1)) SWIG_fail;
  88943. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  88944. - if (!SWIG_IsOK(res1)) {
  88945. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_embed" "', argument " "1"" of type '" "vips::VIMask *""'");
  88946. - }
  88947. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  88948. - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__INTMASK, 0 | 0 );
  88949. - if (!SWIG_IsOK(res2)) {
  88950. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_embed" "', argument " "2"" of type '" "im__INTMASK *""'");
  88951. - }
  88952. - arg2 = reinterpret_cast< im__INTMASK * >(argp2);
  88953. - try {
  88954. - (arg1)->embed(arg2);
  88955. - }
  88956. - catch(vips::VError &_e) {
  88957. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88958. - }
  88959. -
  88960. - resultobj = SWIG_Py_Void();
  88961. - return resultobj;
  88962. -fail:
  88963. - return NULL;
  88964. -}
  88965. -
  88966. -
  88967. -SWIGINTERN PyObject *_wrap_VIMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  88968. - PyObject *resultobj = 0;
  88969. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  88970. - int arg2 ;
  88971. - void *argp1 = 0 ;
  88972. - int res1 = 0 ;
  88973. - int val2 ;
  88974. - int ecode2 = 0 ;
  88975. - PyObject * obj0 = 0 ;
  88976. - PyObject * obj1 = 0 ;
  88977. - int *result = 0 ;
  88978. -
  88979. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask___index__",&obj0,&obj1)) SWIG_fail;
  88980. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  88981. - if (!SWIG_IsOK(res1)) {
  88982. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___index__" "', argument " "1"" of type '" "vips::VIMask *""'");
  88983. - }
  88984. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  88985. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  88986. - if (!SWIG_IsOK(ecode2)) {
  88987. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___index__" "', argument " "2"" of type '" "int""'");
  88988. - }
  88989. - arg2 = static_cast< int >(val2);
  88990. - try {
  88991. - result = (int *) &(arg1)->operator [](arg2);
  88992. - }
  88993. - catch(vips::VError &_e) {
  88994. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  88995. - }
  88996. -
  88997. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
  88998. - return resultobj;
  88999. -fail:
  89000. - return NULL;
  89001. -}
  89002. -
  89003. -
  89004. -SWIGINTERN PyObject *_wrap_VIMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89005. - PyObject *resultobj = 0;
  89006. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89007. - int arg2 ;
  89008. - int arg3 ;
  89009. - void *argp1 = 0 ;
  89010. - int res1 = 0 ;
  89011. - int val2 ;
  89012. - int ecode2 = 0 ;
  89013. - int val3 ;
  89014. - int ecode3 = 0 ;
  89015. - PyObject * obj0 = 0 ;
  89016. - PyObject * obj1 = 0 ;
  89017. - PyObject * obj2 = 0 ;
  89018. - int *result = 0 ;
  89019. -
  89020. - if (!PyArg_ParseTuple(args,(char *)"OOO:VIMask___call__",&obj0,&obj1,&obj2)) SWIG_fail;
  89021. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89022. - if (!SWIG_IsOK(res1)) {
  89023. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___call__" "', argument " "1"" of type '" "vips::VIMask *""'");
  89024. - }
  89025. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89026. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89027. - if (!SWIG_IsOK(ecode2)) {
  89028. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___call__" "', argument " "2"" of type '" "int""'");
  89029. - }
  89030. - arg2 = static_cast< int >(val2);
  89031. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  89032. - if (!SWIG_IsOK(ecode3)) {
  89033. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VIMask___call__" "', argument " "3"" of type '" "int""'");
  89034. - }
  89035. - arg3 = static_cast< int >(val3);
  89036. - try {
  89037. - result = (int *) &(arg1)->operator ()(arg2,arg3);
  89038. - }
  89039. - catch(vips::VError &_e) {
  89040. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89041. - }
  89042. -
  89043. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
  89044. - return resultobj;
  89045. -fail:
  89046. - return NULL;
  89047. -}
  89048. -
  89049. -
  89050. -SWIGINTERN PyObject *_wrap_VIMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89051. - PyObject *resultobj = 0;
  89052. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89053. - int arg2 ;
  89054. - void *argp1 = 0 ;
  89055. - int res1 = 0 ;
  89056. - int val2 ;
  89057. - int ecode2 = 0 ;
  89058. - PyObject * obj0 = 0 ;
  89059. - PyObject * obj1 = 0 ;
  89060. - int result;
  89061. -
  89062. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_get",&obj0,&obj1)) SWIG_fail;
  89063. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89064. - if (!SWIG_IsOK(res1)) {
  89065. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_get" "', argument " "1"" of type '" "vips::VIMask *""'");
  89066. - }
  89067. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89068. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89069. - if (!SWIG_IsOK(ecode2)) {
  89070. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_get" "', argument " "2"" of type '" "int""'");
  89071. - }
  89072. - arg2 = static_cast< int >(val2);
  89073. - try {
  89074. - result = (int)(arg1)->get(arg2);
  89075. - }
  89076. - catch(vips::VError &_e) {
  89077. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89078. - }
  89079. -
  89080. - resultobj = SWIG_From_int(static_cast< int >(result));
  89081. - return resultobj;
  89082. -fail:
  89083. - return NULL;
  89084. -}
  89085. -
  89086. -
  89087. -SWIGINTERN PyObject *_wrap_VIMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89088. - PyObject *resultobj = 0;
  89089. - double arg1 ;
  89090. - double arg2 ;
  89091. - double val1 ;
  89092. - int ecode1 = 0 ;
  89093. - double val2 ;
  89094. - int ecode2 = 0 ;
  89095. - PyObject * obj0 = 0 ;
  89096. - PyObject * obj1 = 0 ;
  89097. - vips::VIMask result;
  89098. -
  89099. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss",&obj0,&obj1)) SWIG_fail;
  89100. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  89101. - if (!SWIG_IsOK(ecode1)) {
  89102. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss" "', argument " "1"" of type '" "double""'");
  89103. - }
  89104. - arg1 = static_cast< double >(val1);
  89105. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  89106. - if (!SWIG_IsOK(ecode2)) {
  89107. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss" "', argument " "2"" of type '" "double""'");
  89108. - }
  89109. - arg2 = static_cast< double >(val2);
  89110. - try {
  89111. - result = vips::VIMask::gauss(arg1,arg2);
  89112. - }
  89113. - catch(vips::VError &_e) {
  89114. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89115. - }
  89116. -
  89117. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  89118. - return resultobj;
  89119. -fail:
  89120. - return NULL;
  89121. -}
  89122. -
  89123. -
  89124. -SWIGINTERN PyObject *_wrap_VIMask_gauss_sep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89125. - PyObject *resultobj = 0;
  89126. - double arg1 ;
  89127. - double arg2 ;
  89128. - double val1 ;
  89129. - int ecode1 = 0 ;
  89130. - double val2 ;
  89131. - int ecode2 = 0 ;
  89132. - PyObject * obj0 = 0 ;
  89133. - PyObject * obj1 = 0 ;
  89134. - vips::VIMask result;
  89135. -
  89136. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss_sep",&obj0,&obj1)) SWIG_fail;
  89137. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  89138. - if (!SWIG_IsOK(ecode1)) {
  89139. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss_sep" "', argument " "1"" of type '" "double""'");
  89140. - }
  89141. - arg1 = static_cast< double >(val1);
  89142. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  89143. - if (!SWIG_IsOK(ecode2)) {
  89144. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss_sep" "', argument " "2"" of type '" "double""'");
  89145. - }
  89146. - arg2 = static_cast< double >(val2);
  89147. - try {
  89148. - result = vips::VIMask::gauss_sep(arg1,arg2);
  89149. - }
  89150. - catch(vips::VError &_e) {
  89151. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89152. - }
  89153. -
  89154. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  89155. - return resultobj;
  89156. -fail:
  89157. - return NULL;
  89158. -}
  89159. -
  89160. -
  89161. -SWIGINTERN PyObject *_wrap_VIMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89162. - PyObject *resultobj = 0;
  89163. - double arg1 ;
  89164. - double arg2 ;
  89165. - double val1 ;
  89166. - int ecode1 = 0 ;
  89167. - double val2 ;
  89168. - int ecode2 = 0 ;
  89169. - PyObject * obj0 = 0 ;
  89170. - PyObject * obj1 = 0 ;
  89171. - vips::VIMask result;
  89172. -
  89173. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_log",&obj0,&obj1)) SWIG_fail;
  89174. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  89175. - if (!SWIG_IsOK(ecode1)) {
  89176. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_log" "', argument " "1"" of type '" "double""'");
  89177. - }
  89178. - arg1 = static_cast< double >(val1);
  89179. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  89180. - if (!SWIG_IsOK(ecode2)) {
  89181. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_log" "', argument " "2"" of type '" "double""'");
  89182. - }
  89183. - arg2 = static_cast< double >(val2);
  89184. - try {
  89185. - result = vips::VIMask::log(arg1,arg2);
  89186. - }
  89187. - catch(vips::VError &_e) {
  89188. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89189. - }
  89190. -
  89191. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  89192. - return resultobj;
  89193. -fail:
  89194. - return NULL;
  89195. -}
  89196. -
  89197. -
  89198. -SWIGINTERN PyObject *_wrap_VIMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89199. - PyObject *resultobj = 0;
  89200. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89201. - void *argp1 = 0 ;
  89202. - int res1 = 0 ;
  89203. - PyObject * obj0 = 0 ;
  89204. - vips::VIMask result;
  89205. -
  89206. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate45",&obj0)) SWIG_fail;
  89207. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89208. - if (!SWIG_IsOK(res1)) {
  89209. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate45" "', argument " "1"" of type '" "vips::VIMask *""'");
  89210. - }
  89211. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89212. - try {
  89213. - result = (arg1)->rotate45();
  89214. - }
  89215. - catch(vips::VError &_e) {
  89216. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89217. - }
  89218. -
  89219. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  89220. - return resultobj;
  89221. -fail:
  89222. - return NULL;
  89223. -}
  89224. -
  89225. -
  89226. -SWIGINTERN PyObject *_wrap_VIMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89227. - PyObject *resultobj = 0;
  89228. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89229. - void *argp1 = 0 ;
  89230. - int res1 = 0 ;
  89231. - PyObject * obj0 = 0 ;
  89232. - vips::VIMask result;
  89233. -
  89234. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate90",&obj0)) SWIG_fail;
  89235. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89236. - if (!SWIG_IsOK(res1)) {
  89237. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate90" "', argument " "1"" of type '" "vips::VIMask *""'");
  89238. - }
  89239. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89240. - try {
  89241. - result = (arg1)->rotate90();
  89242. - }
  89243. - catch(vips::VError &_e) {
  89244. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89245. - }
  89246. -
  89247. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  89248. - return resultobj;
  89249. -fail:
  89250. - return NULL;
  89251. -}
  89252. -
  89253. -
  89254. -SWIGINTERN PyObject *_wrap_VIMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89255. - PyObject *resultobj = 0;
  89256. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89257. - void *argp1 = 0 ;
  89258. - int res1 = 0 ;
  89259. - PyObject * obj0 = 0 ;
  89260. - vips::VDMask result;
  89261. -
  89262. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_trn",&obj0)) SWIG_fail;
  89263. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89264. - if (!SWIG_IsOK(res1)) {
  89265. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_trn" "', argument " "1"" of type '" "vips::VIMask *""'");
  89266. - }
  89267. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89268. - try {
  89269. - result = (arg1)->trn();
  89270. - }
  89271. - catch(vips::VError &_e) {
  89272. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89273. - }
  89274. -
  89275. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89276. - return resultobj;
  89277. -fail:
  89278. - return NULL;
  89279. -}
  89280. -
  89281. -
  89282. -SWIGINTERN PyObject *_wrap_VIMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89283. - PyObject *resultobj = 0;
  89284. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89285. - void *argp1 = 0 ;
  89286. - int res1 = 0 ;
  89287. - PyObject * obj0 = 0 ;
  89288. - vips::VDMask result;
  89289. -
  89290. - if (!PyArg_ParseTuple(args,(char *)"O:VIMask_inv",&obj0)) SWIG_fail;
  89291. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89292. - if (!SWIG_IsOK(res1)) {
  89293. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_inv" "', argument " "1"" of type '" "vips::VIMask *""'");
  89294. - }
  89295. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89296. - try {
  89297. - result = (arg1)->inv();
  89298. - }
  89299. - catch(vips::VError &_e) {
  89300. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89301. - }
  89302. -
  89303. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89304. - return resultobj;
  89305. -fail:
  89306. - return NULL;
  89307. -}
  89308. -
  89309. -
  89310. -SWIGINTERN PyObject *_wrap_VIMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89311. - PyObject *resultobj = 0;
  89312. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89313. - vips::VDMask arg2 ;
  89314. - void *argp1 = 0 ;
  89315. - int res1 = 0 ;
  89316. - void *argp2 ;
  89317. - int res2 = 0 ;
  89318. - PyObject * obj0 = 0 ;
  89319. - PyObject * obj1 = 0 ;
  89320. - vips::VDMask result;
  89321. -
  89322. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_cat",&obj0,&obj1)) SWIG_fail;
  89323. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89324. - if (!SWIG_IsOK(res1)) {
  89325. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_cat" "', argument " "1"" of type '" "vips::VIMask *""'");
  89326. - }
  89327. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89328. - {
  89329. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  89330. - if (!SWIG_IsOK(res2)) {
  89331. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
  89332. - }
  89333. - if (!argp2) {
  89334. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
  89335. - } else {
  89336. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  89337. - arg2 = *temp;
  89338. - if (SWIG_IsNewObj(res2)) delete temp;
  89339. - }
  89340. - }
  89341. - try {
  89342. - result = (arg1)->cat(arg2);
  89343. - }
  89344. - catch(vips::VError &_e) {
  89345. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89346. - }
  89347. -
  89348. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89349. - return resultobj;
  89350. -fail:
  89351. - return NULL;
  89352. -}
  89353. -
  89354. -
  89355. -SWIGINTERN PyObject *_wrap_VIMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89356. - PyObject *resultobj = 0;
  89357. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89358. - vips::VDMask arg2 ;
  89359. - void *argp1 = 0 ;
  89360. - int res1 = 0 ;
  89361. - void *argp2 ;
  89362. - int res2 = 0 ;
  89363. - PyObject * obj0 = 0 ;
  89364. - PyObject * obj1 = 0 ;
  89365. - vips::VDMask result;
  89366. -
  89367. - if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_mul",&obj0,&obj1)) SWIG_fail;
  89368. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 );
  89369. - if (!SWIG_IsOK(res1)) {
  89370. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_mul" "', argument " "1"" of type '" "vips::VIMask *""'");
  89371. - }
  89372. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89373. - {
  89374. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  89375. - if (!SWIG_IsOK(res2)) {
  89376. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
  89377. - }
  89378. - if (!argp2) {
  89379. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
  89380. - } else {
  89381. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  89382. - arg2 = *temp;
  89383. - if (SWIG_IsNewObj(res2)) delete temp;
  89384. - }
  89385. - }
  89386. - try {
  89387. - result = (arg1)->mul(arg2);
  89388. - }
  89389. - catch(vips::VError &_e) {
  89390. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89391. - }
  89392. -
  89393. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89394. - return resultobj;
  89395. -fail:
  89396. - return NULL;
  89397. -}
  89398. -
  89399. -
  89400. -SWIGINTERN PyObject *_wrap_delete_VIMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89401. - PyObject *resultobj = 0;
  89402. - vips::VIMask *arg1 = (vips::VIMask *) 0 ;
  89403. - void *argp1 = 0 ;
  89404. - int res1 = 0 ;
  89405. - PyObject * obj0 = 0 ;
  89406. -
  89407. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VIMask",&obj0)) SWIG_fail;
  89408. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, SWIG_POINTER_DISOWN | 0 );
  89409. - if (!SWIG_IsOK(res1)) {
  89410. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VIMask" "', argument " "1"" of type '" "vips::VIMask *""'");
  89411. - }
  89412. - arg1 = reinterpret_cast< vips::VIMask * >(argp1);
  89413. - delete arg1;
  89414. - resultobj = SWIG_Py_Void();
  89415. - return resultobj;
  89416. -fail:
  89417. - return NULL;
  89418. -}
  89419. -
  89420. -
  89421. -SWIGINTERN PyObject *VIMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89422. - PyObject *obj;
  89423. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  89424. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VIMask, SWIG_NewClientData(obj));
  89425. - return SWIG_Py_Void();
  89426. -}
  89427. -
  89428. -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89429. - PyObject *resultobj = 0;
  89430. - int arg1 ;
  89431. - int arg2 ;
  89432. - int val1 ;
  89433. - int ecode1 = 0 ;
  89434. - int val2 ;
  89435. - int ecode2 = 0 ;
  89436. - PyObject * obj0 = 0 ;
  89437. - PyObject * obj1 = 0 ;
  89438. - vips::VDMask *result = 0 ;
  89439. -
  89440. - if (!PyArg_ParseTuple(args,(char *)"OO:new_VDMask",&obj0,&obj1)) SWIG_fail;
  89441. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  89442. - if (!SWIG_IsOK(ecode1)) {
  89443. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'");
  89444. - }
  89445. - arg1 = static_cast< int >(val1);
  89446. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89447. - if (!SWIG_IsOK(ecode2)) {
  89448. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'");
  89449. - }
  89450. - arg2 = static_cast< int >(val2);
  89451. - result = (vips::VDMask *)new vips::VDMask(arg1,arg2);
  89452. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
  89453. - return resultobj;
  89454. -fail:
  89455. - return NULL;
  89456. -}
  89457. -
  89458. -
  89459. -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89460. - PyObject *resultobj = 0;
  89461. - int arg1 ;
  89462. - int arg2 ;
  89463. - double arg3 ;
  89464. - double arg4 ;
  89465. - std::vector< double,std::allocator< double > > arg5 ;
  89466. - int val1 ;
  89467. - int ecode1 = 0 ;
  89468. - int val2 ;
  89469. - int ecode2 = 0 ;
  89470. - double val3 ;
  89471. - int ecode3 = 0 ;
  89472. - double val4 ;
  89473. - int ecode4 = 0 ;
  89474. - PyObject * obj0 = 0 ;
  89475. - PyObject * obj1 = 0 ;
  89476. - PyObject * obj2 = 0 ;
  89477. - PyObject * obj3 = 0 ;
  89478. - PyObject * obj4 = 0 ;
  89479. - vips::VDMask *result = 0 ;
  89480. -
  89481. - if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VDMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  89482. - ecode1 = SWIG_AsVal_int(obj0, &val1);
  89483. - if (!SWIG_IsOK(ecode1)) {
  89484. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'");
  89485. - }
  89486. - arg1 = static_cast< int >(val1);
  89487. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89488. - if (!SWIG_IsOK(ecode2)) {
  89489. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'");
  89490. - }
  89491. - arg2 = static_cast< int >(val2);
  89492. - ecode3 = SWIG_AsVal_double(obj2, &val3);
  89493. - if (!SWIG_IsOK(ecode3)) {
  89494. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VDMask" "', argument " "3"" of type '" "double""'");
  89495. - }
  89496. - arg3 = static_cast< double >(val3);
  89497. - ecode4 = SWIG_AsVal_double(obj3, &val4);
  89498. - if (!SWIG_IsOK(ecode4)) {
  89499. - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VDMask" "', argument " "4"" of type '" "double""'");
  89500. - }
  89501. - arg4 = static_cast< double >(val4);
  89502. - {
  89503. - std::vector<double,std::allocator< double > > *ptr = (std::vector<double,std::allocator< double > > *)0;
  89504. - int res = swig::asptr(obj4, &ptr);
  89505. - if (!SWIG_IsOK(res) || !ptr) {
  89506. - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VDMask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'");
  89507. - }
  89508. - arg5 = *ptr;
  89509. - if (SWIG_IsNewObj(res)) delete ptr;
  89510. - }
  89511. - result = (vips::VDMask *)new vips::VDMask(arg1,arg2,arg3,arg4,arg5);
  89512. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
  89513. - return resultobj;
  89514. -fail:
  89515. - return NULL;
  89516. -}
  89517. -
  89518. -
  89519. -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89520. - PyObject *resultobj = 0;
  89521. - char *arg1 = (char *) 0 ;
  89522. - int res1 ;
  89523. - char *buf1 = 0 ;
  89524. - int alloc1 = 0 ;
  89525. - PyObject * obj0 = 0 ;
  89526. - vips::VDMask *result = 0 ;
  89527. -
  89528. - if (!PyArg_ParseTuple(args,(char *)"O:new_VDMask",&obj0)) SWIG_fail;
  89529. - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  89530. - if (!SWIG_IsOK(res1)) {
  89531. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDMask" "', argument " "1"" of type '" "char const *""'");
  89532. - }
  89533. - arg1 = reinterpret_cast< char * >(buf1);
  89534. - result = (vips::VDMask *)new vips::VDMask((char const *)arg1);
  89535. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
  89536. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  89537. - return resultobj;
  89538. -fail:
  89539. - if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  89540. - return NULL;
  89541. -}
  89542. -
  89543. -
  89544. -SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89545. - PyObject *resultobj = 0;
  89546. - vips::VDMask *result = 0 ;
  89547. -
  89548. - if (!PyArg_ParseTuple(args,(char *)":new_VDMask")) SWIG_fail;
  89549. - result = (vips::VDMask *)new vips::VDMask();
  89550. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 );
  89551. - return resultobj;
  89552. -fail:
  89553. - return NULL;
  89554. -}
  89555. -
  89556. -
  89557. -SWIGINTERN PyObject *_wrap_new_VDMask(PyObject *self, PyObject *args) {
  89558. - int argc;
  89559. - PyObject *argv[6];
  89560. - int ii;
  89561. -
  89562. - if (!PyTuple_Check(args)) SWIG_fail;
  89563. - argc = args ? (int)PyObject_Length(args) : 0;
  89564. - for (ii = 0; (ii < 5) && (ii < argc); ii++) {
  89565. - argv[ii] = PyTuple_GET_ITEM(args,ii);
  89566. - }
  89567. - if (argc == 0) {
  89568. - return _wrap_new_VDMask__SWIG_3(self, args);
  89569. - }
  89570. - if (argc == 1) {
  89571. - int _v;
  89572. - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  89573. - _v = SWIG_CheckState(res);
  89574. - if (_v) {
  89575. - return _wrap_new_VDMask__SWIG_2(self, args);
  89576. - }
  89577. - }
  89578. - if (argc == 2) {
  89579. - int _v;
  89580. - {
  89581. - int res = SWIG_AsVal_int(argv[0], NULL);
  89582. - _v = SWIG_CheckState(res);
  89583. - }
  89584. - if (_v) {
  89585. - {
  89586. - int res = SWIG_AsVal_int(argv[1], NULL);
  89587. - _v = SWIG_CheckState(res);
  89588. - }
  89589. - if (_v) {
  89590. - return _wrap_new_VDMask__SWIG_0(self, args);
  89591. - }
  89592. - }
  89593. - }
  89594. - if (argc == 5) {
  89595. - int _v;
  89596. - {
  89597. - int res = SWIG_AsVal_int(argv[0], NULL);
  89598. - _v = SWIG_CheckState(res);
  89599. - }
  89600. - if (_v) {
  89601. - {
  89602. - int res = SWIG_AsVal_int(argv[1], NULL);
  89603. - _v = SWIG_CheckState(res);
  89604. - }
  89605. - if (_v) {
  89606. - {
  89607. - int res = SWIG_AsVal_double(argv[2], NULL);
  89608. - _v = SWIG_CheckState(res);
  89609. - }
  89610. - if (_v) {
  89611. - {
  89612. - int res = SWIG_AsVal_double(argv[3], NULL);
  89613. - _v = SWIG_CheckState(res);
  89614. - }
  89615. - if (_v) {
  89616. - int res = swig::asptr(argv[4], (std::vector<double,std::allocator< double > >**)(0));
  89617. - _v = SWIG_CheckState(res);
  89618. - if (_v) {
  89619. - return _wrap_new_VDMask__SWIG_1(self, args);
  89620. - }
  89621. - }
  89622. - }
  89623. - }
  89624. - }
  89625. - }
  89626. -
  89627. -fail:
  89628. - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDMask'.\n"
  89629. - " Possible C/C++ prototypes are:\n"
  89630. - " vips::VDMask::VDMask(int,int)\n"
  89631. - " vips::VDMask::VDMask(int,int,double,double,std::vector< double,std::allocator< double > >)\n"
  89632. - " vips::VDMask::VDMask(char const *)\n"
  89633. - " vips::VDMask::VDMask()\n");
  89634. - return 0;
  89635. -}
  89636. -
  89637. -
  89638. -SWIGINTERN PyObject *_wrap_VDMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89639. - PyObject *resultobj = 0;
  89640. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89641. - im__DOUBLEMASK *arg2 = (im__DOUBLEMASK *) 0 ;
  89642. - void *argp1 = 0 ;
  89643. - int res1 = 0 ;
  89644. - void *argp2 = 0 ;
  89645. - int res2 = 0 ;
  89646. - PyObject * obj0 = 0 ;
  89647. - PyObject * obj1 = 0 ;
  89648. -
  89649. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_embed",&obj0,&obj1)) SWIG_fail;
  89650. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89651. - if (!SWIG_IsOK(res1)) {
  89652. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_embed" "', argument " "1"" of type '" "vips::VDMask *""'");
  89653. - }
  89654. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89655. - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__DOUBLEMASK, 0 | 0 );
  89656. - if (!SWIG_IsOK(res2)) {
  89657. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_embed" "', argument " "2"" of type '" "im__DOUBLEMASK *""'");
  89658. - }
  89659. - arg2 = reinterpret_cast< im__DOUBLEMASK * >(argp2);
  89660. - try {
  89661. - (arg1)->embed(arg2);
  89662. - }
  89663. - catch(vips::VError &_e) {
  89664. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89665. - }
  89666. -
  89667. - resultobj = SWIG_Py_Void();
  89668. - return resultobj;
  89669. -fail:
  89670. - return NULL;
  89671. -}
  89672. -
  89673. -
  89674. -SWIGINTERN PyObject *_wrap_VDMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89675. - PyObject *resultobj = 0;
  89676. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89677. - void *argp1 = 0 ;
  89678. - int res1 = 0 ;
  89679. - PyObject * obj0 = 0 ;
  89680. - double result;
  89681. -
  89682. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scale",&obj0)) SWIG_fail;
  89683. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89684. - if (!SWIG_IsOK(res1)) {
  89685. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scale" "', argument " "1"" of type '" "vips::VDMask *""'");
  89686. - }
  89687. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89688. - try {
  89689. - result = (double)(arg1)->scale();
  89690. - }
  89691. - catch(vips::VError &_e) {
  89692. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89693. - }
  89694. -
  89695. - resultobj = SWIG_From_double(static_cast< double >(result));
  89696. - return resultobj;
  89697. -fail:
  89698. - return NULL;
  89699. -}
  89700. -
  89701. -
  89702. -SWIGINTERN PyObject *_wrap_VDMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89703. - PyObject *resultobj = 0;
  89704. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89705. - void *argp1 = 0 ;
  89706. - int res1 = 0 ;
  89707. - PyObject * obj0 = 0 ;
  89708. - double result;
  89709. -
  89710. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_offset",&obj0)) SWIG_fail;
  89711. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89712. - if (!SWIG_IsOK(res1)) {
  89713. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_offset" "', argument " "1"" of type '" "vips::VDMask *""'");
  89714. - }
  89715. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89716. - try {
  89717. - result = (double)(arg1)->offset();
  89718. - }
  89719. - catch(vips::VError &_e) {
  89720. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89721. - }
  89722. -
  89723. - resultobj = SWIG_From_double(static_cast< double >(result));
  89724. - return resultobj;
  89725. -fail:
  89726. - return NULL;
  89727. -}
  89728. -
  89729. -
  89730. -SWIGINTERN PyObject *_wrap_VDMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89731. - PyObject *resultobj = 0;
  89732. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89733. - int arg2 ;
  89734. - void *argp1 = 0 ;
  89735. - int res1 = 0 ;
  89736. - int val2 ;
  89737. - int ecode2 = 0 ;
  89738. - PyObject * obj0 = 0 ;
  89739. - PyObject * obj1 = 0 ;
  89740. - double *result = 0 ;
  89741. -
  89742. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask___index__",&obj0,&obj1)) SWIG_fail;
  89743. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89744. - if (!SWIG_IsOK(res1)) {
  89745. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___index__" "', argument " "1"" of type '" "vips::VDMask *""'");
  89746. - }
  89747. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89748. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89749. - if (!SWIG_IsOK(ecode2)) {
  89750. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___index__" "', argument " "2"" of type '" "int""'");
  89751. - }
  89752. - arg2 = static_cast< int >(val2);
  89753. - try {
  89754. - result = (double *) &(arg1)->operator [](arg2);
  89755. - }
  89756. - catch(vips::VError &_e) {
  89757. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89758. - }
  89759. -
  89760. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
  89761. - return resultobj;
  89762. -fail:
  89763. - return NULL;
  89764. -}
  89765. -
  89766. -
  89767. -SWIGINTERN PyObject *_wrap_VDMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89768. - PyObject *resultobj = 0;
  89769. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89770. - int arg2 ;
  89771. - int arg3 ;
  89772. - void *argp1 = 0 ;
  89773. - int res1 = 0 ;
  89774. - int val2 ;
  89775. - int ecode2 = 0 ;
  89776. - int val3 ;
  89777. - int ecode3 = 0 ;
  89778. - PyObject * obj0 = 0 ;
  89779. - PyObject * obj1 = 0 ;
  89780. - PyObject * obj2 = 0 ;
  89781. - double *result = 0 ;
  89782. -
  89783. - if (!PyArg_ParseTuple(args,(char *)"OOO:VDMask___call__",&obj0,&obj1,&obj2)) SWIG_fail;
  89784. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89785. - if (!SWIG_IsOK(res1)) {
  89786. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___call__" "', argument " "1"" of type '" "vips::VDMask *""'");
  89787. - }
  89788. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89789. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89790. - if (!SWIG_IsOK(ecode2)) {
  89791. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___call__" "', argument " "2"" of type '" "int""'");
  89792. - }
  89793. - arg2 = static_cast< int >(val2);
  89794. - ecode3 = SWIG_AsVal_int(obj2, &val3);
  89795. - if (!SWIG_IsOK(ecode3)) {
  89796. - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VDMask___call__" "', argument " "3"" of type '" "int""'");
  89797. - }
  89798. - arg3 = static_cast< int >(val3);
  89799. - try {
  89800. - result = (double *) &(arg1)->operator ()(arg2,arg3);
  89801. - }
  89802. - catch(vips::VError &_e) {
  89803. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89804. - }
  89805. -
  89806. - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
  89807. - return resultobj;
  89808. -fail:
  89809. - return NULL;
  89810. -}
  89811. -
  89812. -
  89813. -SWIGINTERN PyObject *_wrap_VDMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89814. - PyObject *resultobj = 0;
  89815. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89816. - int arg2 ;
  89817. - void *argp1 = 0 ;
  89818. - int res1 = 0 ;
  89819. - int val2 ;
  89820. - int ecode2 = 0 ;
  89821. - PyObject * obj0 = 0 ;
  89822. - PyObject * obj1 = 0 ;
  89823. - double result;
  89824. -
  89825. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_get",&obj0,&obj1)) SWIG_fail;
  89826. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89827. - if (!SWIG_IsOK(res1)) {
  89828. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_get" "', argument " "1"" of type '" "vips::VDMask *""'");
  89829. - }
  89830. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89831. - ecode2 = SWIG_AsVal_int(obj1, &val2);
  89832. - if (!SWIG_IsOK(ecode2)) {
  89833. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_get" "', argument " "2"" of type '" "int""'");
  89834. - }
  89835. - arg2 = static_cast< int >(val2);
  89836. - try {
  89837. - result = (double)(arg1)->get(arg2);
  89838. - }
  89839. - catch(vips::VError &_e) {
  89840. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89841. - }
  89842. -
  89843. - resultobj = SWIG_From_double(static_cast< double >(result));
  89844. - return resultobj;
  89845. -fail:
  89846. - return NULL;
  89847. -}
  89848. -
  89849. -
  89850. -SWIGINTERN PyObject *_wrap_VDMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89851. - PyObject *resultobj = 0;
  89852. - double arg1 ;
  89853. - double arg2 ;
  89854. - double val1 ;
  89855. - int ecode1 = 0 ;
  89856. - double val2 ;
  89857. - int ecode2 = 0 ;
  89858. - PyObject * obj0 = 0 ;
  89859. - PyObject * obj1 = 0 ;
  89860. - vips::VDMask result;
  89861. -
  89862. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_gauss",&obj0,&obj1)) SWIG_fail;
  89863. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  89864. - if (!SWIG_IsOK(ecode1)) {
  89865. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_gauss" "', argument " "1"" of type '" "double""'");
  89866. - }
  89867. - arg1 = static_cast< double >(val1);
  89868. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  89869. - if (!SWIG_IsOK(ecode2)) {
  89870. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_gauss" "', argument " "2"" of type '" "double""'");
  89871. - }
  89872. - arg2 = static_cast< double >(val2);
  89873. - try {
  89874. - result = vips::VDMask::gauss(arg1,arg2);
  89875. - }
  89876. - catch(vips::VError &_e) {
  89877. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89878. - }
  89879. -
  89880. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89881. - return resultobj;
  89882. -fail:
  89883. - return NULL;
  89884. -}
  89885. -
  89886. -
  89887. -SWIGINTERN PyObject *_wrap_VDMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89888. - PyObject *resultobj = 0;
  89889. - double arg1 ;
  89890. - double arg2 ;
  89891. - double val1 ;
  89892. - int ecode1 = 0 ;
  89893. - double val2 ;
  89894. - int ecode2 = 0 ;
  89895. - PyObject * obj0 = 0 ;
  89896. - PyObject * obj1 = 0 ;
  89897. - vips::VDMask result;
  89898. -
  89899. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_log",&obj0,&obj1)) SWIG_fail;
  89900. - ecode1 = SWIG_AsVal_double(obj0, &val1);
  89901. - if (!SWIG_IsOK(ecode1)) {
  89902. - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_log" "', argument " "1"" of type '" "double""'");
  89903. - }
  89904. - arg1 = static_cast< double >(val1);
  89905. - ecode2 = SWIG_AsVal_double(obj1, &val2);
  89906. - if (!SWIG_IsOK(ecode2)) {
  89907. - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_log" "', argument " "2"" of type '" "double""'");
  89908. - }
  89909. - arg2 = static_cast< double >(val2);
  89910. - try {
  89911. - result = vips::VDMask::log(arg1,arg2);
  89912. - }
  89913. - catch(vips::VError &_e) {
  89914. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89915. - }
  89916. -
  89917. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89918. - return resultobj;
  89919. -fail:
  89920. - return NULL;
  89921. -}
  89922. -
  89923. -
  89924. -SWIGINTERN PyObject *_wrap_VDMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89925. - PyObject *resultobj = 0;
  89926. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89927. - void *argp1 = 0 ;
  89928. - int res1 = 0 ;
  89929. - PyObject * obj0 = 0 ;
  89930. - vips::VDMask result;
  89931. -
  89932. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate45",&obj0)) SWIG_fail;
  89933. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89934. - if (!SWIG_IsOK(res1)) {
  89935. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate45" "', argument " "1"" of type '" "vips::VDMask *""'");
  89936. - }
  89937. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89938. - try {
  89939. - result = (arg1)->rotate45();
  89940. - }
  89941. - catch(vips::VError &_e) {
  89942. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89943. - }
  89944. -
  89945. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89946. - return resultobj;
  89947. -fail:
  89948. - return NULL;
  89949. -}
  89950. -
  89951. -
  89952. -SWIGINTERN PyObject *_wrap_VDMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89953. - PyObject *resultobj = 0;
  89954. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89955. - void *argp1 = 0 ;
  89956. - int res1 = 0 ;
  89957. - PyObject * obj0 = 0 ;
  89958. - vips::VDMask result;
  89959. -
  89960. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate90",&obj0)) SWIG_fail;
  89961. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89962. - if (!SWIG_IsOK(res1)) {
  89963. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate90" "', argument " "1"" of type '" "vips::VDMask *""'");
  89964. - }
  89965. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89966. - try {
  89967. - result = (arg1)->rotate90();
  89968. - }
  89969. - catch(vips::VError &_e) {
  89970. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89971. - }
  89972. -
  89973. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  89974. - return resultobj;
  89975. -fail:
  89976. - return NULL;
  89977. -}
  89978. -
  89979. -
  89980. -SWIGINTERN PyObject *_wrap_VDMask_scalei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  89981. - PyObject *resultobj = 0;
  89982. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  89983. - void *argp1 = 0 ;
  89984. - int res1 = 0 ;
  89985. - PyObject * obj0 = 0 ;
  89986. - vips::VIMask result;
  89987. -
  89988. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scalei",&obj0)) SWIG_fail;
  89989. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  89990. - if (!SWIG_IsOK(res1)) {
  89991. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scalei" "', argument " "1"" of type '" "vips::VDMask *""'");
  89992. - }
  89993. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  89994. - try {
  89995. - result = (arg1)->scalei();
  89996. - }
  89997. - catch(vips::VError &_e) {
  89998. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  89999. - }
  90000. -
  90001. - resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 );
  90002. - return resultobj;
  90003. -fail:
  90004. - return NULL;
  90005. -}
  90006. -
  90007. -
  90008. -SWIGINTERN PyObject *_wrap_VDMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90009. - PyObject *resultobj = 0;
  90010. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  90011. - void *argp1 = 0 ;
  90012. - int res1 = 0 ;
  90013. - PyObject * obj0 = 0 ;
  90014. - vips::VDMask result;
  90015. -
  90016. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_trn",&obj0)) SWIG_fail;
  90017. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  90018. - if (!SWIG_IsOK(res1)) {
  90019. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_trn" "', argument " "1"" of type '" "vips::VDMask *""'");
  90020. - }
  90021. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  90022. - try {
  90023. - result = (arg1)->trn();
  90024. - }
  90025. - catch(vips::VError &_e) {
  90026. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  90027. - }
  90028. -
  90029. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  90030. - return resultobj;
  90031. -fail:
  90032. - return NULL;
  90033. -}
  90034. -
  90035. -
  90036. -SWIGINTERN PyObject *_wrap_VDMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90037. - PyObject *resultobj = 0;
  90038. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  90039. - void *argp1 = 0 ;
  90040. - int res1 = 0 ;
  90041. - PyObject * obj0 = 0 ;
  90042. - vips::VDMask result;
  90043. -
  90044. - if (!PyArg_ParseTuple(args,(char *)"O:VDMask_inv",&obj0)) SWIG_fail;
  90045. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  90046. - if (!SWIG_IsOK(res1)) {
  90047. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_inv" "', argument " "1"" of type '" "vips::VDMask *""'");
  90048. - }
  90049. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  90050. - try {
  90051. - result = (arg1)->inv();
  90052. - }
  90053. - catch(vips::VError &_e) {
  90054. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  90055. - }
  90056. -
  90057. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  90058. - return resultobj;
  90059. -fail:
  90060. - return NULL;
  90061. -}
  90062. -
  90063. -
  90064. -SWIGINTERN PyObject *_wrap_VDMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90065. - PyObject *resultobj = 0;
  90066. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  90067. - vips::VDMask arg2 ;
  90068. - void *argp1 = 0 ;
  90069. - int res1 = 0 ;
  90070. - void *argp2 ;
  90071. - int res2 = 0 ;
  90072. - PyObject * obj0 = 0 ;
  90073. - PyObject * obj1 = 0 ;
  90074. - vips::VDMask result;
  90075. -
  90076. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_cat",&obj0,&obj1)) SWIG_fail;
  90077. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  90078. - if (!SWIG_IsOK(res1)) {
  90079. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_cat" "', argument " "1"" of type '" "vips::VDMask *""'");
  90080. - }
  90081. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  90082. - {
  90083. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  90084. - if (!SWIG_IsOK(res2)) {
  90085. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
  90086. - }
  90087. - if (!argp2) {
  90088. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'");
  90089. - } else {
  90090. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  90091. - arg2 = *temp;
  90092. - if (SWIG_IsNewObj(res2)) delete temp;
  90093. - }
  90094. - }
  90095. - try {
  90096. - result = (arg1)->cat(arg2);
  90097. - }
  90098. - catch(vips::VError &_e) {
  90099. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  90100. - }
  90101. -
  90102. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  90103. - return resultobj;
  90104. -fail:
  90105. - return NULL;
  90106. -}
  90107. -
  90108. -
  90109. -SWIGINTERN PyObject *_wrap_VDMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90110. - PyObject *resultobj = 0;
  90111. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  90112. - vips::VDMask arg2 ;
  90113. - void *argp1 = 0 ;
  90114. - int res1 = 0 ;
  90115. - void *argp2 ;
  90116. - int res2 = 0 ;
  90117. - PyObject * obj0 = 0 ;
  90118. - PyObject * obj1 = 0 ;
  90119. - vips::VDMask result;
  90120. -
  90121. - if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_mul",&obj0,&obj1)) SWIG_fail;
  90122. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 );
  90123. - if (!SWIG_IsOK(res1)) {
  90124. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_mul" "', argument " "1"" of type '" "vips::VDMask *""'");
  90125. - }
  90126. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  90127. - {
  90128. - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0);
  90129. - if (!SWIG_IsOK(res2)) {
  90130. - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
  90131. - }
  90132. - if (!argp2) {
  90133. - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'");
  90134. - } else {
  90135. - vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2);
  90136. - arg2 = *temp;
  90137. - if (SWIG_IsNewObj(res2)) delete temp;
  90138. - }
  90139. - }
  90140. - try {
  90141. - result = (arg1)->mul(arg2);
  90142. - }
  90143. - catch(vips::VError &_e) {
  90144. - SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail;
  90145. - }
  90146. -
  90147. - resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 );
  90148. - return resultobj;
  90149. -fail:
  90150. - return NULL;
  90151. -}
  90152. -
  90153. -
  90154. -SWIGINTERN PyObject *_wrap_delete_VDMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90155. - PyObject *resultobj = 0;
  90156. - vips::VDMask *arg1 = (vips::VDMask *) 0 ;
  90157. - void *argp1 = 0 ;
  90158. - int res1 = 0 ;
  90159. - PyObject * obj0 = 0 ;
  90160. -
  90161. - if (!PyArg_ParseTuple(args,(char *)"O:delete_VDMask",&obj0)) SWIG_fail;
  90162. - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, SWIG_POINTER_DISOWN | 0 );
  90163. - if (!SWIG_IsOK(res1)) {
  90164. - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDMask" "', argument " "1"" of type '" "vips::VDMask *""'");
  90165. - }
  90166. - arg1 = reinterpret_cast< vips::VDMask * >(argp1);
  90167. - delete arg1;
  90168. - resultobj = SWIG_Py_Void();
  90169. - return resultobj;
  90170. -fail:
  90171. - return NULL;
  90172. -}
  90173. -
  90174. -
  90175. -SWIGINTERN PyObject *VDMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  90176. - PyObject *obj;
  90177. - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  90178. - SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDMask, SWIG_NewClientData(obj));
  90179. - return SWIG_Py_Void();
  90180. -}
  90181. -
  90182. -static PyMethodDef SwigMethods[] = {
  90183. - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
  90184. - { (char *)"new_VMask", _wrap_new_VMask, METH_VARARGS, NULL},
  90185. - { (char *)"VMask___assign__", _wrap_VMask___assign__, METH_VARARGS, NULL},
  90186. - { (char *)"delete_VMask", _wrap_delete_VMask, METH_VARARGS, NULL},
  90187. - { (char *)"VMask_xsize", _wrap_VMask_xsize, METH_VARARGS, NULL},
  90188. - { (char *)"VMask_ysize", _wrap_VMask_ysize, METH_VARARGS, NULL},
  90189. - { (char *)"VMask_size", _wrap_VMask_size, METH_VARARGS, NULL},
  90190. - { (char *)"VMask_filename", _wrap_VMask_filename, METH_VARARGS, NULL},
  90191. - { (char *)"VMask_type", _wrap_VMask_type, METH_VARARGS, NULL},
  90192. - { (char *)"VMask_mask", _wrap_VMask_mask, METH_VARARGS, NULL},
  90193. - { (char *)"VMask_ostream_print", _wrap_VMask_ostream_print, METH_VARARGS, NULL},
  90194. - { (char *)"VMask_swigregister", VMask_swigregister, METH_VARARGS, NULL},
  90195. - { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
  90196. - { (char *)"new_VIMask", _wrap_new_VIMask, METH_VARARGS, NULL},
  90197. - { (char *)"VIMask_scale", _wrap_VIMask_scale, METH_VARARGS, NULL},
  90198. - { (char *)"VIMask_offset", _wrap_VIMask_offset, METH_VARARGS, NULL},
  90199. - { (char *)"VIMask_embed", _wrap_VIMask_embed, METH_VARARGS, NULL},
  90200. - { (char *)"VIMask___index__", _wrap_VIMask___index__, METH_VARARGS, NULL},
  90201. - { (char *)"VIMask___call__", _wrap_VIMask___call__, METH_VARARGS, NULL},
  90202. - { (char *)"VIMask_get", _wrap_VIMask_get, METH_VARARGS, NULL},
  90203. - { (char *)"VIMask_gauss", _wrap_VIMask_gauss, METH_VARARGS, NULL},
  90204. - { (char *)"VIMask_gauss_sep", _wrap_VIMask_gauss_sep, METH_VARARGS, NULL},
  90205. - { (char *)"VIMask_log", _wrap_VIMask_log, METH_VARARGS, NULL},
  90206. - { (char *)"VIMask_rotate45", _wrap_VIMask_rotate45, METH_VARARGS, NULL},
  90207. - { (char *)"VIMask_rotate90", _wrap_VIMask_rotate90, METH_VARARGS, NULL},
  90208. - { (char *)"VIMask_trn", _wrap_VIMask_trn, METH_VARARGS, NULL},
  90209. - { (char *)"VIMask_inv", _wrap_VIMask_inv, METH_VARARGS, NULL},
  90210. - { (char *)"VIMask_cat", _wrap_VIMask_cat, METH_VARARGS, NULL},
  90211. - { (char *)"VIMask_mul", _wrap_VIMask_mul, METH_VARARGS, NULL},
  90212. - { (char *)"delete_VIMask", _wrap_delete_VIMask, METH_VARARGS, NULL},
  90213. - { (char *)"VIMask_swigregister", VIMask_swigregister, METH_VARARGS, NULL},
  90214. - { (char *)"new_VDMask", _wrap_new_VDMask, METH_VARARGS, NULL},
  90215. - { (char *)"VDMask_embed", _wrap_VDMask_embed, METH_VARARGS, NULL},
  90216. - { (char *)"VDMask_scale", _wrap_VDMask_scale, METH_VARARGS, NULL},
  90217. - { (char *)"VDMask_offset", _wrap_VDMask_offset, METH_VARARGS, NULL},
  90218. - { (char *)"VDMask___index__", _wrap_VDMask___index__, METH_VARARGS, NULL},
  90219. - { (char *)"VDMask___call__", _wrap_VDMask___call__, METH_VARARGS, NULL},
  90220. - { (char *)"VDMask_get", _wrap_VDMask_get, METH_VARARGS, NULL},
  90221. - { (char *)"VDMask_gauss", _wrap_VDMask_gauss, METH_VARARGS, NULL},
  90222. - { (char *)"VDMask_log", _wrap_VDMask_log, METH_VARARGS, NULL},
  90223. - { (char *)"VDMask_rotate45", _wrap_VDMask_rotate45, METH_VARARGS, NULL},
  90224. - { (char *)"VDMask_rotate90", _wrap_VDMask_rotate90, METH_VARARGS, NULL},
  90225. - { (char *)"VDMask_scalei", _wrap_VDMask_scalei, METH_VARARGS, NULL},
  90226. - { (char *)"VDMask_trn", _wrap_VDMask_trn, METH_VARARGS, NULL},
  90227. - { (char *)"VDMask_inv", _wrap_VDMask_inv, METH_VARARGS, NULL},
  90228. - { (char *)"VDMask_cat", _wrap_VDMask_cat, METH_VARARGS, NULL},
  90229. - { (char *)"VDMask_mul", _wrap_VDMask_mul, METH_VARARGS, NULL},
  90230. - { (char *)"delete_VDMask", _wrap_delete_VDMask, METH_VARARGS, NULL},
  90231. - { (char *)"VDMask_swigregister", VDMask_swigregister, METH_VARARGS, NULL},
  90232. - { NULL, NULL, 0, NULL }
  90233. -};
  90234. -
  90235. -
  90236. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  90237. -
  90238. -static void *_p_vips__VIMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) {
  90239. - return (void *)((vips::VMask *) ((vips::VIMask *) x));
  90240. -}
  90241. -static void *_p_vips__VDMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) {
  90242. - return (void *)((vips::VMask *) ((vips::VDMask *) x));
  90243. -}
  90244. -static swig_type_info _swigt__p__private_detail__MASKUNION = {"_p__private_detail__MASKUNION", "_private_detail::MASKUNION *", 0, 0, (void*)0, 0};
  90245. -static swig_type_info _swigt__p__private_detail__VPMask__VMaskType = {"_p__private_detail__VPMask__VMaskType", "_private_detail::VPMask::VMaskType *", 0, 0, (void*)0, 0};
  90246. -static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
  90247. -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  90248. -static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
  90249. -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
  90250. -static swig_type_info _swigt__p_im__DOUBLEMASK = {"_p_im__DOUBLEMASK", "im__DOUBLEMASK *", 0, 0, (void*)0, 0};
  90251. -static swig_type_info _swigt__p_im__INTMASK = {"_p_im__INTMASK", "im__INTMASK *", 0, 0, (void*)0, 0};
  90252. -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
  90253. -static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0};
  90254. -static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
  90255. -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
  90256. -static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
  90257. -static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0};
  90258. -static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0};
  90259. -static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0};
  90260. -static swig_type_info _swigt__p_vips__VMask = {"_p_vips__VMask", "vips::VMask *", 0, 0, (void*)0, 0};
  90261. -
  90262. -static swig_type_info *swig_type_initial[] = {
  90263. - &_swigt__p__private_detail__MASKUNION,
  90264. - &_swigt__p__private_detail__VPMask__VMaskType,
  90265. - &_swigt__p_allocator_type,
  90266. - &_swigt__p_char,
  90267. - &_swigt__p_difference_type,
  90268. - &_swigt__p_double,
  90269. - &_swigt__p_im__DOUBLEMASK,
  90270. - &_swigt__p_im__INTMASK,
  90271. - &_swigt__p_int,
  90272. - &_swigt__p_matrix,
  90273. - &_swigt__p_size_type,
  90274. - &_swigt__p_std__ostream,
  90275. - &_swigt__p_value_type,
  90276. - &_swigt__p_vips__VDMask,
  90277. - &_swigt__p_vips__VError,
  90278. - &_swigt__p_vips__VIMask,
  90279. - &_swigt__p_vips__VMask,
  90280. -};
  90281. -
  90282. -static swig_cast_info _swigc__p__private_detail__MASKUNION[] = { {&_swigt__p__private_detail__MASKUNION, 0, 0, 0},{0, 0, 0, 0}};
  90283. -static swig_cast_info _swigc__p__private_detail__VPMask__VMaskType[] = { {&_swigt__p__private_detail__VPMask__VMaskType, 0, 0, 0},{0, 0, 0, 0}};
  90284. -static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
  90285. -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  90286. -static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
  90287. -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
  90288. -static swig_cast_info _swigc__p_im__DOUBLEMASK[] = { {&_swigt__p_im__DOUBLEMASK, 0, 0, 0},{0, 0, 0, 0}};
  90289. -static swig_cast_info _swigc__p_im__INTMASK[] = { {&_swigt__p_im__INTMASK, 0, 0, 0},{0, 0, 0, 0}};
  90290. -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
  90291. -static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}};
  90292. -static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
  90293. -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
  90294. -static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
  90295. -static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}};
  90296. -static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}};
  90297. -static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}};
  90298. -static swig_cast_info _swigc__p_vips__VMask[] = { {&_swigt__p_vips__VDMask, _p_vips__VDMaskTo_p_vips__VMask, 0, 0}, {&_swigt__p_vips__VMask, 0, 0, 0}, {&_swigt__p_vips__VIMask, _p_vips__VIMaskTo_p_vips__VMask, 0, 0},{0, 0, 0, 0}};
  90299. -
  90300. -static swig_cast_info *swig_cast_initial[] = {
  90301. - _swigc__p__private_detail__MASKUNION,
  90302. - _swigc__p__private_detail__VPMask__VMaskType,
  90303. - _swigc__p_allocator_type,
  90304. - _swigc__p_char,
  90305. - _swigc__p_difference_type,
  90306. - _swigc__p_double,
  90307. - _swigc__p_im__DOUBLEMASK,
  90308. - _swigc__p_im__INTMASK,
  90309. - _swigc__p_int,
  90310. - _swigc__p_matrix,
  90311. - _swigc__p_size_type,
  90312. - _swigc__p_std__ostream,
  90313. - _swigc__p_value_type,
  90314. - _swigc__p_vips__VDMask,
  90315. - _swigc__p_vips__VError,
  90316. - _swigc__p_vips__VIMask,
  90317. - _swigc__p_vips__VMask,
  90318. -};
  90319. -
  90320. -
  90321. -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  90322. -
  90323. -static swig_const_info swig_const_table[] = {
  90324. -{0, 0, 0, 0.0, 0, 0}};
  90325. -
  90326. -#ifdef __cplusplus
  90327. -}
  90328. -#endif
  90329. -/* -----------------------------------------------------------------------------
  90330. - * Type initialization:
  90331. - * This problem is tough by the requirement that no dynamic
  90332. - * memory is used. Also, since swig_type_info structures store pointers to
  90333. - * swig_cast_info structures and swig_cast_info structures store pointers back
  90334. - * to swig_type_info structures, we need some lookup code at initialization.
  90335. - * The idea is that swig generates all the structures that are needed.
  90336. - * The runtime then collects these partially filled structures.
  90337. - * The SWIG_InitializeModule function takes these initial arrays out of
  90338. - * swig_module, and does all the lookup, filling in the swig_module.types
  90339. - * array with the correct data and linking the correct swig_cast_info
  90340. - * structures together.
  90341. - *
  90342. - * The generated swig_type_info structures are assigned staticly to an initial
  90343. - * array. We just loop through that array, and handle each type individually.
  90344. - * First we lookup if this type has been already loaded, and if so, use the
  90345. - * loaded structure instead of the generated one. Then we have to fill in the
  90346. - * cast linked list. The cast data is initially stored in something like a
  90347. - * two-dimensional array. Each row corresponds to a type (there are the same
  90348. - * number of rows as there are in the swig_type_initial array). Each entry in
  90349. - * a column is one of the swig_cast_info structures for that type.
  90350. - * The cast_initial array is actually an array of arrays, because each row has
  90351. - * a variable number of columns. So to actually build the cast linked list,
  90352. - * we find the array of casts associated with the type, and loop through it
  90353. - * adding the casts to the list. The one last trick we need to do is making
  90354. - * sure the type pointer in the swig_cast_info struct is correct.
  90355. - *
  90356. - * First off, we lookup the cast->type name to see if it is already loaded.
  90357. - * There are three cases to handle:
  90358. - * 1) If the cast->type has already been loaded AND the type we are adding
  90359. - * casting info to has not been loaded (it is in this module), THEN we
  90360. - * replace the cast->type pointer with the type pointer that has already
  90361. - * been loaded.
  90362. - * 2) If BOTH types (the one we are adding casting info to, and the
  90363. - * cast->type) are loaded, THEN the cast info has already been loaded by
  90364. - * the previous module so we just ignore it.
  90365. - * 3) Finally, if cast->type has not already been loaded, then we add that
  90366. - * swig_cast_info to the linked list (because the cast->type) pointer will
  90367. - * be correct.
  90368. - * ----------------------------------------------------------------------------- */
  90369. -
  90370. -#ifdef __cplusplus
  90371. -extern "C" {
  90372. -#if 0
  90373. -} /* c-mode */
  90374. -#endif
  90375. -#endif
  90376. -
  90377. -#if 0
  90378. -#define SWIGRUNTIME_DEBUG
  90379. -#endif
  90380. -
  90381. -
  90382. -SWIGRUNTIME void
  90383. -SWIG_InitializeModule(void *clientdata) {
  90384. - size_t i;
  90385. - swig_module_info *module_head, *iter;
  90386. - int found, init;
  90387. -
  90388. - /* check to see if the circular list has been setup, if not, set it up */
  90389. - if (swig_module.next==0) {
  90390. - /* Initialize the swig_module */
  90391. - swig_module.type_initial = swig_type_initial;
  90392. - swig_module.cast_initial = swig_cast_initial;
  90393. - swig_module.next = &swig_module;
  90394. - init = 1;
  90395. - } else {
  90396. - init = 0;
  90397. - }
  90398. -
  90399. - /* Try and load any already created modules */
  90400. - module_head = SWIG_GetModule(clientdata);
  90401. - if (!module_head) {
  90402. - /* This is the first module loaded for this interpreter */
  90403. - /* so set the swig module into the interpreter */
  90404. - SWIG_SetModule(clientdata, &swig_module);
  90405. - module_head = &swig_module;
  90406. - } else {
  90407. - /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  90408. - found=0;
  90409. - iter=module_head;
  90410. - do {
  90411. - if (iter==&swig_module) {
  90412. - found=1;
  90413. - break;
  90414. - }
  90415. - iter=iter->next;
  90416. - } while (iter!= module_head);
  90417. -
  90418. - /* if the is found in the list, then all is done and we may leave */
  90419. - if (found) return;
  90420. - /* otherwise we must add out module into the list */
  90421. - swig_module.next = module_head->next;
  90422. - module_head->next = &swig_module;
  90423. - }
  90424. -
  90425. - /* When multiple interpeters are used, a module could have already been initialized in
  90426. - a different interpreter, but not yet have a pointer in this interpreter.
  90427. - In this case, we do not want to continue adding types... everything should be
  90428. - set up already */
  90429. - if (init == 0) return;
  90430. -
  90431. - /* Now work on filling in swig_module.types */
  90432. -#ifdef SWIGRUNTIME_DEBUG
  90433. - printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  90434. -#endif
  90435. - for (i = 0; i < swig_module.size; ++i) {
  90436. - swig_type_info *type = 0;
  90437. - swig_type_info *ret;
  90438. - swig_cast_info *cast;
  90439. -
  90440. -#ifdef SWIGRUNTIME_DEBUG
  90441. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  90442. -#endif
  90443. -
  90444. - /* if there is another module already loaded */
  90445. - if (swig_module.next != &swig_module) {
  90446. - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  90447. - }
  90448. - if (type) {
  90449. - /* Overwrite clientdata field */
  90450. -#ifdef SWIGRUNTIME_DEBUG
  90451. - printf("SWIG_InitializeModule: found type %s\n", type->name);
  90452. -#endif
  90453. - if (swig_module.type_initial[i]->clientdata) {
  90454. - type->clientdata = swig_module.type_initial[i]->clientdata;
  90455. -#ifdef SWIGRUNTIME_DEBUG
  90456. - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  90457. -#endif
  90458. - }
  90459. - } else {
  90460. - type = swig_module.type_initial[i];
  90461. - }
  90462. -
  90463. - /* Insert casting types */
  90464. - cast = swig_module.cast_initial[i];
  90465. - while (cast->type) {
  90466. - /* Don't need to add information already in the list */
  90467. - ret = 0;
  90468. -#ifdef SWIGRUNTIME_DEBUG
  90469. - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  90470. -#endif
  90471. - if (swig_module.next != &swig_module) {
  90472. - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  90473. -#ifdef SWIGRUNTIME_DEBUG
  90474. - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  90475. -#endif
  90476. - }
  90477. - if (ret) {
  90478. - if (type == swig_module.type_initial[i]) {
  90479. -#ifdef SWIGRUNTIME_DEBUG
  90480. - printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  90481. -#endif
  90482. - cast->type = ret;
  90483. - ret = 0;
  90484. - } else {
  90485. - /* Check for casting already in the list */
  90486. - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  90487. -#ifdef SWIGRUNTIME_DEBUG
  90488. - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  90489. -#endif
  90490. - if (!ocast) ret = 0;
  90491. - }
  90492. - }
  90493. -
  90494. - if (!ret) {
  90495. -#ifdef SWIGRUNTIME_DEBUG
  90496. - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  90497. -#endif
  90498. - if (type->cast) {
  90499. - type->cast->prev = cast;
  90500. - cast->next = type->cast;
  90501. - }
  90502. - type->cast = cast;
  90503. - }
  90504. - cast++;
  90505. - }
  90506. - /* Set entry in modules->types array equal to the type */
  90507. - swig_module.types[i] = type;
  90508. - }
  90509. - swig_module.types[i] = 0;
  90510. -
  90511. -#ifdef SWIGRUNTIME_DEBUG
  90512. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  90513. - for (i = 0; i < swig_module.size; ++i) {
  90514. - int j = 0;
  90515. - swig_cast_info *cast = swig_module.cast_initial[i];
  90516. - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  90517. - while (cast->type) {
  90518. - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  90519. - cast++;
  90520. - ++j;
  90521. - }
  90522. - printf("---- Total casts: %d\n",j);
  90523. - }
  90524. - printf("**** SWIG_InitializeModule: Cast List ******\n");
  90525. -#endif
  90526. -}
  90527. -
  90528. -/* This function will propagate the clientdata field of type to
  90529. -* any new swig_type_info structures that have been added into the list
  90530. -* of equivalent types. It is like calling
  90531. -* SWIG_TypeClientData(type, clientdata) a second time.
  90532. -*/
  90533. -SWIGRUNTIME void
  90534. -SWIG_PropagateClientData(void) {
  90535. - size_t i;
  90536. - swig_cast_info *equiv;
  90537. - static int init_run = 0;
  90538. -
  90539. - if (init_run) return;
  90540. - init_run = 1;
  90541. -
  90542. - for (i = 0; i < swig_module.size; i++) {
  90543. - if (swig_module.types[i]->clientdata) {
  90544. - equiv = swig_module.types[i]->cast;
  90545. - while (equiv) {
  90546. - if (!equiv->converter) {
  90547. - if (equiv->type && !equiv->type->clientdata)
  90548. - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  90549. - }
  90550. - equiv = equiv->next;
  90551. - }
  90552. - }
  90553. - }
  90554. -}
  90555. -
  90556. -#ifdef __cplusplus
  90557. -#if 0
  90558. -{
  90559. - /* c-mode */
  90560. -#endif
  90561. -}
  90562. -#endif
  90563. -
  90564. -
  90565. -
  90566. -#ifdef __cplusplus
  90567. -extern "C" {
  90568. -#endif
  90569. -
  90570. - /* Python-specific SWIG API */
  90571. -#define SWIG_newvarlink() SWIG_Python_newvarlink()
  90572. -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  90573. -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  90574. -
  90575. - /* -----------------------------------------------------------------------------
  90576. - * global variable support code.
  90577. - * ----------------------------------------------------------------------------- */
  90578. -
  90579. - typedef struct swig_globalvar {
  90580. - char *name; /* Name of global variable */
  90581. - PyObject *(*get_attr)(void); /* Return the current value */
  90582. - int (*set_attr)(PyObject *); /* Set the value */
  90583. - struct swig_globalvar *next;
  90584. - } swig_globalvar;
  90585. -
  90586. - typedef struct swig_varlinkobject {
  90587. - PyObject_HEAD
  90588. - swig_globalvar *vars;
  90589. - } swig_varlinkobject;
  90590. -
  90591. - SWIGINTERN PyObject *
  90592. - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  90593. -#if PY_VERSION_HEX >= 0x03000000
  90594. - return PyUnicode_InternFromString("<Swig global variables>");
  90595. -#else
  90596. - return PyString_FromString("<Swig global variables>");
  90597. -#endif
  90598. - }
  90599. -
  90600. - SWIGINTERN PyObject *
  90601. - swig_varlink_str(swig_varlinkobject *v) {
  90602. -#if PY_VERSION_HEX >= 0x03000000
  90603. - PyObject *str = PyUnicode_InternFromString("(");
  90604. - PyObject *tail;
  90605. - PyObject *joined;
  90606. - swig_globalvar *var;
  90607. - for (var = v->vars; var; var=var->next) {
  90608. - tail = PyUnicode_FromString(var->name);
  90609. - joined = PyUnicode_Concat(str, tail);
  90610. - Py_DecRef(str);
  90611. - Py_DecRef(tail);
  90612. - str = joined;
  90613. - if (var->next) {
  90614. - tail = PyUnicode_InternFromString(", ");
  90615. - joined = PyUnicode_Concat(str, tail);
  90616. - Py_DecRef(str);
  90617. - Py_DecRef(tail);
  90618. - str = joined;
  90619. - }
  90620. - }
  90621. - tail = PyUnicode_InternFromString(")");
  90622. - joined = PyUnicode_Concat(str, tail);
  90623. - Py_DecRef(str);
  90624. - Py_DecRef(tail);
  90625. - str = joined;
  90626. -#else
  90627. - PyObject *str = PyString_FromString("(");
  90628. - swig_globalvar *var;
  90629. - for (var = v->vars; var; var=var->next) {
  90630. - PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  90631. - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  90632. - }
  90633. - PyString_ConcatAndDel(&str,PyString_FromString(")"));
  90634. -#endif
  90635. - return str;
  90636. - }
  90637. -
  90638. - SWIGINTERN int
  90639. - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
  90640. - char *tmp;
  90641. - PyObject *str = swig_varlink_str(v);
  90642. - fprintf(fp,"Swig global variables ");
  90643. - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
  90644. - SWIG_Python_str_DelForPy3(tmp);
  90645. - Py_DECREF(str);
  90646. - return 0;
  90647. - }
  90648. -
  90649. - SWIGINTERN void
  90650. - swig_varlink_dealloc(swig_varlinkobject *v) {
  90651. - swig_globalvar *var = v->vars;
  90652. - while (var) {
  90653. - swig_globalvar *n = var->next;
  90654. - free(var->name);
  90655. - free(var);
  90656. - var = n;
  90657. - }
  90658. - }
  90659. -
  90660. - SWIGINTERN PyObject *
  90661. - swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  90662. - PyObject *res = NULL;
  90663. - swig_globalvar *var = v->vars;
  90664. - while (var) {
  90665. - if (strcmp(var->name,n) == 0) {
  90666. - res = (*var->get_attr)();
  90667. - break;
  90668. - }
  90669. - var = var->next;
  90670. - }
  90671. - if (res == NULL && !PyErr_Occurred()) {
  90672. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  90673. - }
  90674. - return res;
  90675. - }
  90676. -
  90677. - SWIGINTERN int
  90678. - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  90679. - int res = 1;
  90680. - swig_globalvar *var = v->vars;
  90681. - while (var) {
  90682. - if (strcmp(var->name,n) == 0) {
  90683. - res = (*var->set_attr)(p);
  90684. - break;
  90685. - }
  90686. - var = var->next;
  90687. - }
  90688. - if (res == 1 && !PyErr_Occurred()) {
  90689. - PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  90690. - }
  90691. - return res;
  90692. - }
  90693. -
  90694. - SWIGINTERN PyTypeObject*
  90695. - swig_varlink_type(void) {
  90696. - static char varlink__doc__[] = "Swig var link object";
  90697. - static PyTypeObject varlink_type;
  90698. - static int type_init = 0;
  90699. - if (!type_init) {
  90700. - const PyTypeObject tmp = {
  90701. - /* PyObject header changed in Python 3 */
  90702. -#if PY_VERSION_HEX >= 0x03000000
  90703. - PyVarObject_HEAD_INIT(NULL, 0)
  90704. -#else
  90705. - PyObject_HEAD_INIT(NULL)
  90706. - 0, /* ob_size */
  90707. -#endif
  90708. - (char *)"swigvarlink", /* tp_name */
  90709. - sizeof(swig_varlinkobject), /* tp_basicsize */
  90710. - 0, /* tp_itemsize */
  90711. - (destructor) swig_varlink_dealloc, /* tp_dealloc */
  90712. - (printfunc) swig_varlink_print, /* tp_print */
  90713. - (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  90714. - (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  90715. - 0, /* tp_compare */
  90716. - (reprfunc) swig_varlink_repr, /* tp_repr */
  90717. - 0, /* tp_as_number */
  90718. - 0, /* tp_as_sequence */
  90719. - 0, /* tp_as_mapping */
  90720. - 0, /* tp_hash */
  90721. - 0, /* tp_call */
  90722. - (reprfunc) swig_varlink_str, /* tp_str */
  90723. - 0, /* tp_getattro */
  90724. - 0, /* tp_setattro */
  90725. - 0, /* tp_as_buffer */
  90726. - 0, /* tp_flags */
  90727. - varlink__doc__, /* tp_doc */
  90728. - 0, /* tp_traverse */
  90729. - 0, /* tp_clear */
  90730. - 0, /* tp_richcompare */
  90731. - 0, /* tp_weaklistoffset */
  90732. -#if PY_VERSION_HEX >= 0x02020000
  90733. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  90734. -#endif
  90735. -#if PY_VERSION_HEX >= 0x02030000
  90736. - 0, /* tp_del */
  90737. -#endif
  90738. -#if PY_VERSION_HEX >= 0x02060000
  90739. - 0, /* tp_version */
  90740. -#endif
  90741. -#ifdef COUNT_ALLOCS
  90742. - 0,0,0,0 /* tp_alloc -> tp_next */
  90743. -#endif
  90744. - };
  90745. - varlink_type = tmp;
  90746. - type_init = 1;
  90747. -#if PY_VERSION_HEX < 0x02020000
  90748. - varlink_type.ob_type = &PyType_Type;
  90749. -#else
  90750. - if (PyType_Ready(&varlink_type) < 0)
  90751. - return NULL;
  90752. -#endif
  90753. - }
  90754. - return &varlink_type;
  90755. - }
  90756. -
  90757. - /* Create a variable linking object for use later */
  90758. - SWIGINTERN PyObject *
  90759. - SWIG_Python_newvarlink(void) {
  90760. - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  90761. - if (result) {
  90762. - result->vars = 0;
  90763. - }
  90764. - return ((PyObject*) result);
  90765. - }
  90766. -
  90767. - SWIGINTERN void
  90768. - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  90769. - swig_varlinkobject *v = (swig_varlinkobject *) p;
  90770. - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  90771. - if (gv) {
  90772. - size_t size = strlen(name)+1;
  90773. - gv->name = (char *)malloc(size);
  90774. - if (gv->name) {
  90775. - strncpy(gv->name,name,size);
  90776. - gv->get_attr = get_attr;
  90777. - gv->set_attr = set_attr;
  90778. - gv->next = v->vars;
  90779. - }
  90780. - }
  90781. - v->vars = gv;
  90782. - }
  90783. -
  90784. - SWIGINTERN PyObject *
  90785. - SWIG_globals(void) {
  90786. - static PyObject *_SWIG_globals = 0;
  90787. - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
  90788. - return _SWIG_globals;
  90789. - }
  90790. -
  90791. - /* -----------------------------------------------------------------------------
  90792. - * constants/methods manipulation
  90793. - * ----------------------------------------------------------------------------- */
  90794. -
  90795. - /* Install Constants */
  90796. - SWIGINTERN void
  90797. - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  90798. - PyObject *obj = 0;
  90799. - size_t i;
  90800. - for (i = 0; constants[i].type; ++i) {
  90801. - switch(constants[i].type) {
  90802. - case SWIG_PY_POINTER:
  90803. - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  90804. - break;
  90805. - case SWIG_PY_BINARY:
  90806. - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  90807. - break;
  90808. - default:
  90809. - obj = 0;
  90810. - break;
  90811. - }
  90812. - if (obj) {
  90813. - PyDict_SetItemString(d, constants[i].name, obj);
  90814. - Py_DECREF(obj);
  90815. - }
  90816. - }
  90817. - }
  90818. -
  90819. - /* -----------------------------------------------------------------------------*/
  90820. - /* Fix SwigMethods to carry the callback ptrs when needed */
  90821. - /* -----------------------------------------------------------------------------*/
  90822. -
  90823. - SWIGINTERN void
  90824. - SWIG_Python_FixMethods(PyMethodDef *methods,
  90825. - swig_const_info *const_table,
  90826. - swig_type_info **types,
  90827. - swig_type_info **types_initial) {
  90828. - size_t i;
  90829. - for (i = 0; methods[i].ml_name; ++i) {
  90830. - const char *c = methods[i].ml_doc;
  90831. - if (c && (c = strstr(c, "swig_ptr: "))) {
  90832. - int j;
  90833. - swig_const_info *ci = 0;
  90834. - const char *name = c + 10;
  90835. - for (j = 0; const_table[j].type; ++j) {
  90836. - if (strncmp(const_table[j].name, name,
  90837. - strlen(const_table[j].name)) == 0) {
  90838. - ci = &(const_table[j]);
  90839. - break;
  90840. - }
  90841. - }
  90842. - if (ci) {
  90843. - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  90844. - if (ptr) {
  90845. - size_t shift = (ci->ptype) - types;
  90846. - swig_type_info *ty = types_initial[shift];
  90847. - size_t ldoc = (c - methods[i].ml_doc);
  90848. - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  90849. - char *ndoc = (char*)malloc(ldoc + lptr + 10);
  90850. - if (ndoc) {
  90851. - char *buff = ndoc;
  90852. - strncpy(buff, methods[i].ml_doc, ldoc);
  90853. - buff += ldoc;
  90854. - strncpy(buff, "swig_ptr: ", 10);
  90855. - buff += 10;
  90856. - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  90857. - methods[i].ml_doc = ndoc;
  90858. - }
  90859. - }
  90860. - }
  90861. - }
  90862. - }
  90863. - }
  90864. -
  90865. -#ifdef __cplusplus
  90866. -}
  90867. -#endif
  90868. -
  90869. -/* -----------------------------------------------------------------------------*
  90870. - * Partial Init method
  90871. - * -----------------------------------------------------------------------------*/
  90872. -
  90873. -#ifdef __cplusplus
  90874. -extern "C"
  90875. -#endif
  90876. -
  90877. -SWIGEXPORT
  90878. -#if PY_VERSION_HEX >= 0x03000000
  90879. -PyObject*
  90880. -#else
  90881. -void
  90882. -#endif
  90883. -SWIG_init(void) {
  90884. - PyObject *m, *d, *md;
  90885. -#if PY_VERSION_HEX >= 0x03000000
  90886. - static struct PyModuleDef SWIG_module = {
  90887. -# if PY_VERSION_HEX >= 0x03020000
  90888. - PyModuleDef_HEAD_INIT,
  90889. -# else
  90890. - {
  90891. - PyObject_HEAD_INIT(NULL)
  90892. - NULL, /* m_init */
  90893. - 0, /* m_index */
  90894. - NULL, /* m_copy */
  90895. - },
  90896. -# endif
  90897. - (char *) SWIG_name,
  90898. - NULL,
  90899. - -1,
  90900. - SwigMethods,
  90901. - NULL,
  90902. - NULL,
  90903. - NULL,
  90904. - NULL
  90905. - };
  90906. -#endif
  90907. -
  90908. -#if defined(SWIGPYTHON_BUILTIN)
  90909. - static SwigPyClientData SwigPyObject_clientdata = {
  90910. - 0, 0, 0, 0, 0, 0, 0
  90911. - };
  90912. - static PyGetSetDef this_getset_def = {
  90913. - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  90914. - };
  90915. - static SwigPyGetSet thisown_getset_closure = {
  90916. - (PyCFunction) SwigPyObject_own,
  90917. - (PyCFunction) SwigPyObject_own
  90918. - };
  90919. - static PyGetSetDef thisown_getset_def = {
  90920. - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  90921. - };
  90922. - PyObject *metatype_args;
  90923. - PyTypeObject *builtin_pytype;
  90924. - int builtin_base_count;
  90925. - swig_type_info *builtin_basetype;
  90926. - PyObject *tuple;
  90927. - PyGetSetDescrObject *static_getset;
  90928. - PyTypeObject *metatype;
  90929. - SwigPyClientData *cd;
  90930. - PyObject *public_interface, *public_symbol;
  90931. - PyObject *this_descr;
  90932. - PyObject *thisown_descr;
  90933. - int i;
  90934. -
  90935. - (void)builtin_pytype;
  90936. - (void)builtin_base_count;
  90937. - (void)builtin_basetype;
  90938. - (void)tuple;
  90939. - (void)static_getset;
  90940. -
  90941. - /* metatype is used to implement static member variables. */
  90942. - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  90943. - assert(metatype_args);
  90944. - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  90945. - assert(metatype);
  90946. - Py_DECREF(metatype_args);
  90947. - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  90948. - assert(PyType_Ready(metatype) >= 0);
  90949. -#endif
  90950. -
  90951. - /* Fix SwigMethods to carry the callback ptrs when needed */
  90952. - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  90953. -
  90954. -#if PY_VERSION_HEX >= 0x03000000
  90955. - m = PyModule_Create(&SWIG_module);
  90956. -#else
  90957. - m = Py_InitModule((char *) SWIG_name, SwigMethods);
  90958. -#endif
  90959. - md = d = PyModule_GetDict(m);
  90960. - (void)md;
  90961. -
  90962. - SWIG_InitializeModule(0);
  90963. -
  90964. -#ifdef SWIGPYTHON_BUILTIN
  90965. - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  90966. - assert(SwigPyObject_stype);
  90967. - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  90968. - if (!cd) {
  90969. - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  90970. - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  90971. - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
  90972. - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  90973. -# if PY_VERSION_HEX >= 0x03000000
  90974. - return NULL;
  90975. -# else
  90976. - return;
  90977. -# endif
  90978. - }
  90979. -
  90980. - /* All objects have a 'this' attribute */
  90981. - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  90982. - (void)this_descr;
  90983. -
  90984. - /* All objects have a 'thisown' attribute */
  90985. - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  90986. - (void)thisown_descr;
  90987. -
  90988. - public_interface = PyList_New(0);
  90989. - public_symbol = 0;
  90990. - (void)public_symbol;
  90991. -
  90992. - PyDict_SetItemString(md, "__all__", public_interface);
  90993. - Py_DECREF(public_interface);
  90994. - for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  90995. - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  90996. - for (i = 0; swig_const_table[i].name != 0; ++i)
  90997. - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  90998. -#endif
  90999. -
  91000. - SWIG_InstallConstants(d,swig_const_table);
  91001. -
  91002. -#if PY_VERSION_HEX >= 0x03000000
  91003. - return m;
  91004. -#else
  91005. - return;
  91006. -#endif
  91007. -}
  91008. -
  91009. diff -u --recursive --new-file vips-7.38.5-vanilla/swig/vipsCC/VMask.py vips-7.38.5/swig/vipsCC/VMask.py
  91010. --- vips-7.38.5-vanilla/swig/vipsCC/VMask.py 2014-07-17 23:48:36.208794473 -0400
  91011. +++ vips-7.38.5/swig/vipsCC/VMask.py 1969-12-31 19:00:00.000000000 -0500
  91012. @@ -1,191 +0,0 @@
  91013. -# This file was automatically generated by SWIG (http://www.swig.org).
  91014. -# Version 2.0.10
  91015. -#
  91016. -# Do not make changes to this file unless you know what you are doing--modify
  91017. -# the SWIG interface file instead.
  91018. -
  91019. -
  91020. -
  91021. -from sys import version_info
  91022. -if version_info >= (2,6,0):
  91023. - def swig_import_helper():
  91024. - from os.path import dirname
  91025. - import imp
  91026. - fp = None
  91027. - try:
  91028. - fp, pathname, description = imp.find_module('vmaskmodule', [dirname(__file__)])
  91029. - except ImportError:
  91030. - import vmaskmodule
  91031. - return vmaskmodule
  91032. - if fp is not None:
  91033. - try:
  91034. - _mod = imp.load_module('vmaskmodule', fp, pathname, description)
  91035. - finally:
  91036. - fp.close()
  91037. - return _mod
  91038. - vmaskmodule = swig_import_helper()
  91039. - del swig_import_helper
  91040. -else:
  91041. - import vmaskmodule
  91042. -del version_info
  91043. -try:
  91044. - _swig_property = property
  91045. -except NameError:
  91046. - pass # Python < 2.2 doesn't have 'property'.
  91047. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
  91048. - if (name == "thisown"): return self.this.own(value)
  91049. - if (name == "this"):
  91050. - if type(value).__name__ == 'SwigPyObject':
  91051. - self.__dict__[name] = value
  91052. - return
  91053. - method = class_type.__swig_setmethods__.get(name,None)
  91054. - if method: return method(self,value)
  91055. - if (not static):
  91056. - self.__dict__[name] = value
  91057. - else:
  91058. - raise AttributeError("You cannot add attributes to %s" % self)
  91059. -
  91060. -def _swig_setattr(self,class_type,name,value):
  91061. - return _swig_setattr_nondynamic(self,class_type,name,value,0)
  91062. -
  91063. -def _swig_getattr(self,class_type,name):
  91064. - if (name == "thisown"): return self.this.own()
  91065. - method = class_type.__swig_getmethods__.get(name,None)
  91066. - if method: return method(self)
  91067. - raise AttributeError(name)
  91068. -
  91069. -def _swig_repr(self):
  91070. - try: strthis = "proxy of " + self.this.__repr__()
  91071. - except: strthis = ""
  91072. - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  91073. -
  91074. -try:
  91075. - _object = object
  91076. - _newclass = 1
  91077. -except AttributeError:
  91078. - class _object : pass
  91079. - _newclass = 0
  91080. -
  91081. -
  91082. -import VError
  91083. -import VImage
  91084. -import VDisplay
  91085. -class VMask(_object):
  91086. - __swig_setmethods__ = {}
  91087. - __setattr__ = lambda self, name, value: _swig_setattr(self, VMask, name, value)
  91088. - __swig_getmethods__ = {}
  91089. - __getattr__ = lambda self, name: _swig_getattr(self, VMask, name)
  91090. - __repr__ = _swig_repr
  91091. - def __init__(self, *args):
  91092. - this = vmaskmodule.new_VMask(*args)
  91093. - try: self.this.append(this)
  91094. - except: self.this = this
  91095. - def __assign__(self, *args): return vmaskmodule.VMask___assign__(self, *args)
  91096. - __swig_destroy__ = vmaskmodule.delete_VMask
  91097. - __del__ = lambda self : None;
  91098. - def xsize(self): return vmaskmodule.VMask_xsize(self)
  91099. - def ysize(self): return vmaskmodule.VMask_ysize(self)
  91100. - def size(self): return vmaskmodule.VMask_size(self)
  91101. - def filename(self): return vmaskmodule.VMask_filename(self)
  91102. - def type(self): return vmaskmodule.VMask_type(self)
  91103. - def mask(self): return vmaskmodule.VMask_mask(self)
  91104. - def ostream_print(self, *args): return vmaskmodule.VMask_ostream_print(self, *args)
  91105. -VMask_swigregister = vmaskmodule.VMask_swigregister
  91106. -VMask_swigregister(VMask)
  91107. -
  91108. -
  91109. -def __lshift__(*args):
  91110. - return vmaskmodule.__lshift__(*args)
  91111. -__lshift__ = vmaskmodule.__lshift__
  91112. -class VIMask(VMask):
  91113. - __swig_setmethods__ = {}
  91114. - for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
  91115. - __setattr__ = lambda self, name, value: _swig_setattr(self, VIMask, name, value)
  91116. - __swig_getmethods__ = {}
  91117. - for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
  91118. - __getattr__ = lambda self, name: _swig_getattr(self, VIMask, name)
  91119. - __repr__ = _swig_repr
  91120. - def __init__(self, *args):
  91121. - this = vmaskmodule.new_VIMask(*args)
  91122. - try: self.this.append(this)
  91123. - except: self.this = this
  91124. - def scale(self): return vmaskmodule.VIMask_scale(self)
  91125. - def offset(self): return vmaskmodule.VIMask_offset(self)
  91126. - def embed(self, *args): return vmaskmodule.VIMask_embed(self, *args)
  91127. - def __index__(self, *args): return vmaskmodule.VIMask___index__(self, *args)
  91128. - def __call__(self, *args): return vmaskmodule.VIMask___call__(self, *args)
  91129. - def get(self, *args): return vmaskmodule.VIMask_get(self, *args)
  91130. - __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VIMask_gauss
  91131. - if _newclass:gauss = staticmethod(vmaskmodule.VIMask_gauss)
  91132. - __swig_getmethods__["gauss_sep"] = lambda x: vmaskmodule.VIMask_gauss_sep
  91133. - if _newclass:gauss_sep = staticmethod(vmaskmodule.VIMask_gauss_sep)
  91134. - __swig_getmethods__["log"] = lambda x: vmaskmodule.VIMask_log
  91135. - if _newclass:log = staticmethod(vmaskmodule.VIMask_log)
  91136. - def rotate45(self): return vmaskmodule.VIMask_rotate45(self)
  91137. - def rotate90(self): return vmaskmodule.VIMask_rotate90(self)
  91138. - def trn(self): return vmaskmodule.VIMask_trn(self)
  91139. - def inv(self): return vmaskmodule.VIMask_inv(self)
  91140. - def cat(self, *args): return vmaskmodule.VIMask_cat(self, *args)
  91141. - def mul(self, *args): return vmaskmodule.VIMask_mul(self, *args)
  91142. - __swig_destroy__ = vmaskmodule.delete_VIMask
  91143. - __del__ = lambda self : None;
  91144. -VIMask_swigregister = vmaskmodule.VIMask_swigregister
  91145. -VIMask_swigregister(VIMask)
  91146. -
  91147. -def VIMask_gauss(*args):
  91148. - return vmaskmodule.VIMask_gauss(*args)
  91149. -VIMask_gauss = vmaskmodule.VIMask_gauss
  91150. -
  91151. -def VIMask_gauss_sep(*args):
  91152. - return vmaskmodule.VIMask_gauss_sep(*args)
  91153. -VIMask_gauss_sep = vmaskmodule.VIMask_gauss_sep
  91154. -
  91155. -def VIMask_log(*args):
  91156. - return vmaskmodule.VIMask_log(*args)
  91157. -VIMask_log = vmaskmodule.VIMask_log
  91158. -
  91159. -class VDMask(VMask):
  91160. - __swig_setmethods__ = {}
  91161. - for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
  91162. - __setattr__ = lambda self, name, value: _swig_setattr(self, VDMask, name, value)
  91163. - __swig_getmethods__ = {}
  91164. - for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
  91165. - __getattr__ = lambda self, name: _swig_getattr(self, VDMask, name)
  91166. - __repr__ = _swig_repr
  91167. - def __init__(self, *args):
  91168. - this = vmaskmodule.new_VDMask(*args)
  91169. - try: self.this.append(this)
  91170. - except: self.this = this
  91171. - def embed(self, *args): return vmaskmodule.VDMask_embed(self, *args)
  91172. - def scale(self): return vmaskmodule.VDMask_scale(self)
  91173. - def offset(self): return vmaskmodule.VDMask_offset(self)
  91174. - def __index__(self, *args): return vmaskmodule.VDMask___index__(self, *args)
  91175. - def __call__(self, *args): return vmaskmodule.VDMask___call__(self, *args)
  91176. - def get(self, *args): return vmaskmodule.VDMask_get(self, *args)
  91177. - __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VDMask_gauss
  91178. - if _newclass:gauss = staticmethod(vmaskmodule.VDMask_gauss)
  91179. - __swig_getmethods__["log"] = lambda x: vmaskmodule.VDMask_log
  91180. - if _newclass:log = staticmethod(vmaskmodule.VDMask_log)
  91181. - def rotate45(self): return vmaskmodule.VDMask_rotate45(self)
  91182. - def rotate90(self): return vmaskmodule.VDMask_rotate90(self)
  91183. - def scalei(self): return vmaskmodule.VDMask_scalei(self)
  91184. - def trn(self): return vmaskmodule.VDMask_trn(self)
  91185. - def inv(self): return vmaskmodule.VDMask_inv(self)
  91186. - def cat(self, *args): return vmaskmodule.VDMask_cat(self, *args)
  91187. - def mul(self, *args): return vmaskmodule.VDMask_mul(self, *args)
  91188. - __swig_destroy__ = vmaskmodule.delete_VDMask
  91189. - __del__ = lambda self : None;
  91190. -VDMask_swigregister = vmaskmodule.VDMask_swigregister
  91191. -VDMask_swigregister(VDMask)
  91192. -
  91193. -def VDMask_gauss(*args):
  91194. - return vmaskmodule.VDMask_gauss(*args)
  91195. -VDMask_gauss = vmaskmodule.VDMask_gauss
  91196. -
  91197. -def VDMask_log(*args):
  91198. - return vmaskmodule.VDMask_log(*args)
  91199. -VDMask_log = vmaskmodule.VDMask_log
  91200. -
  91201. -# This file is compatible with both classic and new-style classes.
  91202. -
  91203. -
  91204. diff -u --recursive --new-file vips-7.38.5-vanilla/vips.pc.in vips-7.38.5/vips.pc.in
  91205. --- vips-7.38.5-vanilla/vips.pc.in 2014-07-17 23:48:36.236794473 -0400
  91206. +++ vips-7.38.5/vips.pc.in 2014-07-17 23:48:52.069794148 -0400
  91207. @@ -7,5 +7,5 @@
  91208. Description: Image processing library
  91209. Version: @VERSION@
  91210. Requires: @PACKAGES_USED@
  91211. -Libs: -L${libdir} -lvips @VIPS_LIBS@ @VIPS_CXX_LIBS@
  91212. +Libs: -L${libdir} -lvips @VIPS_LIBS@
  91213. Cflags: -I${includedir}