?
Solved

Problem with TBitmap & jpg

Posted on 2003-10-23
1
Medium Priority
?
400 Views
Last Modified: 2012-05-04
I was written program which slowly change Pic1 to Pic2. It's only work with Bmp pictures, because i use Bitmap.ScanLine procedure for fast work with pixels
(ScanLine - Provides indexed access to each line of pixels)

If I load Jpg picture in TImage picture property cange to TJPEGImage,
but Image1.Picture.Bitmap is empty.

if i use Pixels[x,y] for get color it's to slow
(for pictures 1000x800  cca 800 times)


My questions

How to use TBitMap with jpg picture?
or
Procedure like "ScanLine" for Jpg Pictures ?
or
any suggestions

 billy
0
Comment
Question by:billycl
[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
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 750 total points
ID: 9606053
var
  jpg : TJPegImage;
begin
  jpg := TJpegImage.Create;
  try
    jpg.LoadFromFile('FileNameHere');
    image1.picture.Bitmap.Assign(Jpg); //convert
  finally
    jpg.free;
  end;
end;

btw i have a similar code at home

meikl ;-)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

752 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