Questions tagged [bitblt]

BitBlt WinAPI function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

BitBlt is a Windows API function, which performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

A raster operation code is also passed to the BitBlt function, which affects how the source DC and destination DC are merged together. For example, bits can be ANDed, ORed, XORed, etc.. together for different effects.

162 questions
3
votes
0 answers

StretchBlt so slow - any good alternatives?

I want to resize image size. So currently i do this: SetStretchBltMode(hCompatibleDC, HALFTONE); StretchBlt(hCompatibleDC, 0, 0, Des_w, Des_h, mhDesktopDC, 0, 0, src_w, src_h, SRCCOPY); But this is very slow. From my tests, BitBlt is x75 faster…
3
votes
1 answer

Win32 C++ BitBlt Raster Methods and Transparency

I recently asked a question about this, and understood the answer, but couldn't translate it into code. After another day of messing around with stuff, and fixing the leaks. I literally cannot for the life of me figure this out, though. This is…
Evan Carslake
  • 2,267
  • 15
  • 38
  • 56
3
votes
3 answers

C# Bitblit from Bitmap to control (Compact Framework)

I used once BitBlt to save a screenshot to an image file (.Net Compact Framework V3.5, Windows Mobile 2003 and later). Worked fine. Now I want to draw a bitmap to a form. I could use this.CreateGraphics().DrawImage(mybitmap, 0, 0), but I was…
David
  • 2,426
  • 3
  • 24
  • 36
3
votes
1 answer

How is mouse rendered in windows

As per my understanding, bitblt call with captureblt gives the buffer from display's frame buffer object. In this buffer, mouse cursor is not present. In Windows XP, continuous bitblt calls will make the mouse flicker which I can assume that -…
Ravi Kishore
  • 138
  • 1
  • 7
3
votes
1 answer

How to capture desktop screen and draw in on window in linux

I am new to linux and i need port my windows program to linux and need help at the following. I need to capture the screen. I need to create a window without borders and title which covers the whole screen. I need to draw the captures screen on…
2
votes
2 answers

Directx 11 Bitblt Alternative

I have the following function which I am trying to integrate into my directx 11 application. When I am using directx9 everything works fine but when converting to directx 11 I am getting a blue screen of death error at the Bitblt line (I must be…
M. Laing
  • 1,607
  • 11
  • 25
2
votes
1 answer

Can I use ROPs in Canvas? (I care for performance reasons only)

So... In the good old days of making games, when you were drawing sprites to the screen, you'd use ROPs to draw only the "non-transparent" part of your sprite. (Yes, I haven't done any game coding in a loooong time) (In case you have no idea what…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
2
votes
1 answer

Read pixel color with Bitblt faster

I am working on a project where I have to read the color of a pixel on screen with CreateCompatibleBitmap and Bitblt. Unfortunately this method is pretty slow, I am getting times of around 60 to 100 ms in a loop. I use this code: HDC hdc =…
A J
  • 21
  • 2
2
votes
1 answer

Capture pixel data from only a specified window

I want the code below to take a screenshot of a specified window only, becuse this way BitBlt is faster. The code below takes a screenshot of a window, specified by the name of window, loads the pixel data in a buffer and then re-draws the picture…
2
votes
0 answers

Take screenshot of external OpenGL game C# with BitBlt (CopyFromScreen)

I am trying to create some kind of antycheat for counter strike (hl) game. Of course funcionality of making a screenshot in-game is built-in, but exploited (detected) by antyss applications, so every time screenshot is taken from the game, antyss is…
Piotr
  • 1,155
  • 12
  • 29
2
votes
0 answers

Problem with BitBtl and DWM (Windows Aero)

I'm developing an application that has to take screenshots of a fullscreen game. The problem is that I've tried many methods but any of them are able to take the screenshot when the game is in fullscreen mode, it will just take a screenshot of what…
Ivan
  • 1,801
  • 2
  • 23
  • 40
2
votes
0 answers

How to get bitblt to copy child controls without painting the child controls to the screen?

Here is the short of my question: in a custom control, is there a way to get a parent paint/bitblt its children controls to a background image, but not have the children controls actually paint on the control? Details: I am trying to roll my own…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
2
votes
3 answers

Crop function BitBlt(...)

I want to create a crop function in an existing engine. This is what I already have: bool Bitmap::Crop(RECT cropArea) { BITMAP bm; GetObject(m_Handle, sizeof(bm), &bm); HDC hSrc = CreateCompatibleDC(NULL); SelectObject(hSrc, m_Handle); HDC hNew =…
Kazoeja
  • 143
  • 1
  • 4
  • 15
2
votes
1 answer

BitBlt + UpdateLayeredWindow and CreateDIBSection in 16-bit desktop color depth

I have an application with transparent background in client area which is drawn black because the window is not layered. In each of it's WM_PAINT messages I am doing a BitBlt to a memory-DC, after that I use the memory-DC with UpdateLayeredWindow to…
Chris
  • 21
  • 2
2
votes
0 answers

StretchBlt only works when nHeightDest is negative

I'm trying to use StretchBlt in order to copy pixels from a memory hdc to the window hdc. The memory hdc gets the image from an invisible window which renders a stream using openGL. Here's my code: BITMAPINFOHEADER createBitmapHeader(int width, int…
Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299
1 2
3
10 11