Coder Social home page Coder Social logo

filtrr's Introduction

If you are looking for filtrr.js it is now deprecated and removed.

Please use the more awesome filtrr2.

filtrr's People

Contributors

alexmic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filtrr's Issues

Save image to server

Is there a way to serialize the image and save it to the server, possibly in a post request?

Deprecate filtrr.

Filtrr was a weekend hack - filtrr2 will be fuller, better-tested library.

Saving the canvas as an image

Great job on the filters!

Is there a way to convert the newly created canvas back to an image? I would like to save the image after its filtered. Is there a way to do that?

Investigate glfx.js

From Paul Irish:

glfx.js does exactly what you suggest, leveraging WebGL shaders to do high performance image manip. It's likely fltrr could use glfx.js under the hood for very low-latency manip.

Implement pseudo-nonblocking rendering.

As proposed on HN:

You should rewrite a "pseudo-non-blocking" implementation of these filters. Right now they block the UI thread for too long, which limits how useful these can be. Web workers in one option, although it's not widely supported. The better option is to use setTimout or setInterval to break of the processing work into chunks, which is supported in all browsers. For example, run the loop n iterations then run the next n after a 15 ms delay. The way you've implemented the processing right now makes this lib unsuitable for use on the clientside.

Improve "softLight"

One could suggest a better softLight function (as defined by Yahvuu http://yahvuu.wordpress.com/2009/09/27/blendmodes1/). The results are more in tune with Photoshop and GIMP this way.

softLight: function(bottom, top) 
{
  var c = function(b, t) {
    b /= 255; t /= 255;
    return (t < 0.5) ? 255*((1-2*t)*b*b + 2*t*b) : 255*((1-(2*t-1))*b+(2*t-1)*Math.pow(b, 0.5));
  };
  apply(bottom, top, function(b, t)
  {
    b.r = c(b.r, t.r);
    b.g = c(b.g, t.g);
    b.b = c(b.b, t.b) 
  });
}

Filtrr2 not executing on realtime

I am trying to change the image source dynamically from db. But the function is not allowing me to change the image.
id = imagename;
$('.tempimage').attr("id","#"+id);
$('.tempimage').attr('src',image);
var my = Filtrr2($("#"+id), function () {
var dup = this.dup();
dup.fill(r,g,b);
this.contrast(100).saturate(-100).layer("overlay", dup).render();
var canvas = document.getElementById('filtrr2-image1');
var ctx = canvas.getContext('2d');
drawEngine.setImgBackplate(canvas.toDataURL());
});

Node.js

Do you plan on releasing this for Node.js on npmjs.org?

Resetting of Filtrr

There doesn't seem to be a way to reset the Filtrr2 object once you have applied an effect to it. Trying to recreate a new Filtrr2 object on the same canvas element doesn't work either so if I apply a brighten(50) effect on a canvas and want to then apply a sepia() effect on the same canvas but from the original image and not the current image, it doesn't work.

Redrawring the original image to the canvas and then applying the new effect doesn't work either.

Any chance of adding a reset() function that would clear all effects?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.