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
 ImageEnMView: what is the current selected image?

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
skippix Posted - Aug 25 2013 : 04:37:18
i want to allow users to toggle between grid view and single view by double-clicking on the ImageEnMView. the following code doesn't work:

procedure Tfb13Main.ImageEnMView1DblClick(Sender: TObject);
var i: Integer;
begin
if (ImageEnMView1.DisplayMode = mdGrid) then
begin
i := ImageEnMView1.SelectedImage;
ImageEnMView1.DisplayMode := mdSingle;
ImageEnMView1.ReloadImage(i);
ImageEnMView1.ThumbWidth := ImageEnMView1.Width;
ImageEnMView1.ThumbHeight := ImageEnMView1.Height;
end
else
begin
ImageEnMView1.DisplayMode := mdGrid;
ImageEnMView1.ThumbWidth := TrackBar1.Position;
ImageEnMView1.ThumbHeight := TrackBar1.Position;
end;
end;

also, when i scale up the image, it's pixelated. what do i need to do to get the larger view to look nice?

what do i need to do to make this work? thanks!
4   L A T E S T    R E P L I E S    (Newest First)
skippix Posted - Aug 25 2013 : 10:10:03
perfect! thanks!
w2m Posted - Aug 25 2013 : 09:59:15
Use a ietNormal StoreType. The reason why the images are pixelated is because you are stretching the images to a larger size when the display mode is mdSingle. Use the real images instead and pixelization will disappear. There is no other way to handle this problem.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
skippix Posted - Aug 25 2013 : 06:12:24
excellent on the dbl-click! how do i tackle the pixelization?
w2m Posted - Aug 25 2013 : 05:47:37
procedure TForm1.ImageEnMView1DblClick(Sender: TObject);
var
  i: Integer;
begin
  if (ImageEnMView1.DisplayMode = mdGrid) then
  begin
    i := ImageEnMView1.SelectedImage;
    ImageEnMView1.DisplayMode := mdSingle;
    ImageEnMView1.ThumbWidth := ImageEnMView1.Width;
    ImageEnMView1.ThumbHeight := ImageEnMView1.Height;
    {Specifies the visible image when TImageEnMView.DisplayMode is
    mdSingle or TImageEnMView.Playing is True.}
    ImageEnMView1.VisibleFrame := i;
  end
  else
  begin
    i := ImageEnMView1.VisibleFrame;
    ImageEnMView1.DisplayMode := mdGrid;
    ImageEnMView1.ThumbWidth := TrackBar1.Position;
    ImageEnMView1.ThumbHeight := TrackBar1.Position;
    ImageEnMView1.SelectedImageAlwaysVisible := True;
    ImageEnMView1.SelectedImage := i;
  end;
end;

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