1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use ;
use crateMediaObject;
/// Creates a `MediaObject` from the file at the specified path.
///
/// # Parameters
///
/// - `path`: A reference to a path from which to create the `MediaObject`.
///
/// # Returns
///
/// Returns a `MediaObject` populated with the image data, name, and title
/// extracted from the file at the specified path.
///
/// # Panics
///
/// This function will panic if the file cannot be read, as it calls `unwrap()`
/// on the result of `get_binary_data(path)`. Ensure that the file exists and is
/// readable before calling this function.
///
/// # Example
///
/// ```rust,no_run
/// # use umya_spreadsheet::helper::binary::make_media_object;
/// let media_object = make_media_object("path/to/image.png");
/// ```