LinuxMCE Forums

General => Users => Topic started by: Dale_K on December 09, 2008, 04:18:17 pm

Title: Screensaver panning/zoom
Post by: Dale_K on December 09, 2008, 04:18:17 pm
How would I go about turning off the panning/zoom of the screensaver pics.  I've disabled flickr and copied my own photos to the core and everything is working great except the panning/zoom thing.  I can't find a setting for it in WebAdmin so I'm assuming it's a file I need to edit.

Thanks
Title: Re: Screensaver panning/zoom
Post by: tschak909 on December 09, 2008, 04:32:45 pm
web admin > advanced > configuration > devices

Select Core/Hybrid > OnScreen Orbiter > Photo Screen Saver

Change the ZoomTime to 0.

Why do you want this off, anyway? :-/

-Thom
Title: Re: Screensaver panning/zoom
Post by: krys on December 09, 2008, 05:28:50 pm
Thom you crack me up!  ;D
Title: Re: Screensaver panning/zoom
Post by: Dale_K on January 28, 2009, 07:08:15 pm
Got It!!

Big thanks to tschak for pointing me in the right direction.

Changing the ZoomTime to 0 makes the images stop panning, but does not make the image not zoom in randomly.

So, I spoke with tschak in IRC about it and he indicated that I probably needed to modify the source code.  I went to the wiki to find out how to build a development environment and found this: http://wiki.linuxmce.org/index.php/Setting_Up_A_Development_Environment

However, tschak told me I didn't want to use 'trunk' but LinuxMCE-0710 so with some more searching I found this:
http://wiki.linuxmce.org/index.php/Building_From_Source
(Thanks to Zaerc for the info.)

So, having my new handy dandy development environment I went to the ~/LinuxMCE-0710/src/Photo_Screen_Saver folder and started looking at .cpp files.  Understand that I'm completely clueless in terms of programming but I ain't scared to break some shit.

Finally after a number of failed attempts I finally found this section in the ZoomSimple.cpp file:

ZoomAmount1 = RandomInInterval(500, 1000)/1000.0f;

and

ZoomAmount2 = RandomInInterval(500, 1000)/1000.0f;

I changed both of these lines to:

ZoomAmount1 = RandomInInterval(1, 2)/1.0f;
ZoomAmount2 = RandomInInterval(1, 2)/1.0f;

Then in my terminal session from ~/LinuxMCE-0710/src/Photo_Screen_Saver  (running as root)

make bin
cp Photo_Screen_Saver /usr/pluto/bin

Do a quick reload and shazaam!  I now have images that do not zoom in, I can see the entire image.

Thanks again to tschak for bearing with a noob and to Zaerc for authoring the wiki that got me started.
Title: Re: Screensaver panning/zoom
Post by: tschak909 on January 28, 2009, 07:17:50 pm
Congratulations!

For future improvement, an enterprising hacker can look at adding a single field for Device Data called Zoom Interval, and using it inside the code to set this value, rather than hard-coding it.

There are examples in any generated DCE device (the example may even still be in the photo screensaver), for using DATA_foo to access a device data called foo.

-Thom
Title: Re: Screensaver panning/zoom
Post by: Zaerc on January 28, 2009, 08:28:50 pm
And the other way around, it would also be nice to be able to have the screensaver pan and zoom under UI1 (when the hardware and drivers support it, of course).
Title: Re: Screensaver panning/zoom
Post by: b4rney on January 28, 2009, 10:28:52 pm
Or ...
web admin > advanced > configuration > devices

Select Core/Hybrid or your md > OnScreen Orbiter > Photo Screen Saver

Scroll to device data at the bottom and change 'Type' to static.
 ;)
Title: Re: Screensaver panning/zoom
Post by: tschak909 on January 28, 2009, 10:41:23 pm
Static gets rid of the fade.

-Thom
Title: Re: Screensaver panning/zoom
Post by: b4rney on January 28, 2009, 10:48:40 pm
Sorry Thom,
Didn't know fade was still required!
 :-[
Title: Re: Screensaver panning/zoom
Post by: tschak909 on January 28, 2009, 10:53:09 pm
static is selected when a non-openGL media director is used. It disables all openGL functions and uses a static SDL bitblt.

-Thom

Title: Re: Screensaver panning/zoom
Post by: b4rney on January 28, 2009, 11:11:33 pm
Personally I prefer the animated photo screen saver but my intel graphics card disagrees!
 :)
Title: Re: Screensaver panning/zoom
Post by: Dale_K on January 30, 2009, 03:15:07 pm
Or ...
web admin > advanced > configuration > devices

Select Core/Hybrid or your md > OnScreen Orbiter > Photo Screen Saver

Scroll to device data at the bottom and change 'Type' to static.
 ;)

That doesn't prevent the image from being zoomed in.
Title: Re: Screensaver panning/zoom
Post by: b4rney on January 30, 2009, 03:37:28 pm
That doesn't prevent the image from being zoomed in.
Strange! It stops all animations (fades/pans/zooms) on my md and just shows static pictures.
Might need to reboot your md and/or quick reload router.
Barney
Title: Re: Screensaver panning/zoom
Post by: Dale_K on February 02, 2009, 04:33:46 pm
Strange! It stops all animations (fades/pans/zooms) on my md and just shows static pictures.
Might need to reboot your md and/or quick reload router.
Barney

It does stop animations, the image doesn't move or do an animated zoom in/out, but the images are zoomed at different levels when they appear.  Remove all images but one from your screen saver selections and click reload screen saver in webadmin, you'll see what I mean.
Title: Re: Screensaver panning/zoom
Post by: b4rney on February 02, 2009, 05:41:44 pm
Ah! Right. Good point. I thought I'd saved my pics at the wrong resolution. :-\

It would be nice to display full images (depending on screen size) if it is possible with the 'static' setting. Anyone else achieved this?
Barney
Title: Re: Screensaver panning/zoom
Post by: Dale_K on February 02, 2009, 07:59:04 pm
Ah! Right. Good point. I thought I'd saved my pics at the wrong resolution. :-\

It would be nice to display full images (depending on screen size) if it is possible with the 'static' setting. Anyone else achieved this?
Barney

My post above is the way to do it for now.  Someone could re-code so that the ZoomAmount1 and 2 are variables that can be changed, unfortunately I don't have the expertise for such an endeavor yet.
Title: Re: Screensaver panning/zoom
Post by: colinjones on February 03, 2009, 01:56:23 am
I think you'll find this is just the scaling feature rather than anything to do with zooming. Way back when, the photo screen saver couldn't handle pics greater than 1024 pixels (I think, can't remember if this is vertical, horizontal or both!).

When you put pics in there that are larger than this, it would start cycling back and forth between 2 specific pics, for ages, before moving on, or even between a black and white screen. This was fixed up simply in the latest release by adding a scaling function (you can see the Device Data for this in the device) that prescales each image down if it is larger than this, first before displaying it. I think that is what you are seeing. If you remove all images but a handful of small ones, you should see them all appear unscaled and at their correct size (ie with blank borders around them).

Also, tail the PSS log file, you can see the messages being logged in there about pictures being scaled so that you can confirm what is happening.
Title: Re: Screensaver panning/zoom
Post by: Dale_K on February 03, 2009, 09:57:35 pm
I think you'll find this is just the scaling feature rather than anything to do with zooming. Way back when, the photo screen saver couldn't handle pics greater than 1024 pixels (I think, can't remember if this is vertical, horizontal or both!).

When you put pics in there that are larger than this, it would start cycling back and forth between 2 specific pics, for ages, before moving on, or even between a black and white screen. This was fixed up simply in the latest release by adding a scaling function (you can see the Device Data for this in the device) that prescales each image down if it is larger than this, first before displaying it. I think that is what you are seeing. If you remove all images but a handful of small ones, you should see them all appear unscaled and at their correct size (ie with blank borders around them).

Also, tail the PSS log file, you can see the messages being logged in there about pictures being scaled so that you can confirm what is happening.

No, I saw the section that referred to scaling and you are correct, it seems to have been added to correct images larger that the screen resolution and it works perfectly.  When I put an image in my pictures folder that is too large for the screen it scales it down to fit.  (When the ZoomAmount1 and 2 are changed as detailed above)

The ZoomAmount1 and 2 settings are in fact just that, a random zoom variable for your images.  When they are left default the same image will refresh zoomed in and out at different intervals so it's not scaling it is actually zooming in and out on your image.
Title: Re: Screensaver panning/zoom
Post by: nite_man on March 17, 2009, 03:09:05 pm
Cannot understand how to avoid resizing of portrait photos? Landscape ones are showed fine. But portrait images look ugly.