ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Importing a PSD Layer sets all Layers to "Cropped := True"
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

zerob

151 Posts

Posted - Sep 09 2024 :  13:27:48  Show Profile  Reply
If i import a PSD Layer, all Layers get set to cropped to background "Cropped := True".
This made me think something got broken, when none of my layers was visible... until i noticed that they all got hidden because the background layer was smaller.

I don't want layers that i import to be hidden or behave strangely when i move them.

zerob

151 Posts

Posted - Sep 09 2024 :  16:14:49  Show Profile  Reply
As there is no Layer0 Background, this especially looks odd, as they all get cropped to the bottom most layer, which can be really small depending on the PSD. Also if there was a Background, then this wasn't the behavior i expected, when i load a PSD. I didn't set any cropping in Photoshop.
Go to Top of Page

xequte

38531 Posts

Posted - Sep 09 2024 :  17:46:53  Show Profile  Reply
Hi

We crop a layer if the comparable PSD Clipping property is enabled.

Can you forward a sample image that is showing a different result than in PSD (ideally, please also send a screenshot of what you see in PSD, and what version of PSD you are using).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

zerob

151 Posts

Posted - Sep 10 2024 :  07:38:19  Show Profile  Reply
I have made a PSD (the one with the balls and lines you've seen in a different bug report)

It seems as this rule/behavior was the thing that confused me:

Photoshop Canvas = Same size as Bottom most Layer? Don't make a background and force that bottom most layer to be Layer0, set all (inclusive that new Layer0) to cropped to background (even if that forced background is tiny or hidden and never intended as background).
If Photoshop Canvas > size of bottom most layer? Create a transpartent new Backgroundlayer, but don't set that to cropped, only the real layers.

If i now move a layer outside that new forced Layer0, it gets hidden or chopped off, which i didn't expect, as ImageEnView does work with a full control size
to show layers, and no markings of that forced tiny new background dimension.

Setting it to cropped or creating a transparent background (or not) doesn't make sense as Photoshop works differently. It has a huge gray window that you can't paint on, and a small or big chessboard area showing all layers and allowing painting.
Restricting the layer to a transparent area is confusing and it isnt even happening all the time the same way.
I would prefer it to load all layers, don't set cropped to true, and unify that background layer creation.

Also seeing what confusion a forced Layer0 can bring, when the content is tiny or hidden, is there an ImageEnLayerMView option to disable repositioning Layer0 with the mouse (reordering the Background but inside of the LayerMView but letting other layers move freely) to force a new Layer0?
Go to Top of Page

xequte

38531 Posts

Posted - Sep 11 2024 :  02:15:40  Show Profile  Reply
Hi

OK, we'll avoid cropping PSD files when importing.

To disable moving of layer 0, set:

ImageEnView1.Layers[0].Locked := True;

You might also want:

ImageEnView1.Layers[0].Selectable := False;

(Both of those are the default for Layer 0).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

zerob

151 Posts

Posted - Sep 11 2024 :  03:28:39  Show Profile  Reply
I meant disabling repositioning (reordering z-index or making a new layer layer0 by drag n drop) by mouse inside of a TImageEnLayerMView.
Right now a user can drag a different layer below the Background and force this layer to be the new background.
I want to disable z-index reordering of the layer0 but let all other layers be z-index reorderable inside a TImageEnLayerMView.
Also disabling the context menu popup or graying out the menu entries for Layer0, so a user can't open the properties or rename or unlock anything if this isn't intended in a situation of a certain app.
By the way, is there a way to gray out certain TImageEnLayerMView context menu entries, delete or add new ones?
Go to Top of Page

xequte

38531 Posts

Posted - Sep 11 2024 :  04:26:37  Show Profile  Reply
Hi

You can add loProtectBackground to LayerOptions:

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

You can configure the popup menu using:

http://www.imageen.com/help/TIEGlobalSettings.LayerMViewDefaultPopupMenu.html
http://www.imageen.com/help/TIEGlobalSettings.LayerMViewSelectionPopupMenu.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: