Skip to content

Commit

Permalink
refactor(pixel-io-geotiff): update imports & add type sig
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Nov 6, 2023
1 parent 5c98502 commit 8798d95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pixel-io-geotiff/src/read.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { typedArrayType, type TypedArray } from "@thi.ng/api";
import { FLOAT_GRAY_RANGE, floatBuffer, type FloatBuffer } from "@thi.ng/pixel";
import { Pool, fromArrayBuffer } from "geotiff";
import { Pool, fromArrayBuffer, type GeoTIFFImage } from "geotiff";

export interface GeoTiffOpts {
/**
Expand Down Expand Up @@ -30,7 +30,7 @@ export interface GeoTiffOpts {
export const readGeoTiff = async (
src: ArrayBufferView,
opts: Partial<GeoTiffOpts> = {}
) => {
): Promise<{ img: FloatBuffer; tiff: GeoTIFFImage }> => {
const tiff = await fromArrayBuffer(src.buffer);
const tiffImg = await tiff.getImage();
const width = tiffImg.getWidth();
Expand Down

0 comments on commit 8798d95

Please sign in to comment.