import{Resource as e,invoke as t}from"./core-SwWLTXZB.js";var n=class n extends e{constructor(e){super(e)}static async new(e,i,a){return t(`plugin:image|new`,{rgba:r(e),width:i,height:a}).then(e=>new n(e))}static async fromBytes(e){return t(`plugin:image|from_bytes`,{bytes:r(e)}).then(e=>new n(e))}static async fromPath(e){return t(`plugin:image|from_path`,{path:e}).then(e=>new n(e))}async rgba(){return t(`plugin:image|rgba`,{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return t(`plugin:image|size`,{rid:this.rid})}};function r(e){return e==null?null:typeof e==`string`?e:e instanceof n?e.rid:e}export{r as n,n as t};