Maximum Image Size

General TRichView support forum. Please post your questions here
Post Reply
carloscastro
Posts: 13
Joined: Fri Feb 24, 2006 5:48 pm

Maximum Image Size

Post by carloscastro »

Hi,

Is there a way to set a maximum width size for an image so that when inserting an image it automatically resizes the image to that maximum.

Thanks,
Carlos Castro
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Well, you can try to use OnItemAction event for this.

Code: Select all

uses RVItem;

if (ItemAction=rviaInserted) and (Item is TRVGraphicItemInfo) then begin
  Item.ImageWidth := ...
  Item.ImageHeight := ...
end;
carloscastro
Posts: 13
Joined: Fri Feb 24, 2006 5:48 pm

Post by carloscastro »

Thanks Sergey,

I solved the problem another way, replacing the insert image dialog with one developed by me in which you choose the image and the program automatically resizes it to my maximum width.
The problem of doing it in the editor is that the image is only resized in html code and not in the real size of the image.

Thanks anyway for your answer.
Post Reply