<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with resize() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=resize%28%29</link>
      <pubDate>Sun, 08 Aug 2021 19:55:03 +0000</pubDate>
         <description>Tagged with resize() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedresize%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>How to rewrite this for faster performance? (image resize)</title>
      <link>https://forum.processing.org/two/discussion/27567/how-to-rewrite-this-for-faster-performance-image-resize</link>
      <pubDate>Sat, 31 Mar 2018 01:47:52 +0000</pubDate>
      <dc:creator>BGADII</dc:creator>
      <guid isPermaLink="false">27567@/two/discussions</guid>
      <description><![CDATA[<p>Is there a faster way to write this?
PGraphics buffer is HD, canvas size is SD. 
If canvas size and PGraphics buffer are the same, the framerate is 60. If they are different, the framerate is 20 meaning there is an insane performance hit to image resize.</p>

<p><code>image(buffer, 0, 0, width, height);</code></p>

<p>Alright, this is a bit weird.</p>

<p>With the standard image resize:</p>

<pre><code>Default renderer  = 20fps. 

P3D = 50fps. 
</code></pre>

<p>I did an image resize manually by copying the pixels to an array with a for loop, then using a simple nearest neighbor solution, then copying the array into a pimage, then displaying the pimage.</p>

<pre><code>default renderer = 50fps

P3D = 50fps. 
</code></pre>

<p>Obviously, my image resize method which is nearest neighbor looks terrible compared to the default one, and it gets the same fps in P3D. The goal however is to export to android, and for some reason P3D is super slow... any advice? Is there any examples resizing a PGraphics canvas with a custom algorithm in a processing sketch?</p>

<p>This is my resize algorithm</p>

<pre><code>  int[] resize(int[] original, int x1, int y1, int x2, int y2) {
    int[] resized = new int[x2*y2];
    double xr = x1/(double)x2;
    double yr = y1/(double)y2;
    double px;
    double py; 
    for (int x = 0; x &lt; x2; x++) {
      px = x * xr;
      for (int y = 0; y &lt; y2; y++) {
        py = y * yr;
        double index = Math.floor((y* x2) + x);
        double index2 = Math.floor((int)((py * x1) + px));
        resized[(int)(index)] = original[(int)index2];
      }
    }
    return resized;
  }
</code></pre>
]]></description>
   </item>
   <item>
      <title>How to get the text to show over image background</title>
      <link>https://forum.processing.org/two/discussion/27412/how-to-get-the-text-to-show-over-image-background</link>
      <pubDate>Wed, 28 Mar 2018 07:30:20 +0000</pubDate>
      <dc:creator>Brandy</dc:creator>
      <guid isPermaLink="false">27412@/two/discussions</guid>
      <description><![CDATA[<p>the text won't show when the background image is added. what am i doing wrong?</p>

<pre><code>String canvasMsg = "CACTUS";
PFont font;
PImage bg;
int y;

void setup() {
  size(640, 360);
  bg = loadImage("cactus.JPG");

  fill(153, 0, 153);


  font = loadFont("ACaslonPro-Semibolditalic-48.vlw");
  textFont(font);
  textSize(100);

  textAlign(CENTER);
  text(canvasMsg, width / 2 - 10, height + 2);
}

void draw() {
  background(bg);
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Basic questions about reducing CPU usage when drawing pictures</title>
      <link>https://forum.processing.org/two/discussion/26304/basic-questions-about-reducing-cpu-usage-when-drawing-pictures</link>
      <pubDate>Sat, 10 Feb 2018 23:20:27 +0000</pubDate>
      <dc:creator>delsey</dc:creator>
      <guid isPermaLink="false">26304@/two/discussions</guid>
      <description><![CDATA[<p>Hello, I wrote a program for choosing colors for an LED-Strip. It works quite good, but it seems to be using quite alot of CPU. (30% CPU, i5 7600k <a href="/two/profile/4">@4</a>.6ghz)</p>

<p>I know that this usage is due to my program constantly loading pictures:</p>

<p>Setup method:</p>

<pre><code>      fade = loadImage("fade.jpg");
      red = loadImage("red.jpg");
      green = loadImage("green.jpg");
      blue = loadImage("blue.jpg");
      plus = loadImage("plus.jpg");
      minus = loadImage("minus.jpg");
</code></pre>

<p>Draw-Method:</p>

<pre><code>      image(fade, 1, 241, boxsize-1, boxsize-1);
      image(red, 82, 241, boxsize-2, boxsize-1);
      image(green, 161, 241, boxsize-1, boxsize-1);
      image(blue, 241, 241, boxsize-1, boxsize-1);
      image(plus, 401, 241, boxsize-1, boxsize-1);
      image(minus, 481, 241, boxsize-1, boxsize-1);
</code></pre>

<p>Can someone help me to adapt it?
How do I load the pictures without consantly having to draw them? It would be enough to draw them once when the program starts.</p>
]]></description>
   </item>
   <item>
      <title>.resize() for every image in a PImage array.</title>
      <link>https://forum.processing.org/two/discussion/25954/resize-for-every-image-in-a-pimage-array</link>
      <pubDate>Sun, 14 Jan 2018 08:57:48 +0000</pubDate>
      <dc:creator>unknownplayer</dc:creator>
      <guid isPermaLink="false">25954@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I have searched for a few topics on this but none of them had a simple and working solution or I couldn't manage. But it seems this has a simple solution yet I somehow couldn't do it. All I want is all these images in my array to be proportionally fit to a max width of 20 (which I believe that is resize(20,20) does) but I couldn't manage to call that function as the image is an array. I have tried all these three below the image() line but none of them worked cause it seems it locks them all to 20x20 pixel size. How can I manage this, thanks!</p>

<pre><code>myImageArray[i].resize(20,0);
image(myImageArray[(int)random(5)].resize(20,0);
myImageArray.resize(20,0);
</code></pre>

<p>Here is my code;</p>

<pre><code>PImage[] myImageArray = new PImage[20];
float px;
float py; 

void setup() {
  size(600, 600,P3D);
  frameRate(30);
  background(0);

  for (int i=0; i&lt;myImageArray.length; i++) {
   myImageArray[i] = loadImage( "frag_" + i + ".jpg");
  }
}

void draw() {
  background(0); // For glitch effect
  pushMatrix();
  translate(px, py);
  py+=1; // Glitch skip
  for (int i=0; i&lt;width; i+=25) {
    for (int j=-3000; j&lt;3000; j+=23) {
    //for (int j=0; j&lt;3000; j+=25) { // For glitch effect
     image(myImageArray[(int)random(5)], i, j, 20, 20);
    }
  } 
  popMatrix(); 
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>How do I down-sample video to large pixels and get the pixel array data which will then be output...</title>
      <link>https://forum.processing.org/two/discussion/25731/how-do-i-down-sample-video-to-large-pixels-and-get-the-pixel-array-data-which-will-then-be-output</link>
      <pubDate>Wed, 27 Dec 2017 17:10:32 +0000</pubDate>
      <dc:creator>blvckmonolith</dc:creator>
      <guid isPermaLink="false">25731@/two/discussions</guid>
      <description><![CDATA[<p>Ultimately I'm trying to do this: <a rel="nofollow" href="https://vimeo.com/80364336">https://vimeo.com/80364336</a></p>

<p>Which is taking down-sampled web-cam footage. Sending the large pixel-block-color-information (black and white) array data over UDP (over the network) and have Cinema-4d listen to the UDP data packets with a python effector.</p>

<p>My immediate issue is getting the array pixel data for the large pixels (not every single individual pixel, which I think I'm getting now). I'm not sure what is being output when I use this code in the console though.
Is this code sending every pixels color data in the window to the console?
How do I get just the big down sampled pixel blocks?
Or is it already only sending the rows/columns that have been down-sampled?
I'm a little confused. This stuff is kind of over my head, but I'm trying to figure it out.
Any help would be appreciated.</p>

<p>Here's more info on what I'm trying to do and what my immediate issue is:
I'm trying to print the large pixel values every frame (eventually I'd like to only have black and white values but I haven't gotten that far).
I'm not too sure how exactly Processing 3.3.6 is interpreting this code. Or if this is the wrong way to go about getting the pixel array data clean enough to send to another program and interpret.
 I'm just hacking code together right now like a maniac. I finally got pixel output in the console (I think), though I don't know what the output actually means. It looks like Java (hex info?), but I don't really know exactly.</p>

<p>I'm getting print data like this: [I@8e9278b[I@8e9278b[I@8e9278b[I@8e9278b[I@8e9278b[I@8e9278...</p>

<pre><code>import processing.video.*;

// Size of each cell in the grid, ratio of window size to video size
//Screen Pixels are 80 width and 60 height in the case of 640/480
int videoScale = 8;
// Number of columns and rows in the system
int cols, rows;
// Variable to hold onto Capture object
Capture video;

void setup() {  
  size(640, 480);  
  // Initialize columns and rows  
  cols = width/videoScale;  
  rows = height/videoScale;  
  background(0);
  video = new Capture(this, cols, rows);
  video.start();
}

// Read image from the camera
void captureEvent(Capture video) {  
  video.read();
}

void draw() {
  video.loadPixels();  
  // Begin loop for columns  
  for (int i = 0; i &lt; cols; i++) {    
    // Begin loop for rows    
    for (int j = 0; j &lt; rows; j++) {      
      // Where are you, pixel-wise?      
      int x = i*videoScale;      
      int y = j*videoScale;
      color c = video.pixels[i + j*video.width];
      fill(c);   
      stroke(0);      
      rect(x, y, videoScale, videoScale);

      //Experiment code for capturing video pixel color data so far:
      loadPixels();
      //I'm not sure I need this get() - taking it out still sends data to console.
      get();
      print(pixels);
    }  
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>how to loadImage() from createImg()-p5.dom or from base64</title>
      <link>https://forum.processing.org/two/discussion/25597/how-to-loadimage-from-createimg-p5-dom-or-from-base64</link>
      <pubDate>Sat, 16 Dec 2017 16:24:41 +0000</pubDate>
      <dc:creator>MarcoHeleno</dc:creator>
      <guid isPermaLink="false">25597@/two/discussions</guid>
      <description><![CDATA[<p>Hi! I need some help with:</p>

<p><strong>loadImage() from createImg()-p5.dom</strong></p>

<p>or</p>

<p><strong>loadImage() from a data URI, such as "data:image/jpg;base64,{base 64 encoded data block}"</strong></p>

<p>The createImg() comes from an createFileInput(), and I want o be able to resize() that image.</p>

<p>Thanks for your help!</p>

<p><strong>Code below:</strong></p>

<pre><code>function setup() {
    createFileInput (handleFile);
    createCanvas (800, 400);
    background (245);
}

function draw() {
    strokeWeight (10);
    stroke (0, 255,0);
    line (pmouseX, pmouseY, mouseX, mouseY);
}

function handleFile (file) {
  if (file.type === 'image') {
    var img = createImg (file.data).hide();
    print (img);

    //img.resize (width, 0);
    image (img, 0, 0);
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Is this a data-efficient way to display an animation (a sequence of images)?</title>
      <link>https://forum.processing.org/two/discussion/24239/is-this-a-data-efficient-way-to-display-an-animation-a-sequence-of-images</link>
      <pubDate>Sun, 24 Sep 2017 15:51:43 +0000</pubDate>
      <dc:creator>randomdude</dc:creator>
      <guid isPermaLink="false">24239@/two/discussions</guid>
      <description><![CDATA[<p>Hello! I am working on a project that involves a lot of 30-40 frame image sequences, so I am looking to discover the best way to implement them without eating up too much RAM. This is what I came up with, it seems short and simple enough and runs smoothly, but of course it's just a single animation following the mouse, so I can't know if it will be data-efficient with various multi-image sprites, and I need to know that before I can start working on creating and programming the sprites.</p>

<pre><code>PImage[] runner = new PImage[6];
int frame;
int displaytimer;
void setup() {
  frameRate(80);
  size(500, 500);
  for (int i = 0; i &lt; runner.length; i++) {
    runner[i] = loadImage("run"+(i+1)+".jpeg");
  }
}
void draw() {
  background(255);
  image(runner[frame], mouseX, mouseY, 100, 100);
  if (millis()&gt;displaytimer+180) {
    displaytimer = millis();
    if (frame&lt;5) {
      frame = frame+1;
    } else {
      frame = 0;
    }
  }
}
</code></pre>

<p>Note that the sequence is of 6 images named "run1" to "run6" in a consecutive order.</p>

<p>Any help would be greatly appreciated.</p>
]]></description>
   </item>
   <item>
      <title>Most data-efficient way to resize image array multiple times without losing data?</title>
      <link>https://forum.processing.org/two/discussion/24273/most-data-efficient-way-to-resize-image-array-multiple-times-without-losing-data</link>
      <pubDate>Wed, 27 Sep 2017 00:34:36 +0000</pubDate>
      <dc:creator>randomdude</dc:creator>
      <guid isPermaLink="false">24273@/two/discussions</guid>
      <description><![CDATA[<p>Hi all!</p>

<p>I am working on a project with multiple animated sprites, and throughout the course of the program some sprites have to get smaller and bigger multiple times. However, they lose quality if they get smaller, and then bigger. Do I have to use the image() function with size parameters and load the images' size each frame? Is there a way to resize them without having to move the .resize function out of void setup() for data efficiency? Would using scale() be a more data-efficient way?</p>

<p>Thank you all for the input!</p>
]]></description>
   </item>
   <item>
      <title>scale an image according to the (adaptive) canvas size</title>
      <link>https://forum.processing.org/two/discussion/24149/scale-an-image-according-to-the-adaptive-canvas-size</link>
      <pubDate>Sun, 17 Sep 2017 19:27:46 +0000</pubDate>
      <dc:creator>xna</dc:creator>
      <guid isPermaLink="false">24149@/two/discussions</guid>
      <description><![CDATA[<p>I asked this question the other day but clicked on "answered" too early.</p>

<p>I have an image that shoud adapt to the window size, scaling down when the window is smaller then the image. It should stop scaling up when the image is 100%. The problem is that the resize command discards the resolution of the image, so that when you scale down, then up again, the image is completely blurry.
How to fix this?</p>

<pre><code>function setup() {
  moon = loadImage("assets/moonwalk.jpg");
  createCanvas(windowWidth, windowHeight);
}

function draw() {
    background(255);
    image(moon,0,0);
    moon.resize(windowWidth,0)
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Resizing an image without losing resolution</title>
      <link>https://forum.processing.org/two/discussion/24139/resizing-an-image-without-losing-resolution</link>
      <pubDate>Sat, 16 Sep 2017 20:16:16 +0000</pubDate>
      <dc:creator>xna</dc:creator>
      <guid isPermaLink="false">24139@/two/discussions</guid>
      <description><![CDATA[<p>Hi there. I am trying to resize an image according to the window size. However, when I make the window small and then make it great again (haha..) then the resolution is lost.</p>

<pre><code>function setup() {
  moon = loadImage("assets/moonwalk.jpg");
  createCanvas(windowWidth, windowHeight);
}

function draw() {
    background(255);
    image(moon,0,0);
    moon.resize(windowWidth,0)
}
</code></pre>

<p><a rel="nofollow" href="http://alpha.editor.p5js.org/mxa/sketches/Hy9CEZj5-">http://alpha.editor.p5js.org/mxa/sketches/Hy9CEZj5-</a></p>
]]></description>
   </item>
   <item>
      <title>Processing.js image pixelated</title>
      <link>https://forum.processing.org/two/discussion/23611/processing-js-image-pixelated</link>
      <pubDate>Fri, 28 Jul 2017 14:05:21 +0000</pubDate>
      <dc:creator>emimel</dc:creator>
      <guid isPermaLink="false">23611@/two/discussions</guid>
      <description><![CDATA[<p>Hi everyone,</p>

<p>I'm trying to make a generative logo on this website I'm currently developing (www.lapweb.it). Everything works nice, except for the image that appears to be "pixelated". I really can't wrap my head around it. Any advice?
Thank you so much!</p>

<p>ps: this is the code</p>

<pre><code>         /* <a href="/two/profile/pjs">@pjs</a> preLoad="logoprocessing.png"; */

        PShape img;
        int cx, cy, d;
        void setup(){

          size(75,75);
          cx=width/2;
          cy=height/2;
          d=min(cx,cy);
          frameRate(2);
          img = loadImage("logoprocessing.png");
          smooth();

        }

        void draw() {
          background(256,256,256);

         drawShape(cx,cy,d,int(random(15,30)));

        imageMode(CENTER);
          image(img,width/2,height/2, width/2,height/4);


        }

        void drawShape(float px, float py, float md, int nbrVerts) {
        float[] v = new float [nbrVerts];
        for (int i=0; i&lt; v.length; i++) {
        v[i] = random (0, TWO_PI);
        }
        v = sort (v);
        beginShape();
         color X = color (#0C090A);
        noStroke();
        fill(X);
        for (int i= 0; i&lt;v.length;i++){
        float len = random (20,md);
        vertex(px+len*cos(v[i]), py + len*sin(v[i]));
        }
        endShape();
         rectMode(CENTER);
          fill(X);
          noStroke();
          rect(width/2,height/2,width/2,height/4);
        }


        &lt;/script&gt;
</code></pre>
]]></description>
   </item>
   <item>
      <title>Help with some code (image segmentation)</title>
      <link>https://forum.processing.org/two/discussion/23190/help-with-some-code-image-segmentation</link>
      <pubDate>Sat, 24 Jun 2017 02:21:50 +0000</pubDate>
      <dc:creator>daddydean</dc:creator>
      <guid isPermaLink="false">23190@/two/discussions</guid>
      <description><![CDATA[<p>Hey guys, Im completely new at processing. I came across this piece of code for processing that I am interested in modifying, was wondering if someone could help me out with what I'd like to do.</p>

<p>This is the code:</p>

<p><a href="http://www.generative-gestaltung.de/P_4_3_2_01" target="_blank" rel="nofollow">http://www.generative-gestaltung.de/P_4_3_2_01</a></p>

<p>So, instead of having text, I would like to have my own shapes (a character set) applied to the input image.</p>

<p>So for example with this it appears to be using the letters A-Z, I would like to use things like triangles, squares or parts of other images..anything.</p>

<p>The only example I know right now is this:</p>

<p><a href="http://vectorpoem.com/playscii/howto_art.html#imageconversion" target="_blank" rel="nofollow">http://vectorpoem.com/playscii/howto_art.html#imageconversion</a></p>

<p>Which takes a bmp, slices it up and applies the shapes to the image.</p>

<p>The great thing about this processing code is that even though its grid based it looks like I can overlap stuff, so its not so restricted to a grid.</p>

<p>I see the String inputText line, but im not sure how to alter it.</p>

<p>Appreciate the help.</p>
]]></description>
   </item>
   <item>
      <title>Resizing a Movie - Possible Bug?</title>
      <link>https://forum.processing.org/two/discussion/23389/resizing-a-movie-possible-bug</link>
      <pubDate>Mon, 10 Jul 2017 14:14:46 +0000</pubDate>
      <dc:creator>danlj</dc:creator>
      <guid isPermaLink="false">23389@/two/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I'm getting some inconsistent behaviour with PImage.width, PImage.height, and PImage.resize() when working with Movie files. Width and height will almost always return 0, though will occasionally return the correct dimensions. PImage.resize() will sometimes throw an error: "Width(0) and Height(0) cannot be &lt;= 0" - even when the dimensions are hardcoded in. I'm posting this here because I'm not sure whether this is a bug or I'm just doing something silly with the code:</p>

<p>macOS 10.12.5; Quicktime 10.4; P3.3.5</p>

<pre><code>import processing.video.*;

Movie m;
PImage mS;
int vScale = 4;
int mW;
int mH;

void setup() {
  size(480, 270);
  m = new Movie(this, "test.mov"); // original dim: 1920 1080
  m.loop();
  mW = m.width; 
  mH = m.height;

  // Almost always returns 0 for both values, but occasionally returns the correct dimensions.  
  println("width: " + mW +" " + "Height: " + mH); 
}

void draw() {
  mS = m.get();

  //This almost never works
  //mS.resize(mW/vScale, mH/vScale); 

  //This works most of the time, but not always!
  //mS.resize(1920/vScale, 1080/vScale); 

  //Again works most of the time, but not always...
  mS.resize(480, 270);


  image(mS, 0, 0);
}

void movieEvent(Movie m) {
 m.read(); 
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Cropping image without stretching?</title>
      <link>https://forum.processing.org/two/discussion/23305/cropping-image-without-stretching</link>
      <pubDate>Tue, 04 Jul 2017 10:44:28 +0000</pubDate>
      <dc:creator>ionathan</dc:creator>
      <guid isPermaLink="false">23305@/two/discussions</guid>
      <description><![CDATA[<p>Hi everyone,</p>

<p>I am trying to crop an image. I've used the resize(); function but this changes the proportions of the image. Does anyone know how to crop an image without stretching it? I only want it to scale up and down within the decided size (or mask).</p>

<p>Hope it makes sense!</p>

<p>Thanks,</p>

<p>Jonathan</p>
]]></description>
   </item>
   <item>
      <title>Dynamic Window Layering</title>
      <link>https://forum.processing.org/two/discussion/23108/dynamic-window-layering</link>
      <pubDate>Sun, 18 Jun 2017 03:34:58 +0000</pubDate>
      <dc:creator>FricativeMelon</dc:creator>
      <guid isPermaLink="false">23108@/two/discussions</guid>
      <description><![CDATA[<p>I'm working on a UI system where the user can move and resize windows. The focus goes where it should when you click and lets you manipulate window contents, and it overlaps correctly, but...</p>

<p>What I want is to be able to draw whatever I want in any particular type of window, but for it to always draw within the bounds of the window. Right now I can only draw rectangles, and it simply intersects their bounds with the window's before it draws each one, but, for example, there is no way to just draw a partial rounded rectangle (which happens to be my window shape) in Processing without an annoying manual construction, and if I ever want anything more complicated I'm probably not going to be able to / want to do it manually.</p>

<p>I considered using a stored PGraphics on each window, which would let me draw offscreen then paste in the area I want, but the user can resize windows (PGraphics can't be resized), and the documentation states that creating a new PGraphics is too expensive to do constantly.</p>

<p>Is there some faster way to draw anything I can draw on a PGraphics only within a certain rectangle? Would the slowdown from making a new PGraphics whenever the mouse drags actually not be that bad?</p>
]]></description>
   </item>
   <item>
      <title>random image size</title>
      <link>https://forum.processing.org/two/discussion/23027/random-image-size</link>
      <pubDate>Sun, 11 Jun 2017 18:40:35 +0000</pubDate>
      <dc:creator>JJJJJJ</dc:creator>
      <guid isPermaLink="false">23027@/two/discussions</guid>
      <description><![CDATA[<p>how to change each image size randomly like twinkle stars?</p>
]]></description>
   </item>
   <item>
      <title>Anyway to resize PImage in FX2D without smoothing?</title>
      <link>https://forum.processing.org/two/discussion/22903/anyway-to-resize-pimage-in-fx2d-without-smoothing</link>
      <pubDate>Sat, 03 Jun 2017 16:05:48 +0000</pubDate>
      <dc:creator>barefists</dc:creator>
      <guid isPermaLink="false">22903@/two/discussions</guid>
      <description><![CDATA[<p>Is there anyway at the moment to resize images in FX2D renderer without blurring? I peeked under the hood and realized Processing uses JavaFX's GraphicsContext, which doesn't support nearest neighbor type of interpolation yet, but asking here in hopes I might have missed something.</p>
]]></description>
   </item>
   <item>
      <title>How do you get different sized images on to canvas without distorting?</title>
      <link>https://forum.processing.org/two/discussion/22905/how-do-you-get-different-sized-images-on-to-canvas-without-distorting</link>
      <pubDate>Sat, 03 Jun 2017 18:43:39 +0000</pubDate>
      <dc:creator>1rulesupersedes</dc:creator>
      <guid isPermaLink="false">22905@/two/discussions</guid>
      <description><![CDATA[<pre><code>var fet = [];
var current_image = 0;
var but;

function preload() { 
  for (var i =0; i&lt; 6; i++) { 
    fet[i] = loadImage('fet_pictures/' + i + '.jpg');
  }
}

function setup() { 
  createCanvas(400, 400);
  imageMode(CORNER);
  but = createButton("change");
  but.mousePressed(change_image);
}

function draw() { 
  background(0); 
  image(fet[current_image], 0, 0, width, height);
}

function change_image(){
    current_image = current_image + 1;
     if(current_image &gt; 5){
         current_image =0;

     }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Need to loop my Video so 100 small videos appear on the screen at the same time.</title>
      <link>https://forum.processing.org/two/discussion/22422/need-to-loop-my-video-so-100-small-videos-appear-on-the-screen-at-the-same-time</link>
      <pubDate>Sat, 06 May 2017 19:12:21 +0000</pubDate>
      <dc:creator>muhammad7319</dc:creator>
      <guid isPermaLink="false">22422@/two/discussions</guid>
      <description><![CDATA[<p><a href="/two/profile/muhammad7319">@muhammad7319</a></p>

<p>You have deliberately vandalised this discussion.</p>

<p>Please read the discussion <a rel="nofollow" href="https://forum.processing.org/two/discussion/21148/do-not-delete-your-posts#latest">DO NOT DELETE YOUR POSTS</a>.</p>

<p>koogs has restored your original posting below.</p>
]]></description>
   </item>
   <item>
      <title>Sketch running slow</title>
      <link>https://forum.processing.org/two/discussion/22201/sketch-running-slow</link>
      <pubDate>Tue, 25 Apr 2017 16:53:39 +0000</pubDate>
      <dc:creator>Sjors</dc:creator>
      <guid isPermaLink="false">22201@/two/discussions</guid>
      <description><![CDATA[<p>So I made this little game with pictures (they are hosted online so anyone can run this script) on my computer it runs fine but when I move to a device with lower specs it starts to drop to like 5fps how would I solve this? also when running this code it could look clitchy since I didn't keep aspect ratios in mind when making it.</p>

<p>EDIT: I made the stupid mistake of not mentioning that when I when I said "a lower spec system" I meant an andriod phone</p>

<pre><code>ArrayList &lt;Bullet&gt; bullets;
int background_y;

PImage background;
PImage player;
PImage enemy;
PImage bullet;

int bullet_traveling;
int bullet_timer1;
int bullet_timer2;
int bullet_shot;
int bullet_side;
int bullet_x;
int bullet_y;

int enemy_health;
int enemy_x;
int enemy_y;

int player_x;
int player_y;

void setup() {
  fullScreen();
  frameRate(60);
  bullets = new ArrayList();

  background = loadImage("https://" + "s21.postimg.org/oubg978af/background.png");
  player = loadImage("https://" + "s13.postimg.org/hy84r98mv/player.png");
  bullet = loadImage("https://" + "s23.postimg.org/45ev766kr/bullet.png");
  enemy = loadImage("https://" + "s27.postimg.org/6njql63gz/enemy.png");

  bullet.resize(bullet.width/3, bullet.height/3);
  background.resize(width, height);

  player_y = height/4*3;
  player_x = width/2;
}

void draw() {
  background();
  for (Bullet temp : bullets) temp.update();
  bullet_enemy();
  player();
  enemy();

  if (mousePressed) {
    if (bullet_timer1 == 0) {
      bullet_timer1 = 1;
      bullet_timer2 = millis();
    }
    if (millis() - bullet_timer2 &gt;= 200) {
      bullet_timer1 = 0;
      if (bullet_side == 1) {
        Bullet temp = new Bullet(player_x+55, player_y);
        bullets.add(temp);
        bullet_side = 0;
      } else {
        Bullet temp = new Bullet(player_x-55, player_y); 
        bullets.add(temp);
        bullet_side = 1;
      }
    }
  }
}

void background() {
  image(background, 0, background_y);
  image(background, 0, background_y-height);
  background_y += 1;
  if (background_y &gt;= height) background_y = 0;
}

void enemy() {
  if (enemy_health == 0) {
    enemy_health = 1;
    enemy_y = -enemy.width/2;
    enemy_x = int(random(enemy.width/2, width-enemy.width/2));
  }
  if (enemy_y-enemy.width/2 &gt;= height) {
    enemy_health = 0;
  }
  enemy_y += 3;

  image(enemy, enemy_x-enemy.width/2, enemy_y-enemy.height/2);
}

void player() {
  if (mousePressed &amp;&amp; player_x &lt; mouseX) player_x = player_x + 12;
  if (mousePressed &amp;&amp; player_x &gt; mouseX) player_x = player_x - 12;
  image(player, -player.width/2+player_x, -player.height/2+player_y);
}

void bullet_enemy() {
  if (player_x &lt;= enemy_x+100 &amp;&amp; player_x &gt;= enemy_x-100 || bullet_traveling == 1) {
    bullet_traveling = 1;
    if (bullet_shot == 0) {
      bullet_x = enemy_x;
      bullet_y = enemy_y;
      bullet_shot = 1;
    }
    rect(bullet_x, bullet_y, 10, 10);
    bullet_y = bullet_y + 30 ;
  }

  if (bullet_x &lt;= player_x+player.width/2 &amp;&amp; bullet_x &gt;= player_x-player.width/2 &amp;&amp; bullet_y &gt;= player_y) {
    bullet_traveling = 0;
    bullet_shot = 0;
  }
}

class Bullet {
  float x;
  float y;
  float speed;

  Bullet(float tx, float ty) {
    x = tx;
    y = ty;
  }

  void update() {
    image(bullet, -bullet.width/2+x, -bullet.height/2+y);
    y -= 25;
    if (x &lt;= enemy_x+enemy.width/2 &amp;&amp; x &gt;= enemy_x-enemy.width/2 &amp;&amp; y &lt;= enemy_y) {
      x = -10000;
      enemy_health = 0;
    }
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Problem with windowResized and line drawing</title>
      <link>https://forum.processing.org/two/discussion/21782/problem-with-windowresized-and-line-drawing</link>
      <pubDate>Mon, 03 Apr 2017 15:41:09 +0000</pubDate>
      <dc:creator>gilFuser</dc:creator>
      <guid isPermaLink="false">21782@/two/discussions</guid>
      <description><![CDATA[<p>Hi everybody.</p>

<p>I can't find where is the problem with my sketch.
Every time I resize the browser's window, the drawing made with   line(pmouseX, pmouseY, mouseX, mouseY) disappears.
Is this normal? How could I avoid it?</p>

<p>Here is the Pen from it: <a href="https://codepen.io/skmecs/pen/LWapZJ" target="_blank" rel="nofollow">https://codepen.io/skmecs/pen/LWapZJ</a></p>

<p>thank you all in advance</p>

<p>best regards,
Gil</p>
]]></description>
   </item>
   <item>
      <title>How to scale an image without using .scale()</title>
      <link>https://forum.processing.org/two/discussion/21703/how-to-scale-an-image-without-using-scale</link>
      <pubDate>Thu, 30 Mar 2017 12:35:22 +0000</pubDate>
      <dc:creator>Tankcaster</dc:creator>
      <guid isPermaLink="false">21703@/two/discussions</guid>
      <description><![CDATA[<p>So I'm trying to nearly perfectly recreate Pac-man in processing. My problem is the original assets are very small, the map is 224 * 288 for example. However, a lot of the game mechanics depend on the size being that. That size allows the map to be divisible by 8 which allows a perfect grid of all dots and playable spaces. A lot of the speeds are also dependent on the pixels staying the same. Is there a way just to scale the window without using resize? Thanks for any help!</p>
]]></description>
   </item>
   <item>
      <title>How do i fix my game from a slow render speed? (-------===answered===-------)</title>
      <link>https://forum.processing.org/two/discussion/21341/how-do-i-fix-my-game-from-a-slow-render-speed-answered</link>
      <pubDate>Sun, 12 Mar 2017 03:49:46 +0000</pubDate>
      <dc:creator>RockyHawk</dc:creator>
      <guid isPermaLink="false">21341@/two/discussions</guid>
      <description><![CDATA[<p>I created a game in processing and when the character moves the map tends to take a while to render.. ill display the code below. The map is named map1. I am new so it may be very poorly opimized and if that is the problem just tell me what i can do to fix it.</p>

<p><code>float w,a,s,d = 0;
float menu = 1;
float game = 0;
float ram = 0;
float running = 1;
float x = 50;
float y = 50;
PImage title;
PImage start;
PImage quit;
PImage down;
PImage left;
PImage right;
PImage up;
PImage ver;
PImage pistol;
PImage spistol;
PImage uzi;
PImage xm1;
PImage xm2;
PImage cursor;
PImage map1;
PImage dir;
void setup() {
  size(1366,768);
  surface.setResizable(true);
  background(0);
  noStroke();
  fill(255);
  noCursor();
  title = loadImage("title.gif");
  start = loadImage("start.gif");
  quit = loadImage("quit.gif");
  down = loadImage("Down.png");
  left = loadImage("Left.png");
  right = loadImage("Right.png");
  up = loadImage("up.png");
  ver = loadImage("ver.png");
  pistol = loadImage("Pistol.gif");
  spistol = loadImage("Scope Pistol.gif");
  uzi = loadImage("UZI.png");
  xm1 = loadImage("XM-1.png");
  xm2 = loadImage("XM-2.png");
  cursor = loadImage("cursor.png");
  map1 = loadImage("map1.png");
  dir = down;
  textSize(20);
}
void draw() {
  if(menu == 1) {
    clear();
    text(frameRate, width-32, 20);
    image(title,width/2.732,030);
    image(start,width/3.902,250);
    image(quit,width/3.902,350);
    pistol.resize(132,84);
    right.resize(150,150);
    image(right,width/1.437,275);
    image(ver,0,0);
    image(pistol,width/1.366,350);
    cursor.resize(32,32);
    image(cursor,mouseX,mouseY);
  }
  if(game == 1) {
    clear();
    text(frameRate, width-32, 20);
    image(map1,x,y);
    dir.resize(75,75);
    image(dir,683,384);
    keypress();
    detect();
  }
}
void detect() {
  if(x == 630) {
      x=620;
    }
  if(x == -1690) {
      x=-1680;
    }
  if(y == 330) {
      y=320;
    }
  if(y == -1990) {
      y=-1980;
    }
  if(x == -1060 &amp;&amp; y&lt;-880) {
      x=-1050;
    }
  if(y == -890 &amp;&amp; x&lt;-1050 &amp;&amp; x&gt;-1200) {
    y=-880;
  }
  if(x==-1190 &amp;&amp; y&lt;-880) {
    x=-1200;
  }
  if(x==-1060 &amp;&amp; y&gt;-380) {
    x=-1050;
  }
  if(x==-1190 &amp;&amp; y&gt;-380) {
    x=-1200;
  }
  if(y==-370 &amp;&amp; x&gt;-1200 &amp;&amp; x&lt;-1050) {
    y=-380;
  }
  if(x==-20 &amp;&amp; y&lt;-320 &amp;&amp; y&gt;-1170) {
    x=-10;
  }
  if(x==-140 &amp;&amp; y&lt;-320 &amp;&amp; y&gt;-1170) {
    x=-150;
  }
  if(y==-330 &amp;&amp; x&gt;-150 &amp;&amp; x&lt;-10) {
    y=-320;
  }
  if(y==-1160 &amp;&amp; x&gt;-150 &amp;&amp; x&lt;-10) {
    y=-1170;
  }
}
void keypress() {
  if(w == 1) {
    dir=up;
    y=y+2.5;
  }
  if(a == 1) {
    dir=left;
    x=x+2.5;
  }
  if(s == 1) {
    dir=down;
    y=y-2.5;
  }
  if(d == 1) {
    dir=right;
    x=x-2.5;
  }
}
void mouseReleased() {
  if(menu == 1) {
    if(mouseX&gt;width/3.902 &amp;&amp; mouseX &lt;width/3.902+185 &amp;&amp; mouseY&gt;350 &amp;&amp; mouseY &lt;350+75) {
      exit();
    }
    if(mouseX&gt;width/3.902 &amp;&amp; mouseX &lt;width/3.902+185 &amp;&amp; mouseY&gt;250 &amp;&amp; mouseY &lt;250+75) {
      menu = 0;
      game = 1;
      x=50;
      y=50;
    }
  }
}
void keyPressed() {
  if(keyCode == ESC) {
    game = 0;
    menu = 1;
    key=0;
  }
  if(key == 'w') {
    w = 1;
  }
  if(key == 'a') {
    a = 1;
  }
  if(key == 's') {
    s = 1;
  }
  if(key == 'd') {
    d = 1;
  }
}
void keyReleased() {
  if(key == 'w') {
    w = 0;
  }
  if(key == 'a') {
    a = 0;
  }
  if(key == 's') {
    s = 0;
  }
  if(key == 'd') {
    d = 0;
  }
}</code></p>
]]></description>
   </item>
   <item>
      <title>How would I make my character (link) bigger?</title>
      <link>https://forum.processing.org/two/discussion/21264/how-would-i-make-my-character-link-bigger</link>
      <pubDate>Wed, 08 Mar 2017 21:23:00 +0000</pubDate>
      <dc:creator>Nathan101</dc:creator>
      <guid isPermaLink="false">21264@/two/discussions</guid>
      <description><![CDATA[<pre><code>float x;
float y;
PImage linkUp;
PImage linkDown;
PImage linkLeft;
PImage linkRight;
PImage current;


void setup () {
  size(1000, 800);
  linkUp = loadImage("link_Up.png");
  linkDown = loadImage("link_Down_Shield.png");
  current = loadImage("link_Down_Shield.png");
  linkLeft = loadImage("link_Left_Shield.png");
  linkRight = loadImage("link_Right_Shield.png");
  x = 50;
  y = 100;
}


void draw () {
  background(0);
  image(current, x, y);
}


void keyPressed() {

  if ( key == CODED) {
    if ( keyCode == UP) {
      current = linkUp;
      y = y - 10;
    }
    if ( keyCode == DOWN) {
      current = linkDown;
      y = y + 10;
    }
    if ( keyCode == LEFT) {
      current = linkLeft;
      x = x - 10;
    }
    if ( keyCode == RIGHT) {
      current = linkRight;
      x = x + 10;
    }
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>resizing a PImage in Processing 2 and 3</title>
      <link>https://forum.processing.org/two/discussion/20885/resizing-a-pimage-in-processing-2-and-3</link>
      <pubDate>Sun, 19 Feb 2017 23:53:31 +0000</pubDate>
      <dc:creator>5tefan</dc:creator>
      <guid isPermaLink="false">20885@/two/discussions</guid>
      <description><![CDATA[<p>In an Android application that I've written using Processing 2 I have the following:</p>

<pre><code>void setup() {
    if (cam == null) cam = new KetaiCamera(this, camWidth, camHeight, 30);    
}

void draw() {
    img = cam.get();
    img.loadPixels();
    img.updatePixels();
    // render the original image to screen, seems to be necessary before resizing...
    image(img, width/2, height/2, height, width);

    img.resize(7, 5);
    img.loadPixels();
    // render the scaled image over the original one
    image(img, width/2, height/2, height, width);
}
</code></pre>

<p>This has always worked fine for me while using the Processing 2 Android lib. Now I'm trying to port this to Processing 3. I had to change some details (e.g. <code>width</code>, <code>height</code> have become <code>displayWidth</code>, <code>displayHeight</code>) but what bothers me most is that I'm not able to display the scaled image over the original one. I <em>suspecting</em> it's related to <code>resize()</code> not working quite as expected but I don't know for sure. I am simply not seeing the image though I don't get an error. For testing purposes I checked the color of the first pixel of the resized image - I'm always getting 0, 0, 0 which is certainly not right but doesn't explain why I'm not seeing the image.</p>

<p>Does anyone know what might cause the problem? Have there been any changes between p2 and 3 regarding how <code>resize()</code> works?</p>

<p>Thanks very much, Stefan</p>
]]></description>
   </item>
   <item>
      <title>Make p5's canvas to fill it's parent's div</title>
      <link>https://forum.processing.org/two/discussion/14740/make-p5-s-canvas-to-fill-it-s-parent-s-div</link>
      <pubDate>Wed, 03 Feb 2016 06:59:14 +0000</pubDate>
      <dc:creator>Mastish</dc:creator>
      <guid isPermaLink="false">14740@/two/discussions</guid>
      <description><![CDATA[<p>Hi again.</p>

<p>Yesterday for most of my day I tried to figure out how to get the values of parent and pass them to the canvas width and height. I made so many tries but faild multiple times. The code that I have now works, but doesnt scale canvas. Here is the skeleton of how have i created and assigned the canvas to div.</p>

<pre><code>var sketch0 = function( p ) {
  p.setup = function() {
    var cnv = p.createCanvas(500,500); // createCanvas(windowWidth, windowHeight); 
   //Some magic should happen here
  };

  p.draw = function() {
    p.background(255,0,0);
  };

var myp5_0 = new p5(sketch0, 'selection0'); //assigning the canvas to div 'selection0'
</code></pre>

<p>Now some backstory - I'm trying to make 'one page' webpage with multiple <strong>full screen</strong> divs scrolling vertically. All that I have ready to go and working in html and everything works just fine, but the canvas are not responsive at all.</p>

<p>windowWidth and windowHeight makes the canvas disapear. resize() doesnt work either.
I guess that the parent() should do the trick but I cant get the parent's width and height.</p>
]]></description>
   </item>
   <item>
      <title>Resizing/Saving an Image</title>
      <link>https://forum.processing.org/two/discussion/20280/resizing-saving-an-image</link>
      <pubDate>Sun, 15 Jan 2017 15:56:17 +0000</pubDate>
      <dc:creator>mobodcubism</dc:creator>
      <guid isPermaLink="false">20280@/two/discussions</guid>
      <description><![CDATA[<p>Hey all,</p>

<p>I'm trying to write a program that reduces the size of an image by a predetermined factor.
My program has to load an image file into a PImage, construct a new PImage, eight times smaller in every dimension, with the scaled content, and save that new PImage to disk.</p>

<p>Saving an image with save() works but i'm struggling to simultaneously rescale as well. 
Is it possible to use resize() with save() to achieve this? Or is there perhaps a more efficient way of going about doing this?</p>

<p>Any help would be greatly appreciated!
Thanks</p>
]]></description>
   </item>
   <item>
      <title>How to Resize images in a String and/or an Array and for images to stop glitching</title>
      <link>https://forum.processing.org/two/discussion/19143/how-to-resize-images-in-a-string-and-or-an-array-and-for-images-to-stop-glitching</link>
      <pubDate>Fri, 18 Nov 2016 17:45:44 +0000</pubDate>
      <dc:creator>Frostbite180</dc:creator>
      <guid isPermaLink="false">19143@/two/discussions</guid>
      <description><![CDATA[<p>Hey everyone. I am new to processing and new to this website. I'm working on a project with the end goal of being a dress-up game but right now I am just testing out some code to make sure whether or not I can actually code it. I did find some code that is useful but I am experiencing some problems with it and I was hoping someone could point me in the right direction.
My problem is that I cannot resize the images I am using within my sketch. I've played around with various numbers in my code but just can't seem to change anything. The images appear as squished tiny things but I would like them to be bigger (so I can actually see what they are :)   ). My other problem is that when one image drags over another one, they glitch and will 'jump' away from one another. If this cannot be fixed, it's fine but some more information as to why that is happening would be most kind.</p>

<p>For the most part, I do understand what it happening. I just want to know these few things will not work and how to fix them. Thank you in advance!</p>

<p>I've used the following examples to help me out so far:</p>

<p><a href="https://forum.processing.org/two/discussion/4229/help-with-dragging-and-dropping-multiple-images-in-an-array" target="_blank" rel="nofollow">https://forum.processing.org/two/discussion/4229/help-with-dragging-and-dropping-multiple-images-in-an-array</a>
<a href="https://processing.org/discourse/beta/num_1256052533.html" target="_blank" rel="nofollow">https://processing.org/discourse/beta/num_1256052533.html</a></p>

<p>My code is as follows:</p>

<pre><code>String[] images = {
  "Sprite.png", "Sprite2.png", "Sprite3.png"
};

float[] positions =new float [images.length*2] ;

// 0,1,2,3,4,5
// 4,5,6,7,8,9
float bx;
float by;
int bs = 40;
int bz = 30;
boolean bover = false;
boolean locked = false;
float bdifx = 0.0; 
float bdify = 0.0; 
PImage[] image1 = new PImage [images.length]; 
float newx, newy;
int whichImage;

void setup() 
{
  imageMode (CENTER);
  size(600, 400);
  bx = width/2.0;
  by = height/2.0;

  for (int i=0; i &lt; images.length; i++) {
    image1 [i]= loadImage(images[i]); //loads in the images
   // image (image1[i], random(width), random(height), 50, 50) ;
  } 

  for (int j=0; j &lt; images.length*2; j+=2) { //Positions for Images
    positions[j]= random(100);
    positions[j+1]= random(100);
  }
}

void draw() 
{ 
  background(255);
  // Test if the cursor is over the box 
  for (int i=0; i &lt; images.length; i++) {
    if (mouseX &gt; positions[i*2]-bs &amp;&amp; mouseX &lt; positions[i*2]+bs &amp;&amp; 
      mouseY &gt; positions[i*2+1]-bs &amp;&amp; mouseY &lt; positions[i*2+1]+bs) 
    {
      println ("mouseover image: "+i);
      whichImage=i;

      bover = true;  
      if (!locked) 
      { 
        stroke(255); 
        fill(153);
      }
      break;
    } 
    else
    {
      stroke(153);
      fill(153);
      bover = false;
    }
  }
  for (int j=0; j &lt; images.length; j++) {
    image (image1[j], positions[j*2], positions[j*2+1], 50, 50) ;
  }
}
void mousePressed() {
  if (bover) { 
    locked = true;
  } 
  else {
    locked = false;
  }
}
void mouseReleased() {
  locked = false;
}
void mouseDragged() {
  if (locked) {
    newx = mouseX; 
    newy = mouseY;
  } 
  positions [whichImage*2] = newx;
  positions [(whichImage*2)+1] = newy;
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Filling shapes with a pattern.</title>
      <link>https://forum.processing.org/two/discussion/18710/filling-shapes-with-a-pattern</link>
      <pubDate>Tue, 25 Oct 2016 18:09:17 +0000</pubDate>
      <dc:creator>mapspug</dc:creator>
      <guid isPermaLink="false">18710@/two/discussions</guid>
      <description><![CDATA[<p>Hi I am new to processing and I am trying to create a shape (a rectangle with curved edges) and fill it with a pattern. I know I can probably fill it using a for loop, but that seemed a little daunting. The alternative approach I thought of is to use an image and fill the shape with that image; however, I can't seem to figure out how to fill out the curved edges.</p>

<pre><code>void draw() {
  background(#FFFAFA);

strokeWeight(5);
fill(255);
rect(70,60,800,470,0,105,105,0);
//resizes the image and fills a rectangle shape
PImage static1 = loadImage("static.jpg");
static1.resize(700, 463);
image(static1, 73, 64);

}
</code></pre>
]]></description>
   </item>
   <item>
      <title>RaspberryPi Processing 3 Performance Issues for Loading images on runtime</title>
      <link>https://forum.processing.org/two/discussion/18287/raspberrypi-processing-3-performance-issues-for-loading-images-on-runtime</link>
      <pubDate>Sun, 25 Sep 2016 10:02:24 +0000</pubDate>
      <dc:creator>Bhargav</dc:creator>
      <guid isPermaLink="false">18287@/two/discussions</guid>
      <description><![CDATA[<p>I am using processing 3.2.1 on RasbperryPi 3</p>

<p>In one of my programs I am loading three images on runtime from set of images in a folder.  The images are changing runtime. Raspberrypi is fast enough to run the code and atleast load three images of each less then 150kb and of resolution 1260x760.</p>

<p>But my output becomes extremely slow while loading these images together. Loading one image runs smooth, two slower and three super slow. I have no guess about why is processing not able to run fast when Raspberypi is capable to running the code.  The same code runs with perfect speed on my laptop in windows.</p>

<p>Part of the code is as under :</p>

<pre><code>  //Load Images
  imgA = loadImage(path+ displayuserid +"/"+ displayobjectid +"/" + (imageno)%36 +  ".jpg");
  imgB = loadImage(path+ displayuserid +"/"+ displayobjectid +"/" + (imageno+1)%36 +  ".jpg");
  imgC = loadImage(path+ displayuserid +"/"+ displayobjectid +"/" + (imageno+2)%36 +  ".jpg");     


    //Display Images
    imgA.resize(0,250);
    image(imgA, width/2 - imgA.width/2, height/2 + height/2 - imgA.height);      


     pushMatrix();
     translate(width/2,height/2);
     rotate(90*TWO_PI/360);
     imgB.resize(0,250);
     image(imgB, -imgB.width/2, height/2-imgB.height);
     popMatrix();

     pushMatrix();
     translate(width/2,height/2);
     rotate(-90*TWO_PI/360);
     imgC.resize(0,250);
     image(imgC, -imgC.width/2, height/2-imgC.height);
     popMatrix();  
</code></pre>
]]></description>
   </item>
   </channel>
</rss>