Comments (9)
Jim thank you so much (for the help and the development of this library), now i am able to take pictures, modify them in RPi then save it back to the camera. This library is very usefull and easy to use.
from python-gphoto2.
I've just released version 1.5.0 which has the changed gp_file_open()
as mentioned above.
from python-gphoto2.
I think gp_camera_folder_put_file()
is the function you want. gp_file_open()
should read your local file into a CameraFile
object you can pass to gp_camera_folder_put_file()
.
from python-gphoto2.
Hi,
I have been working with the functions that you recommended me, but i am having problem with the creation of CameraFile object, it seems that i am not creating a correct CameraFile object and the gp_file_open() is not reading it throwing an error "Argument 1 of type CameraFile ". How i create a CameraFile object correctly?
here is my code:
def file_mover():
camera_file = gp.gp_file_new() # Create a CameraFile object
gp.gp_file_open(camera_file,name) # Pass the image (in RPi) to the CameraFile object
gp.check_result(gp.gp_camera_put_file(camera,folder,camera_file,context)) # Save the image in NIKON S3700 SDcard
Thanks for the help,
from python-gphoto2.
Hi, I am trying to download files from the camera not upload.
Thanks,
Chris
from python-gphoto2.
hi Chris,
use the capture-image.py example, you just have to change the target address of the file, in the line 45
gp.check_result(gp.gp_file_save(camera_file,'gphoto.jpg')) #this will save the gphoto.jpg in root of the pi
from python-gphoto2.
Chris, please don't change the subject of an "issue". If you have found a different bug in python-gphoto2 you should create a new issue for it.
Daniel, the gp_file_new()
function returns an integer error code and the CameraFile object. Use check_result()
to strip the error code and return just the CameraFile object. (In the next release of python-gphoto2 I'll make gp_file_open()
allocate and return a new CameraFile object. This would be more consistent with the other functions.)
from python-gphoto2.
Good, im going to upgrade it, i have been problems writing back the images to the camera sometimes appears a (-7) I/O problem, sometimes writes without problem, according to what i have researched it seems to see permission issues, may be you wonder why?
from python-gphoto2.
Things that sometimes work and sometimes don't are hard to diagnose. The Raspberry Pi USB system has had problems in the past. If you can try a different sort of computer you might find it works OK.
I don't think many people write images back to the camera, so this part of libgphoto2 might not be well tested.
from python-gphoto2.
Related Issues (20)
- Can not set datetime on Canon EOS 1200D HOT 4
- equivalent of gphoto2 --reset HOT 1
- delete a file HOT 2
- gp_camera_get_single_config HOT 2
- Socket error after gp_camera_exit in windows/msys2 HOT 15
- Faster way to copy files from camera HOT 7
- Sony FX3 overshoot HOT 1
- `delete_file()` does not delete file HOT 9
- Segmentation Fault segfault on gp.Camera.autodetect() on Github Actions Runner HOT 21
- LGPL vs. GPL license? HOT 8
- Test Virtual Camera HOT 4
- Missing bindings for gp_port_new, gp_port_open, and gp_port_reset? HOT 2
- capture_preview() broken in v2.5.0 HOT 4
- having trouble getting gphoto2 on rpi HOT 3
- use python-gphoto2 in Windows system HOT 1
- Always connected capture anytime HOT 1
- Github Actions Python 3.12 environment. HOT 1
- Is live data acquisition available in the library? HOT 1
- Error When Installing with "Local" libgphoto2 HOT 2
- Missing libgphoto2.so symbols, library is not loaded HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gphoto2.