Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Interface and Graphics > [VB6] - DIB's how change the array dimensions


Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2012, 02:55 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,177
Default [VB6] - DIB's how change the array dimensions


i read several tutorials about DIB's and every them have their way on building arrays(1D,2D,2D+RGB).
can anyone explain to me how these works?
(i prefere 2D, is more easy to understand and use. but i need to understand how works for do my way)
Reply With Quote
  #2  
Old 07-08-2012, 04:37 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,177
Default

we can create arrays with any dimensions:
Code:
ReDim ImageData(0 To ByteAlignOnWord(24, bm.bmWidth) - 1, 0 To bm.bmHeight - 1)
and i know use GetDIBits() api function:
Code:
GetDIBits SrcPictureBox.hDC, SrcPictureBox.Image, 0, bm.bmHeight, ImageData(0, 0), bmi, 0
my problem is: how i know that GetDIBits() put only the colors or the RGB colors?
(the tutorials,that i found, don't explain these question... i did with 2D array sample, but we can do with 1D or even with 3D. but the tutorials don't explain how do these... can anyone explain to me?)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->