Code Monkey home page Code Monkey logo

getimagedata's People

Contributors

betamax avatar cogwirrel avatar joshkoberstein avatar thhermansen 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

getimagedata's Issues

In iOS, tap on a hyperlink and canvases of other hyperlinks disappear, too.

In iOS, after tapping on a hyperlink, its grayscale image (canvas) disappears, and that's the correct behavior. However, canvases of other hyperlinks incorrectly disappear, too.

Please try it using the live example page. It may be unnoticeable when there is only one such hyperlink, but it becomes noticeable when there are ten or more.

And tapping on other regular hyperlinks (which don't implement this grayscale effect) causes the same issue.

A question about jsonp

Hi, sorry for bad English. I think i'ts bad to store this library in yours.

ps. Just made you library to work with jquery-file-upload. Cool! Thanks for good work.

400 (Bad Request) on own server

I'm trying to get this working on my own server but I always get a 400(Bad Request)

Here's my code

            $.getImageData({
                url: soundcloud.artwork_url,
                server: "http://127.0.0.1:3000/",
                success: function(image) {
                    console.log(image);
                },
                error: function(xhr, text_status) {
                    console.log(xhr, text_status);
                }
            });

Any idea as to what could be causing this?

width, height attributes

Is there a good reason for setting width and height of the image from JSON? At this point it'll only take very shortly until the browser has parsed the size. So there wouldn't be a need to have imagemagick on the server, which should reduce load a bit.

Please add a few features

Please consider adding the following features:

  1. Make other jQuery functions chain-able
  2. Add an option for callback function
  3. Add an option for fading in or directly showing the canvas after it is created
  4. Change the binding target of mouseover and mouseout events to the wrapper element so we could perform other effects

responseBodyStream doesn't seem to work

I'm using node v0.6.10 and the responseBodyStream: bl does not seem to work in the request options (line 57) so what I did was add an encoding option set to null, and changed the image = new Buffer(bl.toString(), binary) to image = new Buffer(body). and I could get the image I needed. Below is a snippet of the code I used:

request({ uri:url, responseBodyStream: bl, encoding:null}, function (error, response, body) {

        // If the request was OK
        if (!error && response.statusCode == 200) {
            // Check if the mimetype says it is an image
            var mimetype = response.headers["content-type"];
            if(mimetype == "image/gif" || mimetype == "image/jpeg" || 
               mimetype == "image/jpg" || mimetype == "image/png" || 
               mimetype == "image/tiff") {

                // Create the prefix for the data URL
                var type_prefix = "data:" + mimetype + ";base64,",

                // Get the image from the response stream as a string and convert it to base64
                image = new Buffer(body),
                image_64 = image.toString('base64'); 

...

I had to change it because nothing was being written to the temporary file created.

Also instead of using encode(args.url) and decode(req.param("url")). I used encodeURIComponent(args.url) and decodeURIComponent(req.param("url")).

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.