Author Topic: PMView - converting ICO to OS/2 BMP...background options?  (Read 1002 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
PMView - converting ICO to OS/2 BMP...background options?
« on: January 06, 2021, 03:48:13 am »
I need to take a couple of ICO (icon) files and convert them to an OS/2 BMP format. Seems easy enough, right?

Well, my problem is that doing the conversion does not preserve the ICON's background transparency...why not?

Basically, the converted images all have WHITE background, which I need to avoid. I do know the actual colour of the background I need, but I would rather have a transparent background instead.

Any ideas? Is this caused by the OS/2 BMP format not supporting the alpha channel? (https://www.axialis.com/tutorials/tutorial-misc002.html)

So if transparent BMP is off the table, what's the easiest way for me to apply a particular colour as background to an ICO file so it's still preserved in the BMP image itself?

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 583
  • -Receive: 121
  • Posts: 3229
  • Karma: +25/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #1 on: January 06, 2021, 04:52:14 am »
Hi

Well, my problem is that doing the conversion does not preserve the ICON's background transparency...why not?

In my experience I have never seen a BPM file with transparency, but I may be wrong.

Is there a specific need for the need of BPM format with transparency? Can you use PNG ?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 219
  • Posts: 3077
  • Karma: +50/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #2 on: January 06, 2021, 05:15:35 am »
Load them in the icon editor and save with bmp as the suffix?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #3 on: January 06, 2021, 05:31:27 pm »
Hi Dave,

Load them in the icon editor and save with bmp as the suffix?

Well, you'd think this should not be a problem, right? Alas, no-go, the IconEditor I'm using here will not convert to another format (it's the Jan-2016 version one).

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #4 on: January 06, 2021, 05:41:21 pm »
Hi Martin,

...Is there a specific need for the need of BPM format with transparency? Can you use PNG ?...

I'm using Visual SlickEdit as my development IDE. Beyond something like Watcom, Borland C++ or IBM's VACPP, this is by far the most flexible way to cater to not just multiple C/C++ configurations, but also multiple languages.

As you can imagine our version (4.0b - c1999) is a bit old, and that only handles BMP images which can be used to customize the numerous IDE toolbars with. The newer versions on other platforms have switched to ICO images and PNG following that, we are stuck with BMP, and it has to be the OS/2 version as opposed to the Win one as well.

So I'm simply trying to add a few more customized options to the IDE's Toolbar, stuff that reflects our OS/2 specfic things. Now that I'm trying to do some updates to DISKIO and possibly porting stuff like fstrim, I figured I would bulk-up my IDE with the stuff I otherwise just used to jump to the CLI for, thus the need.

The good news is that the Toolbar has a consistent single-colour background, so if the BMP transparency is a no-go I'm just going to fill-in the otherwise transparent ICO background with the matching colour and save that as a BMP image.

Neil Waldhauer

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 57
  • Posts: 728
  • Karma: +13/-0
    • View Profile
    • Blonde Guy
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #5 on: January 07, 2021, 03:37:24 pm »
I'm also using that version of Visual SlickEdit. I didn't really think about customizing it. I'd be interested to hear more about how you enhance SlickEdit for OS/2
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andi B.

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 27
  • Posts: 573
  • Karma: +6/-1
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #6 on: January 07, 2021, 08:05:04 pm »
One of the first things I did when I started using SlickEdit more than a decade ago, was disabling the toolbar. For my way of working these icons only wastes screen space which is better used for code ;-)

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 37
  • Posts: 704
  • Karma: +9/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #7 on: January 08, 2021, 01:22:24 am »
Note that also Knut still has these VSlick kbuild macros online. (In the absence of that editor, I had installed that on an NT 4 version and it had worked. Don't remember what it does, but at least there were menu enhancements. Check the sources yourself.)

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 219
  • Posts: 3077
  • Karma: +50/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #8 on: January 08, 2021, 03:45:36 am »
Where to download Slickedit? Their site doesn't list the old OS/2 version and Hobbes just has an update to 4.0b.

Alex Taylor

  • Sr. Member
  • ****
  • Thank You
  • -Given: 12
  • -Receive: 19
  • Posts: 293
  • Karma: +0/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #9 on: January 08, 2021, 04:54:58 am »
I need to take a couple of ICO (icon) files and convert them to an OS/2 BMP format. Seems easy enough, right?

Well, my problem is that doing the conversion does not preserve the ICON's background transparency...why not?

That's because unlike ICO, the BMP format doesn't support transparency.


Quote
So if transparent BMP is off the table, what's the easiest way for me to apply a particular colour as background to an ICO file so it's still preserved in the BMP image itself?

Sure. Open the Icon Editor, choose File -> New and select the Bitmap format, with a size identical to the icon you want.  Then open the icon in another instance of Icon Editor, use the fill tool to fill in the background colour you want, and then choose Edit -> Select All and Edit -> Copy, then paste it into the instance which has the bitmap open. Then save the bitmap.


Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #10 on: January 08, 2021, 05:30:04 am »
Hi Alex,

Quote
So if transparent BMP is off the table, what's the easiest way for me to apply a particular colour as background to an ICO file so it's still preserved in the BMP image itself?

Sure. Open the Icon Editor, choose File -> New and select the Bitmap format, with a size identical to the icon you want.  Then open the icon in another instance of Icon Editor, use the fill tool to fill in the background colour you want, and then choose Edit -> Select All and Edit -> Copy, then paste it into the instance which has the bitmap open. Then save the bitmap.

Great suggestion as that by-passes a whole bunch of other work. As it turned out this is precisely what I ended up doing as i started to play with the Icon Editor and the various formats AND how each one is being used.

While I got my VSE stuff all configured now, can anyone recommend a source of good information/reading on the subject of our OS/2 ICO formats?

I ask this because I never knew just how many different DEVICEs can be defined in the lowly ICO image. As I dug deeper and deeper into this I started to make more sense of it, which is how I ended up figuring out the process that Alex suggested above.

In particular what has always bothered me is that lSwitcher is missing icons for certain tasks, or to be more precise, it uses a default Program icon, which is just the white canvas. I am guessing it must be looking for a specific DEVICE format in the ICO file itself...???

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #11 on: January 08, 2021, 05:34:45 am »
Dave,

Where to download Slickedit? Their site doesn't list the old OS/2 version and Hobbes just has an update to 4.0b.

They never released their product despite the fact it went dead for OS/2 and was much outdated as compared to the other platforms. I had actually started what felt like a good conversation on this topic with them a few years back but after numerous emails it came down to "unable to release a product on a dead platform that is an active product on other platforms".

Now, having said that...I had bought a license way back when, and have loved using this IDE. Professionally when I used to write code this was my "baby"...I loved it!

Does any of that abandon-ware type constructs apply here???

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #12 on: January 09, 2021, 04:59:13 pm »
Hey Neil,

I'm also using that version of Visual SlickEdit. I didn't really think about customizing it. I'd be interested to hear more about how you enhance SlickEdit for OS/2

I'll start another thread in the Programming area to document my setups. Nothing extraordinary, but I would love to collaborate on how to enhance VSE further. In particular, I think some of the gaps could be closed out by developing macros.

Here are a couple of simple examples:

1) DOS prompt
The one included in VSE simply opens up a regular 80x20 window...heck, too tiny...I've re-configured just about all of my CLI stuff to give a nice 80,60 window...so how the heck can I enable/re-configure the VSE DOS command to do that?

2) GitHub
Is it possible to extend the source control check-in/check-out functionality to something like GitHub? I have CVS setup at the moment, but SVN has been in my pipeline for a while now, both of these however being LOCAL repos...so how to scale this up to remote? I just haven't done anything else with this...could be a simple CLI parameter?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 29
  • Posts: 965
  • Karma: +18/-0
    • View Profile
Re: PMView - converting ICO to OS/2 BMP...background options?
« Reply #13 on: January 09, 2021, 05:02:51 pm »
Hi Andi,

One of the first things I did when I started using SlickEdit more than a decade ago, was disabling the toolbar. For my way of working these icons only wastes screen space which is better used for code ;-)

Wow...no way man...if I can click on an icon and hopefully that does an equivalent of several actions for me...heck, I'll take that anytime. Now I do have the comfort of running my current OS/2 setup in a dual-screen mode...so plenty of real-estate. Most recently that was very handy when digesting the DISKIO logic...nothing beats multiple source listings, including the CFLOW digest of the source!

OK, having said that, I am literally using a single toolbar at the very top (right beneath the Menu Bar) and that has all my customizations baked in.