1. Win32Lib How To?

Okay, I ran a Win32Lib proggie on another PC and it complained about not
finding a bmp file in a particular folder. When I created the window, I had
assumed that the graphic was somehow made a part of the whole thing and
wasn't required as an external file. So, how would I go about adding it to
my program so that it is included automatically, without the need for a
separate file?

Thanks!

-ck

new topic     » topic index » view message » categorize

2. Re: Win32Lib How To?

----- Original Message ----- 
From: "C. K. Lester" <cklester at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Subject: Win32Lib How To?


> 
> 
> Okay, I ran a Win32Lib proggie on another PC and it complained about not
> finding a bmp file in a particular folder. When I created the window, I had
> assumed that the graphic was somehow made a part of the whole thing and
> wasn't required as an external file. So, how would I go about adding it to
> my program so that it is included automatically, without the need for a
> separate file?
> 

I assume by "When I created the window" you really mean 'when you ran Bind for
the application' because Windows are created at runtime, and you seem to be
talking about distributing your application - so I assume you are binding it.

Anyhow, if you application specifically references a bitmap file in your code
then you need to supply that bitmap when you distribute the program. This is the
same with all programs whether they are written with win32lib or Delphi or VB or
whatever...

If you don't wish to do this, you need to convert the bitmap into an XPM format
and then embed that in you code, which would then use it rather than the original
bitmap file. This only works for bitmaps up to 256 colors.

Unfortunately I don't have any utilitities to do this sort of conversion of
bitmaps to XPM format. Maybe somebody else can help there or maybe even suggest a
better method of doing this.

I get around this issue by just distributing bitmaps with my applications.

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32Lib How To?

> > Okay, I ran a Win32Lib proggie on another PC and it complained about not
> > finding a bmp file in a particular folder. When I created the window, I
had
> > assumed that the graphic was somehow made a part of the whole thing and
> > wasn't required as an external file. So, how would I go about adding it
to
> > my program so that it is included automatically, without the need for a
> > separate file?
>
> I assume by "When I created the window" you really mean 'when you ran
> Bind for the application' because Windows are created at runtime, and you
> seem to be talking about distributing your application - so I assume you
are binding it.

I really meant, "When I created this window using the IDE and put a graphic
on it, I assumed that the graphic would be made an intrinsic part of the
window itself..." [Judith, maybe you can work this out somehow, such that
when an image is placed on a window it will be created as a sequence
resource or something so that the original BMP is not required as a separate
file...] I don't ask for much! :)

> Anyhow, if you application specifically references a bitmap file in
> your code then you need to supply that bitmap when you distribute
> the program. This is the same with all programs whether they are
> written with win32lib or Delphi or VB or whatever...

Yeah, but I don't want to do that. It's a simple program with a start-up
title screen...

> If you don't wish to do this, you need to convert the bitmap into an
> XPM format and then embed that in you code, which would then use
> it rather than the original bitmap file. This only works for bitmaps up to
256 colors.

That's what I thought and just needed confirmation.

> Unfortunately I don't have any utilitities to do this sort of conversion
> of bitmaps to XPM format. Maybe somebody else can help there or
> maybe even suggest a better method of doing this.

Yeah, does anybody got something for this? I'm going to check the library,
'cuz I know somebody has a BMP to sequence program out there.

> I get around this issue by just distributing bitmaps with my applications.

Well, I also distribute this program on a floppy disk and need all the space
I can get... :)

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32Lib How To?

----- Original Message ----- 
From: "C. K. Lester" <cklester at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Win32Lib How To?


> 
> 
> Derek Parnell wrote:
> 
> > If you don't wish to do this, you need to convert
> > the bitmap into an XPM format and then embed that
> > in your code, which would then use it rather than
> > the original bitmap file. This only works for
> > bitmaps up to 256 colors. 
> > 
> > Unfortunately I don't have any utilitities to do
> > this sort of conversion of bitmaps to XPM format.
> 
> LOL! hmmmmm...
> 
> Well, I found this handy little library called Win32Lib. I read in the 
> HTML docs a section on using XPMs. In fact, there's a function or two, 
> namely, createXpm ( filename, euphoria bitmap ) and createXpmFromBmpFile 
> ( filename, euphoria bitmap ). Seems like they would help me convert 
> BMPs to XPMs...! :P
> 
> I don't know if they actually work. 

They do, but they work with EUPHORIA bitmaps and not Microsoft Bitmaps.

>I used Paint Shop Pro to convert the bitmap to XPM. 

Excellent. I thought there might be something out there.

>Now I just have to get it displayed in the window and 
> I'll be able to release the next version of my proggie!!!

The win32lib routines for XMP seem to work just fine so I guess you'll be okay.
Howevewr if your aim is to reduce size, then XMP can be just as big or bigger
than the equivalent BMP.
 
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu