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

Having trouble putting reusable code into a subroutine

I am trying to understand better the quirks of Visual C++. As such, I have come to the stage where I make a program that starts out as an empty window, but as you click around, a check board of red and blue squares emerges (it's not good on the…
Arthur
  • 653
  • 2
  • 6
  • 21
0
votes
1 answer

Qt5: From BitBlt to QPainter::drawImage

Hello StackOverflow experts, I am pretty noob at Qt and I am currently upgrading a profesionnal application from QT4 to QT5. I have a problem with a bitblt that a need to upgrade to QPainter::drawImage. The application is compiling and running but…
Robert Jones
  • 587
  • 7
  • 25
0
votes
1 answer

GetDIBits sets image buffer to all 0's (all black)

Trying to take a screenshot of a window as a bitmap. The code below is creating a properly sized bitmap, but every pixel is black. In other words, GetDIBits is setting imageBuffer to all 0's. The posted code saves a bitmap for every notepad open…
jester
  • 31
  • 3
0
votes
3 answers

Fastest RGB color detection C++

Hi i have used getpixel method, bitblt or what its called (creating bitmap header) and then going though all the values. It is VERY slow. For exapmple if i had to detect something red or specific color it would take very long time. There has gotta…
Hārdža
  • 75
  • 2
  • 10
0
votes
1 answer

Screen capture of windows media player version 12

I'm trying to capture the video which is being played in windows media player(version 12) in windows 7. Bitblt method returns black screen for the video while all other windows(media controls, playlists etc.,) are captured successfully. So I browsed…
K07
  • 75
  • 12
0
votes
1 answer

Deep copy of CImage object causes debug assertion failed

I have a problem similar to this one: How to copy a CImage object? I need to make a deep copy of CImage object. The specific problem is that I'm getting a CImage* from a secondary thread through PostMessage, and want to copy it to CImage object…
user3621602
  • 65
  • 1
  • 8
0
votes
1 answer

Saving PNG from VB.NET Messes up Shadows

I have been trying to tackle the age-old issue of .NET (all versions) not supporting TRUE transparency natively, and after reading thousands of articles, questions/answers, forums, msdn articles, etc, have come up empty handed aside from being able…
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
0
votes
1 answer

Copy Small Bitmaps on to Large Bitmap with Transparency Blend: What is faster than graphics.DrawImage(smallBitmap, x , y)?

I have identified this call as a bottleneck in a high pressure function. graphics.DrawImage(smallBitmap, x , y); Is there a faster way to blend small semi transparent bitmaps into a larger semi transparent one? Example Usage: XY[] locations =…
Glenn
  • 1,234
  • 2
  • 19
  • 33
0
votes
3 answers

MFC draw a cross line using OnMouseMove

As follow code, I want use mpDC to draw a cross line on mouse point, when I move the mouse, the cross line will shift with my mouse point, but maybe I dont know the usage of BitBlt, so I cant see any line in my draw area (rectRange), CWnd…
user1753112
  • 203
  • 2
  • 17
0
votes
4 answers

How to use Win32's BitBlt using Ruby?

Does anyone know how to use Win32's BitBlt() using Ruby? It seems like you need to use a destination DC (device context) and how can Ruby handle that? I use GetPixel() and it is really slow even to get 100 pixels (takes about 10 seconds). thanks.
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
1 answer

Using BitBlt to capture screenshot, how?

I have run into this "BitBlt" from time to time in my searched, but i don´t get how to use it. From what people say, it seems to be the fastest way to capture a screen that Windows show. However, i can´t say anything about that myself as i don´t…
Zerowalker
  • 761
  • 2
  • 8
  • 27
0
votes
1 answer

TransparentBlt Produces a Non-Sharp Image

I'm rendering text (using TextRenderer.DrawText) onto a Bitmap which was back-colored solid White (Color.White) using the FillRectangle method. I then TransparentBlt this Bitmap onto a memory-DC including a colorful background picture, using…
Bliss
  • 426
  • 2
  • 5
  • 19
0
votes
1 answer

Using BitBlt to Scroll Text over a Picture Background

My user-control is intended to operate as a smooth vertical text scroller. It renders the text (to be scrolled) to control's surface only once, using TextRenderer.DrawText. It then starts a timer, which upon each of its ticks, Bit-Blits (BitBlt) the…
Bliss
  • 426
  • 2
  • 5
  • 19
0
votes
1 answer

Blitting the contents of Windows magnifier

My Windows program copies the contents of windows using GetDC then BitBlt. This works fine for most windows, but with magnifier windows I get a blank screen. This happens whether it's a magnifier I create myself with the Magnification API or the…
0
votes
1 answer

Bitblt from directx application

I got that code to get the pixel color from current mouse position. It works well but the only problem is, I can't get it from an d3d application... I tried it few times, but it only get only black color - Red: 0 Green: 0 Blue: 0 Here's my code -…
Tom Weiss
  • 11
  • 4
1 2 3
10
11