Solved

i want to read a raw image file in the format R,G,B

Posted on 2006-07-06
5
196 Views
Last Modified: 2010-04-05
Hello,
i had a grayscale jpg image, and i create with the gimp program a raw image of it.
I want to read this raw image with delphi(and display it).
With methodes do i have to use?
0
Comment
Question by:Applicationmaker
  • 3
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:Ivanov_G
Ivanov_G earned 350 total points
ID: 17053337
Why do you convert it to RAW? You can read the JPEG directly...
0
 

Author Comment

by:Applicationmaker
ID: 17053500
then please tell me how i can read a jpeg file in delphi
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 350 total points
ID: 17053610
Drop a TImage component on the form (where the image will be displayed) and use the following code:

uses
  JPEG;

procedure TForm1.FormCreate(Sender: TObject);
var
  jpg : TJPEGImage;
begin
  jpg := TJPEGImage.Create;
  jpg.LoadFromFile('C:\DSC00064.JPG');
  Image1.Picture.Bitmap.Assign(jpg);
end;
0
 

Author Comment

by:Applicationmaker
ID: 17053737
i get an exception with access violation on adress FFFFFFFC.
i have a paintbox1 with a canvas..
so how can i convert from the jpeg file to the canvas?
I tryed allready Paintbox1.canvas.assign(jpg);
but this assign routine needs a TPersistent Object.

0
 

Author Comment

by:Applicationmaker
ID: 17054947
i solved the most of the problems by myself..
i used the Paintbox1.canvas.draw routine to get stuff from the jpeg image..

0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

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…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 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