[↑]
SmileBASIC4 Replica Reference
SAVEG
1. Save Graphic Page Contents to File

SAVEG "[FileType:]FileName",GraphicPage[,StartPointX,StartPointY,Width,Height]

・When overwriting, the file before overwriting is saved as @BACKUP.GRP.
・The execution result can be obtained with the RESULT function.
・The value of RESULT is 1 for success, 0 for failure, and -1 for cancellation.

Arguments

FileType

Only GRP can be specified

・If not specified, GRP is specified.

FileName

Name to give the save file

GraphicPages

Graphic pages to save: 0-5

StartPointX,StartPointY

Specify the upper left coordinate of the area you want to save (0 and 2047 for both X and Y)

・If not specified, 0,0 is specified.

Width,Height

Specify the size of the area you want to save (both width and height are 1 to 2048)

・An error occurs if the result of adding the start point X and width or the start point Y and height exceeds 2048.
・If not specified, 2048,2048 is specified.

Example

SAVEG "GRP:GAZOU",0
SAVEG "GAZOU_ICHIBU",3,100,100,300,300
2. Save the Contents of a Graphic Page to a File in High Compression Format

SAVEG "JPG:FileName",GraphicPage[,StartPointX,StartPointY,Width,Height] [,CompressionAmount]

・The high compression format can be saved in a smaller file than the normal compression format, but the image quality decreases each time when it is saved (lossy compression).
・When overwriting, the file before overwriting is saved as @BACKUP.JPG.
・The execution result can be obtained with the RESULT function.
・The value of RESULT is 1 for success, 0 for failure, and -1 for cancellation.

Arguments

FileType

Only JPG can be specified

FileName

Name to give the save file

GraphicPages

Graphic pages to save: 0-5

StartPointX,StartPointY

Specify the upper left coordinate of the area you want to save (0 and 2047 for both X and Y)

・If not specified, 0,0 is specified.

Width,Height

Specify the size of the area you want to save (both width and height are 1 to 2048)

・An error occurs if the result of adding the start point X and width or the start point Y and height exceeds 2048.
・If not specified, 2048,2048 is specified.

CompressionAmount

Specify a value that represents the compression amount and image quality (1 to 100)

・The smaller the number, the higher the compression ratio, but the image quality decreases.
・The default is 60.

Example

SAVEG "JPG:GAZOU",0,80
SAVEG "JPG:GAZOU_ICHIBU",3,100,100,300,300
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|