Skip to content

Commit ec222b7

Browse files
committed
fix: shorten default creation software tag
fixes the creation software being truncated in TGA files
1 parent 0793e7e commit ec222b7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/metadata.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface Metadata {
2626
copyright?: string;
2727
/** The image's creation time. Default: now */
2828
creationTime?: string | number | Date;
29-
/** The software used to create the image. Default: `'github.com/imagescript/ImageScript vX.X.X'`, `''` leaves it out */
29+
/** The software used to create the image. Default: `'ImageScript vX.X.X'`, `''` leaves it out */
3030
software?: string;
3131
/** A disclaimer for the image */
3232
disclaimer?: string;
@@ -68,7 +68,7 @@ export function resolveMetadata(metadata: Metadata = {}): ResolvedMetadata {
6868

6969
const resolved: ResolvedMetadata = { creationTime: time };
7070
for (const key of TEXT_FIELDS) {
71-
const value = key === 'software' && software === undefined ? `github.com/imagescript/ImageScript v${VERSION}` : metadata?.[key];
71+
const value = key === 'software' && software === undefined ? `ImageScript v${VERSION}` : metadata?.[key];
7272
if (value) resolved[key] = String(value);
7373
}
7474
return resolved;

‎tests/metadata.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const latin1 = (data, text) => Buffer.from(data).includes(Buffer.from(text, 'lat
1010

1111
(async () => {
1212
const {VERSION} = await import('../dist/version.js');
13-
const software = `github.com/imagescript/ImageScript v${VERSION}`;
13+
const software = `ImageScript v${VERSION}`;
1414
const image = new Image(8, 4).fill(0xff000080);
1515
const animation = new Animation([Frame.from(image, 100), Frame.from(new Image(8, 4).fill(0x00ff00ff), 100)]);
1616

0 commit comments

Comments
 (0)