CN111381752B - Screen capturing method and device, storage medium and terminal - Google Patents

Screen capturing method and device, storage medium and terminal Download PDF

Info

Publication number
CN111381752B
CN111381752B CN202010137490.5A CN202010137490A CN111381752B CN 111381752 B CN111381752 B CN 111381752B CN 202010137490 A CN202010137490 A CN 202010137490A CN 111381752 B CN111381752 B CN 111381752B
Authority
CN
China
Prior art keywords
bitmap
screen
description table
equipment
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010137490.5A
Other languages
Chinese (zh)
Other versions
CN111381752A (en
Inventor
朱玉荣
张轶君
刘洪献
张芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Wenxiang Technology Co.,Ltd.
Original Assignee
Anhui Wenxiang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Wenxiang Technology Co ltd filed Critical Anhui Wenxiang Technology Co ltd
Priority to CN202010137490.5A priority Critical patent/CN111381752B/en
Publication of CN111381752A publication Critical patent/CN111381752A/en
Application granted granted Critical
Publication of CN111381752B publication Critical patent/CN111381752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/84Protecting input, output or interconnection devices output devices, e.g. displays or monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a screen capturing method, a screen capturing device, a storage medium and a terminal, wherein the method comprises the following steps: modifying the color matching scheme of the equipment where the software of the user is located; adjusting the transparency of the software window; creating an equipment description table and a bitmap of equipment where own software is located; and capturing screen image data according to the equipment description table and the bitmap to obtain a screen image with the software image removed. According to the screen capture method, the device, the storage medium and the terminal provided by the embodiment of the invention, the color scheme of the device and the transparency of the window of the software are adjusted by determining the device where the software is located, and then the screen or desktop image is captured by creating the device description table and the bitmap, so that the software or the window is hidden. In addition, the screen capture method provided by the embodiment of the invention can be used in a Windows system, and can be used for removing the window image of the user when capturing the screen, so as to prevent infinite nesting and hiding the content of the window which the user does not want to see.

Description

Screen capturing method and device, storage medium and terminal
Technical Field
The invention relates to the technical field of image processing, in particular to a screen capturing method, a screen capturing device, a storage medium and a terminal.
Background
With the development of internet technology, the application of the internet is more and more extensive, and the functions are more and more powerful. People can learn and entertain through the internet, etc. Therefore, some learning or entertainment items such as online education, game live broadcast and the like based on the internet technology are produced. In these scenarios, the live player is often required to broadcast his/her screen to other users for learning and viewing.
However, in the live broadcast, the software of the live broadcast person may need to be displayed on the desktop due to the requirements of text chat, teaching plan viewing, file transmission and the like, and the live broadcast person does not want the pictures to be seen by other users. In addition, in the live broadcast process of a live broadcast person, software of the live broadcast person needs to display back the captured desktop picture to ensure that the live broadcast content is accurate, or the software of the live broadcast person has a function similar to that of a director, so that infinitely nested pictures can be generated and cannot be watched.
Disclosure of Invention
In view of this, embodiments of the present invention provide a screen capture method, an apparatus, a storage medium, and a terminal, so as to solve the technical problem in the prior art that a software image of a user is seen by other users during a live screen broadcast process.
The technical scheme provided by the invention is as follows:
the first aspect of the embodiments of the present invention provides a screen capture method, including the following steps: modifying the color matching scheme of the equipment where the software of the user is located; adjusting the transparency of the software window; creating an equipment description table and a bitmap of the equipment where the software is located; and capturing screen image data according to the equipment description table and the bitmap to obtain a screen image with the software image removed.
Further, the color scheme of the device where the software is located is modified, which includes: judging whether the current desktop window manager is in an enabling state; when the desktop window manager is in the enabling state, an enabling function is called to modify the current desktop window manager into a forbidden state; when not in the enabled state, the original state of the current desktop window manager is maintained.
Further, creating an equipment description table and a bitmap of the equipment where the software is located includes: acquiring an equipment description table of equipment where self software is located; creating a bitmap compatible with the device description table, wherein the bitmap comprises link data for acquiring a screen image data memory and data in a specified screen image data format; and replacing the original bitmap according to the device description table and the bitmap, and storing the original bitmap.
Further, capturing screen image data according to the device description table and the bitmap, comprising: creating a temporary device description table; uploading the acquired screen image data to the temporary equipment description table; storing the uploaded screen image data according to the link data in the bitmap; destroying the temporary device description table.
Further, after capturing screen image data according to the device description table and the bitmap, the method further includes: restoring the replaced bitmap according to the original bitmap; destroying the created device description table and the bitmap for destroying.
A second aspect of an embodiment of the present invention provides a screen capture device, including: the color matching modification module is used for modifying the color matching scheme of the equipment where the software of the user is located; the transparency adjusting module is used for adjusting the transparency of the software window per se; the creating module is used for creating an equipment description table and a bitmap of the equipment where the software is located; and the capturing module is used for capturing screen image data according to the equipment description table and the bitmap to obtain a screen image from which the software image is removed.
Further, the color matching modification module comprises: the judging module is used for judging whether the current desktop window manager is in an enabling state or not; the first forbidding module is used for calling an enabling function to modify the current desktop window manager into a forbidding state when the first forbidding module is in the enabling state; and the second disabling module is used for keeping the original state of the current desktop window manager when the current desktop window manager is not in the enabling state.
Further, the creating module includes: the acquisition module is used for acquiring an equipment description table of equipment where the software of the acquisition module is located; the creating submodule is used for creating a bitmap compatible with the equipment description table, and the bitmap comprises link data used for acquiring a screen image data memory and data in a specified screen image data format; and the replacing module is used for replacing the original bitmap according to the equipment description table and the bitmap and storing the original bitmap.
A third aspect of the embodiments of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause the computer to execute the screen capture method according to any one of the first aspect and the first aspect of the embodiments of the present invention.
A fourth aspect of the embodiments of the present invention provides a screen capture terminal, including: the screen capturing device comprises a memory and a processor, wherein the memory and the processor are connected with each other in a communication mode, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the screen capturing method according to the first aspect and any one of the first aspect of the embodiments of the invention.
The technical scheme provided by the invention has the following effects:
according to the screen capture method, the device, the storage medium and the terminal provided by the embodiment of the invention, the color scheme of the equipment and the transparency of the software window are adjusted by determining the equipment where the software is located, and then the screen or desktop image is captured by creating the equipment description table and the bitmap, because the color scheme of the equipment and the transparency of the software window are adjusted; while in windows7 Basic color schemes, a translucent window is not captured when HDC BitBlt is used to capture a desktop or region. Therefore, in the screen image captured by the screen capturing method, the image of the software per se disappears, and the software per se or the window per se is hidden. In addition, the screen capture method provided by the embodiment of the invention can be used in a Windows system, and can be used for removing the window image of the user when capturing the screen, so as to prevent infinite nesting and hiding the content of the window which the user does not want to see.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a screen capture method according to an embodiment of the invention;
FIG. 2 is a flow diagram of a screen capture method according to another embodiment of the invention;
FIG. 3 is a block diagram of a screen capture device according to an embodiment of the present invention;
FIG. 4 is a block diagram of a screen capture device according to another embodiment of the present invention;
FIG. 5 is a block diagram of a screen capture device according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a computer-readable storage medium provided according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a screen capture terminal provided according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Currently, in a Windows system, there are many methods for capturing a screen of a current desktop, and a GDI (Graphics Device Interface) is commonly used, and besides, a screen can be captured by using a ddr and dxgi (supported by a system above Windows 7).
The GDI is mainly responsible for information exchange between the system and the drawing program and processes graphics and image output of all Windows programs. The GDI enables programmers to convert the output of the application program into the output and the composition of the hardware equipment without paying attention to the hardware equipment and the normal driving of the equipment, realizes the isolation of a program developer and the hardware equipment, and greatly facilitates the development work. Therefore, the screen capture for removing the self software image provided by the embodiment of the invention can be realized by adopting GDI.
The embodiment of the invention provides a screen capturing method, which comprises the following steps of:
step S101: and modifying the color scheme of the equipment where the software is located. After the device where the software is located is determined, the color scheme of the device can be modified; specifically, the primary process of modifying the color scheme is to implement a disabled DWM. Wherein dwm. exe is the system process defined by Microsoft for its Windows 7/Vista operating system, and is associated with the desktop. Desktop Composition for DWM is a new feature built on the basis of Composition engines. The visual effects provided are frosted glass frames, 3D window transform animation, window flipping and high resolution support.
In one embodiment, disabling the DWM process may be accomplished by first calling the DwmIsComplexionEnabled function to determine whether the current Desktop Window Manager (DWM) is in an enabled state; when in the enabled state, an enabling function such as DwmEnableComplexition is called to modify the current desktop window manager to the disabled state, and when the DwmEnableComplexition function is called, its parameter is set to DWM _ EC _ DISABLECOMPACTION. Therefore, the disabling process can be realized by the following procedure.
In addition, when the DwmIsComplexionEnabled function is called and it is determined that the current Desktop Window Manager (DWM) is not in the enabled state, i.e., the current Desktop Window Manager (DWM) is in the disabled state, the disabled state of the current desktop window manager may be maintained.
Step S102: and adjusting the transparency of the own software window.
In an embodiment, the setwindowoption function may be used to adjust the transparency of the software window, specifically, the code is setwindowoption (0.999). When transparency adjustment is performed, the transparency of the window may actually reach 0.001.
Step S103: creating an equipment description table and a bitmap of equipment where own software is located; the device description table (DC) is a graph-wise (data) structure that defines a set of graphical objects and their attributes, affecting the output. windows provides a device description table for interaction between applications and physical devices, thereby providing platform independence for application design. The device description table is also called a device context, or device context. Specifically, the createcomapatibledc function may be called and the parameter set to NULL to obtain the screen dc (hdc).
In one embodiment, the CreateDIBSection function may be called to create a bitmap (bmp) that is compatible with screen DC. Specifically, the format of the created bitmap may be set, wherein the size of the bitmap may correspond to the size in the screen resolution, i.e., the width and height of the bitmap may be selected from the width and height in the screen resolution; in the bitmap, a pointer named bits can be transmitted for acquiring an image data memory; meanwhile, data of a specified screen image data format can be stored in the bitmap, and the capture screen image format can be specifically specified to be a 32-bit RGBA format.
Among them, the RGBA format is a color space representing Red (Red) Green (Green) Blue (Blue) and Alpha. The first three values (red, green and blue) range from an integer between 0 and 255 or a percentage between 0% and 100%. These values describe the amount of the three primary colors red, green and blue in the desired color. The fourth value, alpha value, establishes the color's transparency/opacity, which ranges between 0.0 and 1.0, with 0.5 being translucent. For example: rgba (255, 255, 255, 0) then represents a completely transparent white color; rgba (0, 0, 0, 1) then represents a completely opaque black color; rgba (0, 0, 0, 0) indicates a completely opaque white color, i.e., colorless.
In an embodiment, after the device description table and the bitmap are created, the created bitmap may be used to replace the original bitmap, and the handle old bmp of the original bitmap is saved for subsequent recovery, which may be implemented by calling the SelectObject function.
Step S104: and capturing screen image data according to the equipment description table and the bitmap to obtain a screen image with the software image removed.
In one embodiment, as shown in fig. 2, this step may be implemented by the following process:
step S201: creating a temporary device description table; specifically, a temporary target dc (hdctarget) may be created, which is equivalent to copying the device description table, and subsequently captured images may be transferred into hdctarget.
Step S202: uploading the acquired screen image data to a temporary equipment description table; specifically, the image data of hdc can be transferred into hdc _ target using the BitBlt function. The parameter width is the width of the screen resolution and the starting point is the upper left corner of the screen (coordinates (0, 0)).
Step S203: storing the uploaded screen image data according to the link data in the bitmap; because the bitmap has a link for storing the image data, the screen image data can be stored in the memory bits according to the link. Its size is the height and width of screen 4, and its format is RGBA.
Step S204: destroying the temporary equipment description table; specifically, after the image is saved, the created temporary target hdc _ target may be destroyed. Optionally, before the destruction, verification may be performed according to the stored screen image data, and whether the screen image data is consistent with the screen or not may be determined.
Step 205: and executing the steps S201 to S204 according to the video frame rate in a loop. Specifically, the acquisition interval may be calculated according to a specified video frame rate, and the steps S201 to S204 are executed when the time point is reached, so as to acquire one frame of image data until the entire required image is obtained. Since the color scheme and transparency of the device where the software is located are adjusted in step S101 and step 102; while in windows7 Basic color schemes, a translucent window is not captured when HDC BitBlt is used to capture a desktop or region. Therefore, the image of the own software disappears from the entire image captured at this step.
In an embodiment, the RGBA screen image data may be saved as a picture to check whether the RGBA screen image data is correct, that is, the RGBA screen image data is verified to determine whether the RGBA screen image data is consistent with the screen.
In one embodiment, after the image capture is completed, the replaced bitmap can be restored according to the original bitmap; and destroys the created device description table and bitmap. Specifically, the above-obtained hdc and old _ bmp may be transmitted by using the SelectObject function, and the original bitmap that is replaced before is restored; while the bitmap bmp can be destroyed using DeleteDC destruction device hdc, using DeleteObject.
According to the screen capture method provided by the embodiment of the invention, the color scheme of the equipment and the transparency of the software window of the equipment are adjusted by determining the equipment where the software is located, and then the capture of the screen or desktop image is realized by creating the equipment description table and the bitmap, and the color scheme of the equipment and the transparency of the software window of the equipment are adjusted; while in windows7 Basic color schemes, a translucent window is not captured when HDC BitBlt is used to capture a desktop or region. Therefore, in the screen image captured by the screen capturing method, the image of the software per se disappears, and the software per se or the window per se is hidden. In addition, the screen capture method provided by the embodiment of the invention can be used in a Windows system, and can be used for removing the window image of the user when capturing the screen, so as to prevent infinite nesting and hiding the content of the window which the user does not want to see.
An embodiment of the present invention further provides a screen capturing device, as shown in fig. 3, the device includes:
the color matching modification module 1 is used for modifying the color matching scheme of the equipment where the software of the user is located; for details, refer to the related description of step S101 in the above method embodiment.
The transparency adjusting module 2 is used for adjusting the transparency of the software window per se; for details, refer to the related description of step S102 in the above method embodiment.
The creating module 3 is used for creating an equipment description table and a bitmap of the equipment where the software of the software is located; for details, refer to the related description of step S103 in the above method embodiment.
And the grabbing module 4 is used for grabbing screen image data according to the equipment description table and the bitmap to obtain a screen image with a software image removed. For details, refer to the related description of step S104 in the above method embodiment.
According to the screen capturing device provided by the embodiment of the invention, the color scheme of the device and the transparency of the software window of the device are adjusted by determining the device where the software of the device is located, and then the capturing of the screen or desktop image is realized by creating the device description table and the bitmap, because the color scheme of the device and the transparency of the software window of the device are adjusted; while in windows7 Basic color schemes, a translucent window is not captured when HDC BitBlt is used to capture a desktop or region. Therefore, in the screen image captured by the screen capturing device, the image of the software per se disappears, and the software per se or the window per se is hidden. In addition, the screen capture device provided by the embodiment of the invention can be used in a Windows system, can remove self window images when capturing a screen, prevents infinite nesting, and can be used for hiding self window contents which are not wanted to be seen.
In one embodiment, as shown in FIG. 4, color matching modification module 1 includes:
the judging module 11 is used for judging whether the current desktop window manager is in an enabling state;
the first disabling module 12 is configured to, when the current desktop window manager is in the enabling state, invoke an enabling function to modify the current desktop window manager into the disabling state;
and a second disabling module 13 for maintaining the original state of the current desktop window manager when not in the enabled state.
In one embodiment, as shown in fig. 5, the creation module 3 includes:
the acquiring module 31 is configured to acquire an equipment description table of equipment where the software of the device is located;
a creating submodule 32, configured to create a bitmap compatible with the device description table, where the bitmap includes link data used for acquiring a screen image data memory and data specifying a screen image data format;
and a replacing module 33, configured to replace the original bitmap according to the device description table and the bitmap, and store the original bitmap.
The functional description of the screen capturing device provided by the embodiment of the invention refers to the description of the screen capturing method in the above embodiment in detail.
An embodiment of the present invention further provides a storage medium, as shown in fig. 6, on which a computer program 601 is stored, where the instructions, when executed by a processor, implement the steps of the screen capture method in the foregoing embodiments. The storage medium is also stored with audio and video stream data, characteristic frame data, an interactive request signaling, encrypted data, preset data size and the like. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlashMemory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlashMemory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid-State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
An embodiment of the present invention further provides a screen capture terminal, as shown in fig. 7, the screen capture terminal may include a processor 51 and a memory 52, where the processor 51 and the memory 52 may be connected by a bus or in another manner, and fig. 7 takes the bus connection as an example.
The processor 51 may be a Central Processing Unit (CPU). The Processor 51 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 52, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the corresponding program instructions/modules in the embodiments of the present invention. The processor 51 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 52, that is, implements the screen-capture method in the above-described method embodiments.
The memory 52 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 51, and the like. Further, the memory 52 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 52 may optionally include memory located remotely from the processor 51, and these remote memories may be connected to the processor 51 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 52 and, when executed by the processor 51, perform the screen capture method in the embodiment shown in fig. 1-2.
The details of the screen-grabbing terminal may be understood by referring to the corresponding descriptions and effects in the embodiments shown in fig. 1 to fig. 2, and are not described herein again.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (9)

1. A screen grabbing method is characterized by comprising the following steps:
s101, modifying a color scheme of equipment where self software is located;
s102, adjusting the transparency of a software window per se; the method comprises the steps that a setWindowOpacity function is adopted to adjust the transparency of a software window, specifically, a code is adopted as setWindowOpacity (0.999), and after transparency adjustment is carried out, the transparency of the window actually reaches 0.001;
step S103, creating an equipment description table and a bitmap of the equipment where the software is located; the device description table DC is a graphic mode data structure which defines a group of graphic objects and attributes thereof and influences output, and windows provides the device description table for interaction between an application program and physical equipment, so that platform independence of application program design is provided; calling a CreateCompatableDC function, setting parameters to be NULL, and acquiring a screen DC (hdc); calling a createdibselection function to create a bitmap compatible with the screen DC, and setting the format of the created bitmap, wherein the size of the bitmap corresponds to the size in the screen resolution, namely the width and the height of the bitmap in the screen resolution are selected; in the bitmap, a pointer named bits is transmitted to obtain an image data memory; meanwhile, data of a designated screen image data format is stored in the bitmap, and the specifically designated capture screen image format is a 32-bit RGBA format, wherein the RGBA format is a color space representing Red (Red) Green (Green) Blue (Blue) and Alpha, three values of Red, Green and Blue are an integer ranging from 0 to 255 or a percentage ranging from 0% to 100%, the values describe the amount of three primary colors of Red, Green and Blue in an expected color, a fourth value, namely an Alpha value, is used for formulating the transparency or opacity of the color, the range of the fourth value is 0.0 to 1.0, and 0.5 is semitransparent;
after the device description table and the bitmap are created, replacing the original bitmap with the created bitmap, storing a handle old bmp of the original bitmap for subsequent recovery, and calling a SelectObject function to realize;
s104, capturing screen image data according to the equipment description table and the bitmap to obtain a screen image with a self software image removed;
creating an equipment description table and a bitmap of the equipment where the own software is located, including:
acquiring an equipment description table of equipment where self software is located;
creating a bitmap compatible with the device description table, wherein the bitmap comprises link data for acquiring a screen image data memory and data in a specified screen image data format;
and replacing the original bitmap according to the device description table and the bitmap, and storing the original bitmap.
2. The screen capture method of claim 1, wherein the modifying of the color scheme of the device in which the software is located comprises:
judging whether the current desktop window manager is in an enabling state;
when the desktop window manager is in the enabling state, an enabling function is called to modify the current desktop window manager into a forbidden state;
when not in the enabled state, the original state of the current desktop window manager is maintained.
3. The screen capture method of claim 1, wherein capturing screen image data from the device description table and the bitmap comprises:
creating a temporary device description table;
uploading the acquired screen image data to the temporary equipment description table;
storing the uploaded screen image data according to the link data in the bitmap;
destroying the temporary device description table.
4. The screen capture method of claim 1, further comprising, after capturing screen image data from the device description table and bitmap:
restoring the replaced bitmap according to the original bitmap;
destroying the created device description table and the bitmap for destroying.
5. A screen capture device, comprising:
the color matching modification module is used for modifying the color matching scheme of the equipment where the software of the user is located;
the transparency adjusting module is used for adjusting the transparency of the software window per se; the method comprises the steps that a setWindowOpacity function is adopted to adjust the transparency of a software window, specifically, a code is adopted as setWindowOpacity (0.999), and after transparency adjustment is carried out, the transparency of the window actually reaches 0.001;
the creating module is used for creating an equipment description table and a bitmap of the equipment where the software is located; the device description table DC is a graphic mode data structure which defines a group of graphic objects and attributes thereof and influences output, and windows provides the device description table for interaction between an application program and physical equipment, so that platform independence of application program design is provided; calling a CreateCompatableDC function, setting parameters to be NULL, and acquiring a screen DC (hdc); calling a createdibselection function to create a bitmap compatible with the screen DC, and setting the format of the created bitmap, wherein the size of the bitmap corresponds to the size in the screen resolution, namely the width and the height of the bitmap in the screen resolution are selected; in the bitmap, a pointer named bits is transmitted to obtain an image data memory; meanwhile, data of a designated screen image data format is stored in the bitmap, and the specifically designated capture screen image format is a 32-bit RGBA format, wherein the RGBA format is a color space representing Red (Red) Green (Green) Blue (Blue) and Alpha, three values of Red, Green and Blue are an integer ranging from 0 to 255 or a percentage ranging from 0% to 100%, the values describe the amount of three primary colors of Red, Green and Blue in an expected color, a fourth value, namely an Alpha value, is used for formulating the transparency or opacity of the color, the range of the fourth value is 0.0 to 1.0, and 0.5 is semitransparent;
the capture module is used for capturing screen image data according to the equipment description table and the bitmap to obtain a screen image with a self software image removed;
creating an equipment description table and a bitmap of the equipment where the own software is located, including:
acquiring an equipment description table of equipment where self software is located;
creating a bitmap compatible with the device description table, wherein the bitmap comprises link data for acquiring a screen image data memory and data in a specified screen image data format;
and replacing the original bitmap according to the device description table and the bitmap, and storing the original bitmap.
6. The screen capture device of claim 5, wherein the color matching modification module comprises:
the judging module is used for judging whether the current desktop window manager is in an enabling state or not;
the first forbidding module is used for calling an enabling function to modify the current desktop window manager into a forbidding state when the first forbidding module is in the enabling state;
and the second disabling module is used for keeping the original state of the current desktop window manager when the current desktop window manager is not in the enabling state.
7. The screen capture device of claim 5, wherein the creation module comprises:
the acquisition module is used for acquiring an equipment description table of equipment where the software of the acquisition module is located;
the creating submodule is used for creating a bitmap compatible with the equipment description table, and the bitmap comprises link data used for acquiring a screen image data memory and data in a specified screen image data format;
and the replacing module is used for replacing the original bitmap according to the equipment description table and the bitmap and storing the original bitmap.
8. A computer-readable storage medium storing computer instructions for causing a computer to perform the screen capture method of any one of claims 1-4.
9. A screen capture terminal, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the screen capture method according to any one of claims 1 to 4.
CN202010137490.5A 2020-03-02 2020-03-02 Screen capturing method and device, storage medium and terminal Active CN111381752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010137490.5A CN111381752B (en) 2020-03-02 2020-03-02 Screen capturing method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010137490.5A CN111381752B (en) 2020-03-02 2020-03-02 Screen capturing method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111381752A CN111381752A (en) 2020-07-07
CN111381752B true CN111381752B (en) 2022-03-29

Family

ID=71221383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010137490.5A Active CN111381752B (en) 2020-03-02 2020-03-02 Screen capturing method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111381752B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817505A (en) * 2021-01-25 2021-05-18 深圳邦健生物医疗设备股份有限公司 Software information interface display method and device, storage medium and equipment
CN114647352A (en) * 2022-03-23 2022-06-21 弘成科技发展有限公司 Method for collecting screen and filtering designated window based on win10 system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060057051A (en) * 2004-11-23 2006-05-26 주식회사 팬택 Screen capturing method and mobile communication terminal of enabling the method
CN102547194A (en) * 2011-12-13 2012-07-04 广东威创视讯科技股份有限公司 Screen recording device
CN106775690A (en) * 2016-12-02 2017-05-31 广东威创视讯科技股份有限公司 A kind of method for recording and device being capped based on gdi/gdi+ windows

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023852A (en) * 2009-09-15 2011-04-20 深圳市巨龙科教高技术股份有限公司 Screen capture method and system
US8731289B2 (en) * 2012-10-02 2014-05-20 Oracle International Corporation Recoloring images of a web page according to a representative color
CN103544021B (en) * 2013-11-01 2017-10-24 锤子科技(北京)股份有限公司 The screenshotss method and its device of a kind of mobile terminal screen content
US20150371429A1 (en) * 2014-02-10 2015-12-24 Sigma Cubed Inc. Method and Apparatus For Interactive 3D Visual Display of Microseismic Events
WO2015179694A1 (en) * 2014-05-21 2015-11-26 Jacoh Llc Systems and methods for capturing graphical user interfaces

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060057051A (en) * 2004-11-23 2006-05-26 주식회사 팬택 Screen capturing method and mobile communication terminal of enabling the method
CN102547194A (en) * 2011-12-13 2012-07-04 广东威创视讯科技股份有限公司 Screen recording device
CN106775690A (en) * 2016-12-02 2017-05-31 广东威创视讯科技股份有限公司 A kind of method for recording and device being capped based on gdi/gdi+ windows

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
dwm.exe是什么进程?dwm.exe为什么运行?dwm图文介绍;佚名;《脚本之家》;20150531;第1-3页 *
使用DWM实现Aero Glass效果;ntwilford;《CSDN》;20100608;第1-4页 *
透明窗口截屏无效解决方法;gruesome;《学步园》;20131005;第1-3页 *

Also Published As

Publication number Publication date
CN111381752A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN107018370B (en) Display method and system for video wall
US11707676B2 (en) Content presenting method, user equipment and system
US7439982B2 (en) Optimized scene graph change-based mixed media rendering
US20180365518A1 (en) Target object presentation method and apparatus
US20170186243A1 (en) Video Image Processing Method and Electronic Device Based on the Virtual Reality
CN111381752B (en) Screen capturing method and device, storage medium and terminal
US10964089B1 (en) Method and apparatus for coding view-dependent texture attributes of points in a 3D point cloud
CN112929740B (en) Method, device, storage medium and equipment for rendering video stream
US11288774B2 (en) Image processing method and apparatus, storage medium, and electronic apparatus
CN110149550B (en) Image data processing method and device and storage medium
CN107424206B (en) Interaction method for influencing shadow expression of virtual scene by using real environment
WO2008020506A1 (en) Image display control device, image display method, and information storage medium
CN111696034A (en) Image processing method and device and electronic equipment
US20210360236A1 (en) System and method for encoding a block-based volumetric video having a plurality of video frames of a 3d object into a 2d video format
CN112770095B (en) Panoramic projection method and device and electronic equipment
CN109885172B (en) Object interaction display method and system based on Augmented Reality (AR)
WO2023193524A1 (en) Live streaming video processing method and apparatus, electronic device, computer-readable storage medium, and computer program product
CN109859328B (en) Scene switching method, device, equipment and medium
JP2007121864A (en) Optimized video reproduction system, optimized video distribution system, video optimizing device, optimized video reproducing method, and video content data storage medium
CN108335362B (en) Light control method and device in virtual scene and VR (virtual reality) equipment
CN113810755A (en) Panoramic video preview method and device, electronic equipment and storage medium
CN106648634A (en) Screen shot method and screen shot device
US11361488B2 (en) Image display method and apparatus, and storage medium
CN113676753B (en) Method and device for displaying video in VR scene, electronic equipment and storage medium
US11778007B2 (en) Server, method and user device for providing virtual reality content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220304

Address after: 247126 intersection of Fengming Avenue and Hanjiang Road, Jiangnan industrial concentration area, Chizhou City, Anhui Province

Applicant after: Anhui Wenxiang Technology Co.,Ltd.

Address before: 247126 factory building C2, science and Technology Incubation Park, Jiangnan industrial concentration zone, Chizhou City, Anhui Province

Applicant before: Anhui Wenxiang Information Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant