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
 Inconsistent Layerbackground 0 behavior.

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
zerob Posted - Sep 09 2024 : 14:18:35
If i open an empty TImageEnView, there is a white background 616 x 385.
When i do a LayersClear and LayersAdd to load a backgroundless PSD, ImageEnView merges all PSD Layers and adds it with a gray background layer with the same 616 x 385 size (but not white anymore).

When i do a IO.LoadFromFilePSD or a LayersImport, there is no background layer anymore (as these PSDs don't contain this).
When i now again do a
LayersClear;
LayersAdd(...psd);

Then it loads the PSD merged into a single layer and leaves the old bottom most layer from previous PSD layersImport, as it considers it a background as it was the Layer nr 0.

So it first changes color to gray and then it leaves old layer 0.

Why is there a background layer forced at all, when you handle Transparency and have Chessboard views? Is this for convinience with algorythms and something from the early years? And there needs to be a complete wipe when calling things like LayersClear, so no old layers stay, including their graphics, just because they where the nr 0.
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 09 2024 : 21:29:40
Hi

I checked the code, and if LayersClear(True) is called then all the layer properties are reset (position, etc). However the image is cleared (filled with the background color) rather than blanked, so you might want to call:

ImageEnView1.ClearAll();

Which also resets layer 0 to a null size.


There will always be a Layer 0 (background layer) even if it is not visible (e.g. has a null size, or is fully transparent), because it is used as the basis for positioning of all layers.

Nigel
Xequte Software
www.imageen.com
xequte Posted - Sep 09 2024 : 17:51:37
Sorry, I'm trying to understand if gray is just background color.

Can you set the following properties and send me a screenshot of what you are referring to:
https://www.imageen.com/help/TIEView.BackgroundStyle.html
https://www.imageen.com/help/TImageEnView.BackgroundOuter.html

Nigel
Xequte Software
www.imageen.com
zerob Posted - Sep 09 2024 : 16:09:27
Hmm well, i overlooked that parameter. But it still isn't working as expected.
1. The app starts with a white background (which is default) and LayersClear changes it to grey, like the color of the area outside of the background.
2. The Layer name, size, position and so on stays the same even after a "LayersClear(True)", only the color changes to grey. I expected it to reset everything to default and not stay like a previous PSD or the user set it.

Is this Background Layer0 mandatory or can it be disabled somehow if i plan to work with alpha channels and just the Photoshop like Chessboard background and have no need for a white background Layer0 ? I guess it is entangled in to deep in different functions to disable.
xequte Posted - Sep 09 2024 : 15:31:31
Hi

You can use LayersClear( True ) to also wipe the background layer.

http://www.imageen.com/help/TImageEnView.LayersClear.html

Nigel
Xequte Software
www.imageen.com