Questions tagged [dib]

DIB is a Device Independent Bitmap

Refer to https://en.wikipedia.org/wiki/Device-independent_bitmap for more details.

51 questions
2
votes
2 answers

Get 32 bit RGBA image from Windows clipboard

I want my app (which works with RGBA8888 images) to be able to paste images from the Windows clipboard. So it should be able to read images off the clipboard that come from any common raster image apps like Gimp, Photoshop, MSPaint, etc. From…
Tenfour04
  • 83,111
  • 11
  • 94
  • 154
2
votes
2 answers

How cheap/expensive is memory DC in Win API?

I am working on a program that will have many DIB bitmaps (created by CreateDIBSection) and will have to draw a lot of text on them using Win API. In order to draw on the bitmap, Windows needs device context, created by CreateCompatibleDC. And now…
johnfound
  • 6,857
  • 4
  • 31
  • 60
2
votes
2 answers

Convert C# bitmap to Windows dib handle for RIOT?

I am trying to implement an application which uses RIOT (Radical Image Optimization Tool) for batch image optimizaton. I can successfully import riot.dll into my app. But I cannot figure out how to pass a Windows DIB (Device Independent Bitmap)…
vbilici
  • 142
  • 1
  • 2
  • 9
1
vote
3 answers

Quick code to resize DIB image and maintain good img quality

There is many algorithms to do image resizing - lancorz, bicubic, bilinear, e.g. But most of them are pretty complex and therefore consume too much CPU. What I need is fast relatively simple C++ code to resize images with acceptable quality. Here is…
Volodymyr Frytskyy
  • 1,233
  • 11
  • 15
1
vote
0 answers

How to convert DIB to Bitmap in .NET Core 3.1?

How do I properly retrieve a Device Independent Bitmap(DIB) pointer as a Bitmap in C# ASP.NET Core 3.1? Issue: When I attempt to save a Bitmap from a Dib pointer, I receive System.AccessViolationException: 'Attempted to read or write protected…
1
vote
0 answers

MFC dialog display 8 bit buffer

Added a picture control to my MFC dialog. Set its type to Frame. Need to display 8 bit buffer (NOT LOADED From file) on the picture control. The image is scaled down, repeated , tilted diagonally. Not correct. I could not make it fit the control…
umc
  • 39
  • 3
1
vote
0 answers

DIB drawing overlapping circles with alpha blending

This'll be me first question here, I tried to look through the list of suggestions but couldn't find one that matches me question. Thus, here we go. I'm trying to replicate an effect I saw, I wouldn't know if the way I'm doing it would be the right…
Hamilton
  • 11
  • 2
1
vote
1 answer

VB.NET Draw device independent bitmap in picturebox

I reached a dead end with my program. I have in memory a simple array consisting of RGB values of a DIB bitmap (no BITMAPFILEHEADER). This array is generated in C++ but I try to display it in VB.NET . I do not want to use GDI+ because I need raw…
sergiu reznicencu
  • 1,039
  • 1
  • 11
  • 31
1
vote
1 answer

How can I retrieve an image data buffer from clipboard memory (uintptr)?

I'm trying to use syscall with user32.dll to get the contents of the clipboard. I expect it to be image data from a Print Screen. Right now I've got this: if opened := openClipboard(0); !opened { fmt.Println("Failed to open Clipboard") } handle…
Kesarion
  • 2,808
  • 5
  • 31
  • 52
1
vote
1 answer

Creating, displaying, and then accessing bitmap/DIB data (w/o GetBitmapBits())

I have inherited an old-school MFC Windows CE program, and am having to make some modifications to it. As part of this I have to create a monochrome image with text on it, and both display it on a screen as well as send each row of the image to a…
Cacadam
  • 111
  • 1
  • 1
  • 4
1
vote
1 answer

Pygame Error: couldn't create DIB section

I just downloaded pygame (the python module) from the download page on it's website (http://pygame.org/download.shtml), I chose the package called "pygame-1.9.1.win32-py2.7.msi". When I tried to execute a program I got this error: Traceback (most…
1
vote
0 answers

What is the most memory efficient way to convert any image to DIB?

In my application I have to convert an image (image could be in any of the format - PNG, JPEG, BMP etc) to DIB. This is what I am doing right now, Create a movable global memory using GlobalAlloc(GHND,0) Create a stream on this global memory using…
1
vote
2 answers

Create ARGB DIB

How to create a DIB with ARGB format. I want to blit a image(that has some part transparent in it ) using this DIB. I tried with the following code but its not working properly unsigned char * rawdata; ==> Filled by Qimage Raw Data unsigned…
TechTotie
  • 127
  • 1
  • 15
0
votes
1 answer

Convert image data (PDEImage) in PDF to DIB using C++?

I am trying to extract all the images in a PDF and then convert them into DIB format. First part is easy. I extract all the contents in the PDF, then iterate through them and whenever I find a PDEImage, I put them in an array. But I am clueless…
Sach
  • 10,091
  • 8
  • 47
  • 84
0
votes
1 answer

How do I convert an rgb image array from sws_scale to DIB (in memory bitmap)

I am decoding video frames from a stream and sws_scale gives me a buffer of decoded RGB image data (PIX_FMT_RGB24). I have an existing front-end application that requires the input be DIB. So I need to know how to convert this buffer to DIB? …
kevincw01
  • 69
  • 2
  • 8