Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with TBitmap & jpg

Posted on 2003-10-23
1
Medium Priority
?
408 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

598 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