[ref] apng typing
This commit is contained in:
@@ -4,6 +4,7 @@ import { v4 } from "uuid";
|
||||
import { DataBase } from "./storage/database";
|
||||
import { get } from "svelte/store";
|
||||
import { isAPNG } from "./parser";
|
||||
import { PngChunk } from "./pngChunk";
|
||||
|
||||
const inlayStorage = localforage.createInstance({
|
||||
name: 'inlay',
|
||||
@@ -100,7 +101,7 @@ export function supportsInlayImage(){
|
||||
|
||||
export async function reencodeImage(img:Uint8Array){
|
||||
if(isAPNG(img)){
|
||||
return img
|
||||
return PngChunk.write(img, {}) as Promise<Buffer>
|
||||
}
|
||||
const canvas = document.createElement('canvas')
|
||||
const imgObj = new Image()
|
||||
|
||||
Reference in New Issue
Block a user