Hi there,
I'm geting the error:
Upload error: Upload failed: 'Invalid image: IMG_4759.jpg'
Here's what I did..
I take pictures with my Canon Powershot G2. I import my images (from the CF card) to iPhoto using a firewire CF adapter. Sometimes I change pictures (AutoLevel, etc) as an automated process in Photoshop.
I just started working with Gallery (again). I have the 1.3.3 version. I uploaded pictures I took this weekend with no problems at all. Then I tried to upload pictures from a few months back and I get that error. I also noticed that these images don't show up with thumbnail icons in Mac OSX Finder. So I opened some of those images up with Photoshop 7.0 and noiticed that they were of type Baseline Optimized. I resaved them as Baseline "Standard" and then GR would take *most* of them. There are still a dozen pictures I can't get it to upload at all. Those pictures open fine in photoshop and many other image editing programs.
Any ideas? What other information can I post to help diagnose?
Thanks!!
-Brett
Posts: 1479
Interesting... Do these upload correctly when you're just using the web-based 'Add Photos' link?
Posts: 31
Just tried that and yes I get:
Processing status...
- Adding IMG_2795.JPG
Error: Invalid image: IMG_2795.jpg!
Need help? Look in the Gallery FAQ
There are no errors in the apache error_log.
These images open fine in many programs. I read a thread somewhere where there was suspicion that perhaps gallery didn't support compressed images? I Can't really believe that tho. I think what was happening by me changing the mode in photoshop before was basically just re-writing the image to the disk. However I was also selecting maximum image quality during the save (jpeg).
As an interesting note.. When I have an invalid image and try to drop it onto the gallery icon or into the drop box in the app, the app acts as if it doesn't accept drag and drop files (the image snaps back to it's original location). Mac OSX.
btw, I have uploaded over 200 images from the same camera, some edited with PS7.0 via gallery remote.
Also, just for grins, I completely reinstalled gallery. Including my album directory. Still having the same problem. If it'd help, I could send you a picture I am having trouble with? They are large, but <3M Jpegs.
FYI, Gallery remote is basically what's switching me from IDS to Gallery. :smile:
Thanks for your help!
-Brett
Posts: 1479
So it does sound it's a general Gallery problem, not due to Gallery Remote... You should post to the Gallery forums proper, you'll probably have more luck there.
One possibility is that NetPBM doesn't support these 'baseline optimized' files. Maybe ImageMagick does, which is likely, since GR didn't have problems displaying the thumbnails, according to your description.
Gallery does support ImageMagick; this is something you have to set in your preferences. I haven't done it though, so if you need help doing that, definitely look at the Gallery forums.
Regarding DnD... It's problematic on Windows too, so I'm not too surprised that you're having problems on MacOSX. I no longer have access to a Mac, so I'd appreciate any help Mac Java developers might offer to fix this.
I didn't know IDS, but it's pretty nice. I think the community makes Gallery more attractive: many people are now contributing code and ideas, it's incredible.
Posts: 31
Hmm well the DnD problems I've been having only seem to occur with images that also are "Invalid". Maybe that's just my imagination. Is it possible my version of NetPBM is old? I'm currently running version 9.5. I'm a little on the SF.net download site it lists "netpbm-gallery" at version 1.1. I'm not sure what that means. I'll try upgrading netpbm and see what happens..
If I continue to have trouble, I'll post to more applicable fourms.
As for IDS.. I've been using it for years. It's a wonderful app for 2 reasons.. It's a really simply cgi script. Nothing too fancy besides IM to install. secondly (the most compelling reason to use it), is that I can just point it to a directory structure of images and it works. Thumbnails arn't generated until someone views the thumbnail. Then they are cached. Same with resized images. They arn't resized until a particular size is requested, then it is cached. The cache is kept in a seperate tree, so it is possible to just empty the cache if it gets big. So loading pics is slow for the FIRST visitor to an image.
The problem I had is that I'd load 100 pictures at a time.. and their web interface only loads one pic at a time and doesn't support zip, etc.. My server is also 1600 miles from me on a cable modem with only port 81 open. I don't trust ftp, and ssh is so slow for transfering a 100+ Meg file. Not to mention the time it takes to organize and compress those images (which don't really compress). Anyway Gallery looks really nice. I just wish that it'd natively work with a tree of images and NOT add extra images (thumbs, resize, highlight) to the album dir. See, I'd like to mount the albums from my windows machine (I'd have to setup all the networking stuff to support this..) and browse my images with.. say.. thumbsplus to do direct editing with photoshop.. but if I open it up with thumbsplus.. I'll get all those extra files.. also the directory structure isn't obvious from the albums dir.
Anyway, I don't know why I went through all of that on this fourm, I know it's off topic..
Hey, I'll check out this PBM stuff and report back.. thanks again..
-Brett
Posts: 1479
G2 will be a little bit more like what you're describing in terms of file organization. But it'll also be much more complex than IDS...
Posts: 31
Paour,
I made some progress in the other fourms.. but I'm having a new problem now...
So it turns out that the image resolution isn't being embedded in my photos, so one of the checks (around line 479) in util.php is failing. So I changed:
function valid_image($file) {
if (($type = getimagesize($file)) == FALSE)
return 0;
To
function valid_image($file) {
if (($type = getimagesize($file)) == FALSE)
return 1;
This bypasses the check and I can add photos now through the web interface. However now I'm getting the following in Gallery Remote:
(btw, I'm not sure where to start the log, so this start is somewhat arbitratry..)
1044836704859|INFO |MainFrame |Command selected Browse
1044836707979|INFO |MainFrame |Command selected Upload
1044836707979|INFO |MainFrame |uploadPictures starting
1044836707980|INFO | |Hijacking progress by creating a new one
1044836788482|ERROR|GalComm2 |com.gallery.GalleryRemote.GR2Exception: Server contacted, but Gallery not found at this URL (http://gallery2.nemeroff.com:81/)
1044836788482|ERROR|GalComm2 |com.gallery.GalleryRemote.GR2Exception: Server contacted, but Gallery not found at this URL (http://gallery2.nemeroff.com:81/)
at com.gallery.GalleryRemote.GalleryComm2$GalleryTask.requestResponse(GalleryComm2.java:297)
at com.gallery.GalleryRemote.GalleryComm2$UploadTask.uploadPicture(GalleryComm2.java:416)
at com.gallery.GalleryRemote.GalleryComm2$UploadTask.runTask(GalleryComm2.java:379)
at com.gallery.GalleryRemote.GalleryComm2$GalleryTask.run(GalleryComm2.java:232)
at java.lang.Thread.run(Thread.java:491)
1044836788482|INFO |GalComm2 |Error: Server contacted, but Gallery not found at this URL (http://gallery2.nemeroff.com:81/)
Any ideas??
Thanks,
Brett
PS.. I recently also upped my Max post size, etc in my php.ini.. see:
http://gallery.nemeroff.com/phpinfo.php
Thanks!
-Brett
Posts: 33
I was getting this error too. I upped the max post limits in /etc/php.ini and all was fixed there was three places...
memory_limit = 50M ; Maximum amount of memory a script may consume (8MB)
; Maximum size of POST data that PHP will accept.
post_max_size = 50M
; Maximum allowed size for uploaded files.
upload_max_filesize = 50M
You may fiddle with these for your own needs but this worked fine for my setup.