[fpc-pascal]The Forms library and images
Michael Van Canneyt
michael.vancanneyt at wisa.be
Tue Aug 21 10:10:12 CEST 2001
On Tue, 21 Aug 2001 barry at beenthere-donethat.org.uk wrote:
> Michael.VanCanneyt at Wisa.be wrote:
> > On Sun, 19 Aug 2001 barry at beenthere-donethat.org.uk wrote:
> > > I am trying to write an image indexing/filing application using Free
> > > Pascal v1.0.4-1 together with Postgresql and the Forms library v0.89.
> > >
> > > I have managed to blunder my way as far as being able to store images
> > > in the Postgres database and I would now like to try retieving stored
> > > images and displaying them.
> > >
> > > I am using the Forms library because it has FDesign and will produce
> > > Pascal code which Glade/GTK won't do. I don't understand C!
> > >
> > > I have looked through the Forms documentation and it does have a
> > > section on images but it mentions an FL_IMAGE type which the Free
> > > Pascal Forms library seems to omit.
> > ? Normally, you should use fl_add_bitmap() to add a bitmap widget,
> > and set the image using fl_set_bitmap_data() or fl_set_bitmap_file()
> > however, all bitmaps must be in xpm format, so you'll need some kind
> > of conversion routines. Free Pascal has support for jpeg; I don't think
> > there is support for anything else.
> > Michael.
> I'm sorry - I should have been more explicit. It is actually support for jpegs
> that I am looking for as they are small in size compared to bitmaps which I don't
> want to use. When you say that Free Pascal has support for jpeg what do you
> actually mean? Does it mean that I could display a jpeg from within the Forms
It means that you can read the jpeg files; (see the pasjpeg units on the contributed
units page) Then you can convert them internally to xpm (which is what Forms needs)
and display them. There is no out-of-the-box support for displaying jpeg files
immediatly. I don't think any toolkit has that. by itself, GTK can also only display
xpm and xbm.
More information about the fpc-pascal