Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
yogiyang
Posted - Dec 28 2013 : 06:36:31 I have observed that in the latest version of ImageEn when we load a .PSD file the control does not return the transparency of the layers. Why?
Here is the code that I am using for checking transparency:
This feature/property works extremely well in the older version of ImageEN!
TIA
Yogi Yang
4 L A T E S T R E P L I E S (Newest First)
yogiyang
Posted - Dec 31 2013 : 00:21:24 Thanks for the inputs.
I am waiting for Fabrizio or Nigel to give more detailed information and the reasons for doing this as this change is breaking my olde code completely.
And time is running out for a rewrite at this stage.
I am attaching a sample PSD file for checking.
This file has three layers and each layer's Opacity is set differently.
I have also applied layer mask to one Layer and have also saved an Alpha channel.
In spite of all these I always get Transparency as 255 so from where does ImageEn read transparency value and what are its actual use?
Posted - Dec 30 2013 : 07:53:14 From the help file:
TIELayer.Transparency
Declaration property Transparency: integer;
Description Set the overall transparency of the layer in the range from 0 (fully transparent) to 255 (totally opaque). Use Opacity instead of Transparency when the image has an alpha channel.
Description Set the overall opacity of the layer in the range from 0 (fully transparent) to 1.0 (totally opaque). Use Opacity instead of Transparency when the image has an alpha channel.
I have no idea why Fabrizio says to use Opacity instead of Transparency when the image has an alpha channel.
Maybe Nigel or Fabrizio can explain in more detail.
But then if I use the Opacity property I get the opacity value as Double.
This same Transparency works in the older version (where Opacity property does not exist) as it should.
It seems the transition from 3.x to 5.x is quite a radical one!
Yogi Yang
w2m
Posted - Dec 29 2013 : 09:00:53 I tested this problem with images you sent me.
The transparency in the images is based on the image transparency and not on the layer transparency. When you select a layer that appears transparent, 255 is returned because the layers transparency is 255 but the images transparency is 0. I can successfully set and get a layers transparency in a demo I will be sending you.
As best as I can determine there is nothing wrong with the code that gets or sets a layers transparency and the correct values are reported.