Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2003, 11:00 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Read bitmap image?

hi all,

can i have a sample C code on how read-in each line of the bitmap, and then browse through each pixel
and check its color. as soon as the color changes, stop reading, read next line.
the background is of the same color. read
through all lines then take the line that has max width.

Regards
Richard Rose

 
Old October 24th, 2003, 10:28 PM
Authorized User
 
Join Date: Jun 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to HuhOiC
Default

You might get a better chance of getting a reply if you post your in the C++ or VC++ forum.

RAyRAy
Huh O i C

Program or Be Programmed!!!
 
Old September 22nd, 2004, 08:30 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Richard,

I'm assuming you made a typo when you entered C (it should have been C#). Anyway, to get the color of pixels in a bitmap you can just use the Bitmap class. There is a method GetPixel. You pass it the x and y co-ordinates of the pixel you want to test and it returns the color.

Kep.
 
Old October 9th, 2004, 11:45 PM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The following links have some C source code to read and process BMP files

http://www.brackeen.com/home/vga/bitmaps.html
http://www.programmershelp.co.uk/cexamples.php



It is not how much we do,
but how much love we put in the doing.

-Mother Theresa





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to read Bitmap from Resource file ashu_from_india .NET Framework 2.0 2 July 6th, 2007 05:54 AM
How to Add and Read Image ?? nsr2007nsr VB.NET 2002/2003 Basics 1 February 20th, 2007 08:26 AM
read bitmap pixel ersantombalak VB How-To 2 February 13th, 2007 07:20 AM
New Image (Bitmap) instance or not? jacob C# 2005 0 April 4th, 2006 04:12 AM
Read Image and Convert to Binary... soccers_guy10 Pro VB.NET 2002/2003 1 September 22nd, 2003 10:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.