Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,29 @@ import CommonFormats from "src/CommonFormats.ts";
class dummyHandler implements FormatHandler {

public name: string = "dummy";
public supportedFormats?: FileFormat[];
public supportedFormats: FileFormat[] = [
// Example PNG format, with both input and output disabled
CommonFormats.PNG.builder("png")
.markLossless()
.allowFrom(false)
.allowTo(false),

// Alternatively, if you need a custom format, define it like so:
{
name: "CompuServe Graphics Interchange Format (GIF)",
format: "gif",
extension: "gif",
mime: "image/gif",
from: false,
to: false,
internal: "gif",
category: ["image", "video"],
lossless: false
},
];
public ready: boolean = false;

async init () {
this.supportedFormats = [
// Example PNG format, with both input and output disabled
CommonFormats.PNG.builder("png")
.markLossless()
.allowFrom(false)
.allowTo(false),

// Alternatively, if you need a custom format, define it like so:
{
name: "CompuServe Graphics Interchange Format (GIF)",
format: "gif",
extension: "gif",
mime: "image/gif",
from: false,
to: false,
internal: "gif",
category: ["image", "video"],
lossless: false
},
];
this.ready = true;
}

Expand Down
Loading