[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2003-11-02
5
Medium Priority
?
357 Views
Last Modified: 2010-04-05
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.
0
Comment
Question by:jbas
  • 2
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 total points
ID: 9666175
var
  jpg : TJpegImage;
begin
  jpg := TJpegImage.Create;
  try
    jpg.loadFromStream(YourStreamHere);
    //display
    image1.picture.bitmap.assign(jpg);
  finally
    jpg.free;
  end;
end;

meikl ;-)
0
 

Expert Comment

by:IamNewbie
ID: 9676955
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;
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9677019
never needed this,
but well, its just for faster painting
0
 

Expert Comment

by:IamNewbie
ID: 9677026
:-)
0
 

Author Comment

by:jbas
ID: 9677442
thanks all!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question