[Lazarus] TImage and PNG (on linux)

Krzysztof dibo20 at wp.pl
Tue Apr 12 20:18:48 CEST 2011


So if you want operate on bitmaps and canvas then maybe it is better to read
about BGRABitmap and do this same things which i'm doing in my components.
This is very interesting class. You can load PNG image to this class and
draw wherever you want similar like with canvas (but with alpha). Details:
http://wiki.lazarus.freepascal.org/BGRABitmap
and few tutorials (with nice effects):
http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial
This is crossplatform library

2011/4/12 Leonardo M. Ramé <l.rame at griensu.com>

> On 2011-04-12 19:22:36 +0200, Krzysztof wrote:
> >    This is known issue. GTK have no alpha yet but I created set of
> components
> >    which partially solve this problem by using BGRABitmap class, details:
> >    http://www.lazarus.freepascal.org/index.php/topic,12411.0.html .
> Although
> >    there is no TImage yet but I can try create it.
> >    For TrayIcon on GTK you must rebuild lazarus with -dUseStatusIcon
> switch.
> >    If tray still have no alpha then you must add this 3 lines posted by
> >    TrUsTeR:
> >    http://www.lazarus.freepascal.org/index.php/topic,6583.0.html
> >    After this tray icon works perfect in my case.
> >    2011/4/10 Leonardo M. Rame <l.rame at griensu.com>
> >
> >      Hi, I was testing a sample project and found that on Windows,
> handling
> >      of PNGs with transparent backgrounds is working ok, but on Linux it
> >      doesn't work as expected. The image is a black line on the top of
> the
> >      image, with a Gaussian Blur applied on Photoshop, then saved to PNG
> with
> >      transparent background.
> >
> >      I attached an image showing what I get on Windows vs Linux, also the
> >      original image.
> >
> >      Thanks in advance,
> >      --
> >      Leonardo M. Rame
> >      http://leonardorame.blogspot.com
> >      --
> >      _______________________________________________
> >      Lazarus mailing list
> >      Lazarus at lists.lazarus.freepascal.org
> >      http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
> > --
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lists.lazarus.freepascal.org
> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> Well, I don't really need TImage, but TPicture. What I need is to be
> able to use TCanvas methods to copy this picture into another TCanvas.
>
> Does your component allows this?
>
>
>
> --
> Leonardo M. Ramé
> http://leonardorame.blogspot.com
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110412/792d54a7/attachment-0003.html>


More information about the Lazarus mailing list