GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-May-2008, 14:26
iiiman_g iiiman_g is offline
New Member
 
Join Date: May 2008
Posts: 3
iiiman_g is on a distinguished road
Question

importing image


hi friends.
I really need your help about importing image in C++ for my project.
all i need to know is how can i import an image in turbo C++ and make some process on it in dos graph mode. is it possible? my project is about to creating a 4*4 puzzle.
  #2  
Old 06-May-2008, 04:37
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 405
Peter_APIIT is on a distinguished road

Re: importing image


You just need to open the image.
__________________
Linux is the best OS in the world.
  #3  
Old 06-May-2008, 14:28
iiiman_g iiiman_g is offline
New Member
 
Join Date: May 2008
Posts: 3
iiiman_g is on a distinguished road

Re: importing image


but how can i open the image?
is there any function for that?
if any one knows that please help me...
thanks.
  #4  
Old 08-May-2008, 03:57
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 405
Peter_APIIT is on a distinguished road

Re: importing image


Define a class that contain height and width of the pictures an header.

After that, you open the pictures using ios::binary.

You should ifstream because u input from picture which is also a file.

Read more about fstream, ifstream.

Last but not least, i don't know whether open a file inside a constructor is it a good design cuz constructor and destructor cannot fail.

I hope this help.
__________________
Linux is the best OS in the world.
  #5  
Old 08-May-2008, 13:45
iiiman_g iiiman_g is offline
New Member
 
Join Date: May 2008
Posts: 3
iiiman_g is on a distinguished road

Re: importing image


Thanks alot for your help

but still there is a question...

is it simply works in the crt mode or it must be in the graph mode?
 
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image onto JFrame tedds Java Forum 8 25-Oct-2007 20:04
draw in image jafar FLTK Forum 2 19-Sep-2006 10:51
New to Java: Putting a simple image file on the screen sgware Java Forum 9 07-Apr-2006 01:58
GIM gidedit - a fltk fluid resize project cable_guy_67 FLTK Forum 2 01-Jun-2005 15:00
Checking source codes of image, audio and video files onauc C Programming Language 5 26-Feb-2005 21:47

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:29.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.