Registry / Framework

framework · v0.1.0
Hoopoe
Plan a thumbnail and check the decoded pixel buffer against a byte budget.
Use Hoopoe
use vendor::hoopoe::hoopoe;
Run the example
nest demo hoopoe@0.1.0
blyxc native-run hoopoe-demo/main.blyx
Example source and expected output
use vendor::hoopoe::hoopoe;
fn main() {
let width = 400.0;
let height = 200.0;
let box_w = 100.0;
let box_h = 100.0;
let channels = 3.0;
let align = 4.0;
let memory = 14000.0;
let result = hoopoe_thumbnail(width, height, box_w, box_h, channels, align, memory);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
100
50
300
15000
0
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 977d385cad | 8454d6797f2a50d73bfa29a72287e3a0911f79b90155fed6adc265f3e3fee3bd |