Files
hcie-rust-v3.05/hcie-io/examples/dump_effects.rs
T

26 lines
1.1 KiB
Rust
Raw Normal View History

2026-07-09 02:59:53 +03:00
fn main() {
let paths = [
"/home/hc/Pictures/_psd_stil_test/test_2/Emboss.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/inner bevel.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/drop shadow.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/inner glow.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/inner shadow.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/stroke.psd",
"/home/hc/Pictures/_psd_stil_test/test_2/test_2.psd",
];
for path in &paths {
println!("\n=== {} ===", std::path::Path::new(path).file_name().unwrap().to_str().unwrap());
let layers = match hcie_psd::import_psd(std::path::Path::new(path)) {
Ok(l) => l,
Err(e) => { println!(" FAILED: {}", e); continue; }
};
for l in &layers {
println!(" Layer: '{}' {}x{} visible={} effects={}", l.name, l.width, l.height, l.visible, l.effects.len());
for e in &l.effects {
println!(" {} enabled={}", e.effect_name(), e.is_enabled());
println!(" {:?}", e);
}
}
}
}