🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #55

Re: Jpge to BMP loaded from DB.

#55
From: ron Tuijnman
Date: Sat, 19 Jun 2004 10:15
28 lines
1930 bytes
"Sang Leen" <sangleen@hotmail.com> schreef in bericht
news:9fafbb40.0406150809.55e72ff8@posting.google.com...
> I load a Jpge image that is stored in the DB
> and I need to convert it to BMP and assing it to TQRImage.
> How can I do this.
> If I assing it like Jpge the image is not printed.



               procedure TForm1.Button2Click(Sender: TObject);
               var
                 MyJPEG : TJPEGImage;
                 MyBMP  : TBitmap;
               begin
                 MyJPEG := TJPEGImage.Create;
                 with MyJPEG do begin
                   LoadFromFile('YourJpegHere.JPEG');
                   MyBMP := TBitmap.Create;
                   with MyBMP do begin
                     Width := MyJPEG.Width;
                     Height := MyJPEG.Height;
                     Canvas.Draw(0,0,MyJPEG);
                     SaveToFile('YourBmpHere.BMP');
                     Free;
                   end;
                   Free;
                 end;
               end;
Technical Details
Message-ID: <40d4123c$0$192$cd19a363@news.wanadoo.nl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!postnews1.euro.net!news.wanadoo.nl!not-for-mail
References: <9fafbb40.0406150809.55e72ff8@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,55cab50176d463bf
X-Google-Attributes: gid115d96,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!postnews1.euro.net!news.wanadoo.nl!not-for-mail
From: "ron Tuijnman" <Ron@nowhere.com>
Newsgroups: borland.public.delphi.database
References: <9fafbb40.0406150809.55e72ff8@posting.google.com>
Subject: Re: Jpge to BMP loaded from DB.
Date: Sat, 19 Jun 2004 12:15:23 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300
Lines: 31
Message-ID: <40d4123c$0$192$cd19a363@news.wanadoo.nl>
Organization: Wanadoo
NNTP-Posting-Date: 19 Jun 2004 10:15:31 GMT
NNTP-Posting-Host: cd5113983.cable.wanadoo.nl
X-Trace: 1087640131 willi.euronet.nl 192 213.17.57.131:4929
X-Complaints-To: abuse@wanadoo.nl