Solved

Problem with TBitmap & jpg

Posted on 2003-10-23
1
365 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
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
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.

919 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

14 Experts available now in Live!

Get 1:1 Help Now