?
Solved

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

Posted on 2003-11-02
5
Medium Priority
?
355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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