ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 What are the maximum dimensions of a image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

w2m

USA
1990 Posts

Posted - Jun 20 2013 :  13:27:10  Show Profile  Reply
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

Uwe

284 Posts

Posted - Jun 24 2013 :  09:19:27  Show Profile  Reply
William

Are you aware of the size limits of static and dynamic data on Win32 and Win64?

http://software.intel.com/en-us/articles/memory-limits-applications-windows

HTH
Uwe
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: