Commit 16c77b96 authored by ROOL's avatar ROOL 🤖
Browse files

Fix for error with PNG write at 8bpp or lower

Detail:
  Outputting a PNG via the desktop frontend at 8bpp or lower would report
  an 'Undimensioned array' error because the colourindex arrays were missing.
  Temporarily create these during the save operation.

Version 1.65. Tagged as 'ChangeFSI-1_65'
parent 61dc9f3e
/* (1.64)
/* (1.65)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.64
#define Module_MajorVersion_CMHG 1.65
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Feb 2021
#define Module_Date_CMHG 13 Mar 2021
#define Module_MajorVersion "1.64"
#define Module_Version 164
#define Module_MajorVersion "1.65"
#define Module_Version 165
#define Module_MinorVersion ""
#define Module_Date "20 Feb 2021"
#define Module_Date "13 Mar 2021"
#define Module_ApplicationDate "20-Feb-21"
#define Module_ApplicationDate "13-Mar-21"
#define Module_ComponentName "ChangeFSI"
#define Module_FullVersion "1.64"
#define Module_HelpVersion "1.64 (20 Feb 2021)"
#define Module_LibraryVersionInfo "1:64"
#define Module_FullVersion "1.65"
#define Module_HelpVersion "1.65 (13 Mar 2021)"
#define Module_LibraryVersionInfo "1:65"
......@@ -410,8 +410,7 @@ DEF PROCreceive(q%)
CASE imgsave% OF
WHEN 0:SYS "OS_File",10,FNZS(q%+44),&c85,,sar%,sar%+jpegsize%
WHEN 1:SYS &2E,&10C,sar%,FNZS(q%+44)
WHEN 2:base%=sar%
IF FNcreatePNG(FNZS(q%+44))
WHEN 2:base%=sar%:PROCsavepng(FNZS(q%+44))
ENDCASE
$adsave%=FNZS(q%+44)
q%!12=q%!8
......@@ -818,12 +817,21 @@ DEF PROCsavesprite
CASE imgsave% OF
WHEN 0:SYS "OS_File",10,$adsave%,&c85,,sar%,sar%+jpegsize%
WHEN 1:SYS &2E,&10C,sar%,$adsave%
WHEN 2:base%=sar%:IF FNcreatePNG($adsave%)
WHEN 2:base%=sar%:PROCsavepng($adsave%)
ENDCASE
SYS CrMenu,,-1
ENDPROC
:
REM
DEF PROCsavepng(filename$)
REM When calling from the front end we need to make
REM sure that the palette arrays are available
LOCAL r%(),g%(),b%()
DIM r%(255),g%(255),b%(255)
IF FNcreatePNG(filename$)
ENDPROC
:
REM
DEF PROCcheckmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
LOCAL moved%,sqr$,imenu$,pmenu$,spropt%,jpegopt%,pngopt%
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment