LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2006, 08:04 PM   #1
Four
Member
 
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
saving webcam image to bmp


In c/c++, I got a webcam image using v4l. I save it to a bmp file. Everything is fine except that there is a strip of data on the right of the image that doesn't make sense. The strip is thin (looks like 10pixels wide) and goes from top to bottom of the image. Am I doing anything wrong?

Heres how I do everything:

Setup webcam + errors etc...

get an image using the read(webcam_fd, buffer, width*height*3) for 24bit rgb image.
the I save by first saveing the bmp header stuff. Then the image 1byte at a time (changing the order of rgb properly).
Program closes everything and closes itself

Now I open the image and everything is fine (I'm upside down as expected) Except that strip there is a strip as I mentioned before. I have it print also the final settings which are
width 352, height 288, 24bit rgb.

But could I be missing or doing wrong. I might be needing to post some code. If this is not enough I'll post code after I comment it so it is more understandable, if noone asks I assume the above info is enough.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Knoppix persistant Image saving jonnyblinux Linux - General 0 08-29-2006 06:33 PM
no image with webcam ? thelonius Debian 0 08-12-2006 08:45 AM
saving video from off a webcam Hamstasaurus Linux - Software 1 01-31-2005 03:00 AM
if lilo bmp image missing ? abs Slackware 8 08-17-2004 03:40 PM
Image conversor bmp & png to jpeg Adony Linux - Software 2 06-19-2004 03:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration