Open artem1t opened 3 years ago
The following exception is thrown System.Exception: 'A Graphics object cannot be created from an image that has an indexed pixel format.' if using indexed pixel format image (256 color BMP) as an icon
256bitmap.zip
[ComVisible(true)] public class BitmapButtonsAddIn : Xarial.XCad.SolidWorks.SwAddInEx { [ComVisible(true)] public class PMPModel : SwPropertyManagerPageHandler { [BitmapButton(typeof(Resources), nameof(Resources._256bitmap), 64, 64)] public Action Button1 { get; set; } = () => { }; } private SwPropertyManagerPage<PMPModel> m_Page; public override void OnConnect() { m_Page = CreatePage<PMPModel>(); } }
The following exception is thrown System.Exception: 'A Graphics object cannot be created from an image that has an indexed pixel format.' if using indexed pixel format image (256 color BMP) as an icon
256bitmap.zip