| | |
Frames of Pictures
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2003
Posts: 22
Reputation:
Solved Threads: 0
Let me get this straight:
You want a program that will take a picture, and output a new picture with frames?
If so, it should be fairly easy, I think. Just make a bitmap with a little space on each side of the original, and then use the Windows functions to draw on that little space. A normal frame should only take about 3 lines per space, at most.
You want a program that will take a picture, and output a new picture with frames?
If so, it should be fairly easy, I think. Just make a bitmap with a little space on each side of the original, and then use the Windows functions to draw on that little space. A normal frame should only take about 3 lines per space, at most.
Last edited by Mike29936; Dec 20th, 2003 at 9:04 am.
•
•
Join Date: Dec 2003
Posts: 4
Reputation:
Solved Threads: 0
Hello Mike,
thank you very much for your fast answer.
It is very nice that you thought about my problem.
But, I am not quiet sure if I understand you right.
I allready have pictures but I just want them to have frames around them
when I post them on my web site, and I just thought maybe there is a possibilty to do so with c++?
So, thank you very much, again.
Best wishes for the holidays,
Josef
thank you very much for your fast answer.
It is very nice that you thought about my problem.
But, I am not quiet sure if I understand you right.
I allready have pictures but I just want them to have frames around them
when I post them on my web site, and I just thought maybe there is a possibilty to do so with c++?
So, thank you very much, again.
Best wishes for the holidays,
Josef
•
•
Join Date: Sep 2003
Posts: 22
Reputation:
Solved Threads: 0
Well, do you want to change the pictures themselves to have frames, or add frames around the pictures on your web page?
In the first case, you can create a bigger bitmap, and draw a frame around it.
In the second case, I'm afraid you'll have to use some HTML to get the frames around it. If you're using PHP, I'm sure you can write a function that adds a frame around a picture.
But C++ is for applications, so unless you want to write your own Apache that adds frames on your pictures, you'll have to either change the pictures(either with Photoshop or making a program that does it for you), or use HTML with the pictures.
Maybe you could write a C++ program that outputs HTML for frames around a picture?
In the first case, you can create a bigger bitmap, and draw a frame around it.
In the second case, I'm afraid you'll have to use some HTML to get the frames around it. If you're using PHP, I'm sure you can write a function that adds a frame around a picture.
But C++ is for applications, so unless you want to write your own Apache that adds frames on your pictures, you'll have to either change the pictures(either with Photoshop or making a program that does it for you), or use HTML with the pictures.
Maybe you could write a C++ program that outputs HTML for frames around a picture?
I assume this must be a school project of some sort where you have to do it this way. If you want a border or a frame look around your pictures, you can put your pictures in an HTML table and change the thickness of the border of the table. Doing it in C++ is more than overkill. You'd have to read the image as binary, calculate coordinates, deal with palettes, then reconstruct the image file. Even if you knew C++ well, it might require a little bit of work if you had a good library. Then you'd have to make it CGI accessible. Good luck.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
•
•
Join Date: Sep 2003
Posts: 22
Reputation:
Solved Threads: 0
•
•
•
•
You'd have to read the image as binary, calculate coordinates, deal with palettes, then reconstruct the image file.
LineTo(endoffilex-4,startoffiley+4);
LineTo(endoffilex-4,endoffiley-4);
LineTo(startoffilex+4,endoffiley-4);
LineTo(startoffilex+4,startoffiley+4);
That's to draw the frame. To get the bigger picture, just make a new bitmap with 8 pixels more width and height, and bitblt into the middle.
I could probably do it in a day, but I'm too lazy to, and he already said he made it output HTML.
Note that I was talking about Windows, not Linux or any other operating system.
And he doesn't have to make it CGI accessible. He can just use it to make the pictures with frames, and use <img> tags to place the framed pictures in.
•
•
•
•
Originally Posted by Mike29936
MoveToEx(startoffilex+4,startoffiley+4);
LineTo(endoffilex-4,startoffiley+4);
LineTo(endoffilex-4,endoffiley-4);
LineTo(startoffilex+4,endoffiley-4);
LineTo(startoffilex+4,startoffiley+4);
That's to draw the frame. To get the bigger picture, just make a new bitmap with 8 pixels more width and height, and bitblt into the middle.
I could probably do it in a day, but I'm too lazy to, and he already said he made it output HTML.
•
•
•
•
Originally Posted by Mike29936
And he doesn't have to make it CGI accessible. He can just use it to make the pictures with frames, and use <img> tags to place the framed pictures in.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
![]() |
Similar Threads
- Forwarding Hotmail with attachments (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: Big Game need progrmmers
- Next Thread: c++ learning advice
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






