File is too big when i pasted some pictures from ClipBoard
Posted: Thu Sep 08, 2016 4:11 am
Question 1:
I want't to reduce the file size when many pictures were pasted from Clipboard.
Code below worked, the file size is small. But the pictures in file are so distortion:
Is there any way to deal this?
Question 2:
Mouse wheel in TSRichViewEdit is so slow.
If I set this property geater than 10, the mouse wheel will not work.. , Is there any other property?
I want't to reduce the file size when many pictures were pasted from Clipboard.
Code below worked, the file size is small. But the pictures in file are so distortion:
Code: Select all
procedure TResearchReportFrame.RichViewEdit1Paste(Sender: TCustomRichViewEdit;
var DoDefault: Boolean);
var
png : TPngImage;
gr : TGraphic;
begin
if Clipboard.HasFormat(CF_BITMAP) then
begin
DoDefault := False;
png := TPngImage.Create;
png.LoadFromClipboardFormat(CF_BITMAP,ClipBoard.GetAsHandle(CF_BITMAP),0);
gr := RV_CreateGraphics(TGraphicClass(png.ClassType));
gr.Assign(png);
// png.SaveToFile('d:\1.png');
RichViewEdit1.ActiveEditor.InsertPicture('',gr, rvvaLeft);
png.Free;
end
else
begin
DoDefault := True;
end;
end;
Question 2:
Mouse wheel in TSRichViewEdit is so slow.
If I set this property geater than 10, the mouse wheel will not work.. , Is there any other property?
TSRichViewEdit.ViewProperty.WheelStep
Thanks.TSRichViewEdit.RichViewEdit.WheelStep