Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-08

The Forms library and images

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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.

Could anyone please tell me if (how) I can display images using the Free Pascal Forms library?

Barry Samuels

Unknown author
to Unknown author
Show quoted text 13 lines
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.

Unknown author
to Unknown author
Show quoted text 25 lines
On Sun, 19 Aug 2001 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 library?

Many thanks for the reply.

Barry Samuels

Michael Van Canneyt
to Unknown author
Show quoted text 33 lines
wrote: > > On Sun, 19 Aug 2001 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 library?

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.

Michael.