Remove byte from array?
in
Programming Questions
•
5 months ago
- void setup() {
size(200, 200);
// Open a file and read its binary data
byte b[] = loadBytes("veil.jpg");
println(b.length);
for (int out_count = 0; out_count < 100; out_count++) {
for (int i = 0; i < 1; i++) {
b.splice(int(random(0, b.length)), 1);
}
saveBytes("veil" + out_count + ".jpg", b);
}
}
1