Tankōbon / main/decoder/protocol / DecoderMethods
Interface: DecoderMethods
Defined in: main/decoder/protocol.ts:27
The calls the decoder process answers, as the main process sees them (the arguments, and what the call resolves to). Everything that opens an archive, decodes an image or touches the thumbnail cache goes through here.
Methods
close()
close(
id):void
Defined in: main/decoder/protocol.ts:33
Closes an archive opened with open.
Parameters
id
string
Returns
void
inspect()
inspect(
filePath):ArchiveSummary
Defined in: main/decoder/protocol.ts:35
Opens a file just long enough to count its pages, caching its cover on the way.
Parameters
filePath
string
Returns
measure()
measure(
filePath):PageSizeAverage|null
Defined in: main/decoder/protocol.ts:40
Opens a file just long enough to average its pages' dimensions (read from the image headers; a PDF's from its page boxes). Pages that can't be read are left out of the average; null when none could be.
Parameters
filePath
string
Returns
PageSizeAverage | null
open()
open(
filePath):ArchiveInfo
Defined in: main/decoder/protocol.ts:29
Opens a comic and keeps it open, under the returned handle, until close.
Parameters
filePath
string
Returns
pruneThumbnails()
pruneThumbnails(
filePaths):void
Defined in: main/decoder/protocol.ts:46
Deletes every thumbnail that isn't one of filePaths'.
Parameters
filePaths
string[]
Returns
void
readPage()
readPage(
id,index):ComicPage
Defined in: main/decoder/protocol.ts:31
Reads a page of an archive opened with open.
Parameters
id
string
index
number
Returns
rebuildThumbnails()
rebuildThumbnails(
filePaths):void
Defined in: main/decoder/protocol.ts:48
Brings the thumbnails in line with filePaths (after a JSON import).
Parameters
filePaths
string[]
Returns
void
removeThumbnail()
removeThumbnail(
filePath):void
Defined in: main/decoder/protocol.ts:44
Deletes a book's thumbnail.
Parameters
filePath
string
Returns
void
thumbnail()
thumbnail(
filePath,archiveId?):Uint8Array<ArrayBuffer> |null
Defined in: main/decoder/protocol.ts:42
A book's cover thumbnail, generated first when missing (from the open archive archiveId, if any).
Parameters
filePath
string
archiveId?
string
Returns
Uint8Array<ArrayBuffer> | null