Solved

Problem with TBitmap & jpg

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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.

705 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

18 Experts available now in Live!

Get 1:1 Help Now