avif support

This commit is contained in:
monoid 2024-09-28 23:50:54 +09:00
parent 8fece9090f
commit e5d410d809
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ interface ComicDesc {
character?: string[];
tags?: string[];
}
const ImageExt = [".gif", ".png", ".jpeg", ".bmp", ".webp", ".jpg"];
const ImageExt = [".gif", ".png", ".jpeg", ".bmp", ".webp", ".jpg", ".avif"];
export class ComicReferrer extends createDefaultClass("comic") {
desc: ComicDesc | undefined;
pagenum: number;

View File

@ -68,7 +68,7 @@ function releaseZip(path: string) {
}
async function renderZipImage(ctx: Context, path: string, page: number) {
const image_ext = ["gif", "png", "jpeg", "bmp", "webp", "jpg"];
const image_ext = ["gif", "png", "jpeg", "bmp", "webp", "jpg", "avif"];
const marked = markUseZip(path);
const zip = await acquireZip(path, marked);
const entries = (await entriesByNaturalOrder(zip)).filter((x) => {