Skip to content

Instantly share code, notes, and snippets.

View hjanuschka's full-sized avatar
🤖
-.-

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
@hjanuschka
hjanuschka / jxl_cmyk_icc_regression_test.cc
Last active March 31, 2026 22:05
Chromium JXL regression test: incremental CMYK ICC metadata visibility (crbug.com/498155364)
// Source: chromium/src/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder_test.cc
// Regression test for crbug.com/498155364.
// With incremental input, basic image info should not become observable before
// the embedded ICC profile is parsed.
TEST_F(JXLImageDecoderTest, DecodeCmykIccProfileIncrementalNoCrash) {
scoped_refptr<SharedBuffer> full_data =
ReadFileToSharedBuffer(kJxlTestDir, "conformance_cmyk_layers.jxl");
ASSERT_TRUE(full_data);
Vector<char> full_data_vec = full_data->CopyAs<Vector<char>>();
@hjanuschka
hjanuschka / render_i480978106_macos.sh
Created March 27, 2026 14:30
Render i-480978106 page screenshot on macOS with headless Chrome/Chromium
#!/usr/bin/env bash
set -euo pipefail
# Usage:
# ./render_i480978106_macos.sh [page_path_or_url] [output_png]
#
# Examples:
# ./render_i480978106_macos.sh
# ./render_i480978106_macos.sh ~/my-host/static-files/i-480978106/index.html
# ./render_i480978106_macos.sh https://static.januschka.com/i-480978106/
@hjanuschka
hjanuschka / chrome-146-downloads.md
Created March 24, 2026 07:36
Chrome 146.0.7680.x Windows Download Links

Chrome 146.0.7680.x — Windows Download Links

All versions share revision 1582197 (M146 branch base).


Chrome for Testing (exact version builds)

146.0.7680.31

@hjanuschka
hjanuschka / use-local-jxl-rs.sh
Created March 12, 2026 08:07
Script to switch Chromium between vendored and local jxl-rs checkout (symlinks, bisect, override)
#!/bin/bash
# Switch Chromium to use local jxl-rs checkout for development
# Usage: ./use-local-jxl-rs.sh [setup|restore|status|clean|bisect|override]
set -e
CHROMIUM_SRC="/home/chrome/chromium_2/src"
CHROMIUM_VENDOR="$CHROMIUM_SRC/third_party/rust/chromium_crates_io/vendor"
LOCAL_JXL="$HOME/jxl-rs_1"
BUILD_GN="$CHROMIUM_SRC/third_party/rust/jxl/v0_3/BUILD.gn"
@hjanuschka
hjanuschka / jxl-decoder-rewrite.patch
Created March 12, 2026 07:51
JXL decoder: use frame scanner + seeking for animations, progressive flush
diff --git a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
index 5cadd5f76b2b7..995f304d6fffa 100644
--- a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
+++ b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
@@ -16,20 +16,21 @@
namespace blink {
using jxl_rs::jxl_rs_decoder_create;
+using jxl_rs::jxl_rs_frame_scanner_create;
using jxl_rs::jxl_rs_signature_check;
@hjanuschka
hjanuschka / lock.html
Last active February 16, 2026 01:22
screen.orientation.lock() tester for DevTools device emulation (crbug.com/40807290)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>screen.orientation.lock() Test</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
@hjanuschka
hjanuschka / joomla3-fix.patch
Created February 12, 2026 07:55
Fix Joomla 3.x compatibility for captcha.eu plugin - adds fallback for getWebAssetManager()
diff --git a/captcha_eu.php b/captcha_eu.php
index e73a26a..72e549d 100644
--- a/captcha_eu.php
+++ b/captcha_eu.php
@@ -88,10 +88,16 @@ class PlgCaptchacaptcha_eu extends CMSPlugin
$sdkSrc = 'https://www.captcha.eu/sdk.js';
- // Load assets, the callback should be first
- $this->app->getDocument()->getWebAssetManager()
@hjanuschka
hjanuschka / screenshot-2026-02-06_17-32-27.md
Created February 6, 2026 16:33
Wayland app window bubble positioning

screenshot-2026-02-06_17-32-27

@hjanuschka
hjanuschka / pdf-jxl-README.md
Created February 2, 2026 11:31
PDFium JXL-in-PDF bringup artifacts (tar.gz base64)

PDFium JXL-in-PDF bringup artifacts

This gist contains the PDFs + rendered PNG outputs from ~/pdf-jxl/.

Because GitHub gists (via gh gist) don’t support uploading binary files directly, the artifacts are bundled as a tarball and base64-encoded.

Contents

The tarball contains:

  • pdf-jxl/zoltan-jxldecode.pdf
  • pdf-jxl/zoltan-jxldecode.pdf.0.png
@hjanuschka
hjanuschka / jxl-pdfium-one-pager.md
Last active February 2, 2026 09:57
Design Doc: JPEG XL (JXL) image support in PDFium (Rust-only)

One-page overview: JPEG XL (JXL) image decoding in PDFium (jxl-rs, Rust-only)

Overview

Add JPEG XL (JXL) image decoding support to PDFium using jxl-rs, a pure Rust decoder. This enables PDFs that embed JXL-compressed image XObjects (per the upcoming PDF Association / ISO standardization work) to render correctly in PDFium.

JXL benefits:

  • 30–50% better compression than JPEG (typical for photographic content)
  • Lossless JPEG transcoding (recompress JPEG sources without generation loss)
  • Progressive decoding