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

Commit 3a8291e

Browse files
committed
test: add RGB copyTo test
1 parent 3f36e57 commit 3a8291e

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

src/operations/__tests__/copyTo.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ test('negative offset', () => {
9999
expect(result).toMatchImageData([[250]]);
100100
});
101101

102+
test('RGB images', () => {
103+
const target = testUtils.createRgbImage([
104+
[1, 2, 3],
105+
[4, 5, 6],
106+
[7, 8, 9],
107+
]);
108+
const source = testUtils.createRgbImage([[3, 3, 3]]);
109+
const result = source.copyTo(target, { origin: { row: 1, column: 0 } });
110+
expect(result).toMatchImageData([
111+
[1, 2, 3],
112+
[3, 3, 3],
113+
[7, 8, 9],
114+
]);
115+
});
116+
102117
test('RGBA images', () => {
103118
const target = testUtils.createRgbaImage([
104119
[1, 2, 3, 255],

src/stack/compute/meanImage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Image } from '../../Image';
22
import { Stack } from '../../Stack';
3-
43
import { checkProcessable } from '../utils/checkProcessable';
54

65
/**

src/stack/compute/medianImage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import quickMedian from 'median-quickselect';
33

44
import { Image } from '../../Image';
55
import { Stack } from '../../Stack';
6-
76
import { checkProcessable } from '../utils/checkProcessable';
87

98
/**

src/stack/compute/minImage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Image } from '../../Image';
22
import { Stack } from '../../Stack';
3-
43
import { checkProcessable } from '../utils/checkProcessable';
54

65
/**

0 commit comments

Comments
 (0)