Solved

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

Posted on 2006-07-06
5
204 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
[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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

691 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