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 »

Not mouse!
Image->Resize(150%);
Attachments
Снимок13.jpg
Снимок13.jpg (9.59 KiB) Viewed 21259 times
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

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

Post by Sergey Tkachenko »

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(rvutModifyItem);
  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 »

Thank You very match, I did do it!
angleitner
Posts: 2
Joined: Tue May 31, 2016 10:18 am

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

Post by angleitner »

Which unit do I need for TRVGraphicItemInfo ?
giovani.erthal
Posts: 9
Joined: Thu Dec 27, 2018 1:48 am

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

Post by giovani.erthal »

angleitner wrote: Mon Mar 11, 2019 8:17 pm Which unit do I need for TRVGraphicItemInfo ?
RVItem
Post Reply