Solved

Problem with TBitmap & jpg

Posted on 2003-10-23
1
385 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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