hdr-canvas 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,7 @@ declare class Uint16Image {
22
22
  static fromImageData(imageData: HDRImageData): Uint16Image;
23
23
  static fromURL(url: URL): Promise<Uint16Image | undefined>;
24
24
  setImageData(imageData: HDRImageData): void;
25
+ clone(): Uint16Image;
25
26
  }
26
27
 
27
28
  declare function checkHDR(): boolean;
@@ -5870,6 +5870,11 @@ class Uint16Image {
5870
5870
  }
5871
5871
  this.colorSpace = Uint16Image.DEFAULT_COLORSPACE;
5872
5872
  }
5873
+ clone() {
5874
+ const i = new Uint16Image(this.width, this.height, this.colorSpace);
5875
+ i.data = this.data.slice();
5876
+ return i;
5877
+ }
5873
5878
  }
5874
5879
  Uint16Image.DEFAULT_COLORSPACE = "rec2100-hlg";
5875
5880
  Uint16Image.SDR_MULTIPLIER = 2 ** 16 - 1;