Author Topic: Saving OS/2 icons - OS/2 icon format in 2017  (Read 18689 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Saving OS/2 icons - OS/2 icon format in 2017
« on: December 19, 2017, 11:14:07 pm »
Hi

Just checking some other forum thread I became with this issue I always have about OS/2 icons. If I would like to save an icon in OS/2 format in 2017, on a modern display and resolution, which format should I have to select on IconEditor ?

For example, I had been saving some Icons on "Independent Small Color Form", in 1.x format and at 128x128 (I don't care much about the file size). And I had been using both IconEdit and PMView .

I know that if I save it on 2.x format it will show fine on the desktop, but it will be broken on IconEdit (Seems to be a limitation on IconEdit).

What is your experience with OS/2 formatted icons?

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

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #1 on: December 20, 2017, 06:47:44 am »
I am no expert.  Everything I know is from my experience and trial and error.

To start, you need to create a good template.  I have attached a folder icon that I use for a template.  I believe someone far more knowledgeable than me created it.  I have attached a picture of the settings and icon sizes.  Each OS/2 icon can contain multiple size icons and each used for different display resolutions.  If done in one size, the operating system will try to do its best to render it in the size required for the display setting.  Hi resolutions use 40x40 and 20x20 icons.  The lower display settings such as 600x800 use the 32x32 and 16x16 icons.  I believe OS/2 can render in 64x64, however, I am not sure when the operating system would utilize it. It can be deleted from the grouping.

Using this template, the picture copied is pasted and rendered as it should be.   Any white or light grey edges will be rendered white when displayed by the operating system.  If you don't want a white edge, these pixels will need to be deleted or darkened.

I have found that PMView does the best job rendering 64x64 pngs to smaller sizes before copying to the icon editor.

I use PMView to a resize a 64x64 to 32x32 and then copy it the the 32x32 icon setting in the icon editor.  I do this for each size.

As you can see, doing and icon is a lot of work. I wish the icon editor could do 1/2 pixels. This would eliminate the rough edges that are found in OS/2 icons.

Remember, I am no expert.  I could have some of my facts wrong.  Feel free to correct me.

David

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #2 on: December 20, 2017, 06:48:52 am »
The picture

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #3 on: December 20, 2017, 06:36:11 pm »
I have attached a zip file containing a few of the icons I have created using this template in the past.  Enjoy. 

David

RickCHodgin

  • Guest
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #4 on: December 20, 2017, 07:15:41 pm »
I have attached a zip file containing a few of the icons I have created using this template in the past.  Enjoy. 

What is the license for using these icons?  Is it Public Domain?

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #5 on: December 20, 2017, 10:22:23 pm »
Rich

I created these icons anywhere from 4 to 7 years ago.  I haven't really done anything since until I started messing with a new xcenter shadow icon. The package itself is assorted.  Quite a few are strictly my design.  Some were created by me cropping something from an advertisement I liked, pasting, and modifying it to something that looked presentable under OS/2. Some are based on free PNGs.  Just about all have been modified, added to, or enhanced to make it work as an OS/2 icon.  I have hundreds I created for the eComstation eschemes.  eSchemes doesn't work under ArcaOS.   Anything I have always done is free for everyone and they can use, modify and enhance them anyway they want which makes things less complicated,
« Last Edit: December 20, 2017, 11:52:31 pm by David Graser »

ak120

  • Guest
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #6 on: December 20, 2017, 10:38:24 pm »
The picture
I cannot see any reason to use  24bit/Pixel for 16x16 sized icons? And for 80% of 20x20 sized icons it would be questionable.

It depends on the intended audience. For desktop usage OS/2 2.x recommends 5 different units (covered by the mentioned Icon Editor) and OS/2 Warp adds 2 additional units. It should follow the CUA style guide. It doesn't differ much from Mac, Motif or Windows.

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #7 on: December 20, 2017, 11:35:08 pm »
The picture
I cannot see any reason to use  24bit/Pixel for 16x16 sized icons? And for 80% of 20x20 sized icons it would be questionable.

It depends on the intended audience. For desktop usage OS/2 2.x recommends 5 different units (covered by the mentioned Icon Editor) and OS/2 Warp adds 2 additional units. It should follow the CUA style guide. It doesn't differ much from Mac, Motif or Windows.

The problem occurs when the picture is pasted to the 16x16 and 20x20.  If that color is not in the palette, some off the wall color or colors are used.  Using 24bit, icon editor has no problem rendering the correct color(s).   However, you are correct in that it might much simplier to make the smaller icons with few colors.
« Last Edit: December 20, 2017, 11:45:44 pm by David Graser »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #8 on: December 21, 2017, 01:22:18 am »
One other problem, when icons are embedded in an application, is that hi-colour icons get corrupted if fed through lxlite. With Mozilla, we had to switch to 8 colour icons IIRC when we switched to linking with wlink and using lxlite to strip/compress the binaries.

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #9 on: December 21, 2017, 02:40:44 am »
One other problem, when icons are embedded in an application, is that hi-colour icons get corrupted if fed through lxlite. With Mozilla, we had to switch to 8 colour icons IIRC when we switched to linking with wlink and using lxlite to strip/compress the binaries.

Dave

You don't use bitmaps for the embedded graphics?  I know programs like FM/2 and Filstar 2 use embedded bmps.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #10 on: December 21, 2017, 03:33:22 am »
Things like the icon on your desktop is a plain icon, added to the executable as a resource, most of the rest are pngs.

ak120

  • Guest
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #11 on: December 21, 2017, 04:20:36 am »
The problem occurs when the picture is pasted to the 16x16 and 20x20.  If that color is not in the palette, some off the wall color or colors are used.
That's the correct behaviour for the System palette. No big difference under Windows. Good icon editors offer palette management functions. But it's about 196 and 324 different pixels (theoretically).

Quote
Using 24bit, icon editor has no problem rendering the correct color(s).   However, you are correct in that it might much simplier to make the smaller icons with few colors.
It depends on the display driver and the representation. Colour management can be tricky between Windows/OS2 and Mac or UNIX.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #12 on: December 21, 2017, 03:12:05 pm »
Thanks for the replies.

For the moment it seems to me that David's suggestions is the best to maintain "IconEdit compatiblility". Even that an 128x128 icon may work (created with PMView) and displays on the screen, it generates some problems with IconEdit. So I guess I should stick to 32x32 as max for OS/2 icons.

IconEdit may open 128x128 icon but if you add more "devices", or try to save it as 2.0, it will start showing problems.

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

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +5/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #13 on: December 21, 2017, 08:27:36 pm »
In my experience, the best way to produce colour-accurate icons is to create them as 24-bit bitmaps first. This requires using a 'placeholder' background colour in place of what will end up as transparent areas (this should be a colour that doesn't otherwise appear in the image; I normally use light magenta).

Then, open the bitmap in Embellish and convert it to Palette mode – this will down-convert it to 8-bit colour.  Embellish usually (about 95% of the time in my experience) does a better job of this than PMView, although it depends on the image.  Save the bitmap, preferably under a new filename.

Then, open the image in PMView. If it's not already cropped to the correct size, do so now (do NOT resize it, however, as this will undo the colour down-conversion and you'll have to repeat the previous step with Embellish again).  Then copy the image into the clipboard from PMView.  Open a blank icon file template which has the correct resolution already defined and selected (e.g. 40x40, 8-bit palette) and paste the image in.  Assuming the clipboard image dimensions exactly match the icon's image dimensions, the palette in Icon Editor will automatically be converted to match the image in the clipboard.  This only seems to work if you used PMView to copy the image – I'm guessing PMView knows how to add the palette information to the clipboard alongside the image.

Finally, in the Icon Editor, replace the placeholder colour with transparent background.

Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Re: Saving OS/2 icons - OS/2 icon format in 2017
« Reply #14 on: December 22, 2017, 02:11:55 pm »
I played a lot with IconEditor. With the right template you can go up to 256x256 icons. You can save them too, you can use them too, but OS/2 or eCS will downsize it to 40x40. So what's the point? Always work in 24 bit, even if its much less. Has to do with colors which are not in the palette and I refuse to make separate palettes for each icon. Usually it will take less then five minutes to make an icon with 16x16, 20x20, 32x32 and 40x40. You have to remember that in the editor things show ugly and rough, but as soon as it is started as an icon at the right size it looks rather smooth. I never got 2.0 working, somewhere in the editor its disabled. I'm working mostly with PMView and IconEditor, when it totally sucks I try Embellish > PMView > IconEditor. Key to good icons is go first to a square with sizes which can be divided to the right size. Example 256 > 128 > 64 >32 > 16 and 320> 160> 80> 40> 20. You can start bigger. If it isn't these value's or bigger,  first make it so in the highest resolution because you won't see the loss in the smaller one's. If you don't start with these sequence, its not necessary to start with 320, 256 or less, you will end up in the icon size with losses which will give rough edges or can damage the appealing factor. Mind that small things are not noticeable, so your icon must consist of simple things which are also recognizable when its 20x20 or 16x16.