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

Commit 99513c6

Browse files
committed
fix: remove useless getOutputImage
1 parent 6a74b61 commit 99513c6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/filters/autoLevel.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Image } from '../Image';
22
import checkProcessable from '../utils/checkProcessable';
33
import { ImageColorModel } from '../utils/constants/colorModels';
4-
import { getOutputImage } from '../utils/getOutputImage';
54

65
export interface AutoLevelOptions {
76
/**
@@ -21,9 +20,6 @@ export function autoLevel(image: Image, options: AutoLevelOptions = {}): Image {
2120
checkProcessable(image, {
2221
bitDepth: [8, 16],
2322
});
24-
25-
let newImage = getOutputImage(image, options, { clone: true });
26-
2723
const minMax = image.minMax();
2824

2925
let channels: number[] = new Array(image.components)
@@ -36,7 +32,7 @@ export function autoLevel(image: Image, options: AutoLevelOptions = {}): Image {
3632
channels = [0, 1, 2];
3733
}
3834

39-
return newImage.level({
35+
return image.level({
4036
inputMin: minMax.min,
4137
inputMax: minMax.max,
4238
outputMin: 0,

0 commit comments

Comments
 (0)