Link to home
Start Free TrialLog in
Avatar of jbas
jbas

asked on

how can i convert jpeg.stream->bmp.stream?

hi,experts,
why delphi not support,  image1.picture.loadfromstream()
now i have a jpeg stream,and i want to show in image component,and i not hope i tempfile to
convert jpeg to bmp,how can i do?
thank.
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IamNewbie
IamNewbie

I want correct kretzschmar.

var
 jpg : TJpegImage;
 bmp: TBitmap;
begin
 jpg := TJpegImage.Create;
 bmp:=TBitmap.Create;
 try
   jpg.loadFromStream(YourStreamHere); // or LoadFromFile.... etc.
   //display
  jpg.DIBNeeded; // !!!!!!!!!!!!!!!!!!!!!!
  bmp.Assign(jpg);
 finally
   jpg.free;
 end;
end;
never needed this,
but well, its just for faster painting
Avatar of jbas

ASKER

thanks all!