Error about icons

A few days ago I switched from AutoCAD to BricsCAD V25. I have never used BricsCAD before so everything is very new!

I have a partial CUI that I used for many years that contains a ribbon and some toolbars. I loaded this partial CUI while setting up the new system. I have added personal file paths in settings. At this point everything, most things anyway, seem to be okay. My ribbon looks good.

Here is my issue: My customized icons, which are in the partial CUI, are shown correctly. Reviewing the "customize…" dialog (CUI editor) the file names are correct and obviously in a valid path. However each time I open BricsCAD (and it does run fine) I get an error message dialog box listing some twenty of my customized icons.

A typical two lines of the error:

6:23:19 AM: Couldn't load a PNG image - file is corrupted or not enough memory.
6:23:19 AM: Failed to load image: corner-V22.png

The icons for every one of the two dozen files listed in the error message are CORRECTLY shown in my ribbon and toolbars. So why an error?

I am a newbie so I probably didn't do something correctly.

How can I stop this error?

Comments

  • Possibly your image file extensions don't correspond with the actual format of the contained images. You can examine the first few characters of the file to determine the actual image format.

  • If the icons where created in AutoCAD, then it has the habit of naming files as PNG when the are in fact BMP.

  • @Jason Bourhill Thank you for your thoughts. I have not studied the "bad" file list to determine the age, source or history of the files. Some started out as an AutoCAD proprietary icons that, years ago, I exported and edited in either Paintshop or, more recently, PhotoShop. The icons have been revised to account for the various changes Autodesk made to backgrounds and any tweaking that I needed. Now I start with a blank icon in PhotoShop then export to .png. These icons have very varied lineage!

    @Owen Wengerd Thank you so much for your work with OpenDCL. I changed every old dcl used in my library of routines to OpenDCL.

    Your thought regarding the file data not matching the extension seems very likely. I certainly would like to clean up my data base but I have no idea how to "examine the first few characters" of an image file. If there is a mismatch what do I do. Just change the extension? Open it in PhotoShop and somehow convert it again?

  • Thanks for the kind words. You can open in a hex editor if you have one, or just use a plain text editor like Notepad. I don't have a ready link to information about the characters for various file formats, but I'm sure such information is available on the internet. Once you know the format, just change the file extension to match.

  • I opened a old bmp with notepad and 1st line is BM6 another BMi so looks like BM is a bmp.

  • I use Notepad++. Opening a bitmap file that is NOT in the error list starts with BM6 and another BM86. Opening a PNG file shows the first character as a strange symbol (I have not yet installed a HEX editor) and then the letters PNG. The PNG is followed by several blank lines before the data characters appear. Note that the bitmap file had no blank lines. I have no idea, yet, whether or not this is important. I need to do a lot more investigation.

    I have a boat-load of icons. I am a big fan of ribbon panels and toolbars. Sorry Alan I think you are a big menu user! 😄 I will have to go through all my icons to learn how to spot a good one vs a bad one.

    Thank you all for your help. Since the "error" icons are correctly shown in BriscCAD I have placed this "error message" problem way down on my to-do list. There are many more important things to fix.

  • I expect the solution for those bad icons is to change the file extension from .bmp → .png.

  • @Owen Wengerd There are over twenty png files in the "error list" and only four bmp files.

    The four bmp's were built-in AutoCAD icons that I exported to a bmp file using the CUI. I then edited those files with Photoshop and saved as a bmp. Who knows what left over junk is in those original ACAD.

    The png files have some header info that you can actually read, such as "Adobe" along with other stuff. I have to determine which png files that do not throw the error to see what the difference is. A task for another day!

  • 😀 I use toolbars making my own icons or using some of the inbuilt ones. I avoid the Ribbon as you have to use the CUI editor which I find a pain to use I have often thought about making Ribbon menus starting with say excel, I make mnu by using lisp to write as much code as possible, saves me typing. I don't know if you have ever done this, but if you look at a CUI file its xml code, so have often looked at it thought why not write a CUI file. If you look at a cuix make a copy of it then rename to .zip you can then look inside it, exposes all the xml files.

    Lastly there is software out there that will let you look inside exe and dll files so you can copy out the icons that you may want to use. Surprising what you can find.

    I think I had similar problems making icons needed to use BMP not PNG as I have clients with Autocad and it did not like the png icons.

    I use Paint.net for making icons just set to 32x32 pixels.

  • I use IrfanView to view images. This application will tell you if an image file has the wrong extension and offer to fix. You can also quickly flick through all the image files in a folder using your arrow keys.

    https://www.irfanview.com/

    I would try to update the images so they are PNG. Doing this will avoid having to update the CUI to rename the image references from PNG → BMP. Using PNG also allows you to define transparent backgrounds.

    BricsCAD's option to define an abbreviation instead of an image is quite useful when you have old images that don't display well on modern screen resolutions. Saves the hassle of creating a new image.

    I've also found that BricsCAD is very flexible on the size of image you use. You don't have to stick to 16x16 or 32x32 sizes. It will happily allow you to use images that are say 256 x 256.

    Jason Bourhill

    CAD Concepts Ltd

    cadconcepts.co.nz

  • @Jason Bourhill Thanks for the link. I will install and check the "error" icons. Right now I am testing all my lisp routines and adapting them to BicsCAD where necessary. So far easy fixes! I am very impressed with BricsCAD. The settings dialog is fantastic. In general customization is straight forward.