T O P I C R E V I E W |
pierrotsc |
Posted - May 10 2021 : 18:36:53 I use the free embedded nexus DB binary. I use their approach to have a unit called embeddeddm created before my mainform to activate my database and tables. I have some imageendbview that do not load the graphic anymore. the component is blank. In design time, it looks like it is showing but becomes blank when i run the app. If i get rid of the embeddeddm unit and move the database and tables to the mainform, it works.
Is it something that changed in the imageendbview component ? Best Pierre |
20 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - May 31 2021 : 19:27:43 To remove the wallpaper use:
imgvwChain.Wallpaper := nil;
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 28 2021 : 10:51:42 Nigel, i modified the demo with your source code. clicking the checkbox should update both imageenview1 and the imgchain. As you can see it works with imageenview1 by turning the wallpaper on and off the but imgchain does not. it displays the wallpaper but never turn off.
I did call the imgchain.blank. If you got 2 mn, just run the demo and maybe you can find out what is going on. Best
attach/pierrotsc/2021528105124_Thumbnails2.zip 71.08 KB |
xequte |
Posted - May 27 2021 : 20:07:11 Hi
The default state of a TImageEnView is a white bitmap the size of the window, so you won't see the wallpaper in imgvwChain unless you call imgvwChain.Blank;
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 27 2021 : 18:49:13 Ok, now this is weird. your code works when i use imageenview1 but when i replace it with imgvwChain that i have included, it does not. oh well. i am using the demo so no other unit is used. |
pierrotsc |
Posted - May 27 2021 : 18:30:56 thanks, let me try... |
xequte |
Posted - May 27 2021 : 18:29:28 Hi
Please try this version of the code:
procedure TMainForm.CheckBox4Click(Sender: TObject);
var
bmp1, bmp2: TIEBitmap;
begin
if CheckBox4.Checked then
begin
// Wallpaper is a TPicture (which does not always support JPEG) so load into a TIEBitmap, and then assign the bitmap
if FileExists( extractfilepath(paramstr(0)) + 'wallpaper.jpg' ) = False then
raise Exception.create( 'File not found' );
bmp1 := TIEBitmap.Create( extractfilepath(paramstr(0)) + 'wallpaper.jpg');
if ( bmp1.Width < 20 ) or ( bmp1.Height < 20 ) then
raise Exception.create( 'Invalid image' );
if ( bmp1.VclBitmap.Width < 20 ) or ( bmp1.VclBitmap.Height < 20 ) then
raise Exception.create( 'Invalid bitmap' );
ImageEnView1.WallPaper.Assign( bmp1.VclBitmap );
if ImageEnView1.WallPaper = nil then
raise Exception.create( 'No wallpaper' );
bmp2 := TIEBitmap.Create();
bmp2.Assign( ImageEnView1.WallPaper.Bitmap );
bmp2.write( extractfilepath(paramstr(0)) + 'CHECK_THIS_IMAGE.jpg' );
bmp1.free;
bmp2.free;
end
else
ImageEnView1.WallPaper := nil;
ImageEnView1.Update;
end;
If that fails, then I suspect is seriously broken with TPicture handling in your project. An incompatible unit perhaps?
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 25 2021 : 18:49:26 Nigel, i modified the checkbox that load the wallpaper to reflect my imageenview.
procedure TForm1.CheckBox4Click(Sender: TObject);
var
bmp: TIEBitmap;
begin
if CheckBox4.Checked then
begin
// Wallpaper is a TPicture (which does not always support JPEG) so load into a TIEBitmap, and then assign the bitmap
bmp := TIEBitmap.Create( extractfilepath(paramstr(0)) + 'wallpaper.jpg');
imgvwChain.WallPaper.Assign( bmp.VclBitmap );
bmp.free;
end
else
imgvwChain.WallPaper := nil;
imgvwChain.Update;
end;
When you click the checkbox, nothing is happening. So something has changed sometimes.
Let me know what you find out. Best |
pierrotsc |
Posted - May 25 2021 : 14:02:25 Nigel, loading jpeg, png or bmp wallpaper shows up in design time but disappear in runtime. I bet if we can solve that, it will fix my database issue at the same time. same behavior Best Pierre |
pierrotsc |
Posted - May 25 2021 : 07:15:58 I think I did and same behavior but I will try again in case. |
xequte |
Posted - May 24 2021 : 23:52:20 Try doing it with a BMP file rather than a JPEG, so we can narrow it down to VCL JPEG support.
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 24 2021 : 21:06:27 Nigel, does not work. The image still disappears. this is the same behavior i get with the iamgeendbview. The image loads in design time but disappears in run time. That used to work tough. |
pierrotsc |
Posted - May 24 2021 : 20:27:02 Yes. It is a jpeg. This is the same behavior I am getting with the database images. I will add the back.imaging.jpeg to see. The wallpaper was just another way to show the behavior I was experiencing. I will let you know tomorrow when I try. Thanks |
xequte |
Posted - May 24 2021 : 20:20:47 Hi
Wallpaper is a TPicture which means it needs VCL support for the image format. Otherwise it is lost when recompiling the form if the appropriate unit has not been added to the form (which is what happens when I view your form at design or runtime)
For JPEG, you would need to add Vcl.Imaging.jpeg. What type of image file did you use the wallpaper?
You are better to use ImageEn to load and assign the wallpaper at runtime:
// Wallpaper is a TPicture (which does not always support JPEG) so load into a TIEBitmap, and then assign the bitmap
bmp := TIEBitmap.Create( extractfilepath(paramstr(0)) + 'Wallpaper.jpg');
ImageEnMView1.Wallpaper.Assign( bmp.VclBitmap );
bmp.free;
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 24 2021 : 19:43:05 Look on the right of the soft shadow checkbox. i added an imageenview that should show a chain inside in design time. but as you can see from the picture above, it is blank. the wallpaper is gone.
The imageenview is very small. it is added to your demo |
xequte |
Posted - May 24 2021 : 19:39:43 Hi
I added Wallpaper to this project at design time. It shows at design and runtime. Can you give me more information to reproduce?

Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 24 2021 : 18:50:25 Sweet. thank you Best |
xequte |
Posted - May 24 2021 : 18:44:42 Sorry, I'm a bit behind on things after taking a few days off last week. I'll get onto this over the next few days.
Nigel Xequte Software www.imageen.com
|
pierrotsc |
Posted - May 24 2021 : 17:28:54 Nigel, can you run my latest demo i posted without nexusdb and see why the wallpaper disappears in the imageenview ? Thanks |
pierrotsc |
Posted - May 21 2021 : 10:23:03 Nigel, when you have a chance, run the latest demo i uploaded. i have a small imageenview i added at the bottom left where you can see a chain wallpaper. when you run it, it's gone. i bet if i solve that i may solve my nexusdb issue too. Thanks |
pierrotsc |
Posted - May 20 2021 : 18:12:12 I have modified the thumbnail demo. i added a small imageenview with a picture of a chain inside. you see it in design time but it goes away in runtime.
attach/pierrotsc/2021520181144_Thumbnails2.zip 85.66 KB |