mirror of
https://git.coom.tech/fuckjannies/lolipiss.git
synced 2024-06-27 05:02:35 +00:00
Fix PNG embedding
This commit is contained in:
parent
32e897ba66
commit
ce67bff719
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name PNGExtraEmbed
|
// @name PNGExtraEmbed
|
||||||
// @namespace https://coom.tech/
|
// @namespace https://coom.tech/
|
||||||
// @version 0.133
|
// @version 0.135
|
||||||
// @description uhh
|
// @description uhh
|
||||||
// @author You
|
// @author You
|
||||||
// @match https://boards.4channel.org/*
|
// @match https://boards.4channel.org/*
|
||||||
|
|
505
main.user.js
505
main.user.js
File diff suppressed because it is too large
Load Diff
|
@ -70,11 +70,11 @@ export class PNGEncoder {
|
||||||
|
|
||||||
async insertchunk(chunk: PNGChunk) {
|
async insertchunk(chunk: PNGChunk) {
|
||||||
const b = Buffer.alloc(4);
|
const b = Buffer.alloc(4);
|
||||||
b.writeInt32BE(chunk[1].length - 4, 0);
|
const buff = await chunk[1]();
|
||||||
|
b.writeInt32BE(buff.length - 4, 0);
|
||||||
await this.writer.write(b); // write length
|
await this.writer.write(b); // write length
|
||||||
const buff = chunk[1];
|
await this.writer.write(buff); // chunk includes chunkname
|
||||||
await this.writer.write(await buff()); // chunk includes chunkname
|
b.writeInt32BE(buf(buff), 0);
|
||||||
b.writeInt32BE(buf(await buff()), 0);
|
|
||||||
await this.writer.write(b);
|
await this.writer.write(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user