Lines Matching refs:img

8957     p.save = function save(file, img) {  argument
8960 if (img !== undef) {
8961 return window.open(img.toDataURL(),"_blank");
9215 var img = document.createElement('img');
9217 pimg.sourceImg = img;
9219 img.onload = (function(aImage, aPImage, aCallback) {
9231 }(img, pimg, callback));
9233img.src = file; // needs to be called after the img.onload function is declared or it wont work in…
9267 function get$3(x,y,img) { argument
9268 if (img.isRemote) { // Remote images cannot access imageData
9273 var offset = y * img.width * 4 + (x * 4);
9274 return p.color.toInt(img.imageData.data[offset],
9275 img.imageData.data[offset + 1],
9276 img.imageData.data[offset + 2],
9277 img.imageData.data[offset + 3]);
9286 function get$5(x, y, w, h, img) { argument
9287 if (img.isRemote) { // Remote images cannot access imageData
9292 var start = y * img.width * 4 + (x*4);
9293 var end = (y + h) * img.width * 4 + ((x + w) * 4);
9297 c.imageData.data[j] = img.imageData.data[i];
9300 i += (img.width - w) * 4;
9308 p.get = function get(x, y, w, h, img) {
9315 return get$5(x, y, w, h, img);
9395 function set$4(x, y, obj, img) { argument
9396 if (img.isRemote) { // Remote images cannot access imageData
9400 var offset = y * img.width * 4 + (x*4);
9401 var data = img.imageData.data;
9409 p.set = function set(x, y, obj, img) {
9420 set$4(x, y, obj, img);
9479 var color, a, img;
9489 img = arguments[0];
9491 if (!img.pixels || img.width !== p.width || img.height !== p.height) {
9521 p.image(img, 0, 0);
9529 p.image = function image(img, x, y, w, h) { argument
9530 if (img.width > 0) {
9531 var wid = w || img.width;
9532 var hgt = h || img.height;
9535 p.texture(img.externals.canvas);
9542 …var bounds = imageModeConvert(x || 0, y || 0, w || img.width, h || img.height, arguments.length < …
9543 var obj = img.toImageData();
9545 if (img.__mask) {
9547 if (img.__mask instanceof PImage) {
9548 var objMask = img.__mask.toImageData();
9549 for (j = 2, size = img.width * img.height * 4; j < size; j += 4) {
9555 for (j = 0, size = img.__mask.length; j < size; ++j) {
9556 obj.data[(j << 2) + 3] = img.__mask[j];
9564 …curContext.drawImage(getCanvasData(obj).canvas, 0, 0, img.width, img.height, bounds.x, bounds.y, b…
9896 var img, col, lum, i;
9900 img = aImg;
9903 img = p;
9909 if (img.isRemote) { // Remote images cannot access imageData
9913 var imglen = img.pixels.getLength();
9917 blurARGB(radius, img);
9921 if (img.format === PConstants.ALPHA) { //trouble
9924 col = 255 - img.pixels.getPixel(i);
9925 img.pixels.setPixel(i,(0xff000000 | (col << 16) | (col << 8) | col));
9927 img.format = PConstants.RGB; //trouble
9930 col = img.pixels.getPixel(i);
9932 img.pixels.setPixel(i,((col & PConstants.ALPHA_MASK) | lum<<16 | lum<<8 | lum));
9939 img.pixels.setPixel(i, (img.pixels.getPixel(i) ^ 0xffffff));
9953 var rlevel = (img.pixels.getPixel(i) >> 16) & 0xff;
9954 var glevel = (img.pixels.getPixel(i) >> 8) & 0xff;
9955 var blevel = img.pixels.getPixel(i) & 0xff;
9959img.pixels.setPixel(i, ((0xff000000 & img.pixels.getPixel(i)) | (rlevel << 16) | (glevel << 8) | b…
9965 img.pixels.setPixel(i, (img.pixels.getPixel(i) | 0xff000000));
9967 img.format = PConstants.RGB; //trouble
9979 …var max = p.max((img.pixels.getPixel(i) & PConstants.RED_MASK) >> 16, p.max((img.pixels.getPixel(i…
9980img.pixels.setPixel(i, ((img.pixels.getPixel(i) & PConstants.ALPHA_MASK) | ((max < thresh) ? 0x000…
9985 dilate(true, img);
9989 dilate(false, img);
9992 img.updatePixels();
10108 p.blit_resize = function blit_resize(img, srcX1, srcY1, srcX2, srcY2, destPixels, argument
10117 if (srcX2 >= img.width) {
10118 srcX2 = img.width - 1;
10120 if (srcY2 >= img.height) {
10121 srcY2 = img.height - 1;
10133 destY1 >= screenH || srcX1 >= img.width || srcY1 >= img.height) {
10153 p.shared.srcBuffer = img.imageData.data;
10156 p.shared.iw = img.width;
10157 p.shared.iw1 = img.width - 1;
10158 p.shared.ih1 = img.height - 1;
12974 var img = new Image();
12975 img.onload = (function(owner) {
12981 this.images[href] = img;
12982 img.src = href;