473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

newb: ways to display an array of pixel information

hi,

i have an array of pixel information which i want to display with C/C++. I'm trying to use OpenCV at the moment but I don't have much experience writing pixel by pixel. Can someone show me a way to do it?

thanks!
Jul 30 '09 #1
7 2903
weaknessforcats
9,208 Expert Mod 8TB
This has nothing ot do with C/C++. But it does have to do with your operating system and/or application libraries. Look there for the system call to display a pixel.
Jul 31 '09 #2
Don't listen to kitty lover, he is just jealous 'cuz he doesn't know.

It's all very simple. Here's the code:
mov al, 13h
mov ah, 0
int 10 ; go into 320x200 graphical mode. VGA baby!
mov al, [insert 256 color pixel here (in hex)]
mov cx, [horizontal pixel position here]
mov cy, [vertical pixel position here]
int 10h ; color that pixel!

Repeat that 320x200=64000 times to color the whole screen. Guaranteed to work on every IBM PC that is based on the 8086 architecture!
Jul 31 '09 #3
Banfa
9,065 Expert Mod 8TB
@unauthorized
As long as you aren't actually running Windows at the time!
Aug 1 '09 #4
JosAH
11,448 Expert 8TB
@Banfa
Or Linux for that matter; WFC is right: it has everything to do with the OS you're running on an unauthorized supplied a highly particular solution that only works in a very particular environment.

kind regards,

Jos
Aug 1 '09 #5
@Banfa
Or running in Kernel mode. There is nothing more fun than playing BSoD!

Oh and in my code I used "mov cy" which isn't a valid registry. It should be "mov dx". Sorry if this has caused you any confusion... or BSoDs.
Aug 1 '09 #6
JosAH
11,448 Expert 8TB
@unauthorized
Please don't obfuscate this thread with a particular assembly language code snippet; this forum is about C and C++; even more: your code doesn't work when a hardware abstraction layer is in charge; please don't do it.

kind regards,

Jos (moderator)
Aug 1 '09 #7
weaknessforcats
9,208 Expert Mod 8TB
Don't listen to kitty lover
Stop, you're killing me.

ROFL ROFL
Aug 1 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
0
by: Chad | last post by:
I have a one dimensional byte array that stores the pixel information of my image. The image is 8-bit grayscale so each byte in the array holds a value from 0(black) to 255(white) for a single...
5
by: Jeremy Cowles | last post by:
I have the following: int *array = new int; and I destroy it with: delete array;
3
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
3
by: Michael Sgier | last post by:
Hello I want to replace a windows bitmap load function through an equivalent SDL function. I should extract the img height etc. and assign it to the terrainTex array. I've also three beginner...
5
by: Mark Feller | last post by:
I have an embedded application where malloc( ) is not available. So I declare images as globals, but want to be able to pass image information including a pointer in a structure, as in the...
2
by: Aravind | last post by:
Hi guys, I want to read the pixel value from an image and to store them in an array.any help regarding this is appriciatable. Thanks in Advance, Aravind
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
3
by: kevinwolfe | last post by:
Hi all. I'd like any suggestions on how I can get my data set (not a DataSet) bound to a couple of controls on a form. Let me start by describing what my data looks like. Each entry correlates...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.