DocumentImage.fromFile Method¶
Module: DocumentImage
Definition¶
Creates an Image from the specified file.
@staticmethod
from_file(filepath: str, pixel_format: PixelFormat) -> DocumentImage
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 document image.
Exceptions
An error has occurred during Document Library execution.
static DocumentImage 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 document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage 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 document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage fromFile(String filepath, PixelFormat pixelFormat) throws DocumentException
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 document image.
Exceptions
An error has occurred during Document Library execution.
public static func fromFile(filepath: String, pixelFormat: PixelFormat) throws -> DocumentImage
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 document image.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentImage_FromFile (
ID3_DOCUMENT_IMAGE hDocumentImage,
const char * filepath,
id3DocumentPixelFormat ePixelFormat)
Parameters
hDocumentImage
ID3_DOCUMENT_IMAGEin Handle to the DocumentImage object.filepath
const char *in A string that contains the name of the file from which to create the Image.ePixelFormat
id3DocumentPixelFormatin The pixel format into which to convert the input image.
Returns