This commit is contained in:
2026-07-09 02:59:53 +03:00
commit 7ace048d94
817 changed files with 234289 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
fn main() {
let psd_path = "/home/hc/Pictures/_psd_stil_test/blend.psd";
let layers = hcie_psd::import_psd(std::path::Path::new(psd_path)).unwrap();
for (i, layer) in layers.iter().enumerate() {
println!("Layer {}: '{}' size={}x{}", i, layer.name, layer.width, layer.height);
let mut pixels = vec![];
for y in 0..5.min(layer.height) {
for x in 0..5.min(layer.width) {
let idx = (y * layer.width + x) as usize * 4;
let px = [layer.pixels[idx], layer.pixels[idx+1], layer.pixels[idx+2], layer.pixels[idx+3]];
pixels.push(px);
}
}
println!(" First 5x5 pixels: {:?}", pixels);
}
}