Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how i can access data on JPEG,BMP,PSD etc

Posted on 2001-09-04
7
Medium Priority
?
193 Views
Last Modified: 2013-11-19
hiii
can you help me
i want to access image's data with format JPEG,GIF etc
i don't use Timage to access it
but i just want get row,column,pixel's data and colors
from that images
0
Comment
Question by:all_rays
7 Comments
 
LVL 1

Expert Comment

by:Phoenix_s
ID: 6454897
each of those file types tends to have its own internal structure for deriving image size, color depth, palette (if indexed color scheme)

perhaps some kind of multiple format image component will be of use to you.

0
 
LVL 34

Expert Comment

by:Slick812
ID: 6455449
if you want each pixel's color data, you may need to use scanline and you'll have to convert the formats to a bitmap. The .jpeg, .gif ect pics are compressed and don't have a per pixel color reference like a bitmap. To display a gif or jpeg image, I think it is DEcompressed into a bitmap type with color info for each pixel. You seem to be looing for a one size fits all pic formats, I never heard of anything like that.
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6455505
Hmmm... sounds to me like you might be trying to decipher the format of the file without rendering it. You might try this URL for file formats:

http://www.wotsit.org/search.asp?s=graphics 


Good luck!!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6455514
see also graphicEX library
at
www.lischke-online.de
0
 

Author Comment

by:all_rays
ID: 6475246
can you tell me how i can use scanline
cause i have been try it but i failed
i hope you give me source code of scanline
thanks
0
 
LVL 34

Accepted Solution

by:
Slick812 earned 400 total points
ID: 6475697
there are several ways to use scanline, depending on the color depth of the bitmap (1bit, 4bit, 8bit, 24bit) and the variables you use for the colorbyte output. I like to use this TRGBArray for the scanline color output

TYPE
  pRGBArray = ^TRGBArray;
  TRGBArray = ARRAY[0..16383] OF TRGBTriple;

here is some code which is a simple "lightening" of a bitmap image, this is for 24 bit images, you will need diferent TRGBArray variables for 8bit, 4 bit and 1bit, because they have less data (8bit, 4bit and 1bit) in their color arrays


var
y,x,R,G,B: Integer;
PntCol, PntCol2 : pRGBArray;
Bitmap1, Bitmap2 : TBitmap;


 Bitmap1.LoadFromFile('C:\pics\Dark.bmp');
 Bitmap1.PixelFormat := pf24bit;
 Bitmap2 := TBitmap.Create;
 Bitmap2.Width := Bitmap1.Width;
 Bitmap2.Height := Bitmap1.Height;
 Bitmap2.PixelFormat := pf24bit;

for y := 0 to Bitmap1.Height -1 do
      begin {scan height}
      PntCol := Bitmap1.ScanLine[y];
      PntCol2 := Bitmap2.ScanLine[y];
      for x := 0 to Bitmap1.Width -1 do
        begin {scan Width}
        with PntCol[x] do
        begin
  {this gets the color from Bitmap1}
        R := rgbtRed;
        G := rgbtGreen;
        B := rgbtBlue;
        end;
          Inc(R,34);
  {this increases the color value by 34}
          if R > 255 then R := 255;
  {color values over 255 or less than 0 will not work}
          Inc(G,34);
          if G > 255 then G := 255;
          Inc(B,34);
          if B > 255 then B := 255;
        with PntCol2[x] do
        begin
  {this sets the color in Bitmap2}
        rgbtRed := R;
        rgbtGreen := G;
        rgbtBlue := B;
        end;
        end; {scan width}
      end; {scan height}



 - - - - - - - - - - - - -
this will lighten the Bitmap2 image by 34, hope this helps you. I think scanline is difficult for everyone at first.
0
 
LVL 17

Expert Comment

by:geobul
ID: 9295326
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

accept Slick812's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thanks,

geobul
EE Cleanup Volunteer
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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…
Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Suggested Courses

876 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