By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,818 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,818 IT Pros & Developers. It's quick & easy.

capture photo in Access

P: n/a
Hi,

I'm trying to build a database which can capture a still image from a
digital camera or web cam and import to the database via an Object or
something like that.
Any help would be very appreciated.

Rattanak
Nov 12 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:
Hi,

I'm trying to build a database which can capture a still image from a
digital camera or web cam and import to the database via an Object or
something like that.
Any help would be very appreciated.


Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

P: n/a
Thanks,

Rattanak

"Trevor Best" <bouncer@localhost> wrote in message
news:fm********************************@4ax.com...
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:
Hi,

I'm trying to build a database which can capture a still image from a
digital camera or web cam and import to the database via an Object or
something like that.
Any help would be very appreciated.


Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---

--
A)bort, R)etry, I)nfluence with large hammer.

Nov 12 '05 #3

P: n/a
Hi,

I found a sample database that access directly to a webcams api and
you can capture a photo pushing a command button and paste it to an
image control.
I got the same problem as you and this was a great solution for me.

Please, let me know if you are interested on it and I will send you a
message directly.

Regards,

"Rattanak Song" <to********@comcast.net> wrote in message news:<zM********************@comcast.com>...
Thanks,

Rattanak

"Trevor Best" <bouncer@localhost> wrote in message
news:fm********************************@4ax.com...
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:
Hi,

I'm trying to build a database which can capture a still image from a
digital camera or web cam and import to the database via an Object or
something like that.
Any help would be very appreciated.


Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---

--
A)bort, R)etry, I)nfluence with large hammer.

Nov 12 '05 #4

P: n/a
Hi,

That would be great for me.
I'm looking forward for your message.

Regard,

Rattanak

"Xavi" <xa******@aconsa.infonegocio.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I found a sample database that access directly to a webcams api and
you can capture a photo pushing a command button and paste it to an
image control.
I got the same problem as you and this was a great solution for me.

Please, let me know if you are interested on it and I will send you a
message directly.

Regards,

"Rattanak Song" <to********@comcast.net> wrote in message

news:<zM********************@comcast.com>...
Thanks,

Rattanak

"Trevor Best" <bouncer@localhost> wrote in message
news:fm********************************@4ax.com...
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:

>Hi,
>
>I'm trying to build a database which can capture a still image from a
>digital camera or web cam and import to the database via an Object or
>something like that.
>Any help would be very appreciated.

Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---

--
A)bort, R)etry, I)nfluence with large hammer.

Nov 12 '05 #5

P: n/a
If it is a _sample_, why not post a hyperlink here so others can take a look
at it, too?

"Xavi" <xa******@aconsa.infonegocio.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I found a sample database that access directly to a webcams api and
you can capture a photo pushing a command button and paste it to an
image control.
I got the same problem as you and this was a great solution for me.

Please, let me know if you are interested on it and I will send you a
message directly.

Regards,

"Rattanak Song" <to********@comcast.net> wrote in message

news:<zM********************@comcast.com>...
Thanks,

Rattanak

"Trevor Best" <bouncer@localhost> wrote in message
news:fm********************************@4ax.com...
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:

>Hi,
>
>I'm trying to build a database which can capture a still image from a
>digital camera or web cam and import to the database via an Object or
>something like that.
>Any help would be very appreciated.

Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---

--
A)bort, R)etry, I)nfluence with large hammer.

Nov 12 '05 #6

P: n/a
Trevor Best <bouncer@localhost> wrote in message news:<fm********************************@4ax.com>. ..
On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases.ms-access,
"Rattanak Song" <to********@comcast.net> wrote:
Hi,

I'm trying to build a database which can capture a still image from a
digital camera or web cam and import to the database via an Object or
something like that.
Any help would be very appreciated.


Your best best is to store the pictures on disk as jpgs and have a
text field that points to their location as storing imagages in the
database is very resource hungry. You can use the image control to
display the jpgs on the screen. Below is a batch file I use to get
pictures off my camera, most cameras nowadays will create a USB mass
storage device when connected to the PC so will appear like a
removable disk. Path names might want changing to suit.

--- begin download.bat --
@echo off
echo Looking for camera...
set d=
rem next two lines wrap in newsreader
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
exist %%i:\DCIM\100_FUJI\*.jpg set d=%%i

if (%d%)==() goto error
echo off

for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i goto conflict

dir %d%:\DCIM\100_FUJI\*.jpg
copy %d%:\DCIM\100_FUJI\*.jpg .
echo.
echo Attempting Remove pics from camera
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i del
%d%:\DCIM\100_FUJI\%%i
echo Fin.
echo.
if exist %d%:\DCIM\100_FUJI\*.jpg echo Pictures still exist on camera.
if exist %d%:\DCIM\100_FUJI\*.jpg pause
set d=
goto eoj

:conflict
echo *** Error ***
echo Name conflicts exist
rem next two lines wrap in newsreader
for %%i in (*.jpg) do if exist %d%:\DCIM\100_FUJI\%%i echo %%i already
exists on HDD
rem next two lines wrap in newsreader
echo You must resolve these conflicts before this download can take
place
pause
goto eoj

:error
echo Cannot find camera.
pause

:eoj
--- end download.bat ---


================================================== =
Have you guys got it right please let me now!! I'll do enything!!!!
te********@webmail.co.za
Nov 12 '05 #7

P: n/a
NB
xa******@aconsa.infonegocio.com (Xavi) wrote in message news:<e1**************************@posting.google. com>...
Hi,

I found a sample database that access directly to a webcams api and
you can capture a photo pushing a command button and paste it to an
image control.

Where does it store the image? on disk as a separate file or inside
mdb?
I am interested in looking at it too. Pls provide link or email to
nickbose at softhomedotnet

I figure the ideal interface should be:
- you can view the live image from the webcam within the Access form
- upon pressing a command button: you will be asked for file location
to save the captured image
- the path then will be stored in a text field in Access
- the image control will be updated to show that captured image

I think the real challenge is to integrate the first 2 steps into
Access form

Thks
NB
Nov 12 '05 #8

P: n/a
On 15 Dec 2003 17:10:51 -0800 in comp.databases.ms-access,
ni******@lycos.com (NB) wrote:
xa******@aconsa.infonegocio.com (Xavi) wrote in message news:<e1**************************@posting.google. com>...
Hi,

I found a sample database that access directly to a webcams api and
you can capture a photo pushing a command button and paste it to an
image control.

Where does it store the image? on disk as a separate file or inside
mdb?
I am interested in looking at it too. Pls provide link or email to
nickbose at softhomedotnet

I figure the ideal interface should be:
- you can view the live image from the webcam within the Access form
- upon pressing a command button: you will be asked for file location
to save the captured image
- the path then will be stored in a text field in Access
- the image control will be updated to show that captured image

I think the real challenge is to integrate the first 2 steps into
Access form


If you're interested, I wrote this app
(http://www.trevor.easynet.co.uk/downloads/Images.zip) for viewing
images, it does no capturing itself from within Access neither does it
do any organisation of images but it's something you can build on. The
images themselves will be on disk rather in the database, which IMHO
is the best way, it avoids bloat and overhead of storing BMP
representations of jpegs that Access does. Methods of getting from
camera to disk vary, WinXP has it built in or there's the batch file I
posted earlier in this thread.

(http://www.trevor.easynet.co.uk/down...Images2000.zip for 2K
users, A97 users, ask here and I'll convert and upload for you).

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #9

P: n/a
NB
Trevor Best <bouncer@localhost> wrote in message news:<g3********************************@4ax.com>. ..
If you're interested, I wrote this app
(http://www.trevor.easynet.co.uk/downloads/Images.zip) for viewing
images, it does no capturing itself from within Access neither does it

Thks for the link. However, your app doesn't seem to handle live
(motion) images from a webcam at all? (that's what I'm very interested
in)
I understand that storing images outside Access is now almost a
standard approach because of the mdb bloating problem.

NB
Nov 12 '05 #10

P: n/a
I'd definately store the image on your drive somewhere and reference
it from the application. It's very easy to do this and will end up
being far quicker and won't bloat the db. I've done that on one of my
apps (link below) and can give you some code to help if you need it.

You can use FileSystemObjects to handle copying the images to the
correct directory if it makes things easier, and then only show the
image when you view the current record.

Oh, and look out for the registry setting if you keep getting an
annoying pop up box (and progress bar) saying that it is importing the
image, you can turn it off quite easily. I can't get to the registry
on my work's PC, but I think it's
HKEY_Local_Machines\Software\Microsoft\Graphics Filters\Jpeg\Options\
set show dialog to No (if I remember correctly).

Best of luck.

Ryan


http://www.ryan.dial.pipex.com
Nov 12 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.