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
0
votes
1 answer

Get pixel color at mouse position fastest way

So actually i got a very fast and nice code from "Vodemki" in here - Get Pixel color fastest way? But only problem it scans the whole image while i need to scan only my current mouse position Here's the code - HDC hdc, hdcTemp; RECT rect; BYTE*…
Tom Weiss
  • 11
  • 4
0
votes
1 answer

How to save hdc and restore it?

I write an application to draw line, rect, ellipse in client area. I need save image of client area when i draw any thing. And I restore it when message WM_PAINT occur. I use HBITMAP to save and restore SAVE RECT rc; GetClientRect(hMain, &rc); //…
0
votes
3 answers

BitBlt returns false, GetLastError returns 6 (Invalid handle)?

It's been a few years since my last foray into GDI, but I don't remember having an issue like this before. I am not getting an exception, but BitBlt is returning 0 (False), checking GetLastWIN32Error shows 6. Which appears to be an invalid handle.…
ThatRickGuy
  • 402
  • 3
  • 13
0
votes
1 answer

Capturing screen in YUV format with BitBlt

I am currently using BitBlt function to capture the screen and then I encode it. Since my encoder uses YUV420 format for the input I need to convert the data from RGB to YUV before encoding. I was wondering if there is any way to capture the screen…
Dundar
  • 1,311
  • 1
  • 14
  • 25
0
votes
1 answer

Convert StdPicture Transparency Colour to White

I am using a CodeJock ImageManager component to hold a variety of images. I want to put one of these images into a FlexGrid Cell. The Images I have are Png format and have transparent backgrounds so when I load the image into the grid like…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
0
votes
1 answer

BitBlt Copy Bitmap from ClipBoard gives wrong colors

I am pasting an image from the clipboard into my program. The bitmap gets put on a background memDC bitmap, which is then composited with another memDC before being drawn to the screen. The background bitmap is 8 bits per pixel. The problem is…
MrPhilTX
  • 113
  • 2
  • 9
0
votes
0 answers

Why BitBlt has different result on different place

I write a test sample for the BitBlt, in WinProc, the WM_PAINT does this: it will repeat draw the small block from window (0,0) to the client area. case WM_CREATE:{ cxSource = GetSystemMetrics (SM_CXSIZEFRAME) + GetSystemMetrics…
ThomasChang
  • 11
  • 1
  • 3
0
votes
1 answer

BitBlt copies only part of data in certain conditions

This is a strange problem, I've read documentation for BitBlt function and it works without any problems for most of cases, but starts to fail (only part or even none is copied) if I try to copy data from source rectangle with offset much bigger…
-1
votes
1 answer

BitBlt convert to byte array and parse from c++ to c#

I'm trying to create a Screen Capture DLL in C++ and send the resulting Byte Arrays to C#. I'm able to get the size returned to C# but the byte array is always null. Here's the C++ code (made up of bits i found on the internet) …
user3882856
  • 71
  • 1
  • 6
-1
votes
1 answer

Inconsistent MFC Flickering even when using bitblt

I'm experiencing flicker when rotating a rectangle but not when moving a rectangle, even though I'm using the same show function. It is a floor layout scenario. Some images to illustrate. The red rectangle in the centre is selected and moved: But…
Jak
  • 471
  • 5
  • 20
-2
votes
1 answer

Getting the screen pixels as byte array

I need to change my screen capture code to get a pixel array instead of a Bitmap. I change the code to this: BitBlt > Image.FromHbitmap(pointer) > LockBits > pixel array But, I'm checking if it's possible to cut some middle man, and have…
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
-2
votes
1 answer

How to use bitblt in linux?

Can we use bitblt in linux? I saw a bitblt documentation which states that bitblt was developed to handle graphical operations in windows which confuses me that is it possible to use bitblt in linux.
user3550728
  • 58
  • 10
1 2 3
10
11