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
|
use glycin_utils::MemoryFormatSelection;
use utils::*;
mod utils;
#[test]
fn change_memory_format() {
block_on(change_memory_format_internal());
}
async fn change_memory_format_internal() {
for path in [
"test-images/images/color/color.png",
"test-images/images/gray-iccp/gray-iccp-GA16.png",
] {
let file = gio::File::for_path(path);
for memory_format_selection in [
MemoryFormatSelection::A8b8g8r8,
MemoryFormatSelection::R8g8b8,
MemoryFormatSelection::R16g16b16,
] {
let mut loader = glycin::Loader::new(file.clone());
loader.accepted_memory_formats(memory_format_selection);
let image = loader.load().await.unwrap();
image.next_frame().await.unwrap();
}
}
}
|