News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

CreateDIBitmap

Started by masitecno, May 31, 2012, 12:47:34 PM

Previous topic - Next topic

masitecno

Hi everybody.

Do you know how to create a bitmap using CreateDIBitmap?
I have tried to find the right documentation but i can't find it.

Thanks.

dedndave

there are a few examples out there
Jose Roca has some good ones for both GDI and GDI+
i have been learning a lot from his site...

http://www.jose.it-berater.org/smfforum/index.php?topic=4252.0

masitecno

Thanks Dave but that example is in vb6 i think.

And I am working with assembler. Masm32.

Anyway I am reading it.

Thanks.

Do you have more links or an example like that but with asm?

dedndave

what are you trying to do with it ?

masitecno

Well

I need to create a DIB because i need to manipulate the bits.

I need a procedure that create a DIB to set the initial bitmap (768x576) in a window (1024x768).
Another procedure that takes the bitmap and start scrolling left all the image discarding always the first vertical line.
Then another procedure that receives data from commport and generate a new line to continue the scroll.

I have a procedure that creates a matrix then it scroll it left (only numbers) so i need to create a dib based on that matrix or maybe a procedure that translates that value to a pixel color through a color pallette.

That's what I've been trying to do last 3 months.



dedndave

sounds like something we used to do with ultrasound - called "M-Mode"   :P

however - i don't think you actually need to create a bitmap at all
you can simply paint the vertical line, then move it in the DC

dedndave

here's a pic with a radial scan at the top - and M-Mode at the bottom (heart-beat)


masitecno

It's something like that.

It's related to pressure measurements but it has to be almost real time graphics.

I need the DIB because there are some algorithms applied to the data matrix that must show changes to the screen.

Well that's what i think.

Maybe I'm wrong

masitecno

The section under the echo is what i need only that i need with full color mode.

So you call it M-Mode?

Is there theory where I could learn how to implement it?

References, example codes, anything can help me.

dedndave

well - that was implemented with some rather sophisticated scan conversion hardware   :P

i take it you are applying some sort of time-gain compensation
that is the data manipulation you are talking about ?

you should be able to follow some of those code examples by Erol (Vortex)
he always writes nice stuff   :t

dedndave

i am just learning how to use GDI and GDI+, myself   :biggrin:

but - a good way to learn is to be given a problem to solve
so, i enjoy a good challenge - lol

i haven't done much yet with CreateDIBSection or CreateDIBitmap
so, i can't really be as helpful as i'd like
however, i can follow a few examples and read the documentation and sort it out (usually)

masitecno

No, The data manipulation is required for analysis and diagnose algorithms.

Something like this: http://www.sciencedirect.com/science/article/pii/S0889855308000812

dedndave

so - you may create a bitmap that is wider than the display ?
do you save the data to file ?

i am trying to figure out what you're up to so i can figure out what you're after - lol

i have no serial port input device, but i can simulate it with some sort of generator code

masitecno

I've read:

http://www.mvps.org/user32/gditutorial.html
http://www.nadtec.to/books/anim/anim_article.htm  (but it seems to be old, i don't know)
http://www.winprog.org/tutorial/message_loop.html
http://www.madwizard.org/programming/tutorials/mosaic/11
http://www.differentpla.net/content/2004/04/direct-access-to-a-bitmap-using-getdibits-and-setdibits