|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
AlgorthimThis 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 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 The BMP fileformat is available from www.wotsit.org>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 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/ ********************************************************************** 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/ >********************************************************************** <wa***@aol.com> wrote in message
news:4fi5u1d6kks6qlo2123p8h3695qjijduel@4ax.com... Use the standard Windows .bmp file format (save as monochrome in your case) > 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? and you will be able to get at it very easily and very quickly in VB in all sorts of different ways. Mike J***@aol.com wrote:
> This one is tough. Assume we have a bitmap (Black and white) in any You can use the GetPixel function:> 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 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 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 > |
|||||||||||||||||||||||