Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,184 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,058 people online right now. Registration is fast and FREE... Join Now!




help!--converting bmp files--

 
Reply to this topicStart new topic

help!--converting bmp files--

zzho039
6 Aug, 2007 - 02:40 AM
Post #1

New D.I.C Head
*

Joined: 6 Aug, 2007
Posts: 1


My Contributions
CODE
for (x = 0; x < width; x++)
        for (y = 0; y < height; y++)
                        {
                        red = bmpIn.getRed(x,y);
                        green = bmpIn.getGreen(x,y);
                        blue = bmpIn.getBlue(x,y);

                bmpOut.setBlue(x,y, red);
            bmpOut.setRed(x,y, green);
            bmpOut.setGreen(x,y, blue);
                        }


void BMP::setRed(int x, int y, byte red)
{

}

void BMP::setGreen(int x, int y, byte green)
{

}

void BMP::setBlue(int x, int y, byte blue)
{

}





just listed a part of the program, as its so long, anyone could tell me why isn't this working?
do i need something for the function setBlue, setGreen and setRed ??
thanks
User is offlineProfile CardPM
+Quote Post

Xing
RE: Help!--converting Bmp Files--
6 Aug, 2007 - 08:28 AM
Post #2

D.I.C Addict
Group Icon

Joined: 22 Jul, 2006
Posts: 723



Thanked: 2 times
Dream Kudos: 1575
My Contributions
I don't think anyone can find problem in such an incomplete code. You have to give something more complete which we can test on our end.
User is offlineProfile CardPM
+Quote Post

PennyBoki
RE: Help!--converting Bmp Files--
6 Aug, 2007 - 10:19 AM
Post #3

system("revolution");
Group Icon

Joined: 11 Dec, 2006
Posts: 2,009



Thanked: 5 times
Dream Kudos: 500
Expert In: Java,C++,C

My Contributions
Yeah, what are you using is it Visual C++ on MFC or..
User is offlineProfile CardPM
+Quote Post

csmanoj
RE: Help!--converting Bmp Files--
6 Aug, 2007 - 11:08 PM
Post #4

D.I.C Head
Group Icon

Joined: 6 Aug, 2007
Posts: 142



Thanked: 3 times
Dream Kudos: 50
My Contributions
This link will take you to a good bmp starter tutorial. Try it out.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 01:11AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month