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
49
50
51
52
53
54
55
56
57
58
// SPDX-License-Identifier: MIT
//
// Copyright 2016-2026, Johann Tuffe.
//! Demonstrates reading pictures/images and their metadata from an XLSX file
//! using the `picture` feature.
//!
//! Each [`Picture`] returned by [`Reader::pictures_with_metadata`] contains the
//! raw image bytes, the file extension, the worksheet name, and the anchor cell
//! position (row and column, both 0-based).
//!
//! The sample file used here contains three PNG images on Sheet1:
//!
//! - Two images inserted **in-cell** (Excel 365 rich-data style) at rows 0 and 2.
//! - One image inserted **over-cell** (classic DrawingML anchor) at row 8, col 4.
//!
//! Run the example like this (the `picture` feature must be enabled):
//!
//! ```text
//! $ cargo run -q --example read_picture_data --features picture
//!
//! Found 3 picture(s) in "tests/pictures_in_cell_and_over_cell.xlsx":
//!
//! Sheet: "Sheet1", Cell: (8, 4), Type: png, Size: 200 bytes
//! Sheet: "Sheet1", Cell: (0, 0), Type: png, Size: 200 bytes
//! Sheet: "Sheet1", Cell: (2, 0), Type: png, Size: 178 bytes
//! ```
use ;