Image.fromFile Method¶
Module: Image
Definition¶
Creates an Image from the specified file.
@staticmethod
from_file(filepath: str, pixel_format: PixelFormat) -> Image
Parameters
filepath
strin A string that contains the name of the file from which to create the Image.pixel_format
PixelFormatin The pixel format into which to convert the input image.
Returns
The newly created image.
Exceptions
An error has occurred during Face Library execution.
static Image fromFile(String? filepath, PixelFormat pixelFormat)
Parameters
filepath
Stringin A string that contains the name of the file from which to create the Image.pixelFormat
PixelFormatin The pixel format into which to convert the input image.
Returns
The newly created image.
Exceptions
An error has occurred during Face Library execution.
public static Image FromFile(string filepath, PixelFormat pixelFormat)
Parameters
filepath
stringin A string that contains the name of the file from which to create the Image.pixelFormat
PixelFormatin The pixel format into which to convert the input image.
Returns
The newly created image.
Exceptions
An error has occurred during Face Library execution.
public static Image fromFile(String filepath, PixelFormat pixelFormat) throws FaceException
Parameters
filepath
Stringin A string that contains the name of the file from which to create the Image.pixelFormat
PixelFormatin The pixel format into which to convert the input image.
Returns
The newly created image.
Exceptions
An error has occurred during Face Library execution.
public static func fromFile(filepath: String, pixelFormat: PixelFormat) throws -> Image
Parameters
filepath
Stringin A string that contains the name of the file from which to create the Image.pixelFormat
PixelFormatin The pixel format into which to convert the input image.
Returns
The newly created image.
Exceptions
An error has occurred during Face Library execution.
int id3FaceImage_FromFile (
ID3_FACE_IMAGE hImage,
const char * filepath,
id3FacePixelFormat ePixelFormat)
Parameters
hImage
ID3_FACE_IMAGEin Handle to the Image object.filepath
const char *in A string that contains the name of the file from which to create the Image.ePixelFormat
id3FacePixelFormatin The pixel format into which to convert the input image.
Returns