<?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 #size - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=%23size</link>
      <pubDate>Sun, 08 Aug 2021 19:19:45 +0000</pubDate>
         <description>Tagged with #size - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/tagged%23size/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>How to resize my loadImage?</title>
      <link>https://forum.processing.org/two/discussion/14287/how-to-resize-my-loadimage</link>
      <pubDate>Wed, 06 Jan 2016 04:47:37 +0000</pubDate>
      <dc:creator>Hooga</dc:creator>
      <guid isPermaLink="false">14287@/two/discussions</guid>
      <description><![CDATA[<p>I originally got a program that reads the pixels in a picture, In order for it to work the picture has to be the same size as the  canvas or for you to see it. Well I loaded in a 1920 x 1080 picture and loaded it into a 1000 x 500 canvas, I set the images
(<code>image(img, 0, 0, width, height);</code>) size to the height and the width of the canvas, but when I load the picture using the <code>loadImage</code> method it loads the image in its original resolution in the background where I cant see it, I want it to load the image into the size of the canvas, how can I accomplish this?
Code:</p>

<pre><code>PImage img;
int direction = 1;
float signal;
int imgX = 0;
int imgY = 0;
int w = width;
int h = height;




void setup() {
  size(1000, 500);
  //fullScreen();
  noFill();
  frameRate(60);
}




void draw() {
  // int boxX = img.width/2;
  //int boxY = img.height/2;
  img = loadImage("203.jpg");

  background(255);



  if (mousePressed) {
    int mx = constrain(mouseX, 0, width-1);
    int my = constrain(mouseY, 0, height-1);
    signal = my*width + mx;
  } else {
    //signal += 0.33*direction;
  }

 // set(imgX, imgY, img);  // fast way to draw an image

  int sx = int(signal) % width;
  int sy = int(signal) / width;
  color c = img.get(sx, sy);
  image(img, 0, 0, width, height);


  //rect(sx, sy, 10, 10);
  fill(c);
  rect(50, 50, 50, 50);

  print("Color " + c);
  println(" X " + sx + " Y " + sy );
}
</code></pre>

<p>In order for this code to work you have to set the canvas size to the resolution of the image, and I do not want that. Plus the canvas size cannot be re-sized.</p>

<h2>If you run this program at the top left corner you will see a box that will copy the color of the pixel where your mouse is at, hover over any pixel to see what my problem is.</h2>
]]></description>
   </item>
   <item>
      <title>How do I change size while the sketch is running?</title>
      <link>https://forum.processing.org/two/discussion/12188/how-do-i-change-size-while-the-sketch-is-running</link>
      <pubDate>Fri, 21 Aug 2015 01:28:47 +0000</pubDate>
      <dc:creator>IcyIcicle</dc:creator>
      <guid isPermaLink="false">12188@/two/discussions</guid>
      <description><![CDATA[<p>How do I change size while the sketch is running?
The surface.resizable(true); does not allow for the sketch to change the size.
My goal is to be able to have a button in processing activate fullscreen, and be able to disable it.</p>
]]></description>
   </item>
   <item>
      <title>Changing Size of Object Slowly</title>
      <link>https://forum.processing.org/two/discussion/10302/changing-size-of-object-slowly</link>
      <pubDate>Tue, 14 Apr 2015 02:33:59 +0000</pubDate>
      <dc:creator>RifleGirl</dc:creator>
      <guid isPermaLink="false">10302@/two/discussions</guid>
      <description><![CDATA[<p>How would you go about changing the size of an object when you click the page. I realize there are many ways to do this but I specifically want the shapes to gradually increase/decrease given an array of numbers.</p>
]]></description>
   </item>
   <item>
      <title>Exporting Application on machines with different screen resolutions</title>
      <link>https://forum.processing.org/two/discussion/10102/exporting-application-on-machines-with-different-screen-resolutions</link>
      <pubDate>Sun, 29 Mar 2015 19:47:49 +0000</pubDate>
      <dc:creator>HenrySmith</dc:creator>
      <guid isPermaLink="false">10102@/two/discussions</guid>
      <description><![CDATA[<p>Hi there,
I am relatively new to processing and am trying to export an application for the first time. 
However the sketch did not appear as desired on every machine that I tried on. Then I released that it is because I make use of the <code>size(displayWidth, displayHeight, P3D);</code> command. Thus, obviously it only appeared well on screens with the same resolution as the screen of the PC I created the sketch on.</p>

<p>Can anyone suggest a way how to make a sketch appear properly on any screen resolution?</p>

<p>I think it involves in setting each and every coordinate relative to the screen width and height right? However thinks may be more complicated since I am making use of images which I assume need to be re-sized in some way.</p>

<p>So basically  I want the sketch to be re-sized to accommodate the resolution of the screen while maintain the aspect ratio.</p>

<p>Any tips will be greatly appreciated!</p>
]]></description>
   </item>
   <item>
      <title>How to change G4P font size?</title>
      <link>https://forum.processing.org/two/discussion/9267/how-to-change-g4p-font-size</link>
      <pubDate>Mon, 02 Feb 2015 11:05:30 +0000</pubDate>
      <dc:creator>VaulB</dc:creator>
      <guid isPermaLink="false">9267@/two/discussions</guid>
      <description><![CDATA[<p>There was a solution for this problem, but the discussion has been deleted. So how do I change the
size of the text in text fields and labels?</p>

<p>Thank you.</p>
]]></description>
   </item>
   </channel>
</rss>