Hi all,
I want to develop a small software for my PDA (arm, win mobile) that performs some analysis on jpeg pictures. Indeed, it seems that I can't load large picture in my software due to the small amount of memory available for all the running softwares. From what I'm understanding, only 30 MB are available for all softwares.
I did a small test :
var
JpegImage : TJpegImage;
begin
if OpenDialog1.Execute then
begin
JpegImage := TJpegImage.Create;
try
JPegImage.LoadFromFile(OpenDialog1.FileName);
showMessage(Format('Largeur %d Hauteur %d',[JPegImage.Width, JPegImage.Height]));
finally
JPegImage.Free;
end;
end;
end;
Under Windows Mobile, it crashes with Access Violation when trying to load 4000x3000 pixels picture. It's ok with 1200x900 pixels. And it's ok under Win32.
So, now, I'm looking for methods to handle my picture without full loading in memory:
- as I'm only interested in the black&white part of the picture, is it possible to only load the luminance part of the jpeg picture?
- is there a way to load a reduced version (1/2, 1/4 or 1/8) of the jpeg picture?
- a way of parsing the picture line by line without loading in memory?