diff options
author | 2020-10-08 02:04:31 +1100 | |
---|---|---|
committer | 2020-10-08 02:04:31 +1100 | |
commit | b90fd355150a0f56e368bb33619459b19ec92bee (patch) | |
tree | 41ac320a4199b0856a485c9d75458dbc98aa168e /src/tools/regrep.cpp | |
parent | 4b0903bfdbe88d4e220fc2c2f140e7b503060909 (diff) |
Various improvements to image file handling:
Moved MS DIB parser out of ICO file reader and made it available for
artwork and layout images.
Added more efficient I/O and better error checking for JPEG file loading
(MAME will no longer exit immediately on a bad JPEG file).
Made caller responsible for opening files for loading images, to avoid
decompressing images used in ZIP/7z artwork multiple times.
Added support for JPEG and Windows DIB to picture_image_device.
Added support for SVG image files in external artwork.
Added support for using I/O port value for animation state and masking
animation state values.
Made bounds elements more flexible in layouts.
Reworked headers to reduce dependencies.
Updated layout file format documentation.
Diffstat (limited to 'src/tools/regrep.cpp')
-rw-r--r-- | src/tools/regrep.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp index 5bebc733197..49637c2eb16 100644 --- a/src/tools/regrep.cpp +++ b/src/tools/regrep.cpp @@ -748,7 +748,7 @@ static int compare_screenshots(summary_file *curfile) /* if that worked, load the file */ if (filerr == osd_file::error::NONE) { - png_read_bitmap(*file, bitmaps[listnum]); + util::png_read_bitmap(*file, bitmaps[listnum]); file.reset(); } } @@ -835,7 +835,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, int bitmapcount = 0; util::core_file::ptr file; osd_file::error filerr; - png_error pngerr; + util::png_error pngerr; int error = -1; int starty; @@ -855,9 +855,9 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, goto error; /* load the source image */ - pngerr = png_read_bitmap(*file, bitmaps[bitmapcount++]); + pngerr = util::png_read_bitmap(*file, bitmaps[bitmapcount++]); file.reset(); - if (pngerr != PNGERR_NONE) + if (pngerr != util::png_error::NONE) goto error; } @@ -924,9 +924,9 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, filerr = util::core_file::open(dstfilename, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); if (filerr != osd_file::error::NONE) goto error; - pngerr = png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); + pngerr = util::png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); file.reset(); - if (pngerr != PNGERR_NONE) + if (pngerr != util::png_error::NONE) goto error; /* if we get here, we are error free */ |