Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I have problem  with graphics of  c++builder.Help me please.

Posted on 1999-01-25
7
Medium Priority
?
204 Views
Last Modified: 2010-04-02
Pardon in my English.
        I want to know that I will use ScanLine() command in order to store pixel value in buffer.
After I will bring it to pass my process in order to check color value of each pixel.Then I will bring
color value of each pixel push in New File(*.BMP). All process make in 256 colors BItmap.
Please show example program for me ....... THANK YOU VERY MUCH
0
Comment
Question by:s8014026
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1185048
That's hard to understand.  There are a lot of experts from all over the world here.  Why not try it in your native language?  (Or try again a little more detailed in english.)
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1185049
Do you mean something like this,

Use scanline() to read a line of pixels into a buffer,
Read the buffer to check the value for each pixel,
Write the pixels into a new 256 color bitmap.

:O)
0
 

Author Comment

by:s8014026
ID: 1185050
To Bruintje
  Right,you understand me. I will use scanline()to read pixel
from picture after that I will push it into buffer,Read the buffer to check the value for each pixel,  Write the pixels into a new 256 color bitmap.
Please tell method and give example program for me.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Expert Comment

by:bruintje
ID: 1185051
Well hope some of the other experts can answer this question now, I have to learn in this field too much to provide you with an answer
:O)
0
 
LVL 22

Expert Comment

by:nietod
ID: 1185052
Well, unfortunately.  Very few experts use BC Builder.  Most use the windows API directly or use MFC.  Thus builder questions often don't get answered.  If it wasn't for that I would have answered sooner.  I have builder, so I'll see if I can find something.
0
 
LVL 22

Accepted Solution

by:
nietod earned 600 total points
ID: 1185053
Okay, I think I have an idea of what you need to do.  I'll do my best to sketch it out.  You may need to ask questions and we may need to make changes as we go along, but this is a good start.

1.  Create a 2nd TBitmap.  (We'll call it the destination bitmap.)
2.  Set the dimensions of the destination TBitmap to the dimensions of the source bitmap.
This is done with the "Height" and "Width" properties.
3.  Create a canvas for the destination bitmap using the "Canvas" property, we will call this the destiantion canvas
3.  Use a for loop that goes from 0 to the height-1
4.  In the for loop, use scanline to optain a single line of pixels.
5.  Use a for loop that goes from 0 to width-1.
6.  In this for loop, Use the destination canvas's "Pixels" property to set the pixel to the value you want.
7.  After the two for loops end use the :"SaveToFile" method to write out the destination bitmap.

That should get you started.  Let me know if you have any questions.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1185054
>>Nietod: If I had the money I would get a copy myself, I've Borland C++ 4.52, as a full-time Delphi builder I indeed use the API. As I said I'm new in this field but very interested.

Thanks for takin' it from here :O).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question