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
 the background color of the duplicated image layer changes to black.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

sorinara

Korea
1 Posts

Posted - Sep 01 2024 :  11:29:25  Show Profile  Reply
Problem: i’ve created a code in ImageEnView where an image from the ImageEnView is copied, and a new layer is created with that copied image. The layer can be moved and its transparency adjusted to compare it with the original image. However, when i move the layer with the mouse, the background color of the duplicated image layer changes to black.

ex)
ImageEnView.Layers[idx].Bitmap.Fill(clwhite);
ImageEnView.Layers[idx].UserData := SImage;
ImageEnView.Layers[idx].PosX := ImageEnView.ViewX;
ImageEnView.Layers[idx].PosY := ImageEnView.ViewY;

ImageEnView.LayerOptions := ImageEnView.LayerOptions + [loAllowMultiSelect,loAutoSelectMask];
ImageEnView.MouseInteractLayers :=[miMoveLayers,miRotateLayers];
ImageEnView.LayerDefaults.Clear;

ImageEnView.IO.NativePixelFormat := True;
ImageEnView.IO.LoadFromStream(FImage);
ImageEnView.CurrentLayer.Transparency := TrackBar1.Position;

ImageEnView.IEBitmap.ChannelOffset[0] := 10;
ImageEnView.IEBitmap.ChannelOffset[1] := 0;
ImageEnView.IEBitmap.ChannelOffset[2] := 0;

ImageEnView.LayersCurrent := idx;
ImageEnView.Layers[idx].AntiAlias := False;
ImageEnView.Layers[idx].ResampleFilter := rfFastLinear;
ImageEnView.LayersDrawBox := True;

xequte

38458 Posts

Posted - Sep 01 2024 :  15:52:30  Show Profile  Reply
Hi

Does removing the ChannelOffset code resolve it?

Can you email me a very simple demo that reproduces the issue?

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