Merge pull request #324 from ethanpailes/document-image-format-guessing
document that img handle constructors guess fmt
This commit is contained in:
commit
e0aa89cee7
@ -123,6 +123,8 @@ pub struct Handle {
|
|||||||
impl Handle {
|
impl Handle {
|
||||||
/// Creates an image [`Handle`] pointing to the image of the given path.
|
/// Creates an image [`Handle`] pointing to the image of the given path.
|
||||||
///
|
///
|
||||||
|
/// Makes an educated guess about the image format by examining the data in the file.
|
||||||
|
///
|
||||||
/// [`Handle`]: struct.Handle.html
|
/// [`Handle`]: struct.Handle.html
|
||||||
pub fn from_path<T: Into<PathBuf>>(path: T) -> Handle {
|
pub fn from_path<T: Into<PathBuf>>(path: T) -> Handle {
|
||||||
Self::from_data(Data::Path(path.into()))
|
Self::from_data(Data::Path(path.into()))
|
||||||
@ -145,6 +147,8 @@ impl Handle {
|
|||||||
|
|
||||||
/// Creates an image [`Handle`] containing the image data directly.
|
/// Creates an image [`Handle`] containing the image data directly.
|
||||||
///
|
///
|
||||||
|
/// Makes an educated guess about the image format by examining the given data.
|
||||||
|
///
|
||||||
/// This is useful if you already have your image loaded in-memory, maybe
|
/// This is useful if you already have your image loaded in-memory, maybe
|
||||||
/// because you downloaded or generated it procedurally.
|
/// because you downloaded or generated it procedurally.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user