Stable Diffusion - Shared Commands 

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > SD - Stable Diffusion AI > SD - Shared Commands >

 Stable Diffusion - Shared Commands 

SDL.Enshure PNG

Previous Top Next


MiniRobotLanguage (MRL)

 

SDL.Enshure PNG

Ensures the graphic file is converted to PNG format and optionally resizes it.

 

 

Intention

 

The SDL.Ensure PNG command is designed to take an original graphic file in any of the BMP, JPG, or PNG formats and convert it to PNG format.

Optionally, it can also resize the graphic to the given dimensions.

This command is particularly useful for preparing images for other commands that specifically require the PNG format or a particular size.

The original file will not be modified; a new PNG file will be created.

 

 

 

Syntax

 

 

SDL.Ensure PNG|P1[|P2][|P3][|P4]

 

 

Parameter Explanation

 

P1: (Required) Filepath and name of the original input graphic file. The file should be in any of the BMP, JPG, or PNG formats.

 

P2: (Optional) The desired width (XSize) for the resized image. If P2 or P3 are "0," the image will not be resized.

 

P3: (Optional) The desired height (YSize) for the resized image. If P2 or P3 are "0," the image will not be resized.

 

P4: (Optional) A variable that will be used to store the filepath of the converted and optionally resized PNG file.
     If P4 is omitted, the result is placed on TOS.

 

 

 

 

Example

 

'***********************************

' SDL.-Sample for ensuring PNG format and size

'***********************************

SDL.Ensure PNG|C:\Images\Original.jpg|800|600|$$RES

' The original JPG image will be converted to PNG format and resized to 800x600.

' $$RES will contain a path to the temporary PNG-file for use with IMG2IMG or whatever

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: