Article View: borland.public.vdbase.data.sql
Article #1315Help! to display Bmp file on screen by C++
From: Nicole Chung
Date: Wed, 04 Mar 1998 00:00
Date: Wed, 04 Mar 1998 00:00
66 lines
2172 bytes
2172 bytes
Help! to display Bmp file on screen by C++
I use the borland C++ version 3.1.
Firstly I write this function to open the bmp file( Data.bmp) {it is a
binary file}
------------------------------------------------------------------
#include<fstream.h>
#include<iostream.h>
void main ()
{
ifstream picture;
picture.open("a:/Data.bmp",ios::in|ios::out|ios::binary);
//char C;
if(!picture)
{
cout<<"Failed to open picture.bmp"<<"\n"<<endl;
}
while(!picture.eof());
picture.close();
}
------------------------------------------------------------------
Question:
1.Anyone could show me a C++ function that to display the image on the
screen?
2.And I also want to know the C++ function that calculates the hue and
saturation of every pixel within the image.(every coordinate in the image)
Anyway Thank a lot for your help.
Nicole.(Nicole.Chung@btinternet.com)
Help! to display Bmp file on screen by C++
I use the borland C++ version 3.1.
Firstly I write this function to open the bmp file( Data.bmp) {it is a
binary file}
------------------------------------------------------------------
#include<fstream.h>
#include<iostream.h>
void main ()
{
ifstream picture;
picture.open("a:/Data.bmp",ios::in|ios::out|ios::binary);
//char C;
if(!picture)
{
cout<<"Failed to open picture.bmp"<<"\n"<<endl;
}
while(!picture.eof());
picture.close();
}
------------------------------------------------------------------
Question:
1.Anyone could show me a C++ function that to display the image on the
screen?
2.And I also want to know the C++ function that calculates the hue and
saturation of every pixel within the image.(every coordinate in the image)
Anyway Thank a lot for your help.
Nicole.(Nicole.Chung@btinternet.com)
Technical Details
Message-ID:
<01bd47a3$1d1998a0$512d63c3@default>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,48c35249e14cc7fa,start X-Google-Attributes: gidff5a1,public From: "Nicole Chung" <Nicole.Chung@btinternet.com> Subject: Help! to display Bmp file on screen by C++ Date: 1998/03/04 Message-ID: <01bd47a3$1d1998a0$512d63c3@default> X-Deja-AN: 330835062 Organization: Compaq Newsgroups: borland.public.vdbase.data.sql