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
 Problem with loading wallpaper into 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
AdrianKnowles Posted - Sep 17 2017 : 02:18:49
Hi,
I've been looking for a workaround for the bug that seems to occur between cropping ROI's when coordinates are shared btwn imageenview components(see post from a couple of days ago).
I thought to try to load my images as wallpaper but for some reason they do not display when application executes either
1) When I have it set up in IDE.
2) I try to load it manually.

Am I doing something wrong?

Thanks in advance,
Adrian



unit Wallpaper;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, hyieutils, iexBitmaps, hyiedefs,
  iesettings, iexLayers, iexRulers, Vcl.StdCtrls, ieview, imageenview,
  Vcl.Imaging.pngimage, ieopensavedlg;

type
  TForm1 = class(TForm)
    ImageEnView1: TImageEnView;
    LoadButton: TButton;
    ImageEnView2: TImageEnView;
    OpenImageEnDialog1: TOpenImageEnDialog;
    procedure LoadButtonClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.LoadButtonClick(Sender: TObject);
var
  fn:string;
begin
  if OpenImageEnDialog1.Execute then
  begin
    fn := OpenImageEnDialog1.FileName;
    ImageEnView1.WallpaperStyle := iewoStretch;
    imageenview1.wallpaper.LoadFromFile(fn);
    imageenview1.Update;
  end;
end;

end.




1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 17 2017 : 20:12:47
Hi

By default, Layer 0 will have a size of the TImageEnView, so if you want to see the wallpaper without loading an image, either:

- Hide Layer 0: ImageEnView1.CurrentLayer.visible := False;
- Set image size (layer 0) to something smaller than the control, e.g. ImageEnView1.IEBitmap.Allocate( 1, 1 );

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com