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
 Threshold

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
Small Donkey Posted - May 11 2017 : 07:50:20
Hello, how to convert bitmap from this



to this using Delphi


2   L A T E S T    R E P L I E S    (Newest First)
Small Donkey Posted - May 11 2017 : 08:22:07
Thank You
w2m Posted - May 11 2017 : 08:12:24
Convert the image to 32-bit with transparency and save as png:
procedure TForm1.ConvertTo32Bit;
var
  iRGB: TRGB;
begin
  if Assigned(PageControl1.ActivePage) then
  begin
    ImageEnView := TImageEnView(PageControl1.ActivePage.Controls[0]);
    if Assigned(ImageEnView) then
    begin
      ImageEnView.Proc.SaveUndo('Convert to 32-Bit ' + IntToStr(ImageEnView.Proc.UndoCount));
      Undo1.Hint := ImageEnView.Proc.UndoCaptions[0];
      Undo1.Enabled := ImageEnView.Proc.CanUndo;
      ImageEnView.EnableAlphaChannel := True;
      iRGB := ImageEnView.IEBitmap.Pixels[0, ImageEnView.IEBitmap.Height - 1];
      ImageEnView.Proc.SetTransparentColors(iRGB, iRGB, 0);
      ImageEnView.BackgroundStyle := iebsChessboard;
      ImageEnView.IO.Params.BitsPerSample := 8;
      ImageEnView.IO.Params.SamplesPerPixel := 4;
      ImageEnView.IEBitmap.Modified := True;
      ImageEnView.Update;
      ImageEnMView1.SetIEBitmapEx(ImageEnMView1.SelectedImage, ImageEnView.IEBitmap);
      ImageEnMView1.MIO.Params[ImageEnMView1.SelectedImage].BitsPerSample := 8;
      ImageEnMView1.MIO.Params[ImageEnMView1.SelectedImage].SamplesPerPixel := 4;
      ImageEnMView1.Update;
    end;
  end;
end;



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