|
-
Oct 10th, 2000, 08:56 AM
#1
Thread Starter
New Member
Hello, this is my first post, I have a big problem. I'm writting Geographic information sistems in visual basic, and I need speed to draw satelital images, the big problem is that the satelital images is a non supported format by a picturebox or any object in classic vb objects. my idea is to perform the image in memory and then draw it onto any DC, I'm using API's such SetPixelV, but is sooooooooo slow . . .!!! is there any way to make a buffer with the image (in facts, I do that) and then flush into a DC? I can't find the way to do it. sorry about my english, I hope yuo understand the problem.
Thanks A lot.
Mario Sileone
-
Oct 10th, 2000, 09:23 AM
#2
transcendental analytic
What format is the image? Do you have the colors in a byte array? If you have that then you may use CreateDIBitmap api to create a bitmap in memory and attach it to a DC
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 10th, 2000, 09:41 AM
#3
Thread Starter
New Member
The format is LAN, this image can be from 1 byte to 7 bytes of color, and it's BIL format, for example the image had 10x10 bytes and 3 bytes of color, so the first row of the image in the file is like that
r r r r r r r r r r g g g g g g g g g g b b b b b b b b b b
then came the next row
r r r r r r r r r r g g g g g g g g g g b b b b b b b b b b
in the bitmap of 24 bits colors the image is like that
r g b r g b r g b r g b ......
I already have an array of rgb color for each pixel I have to draw, in facts, I can show the image pixel by pixel.
I hope you understand the format
thanks for the reply.
-
Oct 10th, 2000, 10:14 AM
#4
Fanatic Member
-
Oct 12th, 2000, 08:07 AM
#5
transcendental analytic
well that would make a complicated algoritm, and it would slow down the performance too with adding it into an RGB array. Goto
http://www.wotsit.org/
and see if they have that format documented
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 12th, 2000, 08:20 AM
#6
Thread Starter
New Member
one fast solution
that's ok, I see the algohitm and is so complicated, in this case I found the API createDIBitmap, to make a DIB with an array of colors in 1, 4 , 8, 16 , 24 or 32 bits, it's great!, if anyone need this function I recommend, using it with stretchDIbits. thanks for your help. if anybody need code, tell me.
thanks
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
|