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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Copy/Print/Save entire grid

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
bmesser Posted - Nov 15 2013 : 06:00:11
Hi

I am using a TImageEnMView component to display 35 images in a 7x5 grid. I would like to copy, print and save the entire grid, and although I can see how to do that for selected images within the grid, I've looked in the help and can't see anyway of saving the whole grid in its entirety. Can anyone say if its possible, or do I have to save, print and copy the panel or form that the component sits in.

Bruce.
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 16 2013 : 16:26:43
Hi

Bill's is a good method for copying/printing the content of a control.

For other users reading this thread: If you want to save all/selected thumbnails in a TImageEnMView then you can use:

http://www.imageen.com/help/TImageEnMIO.PrintImagesToFile.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
bmesser Posted - Nov 15 2013 : 09:36:41
Thanks Bill, that works a treat!

I suppose not many people have asked for that kind of functionality so its never been built into the component as a method.
w2m Posted - Nov 15 2013 : 09:07:32
This code gets a bitmap of the ImageEnMView control and the visible frames. It does not show the scrollbar however.

function ControlToBitmap(AControl: TWinControl): TBitmap;
begin
  Result := TBitmap.Create;
  with Result do begin
    Height := AControl.Height;
    Width  := AControl.Width;
    Canvas.Handle := CreateDC(nil, nil, nil, nil);
    Canvas.Lock;
    AControl.PaintTo(Canvas.Handle, 0, 0);
    Canvas.Unlock;
    DeleteDC(Canvas.Handle);
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ImageEnView1.Bitmap.Assign(ControlToBitmap(ImageEnMView1));
  ImageEnView1.Bitmap.PixelFormat := pf24bit;
  ImageEnView1.Update;
end;



Then to print or save the image just use the image:
procedure TForm1.PrintCaptured1Click(Sender: TObject);
begin
  ImageEnView1.IO.DoPrintPreviewDialog(iedtDialog, 'Captured thumbanils', False, 'MyThumbnails');
end;


William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
bmesser Posted - Nov 15 2013 : 07:36:10
Bill

The last one! I want to copy/paste/print the entire grid as it looks on the screen.

Bruce.
w2m Posted - Nov 15 2013 : 07:31:04
Please clarify... What do you want to copy selected images to?
Do you wish to print all selected images?
Do you wish to save the contents of the grid for reloading, or or save each selected image in the grid?

or do you want to obtain an image of the grid and its visible images as it appears on the screen?

William Miller