Php - 图像处理和操作

I need an elegant and fast way to gather all the rgb pixel value from an image (large) images. My concern is I will not be able to hold values in memory and also the createfromjpeg() method will be slow. I would need storage to hold intermediate data. What would be my options?

Secondly, I need to apply custom filters or process these pixels. Refer me some new filter concepts.

Thanks.

This sounds like you'd better use OpenCV. While your question is very borad (and has no code samples whatsoever ;-)), this might be a good start but needs a little bit of reading. It has a python library as well as an (unofficial) wrapper for PHP.

jquery code:

$(function() {

$('img').mousemove(function(e) {

    if(!this.canvas) {
        this.canvas = $('<canvas />')[0];
        this.canvas.width = this.width;
        this.canvas.height = this.height;
        this.canvas.getContext('2d').drawImage(this, 0, 0, this.width, this.height);
    }

    var pixelData = this.canvas.getContext('2d').getImageData(event.offsetX, event.offsetY, 1, 1).data;

    $('#output').html('R: ' + pixelData[0] + '<br>G: ' + pixelData[1] + '<br>B: ' + pixelData[2] + '<br>A: ' + pixelData[3]);


       });

  });

html code:

         <pre id="output"></pre>