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
 CopyIEBitmapToSelection

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
w2m Posted - May 18 2015 : 17:20:14
Is there a function to CopyIEBitmapToSelection method?

I'd am trying to figure out how to flip a selection vertically so I tried to use ImageEnView1.CopySelectionToIEBitmap(iIEBitmap) to get a bitmap from the selection, but I do not see a way to copy the iIEBitmap back to the selection after flipping it vertically.

Any suggestions?

Update: I managed to flip the selection but the alphachannel is lost!!!
procedure TForm1.FlipVertically1Click(Sender: TObject);
var
  iLayer: Integer;
  iIEBitmap: TIEBitmap;
  iImageEnProc: TImageEnProc;
begin
  if ImageEnView1.Selected then
  begin
    ImageEnView1.Proc.SaveUndoCaptioned('Flip Selection Vertically' +
      IntToStr(ImageEnView1.Proc.UndoCount));
    Undo1.Hint := ImageEnView1.Proc.UndoCaptions[0];
    { Copy selected area and create a new layer }
    iLayer := ImageEnView1.LayersCreateFromSelection;
    ImageEnView1.DeSelect;
    iImageEnProc := TImageEnProc.CreateFromBitmap
      (ImageEnView1.Layers[iLayer].Bitmap);
    try
      iImageEnProc.Flip(fdVertical);
      ImageEnView1.Layers[iLayer].Bitmap := iImageEnProc.AttachedIEBitmap;
    finally
      iImageEnProc.Free;
    end;
    ImageEnView1.Update;
    ImageEnView1.Bitmap.Modified := ImageEnView1.Proc.UndoCount > 0;
    { Turn on Layers selection }
    ImageEnView1.Gestures.Pan.Enabled := False;
    ImageEnView1.Gestures.Zoom.Enabled := False;
    ImageEnView1.MouseInteract := [miMoveLayers, miResizeLayers];
  end;
end;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 20 2015 : 00:51:34
In v6.0.2 this will be:

TImageEnView.ApplyBitmapToSelection();

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