Compare commits
1
Commits
3fb630d699
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5a588177c |
@@ -787,12 +787,13 @@ describe("fixMissingThumbnails", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("re-encodes smaller until the thumbnail fits the recorded size", async () => {
|
it("re-encodes smaller until the thumbnail fits the recorded size", async () => {
|
||||||
// A noisy 400x300 JPEG, which the default encoding (quality 50, not
|
// A noisy 64x48 JPEG, which the default encoding (quality 50, not
|
||||||
// resized because it is under 720 px) cannot compress below the size
|
// resized because it is under 720 px) cannot compress below the size
|
||||||
// recorded here: one byte less than that encoding's ciphertext.
|
// recorded here: one byte less than that encoding's ciphertext. It is
|
||||||
|
// small so that each encode is quick even on a busy host.
|
||||||
const fixMock = await buildThumbMock();
|
const fixMock = await buildThumbMock();
|
||||||
const w = 400;
|
const w = 64;
|
||||||
const h = 300;
|
const h = 48;
|
||||||
const noisy = new Uint8Array(
|
const noisy = new Uint8Array(
|
||||||
jpegJs.encode(
|
jpegJs.encode(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user