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
 AddLayer

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
Orlando Posted - Jun 29 2011 : 12:12:11
Hello, i have a problem when i add a layer to an TImageEnView component and increase the size of the layer added.

I don't understand why the layer added, have a gray color in the incremented area.

This is my code:


procedure AddWhiteLayer(imgev: TImageEnView);
var
idx: Integer;
begin
imgev.LayersSync := False;
idx := imgevActiveImage.LayersAdd(imgev.Bitmap.Width, imgev.Bitmap.Height + 300);
imgev.Layers[idx].Bitmap.Fill(clWhite);
imgev.Proc.SetTransparentColors(CreateRGB(255, 255, 255), CreateRGB(255, 255, 255), 0);
imgev.Layers[idx].Transparency := 100;
imgev.LayersMergeAll;
end;


I wanted to attach a screenshot of my application with the problem but when i did that, appeared the next error:
Microsoft VBScript runtime error '800a004c'
Path not found
/imageen/forum/outputFile.asp, line 159


Thanks in advance.


Orlando
4   L A T E S T    R E P L I E S    (Newest First)
Orlando Posted - Jun 30 2011 : 14:24:19
William, I solved my problem in another way.

Thanks a lot for your help :-)


Orlando
w2m Posted - Jun 29 2011 : 14:22:10
So you have it working or still need help?

William Miller
Orlando Posted - Jun 29 2011 : 13:40:08
Hello William, thanks for your answer.

For simplicity, I removed some code.

I want to add text to the end of the image, for this, add a layer, increasing its size, add text, and mix the two layers.

I do not know another way to do this.


Orlando
w2m Posted - Jun 29 2011 : 13:10:45
I do not understand why you are trying to do this. What you are doing is:
1. adding a layer and setting it dimensions
2. filling it with white
3. setting the transparent color to white.
4. setting the layers alpha to 100 which is about 40% opacity. A layers transparency is actually alpha whis is defined as 0 to 255 not percent.
5. merging the layer which removes the alphachannel.

When you do LayersMergeAll the resulting bitmap will be always 24 bit (ie24RGB). A 24bit bitmap does not have transparency.

What are you trying to do?
Do you want a 32-bit transparent layer of a specific size with alphachannel?
Do you want a 24-bit white layer of specific size with no alphachannel?


William Miller