It's been a while since I wrote an article about screenshot controls. With the new upgrade of the screenshot control, let me introduce Niuniu Screenshot to everyone!
As you know, we have high requirements for the functionality, ease of use, and user experience of screenshot controls. Here is a summary:
-
Capability: We support multiple displays, high-definition screen DPI enlargement support, automatic recognition of window regions, multi-language support, and many other capabilities that most screenshot controls do not have.
-
Drawing function: We support rectangle, circle, brush, highlighter, mosaic, text, and many other functions. Additionally, we have practical and high-value capabilities such as secondary editing of drawings, text and image watermarks, and custom toolbar extension.
-
Integration capability: We support integration into any browser and integration into any desktop software.
-
Platform compatibility: We support all mainstream operating systems such as Windows, macOS, and Linux, as well as compatibility with different architectures of domestic operating systems.
Today, our screenshot control goes further by adding a feature that everyone loves - long screenshot. Hope you like it!
Principle
Long screenshot, as the name suggests, allows you to select a limited area, and then use the mouse to scroll, capturing the originally hidden area, and finally merging it into a complete long image. It has a wide range of applications, such as information sharing, evidence fixation, data archiving, and more.
From the early technical research, testing, to later feature development and integration, and finally detailed refinement, compatibility optimization, and other processes, we spent more than half a month. Looking back, the principle and process are roughly as follows:
-
Utilize the existing screenshot area selection function to select the area to be captured for a long screenshot.
-
Click the designated button on the toolbar to trigger the long screenshot function, periodically capture the selected area's image, and simultaneously trigger scrolling down the scrollbar (in practical applications, scrolling can be manual instead of automatic).
-
Grayscale each captured image in memory using OpenCV, then match adjacent two images using pattern matching, mark the overlapping area, and merge the two images after removing the overlapping area. Since the width of the images is the same, only overlapping factors on the height need to be considered.
-
Stop the long screenshot, copy the finally synthesized image to the clipboard, and integrate it with the original screenshot process.
In principle, it's not too difficult, mainly focusing on performance, memory, compatibility, and optimization of the user experience.
Usage Method
Currently, we have launched the desktop version control for Windows and the browser version control. If you like, you can experience it on our website. The general process is as follows:
-
Open https://ggniu.com/screencapture/onlinedemo/
-
Click on "More personalized options," select "Display the pre-screenshot window" (because it is a browser page for testing, the window to be captured may be covered by the browser, so apply this function), click the screenshot button, and install the new version control as prompted.
-
After calling out the screenshot function, select the specified window area, making sure not to select an area that won't scroll (using our website page as an example).
-
Click the long screenshot button on the toolbar. At this point, the target window area starts scrolling, and the long screenshot function is in progress.
-
Click finish to stop the long screenshot. The captured image will be displayed on the browser page.
The complete operation process is as follows:
The image saved from the entire long screenshot process is as follows:
The desktop version control test can be downloaded from the following link:
http://ggniu.com/download/NiuniuCapture.zip
Epilogue
Currently, we have only implemented the long screenshot feature on the Windows platform. The long screenshot feature on Linux and macOS platforms is under development, so stay tuned!
Since the launch of Niuniu Screenshot in 2014, nine years have passed. The future road is still long, and we will continue to forge ahead! The launch of new features is not the end; we will continue to iterate and optimize, striving to create the best screenshot experience on the entire web!