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
 Printing from ImageEnMView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jenswahl

Germany
74 Posts

Posted - Jun 28 2013 :  01:44:36  Show Profile  Reply
Hello,

if I set ImageEnMView.StoreType := ietThumb and want to print one or more images than only the thumb-size is printed, stretching (fit page) loose quality.
If I'm using ietNormal and have a lot of big images (e. g. 4000 x 3000 pixels) than no enough RAM is available if I call ImageEnMView.DoPrintPreviewDialog (Windows 7, 4 GB RAM).

It's possible to set ImageEnMView.StoreType := ietThumb and print all selected images from the real sourcefile and not from the thumbnail?

Note: In a special task I want to print all selected images in one PDF by using PDF-Creator as printer.

Kind Regards

Jens

w2m

USA
1990 Posts

Posted - Jun 28 2013 :  11:38:45  Show Profile  Reply
There are no provisions in ImageEnMView that allows storing images as thumbnails and allow access to the full image.. There are no provisions to load the full images instead of the thumbnails into PrintPreview that I am aware of.

One way to work around the problem is to add another ImageEnMView component (ImageEnMView2) to the form and set its visible property to False. Set ImageEnMView2.StoreType to ietNormal. To get the original full size images to print we load all the images into ImageEnMView2 from the filenames stored in ImageEnMView1 then use ImageEnMView2 to do the PrintPreview.

You could also create the second ImageEnMview at run time to do the same thing.

procedure TForm1.PrintPreview1Click(Sender: TObject);
var
  i: integer;
  iFilename: string;
begin
  Screen.Cursor := crHourGlass;
  try
    { Clear ImageEnMView2 }
    ImageEnMView2.Clear;
    { Add the full size images to ImageEnMView2 }
    for i := 0 to ImageEnMView1.ImageCount - 1 do
    begin
      { Get the thumbnail filename }
      iFilename := ImageEnMView2.MIO.Params[i].FileName;
      { Load the file into ImageEnMView2 }
      ImageEnMView2.MIO.LoadFromFile(iFilename);
    end;
    { Show the PrintPreviewDialog }
    ImageEnMView2.MIO.PrintPreviewParams.PrintThumbnails := False;
    ImageEnMView2.MIO.PrintPreviewParams.ThumbnailStyle := ptFlat;
  finally
    Screen.Cursor := crDefault;
  end;
  ImageEnMView2.MIO.DoPrintPreviewDialog('Test', False, 'PrintPreviewTest', False);
end;

Unfortunately, I am not sure if there will be memory problems with large images with this method.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

xequte

39076 Posts

Posted - Jul 01 2013 :  15:07:14  Show Profile  Reply
Hi

We'll look into loading the image on demand when printing and StoreType = ietThumb.




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jul 01 2013 :  17:25:27  Show Profile  Reply
and showing the full image in DoPreviewPrintDialog as well?

William Miller
Go to Top of Page

xequte

39076 Posts

Posted - Jul 01 2013 :  20:48:50  Show Profile  Reply
FYI, we implemented this today. It will be in the next release.

@Bill: If you mean the image preview on the print dialog then that is also now loaded on demand

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jenswahl

Germany
74 Posts

Posted - Jul 18 2013 :  06:00:53  Show Profile  Reply
Thank you.

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