Hi to all,
I'm very new to asp.net and VB and I am currently working on a project that need to get a webcam to work in asp.net with VB and have been struggling for sometime.
I'll need to use the webcam to capture the image and this function to be used in a web form. This is the code that i'm currently working on. -
-
Imports System
-
Imports System.IO
-
Imports System.Drawing
-
Imports System.Drawing.Drawing2D
-
Imports System.Drawing.Imaging
-
Imports System.Net
-
-
Partial Class _Default
-
Inherits System.Web.UI.Page
-
-
-
-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
-
'Jpeg compression quality
-
Dim nQuality As Short = 45
-
-
'Shout a picture from my webcam
-
Dim cam As CAMSERVERLib.Camera = New CAMSERVERLib.CameraClass()
-
-
Dim picture As Byte() = (cam.GrabFrame(nQuality))
-
-
'Add the hour to the jpeg picture
-
Dim ms As New MemoryStream(picture)
-
Dim bmp As New Bitmap(ms)
-
-
Dim g As Graphics = Graphics.FromImage(bmp)
-
-
Dim strDate As String = DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString()
-
-
Dim drawFormat As New StringFormat()
-
drawFormat.Alignment = StringAlignment.Center
-
-
g.DrawString(strDate, New Font(FontFamily.GenericSansSerif, 12), New SolidBrush(Color.Black), New RectangleF(1, 1, 320, 240), drawFormat)
-
-
g.DrawString(strDate, New Font(FontFamily.GenericSansSerif, 12), New SolidBrush(Color.White), New RectangleF(0, 0, 320, 240), drawFormat)
-
-
'Get codecs
-
Dim icf As ImageCodecInfo() = ImageCodecInfo.GetImageEncoders()
-
-
Dim encps As New EncoderParameters(1)
-
Dim encp As New EncoderParameter(System.Drawing.Imaging.Encoder.Quality, CLng(nQuality))
-
-
'Set quality
-
encps.Param(0) = encp
-
-
bmp.Save(Response.OutputStream, icf(1), encps)
-
-
g.Dispose()
-
bmp.Dispose()
-
-
End Sub
-
End Class
-
What am i suppose to do now? Kinda stucked. Codes shows no errors?
Is it something to do with my web service? My driver? Or my design page?
Thx in advance.
Max
1 2720
Btw, this is the webcam i'm using Microsoft LifeCam VX-1000. Hope it helps.
Max
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Kelowna |
last post by:
Yes... Its a server os... i kno! i hav xp yea but tis system is for screwing
with.. Im sure theres alot of ppl here tat kno tis stuff inside-out! im
doing this for educational purposes so dont give me that "Its intended for
server" stuff... thanks! :-)
Now that is out of the way lets get to it:
I have Windows 2003 Server Enterprise and a Logitech Quickcam Web. I plugged
it in and it loaded all the drivers automatically, yet I do not...
|
by: Joakim Rylander |
last post by:
Hi all,
I need to create a public booth where people can look at themselves in a
webcam and snap a picture which will be seen on a webpage. The backend is
easy, it's the webcam part that I have problems with...
Could you recommend the best way to capture a Webcam picture from .NET?
Do I need device specific drivers or is there a standardized way to do it?
Any recommended brand of Webcam?
|
by: Elp |
last post by:
Hi,
We have developped an client application in C#. Among other things, this
application should display in
4 different windows (or 4 different panels in the same window), 4 webcam
streams (web streaming) from different
webcams. We would like to set up a Webcam server on which we would connect
several webcams (at least 12) and stream the output of each webcam on the
web. That way, our client application could choose which webcam streams...
|
by: Mathieu Chavoutier |
last post by:
Hi.
Is it possible to do a program that show the "film" that is currently on our
webcam ?
I do not have a Webcam for the moment, so, if you have advices to chose a
Webcam compliant (with what I want to do), I would be thanksfull.
|
by: Steve |
last post by:
Hi
Can anyone please tell me how to use a webcam on a form. I have done an app
that uses a webcam, but I have used the drivers for that webcam. Now I need
to use a different camera on a different site and obviously will have to
reprogram for those drivers.
Is there a generic webcam control that can be used
I will only be using USB cameras
| |
by: aceto |
last post by:
Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how
can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!
Mark
|
by: DillonCzerny |
last post by:
Hello
Many times I see a lot of people post webcam videos on google video or youtube. I wonder how do they record it from those people’s webcam? I have a fake webcam and I want to record some webcams so that I can play them on my fake webcam. Does any one know about any good webcam recorder software?
Thank you for your help.
Newbie
|
by: =?Utf-8?B?d29vZHliZWFy?= |
last post by:
I just bought a new Dell, so I'm sorry if this is a stupid question. There
is a built-in webcam. Im using the disc provided by Dell (Dell Webcam
Software), however during the installation, a pop-up window says to make sure
the webcam USB cable is connected to the computer. What does this mean? The
webcam is already build-in to the computer? This is preventing the
installation of the software.
Thank you for you help
|
by: Fleets422 |
last post by:
Hi, new kid on the block... Hope I am posting this in the proper forum as it involves HTML, JAVA as well as PHP.
A little background... I have been writing PC apps using Borland's C++ Builder for many years and have written a couple WebCam utilities for my model airplane club. My utilities handle all the tasks of acquiring the images, FTPing them to the web site and handling via FTP image renaming replacing etc. What I don't know what I am...
|
by: Berco Beute |
last post by:
I've been trying to access my webcam using Python, but I failed
miserably. The camera works fine under Ubuntu (using camora and
skype), but I am unable to get WebCamSpy or libfg to access my webcam.
First I tried webcamspy (http://webcamspy.sourceforge.net/). That
requires pySerial and pyParallel, and optionally pyI2C. Runing
WebCamSpy results in:
Exception exceptions.AttributeError: "Parallel instance has no
attribute '_fd'" in...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |