Skip to content
This repository was archived by the owner on Jul 26, 2025. It is now read-only.

Commit f19c0fd

Browse files
committed
feat: expose BorderType and InterpolationType
Closes: #231
1 parent 00589a1 commit f19c0fd

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

src/Image.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ import {
101101
ThresholdOptions,
102102
} from './index';
103103

104-
export { ImageColorModel, colorModels } from './utils/constants/colorModels';
105-
106104
export type ImageDataArray = Uint8Array | Uint16Array | Uint8ClampedArray;
107105

108106
/**

src/Mask.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ColorDepth, colorModels, Image, ImageColorModel } from './Image';
1+
import { ColorDepth, Image } from './Image';
22
import { subtract, SubtractImageOptions } from './compare';
33
import {
44
drawLineOnMask,
@@ -58,6 +58,7 @@ import {
5858
PaintMaskOnMaskOptions,
5959
} from './operations';
6060
import { boolToNumber } from './utils/boolToNumber';
61+
import { ImageColorModel, colorModels } from './utils/constants/colorModels';
6162
import { Point } from './utils/geometry/points';
6263

6364
export type BitValue = 1 | 0 | boolean;

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ export * from './morphology';
88
export * from './operations';
99
export * from './roi';
1010
export * from './save';
11+
export * from './utils/constants/colorModels';
12+
export { BorderType } from './utils/interpolateBorder';
13+
export { InterpolationType } from './utils/interpolatePixel';

src/load/decodePng.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { decode, DecodedPng } from 'fast-png';
22

3-
import { ColorDepth, Image, ImageColorModel } from '../Image';
3+
import { ColorDepth, Image } from '../Image';
4+
import { ImageColorModel } from '../utils/constants/colorModels';
45

56
/**
67
* Decode a PNG. See the fast-png npm module.

src/operations/convertColor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { Image, ImageColorModel } from '../Image';
1+
import { Image } from '../Image';
22
import { Mask } from '../Mask';
3+
import { ImageColorModel } from '../utils/constants/colorModels';
34
import { getOutputImage, maskToOutputImage } from '../utils/getOutputImage';
45

56
export interface ConvertColorOptions {

src/operations/merge.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Image, ImageColorModel } from '../Image';
1+
import { Image } from '../Image';
2+
import { ImageColorModel } from '../utils/constants/colorModels';
23

34
/**
45
* Inverse of split. Merges multiple single-channel images into one.

0 commit comments

Comments
 (0)