Author Topic: CreateDIBitmap  (Read 24581 times)

masitecno

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
CreateDIBitmap
« on: May 31, 2012, 12:47:34 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #1 on: May 31, 2012, 01:08:32 PM »
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

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
Re: CreateDIBitmap
« Reply #2 on: May 31, 2012, 01:17:31 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #3 on: May 31, 2012, 01:53:52 PM »
what are you trying to do with it ?

masitecno

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
Re: CreateDIBitmap
« Reply #4 on: May 31, 2012, 02:01:43 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #6 on: May 31, 2012, 02:04:04 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #7 on: May 31, 2012, 02:09:28 PM »
here's a pic with a radial scan at the top - and M-Mode at the bottom (heart-beat)


masitecno

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
Re: CreateDIBitmap
« Reply #8 on: May 31, 2012, 02:09:50 PM »
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

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
Re: CreateDIBitmap
« Reply #9 on: May 31, 2012, 02:11:54 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #10 on: May 31, 2012, 02:15:54 PM »
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

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #11 on: May 31, 2012, 02:23:32 PM »
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

  • Regular Member
  • *
  • Posts: 25
    • castellanosbarragan
Re: CreateDIBitmap
« Reply #12 on: May 31, 2012, 02:24:41 PM »
No, The data manipulation is required for analysis and diagnose algorithms.

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

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: CreateDIBitmap
« Reply #13 on: May 31, 2012, 02:30:24 PM »
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