[lazarus] PNG and resource
David Creelman
dave at geko.net.au
Mon Nov 10 07:06:54 EST 2003
On Mon, 2003-11-10 at 20:50, Darek Mazur wrote:
> Hi
> I tested XPM before, its work fine but I have many bitmaps in BMP
> I can't find good tools to convert BMP to XPM
Have you tried using the netpbm tools, there is a utility amongst them
called bmptoppm and then a utility called ppmtoxpm. I use these at work,
they're pretty useful.
DC
> and I think that use PNG will be great
>
> Darek
>
> ----- Original Message -----
> From: "Tony Maro" <tony at maro.net>
> To: <lazarus at miraclec.com>
> Sent: Monday, November 10, 2003 1:08 AM
> Subject: Re: [lazarus] PNG and resource
>
>
> > Darek Mazur wrote:
> >
> > >Hi
> > >
> > >I've try use resources like in delphi
> > >I've notice that no function to load bitmap from resource (only
> truecolor)
> > >Than try PNG to store button image but in graphics.pp is bug or I can't
> > >understand it.
> > >
> >
> > Try something like this:
> >
> > Create your graphic, for instance "mypicture.xpm". (Pixmap's work great)
> >
> > Then convert it to a resource at the command line:
> > > lazres mygraphicresource.lrs mypicture.xpm
> >
> > In your code use:
> >
> > MyGraphic := TPixmap.Create;
> > MyGraphic.LoadFromLazarusResource('mypicture');
> >
> > in the Initialization section at the end of the unit be sure to add:
> >
> > {$I mygraphicresource.lrs} // inserts the resource into the unit
> >
> >
> > -Tony
> >
> > _________________________________________________________________
> > To unsubscribe: mail lazarus-request at miraclec.com with
> > "unsubscribe" as the Subject
> > archives at http://www.lazarus.freepascal.org/mailarchives
> >
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
More information about the Lazarus
mailing list