Thread View: borland.public.delphi.multimedia
3 messages
3 total messages
Started by Frankie
Thu, 24 Jan 2008 01:01
How to convert jpg, gif to bmp format
Author: Frankie
Date: Thu, 24 Jan 2008 01:01
Date: Thu, 24 Jan 2008 01:01
6 lines
1086 bytes
1086 bytes
I use TImage to load in jpg stream from a database. How do I convert this image into a bitmap image? or from TImage.picture.graphic into TImage.picture.bitmap Thank you
Re: How to convert jpg, gif to bmp format
Author: Frankie
Date: Thu, 24 Jan 2008 01:30
Date: Thu, 24 Jan 2008 01:30
13 lines
1221 bytes
1221 bytes
Sorry, wrong newsgroup "Frankie" <fleong@tm.net.my> wrote in message news:47994ff0$1@newsgroups.borland.com... >I use TImage to load in jpg stream from a database. > How do I convert this image into a bitmap image? > or from TImage.picture.graphic into TImage.picture.bitmap > > > Thank you > > >
Re: How to convert jpg, gif to bmp format
Author: Remy Lebeau (TeamB)
Date: Fri, 25 Jan 2008 04:07
Date: Fri, 25 Jan 2008 04:07
28 lines
1729 bytes
1729 bytes
"Frankie" <fleong@tm.net.my> wrote in message
news:47994ff0$1@newsgroups.borland.com...
> I use TImage to load in jpg stream from a database.
> How do I convert this image into a bitmap image?
In order for TImage to work with JPG data, it has to be loaded into a
TJPGImage instance. Simply Assign() that to a TBitmap.
> or from TImage.picture.graphic into TImage.picture.bitmap
You need to use a separate TBitmap in order to do that, since assigning the
TPicture.Bitmap property will wipe out the existing JPG, ie:
if not (Image1.Picture.Graphic is TBitmap) then
begin
Bmp := TBitmap.Create;
try
Bmp.Assign(Image1.Picture.Graphic);
Image1.Picture.Bitmap.Assign(Bmp);
finally
Bmp.Free;
end;
end;
Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads