Skip to content

Refit ImageSharp again#2098

Closed
VisualMelon wants to merge 1 commit intooxyplot:developfrom
VisualMelon:imagesharp_refit
Closed

Refit ImageSharp again#2098
VisualMelon wants to merge 1 commit intooxyplot:developfrom
VisualMelon:imagesharp_refit

Conversation

@VisualMelon
Copy link
Contributor

@VisualMelon VisualMelon commented Aug 16, 2024

(I need to rebase against develop and a few other things, so this is very much a WIP: don't bother reviewing it yet)

ImageSharp is out of beta, and the old libraries have listed vulnerabilities, so this bumps everything to the latest versions.

This requires targeting net6.0, so we lose netstandard and netframework support.

Checklist

  • I have included examples or tests
  • I have updated the change log
  • I am listed in the CONTRIBUTORS file
  • I have cleaned up the commit history (use rebase and squash)

Just done a very quick refit so far, and doesn't look painful.

Outstanding issues:

  • Not tested properly yet, though the tests run and at least some of them produce recognisable figures
  • DrawImage doesn't work: may be possible to significantly simplify the method as there are some useful looking DrawImage overloads in ImageSharp now (though AFAIKT none that does the job in one)
    • Images render in the wrong place (e.g. PlotBackgroundInterpolated test)
    • I commented out the code that was responsible for nice edges on interpolated plots because the interface for changing individual pixels has gone away, so that's probably broken (maybe PlotBackgroundInterpolated again: dark edge suggests it's interpolating black: may be new graphics options to deal with this)
  • DrawText uses a hideous hard-coded path length because the old methods we used doesn't exist; may be that there is a nicer API for drawing text that doesn't involve laying out the glyphs etc. as is probably necessary for proper emoji support

@oxyplot/admins

@VisualMelon
Copy link
Contributor Author

Looks like we don't need to go to 3 yet; can just bump the drawing package to 1.0.0. Opened #2099 ; won't scrub this branch because it might be useful later on

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.

1 participant