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
 Help ! Thumbnails ImageEnMView on ImageEnView

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
Boban Posted - May 12 2012 : 01:35:17
Please help

How to paste all the thumbnails by pressing the button on the ImageEnMView on ImageEnView

Hello everyone on the forum.
6   L A T E S T    R E P L I E S    (Newest First)
fab Posted - May 14 2012 : 01:01:57
You have to adapt second example to your necessities (distance between frames, background color, and size of background).

fab Posted - May 13 2012 : 02:58:44
Simplest solution, use TImageEnMView.PaintTo:
ImageEnView1.IEBitmap.Allocate(ImageEnMView1.Width, ImageEnView1.Height);
  ImageEnMView1.PaintTo( ImageEnView1.Bitmap );
  ImageEnView1.Update();

Advanced solution (I prefer this), draw each image:
var
  i: integer;
  row, col: integer;
  imageWidth, imageHeight: integer;
  thumbWidth, thumbHeight: integer;
  rowCount, colCount: integer;
  bmp: TIEBitmap;
begin
   // you may want to change these
  imageWidth  := 1000;
  imageHeight := 1000;
  thumbWidth  := ImageEnMView1.ThumbWidth;
  thumbHeight := ImageEnMView1.ThumbHeight;

  colCount := imageWidth div thumbWidth;
  rowCount := ImageHeight div thumbHeight;
  ImageEnView1.IEBitmap.Allocate(imageWidth, imageHeight);

  row := 0;
  col := 0;

  for i:=0 to ImageEnMView1.ImageCount-1 do
  begin
    bmp := ImageEnMView1.GetTIEBitmap(i);
    bmp.RenderToTIEBitmapEx(ImageEnView1.IEBitmap,
                            col * thumbWidth, row * thumbHeight,
                            thumbWidth, thumbHeight,
                            0, 0, bmp.Width, bmp.Height,
                            255, rfFastLinear, ielNormal);
    ImageEnMView1.ReleaseBitmap(i);
    inc(col);
    if col = colCount then
    begin
      col := 0;
      inc(row);
      if row = rowCount then
        break;
    end;
  end;
  ImageEnView1.Update();
end;


You may want to add code to display text, to add space between images and to respect aspect ratio.
Boban Posted - May 13 2012 : 01:51:56
Hi Fabrizio

1) create a grid of images
fab Posted - May 13 2012 : 01:13:23
Hi Boban,
TImageEnView can contain only one image at the time. How should it contains all the frames of TImageEnMView?
Maybe:
1) create a grid of images
2) create a sequence of image (an animation?)
3)...?
fab Posted - May 12 2012 : 13:01:48
Perhaps I still do not understand your question.

However, to copy a frame from TImageEnMView to TImageEnView, execute:
ImageEnMView1.CopyToIEBitmap(frameIndex, ImageEnView1.IEBitmap);
ImageEnVIew1.Update();
...now you could write to file using ImageEnView1.IO.SaveToFile('out.jpg');

Instead to extract a frame directly to jpeg:

ImageEnMView1.GetImageToFile(frameIndex, 'output.jpg');

Hope this helps.
fab Posted - May 12 2012 : 03:06:51
Do you want copy a frame of TImageEnMView to TImageEnView?