hdr-canvas 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;