Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15908

VS 2013 Capture screen shot and Reduce image size.

$
0
0
Hi there,

here is my code, I am using this code to capture screen image and save in a file, working fine, but the image size is almost 500Kb per image. Can you please advice how to reduce the image size between 100-200 Kb.

Thank you
Ladak

Code:



        Try


            GlbImageFileName_Normal = GlbMyPicturesPath & "\" & FileName & ".jpg"

            Dim graph As Graphics = Nothing
            Dim bmp As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
            graph = Graphics.FromImage(bmp)
            graph.CopyFromScreen(0, 0, 0, 0, bmp.Size)
            bmp.Save(GlbImageFileName_Normal)


            graph = Nothing
            bmp = Nothing

        Catch ex As Exception

            '  MessageBox.Show(Err.Description, GlbProjectName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            'Return
        End Try


Viewing all articles
Browse latest Browse all 15908

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>