1. Michael Connell
  2. PowerBuilder
  3. Monday, 8 May 2023 11:10 AM UTC

It would appear that PB cannot handle application icons with a transparent background. I'm guessing this is a bug.

I'm using version 2021, build 1509. Has this been fixed in later versions?

Regards,

Michael Connell.

Michael Connell Accepted Answer Pending Moderation
  1. Tuesday, 9 May 2023 14:26 PM UTC
  2. PowerBuilder
  3. # 1

Guys,

Thanks for all your help, especially the updated icon!

Not 100% sure that I understand what the problem is, but I've installed Gimp and I'll experiment a little.

Regards,

Michael.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 9 May 2023 08:31 AM UTC
  2. PowerBuilder
  3. # 2

As for what @Benjamin mentioned about compression, I'm not sure that PB cannot handle any compression. Real uncompressed size as the following one:

You can see that raw images are much larger than crasha.ico (147 KB) that I attached to my previous answer. So it may be that PB may "understand" some compression algorithms in ico files.

Andreas.

Comment
  1. Benjamin Gaesslein
  2. Tuesday, 9 May 2023 10:04 AM UTC
Most commonly, only the 256x256 version is compresses as PNG in icon files. That's what GIMP offers by default and IcoFX might do it that way, too. The rest add up to ~140KB, the PNG compressed 256x256 image is ~8KB. So the file size would fit. Since PB does not use the large version anywhere it poses no problem.
  1. Helpful 1
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 9 May 2023 08:24 AM UTC
  2. PowerBuilder
  3. # 3

Michael, I attach the crasha.ico which is same with the one you provided but saved using IcoFX. The one you provided doesn't work with PB.

Andreas.

Attachments (1)
Comment
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Tuesday, 9 May 2023 07:37 AM UTC
  2. PowerBuilder
  3. # 4

Andreas / Benjamin,

Thanks for your replies.

The test icon that you provided Andreas, worked fine.

Unfortunately, the original icon that caused all the problems has been modified to remove the transparent background. This original icon was created using an online converter (RedKetchup)

That said, I have found an icon that does crash PB and have included it here.

Thanks.

Michael.

 

 

Attachments (1)
Comment
  1. Benjamin Gaesslein
  2. Tuesday, 9 May 2023 08:03 AM UTC
.ico files can hold images in either BMP or PNG format. The problem here seems to PNG compression, not transparency. I suspect PB is only looking for uncompressed bitmaps inside the .ico file. In this file, all icon sizes are compressed as PNGs. Opening the file in GIMP and simply re-exporting without PNG compression makes the file work in Powerbuilder.
  1. Helpful 1
  1. Andreas Mykonios
  2. Tuesday, 9 May 2023 08:22 AM UTC
Benjamin I believe you are right. I use an old version of IcoFX to manipulate icons. When I open crach.ico provided by Michael and save it with IcoFX, size increases (from 28 KB to 147 KB). The new ico works fine with PB while the original one doesn't load (PB Crashes).

Andreas.
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Tuesday, 9 May 2023 07:11 AM UTC
  2. PowerBuilder
  3. # 5

Hi Michael,

can you upload the .ico file in question? That might make it easier to troubleshoot.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 13:15 PM UTC
  2. PowerBuilder
  3. # 6

I attach a test icon with transparent background that works fine for me in PB 2021 1509.

Andreas.

Attachments (1)
Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:56 PM UTC
  2. PowerBuilder
  3. # 7

This is strange. What tool are you using to create the ico file?

Andreas.

Comment
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:55 PM UTC
  2. PowerBuilder
  3. # 8

Andreas,

The last ico file we tried (without success) was:

16x16

32x32

48x48

32-bit depth.

Removing the transparent background was the only thing that appeared to work.

Michael.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:38 PM UTC
  2. PowerBuilder
  3. # 9

I asked dpi but the information I wanted was pixels x/y.

Icons I do use are 32 bits and contains following ico sizes (in pixels):

  • 16x16
  • 24x24
  • 32x32
  • 48x48
  • 256x256

I do believe that PB will use 32x32 and 16x16 flavors of that Icon. In the past I had issues using icons of 24x24 and 48x48 in menus. If your icon contains icon in multiple sizes (as I do) PB will automatically choose which on to use.

Andreas.

Comment
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:30 PM UTC
  2. PowerBuilder
  3. # 10

Andreas,

Sorry. DPI is 300.

Regards,

Michael Connell.

Comment
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:29 PM UTC
  2. PowerBuilder
  3. # 11

Andreas,

Colour depth is 32. Size is 28KB.

Regards,

Michael Connell.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 12:20 PM UTC
  2. PowerBuilder
  3. # 12

I do use icons with transparency in application object all the time. No issues. I do see it added in exe files. One application is in PB 2021 1509...

What size is your icon (dpi)? What color depth?

Andreas.

Comment
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 11:27 AM UTC
  2. PowerBuilder
  3. # 13

Andreas,

Thanks for your reply.

These are ico files used as the application Icon (edit application object -> Additional Properties -> Icon tabpage). They are placed in a sub-folder to the folder containing the application PBL's. 

Changing this attribute to an ico file with a transparent background brings down the entire IDE.

I too have used ico files with transparent backgrounds elsewhere without problem.

Regards,

Michael Connell.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 8 May 2023 11:19 AM UTC
  2. PowerBuilder
  3. # 14

Hi.

Are those icons ico files or png? Where are they placed? I ask because i use many icons with transparency without issues.

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.