|
-
Aug 10th, 2005, 09:13 PM
#1
Thread Starter
Lively Member
[NOT RESOLVED YET] Can anyone please explain SetDIBits/SetDIBitsToDevice?
I've searched the whole internet and all i find is advanced functions which i can't break down to understand.
May i please ask anyone to give a brief explanation, and a most BASIC use.
(the 'target use' i am trying to achieve is to use it like SetPixel, 'OR' to change an image rgb)
I hear these API calls are much much faster.
Cheers ~
Last edited by Drazzakia; Aug 14th, 2005 at 08:32 PM.
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 10th, 2005, 10:23 PM
#2
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Google is even better at Allapi.net!
http://www.mentalis.org/apilist/GetDeviceCaps.shtml
It took a little while, but I found it!
-
Aug 12th, 2005, 06:47 AM
#3
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
 Originally Posted by dglienna
Thank you but allapi.net was one of the first site i checked, and it didn't help :S
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 07:01 AM
#4
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Try this program I wrote. It's even faster than SetDIBits. It's called Direct Memory Addressing. Very advanced yet very fast pixel writing. It uses DirectX:
http://www.planet-source-code.com/vb...55262&lngWId=1
-
Aug 12th, 2005, 08:09 AM
#5
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
 Originally Posted by Jacob Roman
I don't have the directx sdk installed
Thanks but doesn't help.
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 08:16 AM
#6
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
You don't need any SDK. 
Odds are DirectX came with your OS or you installed a game that had it.
Last edited by Jacob Roman; Aug 12th, 2005 at 08:25 AM.
-
Aug 12th, 2005, 08:31 AM
#7
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
It still doesn't help.
All i wanted was some one to explain SetDIBitsToDevice 
Besides your '300k' app doesn't work when i compile it
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 08:34 AM
#8
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Actually the fast scanlines engine works, the others don't.
OBJECT DOESN'T SUPPORT THIS ACTION:
Direct_Draw.SetDisplayMode Width, Height, Color_Bit, 0, DDSDM_DEFAULT
Not that i'm interested in using dir.x in my non game programs
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 08:38 AM
#9
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
You don't have the screen resolution then in your video card. Change it to 640 for width and 480 for height. Now it shoud work
-
Aug 12th, 2005, 09:32 AM
#10
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
@ Jacob: At least i've learned something from this thread, although not what was intentded.
==================== BUMP =====================
May i please ask anyone to give a brief explanation, and a most BASIC use of SetDIBitsToDevice.
(the 'target use' i am trying to achieve is to use it like SetPixel, 'OR' to change an image rgb)
Cheers ~
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 09:43 AM
#11
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
That Direct Memory Addressing stuff is nothing compared to what DirectX can really do.
-
Aug 12th, 2005, 03:20 PM
#12
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
@ Jacob: I know that its more powerfull :P, its just not suitable
==================== BUMP =====================
Surly some one knows about SetDIBitsToDevice. There are many advanced programs out there which use it.
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 03:22 PM
#13
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Like what do you mean? What are you trying to accomplish?
-
Aug 12th, 2005, 03:28 PM
#14
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Found better info:
The SetDIBitsToDevice function sets the pixels in the specified rectangle on the device that is associated with the destination device context using color data from a device-independent bitmap (DIB).
http://www.mentalis.org/apilist/SetDIBitsToDevice.shtml
There is an example on the page.
-
Aug 12th, 2005, 03:33 PM
#15
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
That's the problem. It is dependent on a bitmap in order to plot the pixels. It's best to blit the whole picture instantly using BitBlt, although DirectX is way faster and uses the videocard.
-
Aug 12th, 2005, 07:35 PM
#16
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Thanks but i saw this DIB example before posting, its got 10 api calls, and its not well commented in the slightest, infact there is only one comment (the copyright stuff) lol
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 12th, 2005, 08:01 PM
#17
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
But, if you look up each API you will see different examples. Basically, you are moving a picture from one device to another. Like a camcorder's small screen to the tv screen, I would imagine. Then to a printer. A lot of things are automatic in VB. API is quicker, but more complicated.
What do you want to do, exactly?
-
Aug 13th, 2005, 02:30 AM
#18
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Yeah you never answered my question. We are wondering what exactly are you trying to accomplish?
-
Aug 13th, 2005, 09:17 AM
#19
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
 Originally Posted by Drazzakia
I've searched the whole internet and all i find is advanced
(the 'target use' i am trying to achieve is to use it like SetPixel, 'OR' to change an image rgb)
I hear these API calls are much much faster.
Cheers ~
I'm trying to achive: some one to explain the methods of SetDIBits/SetDIBitsToDevice
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 13th, 2005, 09:20 AM
#20
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
lol, jacob we registered on the same month of the same year
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 13th, 2005, 11:47 AM
#21
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
SetDIBits does it by scanlines, while SetDIBitsToDevice does it by the pixel.
-
Aug 14th, 2005, 03:27 PM
#22
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
Ok, i'll explain better:
I want to set vaules to an array and draw to some picturebox in one go, like a double buffer.
I can't understand the way this api uses headers ect. - and how to use them
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
-
Aug 14th, 2005, 04:52 PM
#23
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
That's what the BitBlt API and DirectX is for 
Does it in one go, while the SetDIBit API's needs many gos.
-
Aug 14th, 2005, 07:36 PM
#24
Thread Starter
Lively Member
Re: Can anyone please explain SetDIBits/SetDIBitsToDevice?
VB Code:
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Integer
You can use an array of pixels aswell as a DC for hSrcDC?
Please show me how.
This could be the very fast replacment for setpixel i'm looking for (other than dir.x)
Drazzakia... Knowlage is fresh with new data, mine is mastered with the old data. (i'm not talking about vb knowlage  )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|