KQuickImageEditor is an image editing library for Qt Quick applications. It was created by fellow KDE developer Carl Schwan. It can crop/mirror/resize/rotate images, it has undo/redo history, and it comes with QML components that make it easy to set up a basic image editor. NeoChat and Photos (aka Koko) have used it since 2020 and 2021.Screenshot of KQuickImageEditor’s original UI and capabilities in NeoChatIn version 0.6, I added a new image editing system from Spectacle. On top of the existing features, the new system can draw shapes, write text, blur and pixelate. It will also be able to do a wide range of color adjustments soon (likely 0.7). Spectacle and Koko have been using the new image editing system since 2025. It was Spectacle’s to begin with, so you could say Spectacle has been using it since 2023. NeoChat and others might use the new system once the number of GUI components have expanded. The old image editing system will remain available for the foreseeable future so that apps using it will not break.Screenshot of KQuickImageEditor’s annotation capabilities in Spectacle. There isn’t just one UI anymore.My design philosophy for the new system is based on the idea that APIs should be minimal, but highly flexible by reusing existing components. It’s supposed to be like how you can buy a LEGO set and make many different things with the same pieces. For example, the upcoming color adjustment API takes a QMatrix4x4 to apply linear adjustments to RGB channels with the top 3 rows and non-linear/perspective adjustments with the 4th row. It’s just like using a QMatrix4x4 or mat4 (GLSL) for 3D graphics, except your dimensions are red, green and blue. I could have made the API just for brightness and contrast effects (to be used by Koko), but the choice to use a QMatrix4x4 means you can do a lot of things just with Qt’s existing APIs. From there, I can still add APIs to create 4×4 matrices for specific effects, but apps don’t need to wait for KQuickImageEditor to have an API for the color adjustment they need. They can make their own 4×4 matrices by applying general mathematical concepts.The core components of the new system are AnnotationDocument and AnnotationViewport. AnnotationDocument has all of the APIs for manipulating QImage objects and undo/redo history. AnnotationViewport is a custom QQuickItem subclass that can render images, update in response to changes from AnnotationDocument and provides QPainterPath/SVG path data for outlining annotations when using the selection tool. There are also a few QML components for features that most viewport implementations can be expected to implement the same way, such as outlines for annotations that are selected or hovered over. The only truly necessary part is AnnotationDocument. Although KQuickImageEditor is for Qt Quick apps, you could connect AnnotationDocument to a custom viewport made with Qt Widgets.At the moment, there aren’t many GUI components in the API because apps may have different needs and I don’t want to force the use of a particular UI. I might add standard action components for each tool type in the future to make setting up toolbars, floating toolbars or toolboxes easier, but there are still a lot of things to decide on before adding more visual GUI components to the API. There is a documentation website, but the documentation needs quite a lot of work, so reading the header files and looking at how Koko and Spectacle have used the system are currently the best ways to understand it.The API of the new annotation system is considered unstable. As an example, AnnotationDocument and AnnotationViewport have names that no longer match the scope of what they are for, so they might change before stabilizing the API. However, I don’t break apps on a whim. If the API or ABI has to have a breaking change, it will be communicated and there will be a path to prevent KDE apps on the Gear and Plasma release schedules from breaking in between their releases.Just so it’s clear, even the new image editing system is not supposed to compete with advanced image editing systems like what Krita and GIMP have. The exact scope is not firmly defined, but it’s pretty likely that certain features like layers or a wide variety of brushes will not be implemented.I intend to make more posts about the new image editing system and its history within Spectacle in the future.