[Lazarus] Graphics changes (r15472)
Luiz Americo Pereira Camara
luizmed at oi.com.br
Sat Jun 21 03:35:16 CEST 2008
Luiz Americo Pereira Camara wrote:
> Marc Weustink wrote:
>
>> This is no error, this is by design. And is only kept once and as long
>> as the image isn't changed. Indeed, for cases where you know you never
>> want to save it, we can add an property.
>>
>>
>
> Since the most common case is not save it, just display, the default
> should be not keep a copy of the stream. This my point.
>
All in all, i have some doubt in the real usefulness of this feature.
See the use cases:
- Load a image from file/stream
- The image data is stored in FSharedImage.FSaveStream property
1) If you don't change the image and use the SaveToStream function
this will take a shortcut and just copy the data to the destination Stream.
Ok. This is supposed to be the main benefit. But how much frequent
is the situation where you just load a image and then save back to
another stream or file without
modifying?
2) You modify the image using TCanvas methods. The
FSharedImage.FSaveStream property is freed. If you call SaveToStream the
data will be retrieved from the bitmap handle.
No benefits here.
I will be off in the next days, so excuse me for any lack of further
replies.
Luiz
More information about the Lazarus
mailing list