Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Getting image colors from imgenginesmall.zip sam..

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
586 Posted - Aug 10 2005 : 03:21:14 AM
Main problem: 2 image comparing. Is there a possibility that one image can be part of other image. Other image may be bigger. Like I make screenshot from my desktop. Then I load to memory smaller image "My Documents" and trying to find that from "MyDesctop" image.

I downloaded imgenginesmall.zip from this site. There is custom image storing sample. How I can get colors from cordinates 1:1?

...
Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End Type
'This is our Custom Image File Format.
Type ImageFile
ImageWidth As Long 'Width of Image
ImageHeight As Long 'Height of Image
ImageBPP As Byte 'Bits Per Pixel (24bpp or 8bpp)
ImagePalette() As RGBQUAD 'Store our palette (for 8bpp only)
ImageData() As Byte 'Series of Bytes (R-G-B for 24bpp or Palette Index for 8bpp)
End Type
....
How do I get colors from cordinates 1:1 if image is stored as 24 bit?

is it like:
...
r= pImage.ImageData(((xX + i) + (yY + j) * (pImage.ImageWidth * 3)) + 1)
g = pImage.ImageData(((xX + i) + (yY + j) * (pImage.ImageWidth * 3)) + 2)
b = pImage.ImageData(((xX + i) + (yY + j) * (pImage.ImageWidth * 3)) + 3)
...

PS Using VB 6.0. And beginner in image stuff(and in API an so on)
2   L A T E S T    R E P L I E S    (Newest First)
586 Posted - Aug 10 2005 : 3:13:40 PM
Solutin in my way...
...
For yY = 0 To pImage2.ImageHeight - 1 Step 1
For xX = 0 To pImage2.ImageWidth - 1 Step 1
tempR2 = pImage2.ImageData(((xX * 3) + 1) + ((yY * pImage2.ImageWidth) * 3))
tempG2 = pImage2.ImageData(((xX * 3) + 2) + ((yY * pImage2.ImageWidth) * 3))
tempB2 = pImage2.ImageData(((xX * 3) + 3) + ((yY * pImage2.ImageWidth) * 3))
...

and I begin to test my code. And I found out that 24 bit BMP files looks very funny(in PictureBoxs) sometimes with my program.
And I tested BMP files with original program and those pictures are looking wierd in original program too. Originial 24 bit BMP what was included with sample looks ok. And some really big BMP files I found in my HD too. But some smallers pictures are wierd. Even the ones I downloaded from web.
Well,l I like to know, is image submit in custom format wrong(LoadBMP function). Or wrong is only image dispalying function(DrawImage function) in original "imgenginesmall.zip" program. Does anyone have any idea?
Eric Coleman Posted - Aug 10 2005 : 12:10:55 PM
That looks good to me. Have you tested this yet?

VBGamer © Go To Top Of Page
This page was generated in 6.98 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.