Progress on nip4
Published on October 19, 2024 by John Cupitt
libvips.org OpenCollective has generously given me a year of funding to complete nip4. This is an update of the libvips GUI, nip2, to the gtk4 toolkit, and to the vips8 API.
nip2 was written between about 1997 and 2003 and depends on a lot of frameworks from the period. These are becoming extremely elderly now, and nip2 is becoming difficult to maintain. It's also looking increasingly old-fashioned.
nip4 is hoping to fix this. It has the following goals:
nip2 was written between about 1997 and 2003 and depends on a lot of frameworks from the period. These are becoming extremely elderly now, and nip2 is becoming difficult to maintain. It's also looking increasingly old-fashioned.
nip4 is hoping to fix this. It has the following goals:
- Update from the gtk2 GUI toolkit to gtk4, the current version. This is a lot of work -- the drawing model is completely different, and there are many, many changes in best practice. As a test, I updated vipsdisp to gtk4. The image display widget in this viewer is the thing that will display images in nip4.
- Switch to the vips8 API. We rewrote libvips to make vips8 between about 2010 and 2015, but nip2 was obviously stuck on the old vips7 API. nip4 has removed all the old vips7 code and redesigned for vips8. It's the last large-scale user of vips7, as far as I know, so completing nip4 will let us build libvips with deprecated code removed by default.
- Complete backwards compatibility. nip4 aims to be able to run the whole of the nip2 test suite unmodified.
- Prettier, simpler, faster, modernised.
nip4 is now loading the first 5 test workspaces correctly. The big change from the UI point of view is full animation for interactions. Everything sides around as you work:
Next steps:
- Get all the old nip2 test workspaces loading. This will involve implementing a few more workspace widgets. Plotting is probably the most work.
- Finish drag - drop and copy - paste. It's only half-there right now.
- Add the toolkit menu and browser. This will probably be a bar down the left.
- Perhaps implement a cut down and polished version of the programming and debugging interface from nip2.
- UI for per-workspace definitions needs to go in.
- The image processing menus are all currently designed around vips7. A new set of vips8 menus could be a useful simplification.
- Do windows and mac builds. We have win and mac builds for vipsdisp done already.
And I think that would be enough for a release, hopefully in the first half of 2025.