/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
class l{constructor(l,e,t){this.pixelBlock=l,this.extent=e,this.originalPixelBlock=t}get width(){return null!=this.pixelBlock?this.pixelBlock.width:0}get height(){return null!=this.pixelBlock?this.pixelBlock.height:0}render(l){const e=this.pixelBlock;if(null==e)return;const t=this.filter({extent:this.extent,pixelBlock:this.originalPixelBlock??e});if(null==t.pixelBlock)return;t.pixelBlock.maskIsAlpha&&(t.pixelBlock.premultiplyAlpha=!0);const i=t.pixelBlock.getAsRGBA(),h=l.createImageData(t.pixelBlock.width,t.pixelBlock.height);h.data.set(i),l.putImageData(h,0,0)}getRenderedRasterPixels(){const l=this.filter({extent:this.extent,pixelBlock:this.pixelBlock});return null==l.pixelBlock?null:(l.pixelBlock.maskIsAlpha&&(l.pixelBlock.premultiplyAlpha=!0),{width:l.pixelBlock.width,height:l.pixelBlock.height,renderedRasterPixels:new Uint8Array(l.pixelBlock.getAsRGBA().buffer)})}}export{l as default};
