Thread: Changing colours

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    2

    Changing colours

    I am new to using c code and am trying to invert a picture and am struggling with the psuedocode. Can anyone advise.

    Ben

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    for each pixel
        invert pixel
    Now, perhaps you could be a bit clearer on what exactly you mean.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Thats quite an advanced topic, first learn the basics of C, ie, input /output / functions
    before you move on to the more complex topics.

    This colde changes the color of cosole text, but for inserting a bitmap or icon in C, it is somthing I have never learnt.


    Code:
    HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE );
    
    WORD wOldColorAttrs;
    
    CONSOLE_SCREEN_BUFFER_INFO csbiInfo; 
     
    
       
    GetConsoleScreenBufferInfo(h, &csbiInfo);
    
    wOldColorAttrs = csbiInfo.wAttributes; 
    
    SetConsoleTextAttribute ( h, FOREGROUND_BLUE | FOREGROUND_INTENSITY );

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Changing windows without changing?
    By Lionmane in forum Windows Programming
    Replies: 7
    Last Post: 10-19-2005, 11:41 AM
  2. [C++/WinAPI] Changing bitmap contrast
    By jagi in forum Windows Programming
    Replies: 0
    Last Post: 03-27-2005, 03:51 PM
  3. Colours in DOS box
    By denizengt in forum Tech Board
    Replies: 1
    Last Post: 09-10-2003, 06:53 AM
  4. Changing Text/Background colours for window controls ...
    By Shag in forum Windows Programming
    Replies: 1
    Last Post: 11-16-2002, 11:57 AM
  5. Colours?
    By Fountain in forum C++ Programming
    Replies: 7
    Last Post: 01-29-2002, 03:41 PM