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

'' is an unsupported type #1360

Closed
alexkozler opened this issue Sep 24, 2020 · 3 comments
Closed

'' is an unsupported type #1360

alexkozler opened this issue Sep 24, 2020 · 3 comments

Comments

@alexkozler
Copy link

.NET Framework 4.7
ImageSharp version 1.0.1

This code worked fine in 1.0.0-beta0007 and I'm not 100% sure what's changed, and I didn't see anything too obvious in the release notes that would indicate why this is happening. I am basically just declaring a "default" image format and then letting the Image.Load() overwrite that with whatever it finds.

Dim outFormat As IImageFormat = JpegFormat.Instance
	Using img = SixLabors.ImageSharp.Image.Load(Of Rgba32)(imgBytes, format:=outFormat)
End Using
@antonfirsov
Copy link
Member

Duplicate of #1202 Please upvote that issue, and see the discussion there.

@antonfirsov
Copy link
Member

antonfirsov commented Sep 24, 2020

@alexthekid07 can't you use the non-generic Image class introduced in beta 7? Do you really need to work with Rgba32 in your use-case?

If yes, all you need is to remove the type argument:

Dim outFormat As IImageFormat = JpegFormat.Instance

Using img = SixLabors.ImageSharp.Image.Load(imgBytes, format:=outFormat)
End Using

@alexkozler
Copy link
Author

alexkozler commented Sep 24, 2020

@antonfirsov You're absolutely right, not specifying Rgba32 fixes it. I don't really have any specific need for that, I had just had Rgba32 left over from previous versions of the beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants