Recent

Author Topic: .xpm ?  (Read 7823 times)

Ron

  • Guest
.xpm ?
« on: May 22, 2004, 02:06:10 am »
I'm familiar with Delphi. I have an older Client/Server version. This is my first day at playing around with Lazarus.

.. so I go to put a picture on a form. It asks for a .xpm file? I know about .bmp .gif .tiff .jpg .jiff .mac and quite a few others.. but I've never heard of a .xpm

.. so I asked my Paint Shop Pro. It never heard of a .xpm either.

.. so I asked Jeeves. He didn't know either.

.. so now I'm asking you. Ahh, umm, er.. What's a XPM ?

Ron

  • Guest
.xpm ?
« Reply #1 on: May 23, 2004, 01:15:44 am »
:?: I have good news and bad news.

First the good news.
XPM is a file format used in Linux and perhaps elsewhere. There are are at least two BMP <=> XPM converters out there:
1. ImageMagick converts just about everything to just about everything else.
2. MakeXPM. Written in Windows Delphi. Converts BMP<=>XPM. May be downloaded free from the author. Sorry, didn't save the link (do a Google.Com search for MakeXPM).

Now the bad news:
1. The Lazarus TImage.Picture function won't load the MakeXPM .xpm file, and I can't tell why. It goes through all the motions, but fails to import the picture. It provides no error message or indication of a malfunction other than it simply didn't work..

2. Run-time code doesn't work either. This line of code placed in Form1Activate
           Image1.Picture.LoadFromFile('filename.xmp');
builds fine but produces a fatal error upon execution  :roll:

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
.xpm ?
« Reply #2 on: May 25, 2004, 12:31:48 pm »
Maybe since bitmaps internally use fpImage now, is it possible to load manually a BMP.
I haven't test it.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Ron

  • Guest
.xpm ?
« Reply #3 on: May 25, 2004, 07:58:10 pm »
Quote from: "Marc"
Maybe since bitmaps internally use fpImage now, is it possible to load manually a BMP.
I haven't test it.


I have tried to load .bmp and .xpm into TImage with no success. All that results is a blank TImage and a GPF crash on executiion.

Ron

  • Guest
.xpm ?
« Reply #4 on: May 25, 2004, 09:27:19 pm »
Quote from: "Marc"
Maybe since bitmaps internally use fpImage now, is it possible to load manually a BMP.
I haven't test it.


I have the documentation for the fpc, but can't find any reference to fpImage in the syntax references.  Can you post a link to documention of new fpc syntax?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
.xpm ?
« Reply #5 on: May 26, 2004, 01:36:58 pm »
I don't have it.
But for using the LCL, this doesn't matter. You'll still use TBitmap.
I don't know how mature the TBitmap implementation on win32 is.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
.xpm ?
« Reply #6 on: May 27, 2004, 01:25:15 am »
Quote from: "Marc"
..I don't know how mature the TBitmap implementation on win32 is.


Apparently, not very. The forms and dialogs to load a pic at design time exist within TImage.. but they don't do anything. In fact, at the moment they are a booby-trap 'cause if one tries to use them, the resulting app compiles and links fine but blows up with a General Protection Fault upon execution.

It's been report in Bug Tracking. Hopefully soon.. but I see unresolved bugs dated 2001!  :(

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
.xpm ?
« Reply #7 on: May 27, 2004, 09:09:55 am »
Quote from: "Ron"
Hopefully soon.. but I see unresolved bugs dated 2001!  :(

He, don't make it worse then it is.:roll:There is only one bug from 2001.  It that was in gtk fort windows, which has been replaced since then in favour of a native win32 widgetset.