3

Regarding TJvRichEdit and Delphi... How?

  1. Load/Save rtf (including text and images - not only .bmp) to/from a file?
  2. Read/Write rtf (including text and images - not only .bmp) to/from Firebird blob field?
  3. Automatically convert screendump pasted from clipboard (Ctrl-V) into .jpg format before it is inserted into the TJvRichEdit rtf?

Guidance/advice, examples/code and useful URLs are all helpful. Thanks.

Sam
  • 2,573
  • 10
  • 39
  • 58
  • The JEDI Online Help at http://help.delphi-jedi.org is *not* useful. Reading the source code in JvRichEdit.pas was helpful but I was still left with a lot of questions. – Sam Mar 11 '10 at 05:29

3 Answers3

3

Regarding 3 i would advice to create bitmap load from clipboard (see LoadFromClipboardFormat, SaveToClipboardFormat), convert to jpeg save to clipboard, richedit paste from clipboard,

Converting from bitmap to jpeg:

Jpg := TJPEGImage.Create;
jpg.Assign(Bitmap);
jpg.CompressionQuality := 50;
BennyBechDk
  • 934
  • 7
  • 13
1

As far as the blob field goes, use a tBlobStream and the components SaveToStream / LoadFromStream methods. For a file, use a tFileStream with the same methods.

skamradt
  • 14,916
  • 2
  • 33
  • 49
0

Found a demo (..\jvcl\examples\JvRichEdit\EditorDemo.dpr) that comes with the JVCL download. It compiles and runs and looks like it may contain the code that answers part 1 of the question.

Sam
  • 2,573
  • 10
  • 39
  • 58