Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing .NET Framework Methods #12461

Open
donr484 opened this issue Nov 11, 2024 · 4 comments
Open

Missing .NET Framework Methods #12461

donr484 opened this issue Nov 11, 2024 · 4 comments
Assignees
Labels
area-System.Drawing System.Drawing issues
Milestone

Comments

@donr484
Copy link

donr484 commented Nov 11, 2024

Type of issue

Code doesn't work

Description

I have older third party dlls that are calling methods of System.Drawing.Bitmap, like FromGDIplus(), which are missing in the System.Drawing.Common nuget package for .NET 8. Is there some reason the Bitmap class is not inheritable and not partial? I have been trying to figure out a way to add missing methods myself, but I cannot modify the calling dll to use a custom class. It has to be in the System.Drawing.Bitmap class. Since the method is static, I cannot use an extension method. Since the method doesn't exist, I cannot redirect. It would be nice if all the functionality from .NET Framework was ported to the latest .NET. Is there anything I can do or am I stuck on .NET Framework forever with these dlls?

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.drawing.bitmap?view=windowsdesktop-8.0&viewFallbackFrom=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Drawing/Bitmap.xml

Document Version Independent Id

dd2df450-62f2-6761-db08-bc4fd8bb1907

Article author

@dotnet-bot

@dotnet-policy-service dotnet-policy-service bot added the untriaged The team needs to look at this issue in the next triage label Nov 11, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-System.Drawing System.Drawing issues label Nov 11, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-drawing

@ViktorHofer
Copy link
Member

cc @JeremyKuhne

@JeremyKuhne JeremyKuhne transferred this issue from dotnet/dotnet-api-docs Nov 11, 2024
@JeremyKuhne
Copy link
Member

JeremyKuhne commented Nov 11, 2024

@donr484 the method you're talking about was not public (and we do not support calling non-public members). That said, I have approval for something similar to be made public:

#8833

I didn't think that someone would want to be creating a bitmap this way, but it fits the general pattern. Can you clarify your scenario and the types of wrapper objects you're creating? I don't mind adding new public API, it just wasn't super high on the priority list as I was only needing them for internal purposes.

As far as making internals match old versions that isn't something we can do, though.

@JeremyKuhne JeremyKuhne self-assigned this Nov 11, 2024
@JeremyKuhne JeremyKuhne added this to the .NET 10.0 milestone Nov 11, 2024
@donr484
Copy link
Author

donr484 commented Nov 11, 2024

Thanks for the response. I understand it isn't supported, but it was used anyway for some reason by these third party dlls. The missing method is like 3 lines of code, assuming what that method calls is still present in the Bitmap class.

Unfortunately I have no access to the source code of those third party dlls. The missing method was used internally by them. They have newer versions now of course, but the licensing is much more costly. I ran into the missing bitmap method when the third party dll tried to extract an embedded image displayed on a page in a pdf.

If the method can't be added, I'll just have to start over with new libraries or keep using .net framework. The functionality revolves around imaging, pdfs, and barcodes. It would be nice if .net had pdf and barcode functionality built in. It's always a struggle to find something to fill that void in .net.

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Drawing System.Drawing issues
Projects
None yet
Development

No branches or pull requests

4 participants