Something \a images

This is a discussion on Something \a images within the C++ Programming forums, part of the General Programming Boards category; cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    60

    Something \a images

    cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to your screen using C++?
    Code:
    screen 13
    pset(500,500),3
    draw "U500 H100 G100 D500 R100"
    lol QBASIC.
    Child who knows C++
    Using Borland C/C++ Compiler 5.5 (Command Line Version)

  2. #2
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by C++Child
    cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to your screen using C++?
    judging from this, you've got ALOT to learn... but yes... you can't do much with standard C++, but you can use other extensions like OpenGL to create things like Warcraft III...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    60
    Quote Originally Posted by major_small
    judging from this, you've got ALOT to learn... but yes... you can't do much with standard C++, but you can use other extensions like OpenGL to create things like Warcraft III...
    Lol, I did the code like that on purpose.
    I could correct it like this:
    Code:
    #include<iostream>
    #include<fstream>
    #include<conio.h>
    int main()
    {
    char hello[256];
    fstream x;
    x.open("example.txt", ios::out | ios::in)
    x << "I have a \\q \\a images. Is there any possible way to embed//manipulate images to your screen using C++?"
    x.getline(hello,256)
    cout<<hello;
    cout.flush()
    getch()
    exit (0);
    }
    I know everything but structures and linked lists. I might not know structures but I know classes.
    But my point is that is there any way to parse images into C++ like the following?
    [code]
    //*
    #include<iostream>
    #define getch() getch() //forget about stupid conio.h
    #include<imgstream> //img means image && includes ifstream
    int main()
    {
    imgifs zebra;
    zebra.kb(500); //calls a function that sets how many kilobytes are to be read.
    zebra.b(128); //128 for 128-bit true color
    img * zebra4 = &zebra;
    img cache; //Cache that xxx.open writes to
    zebra.open("zebra.jpg", imgs::jpeg, ios::in; readto = cache)
    display.cout << cache; //display, used to display images
    display.cout.flush;
    getch();
    exit(0)
    )
    }
    Last edited by C++Child; 07-23-2004 at 04:07 PM.
    Child who knows C++
    Using Borland C/C++ Compiler 5.5 (Command Line Version)

  4. #4
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,805
    what the heck are you asking about c++child?
    Woop?

  5. #5
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    You cant really "directly" "embed' and manipulate images as it were. You need a graphics API.

  6. #6
    Registered User
    Join Date
    Jul 2004
    Posts
    60
    But my point is that is there any way to parse images into C++ like the following?
    Code:
    //*
    #include<iostream>
    #define getch() getch() //forget about stupid conio.h
    #include<imgstream> //img means image && includes ifstream
    int main()
    {
    imgifs zebra;
    zebra.kb(500); //calls a function that sets how many kilobytes are to be read.
    zebra.b(128); //128 for 128-bit true color 
    img * zebra4 = &zebra;
    img cache; //Cache that xxx.open writes to
    zebra.open("zebra.jpg", imgs::jpeg, ios::in; readto = cache)
    display.cout << cache; //display, used to display images
    display.cout.flush;
    getch();
    exit(0)
    )
    }
    This is my idea.
    Child who knows C++
    Using Borland C/C++ Compiler 5.5 (Command Line Version)

  7. #7
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Nope. Unless im wrong.... nope...

  8. #8
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well unless your code works, no. You need to use an API - Application Programming INterface. With languages like C++, people can write commonly use code (like the code to do graphics) and store it in a library, for you to use. An example is SDL (www.libsdl.org), but this is quite lowlevel and complex. I'd recommend something simpler while you're still learning. Try a google search or look for recommendations on the CBoard.

    edit: Did you write this code, or do you understand it?

  9. #9
    Registered User
    Join Date
    Jul 2004
    Posts
    60
    is there any way to do
    [code]
    #ifndef "All The Frickin Header Files That I Need.h"
    #define ALL_OF_THEM_IN_THE_NAME_OF_G-D
    #include "All The Frickin Header Files That I Need.h" //I wish the compiler understood this....
    img newimage(); //prototype
    img newimage()
    {
    iimgstream hi("C:\\...\\image.jpg");//hi is used for reading
    img hi2;
    hi.cin(hi2,500, 128); //variable to input data to, 500 kilobytes, 128 bit true color.
    return hi2;
    #endif
    #ifndef <iostream>
    #include<iostream>
    }
    int main()
    {
    cout<<newimage();
    cout.flush()
    #endif
    return 0;
    }
    Child who knows C++
    Using Borland C/C++ Compiler 5.5 (Command Line Version)

  10. #10
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    no, you need a Graphics Library. I would suggest Allegro. It would go more like.
    Code:
    #include <FrickenGraphicsHeader.h>
    
    void InitializeFrickenGraphicsLibrary()
    {
      // screen settings blah blah
    }
    
    int main()
    {
      //functions from graphics library to load and draw images
      return 0;
    }
    Then you would link your compiler to the library. Do some searching on Allegro.cc and see what you can find

    And just out of pure curiosity... Did you read on a site or in a book or something that /q means question and /a means about? Im just curious as to why you thought this. Im not attacking, I'm just an EXTREMELY curious person.
    Last edited by Vicious; 07-23-2004 at 10:38 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Images
    By _Nate_ in forum C Programming
    Replies: 4
    Last Post: 05-18-2008, 10:50 PM
  2. Images
    By gvector1 in forum C++ Programming
    Replies: 7
    Last Post: 02-25-2003, 08:59 AM
  3. images, icons, and cursors, OH MY!
    By DarkViper in forum Windows Programming
    Replies: 3
    Last Post: 01-07-2003, 01:26 PM
  4. STL, Queues And Images
    By simly01 in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2002, 12:31 PM
  5. A simple question on Images....
    By LonelyPlanetWa in forum C Programming
    Replies: 7
    Last Post: 05-20-2002, 07:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21