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
 Copying imageenvect

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
pierrotsc Posted - Aug 28 2014 : 19:05:39
in my quest to create channels you can edit with multiple layers, i need to find a way to copy an imageenvect with multiple layers to another one. what is the most efficient way?
i tried the assign function but it looks like it copies only the current layer.
i wrote frm_buffer.imageenvect.assign(imageenvect)

thanks
Pierre
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 31 2014 : 22:47:19
Note, in v5.1.2. you can TImageEnView.Assign will copy all layers and vect objects. Email me if you want the source changes.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Aug 29 2014 : 12:24:48
I added it to a demo app here and it does not cause an exception. Anyway, I do not think that is a good to copy layers and objects to another TImageEnVect in the ImageEnVect1ImageChange because the event is not executed when you add layers or objects. I would put the code in the code after you add a layer and after you add objects.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Aug 29 2014 : 12:12:15
Thanks. By adding that to the on image change event, I get a stream error. I sent you an email with the screenshot.
Sincerely,
Pierre
w2m Posted - Aug 29 2014 : 11:57:18
procedure TForm1.CopyLayersAndObjects1Click(Sender: TObject);
{ Copy ImageEnVect1 layers and objects To ImageEnVect2 }
var
  iMemoryStream: TMemoryStream;
begin
  iMemoryStream := TMemoryStream.Create;
  try
    ImageEnVect1.LayersSaveToStream(iMemoryStream);
    iMemoryStream.Position := 0;
    { Copy all layers from ImageenVect1 to ImageEnVect2. This maintains the alpha channel }
    ImageEnVect2.LayersLoadFromStream(iMemoryStream);
    { Copy all objects from ImageEnVect1 to ImageEnVect2 }
    ImageEnVect1.CopyAllObjectsTo(ImageEnVect2);
    ImageEnVect2.Update;
  finally
    iMemoryStream.Free;
  end;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development