mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Mention libpng in its internal warning and error messages
This commit is contained in:
@@ -31,15 +31,19 @@ struct Input {
|
|||||||
|
|
||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
static void handleError(png_structp png, char const *msg) {
|
static void handleError(png_structp png, char const *msg) {
|
||||||
Input const &input = *reinterpret_cast<Input *>(png_get_error_ptr(png));
|
fatal(
|
||||||
|
"libpng error while reading PNG image (\"%s\"): %s",
|
||||||
fatal("Error reading PNG image (\"%s\"): %s", input.filename, msg);
|
reinterpret_cast<Input *>(png_get_error_ptr(png))->filename,
|
||||||
|
msg
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleWarning(png_structp png, char const *msg) {
|
static void handleWarning(png_structp png, char const *msg) {
|
||||||
Input const &input = *reinterpret_cast<Input *>(png_get_error_ptr(png));
|
warnx(
|
||||||
|
"libpng found while reading PNG image (\"%s\"): %s",
|
||||||
warnx("In PNG image (\"%s\"): %s", input.filename, msg);
|
reinterpret_cast<Input *>(png_get_error_ptr(png))->filename,
|
||||||
|
msg
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void readData(png_structp png, png_bytep data, size_t length) {
|
static void readData(png_structp png, png_bytep data, size_t length) {
|
||||||
|
|||||||
@@ -61,16 +61,16 @@ static std::vector<uint8_t> readInto(std::string const &path) {
|
|||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
static void pngError(png_structp png, char const *msg) {
|
static void pngError(png_structp png, char const *msg) {
|
||||||
fatal(
|
fatal(
|
||||||
"Error writing reversed image (\"%s\"): %s",
|
"libpng error while writing reversed image (\"%s\"): %s",
|
||||||
static_cast<char const *>(png_get_error_ptr(png)),
|
reinterpret_cast<char const *>(png_get_error_ptr(png)),
|
||||||
msg
|
msg
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pngWarning(png_structp png, char const *msg) {
|
static void pngWarning(png_structp png, char const *msg) {
|
||||||
warnx(
|
warnx(
|
||||||
"While writing reversed image (\"%s\"): %s",
|
"libpng found while writing reversed image (\"%s\"): %s",
|
||||||
static_cast<char const *>(png_get_error_ptr(png)),
|
reinterpret_cast<char const *>(png_get_error_ptr(png)),
|
||||||
msg
|
msg
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
FATAL: Error reading PNG image ("damaged1.png"): IDAT: invalid code -- missing end-of-block
|
FATAL: libpng error while reading PNG image ("damaged1.png"): IDAT: invalid code -- missing end-of-block
|
||||||
Conversion aborted after 1 error
|
Conversion aborted after 1 error
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
FATAL: Error reading PNG image ("damaged2.png"): IDAT: invalid code -- missing end-of-block
|
FATAL: libpng error while reading PNG image ("damaged2.png"): IDAT: invalid code -- missing end-of-block
|
||||||
Conversion aborted after 1 error
|
Conversion aborted after 1 error
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
FATAL: Error reading PNG image ("damaged9.png"): IDAT: invalid code -- missing end-of-block
|
FATAL: libpng error while reading PNG image ("damaged9.png"): IDAT: invalid code -- missing end-of-block
|
||||||
Conversion aborted after 1 error
|
Conversion aborted after 1 error
|
||||||
|
|||||||
Reference in New Issue
Block a user