├── .gitignore ├── GLIC.pde ├── GUI.pde ├── LICENSE ├── README.md ├── code ├── JWave.jar └── bit-io-1.3.7.jar ├── codec.pde ├── colorspaces.pde ├── encoding.pde ├── planes.pde ├── predictions.pde ├── presets ├── 1211 ├── 1422 ├── 2211 ├── 3255 ├── 221122 ├── 0ddangl3 ├── 0rg4n1c-___ ├── 0rg4n1c-t1ny4ngl3z ├── 0rg4n1c-tr1angl3 ├── 0rg4n1c-tr1f0rc3 ├── 0rg4n1c-tr33 ├── 0rg4n1c-v1n3z ├── 1amblu ├── 1llu510n ├── 1ns1t3 ├── 3ra53r ├── 5pl1tz ├── 5um7h1ng ├── 8-b1tz ├── 8l33dm3 ├── abstract_expressionism ├── ayy ├── beautifulwave ├── bi0g4n1c ├── bispham1 ├── bl33dyl1n3z ├── bl33dyl1n3z-2 ├── black+whiteblockyglitch ├── blasted ├── bleeding_blocks ├── blocks ├── blockssmoll ├── blops ├── blops2 ├── brokens7r1p3z ├── burn ├── c0m1c ├── cartoon ├── ch3ss ├── channels ├── chock-a-block ├── colour_boxy_glitch ├── colour_glow ├── colour_mess ├── colour_mess2 ├── colour_waves ├── colour_waves_2 ├── colour_waves_3 ├── colour_waves_sharp ├── colour_waves_sharp2 ├── colourful_disturbances ├── confetti ├── constrctivist ├── constrctivist2 ├── constrctivist_minimal ├── cr0550v3r ├── cubism ├── cute blocks ├── d1ffu510n ├── d1ffu510nz ├── d3cayy-d ├── d3cayy-e ├── default ├── diagonalcolourbleed ├── diagonalcolourbleed2 ├── diagonalmess ├── erase_horizontal ├── erase_vertical ├── g0dh34d-d ├── g0dh34d-e ├── ghost ├── gif1 ├── gif2 ├── haze ├── haze2 ├── high_compression ├── idk ├── jpegls1 ├── lightblur ├── lightblur2 ├── lines ├── liquiblock ├── lmao ├── m1n1m3l0l ├── minimaldiag ├── mthr ├── n07h1ng2c ├── n07h1ng2c-2 ├── neato ├── ordered_destruction ├── ordered_destruction_2 ├── p1xx1 ├── pcool ├── pls ├── preset 38 ├── progressive ├── scanlined ├── shinybright ├── sk0011rgb ├── sk001xyz ├── sk0021xyz ├── sk00244xyz ├── sk00244xyz2 ├── sk1211 ├── sk1723 ├── sk221122 ├── sk3255 ├── squareglitchfromthebottom ├── thousandsofblocks ├── ts01 ├── uncubizm ├── vv01 ├── vv02 ├── vv03 ├── vv04 ├── vv05 ├── vv06 ├── vv07 ├── vv08 ├── vv09 ├── vv10 ├── vv11 ├── vv12 ├── vv13 ├── vv14 ├── vv15 ├── vv16 ├── vv17 ├── vv18 ├── vv19 ├── vv20 ├── vv21 ├── vv22 ├── vv23 ├── vv24 ├── vv25 ├── wat ├── wavydown ├── wavydownbigger ├── web_p_like ├── webp ├── wot ├── wtf └── wtf2 ├── quantization.pde ├── segmentation.pde └── transformation.pde /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | applet 3 | application.linux32 4 | application.linux64 5 | application.windows32 6 | application.windows64 7 | application.macosx 8 | *.glic 9 | *.bak 10 | *.*~ 11 | *.jpg 12 | *.jpeg 13 | *.png 14 | 15 | -------------------------------------------------------------------------------- /GLIC.pde: -------------------------------------------------------------------------------- 1 | // GLIC - GLitch Image Codec, ready for databending 2 | 3 | //////////////////// Config 4 | 5 | // Hidden stuff (not in GUI) 6 | 7 | // Press CTRL-Y to encode image with all presets 8 | // Press CTRL-I to iterate [encoding -> keep image...] `iterate_count` times. 9 | int iterate_count = 5; 10 | 11 | // batch stuff 12 | import java.util.ArrayList.*; 13 | import java.io.*; 14 | import java.io.File; 15 | int curFrame=0; 16 | boolean isBatch = false; 17 | String filenames[]; 18 | java.io.FilenameFilter extfilter = new java.io.FilenameFilter() { 19 | boolean accept(File dir, String name) { 20 | if (name.toLowerCase().endsWith("png") || name.toLowerCase().endsWith("jpeg") 21 | || name.toLowerCase().endsWith("jpg") || name.toLowerCase().endsWith("bmp")) return true; 22 | else return false; 23 | } 24 | }; 25 | java.io.FilenameFilter glicfilter = new java.io.FilenameFilter() { 26 | boolean accept(File dir, String name) { 27 | if (name.toLowerCase().endsWith("glic")) return true; 28 | else return false; 29 | } 30 | }; 31 | 32 | 33 | String filename; 34 | String fileext; 35 | String foldername = "."+File.separator; 36 | String session_id; 37 | 38 | ////// size of windows 39 | final static int max_display_size = 750; 40 | 41 | ////// 42 | PImage img, result, isegm, ipred; 43 | String origname; 44 | 45 | PImage current; 46 | int neww, newh, posx=0, posy=0; 47 | PGraphics buffer; 48 | 49 | void setup() { 50 | size(750, 750); 51 | smooth(8); 52 | frameRate(20); 53 | 54 | // img = loadImage("face.jpg"); 55 | // 56 | // buffer=createGraphics(img.width,img.height); 57 | // neww=img.width; 58 | // newh=img.height; 59 | // result = encode(img,"faa.glic"); 60 | // current = result; 61 | 62 | gui(); 63 | 64 | println(); 65 | println("Press TAB to hide/show GUI"); 66 | println("Press CTRL-L to load image"); 67 | println("Press CTRL-E to encode image"); 68 | println("Press CTRL-D to decode image"); 69 | println("Press CTRL-S to save image"); 70 | println("Press CTRL-Y to apply all presets"); 71 | println(); 72 | println("Presets provided by: Myrto, Saturn Kat, Letsglitchit, Vivi, NoNoNoNoNo, Pandy Chan, GenerateMe, Jay Di, José Irion Neto."); 73 | println(); 74 | } 75 | 76 | void draw() { 77 | background(0); 78 | if (buffer != null && !resetting_buffer) { 79 | image(buffer, posx, posy, neww, newh); 80 | } 81 | } 82 | 83 | boolean isCtrlPressed = false; 84 | 85 | void keyPressed() { 86 | if (keyCode == TAB) { 87 | if (cp5.isVisible()) { 88 | cp5.hide(); 89 | } else { 90 | cp5.show(); 91 | } 92 | } else if (keyCode == CONTROL && isCtrlPressed == false) 93 | isCtrlPressed = true; 94 | else if (isCtrlPressed) { 95 | if (char(keyCode) == 'S') { 96 | save_button(); 97 | } else if (char(keyCode) == 'L') { 98 | load_button(); 99 | } else if (char(keyCode) == 'D') { 100 | decode_button(); 101 | } else if (char(keyCode) == 'E') { 102 | encode_button(); 103 | } else if (char(keyCode) == 'I') { 104 | println("***** ITERATING ENCODING " + iterate_count + " times!"); 105 | println("be patient"); 106 | for (int i=0; i Iteration number: "+i+"/"+iterate_count); 108 | encode_button(); 109 | keep_image(); 110 | } 111 | } else if (char(keyCode) == 'Y') { 112 | if (img != null) { 113 | for (int i=0; i[] chmap = new HashMap[3]; 25 | 26 | boolean separate_channels_toggle = false; 27 | boolean do_skip_session = false; 28 | 29 | int presets_count = 0; 30 | String current_preset = null; 31 | 32 | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); 33 | 34 | void gui() { 35 | cp5 = new ControlP5(this); 36 | 37 | Tab global = cp5.getTab("default").setLabel("Global config"); 38 | 39 | ch1 = cp5.addTab("Channel 1").setLabel("All channels"); 40 | ch2 = cp5.addTab("Channel 2").setVisible(false); 41 | ch3 = cp5.addTab("Channel 3").setVisible(false); 42 | 43 | cp5.addLabel("color_outside_label") 44 | .setText("Color outside") 45 | .setPosition(10, 150) 46 | .moveTo(global); 47 | 48 | co_r = cp5.addSlider("R") 49 | .setPosition(10, 160) 50 | .setWidth(170) 51 | .setRange(0, 255) 52 | .setValue(128) 53 | .setScrollSensitivity(0.02) 54 | .moveTo(global); 55 | 56 | co_g = cp5.addSlider("G") 57 | .setPosition(10, 170) 58 | .setWidth(170) 59 | .setRange(0, 255) 60 | .setValue(128) 61 | .setScrollSensitivity(0.02) 62 | .moveTo(global); 63 | 64 | co_b = cp5.addSlider("B") 65 | .setPosition(10, 180) 66 | .setWidth(170) 67 | .setRange(0, 255) 68 | .setValue(128) 69 | .setScrollSensitivity(0.02) 70 | .moveTo(global); 71 | 72 | separate_channels = cp5.addCheckBox("separate_channels") 73 | .setPosition(10, 200) 74 | .addItem("Separate channels", 1) 75 | .deactivate(0) 76 | .moveTo(global); 77 | 78 | batch = cp5.addCheckBox("batch") 79 | .setPosition(110, 200) 80 | .addItem("Batch run", 1) 81 | .deactivate(0) 82 | .moveTo(global); 83 | 84 | sl_cs = cp5.addScrollableList("Color space") 85 | .setType(ScrollableList.LIST) 86 | .setPosition(10, 20) 87 | .setSize(180, 120) 88 | .moveTo(global); 89 | 90 | for (int i=0; i addToTab(Tab t) { 201 | HashMap h = new HashMap(); 202 | 203 | cp5.addLabel(t.getName() + "segmentation_label") 204 | .setText("Segmentation, min/max are powers of 2") 205 | .setPosition(10, 20) 206 | .moveTo(t); 207 | 208 | Slider mn_blocksize = cp5.addSlider(t.getName() + "min") 209 | .setLabel("MIN") 210 | .setPosition(10, 30) 211 | .setWidth(160) 212 | .setRange(1, 9) 213 | .setNumberOfTickMarks(9) 214 | .showTickMarks(false) 215 | .setValue(2) 216 | .moveTo(t); 217 | 218 | h.put("min", mn_blocksize); 219 | 220 | Slider mx_blocksize = cp5.addSlider(t.getName() + "max") 221 | .setLabel("MAX") 222 | .setPosition(10, 40) 223 | .setWidth(160) 224 | .setRange(1, 9) 225 | .setNumberOfTickMarks(9) 226 | .showTickMarks(false) 227 | .setValue(8) 228 | .moveTo(t); 229 | 230 | h.put("max", mx_blocksize); 231 | 232 | Slider thr_block = cp5.addSlider(t.getName() + "thr") 233 | .setLabel("THR") 234 | .setPosition(10, 50) 235 | .setWidth(160) 236 | .setRange(5, 250) 237 | .setValue(15) 238 | .setScrollSensitivity(0.02) 239 | .moveTo(t); 240 | 241 | h.put("thr", thr_block); 242 | 243 | ScrollableList pred = cp5.addScrollableList(t.getName() + "pred") 244 | .setLabel("Predictions") 245 | .setType(ScrollableList.LIST) 246 | .setPosition(10, 70) 247 | .setSize(180, 120) 248 | .moveTo(t); 249 | 250 | h.put("pred", pred); 251 | 252 | for (int i=0; i map = (HashMap)ois.readObject(); 397 | fromHashMap(map); 398 | ois.close(); 399 | } 400 | catch (IOException e) { 401 | println("Failed to load preset: " + current_preset); 402 | current_preset = null; 403 | } 404 | catch (ClassNotFoundException e) { 405 | println("Failed to load preset: " + current_preset); 406 | current_preset = null; 407 | } 408 | } 409 | 410 | void save_preset() { 411 | String s = preset_name.getText(); 412 | if (s != null && !s.trim().isEmpty()) { 413 | try { 414 | println("Saving preset: " + s); 415 | ObjectOutputStream oos = new ObjectOutputStream(createOutput("presets"+File.separator+s.toLowerCase())); 416 | oos.writeObject(toHashMap()); 417 | oos.close(); 418 | } 419 | catch (IOException e) { 420 | println("Failed to save preset: " + s); 421 | } 422 | } 423 | updatePresets(); 424 | } 425 | 426 | void updatePresets() { 427 | String[] filenames; 428 | println("Loading presets"); 429 | java.io.File folder = new java.io.File(sketchPath("presets")); 430 | filenames = folder.list(); 431 | if (filenames != null) { 432 | presets_list.clear(); 433 | for (String s : sort (filenames)) { 434 | presets_list.addItem(s, s); 435 | } 436 | } 437 | presets_count = filenames.length; 438 | } 439 | 440 | void readValues() { 441 | ccfg.colorspace = (int)sl_cs.getValue(); 442 | ccfg.color_outside = color(co_r.getValue(), co_g.getValue(), co_b.getValue()); 443 | 444 | for (int p=0; p<3; p++) { 445 | HashMap map = separate_channels_toggle ? chmap[p] : chmap[0]; 446 | 447 | ccfg.min_block_size[p] = 1<<(int)map.get("min").getValue(); 448 | ccfg.max_block_size[p] = 1<<(int)map.get("max").getValue(); 449 | ccfg.segmentation_precision[p] = map.get("thr").getValue(); 450 | 451 | ccfg.prediction_method[p] = (Integer)((ScrollableList)map.get("pred")).getItem((int)map.get("pred").getValue()).get("value"); 452 | ccfg.quantization_value[p] = (int)map.get("quant").getValue(); 453 | ccfg.clamp_method[p] = (int)map.get("clamp").getValue(); 454 | 455 | ccfg.transform_type[p] = (int)map.get("transtype").getValue(); 456 | ccfg.transform_method[p] = (Integer)((ScrollableList)map.get("trans")).getItem((int)map.get("trans").getValue()).get("value"); 457 | ccfg.transform_compress[p] = map.get("compress").getValue(); 458 | ccfg.transform_scale[p] = (int)pow(2.0, map.get("scale").getValue()); 459 | 460 | ccfg.encoding_method[p] = (Integer)((ScrollableList)map.get("encoding")).getItem((int)map.get("encoding").getValue()).get("value"); 461 | } 462 | } 463 | 464 | HashMap toHashMap() { 465 | HashMap m = new HashMap(); 466 | 467 | m.put("colorspace", sl_cs.getValue()); 468 | m.put("color_outside_r", co_r.getValue()); 469 | m.put("color_outside_g", co_g.getValue()); 470 | m.put("color_outside_b", co_b.getValue()); 471 | m.put("separate_channels", separate_channels.getArrayValue()); 472 | 473 | for (int p=0; p<3; p++) { 474 | HashMap map = chmap[p]; 475 | String ch = "ch"+p; 476 | 477 | for (String k : map.keySet ()) { 478 | if (map.get(k) instanceof RadioButton) { 479 | m.put(ch+k, map.get(k).getArrayValue()); 480 | } else { 481 | m.put(ch+k, map.get(k).getValue()); 482 | } 483 | } 484 | } 485 | 486 | return m; 487 | } 488 | 489 | void fromHashMap(HashMap m) { 490 | sl_cs.setValue((Float)m.get("colorspace")); 491 | co_r.setValue((Float)m.get("color_outside_r")); 492 | co_g.setValue((Float)m.get("color_outside_g")); 493 | co_b.setValue((Float)m.get("color_outside_b")); 494 | if (m.get("separate_channels") != null) 495 | separate_channels.setArrayValue((float[])m.get("separate_channels")); 496 | else 497 | separate_channels.deactivate(0); 498 | 499 | for (int p=0; p<3; p++) { 500 | HashMap map = chmap[p]; 501 | String ch = "ch"+p; 502 | 503 | for (String k : map.keySet ()) { 504 | if (map.get(k) instanceof RadioButton) { 505 | map.get(k).setArrayValue((float[])m.get(ch+k)); 506 | } else { 507 | map.get(k).setValue((Float)m.get(ch+k)); 508 | } 509 | } 510 | } 511 | 512 | toggle_sep_chan(); 513 | } 514 | 515 | void reload_image() { 516 | println("Reload image done"); 517 | load_image(origname, false); 518 | ipred = isegm = null; 519 | reset_buffer(); 520 | } 521 | 522 | void keep_image() { 523 | img = current; 524 | } 525 | 526 | String session_prefix() { 527 | if (do_skip_session) 528 | return ""; 529 | else 530 | return "_" + session_id; 531 | } 532 | 533 | void encode_batch(boolean dopresets) { 534 | println("batch: "+foldername); 535 | java.io.File folder = new java.io.File(dataPath(foldername)); // set up a File object for the directory 536 | filenames = folder.list(extfilter); // fill the fileNames string array with the filter result 537 | curFrame = 0; 538 | String preset_dir = dopresets ? File.separator + current_preset : ""; 539 | while (curFramemx) ch1mx.setValue(mn); 724 | } 725 | if (e.isFrom(ch2mn)) { 726 | float mn = ch2mn.getValue(); 727 | float mx = ch2mx.getValue(); 728 | if (mn>mx) ch2mx.setValue(mn); 729 | } 730 | if (e.isFrom(ch3mn)) { 731 | float mn = ch3mn.getValue(); 732 | float mx = ch3mx.getValue(); 733 | if (mn>mx) ch3mx.setValue(mn); 734 | } 735 | 736 | if (e.isFrom(ch1mx)) { 737 | float mn = ch1mn.getValue(); 738 | float mx = ch1mx.getValue(); 739 | if (mx planes structure 101 | Planes planes = new Planes(img.pixels, img.width, img.height, ccfg.colorspace); 102 | 103 | // Segmentation is stored as quad tree encoded binary (1 - go deeper, 0 - leaf) 104 | // where to store all segments 105 | ArrayList segments[] = new ArrayList[3]; 106 | 107 | gcw.writeSegmentationMark(); 108 | for (int p=0; p<3; p++) { 109 | println("Channel "+p+" segmentation. Structure."); 110 | 111 | gcw.writeChannelMark(p); 112 | 113 | ByteArrayOutputStream segm_arr_out = new ByteArrayOutputStream(); 114 | DefaultBitOutput segm_out = new DefaultBitOutput(new StreamByteOutput(segm_arr_out)); 115 | 116 | segments[p] = makeSegmentation(segm_out, planes, p, ccfg.min_block_size[p], ccfg.max_block_size[p], ccfg.segmentation_precision[p]); 117 | println("Created " + segments[p].size() + " segments."); 118 | 119 | // allign to byte 120 | segm_out.align(1); 121 | // store size to update later 122 | gcw.segmentation_sizes[p]=segm_arr_out.size(); 123 | 124 | gcw.writeArray(segm_arr_out.toByteArray(), segm_arr_out.size()); 125 | } 126 | 127 | println("Store segmentation visualization"); 128 | isegm = visualize_segmentation(segments, planes); 129 | 130 | // set separator, 512 bytes of 0xff 131 | gcw.writeSeparator(512, (byte)0xff); 132 | 133 | // process of encoding involves decoding, we have to store somewhere only encoded data 134 | Planes result = planes.clone(); 135 | Planes planes_pred = planes.clone(); 136 | 137 | println("Data encoding: predictions and transformations"); 138 | for (int p=0; p<3; p++) { 139 | 140 | Wavelet wavelet = ccfg.transform_method[p] == WAVELET_NONE ? null : createWavelet(ccfg.transform_method[p]); 141 | WaveletTransform trans = wavelet == null ? null : createTransform(ccfg.transform_type[p], wavelet); 142 | Compressor comp = ccfg.transform_compress[p] > 0 ? new CompressorMagnitude(trans_compression_value(ccfg.transform_compress[p])) : null; 143 | 144 | println("Wavelet for plane " + p + " -> " + (wavelet==null?"NONE":wavelet.getName())); 145 | println("Transformation for plane " + p + " -> " + (trans==null?"NONE":trans.getName())); 146 | 147 | println("Prediction for plane " + p + " -> " + predict_name(ccfg.prediction_method[p])); 148 | 149 | // gather SAD/BSAD statistics 150 | pred_sad_stats = new int[MAX_PRED]; 151 | 152 | float pq = quant_value(ccfg.quantization_value[p]); 153 | 154 | for (Segment s : segments[p]) { 155 | 156 | // predict 157 | 158 | int[][] pred = predict(ccfg.prediction_method[p], planes, p, s); 159 | // calculate residuals and clamp 160 | planes.subtract(p, s, pred, ccfg.clamp_method[p]); 161 | 162 | // quantize result 163 | if (pq > 0) quantize(planes, p, s, pq, true); 164 | 165 | // if transformation applied transform and compress 166 | // maximum value after transformation is s.size * max_value 167 | try { 168 | if (trans != null) { 169 | double[][] tr = planes.get(p, s); 170 | tr = trans.forward(tr); 171 | 172 | if (comp != null) { 173 | tr = comp.compress(tr); 174 | } 175 | 176 | // store result as ints 177 | for (int x=0; x 0) quantize(planes, p, s, pq, false); 217 | // add back residuals and clamp 218 | 219 | pred = predict(s.pred_type, planes, p, s); 220 | planes.add(p, s, pred, ccfg.clamp_method[p]); 221 | 222 | for (int x=0; x segments[] = new ArrayList[4]; 285 | 286 | gcr.skip(13); // segmentation mark 287 | for (int p=0; p<3; p++) { 288 | println("Channel "+p+" segmentation"); 289 | 290 | gcr.skip(4); 291 | 292 | byte[] segmentation_info = gcr.readArray(gcr.segmentation_sizes[p]); 293 | ArrayByteInput segm_arr_in = new ArrayByteInput(segmentation_info, 0, segmentation_info.length); 294 | DefaultBitInput segm_in = new DefaultBitInput(segm_arr_in); 295 | 296 | segments[p] = readSegmentation(segm_in, planes); 297 | } 298 | 299 | gcr.skip(512); 300 | println("Reading segmentation data"); 301 | gcr.skip(12); // predict data mark 302 | for (int p=0; p<3; p++) { 303 | gcr.skip(4); 304 | gcr.readSegmentsData(p, segments[p]); 305 | } 306 | 307 | gcr.skip(512); 308 | gcr.skip(10); // image data mark 309 | println("Decoding data"); 310 | for (int p=0; p<3; p++) { 311 | gcr.skip(4); 312 | gcr.readData(gcr.encoding_method[p], planes, p, segments[p]); 313 | } 314 | 315 | Planes planes_pred = planes.clone(); 316 | 317 | for (int p=0; p<3; p++) { 318 | 319 | Wavelet wavelet = gcr.transform_method[p] == WAVELET_NONE ? null : createWavelet(gcr.transform_method[p]); 320 | WaveletTransform trans = wavelet == null ? null : createTransform(gcr.transform_type[p], wavelet); 321 | 322 | println("Wavelet for plane " + p + " -> " + (wavelet==null?"NONE":wavelet.getName())); 323 | println("Transformation for plane " + p + " -> " + (trans==null?"NONE":trans.getName())); 324 | 325 | println("Prediction for plane " + p + " -> " + predict_name(gcr.prediction_method[p])); 326 | 327 | float pq = quant_value(gcr.quant_value[p]); 328 | for (Segment s : segments[p]) { 329 | 330 | try { 331 | if (trans != null) { 332 | double[][] tr = new double[s.size][s.size]; 333 | 334 | for (int xx=0; xx0) quantize(planes, p, s, pq, false); 349 | 350 | int[][] pred = predict(s.pred_type, planes, p, s); 351 | planes.add(p, s, pred, gcr.clamp_method[p]); 352 | 353 | for (int x=0; x segments[], Planes source) { 381 | Planes res = source.clone(); 382 | for (int p=0; p<3; p++) { 383 | for (Segment ss : segments[p]) { 384 | int v = source.get(p, ss.x+(ss.size>>1), ss.y+(ss.size>>1)); 385 | for (int x=0; x segments) throws IOException { 457 | DataInputStream in = new DataInputStream(new ByteArrayInputStream(readArray(segmdata_sizes[p]))); 458 | try { 459 | for (Segment s : segments) { 460 | s.pred_type = in.readUnsignedByte(); 461 | s.pred_type = s.pred_type == PRED_NONE ? prediction_method[p] : s.pred_type; 462 | s.refx = in.readShort(); 463 | s.refy = in.readShort(); 464 | s.refa = in.readUnsignedByte() % 3; 465 | s.angle = (float)in.readShort()/0x7000; 466 | } 467 | } 468 | catch (EOFException e) { 469 | // ignore 470 | } 471 | finally { 472 | in.close(); 473 | } 474 | } 475 | 476 | void readData(int method, Planes p, int pno, ArrayList s) { 477 | switch (method) { 478 | case ENCODING_PACKED: 479 | decode_packed(p, pno, s); 480 | break; 481 | case ENCODING_RLE: 482 | decode_rle(p, pno, s); 483 | break; 484 | default: 485 | decode_raw(p, pno, s); 486 | } 487 | } 488 | 489 | void decode_raw(Planes p, int pno, ArrayList s) { 490 | try { 491 | int idx=0; 492 | for (Segment segm : s) { 493 | for (int x=0; x s) { 510 | try { 511 | byte[] d = readArray(data_sizes[pno]); 512 | DefaultBitInput in = new DefaultBitInput(new ArrayByteInput(d, 0, d.length)); 513 | 514 | int bits = (int)ceil(log(transform_scale[pno])/log(2.0)); 515 | 516 | 517 | for (Segment segm : s) { 518 | for (int x=0; x s) { 540 | try { 541 | byte[] d = readArray(data_sizes[pno]); 542 | DefaultBitInput in = new DefaultBitInput(new ArrayByteInput(d, 0, d.length)); 543 | 544 | int bits = (int)ceil(log(transform_scale[pno])/log(2.0)); 545 | int currentval = 0; 546 | boolean do_read_type = true; 547 | int currentcnt = 0; 548 | 549 | 550 | for (Segment segm : s) { 551 | for (int x=0; x s) throws IOException { 722 | int current = o.size(); 723 | 724 | switch (method) { 725 | case ENCODING_PACKED: 726 | encode_packed(p, pno, s); 727 | break; 728 | case ENCODING_RLE: 729 | encode_rle(p, pno, s); 730 | break; 731 | default: 732 | encode_raw(p, pno, s); 733 | } 734 | 735 | return (o.size() - current); 736 | } 737 | 738 | void encode_raw(Planes p, int pno, ArrayList s) throws IOException { 739 | for (Segment segm : s) { 740 | for (int x=0; x s) throws IOException { 749 | DefaultBitOutput out = new DefaultBitOutput(new StreamByteOutput(o)); 750 | 751 | int bits = (int)ceil(log(ccfg.transform_scale[pno])/log(2.0)); 752 | 753 | for (Segment segm : s) { 754 | for (int x=0; x s) throws IOException { 764 | DefaultBitOutput out = new DefaultBitOutput(new StreamByteOutput(o)); 765 | 766 | int bits = (int)ceil(log(ccfg.transform_scale[pno])/log(2.0)); 767 | int currentval = 0; 768 | boolean firstval = true; 769 | int currentcnt = 0; 770 | 771 | for (Segment segm : s) { 772 | for (int x=0; x segments) throws IOException { 822 | ByteArrayOutputStream baus = new ByteArrayOutputStream(); 823 | DataOutputStream out = new DataOutputStream(baus); 824 | for (Segment s : segments) { 825 | int pred_type = ccfg.prediction_method[pno] < 0 ? s.pred_type : PRED_NONE; // if prediction is different than NONE, store it, other cases are NONE 826 | out.writeByte(pred_type); 827 | out.writeShort(s.refx); 828 | out.writeShort(s.refy); 829 | out.writeByte(s.refa); 830 | out.writeShort((int)(0x7000 * s.angle) ); 831 | } 832 | out.flush(); 833 | out.close(); 834 | segmdata_sizes[pno] = baus.size(); 835 | writeArray(baus.toByteArray(), baus.size()); 836 | } 837 | 838 | void align(int bytes) throws IOException { 839 | int to_write = bytes - (o.size()-current_written); 840 | writeSeparator(to_write, 0); 841 | current_written = o.size(); 842 | } 843 | 844 | void writeArray(byte[] a, int size) throws IOException { 845 | o.write(a, 0, size); 846 | } 847 | 848 | void writeSeparator(int size, int val) throws IOException { 849 | for (int i=0; i> 24; 137 | } 138 | final int getR(color c) { 139 | return (c & 0xff0000) >> 16; 140 | } 141 | final int getG(color c) { 142 | return (c & 0xff00) >> 8; 143 | } 144 | final int getB(color c) { 145 | return c & 0xff; 146 | } 147 | 148 | final int getLuma(color c) { 149 | return constrain((int)(0.2126*getR(c)+0.7152*getG(c)+0.0722*getB(c)), 0, 255); 150 | } 151 | 152 | int getChannel(color c, int ch) { 153 | switch(ch) { 154 | case 0 : 155 | return getR(c); 156 | case 1 : 157 | return getG(c); 158 | case 2 : 159 | return getB(c); 160 | case 3 : 161 | return getA(c); 162 | default: 163 | return 0; 164 | } 165 | } 166 | 167 | // normalized versions 168 | final float getNR(color c) { 169 | return r255[(c & 0xff0000) >> 16]; 170 | } 171 | final float getNG(color c) { 172 | return r255[(c & 0xff00) >> 8]; 173 | } 174 | final float getNB(color c) { 175 | return r255[c & 0xff]; 176 | } 177 | final float getNLuma(color c) { 178 | return r255[getLuma(c)]; 179 | } 180 | 181 | color blendRGB(color c, int r, int g, int b) { 182 | return (c & 0xff000000) | (constrain(r, 0, 255) << 16) | (constrain(g, 0, 255) << 8 ) | constrain(b, 0, 255); 183 | } 184 | 185 | color blendRGB(color c, float r, float g, float b) { 186 | return blendRGB(c, (int)(r*255), (int)(g*255), (int)(b*255)); 187 | } 188 | 189 | /************** 190 | * Greyscale 191 | **************/ 192 | 193 | color tofromGS(color c) { 194 | int l = getLuma(c); 195 | return blendRGB(c, l, l, l); 196 | } 197 | 198 | /************** 199 | * YUV 200 | **************/ 201 | 202 | final static float Umax = 0.436 * 255.0; 203 | final static float Vmax = 0.615 * 255.0; 204 | 205 | color toYUV(color c) { 206 | int R = getR(c); 207 | int G = getG(c); 208 | int B = getB(c); 209 | 210 | int Y = (int)( 0.299*R+0.587*G+0.114*B); 211 | int U = (int)map(-0.14713*R-0.28886*G+0.436*B,-Umax,Umax,0,255); 212 | int V = (int)map(0.615*R-0.51499*G-0.10001*B,-Vmax,Vmax,0,255); 213 | 214 | return blendRGB(c, Y, U, V); 215 | } 216 | 217 | color fromYUV(color c) { 218 | int Y = getR(c); 219 | float U = map(getG(c),0,255,-Umax,Umax); 220 | float V = map(getB(c),0,255,-Vmax,Vmax); 221 | 222 | int R = (int)(Y + 1.13983*V); 223 | int G = (int)(Y - 0.39465*U - 0.58060*V); 224 | int B = (int)(Y + 2.03211*U); 225 | 226 | return blendRGB(c, R, G, B); 227 | } 228 | 229 | /************** 230 | * YDbDr 231 | **************/ 232 | 233 | color toYDbDr(color c) { 234 | int R = getR(c); 235 | int G = getG(c); 236 | int B = getB(c); 237 | 238 | int Y = (int)( 0.299*R+0.587*G+0.114*B); 239 | int Db = (int)(127.5+(-0.450*R-0.883*G+1.333*B)/2.666); 240 | int Dr = (int)(127.5+(-1.333*R+1.116*G+0.217*B)/2.666); 241 | 242 | return blendRGB(c, Y, Db, Dr); 243 | } 244 | 245 | color fromYDbDr(color c) { 246 | int Y = getR(c); 247 | float Db = (getG(c)-127.5)*2.666; 248 | float Dr = (getB(c)-127.5)*2.666; 249 | 250 | int R = (int)(Y + 9.2303716147657e-05*Db-0.52591263066186533*Dr); 251 | int G = (int)(Y - 0.12913289889050927*Db+0.26789932820759876*Dr); 252 | int B = (int)(Y + 0.66467905997895482*Db-7.9202543533108e-05*Dr); 253 | 254 | return blendRGB(c, R, G, B); 255 | } 256 | 257 | /************** 258 | * YCbCr 259 | **************/ 260 | 261 | color toYCbCr(color c) { 262 | int R = getR(c); 263 | int G = getG(c); 264 | int B = getB(c); 265 | 266 | int Y = (int)( 0.2988390*R+0.5868110*G+0.1143500*B); 267 | int Cb = (int)(-0.168736*R-0.3312640*G+0.5000000*B+127.5); 268 | int Cr = (int)( 0.5000000*R-0.4186880*G-0.0813120*B+127.5); 269 | 270 | return blendRGB(c, Y, Cb, Cr); 271 | } 272 | 273 | color fromYCbCr(color c) { 274 | int Y = getR(c); 275 | float Cb = getG(c) - 127.5; 276 | float Cr = getB(c) - 127.5; 277 | 278 | int R = (int)(Y + 1.402*Cr)+1; // some fix 279 | int G = (int)(Y-0.344136*Cb-0.714136*Cr); 280 | int B = (int)(Y+1.772000*Cb)+1; // some fix 281 | 282 | return blendRGB(c, R, G, B); 283 | } 284 | 285 | /************** 286 | * YPbPr 287 | **************/ 288 | 289 | color toYPbPr(color c) { 290 | int R = getR(c); 291 | int B = getB(c); 292 | 293 | int Y = getLuma(c); 294 | int Pb = B - Y; 295 | int Pr = R - Y; 296 | if(Pb<0) Pb+=256; 297 | if(Pr<0) Pr+=256; 298 | return blendRGB(c, Y, Pb, Pr); 299 | } 300 | 301 | color fromYPbPr(color c) { 302 | int Y = getR(c); 303 | int B = getG(c) + Y; 304 | int R = getB(c) + Y; 305 | if(R>255) R-=256; 306 | if(B>255) B-=256; 307 | 308 | int G = (int)((Y-0.2126*R-0.0722*B)/0.7152); 309 | 310 | return blendRGB(c, R, G, B); 311 | } 312 | 313 | 314 | /************** 315 | * R-G,G,B-G 316 | **************/ 317 | 318 | color toRGGBG(color c) { 319 | int G = getG(c); 320 | int R = getR(c)-G; 321 | int B = getB(c)-G; 322 | if(R<0) R+=256; 323 | if(B<0) B+=256; 324 | return blendRGB(c, R, G, B); 325 | } 326 | 327 | color fromRGGBG(color c) { 328 | int G = getG(c); 329 | int R = getR(c)+G; 330 | int B = getB(c)+G; 331 | if(R>255) R-=256; 332 | if(B>255) B-=256; 333 | return blendRGB(c, R, G, B); 334 | } 335 | 336 | /************** 337 | * HWB 338 | **************/ 339 | 340 | color toHSB(color c) { 341 | int R = getR(c); 342 | int G = getG(c); 343 | int B = getB(c); 344 | 345 | int _min = min(R, G, B); 346 | int _max = max(R, G, B); 347 | float delta = _max-_min; 348 | float saturation = delta/_max; 349 | float brightness = r255[_max]; 350 | if (delta == 0.0) return blendRGB(c, 0.0, saturation, brightness); 351 | float hue = 0; 352 | if (R == _max) hue = (G-B)/delta; 353 | else if (G == _max) hue = 2.0 + (B-R)/delta; 354 | else hue = 4.0 + (R-G)/delta; 355 | hue /= 6.0; 356 | if (hue < 0.0) hue += 1.0; 357 | return blendRGB(c, hue, saturation, brightness); 358 | } 359 | 360 | color fromHSB(color c) { 361 | float S = getNG(c); 362 | float B = getNB(c); 363 | if (S == 0.0) return blendRGB(c, B, B, B); 364 | 365 | float h = 6.0 * getNR(c); 366 | float f = h-floor(h); 367 | float p = B*(1.0-S); 368 | float q = B*(1.0-S*f); 369 | float t = B*(1.0-(S*(1.0-f))); 370 | 371 | float r, g, b; 372 | switch((int)h) { 373 | case 1: 374 | r=q; 375 | g=B; 376 | b=p; 377 | break; 378 | case 2: 379 | r=p; 380 | g=B; 381 | b=t; 382 | break; 383 | case 3: 384 | r=p; 385 | g=q; 386 | b=B; 387 | break; 388 | case 4: 389 | r=t; 390 | g=p; 391 | b=B; 392 | break; 393 | case 5: 394 | r=B; 395 | g=p; 396 | b=q; 397 | break; 398 | default: 399 | r=B; 400 | g=t; 401 | b=p; 402 | break; 403 | } 404 | return blendRGB(c, r, g, b); 405 | } 406 | 407 | 408 | 409 | /************** 410 | * HWB 411 | **************/ 412 | 413 | color toHWB(color c) { 414 | int R = getR(c); 415 | int G = getG(c); 416 | int B = getB(c); 417 | 418 | int w = min(R, G, B); 419 | int v = max(R, G, B); 420 | 421 | int hue; 422 | if (v == w) hue = 255; 423 | else { 424 | float f = ((R == w) ? G-B : ((G == w) ? B-R : R-G)); 425 | float p = (R == w) ? 3.0 : ((G == w) ? 5.0 : 1.0); 426 | hue = (int)map((p-f/(v-w))/6.0, 0, 1, 0, 254); 427 | } 428 | return blendRGB(c, hue, w, 255-v); 429 | } 430 | 431 | color fromHWB(color c) { 432 | int H = getR(c); 433 | int B = 255-getB(c); 434 | if (H == 255) return blendRGB(c, B, B, B); 435 | else { 436 | float hue = map(H, 0, 254, 0, 6); 437 | float v = r255[B]; 438 | float whiteness = getNG(c); 439 | int i = (int)floor(hue); 440 | float f = hue-i; 441 | if ((i&0x01)!= 0) f=1.0-f; 442 | float n = whiteness+f*(v-whiteness); 443 | float r, g, b; 444 | switch(i) { 445 | case 1: 446 | r=n; 447 | g=v; 448 | b=whiteness; 449 | break; 450 | case 2: 451 | r=whiteness; 452 | g=v; 453 | b=n; 454 | break; 455 | case 3: 456 | r=whiteness; 457 | g=n; 458 | b=v; 459 | break; 460 | case 4: 461 | r=n; 462 | g=whiteness; 463 | b=v; 464 | break; 465 | case 5: 466 | r=v; 467 | g=whiteness; 468 | b=n; 469 | break; 470 | default: 471 | r=v; 472 | g=n; 473 | b=whiteness; 474 | break; 475 | } 476 | return blendRGB(c, r, g, b); 477 | } 478 | } 479 | 480 | /************** 481 | * Lab 482 | **************/ 483 | 484 | final static float D65X=0.950456; 485 | final static float D65Y=1.0; 486 | final static float D65Z=1.088754; 487 | final static float CIEEpsilon=(216.0/24389.0); 488 | final static float CIEK=(24389.0/27.0); 489 | final static float CIEK2epsilon = CIEK * CIEEpsilon; 490 | final static float D65FX_4 = 4.0*D65X/(D65X+15.0*D65Y+3.0*D65Z); 491 | final static float D65FY_9 = 9.0*D65Y/(D65X+15.0*D65Y+3.0*D65Z); 492 | final static float RANGE_X = 100.0 * (0.4124+0.3576+0.1805); 493 | final static float RANGE_Y = 100.0; 494 | final static float RANGE_Z = 100.0 * (0.0193+0.1192+0.9505); 495 | final static float mepsilon = 1.0e-10; 496 | final static float corrratio = 1.0/2.4; 497 | final static float One_Third = 1.0/3.0; 498 | final static float one_hsixteen = 1.0/116.0; 499 | 500 | color toLAB(color c) { 501 | PVector xyz = _toXYZ(getNR(c), getNG(c), getNB(c)); 502 | xyz.div(100.0); 503 | xyz.x /= D65X; 504 | xyz.y /= D65Y; 505 | xyz.z /= D65Z; 506 | float x, y, z; 507 | 508 | if (xyz.x > CIEEpsilon) { 509 | x = pow(xyz.x, One_Third); 510 | } else { 511 | x= (CIEK*xyz.x+16.0)*one_hsixteen; 512 | } 513 | 514 | if (xyz.y > CIEEpsilon) { 515 | y = pow(xyz.y, One_Third); 516 | } else { 517 | y = (CIEK*xyz.y+16.0)*one_hsixteen; 518 | } 519 | 520 | if (xyz.z > CIEEpsilon) { 521 | z = pow(xyz.z, One_Third); 522 | } else { 523 | z = (CIEK*xyz.z+16.0)*one_hsixteen; 524 | } 525 | 526 | float L = 255.0*(((116.0*y)-16.0)*0.01); 527 | float a = 255.0*(0.5*(x-y)+0.5); 528 | float b = 255.0*(0.5*(y-z)+0.5); 529 | 530 | return blendRGB(c, round(L), round(a), round(b)); 531 | } 532 | 533 | color fromLAB(color c) { 534 | float L = 100*getNR(c); 535 | float a = getNG(c)-0.5; 536 | float b = getNB(c)-0.5; 537 | 538 | float y = (L+16.0)*one_hsixteen; 539 | float x = y+a; 540 | float z = y-b; 541 | 542 | float xxx=x*x*x; 543 | if (xxx>CIEEpsilon) { 544 | x = xxx; 545 | } else { 546 | x = (116.0*x-16.0)/CIEK; 547 | } 548 | 549 | float yyy=y*y*y; 550 | if (yyy>CIEEpsilon) { 551 | y = yyy; 552 | } else { 553 | y = L/CIEK; 554 | } 555 | 556 | float zzz=z*z*z; 557 | if (zzz>CIEEpsilon) { 558 | z = zzz; 559 | } else { 560 | z = (116.0*z-16.0)/CIEK; 561 | } 562 | 563 | return _fromXYZ(c, RANGE_X*x, RANGE_Y*y, RANGE_Z*z); 564 | } 565 | 566 | /************** 567 | * Luv 568 | **************/ 569 | 570 | final float PerceptibleReciprocal(float x) { 571 | float sgn = x < 0.0 ? -1.0 : 1.0; 572 | if ((sgn * x) >= mepsilon) return (1.0 / x); 573 | return (sgn/mepsilon); 574 | } 575 | 576 | color toLUV(color c) { 577 | PVector xyz = _toXYZ(getNR(c), getNG(c), getNB(c)); 578 | xyz.div(100.0); 579 | float d = xyz.y; // / D65Y; 580 | float L; 581 | if (d > CIEEpsilon) L = 116.0*pow(d, One_Third)-16.0; 582 | else L = CIEK * d; 583 | float alpha = PerceptibleReciprocal(xyz.x + 15.0 * xyz.y + 3.0 * xyz.z); 584 | float L13 = 13.0 * L; 585 | float u = L13 * ((4.0 * alpha * xyz.x)-D65FX_4); 586 | float v = L13 * ((9.0 * alpha * xyz.y)-D65FY_9); 587 | L /= 100.0; 588 | u=(u+134.0)/354.0; 589 | v=(v+140.0)/262.0; 590 | return blendRGB(c, round(L*255), round(u*255), round(v*255)); 591 | } 592 | 593 | color fromLUV(color c) { 594 | float L = 100.0*getNR(c); 595 | float u = 354.0*getNG(c)-134.0; 596 | float v = 262.0*getNB(c)-140.0; 597 | float X, Y, Z; 598 | if (L > CIEK2epsilon) Y = pow((L+16.0)*one_hsixteen, 3.0); 599 | else Y = L/CIEK; 600 | float L13 = 13.0*L; 601 | float L52 = 52.0*L; 602 | float Y5 = 5.0*Y; 603 | float L13u = L52/(u+L13*D65FX_4); 604 | X=((Y*((39.0*L/(v+L13*D65FY_9))-5.0))+Y5)/((((L13u)-1.0)/3.0)+One_Third); 605 | Z=(X*(((L13u)-1.0)/3.0))-Y5; 606 | return _fromXYZ(c, 100*X, 100*Y, 100*Z); 607 | } 608 | 609 | /************** 610 | * HCL 611 | **************/ 612 | 613 | color toHCL(color c) { 614 | float r = getNR(c); 615 | float g = getNG(c); 616 | float b = getNB(c); 617 | float max = max(r, max(g, b)); 618 | float chr = max - min(r, min(g, b)); 619 | float h = 0.0; 620 | if ( chr != 0) { 621 | if (r == max) { 622 | h = ((g-b)/chr+6.0) % 6.0; 623 | } else if (g == max) { 624 | h = (b-r)/chr + 2.0; 625 | } else { 626 | h = (r-g)/chr + 4.0; 627 | } 628 | } 629 | return blendRGB(c, round((h/6.0)*255), round(chr*255), round(255*(0.298839*r+0.586811*g+0.114350*b))); 630 | } 631 | 632 | color fromHCL(color c) { 633 | float h = 6.0*getNR(c); 634 | float chr = getNG(c); 635 | float l = getNB(c); 636 | float x = chr*(1.0-abs((h%2.0)-1.0)); 637 | float r = 0.0; 638 | float g = 0.0; 639 | float b = 0.0; 640 | if ((0.0 <= h) && (h < 1.0)) { 641 | r=chr; 642 | g=x; 643 | } else if ((1.0 <= h) && (h < 2.0)) { 644 | r=x; 645 | g=chr; 646 | } else if ((2.0 <= h) && (h < 3.0)) { 647 | g=chr; 648 | b=x; 649 | } else if ((3.0 <= h) && (h < 4.0)) { 650 | g=x; 651 | b=chr; 652 | } else if ((4.0 <= h) && (h < 5.0)) { 653 | r=x; 654 | b=chr; 655 | } else {//if ((5.0 <= h) && (h < 6.0)) { 656 | r=chr; 657 | b=x; 658 | } 659 | float m = l - (0.298839*r+0.586811*g+0.114350*b); 660 | return blendRGB(c, round(255*(r+m)), round(255*(g+m)), round(255*(b+m))); 661 | } 662 | 663 | /************** 664 | * Yxy 665 | **************/ 666 | 667 | color toYXY(color c) { 668 | PVector xyz = _toXYZ(getNR(c), getNG(c), getNB(c)); 669 | float sum = xyz.x + xyz.y + xyz.z; 670 | float x = xyz.x > 0 ? xyz.x / sum : 0.0; 671 | float y = xyz.y > 0 ? xyz.y / sum : 0.0; 672 | return blendRGB(c, 673 | (int)map(xyz.y, 0, RANGE_Y, 0, 255), 674 | (int)map(x, 0.0, 1.0, 0, 255), 675 | (int)map(y, 0.0, 1.0, 0, 255)); 676 | } 677 | 678 | color fromYXY(color c) { 679 | float Y = map(getR(c), 0, 255, 0, RANGE_Y); 680 | float x = map(getG(c), 0, 255, 0, 1.0); 681 | float y = map(getB(c), 0, 255, 0, 1.0); 682 | float divy = Y / (y>0 ? y : 1.0e-6); 683 | 684 | return _fromXYZ(c, x * divy, Y, (1-x-y)*divy); 685 | } 686 | 687 | /************** 688 | * XYZ 689 | **************/ 690 | 691 | // FIXME: range from 0 to 1 692 | float correctionxyz(float n) { 693 | return (n > 0.04045 ? pow((n + 0.055) / 1.055, 2.4) : n / 12.92) * 100.0; 694 | } 695 | 696 | PVector _toXYZ(float rr, float gg, float bb) { 697 | float r = correctionxyz(rr); 698 | float g = correctionxyz(gg); 699 | float b = correctionxyz(bb); 700 | return new PVector(r * 0.4124 + g * 0.3576 + b * 0.1805, 701 | r * 0.2126 + g * 0.7152 + b * 0.0722, 702 | r * 0.0193 + g * 0.1192 + b * 0.9505); 703 | } 704 | 705 | color toXYZ(color c) { 706 | PVector xyz = _toXYZ(getNR(c), getNG(c), getNB(c)); 707 | return blendRGB(c, 708 | (int)map(xyz.x, 0, RANGE_X, 0, 255), 709 | (int)map(xyz.y, 0, RANGE_Y, 0, 255), 710 | (int)map(xyz.z, 0, RANGE_Z, 0, 255)); 711 | } 712 | 713 | float recorrectionxyz(float n) { 714 | return n > 0.0031308 ? 1.055 * pow(n, corrratio) - 0.055 : 12.92 * n; 715 | } 716 | 717 | // FIXME: range from 0 to 1 718 | color _fromXYZ(color c, float xx, float yy, float zz) { 719 | float x = xx/100.0; 720 | float y = yy/100.0; 721 | float z = zz/100.0; 722 | 723 | int r = round(255.0*recorrectionxyz(x * 3.2406 + y * -1.5372 + z * -0.4986)); 724 | int g = round(255.0*recorrectionxyz(x * -0.9689 + y * 1.8758 + z * 0.0415)); 725 | int b = round(255.0*recorrectionxyz(x * 0.0557 + y * -0.2040 + z * 1.0570)); 726 | 727 | return blendRGB(c, r, g, b); 728 | } 729 | 730 | color fromXYZ(color c) { 731 | float x = map(getR(c), 0, 255, 0, RANGE_X); 732 | float y = map(getG(c), 0, 255, 0, RANGE_Y); 733 | float z = map(getB(c), 0, 255, 0, RANGE_Z); 734 | 735 | return _fromXYZ(c, x, y, z); 736 | } 737 | 738 | /************** 739 | * CMY 740 | **************/ 741 | 742 | color toCMY(color c) { 743 | return blendRGB(c, 255-getR(c), 255-getG(c), 255-getB(c)); 744 | } 745 | 746 | color fromCMY(color c) { 747 | return toCMY(c); 748 | } 749 | 750 | /************** 751 | * OHTA 752 | **************/ 753 | 754 | color fromOHTA(color c) { 755 | int I1 = getR(c); 756 | float I2 = map(getG(c), 0, 255, -127.5, 127.5); 757 | float I3 = map(getB(c), 0, 255, -127.5, 127.5); 758 | 759 | int R = (int)(I1+1.00000*I2-0.66668*I3); 760 | int G = (int)(I1+1.33333*I3); 761 | int B = (int)(I1-1.00000*I2-0.66668*I3); 762 | 763 | return blendRGB(c, R, G, B); 764 | } 765 | 766 | color toOHTA(color c) { 767 | int R = getR(c); 768 | int G = getG(c); 769 | int B = getB(c); 770 | 771 | int I1 = (int)(0.33333*R+0.33334*G+0.33333*B); 772 | int I2 = (int)map(0.5*(R-B), -127.5, 127.5, 0, 255); 773 | int I3 = (int)map(-0.25000*R+0.50000*G-0.25000*B, -127.5, 127.5, 0, 255); 774 | 775 | return blendRGB(c, I1, I2, I3); 776 | } 777 | 778 | //// 779 | // 1/n table for n=0..255 - to speed up color conversions things 780 | final static float[] r255 = { 781 | 0.0, 0.003921569, 0.007843138, 0.011764706, 0.015686275, 0.019607844, 0.023529412, 0.02745098, 0.03137255, 0.03529412, 0.039215688, 782 | 0.043137256, 0.047058824, 0.050980393, 0.05490196, 0.05882353, 0.0627451, 0.06666667, 0.07058824, 0.07450981, 0.078431375, 0.08235294, 783 | 0.08627451, 0.09019608, 0.09411765, 0.09803922, 0.101960786, 0.105882354, 0.10980392, 0.11372549, 0.11764706, 0.12156863, 0.1254902, 784 | 0.12941177, 0.13333334, 0.13725491, 0.14117648, 0.14509805, 0.14901961, 0.15294118, 0.15686275, 0.16078432, 0.16470589, 0.16862746, 785 | 0.17254902, 0.1764706, 0.18039216, 0.18431373, 0.1882353, 0.19215687, 0.19607843, 0.2, 0.20392157, 0.20784314, 0.21176471, 0.21568628, 786 | 0.21960784, 0.22352941, 0.22745098, 0.23137255, 0.23529412, 0.23921569, 0.24313726, 0.24705882, 0.2509804, 0.25490198, 0.25882354, 787 | 0.2627451, 0.26666668, 0.27058825, 0.27450982, 0.2784314, 0.28235295, 0.28627452, 0.2901961, 0.29411766, 0.29803923, 0.3019608, 0.30588236, 788 | 0.30980393, 0.3137255, 0.31764707, 0.32156864, 0.3254902, 0.32941177, 0.33333334, 0.3372549, 0.34117648, 0.34509805, 0.34901962, 0.3529412, 789 | 0.35686275, 0.36078432, 0.3647059, 0.36862746, 0.37254903, 0.3764706, 0.38039216, 0.38431373, 0.3882353, 0.39215687, 0.39607844, 0.4, 790 | 0.40392157, 0.40784314, 0.4117647, 0.41568628, 0.41960785, 0.42352942, 0.42745098, 0.43137255, 0.43529412, 0.4392157, 0.44313726, 791 | 0.44705883, 0.4509804, 0.45490196, 0.45882353, 0.4627451, 0.46666667, 0.47058824, 0.4745098, 0.47843137, 0.48235294, 0.4862745, 0.49019608, 792 | 0.49411765, 0.49803922, 0.5019608, 0.5058824, 0.50980395, 0.5137255, 0.5176471, 0.52156866, 0.5254902, 0.5294118, 0.53333336, 0.5372549, 793 | 0.5411765, 0.54509807, 0.54901963, 0.5529412, 0.5568628, 0.56078434, 0.5647059, 0.5686275, 0.57254905, 0.5764706, 0.5803922, 0.58431375, 794 | 0.5882353, 0.5921569, 0.59607846, 0.6, 0.6039216, 0.60784316, 0.6117647, 0.6156863, 0.61960787, 0.62352943, 0.627451, 0.6313726, 0.63529414, 795 | 0.6392157, 0.6431373, 0.64705884, 0.6509804, 0.654902, 0.65882355, 0.6627451, 0.6666667, 0.67058825, 0.6745098, 0.6784314, 0.68235296, 796 | 0.6862745, 0.6901961, 0.69411767, 0.69803923, 0.7019608, 0.7058824, 0.70980394, 0.7137255, 0.7176471, 0.72156864, 0.7254902, 0.7294118, 797 | 0.73333335, 0.7372549, 0.7411765, 0.74509805, 0.7490196, 0.7529412, 0.75686276, 0.7607843, 0.7647059, 0.76862746, 0.77254903, 0.7764706, 798 | 0.78039217, 0.78431374, 0.7882353, 0.7921569, 0.79607844, 0.8, 0.8039216, 0.80784315, 0.8117647, 0.8156863, 0.81960785, 0.8235294, 0.827451, 799 | 0.83137256, 0.8352941, 0.8392157, 0.84313726, 0.84705883, 0.8509804, 0.85490197, 0.85882354, 0.8627451, 0.8666667, 0.87058824, 0.8745098, 800 | 0.8784314, 0.88235295, 0.8862745, 0.8901961, 0.89411765, 0.8980392, 0.9019608, 0.90588236, 0.9098039, 0.9137255, 0.91764706, 0.92156863, 801 | 0.9254902, 0.92941177, 0.93333334, 0.9372549, 0.9411765, 0.94509804, 0.9490196, 0.9529412, 0.95686275, 0.9607843, 0.9647059, 0.96862745, 802 | 0.972549, 0.9764706, 0.98039216, 0.9843137, 0.9882353, 0.99215686, 0.99607843, 1.0 803 | }; 804 | -------------------------------------------------------------------------------- /encoding.pde: -------------------------------------------------------------------------------- 1 | // final encoding 2 | 3 | final static int ENCODING_RAW = 0; 4 | final static int ENCODING_PACKED = 1; 5 | final static int ENCODING_RLE = 2; 6 | 7 | final static int ENCODINGNO = 3; 8 | 9 | String encoding_name(int v) { 10 | switch(v) { 11 | case ENCODING_RAW: return "ENCODING RAW"; 12 | case ENCODING_PACKED: return "ENCODING PACKED"; 13 | case ENCODING_RLE: return "ENCODING RLE"; 14 | } 15 | return null; 16 | } 17 | -------------------------------------------------------------------------------- /planes.pde: -------------------------------------------------------------------------------- 1 | final static float LOG2 = log(2.0); 2 | 3 | final static int CLAMP_NONE = 0; 4 | final static int CLAMP_MOD256 = 1; 5 | 6 | int clamp_in(int method, int x) { 7 | switch(method) { 8 | case CLAMP_MOD256: 9 | return x<0?x+256:x>255?x-256:x; 10 | default: 11 | return x; 12 | } 13 | } 14 | 15 | int clamp_out(int method, int x) { 16 | switch(method) { 17 | case CLAMP_MOD256: 18 | return x<0?x+256:x>255?x-256:x; 19 | default: 20 | return constrain(x, 0, 255); 21 | } 22 | } 23 | 24 | int clamp(int method, int x) { 25 | switch(method) { 26 | case CLAMP_MOD256: 27 | return constrain(x, 0, 255); 28 | default: 29 | return constrain(x, -255, 255); 30 | } 31 | } 32 | 33 | class RefColor { 34 | int[] c; 35 | public RefColor() { 36 | c = new int[] { 37 | 128, 128, 128, 255 38 | }; 39 | } 40 | 41 | public RefColor(int r, int g, int b) { 42 | this(color(r, g, b)); 43 | } 44 | 45 | public RefColor(int r, int g, int b, int cs) { 46 | this(color(r, g, b), cs); 47 | } 48 | 49 | public RefColor(color cc) { 50 | c = new int[4]; 51 | c[2] = cc & 0xff; 52 | c[1] = (cc >> 8) & 0xff; 53 | c[0] = (cc >> 16) & 0xff; 54 | c[3] = (cc >> 24) & 0xff; 55 | } 56 | 57 | public RefColor(color cc, int cs) { 58 | this(toColorspace(cc, cs)); 59 | } 60 | } 61 | 62 | class Planes { 63 | int ww, hh; 64 | int w, h, cs; 65 | int[][][] channels; 66 | RefColor ref; 67 | 68 | public Planes(int[] pxls, int w, int h, int cs, RefColor ref) { 69 | this(w, h, cs, ref); 70 | extractPlanes(pxls); 71 | } 72 | 73 | public Planes(int w, int h, int cs) { 74 | this(w, h, cs, new RefColor(ccfg.color_outside, cs)); 75 | } 76 | 77 | public Planes(int w, int h, int cs, RefColor ref) { 78 | this.w = w; 79 | this.h = h; 80 | this.cs = cs; 81 | ww = 1<<(int)ceil(log(w)/LOG2); 82 | hh = 1<<(int)ceil(log(h)/LOG2); 83 | //channels = new int[4][w][h]; 84 | channels = new int[3][w][h]; 85 | for (int x=0; x> 8) & 0xff; 110 | channels[0][x][y] = (c >> 16) & 0xff; 111 | // channels[3][x][y] = (c >> 24) & 0xff; 112 | } 113 | } 114 | } 115 | 116 | public int[] toPixels() { 117 | int[] pxls = new int[w*h]; 118 | for (int x=0; x=w || y<0 || y>=h) { 143 | return ref.c[pno]; 144 | } else { 145 | return channels[pno][x][y]; 146 | } 147 | } 148 | 149 | void set(int pno, int x, int y, int val) { 150 | if (x>=0 && x=0 && ycurrsad) ) { 130 | currsad = sad; 131 | currtype = s.pred_type; 132 | currres = res; 133 | } 134 | } 135 | 136 | s.pred_type = currtype; 137 | pred_sad_stats[currtype]++; 138 | return currres; 139 | } 140 | 141 | int[][] pred_gen(Planes p, int pno, Segment s, int type) { 142 | int[][] res = new int[s.size][s.size]; 143 | 144 | for (int x=0; x>1; 280 | } 281 | } 282 | 283 | s.pred_type = PRED_AVG; 284 | return res; 285 | } 286 | 287 | int[][] pred_ldiag(Planes p, int pno, Segment s) { 288 | int[][] res = new int[s.size][s.size]; 289 | 290 | for (int x=0; xy) c = p.get(pno, s.x+x, s.y-1); 311 | else if (y>x) c = p.get(pno, s.x-1, s.y+y); 312 | else c = (p.get(pno, s.x+x, s.y-1) + p.get(pno, s.x-1, s.y+y)) >> 1; 313 | res[x][y] = c; 314 | } 315 | } 316 | 317 | s.pred_type = PRED_HV; 318 | return res; 319 | } 320 | 321 | int[][] pred_jpegls(Planes p, int pno, Segment s) { 322 | int[][] res = new int[s.size][s.size]; 323 | 324 | for (int x=0; x=max(a, b)) v = min(a, b); 331 | else if (c<=min(a, b)) v=max(a, b); 332 | else v = a+b-c; 333 | res[x][y] = v; 334 | } 335 | } 336 | 337 | s.pred_type = PRED_JPEGLS; 338 | return res; 339 | } 340 | 341 | int[][] pred_diff(Planes p, int pno, Segment s) { 342 | int[][] res = new int[s.size][s.size]; 343 | 344 | for (int x=0; x>1, 0, 255); 351 | res[x][y] = v; 352 | } 353 | } 354 | 355 | s.pred_type = PRED_DIFF; 356 | return res; 357 | } 358 | 359 | int[][] findBestRef(Planes p, int pno, Segment s) { 360 | int currsad = MAX_INT; 361 | int[][] currres = null; 362 | for (int i=0; i<45; i++) { 363 | int[][] res = new int[s.size][s.size]; 364 | int xx = (int)random(-s.size, s.x); 365 | int yy; 366 | if (xxyy) 430 | return new PVector(round(xx), -1); 431 | else 432 | return new PVector(-1, round(yy)); 433 | } 434 | 435 | int[][] findBestAngle(Planes p, int pno, Segment s) { 436 | float stepa = 1.0/min(16, s.size); 437 | int[][] currres = null; 438 | int currsad = MAX_INT; 439 | 440 | for (int i=0; i<3; i++) { 441 | for (float a=0; a<1.0; a+=stepa) { 442 | float aa = ((int)(a*0x8000))/(float)0x8000; 443 | int[][] res = new int[s.size][s.size]; 444 | 445 | for (int x=0; x= s.size ? s.size-1 : (int)angref.x; 449 | res[x][y] = p.get(pno, xx+s.x, (int)angref.y+s.y); 450 | } 451 | } 452 | 453 | int sad = getSAD(res, p, pno, s); 454 | if (sad= s.size ? s.size-1 : (int)angref.x; 475 | res[x][y] = p.get(pno, xx+s.x, (int)angref.y+s.y); 476 | } 477 | } 478 | return res; 479 | } 480 | } 481 | -------------------------------------------------------------------------------- /presets/0ddangl3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0ddangl3 -------------------------------------------------------------------------------- /presets/0rg4n1c-___: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-___ -------------------------------------------------------------------------------- /presets/0rg4n1c-t1ny4ngl3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-t1ny4ngl3z -------------------------------------------------------------------------------- /presets/0rg4n1c-tr1angl3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-tr1angl3 -------------------------------------------------------------------------------- /presets/0rg4n1c-tr1f0rc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-tr1f0rc3 -------------------------------------------------------------------------------- /presets/0rg4n1c-tr33: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-tr33 -------------------------------------------------------------------------------- /presets/0rg4n1c-v1n3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/0rg4n1c-v1n3z -------------------------------------------------------------------------------- /presets/1211: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/1211 -------------------------------------------------------------------------------- /presets/1422: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/1422 -------------------------------------------------------------------------------- /presets/1amblu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/1amblu -------------------------------------------------------------------------------- /presets/1llu510n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/1llu510n -------------------------------------------------------------------------------- /presets/1ns1t3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/1ns1t3 -------------------------------------------------------------------------------- /presets/2211: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/2211 -------------------------------------------------------------------------------- /presets/221122: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/221122 -------------------------------------------------------------------------------- /presets/3255: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/3255 -------------------------------------------------------------------------------- /presets/3ra53r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/3ra53r -------------------------------------------------------------------------------- /presets/5pl1tz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/5pl1tz -------------------------------------------------------------------------------- /presets/5um7h1ng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/5um7h1ng -------------------------------------------------------------------------------- /presets/8-b1tz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/8-b1tz -------------------------------------------------------------------------------- /presets/8l33dm3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/8l33dm3 -------------------------------------------------------------------------------- /presets/abstract_expressionism: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/abstract_expressionism -------------------------------------------------------------------------------- /presets/ayy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ayy -------------------------------------------------------------------------------- /presets/beautifulwave: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/beautifulwave -------------------------------------------------------------------------------- /presets/bi0g4n1c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/bi0g4n1c -------------------------------------------------------------------------------- /presets/bispham1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/bispham1 -------------------------------------------------------------------------------- /presets/bl33dyl1n3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/bl33dyl1n3z -------------------------------------------------------------------------------- /presets/bl33dyl1n3z-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/bl33dyl1n3z-2 -------------------------------------------------------------------------------- /presets/black+whiteblockyglitch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/black+whiteblockyglitch -------------------------------------------------------------------------------- /presets/blasted: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/blasted -------------------------------------------------------------------------------- /presets/bleeding_blocks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/bleeding_blocks -------------------------------------------------------------------------------- /presets/blocks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/blocks -------------------------------------------------------------------------------- /presets/blockssmoll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/blockssmoll -------------------------------------------------------------------------------- /presets/blops: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/blops -------------------------------------------------------------------------------- /presets/blops2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/blops2 -------------------------------------------------------------------------------- /presets/brokens7r1p3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/brokens7r1p3z -------------------------------------------------------------------------------- /presets/burn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/burn -------------------------------------------------------------------------------- /presets/c0m1c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/c0m1c -------------------------------------------------------------------------------- /presets/cartoon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/cartoon -------------------------------------------------------------------------------- /presets/ch3ss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ch3ss -------------------------------------------------------------------------------- /presets/channels: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/channels -------------------------------------------------------------------------------- /presets/chock-a-block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/chock-a-block -------------------------------------------------------------------------------- /presets/colour_boxy_glitch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_boxy_glitch -------------------------------------------------------------------------------- /presets/colour_glow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_glow -------------------------------------------------------------------------------- /presets/colour_mess: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_mess -------------------------------------------------------------------------------- /presets/colour_mess2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_mess2 -------------------------------------------------------------------------------- /presets/colour_waves: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_waves -------------------------------------------------------------------------------- /presets/colour_waves_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_waves_2 -------------------------------------------------------------------------------- /presets/colour_waves_3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_waves_3 -------------------------------------------------------------------------------- /presets/colour_waves_sharp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_waves_sharp -------------------------------------------------------------------------------- /presets/colour_waves_sharp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colour_waves_sharp2 -------------------------------------------------------------------------------- /presets/colourful_disturbances: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/colourful_disturbances -------------------------------------------------------------------------------- /presets/confetti: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/confetti -------------------------------------------------------------------------------- /presets/constrctivist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/constrctivist -------------------------------------------------------------------------------- /presets/constrctivist2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/constrctivist2 -------------------------------------------------------------------------------- /presets/constrctivist_minimal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/constrctivist_minimal -------------------------------------------------------------------------------- /presets/cr0550v3r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/cr0550v3r -------------------------------------------------------------------------------- /presets/cubism: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/cubism -------------------------------------------------------------------------------- /presets/cute blocks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/cute blocks -------------------------------------------------------------------------------- /presets/d1ffu510n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/d1ffu510n -------------------------------------------------------------------------------- /presets/d1ffu510nz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/d1ffu510nz -------------------------------------------------------------------------------- /presets/d3cayy-d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/d3cayy-d -------------------------------------------------------------------------------- /presets/d3cayy-e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/d3cayy-e -------------------------------------------------------------------------------- /presets/default: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/default -------------------------------------------------------------------------------- /presets/diagonalcolourbleed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/diagonalcolourbleed -------------------------------------------------------------------------------- /presets/diagonalcolourbleed2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/diagonalcolourbleed2 -------------------------------------------------------------------------------- /presets/diagonalmess: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/diagonalmess -------------------------------------------------------------------------------- /presets/erase_horizontal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/erase_horizontal -------------------------------------------------------------------------------- /presets/erase_vertical: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/erase_vertical -------------------------------------------------------------------------------- /presets/g0dh34d-d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/g0dh34d-d -------------------------------------------------------------------------------- /presets/g0dh34d-e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/g0dh34d-e -------------------------------------------------------------------------------- /presets/ghost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ghost -------------------------------------------------------------------------------- /presets/gif1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/gif1 -------------------------------------------------------------------------------- /presets/gif2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/gif2 -------------------------------------------------------------------------------- /presets/haze: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/haze -------------------------------------------------------------------------------- /presets/haze2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/haze2 -------------------------------------------------------------------------------- /presets/high_compression: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/high_compression -------------------------------------------------------------------------------- /presets/idk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/idk -------------------------------------------------------------------------------- /presets/jpegls1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/jpegls1 -------------------------------------------------------------------------------- /presets/lightblur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/lightblur -------------------------------------------------------------------------------- /presets/lightblur2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/lightblur2 -------------------------------------------------------------------------------- /presets/lines: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/lines -------------------------------------------------------------------------------- /presets/liquiblock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/liquiblock -------------------------------------------------------------------------------- /presets/lmao: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/lmao -------------------------------------------------------------------------------- /presets/m1n1m3l0l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/m1n1m3l0l -------------------------------------------------------------------------------- /presets/minimaldiag: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/minimaldiag -------------------------------------------------------------------------------- /presets/mthr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/mthr -------------------------------------------------------------------------------- /presets/n07h1ng2c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/n07h1ng2c -------------------------------------------------------------------------------- /presets/n07h1ng2c-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/n07h1ng2c-2 -------------------------------------------------------------------------------- /presets/neato: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/neato -------------------------------------------------------------------------------- /presets/ordered_destruction: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ordered_destruction -------------------------------------------------------------------------------- /presets/ordered_destruction_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ordered_destruction_2 -------------------------------------------------------------------------------- /presets/p1xx1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/p1xx1 -------------------------------------------------------------------------------- /presets/pcool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/pcool -------------------------------------------------------------------------------- /presets/pls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/pls -------------------------------------------------------------------------------- /presets/preset 38: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/preset 38 -------------------------------------------------------------------------------- /presets/progressive: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/progressive -------------------------------------------------------------------------------- /presets/scanlined: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/scanlined -------------------------------------------------------------------------------- /presets/shinybright: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/shinybright -------------------------------------------------------------------------------- /presets/sk0011rgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk0011rgb -------------------------------------------------------------------------------- /presets/sk001xyz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk001xyz -------------------------------------------------------------------------------- /presets/sk0021xyz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk0021xyz -------------------------------------------------------------------------------- /presets/sk00244xyz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk00244xyz -------------------------------------------------------------------------------- /presets/sk00244xyz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk00244xyz2 -------------------------------------------------------------------------------- /presets/sk1211: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk1211 -------------------------------------------------------------------------------- /presets/sk1723: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk1723 -------------------------------------------------------------------------------- /presets/sk221122: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk221122 -------------------------------------------------------------------------------- /presets/sk3255: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/sk3255 -------------------------------------------------------------------------------- /presets/squareglitchfromthebottom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/squareglitchfromthebottom -------------------------------------------------------------------------------- /presets/thousandsofblocks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/thousandsofblocks -------------------------------------------------------------------------------- /presets/ts01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/ts01 -------------------------------------------------------------------------------- /presets/uncubizm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/uncubizm -------------------------------------------------------------------------------- /presets/vv01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv01 -------------------------------------------------------------------------------- /presets/vv02: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv02 -------------------------------------------------------------------------------- /presets/vv03: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv03 -------------------------------------------------------------------------------- /presets/vv04: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv04 -------------------------------------------------------------------------------- /presets/vv05: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv05 -------------------------------------------------------------------------------- /presets/vv06: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv06 -------------------------------------------------------------------------------- /presets/vv07: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv07 -------------------------------------------------------------------------------- /presets/vv08: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv08 -------------------------------------------------------------------------------- /presets/vv09: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv09 -------------------------------------------------------------------------------- /presets/vv10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv10 -------------------------------------------------------------------------------- /presets/vv11: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv11 -------------------------------------------------------------------------------- /presets/vv12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv12 -------------------------------------------------------------------------------- /presets/vv13: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv13 -------------------------------------------------------------------------------- /presets/vv14: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv14 -------------------------------------------------------------------------------- /presets/vv15: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv15 -------------------------------------------------------------------------------- /presets/vv16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv16 -------------------------------------------------------------------------------- /presets/vv17: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv17 -------------------------------------------------------------------------------- /presets/vv18: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv18 -------------------------------------------------------------------------------- /presets/vv19: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv19 -------------------------------------------------------------------------------- /presets/vv20: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv20 -------------------------------------------------------------------------------- /presets/vv21: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv21 -------------------------------------------------------------------------------- /presets/vv22: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv22 -------------------------------------------------------------------------------- /presets/vv23: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv23 -------------------------------------------------------------------------------- /presets/vv24: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv24 -------------------------------------------------------------------------------- /presets/vv25: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/vv25 -------------------------------------------------------------------------------- /presets/wat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wat -------------------------------------------------------------------------------- /presets/wavydown: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wavydown -------------------------------------------------------------------------------- /presets/wavydownbigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wavydownbigger -------------------------------------------------------------------------------- /presets/web_p_like: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/web_p_like -------------------------------------------------------------------------------- /presets/webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/webp -------------------------------------------------------------------------------- /presets/wot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wot -------------------------------------------------------------------------------- /presets/wtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wtf -------------------------------------------------------------------------------- /presets/wtf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlitchCodec/GLIC/8bd2583789ce33a4ad365e75e8c21bb6eddbe0b6/presets/wtf2 -------------------------------------------------------------------------------- /quantization.pde: -------------------------------------------------------------------------------- 1 | void quantize(Planes planes, int p, Segment s, float val, boolean forward) { 2 | if (val > 1) { 3 | for (int x=0; x