Op zondag 27-01-2008 om 16:18 uur [tijdzone +0100], schreef Michael Van
Canneyt:
> Secondly:
> In general, the TDBImage should be more flexible about the kind
> of data it expects: it now requires that the first part of the 
> blob stream is an ansistring with the extension of the image. 
> This is of course not true unless the image was saved by TDBImage 
> itself, but is not correct for other, legacy, data. For instance,
> the Borland TDataset writes a TGraphicHeader record to the stream
> before the actual image data (guess how I found out).

I wrote the current behavior, because it didn't work at all. So I came
up with this idea, since i wasn't aware of the precise header that
Delphi uses.

> I think that this can be easily fixed by adding an event handler
> 'OnGetImageFormat' to TDBImage, which, if set, should return this 
> ansistring; if it is not set, the current behaviour remains. 
> Similarly, an 'OnSetImageFormat' will write the type to the 
> stream (if a write is needed at all).
> 
> I think this is a simple change, and if the Lazarus devels agree,
> I can create a patch for it.

Go ahead offcourse although you should ask a lazarus-developer to commit
it. ;)

Joost.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to