Libpng interlace warning

Offen
#2,117 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 5 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
18/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
php
Bereich
backend

Rechercherichtung

The payload names no source file; the only entry points are the reproduction's $mpdf->WriteHTML($html) call and the <img> tag with an interlaced PNG. Start by reproducing the libpng warning with the snippet, then find where mPDF reads PNG images and where libpng's read-image call is made. Done means the warning no longer appears for an interlaced PNG and the output PDF still embeds the image. The issue doesn't say what the expected fix is, so confirm the approach with maintainers first.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Guidelines
Description of the bug

When generating a PDF containing an interlaced PNG image, I get this warning:

libpng warning: Interlace handling should be turned on when using png_read_image

It's the same problem reported in issue #1589. The issue it's closed, but I still get the warning.
The output only contains the message, with no indication of where in the code it occurs.

I can't edit the png, along with all the HTML code, because it comes from a remote source that isn't mine.

In the PHP example to reproduce the error, I simplified the HTML source for testing purposes.

mPDF version

8.2.5

PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)

PHP 8.2 / PHP 8.3

Reproducible PHP+CSS+HTML snippet suffering by the error
<?php

// S

<img width="320" height="68" alt="Image" src="https://github.com/user-attachments/assets/8bfc112a-1d24-4df5-983b-3a1ab6b2d223" />

implified code for testing, in my real environment all html comes from a remote source.

require_once __DIR__ . '/vendor/autoload.php';

$html = '<html><head><title>test</title><body><img src="https://www.forthrightassets.com/images/FORUM_2022_DocLogo.png"></body></html>';
$mpdf = new \Mpdf\Mpdf;
$mpdf->WriteHTML($html);
$mpdf->Output(__DIR__ . '/test.pdf', 'F');
Vorherrschende Sprache
PHP
Sterne
4.7k
Forks
1.1k
Ø Merge
6 T. 11 Std.
Gemergte PRs (30 T.)
4

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus mpdf/mpdf

Alle Issues in mpdf/mpdf

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.