Skip to content

Instantly share code, notes, and snippets.

@prashanthrajagopal
prashanthrajagopal / screenshot.cpp
Last active December 31, 2023 17:26
Take a screenshot and save as jpeg in c++
#include <stdio.h>
#include <windows.h>
#include <gdiplus.h>
#include <time.h>
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) {
using namespace Gdiplus;
UINT num = 0;
UINT size = 0;