What is the maximum dimensions of an image that can be loaded and edited with ImageEnView and ImageEnProc.
My definition of editing includes processing with ImageEnProc and pixel and brush drawing with GDIPlus (IECanvas).
The reason why I ask is I scanned a 3"x3" image at 2400 dpi which produced a 8,319 x 8,286 jpeg = 68,931,234. JPEG/JFIF supports a maximum image size of 65,535×65,535 = 4,294,836,225.
While I seldom deal with images this large, is there a way to guard against loading images that are too large regardless of the file type loaded?
Is there some way to estimate the optimum image size for editing when the file is opened?
Something like this?
if Assigned(ImageEnView) then
begin
{ jpeg maximum is 65535x65535 }
if ImageEnView.IO.Params.Width * ImageEnView.IO.Params.Height > 4294836225 then
begin
MessageBeep(MB_ICONERROR);
AdvTaskDialog1.Clear;
AdvTaskDialog1.Icon := tiError;
AdvTaskDialog1.Title := 'Error';
AdvTaskDialog1.Instruction := 'Image Loading Will Fail';
AdvTaskDialog1.Content :=
'The image could not be loaded because its dimensions are too large. Remove the filename from the list?';
AdvTaskDialog1.ExpandedText := 'The image could not be loaded and is too large.';
AdvTaskDialog1.CommonButtons := [cbOk];
AdvTaskDialog1.Execute;
exit;
end;
end;
Can an optimum size be estimated some how?
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html