🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #318

Re: jpg to bmp from FrameCallbackProc without fileio

#318
From: Hans Galema
Date: Mon, 17 Jan 2005 14:48
30 lines
2105 bytes
Hans Galema wrote:

> does compile. And it assigns. So you could use the intern
> Bitmap in this way directly.

But you can even modify it. Here is my complete test:

void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
   TJPEGImage *JPEGImage = new TJPEGImage;

   JPEGImage->LoadFromFile ( ExtractFilePath ( ParamStr(0) ) + "PICT0003.jpg" );

   Graphics::TBitmap *Bitmap = new Graphics::TBitmap;

   //Bitmap->Assign ( JPEGImage); // works ok
   //Bitmap->Assign ( JPEGImage->Bitmap); // does not compile

   ((THackJPEGImage*)JPEGImage)->Bitmap->Canvas->TextOut ( 0, 0, "AAAA" );

   Bitmap->Assign ( ((THackJPEGImage*)JPEGImage)->Bitmap);

   Image1->Picture->Bitmap->Assign ( Bitmap );              \

   delete Bitmap;

   delete JPEGImage;
}

Hans.
Technical Details
Message-ID: <41ebd086$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!newsfeeder.wxs.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,e7775a35dcf064b6
X-Google-Attributes: gid10d0fc,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 17 Jan 2005 15:48:45 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Re: jpg to bmp from FrameCallbackProc without fileio
References: <41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com>
In-Reply-To: <41ebce5b$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <41ebd086$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1105973382 129.125.201.248 (17 Jan 2005 06:49:42 -0800)
Lines: 30
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!newsfeeder.wxs.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail