Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 15th, 2003, 12:00 AM
Registered User
 
Join Date: Oct 2003
Location: , , Singapore.
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

Reply With Quote
  #2 (permalink)  
Old October 24th, 2003, 11:28 PM
Authorized User
 
Join Date: Jun 2003
Location: Glendale, California, USA.
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!!!
Reply With Quote
  #3 (permalink)  
Old September 22nd, 2004, 09:30 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Location: Melbourne, VIC, Australia.
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.
Reply With Quote
  #4 (permalink)  
Old October 10th, 2004, 12:45 AM
Friend of Wrox
 
Join Date: Feb 2004
Location: Bangalore, Karnataka, India.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06: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 05:12 AM
Read Image and Convert to Binary... soccers_guy10 Pro VB.NET 2002/2003 1 September 22nd, 2003 11:03 AM



All times are GMT -4. The time now is 12:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.