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
 Add Edge TImageEnMView.

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
wesleybobato Posted - Apr 11 2013 : 15:29:31
Hello William could help me?
Sera that you know how to optimize the code below as well before long, there will be another way to add edge faster?

procedure TFrmStudio.CreateBorderedImage;
var
OrigWidth, origHeight: integer;
oLeft, oTop, oRight, oBottom: integer;
sSource: TImageEnVect;
I: Integer;
begin
sSource := TImageEnVect.Create(nil);
Screen.Cursor := crHourGlass;
oLeft := 0;
oTop := 110;
oRight := 0;
oBottom := 110;
try
for I := 0 to Pred(ImgStudio.ImageCount) do
begin
sSource.IO.LoadFromFile(ImgStudio.ImageFileName[I]);
OrigWidth := sSource.IEBitmap.Width;
OrigHeight := sSource.IEBitmap.Height;

sSource.BackGround := clBlack;

// top
sSource.Proc.ImageResize(OrigWidth, OrigHeight + oTop, iehCenter, ievBottom);
// bottom
sSource.Proc.ImageResize(OrigWidth, OrigHeight + oTop + oBottom, iehCenter, ievTop);
// left
sSource.Proc.ImageResize(OrigWidth + oLeft, OrigHeight + oTop + oBottom, iehRight, ievCenter);
// right
sSource.Proc.ImageResize(OrigWidth + oLeft + oRight, OrigHeight + oTop + oBottom, iehLeft, ievCenter);

//sSource.Background := clBtnFace;

sSource.IO.SaveToFile(ImgStudio.ImageFileName[I]);
ImgVendas.ReloadImage(I);
end;
finally
FreeAndNil(sSource);
Screen.Cursor := crDefault;
end;
end;
5   L A T E S T    R E P L I E S    (Newest First)
wesleybobato Posted - Apr 12 2013 : 11:08:00
Thank You For Your Attention a big hug.
w2m Posted - Apr 12 2013 : 09:14:41
No you do not have to purchase again. The chapter on iexHelperFunctions has not been published yet. I probably will publish it following the next release of ImageEn so I can add more chapters that cover the ImageEn enhancements.

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
wesleybobato Posted - Apr 12 2013 : 05:50:28
Hello I did what I Willian Download Your Book Looking for Chapter iexHelperFunctions on and on and iexShellThumbnails not found I have to buy it again?

Thank you for your return.
wesleybobato Posted - Apr 12 2013 : 05:06:20
Thank you once again for your Attention William, Everything Good
w2m Posted - Apr 11 2013 : 17:37:46
Version 4.3.0 has a new unit called iexhelperfunctions.pas. One of the new functions is Bitmap.IEConvertToThumbnail. It is very fast and works well:
procedure TForm1.IEConvertToThumbnail1Click(Sender: TObject);
{ Convert TBitmap to the specified size with or without a border or a shadow. }
var
  iMaxX: Integer;
  iMaxY: Integer;
  iCanStretch: boolean;
  iQualityFilter: TResampleFilter;
  iAddBorder: boolean;
  iBorderColor: TColor;
  iAddShadow: boolean;
  iBlurRadius: Integer;
  iShadowOffset: Integer;
  iShadowColor: TColor;
  iBackgroundColor: TColor;
begin
  ImageEnView1.Proc.SaveUndo();
  Undo1.Enabled := ImageEnView1.Proc.CanUndo;
  iMaxX := StrToIntDef(Width1.Text, 320);
  iMaxY := StrToIntDef(Height1.Text, 240);
  iCanStretch := CanStretch1.Checked;
  iQualityFilter := TResampleFilter(ResampleFilter1.ItemIndex);
  iAddBorder := AddBorder1.Checked;
  iBorderColor := BorderColor1.Selected;
  iAddShadow := AddShadow1.Checked;
  iBlurRadius := StrToIntDef(BlurRadius1.Text, 4);
  iShadowOffset := StrToIntDef(ShadowOffset1.Text, 4);
  iShadowColor := ShadowColor1.Selected;
  iBackgroundColor := ThumbnailBackgroundColor1.Selected;
  ImageEnView1.Bitmap.IEConvertToThumbnail(iMaxX, iMaxY, iCanStretch, iQualityFilter, iAddBorder,
    iBorderColor,
    iAddShadow, iBlurRadius, iShadowOffset, iShadowColor, iBackgroundColor);
  ImageEnView1.Update;
  StatusBar1.Panels[2].Text := 'Width: ' + IntegerToString(ImageEnView1.Bitmap.Width);
  StatusBar1.Panels[3].Text := 'Height: ' + IntegerToString(ImageEnView1.Bitmap.Height);
end;

My EBook will have a new chapter in it that shows how to use all the iexHelperFunctions.

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html