26 (edited by dattas 2008-02-27 09:32:55)

Re: Menalto Gallery G2 Widet...

I have noticed this as well... sometimes the configuration widget won't work until I right click and hit play....
New version may be out soon.

Change Log:
- Tap the screen for new picture.
- Different way to get the pictures, if you have gallery make 320x320 sizes, then it should pull those instead of the full size ones.
- Cleaned up code.

Planned features:
- Change picture every X seconds (configurable in the configuration)
- Get New pictures while the old one is still there (no more going to black for new pictures)

If you guys (or gals) have any feature requests, put them here, we will see what we can do. (If you have code with it, it will make it easier)

Edit:
Threw up a webpage for this widget to keep track of changes, planned features, etc.
http://dattasmoon.com/page/1

My chumby is in the mail!

27 (edited by dattas 2008-02-27 14:20:45)

Re: Menalto Gallery G2 Widet...

Hey there,
I got Version 1.0 done for you all. Check out the changes in the changelog at: http://dattasmoon.com/page/1
Doc suggested that I submit these new versions, So I have under the name: Improved Gallery2 widget
So if you have any feature requests, simply put them here and I will consider them

My chumby is in the mail!

Re: Menalto Gallery G2 Widet...

Hi Dattas,

Sorry, but no matter what I do I just cannot get this to work!  I just get a blank screen with an error message about loading images.  Is there some hidden trick I'm just not getting?

Cheers,

Rich

Re: Menalto Gallery G2 Widet...

hey there Rich,
I have noticed (now that you mentioned it) that it does not work on some chumbys, mine it works just fine on, but I pull it up on my friend's and I get a similar error, I will be working on this, thanks for the info.

My chumby is in the mail!

Re: Menalto Gallery G2 Widet...

There is a bug currently in Gallery2 itself that even though you request a certain size - it always gives you the full size.

Re: Menalto Gallery G2 Widet...

Doc & Dattas -

First off, thanks for taking the initiative on these widgets.  I've tried both of your respective widget postings added on Mar 30 - "Menalto Gallery2" and "Improved Gallery2." Unfortunately, neither one seems to work for me on my brand new Chumby.

For "Menalto" (Doc), I get the message "100%" in white text on black background and it never changes - seems to just timeout. 

For "Improved" (Dattas), I get the message "Loading..." in white text on black background and it never changes - seems to just timeout. Also, for Dattas, it seems like your website doesn't have anything posted specifically about Chumby (i.e. http://dattasmoon.com/page/1) like the widget feature list , status, etc.

Is there something I'm doing wrong here trying to use either Widget? BTW, I added the standard "crossdomain.xml" file on the root of my webserver where Gallery2 is hosted.  The sample crossdomain.xml I used came for www.crossdomainxml.org

Your thoughts...
Doug

Re: Menalto Gallery G2 Widet...

Correction: I should not have written Widgets "added on Mar 30" since it looks like all the Widgets have that date which must be incorrectly labelled on Chumby.com.  Instead, both widgets appear to be version 1.0.

Re: Menalto Gallery G2 Widet...

dougdfresh wrote:

For "Menalto" (Doc), I get the message "100%" in white text on black background and it never changes - seems to just timeout.

Doug -

I have seen this happen when the pictures are really really big as in 100s of mb - although i have not seen this happen since the last update of the firmware.

Is your gallery public?  I could take a look at hte url you are using and see if i can dope anything out for you...

DocSavage

Re: Menalto Gallery G2 Widet...

Just to close the loop here for everyone else.

Thanks to Doc - he discovered the problem.  I needed to install & activate the Gallery2 module "Image Block." After doing that, which took ~30 seconds, and a reboot of my Chumby, the widget named "Menalto Gallery2" seems to be working for me.

Thanks again to Doc for the speedy reply and quick troubleshooting.

Hope to see a version 2 with even more features like the ability to pick a specific album / or set of sub-albums to pull pictures from AND the ability for the widget to rotate through those pictures similar to what the Facebook Photo Widget allows today.

Doug

Re: Menalto Gallery G2 Widet...

I can't get either Gallery widget to work. They both work in my dashboard/virtual Chumby, but in the real Chumby I get a red screen. In my Gallery admin, Image Block seems to be enabled. Any other tips?

Bryan

Re: Menalto Gallery G2 Widet...

The same problem happens to me when a large image +3MB attempts to load. Smaller images seems to load fine. No red screens.

Re: Menalto Gallery G2 Widet...

One thing to keep in mind is that the file size of an image, while somewhat important, isn't really the *most* important factor - the dimensions are.

The amount of memory an image takes up is approximately width * height * 4.  So an image that's, say 1280 x 1024 would consume over 5 MB. The chumby allocates 12MB of RAM per widget, so, with overhead of the rest of the player, you'd be hard pressed to get even two images showing.  Even with small images, you need to make sure you properly get rid of movies you aren't showing so you don't get a leak.

The "red block" is what Flash does when it doesn't have enough memory to show an image.

Re: Menalto Gallery G2 Widet...

This thread is ancient, but my solution to display large images from a gallery2 installation fits here perfectly.

I had the (apparently not uncommon) problem that my gallery2 images were too large. By default the gallery2 widget attempts to load the full-sized images, which if you've uploaded anything straight out-of-cam is too much for the chumby.

My solution to this problem is using the ImageUrl Widget instead and adding a small php file to the gallery2 directory that fetches, resizes and outputs a random jpeg file from the gallery2 database.

Here is the php file, I called in randomimage.php and placed it directly in my gallery2 directory.

<?php
/****************************************************
* Get and resize random gallery2 image              *
* Intended for use with small screen estate devices *
* Written by Loibisch                               *
*****************************************************/

### Configuration ###
$g2_url='http://www.yourgallery2.com/path';    // your public gallery2 url
$g2_rel_path='';                // relative path from this script to the g2 installation
$target_size = 320;                // target image size
$quality = 90;                    // target jpeg quality

### Get random picture from gallery2 ###
require_once(dirname(__FILE__) . $g2_rel_path . '/embed.php');

$ret = GalleryEmbed::init(array('embedUri' => '/', 'relativeG2Path' => $g2_rel_path .'', 'activeUserId' => '', 'fullInit' => true ) );
list ($ret, $g2data) = GalleryEmbed::getImageBlock(array ('blocks' => 'randomImage', 'show' => 'none', 'activeUserId' => '', 'exactSize' => $target_size, 'link' => 'none'));

preg_match('/\?g2_view[^"]*/',$g2data,$imgurl);
$filename = $g2_url . '/main.php'. html_entity_decode($imgurl[0]);
$source = imagecreatefromjpeg($filename);

### Calculate new image size ###
$width = imagesx($source);
$height = imagesy($source);

if ($width > $height) {
    $ratio = ($target_size / $width);
} else {
    $ratio = ($target_size / $height);
}
$twidth = round($width * $ratio);
$theight = round($height * $ratio);

### Resize ###
$thumb = imagecreatetruecolor($twidth, $theight);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $twidth, $theight, $width, $height);

### Display ###
header('Content-type: image/jpeg');
imagejpeg($thumb,NULL,$quality);

?>

Then set the URL of the ImageURL widget to the php file you created on the server and voila, the Chumby will now display your gallery2 files perfectly.

Caveat: This completely bombs out with anything but jpeg files in your gallery2 database. If you're using different filetypes or even video you will have to adjust the script accordingly. Worst case scenario however is that the ImageURL widget displays a blank screen whenever the php script encounters anything but a jpeg file.

Oh yeah, and I got my Chumby One yesterday, love the device so far. smile