Solved

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

Posted on 2003-11-02
5
350 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 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
never needed this,
but well, its just for faster painting
0
 

Expert Comment

by:IamNewbie
Comment Utility
:-)
0
 

Author Comment

by:jbas
Comment Utility
thanks all!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now