-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupted image file #29
Comments
Hi xavier, you can tell gphoto2 to directly download the picture to a file by passing in I don't have my test setup at hand so I can only try to give you some hints - I assume taking pictures using the gphoto2 commandline is working fine? |
gphoto2 is working fine, and the error is |
I'm always setting the 'binary' flag on the writeFile, did you try this already? fs.writeFile("series_"+i+".jpg", data, "binary", function(er){}) edit: the docs say it's set using |
I tried with setting the encoding, and I have the same issue. |
So I finally succeded to install libgphoto2-2.5 (with that script: https://github.com/gonzalo/gphoto2-updater). I then cloned this repo, checked out the In my project I did a
Any idea? Env: node 0.10.2, libgphoto2-2.5. And gphoto2 works well. Regards |
I tried with the 2.5.1.1 of libgphoto (from this script : https://github.com/Deckchair/gphoto2-updater) Here is the output of
Same corrupted image. |
I tried the same on my workstation (ubuntu12.04, x64):
Then i have this snippet:
And when I run it, the When I run the following shell command : I never succeeded to make this package work. I'm running out of options here. Any idea on why this doesn't work? |
This is really strange. Did you actually run the tests in feature/libgphoto2-2.5.x? Looks like I have to get an Ubuntu machine :-/ |
the tests worked on ubuntu and debian for me. On 17 April 2013 11:09, Leonhardt Wille notifications@github.com wrote:
|
Just closed #30. @xseignard, did you try executing your tests with sudo? It shouldn't be necessary, but I think we should try to rule out the most basic things that could be different on your system .. NPM release will come soon, I'd like to have some more time to figure out these errors. |
Hi there, I finally got my camera back.
I recieve a segmentation fault. I also tried with the I should give a try on the Pi and let you know. |
So I tried on the Pi, it's a complete mess.
|
So, i restarted from a fresh install of raspbian:
and the tests fails, you can find the output here https://gist.github.com/xseignard/5477705
I give up. |
copy that, I get the same behaviour on a raspberry gphoto2 2.5.0 gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline and node v0.10.3 found camera: { model: '###',
port: 'usb:001,004',
_gphoto2_ref_obj_: {} }
<Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...>
undefined
null |
Hi! |
I started setting up a fresh Raspbian installation, but didn't have the time to run further tests. |
Yes, i tried with mongodb and it was OK. I didn't encountered the problem |
i am experiencing the exact same problem! that is obviously wrong! |
The config.gypi is not contained in this module - I guess there's something wrong with your python setup. I installed python via homebrew - although I must admit that I don't do any XCode development, so I don't know wether it could break other stuff. And no, it should only affect the build process performed by gyp, but not the compiled binaries. I still have no clue why it doesn't work on some systems, please always send all available data (OS version, camera model, libgphoto2 version) with your reports. |
Im having problems with corrupt image files as well
this produces no errors but a corrupt .jpg file with a resonable file size. the data buffer seems to contain only zeroes.
produces has anyone found a solution to this? edit: accidentially i shot with the lens cap on. fs.writeFile(...) does produce a valid file (smaller size and all pixels obviously allmost black but non-zero). With targetPath set, error 22 is returned as before.
|
I premise that my camera (Canon EOS 20D) has experimental support in normal mode with libgphoto2. Anyway I can successfully run ''gphoto --capture-image-and-download" but I'm experiencing this bug so I report my setup and build process. Debian GNU/Linux 7.2 (wheezy) with kernel 3.2.0-4-686-pae (fresh install)
I also report the output of node installation of gphoto2:
|
@lpinca |
When I take a shot with gphoto2 command line I can see the led on my camera flashing two times. It's doing a quick blink just before shooting the picture, afterwards it keeps blinking while the file is being downloaded. When I take a shot within nodejs it's doing only the quick blink just before shooting. It seems like it doesn't read any data from the camera after taking the picture |
There should be a problem with mkstemp with my setup. If I call
I get this error:
but (apart from a missing callback error) if I console.log(tmpname) I always get undefined instead of the temp path. |
@luky83 make sure you have write permission on the camera.takePicture({
targetPath: __dirname + '/foo.XXXXXX'
}, function(err, path) {
if (err) return console.log(err);
console.log('picture saved in ' + path);
}); |
Thanks for your fix and help, @lpinca 👍 |
Hello, I installed this lib on my raspberry pi with :
And tried to take a shot with my eos 550d as presented in the exemple.
But the
picture.jpg
is always corrupted when I try to open it. With the following error:Not a JPEG file: starts with 0x00 0x00
Any idea?
Regards,
Xavier
The text was updated successfully, but these errors were encountered: