Home All Groups Group Topic Archive Search About
Author
2 Feb 2006 11:54 PM
Jame
This one is tough.  Assume we have a bitmap (Black and white) in any
NO compressed file format. Assumme it is 100 pixels by 100 pixels. Is
there a way to determine which pixels are black and which pixels are
white? 

I cannot figure out which file format to use and how accessible it is
to VB

Author
3 Feb 2006 2:22 AM
Richard Jalbert
On Thu, 02 Feb 2006 18:54:41 -0500, J***@aol.com wrote:

>This one is tough.  Assume we have a bitmap (Black and white) in any
>NO compressed file format. Assumme it is 100 pixels by 100 pixels. Is
>there a way to determine which pixels are black and which pixels are
>white? 
>
>I cannot figure out which file format to use and how accessible it is
>to VB

The BMP fileformat is available from www.wotsit.org
I used the info in in to modify individual pixel.
it explains RLE (run Length Encoding and non-encoded format.

Have fun
**********************************************************************
Richm***@sympatico.ca

Dog thinks: they feed me, they take care of me: they are gods.
Cat thinks: they feed me, they take care of me: I am god.
http://www3.sympatico.ca/richmann/
http://www.geocities.com/richmannsoft/
**********************************************************************
Author
3 Feb 2006 3:12 AM
wagon
What is the most straight forwad, easiest NON compressed format to use
for this project.  I assume it is bmp but are other older format (say
pcx) better?

On Fri, 03 Feb 2006 02:22:39 GMT, richm***@sympatico.ca (Richard
Jalbert) wrote:

Show quoteHide quote
>On Thu, 02 Feb 2006 18:54:41 -0500, J***@aol.com wrote:
>
>>This one is tough.  Assume we have a bitmap (Black and white) in any
>>NO compressed file format. Assumme it is 100 pixels by 100 pixels. Is
>>there a way to determine which pixels are black and which pixels are
>>white? 
>>
>>I cannot figure out which file format to use and how accessible it is
>>to VB
>
>The BMP fileformat is available from www.wotsit.org
>I used the info in in to modify individual pixel.
>it explains RLE (run Length Encoding and non-encoded format.
>
>Have fun
>**********************************************************************
>Richm***@sympatico.ca
>
>Dog thinks: they feed me, they take care of me: they are gods.
>Cat thinks: they feed me, they take care of me: I am god.
>http://www3.sympatico.ca/richmann/
>http://www.geocities.com/richmannsoft/
>**********************************************************************
Author
3 Feb 2006 6:23 AM
Mike Williams
<wa***@aol.com> wrote in message
news:4fi5u1d6kks6qlo2123p8h3695qjijduel@4ax.com...

> What is the most straight forwad, easiest NON compressed format
> to use for this project.  I assume it is bmp but are other older format
> (say pcx) better?

Use the standard Windows .bmp file format (save as monochrome in your case)
and you will be able to get at it very easily and very quickly in VB in all
sorts of different ways.

Mike
Author
3 Feb 2006 3:26 AM
Duke
J***@aol.com wrote:
> This one is tough.  Assume we have a bitmap (Black and white) in any
> NO compressed file format. Assumme it is 100 pixels by 100 pixels. Is
> there a way to determine which pixels are black and which pixels are
> white? 
>
> I cannot figure out which file format to use and how accessible it is
> to VB

You can use the GetPixel function:

Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal
X As Long, ByVal Y As Long) As Long

PixelColor = GetPixel(Picture1.hdc, x, y)

White: PixelColor = 255
Black: PixelColor = 0

Hope this helps

Duke
Author
4 Feb 2006 3:01 PM
Norm Cook
White = 16777215 = vbWhite = RGB(255,255,255)

Show quoteHide quote
"Duke" <nospam@3web.net> wrote in message
news:43e2cd3e_1@news.cybersurf.net...
> J***@aol.com wrote:
> > This one is tough.  Assume we have a bitmap (Black and white) in any
> > NO compressed file format. Assumme it is 100 pixels by 100 pixels. Is
> > there a way to determine which pixels are black and which pixels are
> > white?
> >
> > I cannot figure out which file format to use and how accessible it is
> > to VB
>
> You can use the GetPixel function:
>
> Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal
> X As Long, ByVal Y As Long) As Long
>
> PixelColor = GetPixel(Picture1.hdc, x, y)
>
> White: PixelColor = 255
> Black: PixelColor = 0
>
> Hope this helps
>
> Duke
>