How I can to resize a Image with software?

General TRichView support forum. Please post your questions here
Post Reply
+ 1
Posts: 11
Joined: Tue Jun 13, 2017 6:13 am

How I can to resize a Image with software?

Post by + 1 » Fri Sep 22, 2017 12:12 pm

Not mouse!
Image->Resize(150%);
Attachments
Снимок13.jpg
Снимок13.jpg (9.59 KiB) Viewed 318 times

Sergey Tkachenko
Site Admin
Posts: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: How I can to resize a Image with software?

Post by Sergey Tkachenko » Fri Sep 22, 2017 2:59 pm

Inserting an image resized to 100x100, as an editing (undoable) operation:

Code: Select all

rve.TopLevelEditor.BeginUndoGroup(rvutInsert);
rve.TopLevelEditor.SetUndoGroupMode(True);
if rve.InsertPicture(...) then
begin
  rve.SetCurrentItemExtraIntProperty(rvepImageHeight, 100, True);
  rve.SetCurrentItemExtraIntProperty(rvepImageWidth, 100, True);
end;
rve.TopLevelEditor.SetUndoGroupMode(False);
Resizing the image at the caret position, as an editing (undoable) operation:

Code: Select all

if rve.TopLevelEditor.GetCurrentItem is TRVGraphicItemInfo then
begin
  rve.TopLevelEditor.BeginUndoGroup(rvuModifyItem);
  rve.TopLevelEditor.SetUndoGroupMode(True);
  rve.SetCurrentItemExtraIntProperty(rvepImageHeight, 100, True);
  rve.SetCurrentItemExtraIntProperty(rvepImageWidth, 100, True);
  rve.TopLevelEditor.SetUndoGroupMode(False);
end;
Adding an image to the end of document, when generating it (not undoable)

Code: Select all

rv.Clear;
<add something before the image>
rv.AddPictureEx(...);
rv.SetItemExtraIntProperty(rv.ItemCount - 1, rvepImageHeight, 100);
rv.SetItemExtraIntProperty(rv.ItemCount - 1, rvepImageWidth, 100);
<add something after the image>
rv.Format;

+ 1
Posts: 11
Joined: Tue Jun 13, 2017 6:13 am

Re: How I can to resize a Image with software?

Post by + 1 » Fri Sep 22, 2017 3:25 pm

Thank You very match, I did do it!

Post Reply