Home › Forums › TWAIN Classic › How to I get the filename?
- This topic has 3 replies, 3 voices, and was last updated 17 years, 9 months ago by spike.
- AuthorPosts
(very newbie for Twain)
I am using a Delphi 2005 interface to the twain stuff. I have successfully pulled images out of a Canon G6 camera using memory mode.
I would like to know the filename of the file selected by the user. How can I get that?
Hey Guest – I’m guessing this is an image stored in the camera’s onboard memory, and you want to find the name that the camera stored it under? How important is this to you? Because the answer is probably “you can’t”, but it will take a lot of work to confirm that, unless you can get a definitive answer from a Canon camera TWAIN guru. (Of which, there may be only one in the world, and he lives in Japan…) TWAIN doesn’t have this concept at all, so your only hope is if Canon has provided some special back-door way to get that info – perfectly possible to fit into the TWAIN interface, but in my experience the camera vendors very very rarely take the trouble to do such things.
Thanks for the response. I downloaded the 550+ pages of Twain documentation and haven’t had the time yet to peruse it. Sounds like I won’t be using the cameras file name…
Can you have twain Delete the image just downloaded?
My guess is no, if you can’t get the filename.
Thanks again.
Hi mtiede – Please forgive the plug: Our TWAIN developer library includes a utility called ‘Twirl’ that makes it easy to examine all the ‘capabilities’ of a TWAIN device. If your camera is providing the filename of an image, offering it as the value of a capability would be the simplest technique. You don’t have to license our library to use Twirl, it’s part of the free toolkit download and it keeps working even after the trial period expires.
Deleting files from the camera: You are wrong in theory but I think right in practice. TWAIN has a whole ‘filesystem’ feature that in theory would allow you to examine the filesystem of the camera, and do all the usual stuff to files – get their names, rename them, delete them. The little problem is that I have never heard of this being implemented by any camera vendor… or actually, by anybody except Kodak.
Have you looked at WIA? It is much more camera friendly – but basically limited to Windows XP and ME. Still – that’s less of a limitation every day that goes by.
- AuthorPosts