Skip to content

Commit

Permalink
Make it more clear that only icc and icm are allowed as color profile…
Browse files Browse the repository at this point in the history
… names (#190).
  • Loading branch information
dlemstra committed Dec 4, 2024
1 parent 9edf506 commit abfa06f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/profiles/color/color-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ColorProfile extends ImageProfile implements IColorProfile {
private _data?: ColorProfileData;

constructor(data: Uint8Array);
constructor(name: string, data: Uint8Array);
constructor(name: 'icm' | 'icc', data: Uint8Array);
constructor(nameOrData: string | Uint8Array, dataOrUndefined?: Uint8Array) {
const name = typeof nameOrData === 'string' ? nameOrData : 'icc';
const data = typeof nameOrData !== 'string' ? nameOrData : dataOrUndefined!;
Expand Down

0 comments on commit abfa06f

Please sign in to comment.