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
 Save a part of selected image to another file

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
fabiotesla Posted - Jun 26 2015 : 05:42:17
I wanted to know how to save the contents of a selected image in a new image (ie save a new image with only the selected part).
2   L A T E S T    R E P L I E S    (Newest First)
fabiotesla Posted - Jun 26 2015 : 09:53:13
Perfect. It works great. Thanks.
w2m Posted - Jun 26 2015 : 08:34:28
{Uses iexHelperFunctions}
procedure TForm1.Save1Click(Sender: TObject);
var
  iBitmap: TBitmap;
begin
  if SavePictureDialog1.Execute then
  begin
    if ImageEnView1.Selected then
    begin
      iBitmap := TBitmap.Create;
      try
        ImageEnView1.CopySelectionToBitmap(iBitmap, False);
        iBitmap.IESaveToFile(SavePictureDialog1.FileName, 100);
      finally
        iBitmap.Free;
      end;
    end
    else
      ImageEnView1.IO.SaveToFile(SavePictureDialog1.FileName);
  end;
end;

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