15,895,606 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Sultan Uz Zaman (Top 13 by date)
Sultan Uz Zaman
11-Dec-15 11:19am
View
They supplied an application that allows to remote view from any browser. Just that.
Sultan Uz Zaman
13-Sep-15 1:04am
View
Mine is not a Web App. Before loading a page a few things are being checked. If eveything is ok it shows a page otherwise it shows another page with error information. I can naviagte to a page when I initiate the navigation from a button click event. But I just want to redirect to a page according to my requirement without any click event as stated earlier. Its just loading page on a frame of the main window without any clicking event.
Sultan Uz Zaman
7-Sep-15 13:02pm
View
Fantastic. Thanks a lot man. It worked!!!
Sultan Uz Zaman
7-Sep-15 0:24am
View
A button click event does the follwoing to save the pic:
public static void SavePic(string imageFile)
{
//Cam_NewFrame(null,null);
//image1.Source = frameHolder.Source;
//Image<bgr, byte=""> frame = frameHolder.Cam_NewFrame(null,null);
// Release any previous buffer
MainWindow myWin = Application.Current.MainWindow as MainWindow;
RenderTargetBitmap bitmap = new RenderTargetBitmap(320, 240, 96, 96, PixelFormats.Pbgra32);
bitmap.Render(myWin.frameHolder);
using (FileStream stream = File.Create(Global.xImageLocation+"\\"+imageFile)) // or .png
{
JpegBitmapEncoder encoder = new JpegBitmapEncoder();
encoder.QualityLevel = 90;
encoder.Frames.Add(BitmapFrame.Create(bitmap));
encoder.Save(stream);
}
}
Sultan Uz Zaman
7-Sep-15 0:22am
View
Right! Please find below the extract of my source that puts the stream on an image control called "frameHolder" (along with other codes out of scope). How can I avoid this?
-----------------------------------------------------
MainWindow.xaml.cs
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
LoaclWebCamsCollection = new FilterInfoCollection(FilterCategory.VideoInputDevice);
LocalWebCam = new VideoCaptureDevice(LoaclWebCamsCollection[0].MonikerString);
LocalWebCam.DesiredFrameSize = new System.Drawing.Size(320, 240);
//MessageBox.Show(LocalWebCam.DesiredFrameSize.ToString());
LocalWebCam.NewFrame += new NewFrameEventHandler(Cam_NewFrame);
LocalWebCam.Start();
}
void Cam_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
BitmapImage bi = new BitmapImage();
try
{
img = (Bitmap)eventArgs.Frame.Clone();
MemoryStream ms = new MemoryStream();
img.Save(ms, ImageFormat.Bmp);
ms.Seek(0, SeekOrigin.Begin);
bi.BeginInit();
bi.StreamSource = ms;
bi.EndInit();
bi.Freeze();
Dispatcher.BeginInvoke(new ThreadStart(delegate
{
frameHolder.Source = bi;
}));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "NW CDM Test of Image Capture Failed");
}
}
Sultan Uz Zaman
7-Sep-15 0:11am
View
Examples are given in Win Forms. I can do that without showing the picturebox. Trouble comes in WPF when making the image control that holds the webcam stream invisible or resized. I need a few codes that do just that.
Sultan Uz Zaman
7-Sep-15 0:08am
View
I can save the current frame as long as I show the image control in WPF app. But making it invisible gets me blank images. Changing the dimension of image control gives the same size of image - not what I configured the webcam for i.e. 320X240.
I really don't care about AForge or else. Would appreciate whatever fills my requirement.
Sultan Uz Zaman
6-Sep-15 23:57pm
View
But do they allow to capture the image without displaying any content to the user? Please help I am new WPF C#
Sultan Uz Zaman
6-Sep-15 12:18pm
View
Thanks. I will follow this henceforth. Meanwhile can you please help me with my PROBLEM? We have already spent a few unfruitful moments discussing the rules.
Sultan Uz Zaman
6-Sep-15 8:11am
View
Quick answers would be great!
Sultan Uz Zaman
6-Sep-15 4:34am
View
But I guess that was inactive since this is what I received from Garth J Lancaster:
"if that's the case, you're better off reposting this (copy the content out) - I'd suggest you look at the forums under 'discussions' or 'quick answers' and post your question/issue there , in the appropriate section for the language maybe that you're using"
I apologize for my naive attempt.
Sultan Uz Zaman
6-Sep-15 4:27am
View
From unicode to normal text
Sultan Uz Zaman
6-Sep-15 2:41am
View
Thanks for your quick response.
To make myself clearer please find below what I intend to achieve:
For Example I have a variable named xAccount that fills in customer's account number from user input either in English or in Bengali. An account number 4005123456300 is shown as ৪০০৫১২৩৪৫৬৩০০ in Bengali since I am using Unicode. I would like to put this content to the variable xAccount as 4005123456300.
Show More