PupCamera digital camera access
October 08, 2011 —
BarryK
I reported about automatic detection when a digital camera is connected to the computer via a USB cable, and a basic GUI for accessing the photos:
http://bkhome.org/archive/blog2/201110/autodetect-digital-camera.html
Dougal has already done some work in this direction, and Jemimah sent me a tarball of what Dougal had created. It was very useful to study what Dougal has done.
Dougal created udev rules for each type of camera that Gphoto understands, but that will need to be updated regularly -- so, I have retained the single-line udev rule as described in my previous blog post.
Dougal used the 'gphoto2' utility to access the photos, however 'gphotofs' works well, at least on my camera, so I have stayed with the latter.
I have added some "bells and whistles" to my application, and now it's name is PupCamera. It pops up when a camera is connected to the computer, but can also be run from the Graphic menu. Here is a snapshot:
It works so nicely, and if it is also successful with other cameras then I will be mighty pleased. I don't want to pull out the files separately, please wait, the next Wary or Racy will be out very soon with PupCamera in it.
Comments
Attention to nomenclatureUsername: Sage
PupCamera is good! Anything that says '*cam', 'cam*', ditto 'kam' suggests webcam. Inexactitude has long been the marque of Linux apps. A propos any-c/kam-thing, this may be of interest: http://brajeshwar.com/2008/webcam-on-linux/ A more skilled Puupy user than I also could not master its incorporation, requiring the hand of the maestro.
Added usbutils
Username: BarryK
"I have decided to include usbutils in the next Wary and Racy, and have extended PupCamera to optionally provide extra information. Here is a snapshot of latest version: [img]http://distro.ibiblio.org/quirky/test/pupcamera8c.png[/img]
udev
Username: aragon2
"You might also look at http://www.gphoto.org/doc/manual/permissions-usb.html For udev info. Aragon
libgphoto-rules
Username: Dougal
"Barry, note that the udev rule with all the supported cameras should be generated by you with /usr/lib/libgphoto2/print-camera-list, so that it matches the version of libgphoto2 you have (mine is 2.4.10.1). The camera name can probably be got with udevd (I use ID_MODEL in my scripts).
libgphoto rules
Username: BarryK
"Dougal, Yes, I realised that after reading the link that aragon2 posted -- thanks for that. So, I can automated creation of the udev rules in Woof, however I am very curious to find out how well my one-line udev rule holds up for others, so I will leave that there for the next beta of Wary/Racy. One good thing about my one-line udev rule is that it will cause PupCamera to popup for anything that the kernel determines is a "still camera" type, even those not supported by Gphoto -- PupCamera runs a probe with gphoto2 and will then report that the camera is not supported. So, instead of plugging in their camera and nothing happening, at least the user will be informed that Puppy cannot access the camera.
pupcamera
Username: 01micko
"Working like a beauty in slacko-rc2.. (to be released shortly) fiji finepix f6500 fd
quick comparison
Username: 01micko
"Gtkam does work ok in slacko with my fuji. I compiled it on slacko (libs too) so it can go to the repo. Pupcamera is much faster and simpler, a great little app Barry! Thanks
Gphoto2
Username: Iguleder1
"Also, quick note for developers - never use the gphoto2 package from another distro, they have many dependencies. Debian's is about 1 MB (without the dependencies) and my builds use a 32 KB package built automatically. Here's what you see in [url=http://packages.debian.org/squeeze/gphoto2]Debian: [code]Architecture Package Size Installed Size Files i386 203.1 kB 992.0 kB [list of files] [/code] And here's our package: [code]32K gphoto2-2.4.5.pet 8.0K gphoto2_DOC-2.4.5.pet 148K gphoto2_NLS-2.4.5.pet[/code]
Tags: puppy