Skip to content

Commit 8c5d698

Browse files
committed
Improve error reporting when copying jpeg files
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent b2ea6f2 commit 8c5d698

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/jpeg.imageio/jpegoutput.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,10 @@ JpgOutput::copy_image(ImageInput* in)
573573
ImageSpec in_spec;
574574
ImageSpec config_spec;
575575
config_spec.attribute("_jpeg:raw", 1);
576-
if (!in->open(in_name, in_spec, config_spec))
576+
if (!in->open(in_name, in_spec, config_spec)) {
577+
errorfmt("{}", in->geterror());
577578
return false;
579+
}
578580

579581
// Re-open the output
580582
std::string out_name = m_filename;

0 commit comments

Comments
 (0)