Mattias Gaertner wrote:
On Fri, 17 Aug 2007 23:04:53 +0400
skywriter <[EMAIL PROTECTED]> wrote:

Add before LoadFromFile:
    myPict.GetDescriptionFromDevice(0);

Reason:
TLazIntfImage needs the image format (bit depth, colors, ...) of the
target (your screen).
Necessity of calling GetDescriptionFromDevice(0); is not obvious for developer. We accustomed the object is ready for use after
construction because task of constructor is creating and preparing of
object for work.

TLazIntfImage is a flexible storage object, used where TBitmap is too
slow or too high level.
Feel free to add some more constructors for the various purposes. For
example, one constructor for a device context, one for a TBimap, one
for a rawimage description, one for a raw image, and maybe several for
common formats.

Just a note. Pieces of this code got rewritten and will be merged soon.
Functions like GetDescriptionFromDevice might have become obsolete/renamed/relocated.

(those extra constructors might already be there)

Marc

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

Reply via email to