/* Ċ Ġ* ĠCopyright ĠL WJ GL . ĠAll Ġrights Ġreserved . Ċ Ġ* ĠLicense Ġterms : Ġhttps :// www . lwjgl . org / license Ċ Ġ*/ Ċ package Ġtiny ex r Ċ Ċ import Ġorg . lwjgl . generator .* Ċ Ċ fun Ġconfig () Ġ{ ĊĠĠĠ Ġpackage Info ( ĊĠĠĠĠĠĠĠ ĠModule . TIN Y EX R , ĊĠĠĠĠĠĠĠ Ġ""" ĊĠĠĠĠĠĠĠ ĠContains Ġbindings Ġto Ġthe Ġ${ url (" https :// github . com / sy o yo / tiny ex r ", Ġ" Tiny ĠOpen EX R ")} Ġimage Ġlibrary . ĊĊĠĠĠĠĠĠĠ Ġtiny ex r Ġis Ġa Ġsmall , Ġsingle Ġheader - only Ġlibrary Ġto Ġload Ġand Ġsave ĠOpen EX R (. ex r ) Ġimages . ĊĠĠĠĠĠĠĠ Ġ""" ĊĠĠĠ Ġ) Ċ } Ċ Ċ val ĠEX R Version Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX R Version ") Ġ{ ĊĠĠĠ Ġint . member (" version ", Ġ" this Ġmust Ġbe Ġ 2 ") ĊĠĠĠ Ġint b . member (" t iled ", Ġ" tile Ġformat Ġimage ") ĊĠĠĠ Ġint b . member (" long _ name ", Ġ" long Ġname Ġattribute ") ĊĠĠĠ Ġint b . member (" non _ image ", Ġ" deep Ġimage ( EX R Ġ 2 . 0 )") ĊĠĠĠ Ġint b . member (" multipart ", Ġ" multi - part ( EX R Ġ 2 . 0 )") Ċ } Ċ Ċ val ĠEX R Attribute Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX R Attribute ") Ġ{ ĊĠĠĠ Ġchar ASCII . array (" name ", Ġ"", Ġsize Ġ= Ġ 2 5 6 ) ĊĠĠĠ Ġchar ASCII . array (" type ", Ġ"", Ġsize Ġ= Ġ 2 5 6 ) ĊĠĠĠ Ġunsigned _ char . p . member (" value ", Ġ"") ĊĠĠĠ ĠAuto Size (" value ", Ġoptional Ġ= Ġtrue ) .. int . member (" size ", Ġ"") ĊĠĠĠ Ġpadding ( 4 ) Ċ } Ċ Ċ val ĠEX R Channel Info Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX R Channel Info ") Ġ{ ĊĠĠĠ Ġchar ASCII . array (" name ", Ġ"", Ġsize Ġ= Ġ 2 5 6 ) ĊĠĠĠ Ġint . member (" pixel _ type ", Ġ"") ĊĠĠĠ Ġint . member (" x _ sampling ", Ġ"") ĊĠĠĠ Ġint . member (" y _ sampling ", Ġ"") ĊĠĠĠ Ġunsigned _ char . member (" p _ linear ", Ġ"") ĊĠĠĠ Ġpadding ( 3 ) Ċ } Ċ Ċ val ĠEX RT ile Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX RT ile ") Ġ{ ĊĠĠĠ Ġint . member (" offset _ x ", Ġ"") ĊĠĠĠ Ġint . member (" offset _ y ", Ġ"") ĊĠĠĠ Ġint . member (" level _ x ", Ġ"") ĊĠĠĠ Ġint . member (" level _ y ", Ġ"") ĊĊĠĠĠ Ġint . member (" width ", Ġ" actual Ġwidth Ġin Ġa Ġtile ") ĊĠĠĠ Ġint . member (" height ", Ġ" actual Ġheight Ġin Ġa Ġtile ") ĊĊĠĠĠ Ġunsigned _ char . p . p . member (" images ", Ġ" image [ channels ][ pixels ]") Ċ } Ċ Ċ val ĠEX R Header Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX R Header ") Ġ{ ĊĠĠĠ Ġjava Import (" static Ġorg . lwjgl . util . tiny ex r . Tiny EX R .* ") ĊĊĠĠĠ Ġfloat . member (" pixel _ aspect _ ratio ", Ġ"") ĊĠĠĠ Ġint . member (" line _ order ", Ġ"") ĊĠĠĠ Ġint . array (" data _ window ", Ġ"", Ġsize Ġ= Ġ 4 ) ĊĠĠĠ Ġint . array (" display _ window ", Ġ"", Ġsize Ġ= Ġ 4 ) ĊĠĠĠ Ġfloat . array (" screen _ window _ center ", Ġ"", Ġsize Ġ= Ġ 2 ) ĊĠĠĠ Ġfloat . member (" screen _ window _ width ", Ġ"") ĊĊĠĠĠ Ġint . member (" chunk _ count ", Ġ"") ĊĊĠĠĠ Ġ// ĠProperties Ġfor Ġt iled Ġformat (` tile desc `). ĊĠĠĠ Ġint b . member (" t iled ", Ġ"") ĊĠĠĠ Ġint . member (" tile _ size _ x ", Ġ"") ĊĠĠĠ Ġint . member (" tile _ size _ y ", Ġ"") ĊĠĠĠ Ġint . member (" tile _ level _ mode ", Ġ"") ĊĠĠĠ Ġint . member (" tile _ rounding _ mode ", Ġ"") ĊĊĠĠĠ Ġint b . member (" long _ name ", Ġ"") ĊĠĠĠ Ġint b . member (" non _ image ", Ġ"") ĊĠĠĠ Ġint b . member (" multipart ", Ġ"") ĊĠĠĠ Ġunsigned _ int . member (" header _ len ", Ġ"") ĊĊĠĠĠ ĠAuto Size (" custom _ attributes ") .. int . member (" num _ custom _ attributes ", Ġ" number Ġof Ġ{@ code ĠEX R Attribute } Ġin Ġthe Ġ{@ code Ġcustom _ attributes } Ġarray ") ĊĠĠĠ Ġnullable .. EX R Attribute . p . buffer ( ĊĠĠĠĠĠĠĠ Ġ" custom _ attributes ", ĊĠĠĠĠĠĠĠ Ġ" custom Ġattributes Ġ( exclude s Ġrequired Ġattributes , Ġe . g . Ġ` channels `, Ġ` compression `, Ġetc )" ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠEX R Channel Info . p . buffer (" channels ", Ġ"") ĊĊĠĠĠ Ġint . p . member ( ĊĠĠĠĠĠĠĠ Ġ" pixel _ types ", ĊĠĠĠĠĠĠĠ Ġ" loaded Ġpixel Ġtype Ġ( TIN Y EX R _ PIXEL TYPE _ *) Ġof Ġ{@ code Ġimages } Ġfor Ġeach Ġchannel . ĠThis Ġis Ġoverwritten Ġwith Ġ{@ code Ġrequested _ pixel _ types } Ġwhen Ġloading ." ĊĠĠĠ Ġ) ĊĠĠĠ ĠAuto Size (" channels ", Ġ" pixel _ types ", Ġ" requested _ pixel _ types ") .. int . member (" num _ channels ", Ġ"") ĊĊĠĠĠ Ġint . member (" compression _ type ", Ġ" compression Ġtype Ġ( TIN Y EX R _ COMPRESS ION TYPE _ *) ") ĊĠĠĠ Ġint . p . member ( ĊĠĠĠĠĠĠĠ Ġ" requested _ pixel _ types ", ĊĠĠĠĠĠĠĠ Ġ" filled Ġinitially Ġby Ġ{@ code ĠParse EX R Header From ( Memory | File )}, Ġthen Ġusers Ġcan Ġedit Ġit Ġ( only Ġvalid Ġfor ĠHAL F Ġpixel Ġtype Ġchannel )" ĊĠĠĠ Ġ) Ċ } Ċ Ċ /* val ĠEX R Multi Part Header Ġ= Ġstruct ( Binding . TIN Y EX R , Ġ" EX R Multi Part Header ") Ġ{ ĊĠĠĠ ĠAuto Size (" headers ") .. int . member (" num _ headers ", Ġ"") ĊĠĠĠ ĠEX R Header _ p . member (" headers ", Ġ"") Ċ }*/ Ċ Ċ val ĠEX R Image Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" EX R Image ") Ġ{ ĊĠĠĠ ĠEX RT ile . p . buffer (" tiles ", Ġ" t iled Ġpixel Ġdata . ĠThe Ġapplication Ġmust Ġreconstruct Ġimage Ġfrom Ġtiles Ġmanually . Ġ# NULL Ġif Ġscan line Ġformat .") ĊĠĠĠ Ġnullable .. unsigned _ char . p . p . member (" images ", Ġ"{ @ code Ġimage [ channels ][ pixels ] }. Ġ# NULL Ġif Ġt iled Ġformat .") ĊĠĠĠ Ġint . member (" width ", Ġ"") ĊĠĠĠ Ġint . member (" height ", Ġ"") ĊĠĠĠ ĠAuto Size (" images ") .. int . member (" num _ channels ", Ġ"") ĊĊĠĠĠ Ġ// ĠProperties Ġfor Ġtile Ġformat . ĊĠĠĠ ĠAuto Size (" tiles ", Ġoptional Ġ= Ġtrue ) .. int . member (" num _ tiles ", Ġ"") Ċ } Ċ Ċ /* val ĠEX R Multi Part Image Ġ= Ġstruct ( Binding . TIN Y EX R , Ġ" EX R Multi Part Image ") Ġ{ ĊĠĠĠ ĠAuto Size (" images ") .. int . member (" num _ images ", Ġ"") ĊĠĠĠ ĠEX R Image _ p . member (" images ", Ġ"") Ċ }*/ Ċ Ċ val ĠDeep Image Ġ= Ġstruct ( Module . TIN Y EX R , Ġ" Deep Image ") Ġ{ ĊĠĠĠ Ġchar UTF 8 . const . p . p . member (" channel _ names ", Ġ"") ĊĠĠĠ Ġfloat . p . p . p . member (" image ", Ġ" image [ channels ][ scan lines ][ samples ]") ĊĠĠĠ Ġint . p . p . member (" offset _ table ", Ġ" offset _ table [ scan line ][ offsets ]") ĊĠĠĠ ĠAuto Size (" channel _ names ", Ġ" image ") .. int . member (" num _ channels ", Ġ"") ĊĠĠĠ Ġint . member (" width ", Ġ"") ĊĠĠĠ Ġint . member (" height ", Ġ"") ĊĠĠĠ Ġpadding ( 4 ) Ċ }