@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 446 B
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
class e{constructor(e,n){this.element=e,this.type="image+type",this.isOpaque="image/jpeg"===n}}function n(e){if(e.byteLength<2)return"unknown";const n=new Uint8Array(e,0,e.byteLength);return 137===n[0]&&80===n[1]?"image/png":71===n[0]&&73===n[1]?"image/gif":66===n[0]&&77===n[1]?"image/bmp":255===n[0]&&216===n[1]?"image/jpeg":"unknown"}export{e as ImageWithType,n as getImageType};