From b6b6c9b15c34471fd3938bdb9715754f09f10e00 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 13 Apr 2023 05:49:05 +1000 Subject: Allow loading PNG/JPEG/MS DIB bitmaps from Lua, and cleanup. Use VirtualAlloc rather than VirtualProtect on Windows to change page protection, as the latter can cause severe performance issues with some antivirus software. Added noexcept to lots of hash- and bitmap-related things, and added a little more error checking. Yes, I realise it will abort if an allocation fails while printing a log message, but if you get to that point, you're probably screwed already. --- docs/source/techspecs/luareference.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/source/techspecs') diff --git a/docs/source/techspecs/luareference.rst b/docs/source/techspecs/luareference.rst index 967fc889729..18af28b5c2a 100644 --- a/docs/source/techspecs/luareference.rst +++ b/docs/source/techspecs/luareference.rst @@ -3209,6 +3209,10 @@ emu.bitmap_argb32(source, [x0, y0, x1, y1]) The source bitmap must be owned by the Lua script and must use the ARGB format. Raises an error if coordinates are specified representing a rectangle not fully contained within the source bitmap’s clipping rectangle. +emu.bitmap_argb32.load(data) + Creates an ARGB format bitmap from data in PNG, JPEG (JFIF/EXIF) or + Microsoft DIB (BMP) format. Raises an error if the data invalid or not a + supported format. Methods ^^^^^^^ -- cgit v1.2.3-70-g09d2