We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Image Screensaver style application
Page Index Toggle Pages: 1
Image Screensaver style application (Read 242 times)
Image Screensaver style application
Mar 7th, 2009, 8:54pm
 
Hi guys.

I am looking to create a kind of screensaver style application showing images from a specific folder. Has anybody done this , and does anybody know any nice snippets of code for transitions between certain images!?

Thanks

Andy
Re: Image Screensaver style application
Reply #1 - Mar 8th, 2009, 4:30am
 
superb flury of responses there!
Re: Image Screensaver style application
Reply #2 - Mar 8th, 2009, 9:18am
 
Well, you haven't tried hard enough.
1. Look up (google) writing to a settings file in Java
2. Use the Present-mode in Processing (search the forum)
3. Look up the File class in Java.

Then, when you start the application, if the settings-file is empty, ask for the folder for the images.
Save that to the settings-file, and a global variable.
Read that folders-file-content into a string-array
Then preload all the images in that folder, or a maximum of ie 10, so you don't run out of memory (and then load more when you get close to the end)
Then you start displaying the images, with some sort of timer. If x numbers of seconds has passed since the image was displayed,
if(millis()>millisWhenTheImageWasDisplay + XSeconds)
trigger a transition.

There have been a couple of transitions on here, so I'd recommend searching..
Or making your own, by just making a clean sketch showing to images, and then try to make different transitions of those

some ideas:
1. cut out equal portions of the image, into a grid-type, place them in arrays, and then randomly place them somewhere else (rememeber to fill all the spots).. swap each segments image (or fade to) to the new image-portion, at that location

2. regular fade

3. slide (place the other image somewhere outside the window, and transform the entire world to the new picture.

4. zoom (zoom closer and closer, or scale the current image larger and larger, and make the new image almost as small as a pixel, so it looks like the new picture is hidden in the old one)


Chop chop, get going
And let us know how it goes! Wink

-seltar



Re: Image Screensaver style application
Reply #3 - Mar 8th, 2009, 12:18pm
 
HI!

I know how to make the general structure of the code etc it was more image transitions that I need a hand with and dont particularly have the time to create my own.

How do i display a picture at its original width / height - will this just happen if i use the pimage object with no params?

Thanks

Andy
Re: Image Screensaver style application
Reply #4 - Mar 8th, 2009, 11:39pm
 
int x = 50, y = 50;
PImage blabla = loadImage("blabla.jpg");
image(blabla,x,y);

make use of the reference in here.. it's pretty awesome
Re: Image Screensaver style application
Reply #5 - Mar 9th, 2009, 2:45am
 
funny guy,
Page Index Toggle Pages: 1