FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   background(Bimage) scaling error
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: background(Bimage) scaling error  (Read 309 times)
elout

12747371274737 WWW
background(Bimage) scaling error
« on: Sep 30th, 2003, 2:07pm »

I noticed today while working with small images, the background function scales the images wrong sometimes.
 
Try this one with a like 4 by 4 pixel image.
 
And try to change the size(width,height) as well.
 
Code:

// p5 v.0063  
 
BImage tex1,mybackground;
 
void setup()
{
  size(600, 600);
  //load a 4 by 4 pixel image
  tex1 = loadImage("test4x4.gif");
}
 
void loop()
{
  //now copy image to the background
  mybackground=tex1.copy(width, height);
  background(mybackground);
  //image(tex1, 0, 0, width,height);
}
 
toxi

WWW
Re: background(Bimage) scaling error
« Reply #1 on: Sep 30th, 2003, 3:03pm »

thanks, that bug is actually not in the background() function, but to do with copy()... it's due to fixed & limited precision... gonna increase it now!
 

http://toxi.co.uk/
fry


WWW
Re: background(Bimage) scaling error
« Reply #2 on: Oct 18th, 2003, 8:04pm »

this fix is either in 65 already or will be in 66. i don't recall when exactly he got it in there. but toxi has struck again in another fit of his madness, and we're all the better for it.
 
Pages: 1 

« Previous topic | Next topic »