Skip to content
Snippets Groups Projects
Select Git revision
  • 242e7b03d24b6df25772e87bef1d73d6bce8d1e1
  • master default protected
2 results

OscOutboundPacketStream.cpp

Blame
  • generic.js 577 B
    var generic_effect={}
    
    generic_effect.apply_region_filter=function(in_imgData,out_imgData,window_width,window_height,
      pixel_form_region_rgba_filter) {
    
      var w=0;
    
      for (var y=0;y<out_imgData.height;y++)
        for (var x=0;x<out_imgData.width;x++) {
          w=((y*out_imgData.width)+x)<<2;
          new_rgba_pixel_val=pixel_form_region_rgba_filter(
              in_imgData,
              x-Math.round(window_width/2), y-Math.round(window_height/2),
              window_width, window_height);
          for (var i=0;i<4;i++) {
            out_imgData.data[w+i]=new_rgba_pixel_val[i];
          }
        }
    }