BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

plotting image with TImage

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
IraqiGeek
Guest





PostPosted: Thu Sep 07, 2006 7:12 am    Post subject: plotting image with TImage Reply with quote



Hi all,

I am rendering a synthetic image/graph and want to plot this image on the
form. The image is rendered on a buffer as a 24-bit RGB bitmap.

Its been a while since I used Borland C++ builder, but now with the release
of Turbo C++ I'm trying to get back on my feet with C++ Builder and VCL.

Thanks,
IraqiGeek
http://www.IraqiGeek.com
Back to top
Hans Galema
Guest





PostPosted: Thu Sep 07, 2006 5:36 pm    Post subject: Re: plotting image with TImage Reply with quote



IraqiGeek wrote:

Quote:
I am rendering a synthetic image/graph and want to plot this image on the
form. The image is rendered on a buffer as a 24-bit RGB bitmap.

How would a buffer with as content a 24-bit RGB bitmap differ from a
Graphics::TBitmap with the same content?

Did you experiment with Graphics::TBitmap already? There are actual
examples in this group.

Maybe the thread 'TBitmap and HBITMAP question' is usable for you?

If you just read all the posts here you could make your problem
more concrete.

Once you have your picture in a Graphics::TBitmap displaying it is easy.

Hans.
Back to top
Michel Leunen
Guest





PostPosted: Thu Sep 07, 2006 11:19 pm    Post subject: Re: plotting image with TImage Reply with quote



IraqiGeek wrote:

Quote:
I am rendering a synthetic image/graph and want to plot this image on the
form. The image is rendered on a buffer as a 24-bit RGB bitmap.

Look at the windows API function SetDIBits().

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Back to top
IraqiGeek
Guest





PostPosted: Fri Sep 08, 2006 3:37 am    Post subject: Re: plotting image with TImage Reply with quote

On Thursday, September 07, 2006 1:36 PM [GMT+1=CET],
Hans Galema <notused (AT) notused (DOT) nl> wrote:

Quote:
IraqiGeek wrote:

I am rendering a synthetic image/graph and want to plot this image
on the form. The image is rendered on a buffer as a 24-bit RGB
bitmap.

How would a buffer with as content a 24-bit RGB bitmap differ from a
Graphics::TBitmap with the same content?

I really dont know as I am not familiar with Graphics::TBitmap. I am
extracting color image data from DSLR RAW files (originally 12-bit per
color, but scaled down to 8-bit/color) into a char buffer (with the buffer
x-axis being 3 times the number of pixels to accomodate the RGB data). Now I
want to show the final result of my processing into a Timage and/or save it
to a .BMP file.

Quote:

Did you experiment with Graphics::TBitmap already? There are actual
examples in this group.

Yes I did. However, I didnt get how to actually copy the image I have on my
char buffer into the TImage.

Quote:

Maybe the thread 'TBitmap and HBITMAP question' is usable for you?

I really don't know. I haven't used BC++ builder for over two years, but now
with the release of Turbo C++, I'm getting back to Borland, but I feel a bit
lost in the UI and in finding help/documentation.

Quote:

If you just read all the posts here you could make your problem
more concrete.

Once you have your picture in a Graphics::TBitmap displaying it is
easy.

Yep, but how do I get my buffer contents to Graphics::TBitmap???

Quote:

Hans.
Back to top
JD
Guest





PostPosted: Fri Sep 08, 2006 4:52 am    Post subject: Re: plotting image with TImage Reply with quote

"IraqiGeek" <geek (AT) iraqigeek (DOT) com> wrote:
Quote:

[...] how do I get my buffer contents to Graphics::TBitmap?

ISTM that if you're extract the rgb data that you can easily
extract it directly into the TBitmap's scan lines. All you'd
need to do first is set it's PixelFormat and it's Width and
Height.

Read the Bitmaps Again thread. It explains how to work with
the scan lines depending on the pixel format.

~ JD
Back to top
IraqiGeek
Guest





PostPosted: Fri Sep 08, 2006 8:10 am    Post subject: Re: plotting image with TImage Reply with quote

JD wrote:
Quote:
"IraqiGeek" <geek (AT) iraqigeek (DOT) com> wrote:

[...] how do I get my buffer contents to Graphics::TBitmap?

ISTM that if you're extract the rgb data that you can easily
extract it directly into the TBitmap's scan lines. All you'd
need to do first is set it's PixelFormat and it's Width and
Height.

Read the Bitmaps Again thread. It explains how to work with
the scan lines depending on the pixel format.

~ JD

Thanks JD, this thread contained exactly what I needed.

--


Regards,
IraqiGeek
www.iraqigeek.com

You are not thinking. You are merely being logical.
Neils Bohr to Albert Einstein
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.