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
 Flattening Layer Operation images into one layer

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
DMC02766 Posted - Jun 07 2016 : 16:21:42
I am currently looking for a way to take what the final product looks like on the screen after doing layer operations on the layers (color dodge specifically) and save that as a new layer. I have found that photoshop basically take a snapshot of what the image on the screen looks like and snapshots it to a new layer called "merged". This link explains the problem I have and what photoshops solution is (http://www.photoshopessentials.com/photo-editing/how-to-merge-layer-blend-modes-in-photoshop/). I believe I should be able to do this with the IEBitmap.RenderToTIEBitmapex functionality but havent had much success. This is what I currently have:

imgview2r and imgview2g are imageenview with an images loaded
>>>>>

tempview and tempview2 are imageenviews with no images that will be rendered using the color dodge layer operation. tempview2 will hold the merged image.

img2layerd is an image with multiple layers that I would like to add the final product (tempview2's rendered images) to as a layer


 tempview.ieBitmap.Assign(imgview2r.IEBitmap);
 // showmessage('assigned red');
  tempview2.ieBitmap.Assign(imgview2g.IEbitmap);
 // showmessage('assigned green');
    tempview2.IEBitmap.RenderToTIEBitmapex(tempview.ieBITMAP, tempview.ieBitmap.width,0,tempview2.ieBitmap.width,tempview2.ieBitmap.height,
                                           0,0,tempview2.IEBitmap.width,tempview2.IEBitmap.width,FALSE, 255, rfnone, 
                                           ielInverseColorDodge, 1.0);

  //   showmessage('rendered');
             ilayer := img2layerd.LayersAdd;

     img2layerd.Layers[ilayer].Bitmap.Assign(tempview.bitmap);
     img2layerd.Layers[2].Name := 'MERGED BLEND';



I feel like I am overlooking something simple with this because the merged image just look like the image that is being rendered into the other- as if it is ignoring the InverseColorDodge operation during the rendertotiebitmap. Any help would be greatly appreciated.
2   L A T E S T    R E P L I E S    (Newest First)
DMC02766 Posted - Jun 09 2016 : 16:02:01
Thanks Nigel! It works perfectly now using your example. I had one little glitch but realized I had this line which called for the width twice in place of the height making it out of sorts:


tempview2.IEBitmap.width,tempview2.IEBitmap.width,FALSE, 255, rfnone,      ielInverseColorDodge, 1.0);


Thanks again- this functionality will be very handy.
xequte Posted - Jun 09 2016 : 01:58:27
Hi

This works fine for me...

// Merge images of ImageEnView1 and ImageEnView2 using "InverseColorDodge" and put onto ImageEnView3
ImageEnView3.IEBitmap.Assign( ImageEnView2.IEBitmap );
ImageEnView1.IEBitmap.RenderToTIEBitmapEx( ImageEnView3.IEBitmap,
                                           0, 0, ImageEnView2.IEBitmap.Width, ImageEnView2.IEBitmap.Height,
                                           0, 0, ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height,
                                           FALSE, 255, rfNone,
                                           ielInverseColorDodge );
ImageEnView3.Update;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com