trichview.com

trichview.support




Re: How to paste bitmap without bigsize #2


Return to index


Author

Message

Ibrahim Kutluay

Posted: 04/02/2005 8:47:35


maybe i have dig wrong event for your proposal. which event i should use for

"enum" stuf proposal


"Sergey Tkachenko" <[email protected]> wrote in message

news:[email protected]...

>> Dear Sergei

>>

>> I have tried the your png proposal but the blob size still very big.

>

> It's strange - it converts all bitmaps to png, and should be highly

> reduced

> in size.

> Of course, it depends on images themselves - if they are like screenshots,

> they should become very small, if they are photos or paintings, it's may

> be

> better to use jpeg.

> May be documents are big because they contain unnecessary styles? Make

> sure

> that AutoDeleteUnusedStyles property is set to True.

>

> Your code is overcomplicated a bit. And it does not set DoDefault = False,

> so the editor inserts bitmap after you inserted jpeg.

>

> procedure TFrmNotes.RichPaste(Sender: TCustomRichViewEdit;

>  var DoDefault: Boolean);

> var

> V: Integer;

>  JPEG: TJPEGImage;

>  Bitmap: TBitmap;

> begin

>  If Sender.CanPasteRVF or Sender.CanPasteRTF then

>    exit;

>  If Clipboard.HasFormat(CF_BITMAP) then

>  Begin

>    Bitmap := TBitmap.Create;

>    try

>      Bitmap.Assign(Clipboard);

>      JPEG := TJPEGImage.Create;

>      JPEG.Assign(Bitmap);

>      Sender.InsertPicture('',JPEG,rvvaBaseLine);

>      DoDefault := False;

>    finally

>      Bitmap.Free;

>    end;

>  End;

> end;

>

> In the code above, JPEG can be changed to PNG, and TJPEGImage to

> TPngObject.

>

>





Powered by ABC Amber Outlook Express Converter