Article View: borland.public.cppbuilder.multimedia
Article #468Re: How to draw into a jpeg image
From: Remy Lebeau (TeamB)
Date: Wed, 02 Jun 2004 17:57
Date: Wed, 02 Jun 2004 17:57
27 lines
1802 bytes
1802 bytes
"Mario Sernicola" <mariosernicola@nospam.libero.it> wrote in message
news:40bd8664$1@newsgroups.borland.com...
> Ok, so I've to continue convert JPG into a BMP with an external software
Assuming you are using TJPEGImage, it already knows how to convert itself
to/from a TBitmap. Just use the Assign() method, ie:
Graphics::TBitmap *bmp = new Graphics::TBitmap;
try
{
bmp->Assign(Image1->Picture->Graphic);
// alter the bmp as needed...
Image1->Picture->Graphic->Assign(bmp);
}
__finally {
delete bmp;
}
> import the BMP in my TImage component
No. You operate on a separate TBitmap. You do not put the bitmap into the
TImage while you are drawing on it.
Gambit
Technical Details
Message-ID:
<40be1621$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newspeer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40bcd795$1@newsgroups.borland.com> <40bd02cb@newsgroups.borland.com> <40bd8664$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d0fc,57413bdb9b690d15 X-Google-Attributes: gid10d0fc,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.multimedia References: <40bcd795$1@newsgroups.borland.com> <40bd02cb@newsgroups.borland.com> <40bd8664$1@newsgroups.borland.com> Subject: Re: How to draw into a jpeg image Date: Wed, 2 Jun 2004 10:57:50 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 67.22.135.163 Message-ID: <40be1621$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086199329 67.22.135.163 (2 Jun 2004 11:02:09 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newspeer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail