473,657 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

newb: ways to display an array of pixel information

1 New Member
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 2927
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
unauthorized
81 New Member
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 Recognized Expert Moderator Expert
@unauthorized
As long as you aren't actually running Windows at the time!
Aug 1 '09 #4
JosAH
11,448 Recognized Expert MVP
@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
unauthorized
81 New Member
@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 Recognized Expert MVP
@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 Recognized Expert Moderator Expert
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
2124
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 construct a checkbox array in a survey form where one of the choices is "No Preference" which is checked by default. If the victim chooses other than "No Preference", I'd like to uncheck
0
3849
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 pixel. I need a way to save this this byte array as a gif. Does anyone have any suggestions???
5
3338
by: Jeremy Cowles | last post by:
I have the following: int *array = new int; and I destroy it with: delete array;
3
1823
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 construct a checkbox array in a survey form where one of the choices is "No Preference" which is checked by default. If the victim chooses other than "No Preference", I'd like to uncheck
3
4584
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 questions: -Concerning that array why is texID used? terrainTex doesn't state the first element? What does terrainTex represent? Especially the "0". -How do i transfer terrainTex back to the calling terrain.cpp. the
5
2405
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 following: unsigned short image; typedef struct{ unsigned short** img_ptr; unsigned short img_width; unsigned short img_height;
2
15054
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
5608
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 FireFox and Safari it appears as a narrow column of text with only 2-3 words per line. Here is the code: function showAll()
3
1366
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 to a piece of equipment and has the following information: Two strings, one for a system name and one for equipment name An integer An ArrayList (which will contain only strings)
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.