Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Eddy Vluggen9-Sep-18 2:10
professionalEddy Vluggen9-Sep-18 2:10 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Member 133785039-Sep-18 8:09
Member 133785039-Sep-18 8:09 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Eddy Vluggen9-Sep-18 8:20
professionalEddy Vluggen9-Sep-18 8:20 
QuestionForms opening other forms Pin
Member 112336117-Sep-18 20:33
Member 112336117-Sep-18 20:33 
AnswerRe: Forms opening other forms Pin
OriginalGriff7-Sep-18 21:20
mveOriginalGriff7-Sep-18 21:20 
GeneralRe: Forms opening other forms Pin
Member 112336118-Sep-18 0:03
Member 112336118-Sep-18 0:03 
GeneralRe: Forms opening other forms Pin
Member 112336118-Sep-18 0:06
Member 112336118-Sep-18 0:06 
GeneralRe: Forms opening other forms Pin
OriginalGriff8-Sep-18 0:07
mveOriginalGriff8-Sep-18 0:07 
GeneralRe: Forms opening other forms Pin
Matias Lopez11-Sep-18 8:50
Matias Lopez11-Sep-18 8:50 
QuestionC# project - SMS Alert Pin
Member 124675946-Sep-18 21:51
Member 124675946-Sep-18 21:51 
AnswerRe: C# project - SMS Alert Pin
OriginalGriff6-Sep-18 22:05
mveOriginalGriff6-Sep-18 22:05 
AnswerRe: C# project - SMS Alert Pin
DerekT-P13-Sep-18 1:01
professionalDerekT-P13-Sep-18 1:01 
QuestionCrypto in C#/4.0 using PKCS#10 and SHA256 Pin
ninodago6-Sep-18 5:28
ninodago6-Sep-18 5:28 
QuestionProblems with Rx EventMessager [Solved] Pin
Kenneth Haugland5-Sep-18 4:10
mvaKenneth Haugland5-Sep-18 4:10 
AnswerRe: Problems with Rx EventMessager Pin
Pete O'Hanlon5-Sep-18 4:49
mvePete O'Hanlon5-Sep-18 4:49 
AnswerRe: Problems with Rx EventMessager Pin
Richard Deeming5-Sep-18 4:54
mveRichard Deeming5-Sep-18 4:54 
GeneralRe: Problems with Rx EventMessager Pin
Kenneth Haugland5-Sep-18 9:49
mvaKenneth Haugland5-Sep-18 9:49 
GeneralRe: Problems with Rx EventMessager Pin
Kenneth Haugland5-Sep-18 9:56
mvaKenneth Haugland5-Sep-18 9:56 
QuestionUnable to Access Method in Referenced .dll (C#/VS2017) Pin
Member 139418904-Sep-18 22:55
Member 139418904-Sep-18 22:55 
AnswerRe: Unable to Access Method in Referenced .dll (C#/VS2017) Pin
Richard MacCutchan4-Sep-18 23:10
mveRichard MacCutchan4-Sep-18 23:10 
GeneralRe: Unable to Access Method in Referenced .dll (C#/VS2017) Pin
Member 139418904-Sep-18 23:19
Member 139418904-Sep-18 23:19 
AnswerRe: Unable to Access Method in Referenced .dll (C#/VS2017) Pin
Member 139418905-Sep-18 0:24
Member 139418905-Sep-18 0:24 
QuestionConstructor Injection Pin
jones298474-Sep-18 7:33
jones298474-Sep-18 7:33 
AnswerRe: Constructor Injection Pin
Mc_Topaz4-Sep-18 10:15
Mc_Topaz4-Sep-18 10:15 
QuestionAforge Video-Picture quality Pin
User 136751144-Sep-18 1:08
User 136751144-Sep-18 1:08 
Hello,

Even though webcam quality is 5mp , webcam seems and takes low quality of picture via below codes.

Is there any way to fix this and raise quality to maximum possible?

C#

namespace DXApplication2
{
    public partial class Form1 : DevExpress.XtraEditors.XtraForm
    {
        public Form1()
        {
            InitializeComponent();
        }

        private FilterInfoCollection webcam;
        private VideoCaptureDevice cam;

        private void Form1_Load(object sender, EventArgs e)
        {

            this.WindowState = FormWindowState.Maximized;

            webcam = new FilterInfoCollection(FilterCategory.VideoInputDevice);
            foreach (FilterInfo VideoCaptureDevice in webcam)
            {
                comboBox2.Items.Add(VideoCaptureDevice.Name);
            }
            comboBox2.SelectedIndex = 0;
        }   


if (pictureBox3.Image != null)
               {
                   iTextSharp.text.Image png2 = iTextSharp.text.Image.GetInstance(pictureBox3.Image, System.Drawing.Imaging.ImageFormat.Jpeg);
                   png2.Alignment = Element.ALIGN_CENTER;
                   if (png2.Height > png2.Width)
                   {
                       //Maximum height is 800 pixels.
                       float percentage = 0.0f;
                       percentage = 400 / png2.Height;
                       png2.ScalePercent(percentage * 100);
                   }
                   else
                   {
                       //Maximum width is 600 pixels.
                       float percentage = 0.0f;
                       percentage = 320 / png2.Width;
                       png2.ScalePercent(percentage * 100);
                   }
                   pdf1.Add(png2);
               }


private void cam_NewFrame(object sender, NewFrameEventArgs eventArgs)
       {
           Bitmap bit = (Bitmap)eventArgs.Frame.Clone();
           pictureBox1.Image = bit;
       }

       private void button6_Click(object sender, EventArgs e)
       {

           pictureBox2.Image = pictureBox1.Image;
       }


modified 13-Feb-19 21:02pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.