broken thumbnails

williec30

Joined: 2004-02-03
Posts: 22
Posted: Sat, 2005-06-25 16:10

i am using NetPBM right now, i have uninstalled and reinstalled it at least a dozen time trying to get this to work.

if i do the test after installing NetPBM, all of the tests pass and i get a good-to-go sign.

i have uninstalled NetPBM and tried ImageMagick, but the test fails saying i don't have the correct files installed. i pointed the directory to /usr/bin, that is where my NetPBM binaries are. after changing the directory during ImageMagick config, i noticed that the files IM is looking for are not in /usr/bin so that was a waste of time :)

i was under the assumption that gallery2 had IM and NetPBM packaged with it so there wasn't a need to download them individually. is that correct?

any help would be greatly appreciated..!!! :)

gallery.ryanwilcox.com

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-06-25 16:53

no, g2 hasn't im/netpbm packaged. G2 is platform independent, binaries are not.
we offer a netpbm mini package at sf.net/projects/gallery/
see:
http://codex.gallery2.org/index.php/Installing_an_Image_Processing_Library

you should also use the current nightly snapshot of G2, perhaps your problem has already been fixed.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-06-25 18:38

I assume you've also tried to rebuild thumbs and resizes from the Album properties.
Edit Album > Album (tab) > Recreate thumbnails & Recreate resized images

Have you also tried to build all thumbs & resizes from the Site Admin?
Site Admin > Maintenance > Build thumbnails and resized images....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-06-25 18:45

Site Admin > Maintenance > Build thumbnails and resized images...
won't fix broken thumbs/resizes in G2 beta 3. Also it doesn't fix broken thumbs/resizes if you had them before and upgraded recently.
But it fill fix them, if you have installed one of the latest nightly snapshots.
If you upgraded to the current nightly snapshot and would like to fix broken thumbs/resizes that were already broken before the upgrade, you'll have to mark your broken derivatives as such.

e.g. with phpmyadmin:
update g2_derivative
set g_isBroken = 1
where g_id is not null;
(better don't set all derivatives to isBroken, it's better to just set those to isBroken that are actually broken).

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-06-25 18:48

Good info. Thanks!

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 01:32

thanks for getting back to me...

i have the nightly snapshot as of a few days ago, so i think i should be good there. i will try the ImageMagick route and see if that gets me anywhere.

will report back when i get done.

-whitey

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 02:23

arrrggggg.... well, no luck with ImageMagick. below is the error i am getting (note: i know this is a IM problem not G2, but the help is appreciated.)

Executing: ( "/usr/local/bin/composite"  "-geometry"  "+0+0" 
"/var/www/html/gallery2/modules/imagemagick/classes/../test/data/test.jpg"
 "/var/www/html/gallery2/modules/imagemagick/classes/../test/data/test.gif"
 "/var/www/html/gallery2/g2data/tmp/imgk_x5365p" )
2>/var/www/html/gallery2/g2data/tmp/g2dbg1gGsfu
file_exists(/var/www/html/gallery2/g2data/tmp/g2dbg1gGsfu)
filesize(/var/www/html/gallery2/g2data/tmp/g2dbg1gGsfu)
fopen(/var/www/html/gallery2/g2data/tmp/g2dbg1gGsfu, r, 0)
feof(Resource id #108)
fgets(Resource id #108, 4096)
feof(Resource id #108)
fgets(Resource id #108, 4096)
feof(Resource id #108)
fclose(Resource id #108)
unlink(/var/www/html/gallery2/g2data/tmp/g2dbg1gGsfu)
Regular Output:
Error Output:
composite: missing an image filename
`/var/www/html/gallery2/g2data/tmp/imgk_x5365p'.
Status: 1 (expected 0)
file_exists(/var/www/html/gallery2/g2data/tmp/imgk_x5365p)
unlink(/var/www/html/gallery2/g2data/tmp/imgk_x5365p)
chdir(/var/www/html/gallery2)

composite is there and is working, but triggering a weird error.

another but related note, i downloaded the NetPBM binaries and tried them again, didn't work. after i tried the new binaries, i made sure to try and rebuild thumbs both from the album and admin pages. no luck....

i am so close to making g2 work i can taste it... any help is appreciated.

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 04:37

so i emailed the ImageMagick mailing list to see what their thoughts are on the IM problem i am having.

i updated to head and i am still having trouble with NetPBM and the thumbnails. the full size image is fine, but thumbs are broken.

thanks again

gallery.ryanwilcox.com

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 07:32

@imagemagick:
make sure these two files are intact:
"/var/www/html/gallery2/modules/imagemagick//test/data/test.jpg"
"/var/www/html/gallery2/modules/imagemagick/test/data/test.gif"

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 14:45

here is what i found:

[root@localhost ~]# locate test.jpg test.gif
/var/www/html/gallery2/modules/imagemagick/test/data/test.jpg
/var/www/html/gallery2/modules/imagemagick/test/data/test.gif

my binaries for ImageMagick are in /usr/local/bin NOT /usr/bin. not sure if that makes a difference?

thanks

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 14:48

maybe you've got the binaries in both, /usr/bin and /usr/local, maybe they are the same (symlink).

so you have shell access...

why not try the commands in the shell:

composite -geometry +0+0 /var/www/html/gallery2/modules/imagemagick/test/data/test.jpg /var/www/html/gallery2/modules/imagemagick/test/data/test.gif /var/www/html/gallery2/g2data/tmp/imgk_x5365p

does that work?
and if not, make absolutely sure test.jpg and test.gif are intact, e.g. open them with xv / xview or something like that.

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 15:15

running these from the command line gives me the following:

composite - jpg works fine with no errors

composite - gif throws this exception:

composite: missing an image filename `/var/www/html/gallery2/modules/imagemagick
/test/data/test.gif'.

i copied the file to my machine, opened it up and it's fine, no problem with the content of the image or its integrity (well, at least as far as i can tell). i even tried bringing the jpg to my machine, opening it up and saving it as .gif as a test.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 17:18

no, you should run this command (this is a single command):
composite -geometry +0+0 /var/www/html/gallery2/modules/imagemagick/test/data/test.jpg /var/www/html/gallery2/modules/imagemagick/test/data/test.gif /var/www/html/gallery2/g2data/tmp/imgk_x5365p

i.e. composite has 2 image arguments and an output image, it combines test.jpg with the mask test.gif and the result is stored in imgk_x5365p (which is also an image, just without an extension)

does it work? what's the error?

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 18:33

here is the error i am getting:

[root@localhost bin]# composite -geometry +0+0 /var/www/html/gallery2/modules/i
magemagick/test/data/test.jpg /var/www/html/gallery2/modules/imagemagick/test/d
ata/test.gif /var/www/html/gallery2/g2data/tmp/imgk_x5365p
composite: no decode delegate for this image format `/var/www/html/gallery2/mod
les/imagemagick/test/data/test.gif'.

i have done a bunch of poking around... i found this http://jim.mmdc.net/archives/2004/12/getting_imagema.html... but his solution didn't fix my problem.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 18:41

don't know what the error means, but now you know that your imagemagick has issues. perhaps recompile it, replace it, ...
maybe that just means it can't handle .gif, or a special form of .gif, don't know.

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 18:49

what about just getting NetPBM to work....

i have switched back and am not getting any errors when i run the NetPBM tests. will turning on debuging help me fix the broken thumbnails?

thanks

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 19:00

no, debug won't fix your broken items.

when you deactivate imagemagick and activate netpbm, and you upload a new photo. do you get proper thumbnails?

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 19:31

no... broken thumbnails, but the full sized image is ok. you can see what i mean here--> gallery.ryanwilcox.com

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 19:35

so netpbm can't generate thumbs in your case. don't know why. easiest decision is: don't use netpbm.
can't help you there.

 
williec30

Joined: 2004-02-03
Posts: 22
Posted: Mon, 2005-06-27 20:01

if i could only get one of the other image packages to work :-?

 
m3_del
m3_del's picture

Joined: 2005-06-30
Posts: 8
Posted: Sun, 2005-07-03 06:03

Easy fix for your imagemagick proglem. Give network service read and execute rights to the imagemagick folder