Skip to content

IronDrawing - Convert Bitmap to AnyBitmap throws System.InvalidCastException#107

Merged
first-ironsoftware merged 8 commits intodevelopfrom
DW-11-iron-drawing-convert-bitmap-to-any-bitmap-throw-system-invalid-cast-exception
Jun 17, 2024
Merged

IronDrawing - Convert Bitmap to AnyBitmap throws System.InvalidCastException#107
first-ironsoftware merged 8 commits intodevelopfrom
DW-11-iron-drawing-convert-bitmap-to-any-bitmap-throw-system-invalid-cast-exception

Conversation

@bline-ironsoftware
Copy link
Copy Markdown
Member

Title

IronDrawing converts bitmap to AnyBitmap throws system invalid cast exception

Description

When using Convert.ChangeType to convert other bitmap formats to AnyBitmap, need to implement the IConvertible interface. However, I converted the other bitmap formats to System.Drawing.Bitmap and directly assigned into AnyBitmap.

  • Added one unit test

Fixes #(issue number)
[DW - 11] IronDrawing - Convert Bitmap to AnyBitmap throws System.InvalidCastException

Type of change

Please select the relevant option by placing an 'x' inside the brackets, like this: [x].

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🏗️ Internal/structural update (non-breaking change that improves code quality, organization, or performance)
  • 📚 This change requires a documentation update
  • 🚀 DevOps build chain modification for release
  • 🤖 DevOps build chain modification for CI

How Has This Been Tested?

RUN IronDrawing PR Validation

Checklist:

Please run through the checklist as much as possible and mark the items completed by placing an 'x' inside the brackets, like this: [x].

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully run all unit tests on Windows
  • I have successfully run all unit tests on Linux

Copy link
Copy Markdown
Member

@mee-ironsoftware mee-ironsoftware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check out my comment.

Copy link
Copy Markdown
Contributor

@first-ironsoftware first-ironsoftware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@first-ironsoftware first-ironsoftware dismissed mee-ironsoftware’s stale review June 17, 2024 07:35

I only dismiss this change request because Meee already confirmed that if this has been changed, the PR can be merged. Also he's on leave at the moment which prevent him from approving the change made further

@first-ironsoftware first-ironsoftware merged commit 23236a2 into develop Jun 17, 2024
@first-ironsoftware first-ironsoftware deleted the DW-11-iron-drawing-convert-bitmap-to-any-bitmap-throw-system-invalid-cast-exception branch June 17, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants