Skip to content

Conversation

calixteman
Copy link
Contributor

@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cea084a2bc7b6d8/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/00e240ae2a6a2ee/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/00e240ae2a6a2ee/output.txt

Total script time: 30.57 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/cea084a2bc7b6d8/output.txt

Total script time: 61.89 mins

  • Unit tests: FAILED
  • Integration Tests: FAILED
  • Regression tests: Passed

@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/e4ab79863b04e50/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/e4ab79863b04e50/output.txt

Total script time: 0.96 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this locally it's obviously really fast, however it does seem to regress the improved colors from PR #19620 since the conversion used in cmyk_convert_bgra appears to be too simplistic compared to using an actual ICC profile.

Edit: The colors even seem "worse" than with our DeviceCmykCS implementation.

@maettuu
Copy link
Contributor

maettuu commented Jul 20, 2025

Hi! 🤖 The test below is automatically generated and could serve as a regression test for this PR because it:

  • passes in the new codebase after the PR, and
  • fails in the old codebase before the PR.
import { JpegStream } from "../../src/core/jpeg_stream.js";
import { JpegImage }  from "../../src/core/jpg.js";

describe("JpegImage", function () {
  it("should support decoding CMYK JPEG images using ImageDecoder", async function () {
    const cmykJpegData = new Uint8Array([0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10,
      0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60, 0x00, 0x60,
      0x00, 0x00, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x10, 0x04,
      0x01, 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0x04, 0x11, 0x01,
      0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00,
      0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9]);
    JpegStream.setOptions({ isImageDecoderSupported: true });

    const jpegInfo = JpegImage.canUseImageDecoder(cmykJpegData);
    const expected = { cmyk: true };
    const actual = jpegInfo;

    expect(actual).toEqual(expected);
  });
});

If you find this regression test useful, feel free to insert it to your test suite.
Our automated pipeline inserted the test in a new file test/unit/jpg_spec.js before running it (no fitting file was found).

This is part of our research at the ZEST group of University of Zurich in collaboration with Mozilla.
If you have any suggestions, questions, or simply want to learn more, feel free to contact us at [email protected] and [email protected].

Click to see the test patch.
diff --git a/jpg_spec.js b/jpg_spec.js
new file mode 100644
index 0000000..81499f1
--- /dev/null
+++ b/jpg_spec.js
@@ -0,0 +1,20 @@
+import { JpegStream } from "../../src/core/jpeg_stream.js";
+import { JpegImage }  from "../../src/core/jpg.js";
+
+describe("JpegImage", function () {
+  it("should support decoding CMYK JPEG images using ImageDecoder", async function () {
+    const cmykJpegData = new Uint8Array([0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10,
+      0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60, 0x00, 0x60,
+      0x00, 0x00, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x10, 0x04,
+      0x01, 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0x04, 0x11, 0x01,
+      0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00,
+      0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9]);
+    JpegStream.setOptions({ isImageDecoderSupported: true });
+
+    const jpegInfo = JpegImage.canUseImageDecoder(cmykJpegData);
+    const expected = { cmyk: true };
+    const actual = jpegInfo;
+
+    expect(actual).toEqual(expected);
+  });
+});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants