image
Module to create a FreeWili image file.
- freewili.image.convert(input_file: Path, output_file: Path) Ok[str] | Err[str]
Convert a PNG or JPEG image to a FreeWili image file (fwi extension).
Parameters:
- input_filepathlib.Path:
Path to the input image file (PNG or JPEG).
- output_filepathlib.Path:
Path to the output image file (.fwi).
Returns:
- Result[str, str]:
Ok(str) if the command was sent successfully, Err(str) if not.
Image Example
Convert an image to an fwi file
from freewili.image import convert
# Convert PNG to FWI
match image.convert("my_image.png", "my_image.fwi"):
case Ok(msg):
print(msg)
case Err(msg):
exit_with_error(msg)