thedesk/app/node_modules/@jimp/plugin-crop/dist/index.js.map

1 line
17 KiB
Plaintext
Raw Permalink Normal View History

2019-09-13 00:38:13 +10:00
{"version":3,"sources":["../src/index.js"],"names":["pluginCrop","event","x","y","w","h","cb","throwError","call","Math","round","bitmap","width","start","end","data","slice","Buffer","allocUnsafe","offset","scanQuiet","idx","readUInt32BE","writeUInt32BE","height","class","autocrop","minPixelsPerSide","leaveBorder","tolerance","cropOnlyFrames","cropSymmetric","a","len","length","config","colorTarget","getPixelColor","rgba1","constructor","intToRGBA","northPixelsToCrop","eastPixelsToCrop","southPixelsToCrop","westPixelsToCrop","north","colorXY","rgba2","colorDiff","east","south","west","doCrop","horizontal","min","vertical","widthOfRemainingPixels","heightOfRemainingPixels","crop"],"mappings":";;;;;;;;;;;;;AAEA;;;;AAEe,SAASA,UAAT,CAAoBC,KAApB,EAA2B;AACxC;;;;;;;;;AASAA,EAAAA,KAAK,CAAC,MAAD,EAAS,UAASC,CAAT,EAAYC,CAAZ,EAAeC,CAAf,EAAkBC,CAAlB,EAAqBC,EAArB,EAAyB;AACrC,QAAI,OAAOJ,CAAP,KAAa,QAAb,IAAyB,OAAOC,CAAP,KAAa,QAA1C,EACE,OAAOI,kBAAWC,IAAX,CAAgB,IAAhB,EAAsB,yBAAtB,EAAiDF,EAAjD,CAAP;AACF,QAAI,OAAOF,CAAP,KAAa,QAAb,IAAyB,OAAOC,CAAP,KAAa,QAA1C,EACE,OAAOE,kBAAWC,IAAX,CAAgB,IAAhB,EAAsB,yBAAtB,EAAiDF,EAAjD,CAAP,CAJmC,CAMrC;;AACAJ,IAAAA,CAAC,GAAGO,IAAI,CAACC,KAAL,CAAWR,CAAX,CAAJ;AACAC,IAAAA,CAAC,GAAGM,IAAI,CAACC,KAAL,CAAWP,CAAX,CAAJ;AACAC,IAAAA,CAAC,GAAGK,IAAI,CAACC,KAAL,CAAWN,CAAX,CAAJ;AACAC,IAAAA,CAAC,GAAGI,IAAI,CAACC,KAAL,CAAWL,CA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