CN113344790A - Picture processing method and device, electronic equipment and storage medium - Google Patents

Picture processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113344790A
CN113344790A CN202110740400.6A CN202110740400A CN113344790A CN 113344790 A CN113344790 A CN 113344790A CN 202110740400 A CN202110740400 A CN 202110740400A CN 113344790 A CN113344790 A CN 113344790A
Authority
CN
China
Prior art keywords
picture
target
region
area
original picture
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.)
Pending
Application number
CN202110740400.6A
Other languages
Chinese (zh)
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.)
Shanghai Iqiyi New Media Technology Co ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110740400.6A priority Critical patent/CN113344790A/en
Publication of CN113344790A publication Critical patent/CN113344790A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The embodiment of the invention relates to a picture processing method, a picture processing device, electronic equipment and a storage medium, wherein the picture processing method comprises the following steps: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture; and sending the target picture to a client so that the client analyzes the original picture and the region information of the target region from the target picture, and hiding the target region in the original picture according to the region information. Therefore, the complexity of server side product development can be reduced, and the storage space of the server side is saved; and the same original picture can have different display effects on different clients, and the user experience is improved.

Description

Picture processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of picture processing, in particular to a picture processing method and device, electronic equipment and a storage medium.
Background
At present, a large number of pictures are generated every day on the internet, and due to various reasons, such as personal privacy, sensitive speech, illegal information and the like, the pictures need to be locally hidden during picture display, such as local mosaic processing.
In the prior art, in order to implement local hiding during picture display, a publisher of a picture performs local hiding processing on the picture and then sends the picture to a display end, and meanwhile, an original picture is reserved, so that the storage space of a server of the publisher of the picture is consumed. Meanwhile, in application, different display ends may need different display effects for the same picture, and for this reason, a publisher of the picture needs to adopt multiple hiding processing modes for the same picture aiming at different display ends to obtain multiple pictures after local hiding processing, which is not only difficult to implement, but also increases the workload of the publisher of the picture and increases the complexity of the product in the publishing process.
Disclosure of Invention
In view of this, in order to solve the technical problems that the storage space of the picture publisher server is consumed due to the fact that the picture is locally hidden at the picture publisher side, and different display effects of the same picture on different display ends cannot be easily achieved, embodiments of the present invention provide a picture processing method and apparatus, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present invention provides an image processing method, including:
determining a target area to be hidden in an original picture;
splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
and sending the target picture to a client so that the client analyzes the original picture and the region information of the target region from the target picture, and hiding the target region in the original picture according to the region information and a set hiding mode.
In a possible embodiment, the splicing the original picture and the region information of the target region according to a set picture splicing manner to obtain a target picture includes:
according to the format of a PNG data block in the PNG picture, packaging the area information of the target area to obtain a mask data block containing the area information;
analyzing a PNG file mark and a file header data block from the original picture;
and sequentially splicing the PNG file mark, the file header data block, the mask data block and other parts except the PNG file mark and the file header data block in the original picture to obtain a target picture.
In a possible implementation manner, the encapsulating, according to the format of the PNG data block in the PNG picture, the area information of the target area to obtain a mask data block including the area information includes:
creating a blank data block in a local memory, wherein the space size of the blank data block is the sum of the length value and a set value of the area information;
performing cyclic redundancy check on the region information to obtain a cyclic redundancy check code corresponding to the region information;
and writing the length value of the area information, the type value of the set data block, the area information and the cyclic redundancy check code into the blank data block in sequence to obtain a mask data block containing the area information.
In a second aspect, an embodiment of the present invention provides an image processing method, including:
receiving a target picture sent by a server, wherein the target picture is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
analyzing the original picture and the region information of the target region from the target picture;
and hiding the target area in the original picture according to the area information and a set hiding mode.
In a possible implementation manner, the original picture is a PNG picture, and the parsing the area information of the target area from the target picture includes:
reading first content with a first set length from a first specified byte in the target picture, wherein the first content at least comprises a second set length;
reading second content of the second set length from a second specified byte in the target picture, and determining the second content as area information of the target area.
In a possible embodiment, the hiding the target region in the original picture according to the region information and a set hiding manner includes:
determining the target area in the original picture according to the area information;
and recalculating the pixel value of each pixel point in the target region by using a set mask check operator.
In a possible embodiment, the hiding the target region in the original picture according to the region information and a set hiding manner includes:
determining the target area in the original picture according to the area information;
and covering the target area by using a setting picture.
In a third aspect, an embodiment of the present invention provides an image processing apparatus, including:
the region determining module is used for determining a target region to be hidden in the original picture;
the image splicing module is used for splicing the original image and the area information of the target area according to a set image splicing mode to obtain a target image;
and the picture sending module is used for sending the target picture to a client so as to enable the client to analyze the original picture and the region information of the target region from the target picture and hide the target region in the original picture according to the region information and a set hiding mode.
In a fourth aspect, an embodiment of the present invention provides an image processing apparatus, including:
the image receiving module is used for receiving a target image sent by a server, and the target image is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
the picture analysis module is used for analyzing the original picture and the area information of the target area from the target picture;
and the hiding module is used for hiding the target area in the original picture according to the area information and a set hiding mode.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute a picture processing program stored in the memory to implement the picture processing method according to any one of the first aspect.
In a sixth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the picture processing method according to any one of the first aspects.
The technical scheme provided by the embodiment of the invention comprises the steps of determining a target area to be hidden in an original picture at a server side, splicing the area information of the original picture and the target area according to a set picture splicing mode to obtain a target picture, sending the target picture to a client side, analyzing the area information of the original picture and the target area from the target picture by the client side, and hiding the target area in the original picture according to the area information, so that the picture which is partially hidden at the client side can be displayed to meet the user requirement, compared with the prior art, the local area in the original picture at the server side is not required to be hidden, the same original picture is not required to be configured according to different display requirements of different clients at the server side, and the complexity of product development at the server side is reduced, the storage space of the server side is also saved; because the local area in the original picture is hidden by the client according to the set hiding mode, and different clients can correspond to different hiding modes, different clients can adopt different hiding modes for the same original picture, and then the same original picture can present different display effects on different clients, thereby improving the user experience.
Drawings
Fig. 1 is a flowchart illustrating an embodiment of a method for processing an image according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for processing pictures according to an embodiment of the present invention;
FIG. 3 is a diagram of a file structure of a standard PNG picture;
fig. 4 is a schematic flow chart illustrating that a server according to an embodiment of the present invention encapsulates area information of a target area according to a format of a PNG data block in a PNG picture to obtain a mask data block containing the area information;
FIG. 5 is a flowchart illustrating a further method for processing pictures according to an embodiment of the present invention;
FIG. 6 is a block diagram of an embodiment of a picture processing apparatus according to the present invention;
FIG. 7 is a block diagram of another embodiment of a picture processing apparatus according to the present invention;
fig. 8 is a schematic structural diagram of an electronic device 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.
The following further explains the image processing method provided by the present invention with specific embodiments, which are not limited to the embodiments of the present invention.
Referring to fig. 1, a flowchart of an embodiment of a picture processing method according to an embodiment of the present invention is shown. As an embodiment, the method may be applied to a server, that is, a publisher of a picture, and as shown in fig. 1, the process may include the following steps:
step 101, the server determines a target area to be hidden in an original picture.
As an embodiment, the target area to be hidden may be marked in the original picture manually by the user. For example, the user may frame out the target area to be hidden in the original picture through a picture processing tool. Based on this, the server may determine the area manually marked by the user as the target area to be hidden.
As another embodiment, the server may automatically mark the target area to be hidden in the original picture according to a set rule. Here, the setting rule may be, for example: the area where the face is located is determined as a target area, the area where the sensitive characters are located is determined as a target area, and the like, which are not limited in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, the number of the target areas in one original picture is not limited, that is, in this step 101, one or more target areas to be hidden may be determined in the original picture.
And 102, splicing the original picture and the area information of the target area by the server according to a set picture splicing mode to obtain a target picture.
And 103, the server sends the target picture to the client so that the client analyzes the original picture and the region information of the target region from the target picture, and hides the target region in the original picture according to the region information and the set hiding mode.
In one example, if the target area is a regular-shaped area, for example, a rectangular area, the area information may include: the pixel position of the upper left vertex of the target area in the original picture, and the length and width of the target area; for another example, if the target region is a circular region, the region information may include a pixel position of the center of the target region in the original picture, and a radius (or diameter) of the target region.
In another example, if the target area is an irregularly shaped area, the boundary of the target area may be divided into line segments as many as possible, and the area information of the target area includes: the pixel locations of the two end points of each line segment in the original picture.
As can be seen from the description in step 102, the target picture is formed by splicing the original picture and the region information of the target region according to a set picture splicing manner, and therefore, the target picture includes both the original picture and the region information of the target region.
Based on this, after the target picture is sent to the client, the client can analyze the original picture and the region information of the target region from the target picture, and then can determine the target region to be hidden in the analyzed original picture according to the region information of the target region, and finally can hide the target region.
How to splice the original picture and the region information of the target region according to the set picture splicing manner to obtain the target picture is described below by using the embodiment shown in fig. 2, and will not be described in detail here.
As to how the client parses the area information of the original picture and the target area from the target picture, and how to perform the hiding processing on the target area, the following is described with an embodiment shown in fig. 4, and detailed description is not given here.
The technical scheme provided by the embodiment of the invention comprises the steps of determining a target area to be hidden in an original picture at a server side, splicing the area information of the original picture and the target area according to a set picture splicing mode to obtain a target picture, sending the target picture to a client side, analyzing the area information of the original picture and the target area from the target picture by the client side, and hiding the target area in the original picture according to the area information, so that the picture which is partially hidden at the client side can be displayed to meet the user requirement, compared with the prior art, the local area in the original picture at the server side is not required to be hidden, the same original picture is not required to be configured according to different display requirements of different clients at the server side, and the complexity of product development at the server side is reduced, the storage space of the server side is also saved; because the local area in the original picture is hidden by the client according to the set hiding mode, and different clients can correspond to different hiding modes, different clients can adopt different hiding modes for the same original picture, and then the same original picture can present different display effects on different clients, thereby improving the user experience.
In addition, in the embodiment of the present invention, after the step 102 is executed to obtain the target picture, the original picture may be deleted, and since the target picture is formed by splicing the area information of the original picture and the area information of the target area, after the original picture is deleted, the original picture can be obtained from the target picture even if necessary, and at the same time, the storage space of the server can be saved.
Referring to fig. 2, a flowchart of another embodiment of a method for processing a picture according to an embodiment of the present invention is shown. The process shown in fig. 2 is based on the process shown in fig. 1, and describes how the server splices the original picture and the area information of the target area according to a set picture splicing manner, taking the original picture as the PNG picture as an example, so as to obtain the target picture. As shown in fig. 2, the process may include the following steps:
step 201, the server packages the area information of the target area according to the format of the PNG data block in the PNG picture to obtain a mask data block containing the area information.
At present, the file structure of a standard PNG picture is as shown in fig. 3, and includes a PNG file flag (8 bytes), and several PNG data blocks. The PNG picture defines two types of PNG data blocks, namely a key data block and an auxiliary data block. The key data blocks are standard PNG data blocks, including a header data block (25 bytes), a palette data block, an image data block, and an end of image data block, which must be included in each PNG picture. The auxiliary data block is an optional data block such as a background color data block, an image histogram data block, a text information data block, etc. Note that the header data block is the first PNG data block in each PNG picture.
The PNG data block is then composed of four parts, as shown in table 1 below:
TABLE 1
Figure BDA0003141076850000081
Figure BDA0003141076850000091
Based on the above description, the specific implementation of step 301 may include steps 401 to 403 illustrated in fig. 4, as shown in fig. 4:
step 401, creating a blank data block in the local memory, where the space size of the blank data block is the sum of the length value of the area information and a set value.
As can be seen from table 1 above, in one PNG data block, the other parts except the data block data part account for 12 bytes in total, and therefore, the set value is 12 bytes.
And 402, performing cyclic redundancy check on the area information to obtain a cyclic redundancy check code corresponding to the area information.
Step 403, writing the length value of the region information, the type value of the set data block, the region information, and the cyclic redundancy check code into the blank data block in sequence to obtain a mask data block containing the region information.
As can be seen from table 1, a PNG data block sequentially includes: length, Chunk Type Code, Chunk Data, and CRC, so in this step 403, the Length value of the region information, the set Data block Type value, the region information, and the CRC are sequentially written into the blank Data block, and a PNG Data block (referred to as a mask Data block in the embodiment of the present invention) including the region information is obtained. Wherein, the set data block type value may be {'t', 'e', 'x','t' }, which represents a text type.
Step 202, the server analyzes the PNG file flag and the file header data block from the original picture.
And step 203, the server sequentially splices the file mark, the file header data block, the mask data block and other parts except the file mark and the file header data block in the original picture to obtain the target picture.
As can be seen from the above description, the header data block is the first PNG data block in each PNG picture, and each PNG picture has a PNG file flag, and the length of the PNG file flag is 8 bytes, so in step 202, the server parses the content of the first 8 bytes from the original picture, where the content of the first 8 bytes is the PNG file flag, and then, parses the content of the 25 bytes from the 9 th byte, which is the header data block, and when performing the splicing, the mask data block is spliced behind the header data block.
Through the embodiment shown in fig. 2, when the original picture is the PNG picture, the server splices the area information of the original picture and the target area according to the format of the PNG picture and the structure of the PNG data block to obtain the target picture, thereby realizing that the area information of the target area is injected into the original picture.
In addition, it should be noted that the original picture is a PNG picture, which is only an exemplary illustration, in practice, the original picture may also be a picture in other formats, for example, a picture in a JPG/JPEG format, and this is not limited in this embodiment of the present invention.
Specifically, taking a JPG picture as an example, the JPG picture has some data in the form of 0xFF, which are called "mark (Marker)", and represent JPG information data segments. The flags 0xFFE 0-0 xFFEF are called "Application Marker", which are not necessary for decoding JPG pictures and can be used for storing configuration information and the like. Based on this, in the embodiment of the present invention, the area information of the target area can be stored in the flags 0xFFE 0-0 xfffef, so as to obtain the target picture including both the original picture and the area information of the target area.
Further, after receiving the target picture, the client may analyze the area information of the target area from the flags 0xFFE 0-0 xfffef, determine the content of other bytes as the original picture, and then hide the target area in the original picture according to the analyzed area information and the set hiding manner.
Referring to fig. 5, a flowchart of another embodiment of a picture processing method according to an embodiment of the present invention is provided. As an embodiment, the method may be applied to a client, that is, a presentation end of a picture, and as shown in fig. 5, the process may include the following steps:
step 501, the client receives a target picture sent by the server.
Step 502, the client analyzes the original picture and the area information of the target area in the original picture from the target picture.
In this step 502, taking the original picture as the PNG picture and obtaining the target picture according to the splicing sequence described in the above step 203 as an example, a process of the client analyzing the region information of the target region from the target picture is explained:
first, the client reads first content of a first set length from a first specified byte in the target picture. Here, since the mask data block is located after the PNG file flag and the header data block, the first byte of the mask data block is the 34 th byte of the target picture, that is, the first specified byte refers to the 34 th byte. The first set length is 4 bytes, and the first content includes a data field in the mask data block, that is, a length of the area information (hereinafter, referred to as a second set length). At this point, the client obtains the length of the region information in the mask data block.
Further, reading second content of a second set length from a second specified byte in the target picture, and determining the second content as area information of the target area. Here, as is apparent from the PNG data block structure shown in table 1, since the region information in the mask data block starts at the 5 th byte in the mask data block, the second designated byte is the 39 th (34+5) byte.
In the target picture, the parts except the mask data block are the contents in the original picture, so that the client can analyze the original picture after analyzing the mask data block from the target picture. As to how the client further parses and renders the original picture, those skilled in the art can refer to the related description in the prior art, and details are not described here.
Step 503, the client performs hiding processing on the target area in the original picture according to the area information and the set hiding mode.
In this step 503, the client may first determine a target region to be hidden from the parsed original picture according to the parsed region information, and then hide the target region according to a set hiding manner.
As an embodiment, the client hiding the target area in the original picture according to the set hiding manner includes: and the client recalculates the pixel value of each pixel point in the target area by using the set mask kernel operator. It can be understood that the change of the pixel value of each pixel point in the target region means that the original image is hidden.
As another embodiment, the client hiding the target area in the original picture according to the set hiding manner includes: the client covers the target area by using the set picture so as to hide the target area. Here, the setting picture may be, for example, an emoticon picture, a full white picture, a monochrome color picture, or the like.
As another embodiment, the client hiding the target area in the original picture according to the set hiding manner includes: the client performs mosaic processing on the target area to realize hiding processing on the target area.
It should be noted that, because the target area is not of a fixed size, when the client uses the setting picture to cover the target area, the client may first adjust, for example, enlarge or reduce, the setting picture according to the size of the target area, so as to avoid the phenomenon of incomplete hiding or excessive hiding.
In addition, it should be noted that the hiding manner corresponding to the client may be fixed or may be dynamically changed, for example, the hiding manner corresponding to the client may be set or changed by a user of the client according to preferences and habits of the user, or for example, a plurality of hiding manners may be set on the client side, and the effective time of each hiding manner is set, and at most only one hiding manner is in an effective state at the same time point (for example, hiding manner 1 is effective on monday to wednesday, and hiding manner 2 is effective on thursday to saturday), then, when the client performs hiding processing on the target area in the original picture, the hiding manner currently in the effective state is adopted. In addition, if there is no hidden mode in an effective state currently, the client may choose not to hide the target area in the original picture.
Further, the hiding modes corresponding to different clients may be the same or different. For example, one client performs hiding processing on the target area by using a mosaic processing method, and another client performs hiding processing on the target area by using a picture covering method, which is not limited in the embodiment of the present invention. It can be understood that, by performing the hiding process on the target area in the same original picture in different hiding manners, different display effects will be exhibited.
The technical scheme provided by the embodiment of the invention comprises the steps of determining a target area to be hidden in an original picture at a server side, splicing the area information of the original picture and the target area according to a set picture splicing mode to obtain a target picture, sending the target picture to a client side, analyzing the area information of the original picture and the target area from the target picture by the client side, and hiding the target area in the original picture according to the area information, so that the picture which is partially hidden at the client side can be displayed to meet the user requirement, compared with the prior art, the local area in the original picture at the server side is not required to be hidden, the same original picture is not required to be configured according to different display requirements of different clients at the server side, and the complexity of product development at the server side is reduced, the storage space of the server side is also saved; because the local area in the original picture is hidden by the client according to the set hiding mode, and different clients can correspond to different hiding modes, different clients can adopt different hiding modes for the same original picture, and then the same original picture can present different display effects on different clients, thereby improving the user experience.
Corresponding to the foregoing embodiments of the image processing method, the present invention further provides a block diagram of an embodiment of an image processing apparatus.
Referring to fig. 6, a block diagram of an embodiment of a picture processing apparatus according to an embodiment of the present invention is shown. As an embodiment, the apparatus may be applied to a server, for example, the server 11 in the application scenario shown in fig. 1, and as shown in fig. 6, the apparatus includes:
the region determining module 61 is configured to determine a target region to be hidden in an original picture;
the picture splicing module 62 is configured to splice the original picture and the region information of the target region according to a set picture splicing manner, so as to obtain a target picture;
the picture sending module 63 is configured to send the target picture to a client, so that the client analyzes the original picture and the region information of the target region from the target picture, and hides the target region in the original picture according to the region information.
In a possible embodiment, the original picture is a PNG picture, and the picture stitching module 62 includes:
the packaging submodule is used for packaging the area information of the target area according to the format of the PNG data block in the PNG picture to obtain a mask data block containing the area information;
the analysis submodule is used for analyzing the PNG file mark and the file header data block from the original picture;
and the splicing submodule is used for sequentially splicing the PNG file mark, the file header data block, the mask data block and other parts except the PNG file mark and the file header data block in the original picture to obtain a target picture.
In a possible embodiment, the encapsulation submodule includes:
the creating submodule is used for creating a blank data block in a local memory, and the space size of the blank data block is the sum of the length value and a set value of the area information;
the check submodule is used for carrying out cyclic redundancy check on the region information to obtain a cyclic redundancy check code corresponding to the region information;
and the writing submodule is used for writing the length value of the area information, the type value of the set data block, the area information and the cyclic redundancy check code into the blank data block in sequence to obtain a mask data block containing the area information.
Referring to fig. 7, a block diagram of another embodiment of a picture processing apparatus according to an embodiment of the present invention is provided. As an embodiment, the apparatus may be applied to a client, for example, the client 12 in the application scenario shown in fig. 1, and as shown in fig. 7, the apparatus includes:
the picture receiving module 71 is configured to receive a target picture sent by a server, where the target picture is obtained by the server according to the following manner: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
a picture analyzing module 72, configured to analyze the original picture and the region information of the target region from the target picture;
a hiding module 73, configured to hide the target area in the original picture according to the area information and a set hiding manner.
In a possible embodiment, the original picture is a PNG picture, and the picture parsing module 72 includes:
a first reading sub-module, configured to read first content of a first set length from a first specified byte in the target picture, where the first content at least includes a second set length;
and the first reading sub-module is used for reading second content with the second set length from a second specified byte in the target picture and determining the second content as the area information of the target area.
In a possible implementation, the hiding module 73 is specifically configured to:
determining the target area in the original picture according to the area information; and recalculating the pixel value of each pixel point in the target region by using a set mask check operator.
In a possible implementation, the hiding module 73 is specifically configured to:
determining the target area in the original picture according to the area information; and covering the target area by using a setting picture.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 800 shown in fig. 8 includes: at least one processor 801, memory 802, at least one network interface 804, and other user interfaces 803. The various components in the electronic device 800 are coupled together by a bus system 805. It is understood that the bus system 805 is used to enable communications among the components connected. The bus system 805 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 805 in fig. 8.
The user interface 803 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 802 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 802 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 802 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 8021 and application programs 8022.
The operating system 8021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 8022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program implementing a method according to an embodiment of the present invention may be included in application program 8022.
In the embodiment of the present invention, the processor 801 is configured to execute the method steps provided by each method embodiment by calling the program or instruction stored in the memory 802, specifically, the program or instruction stored in the application 8022, and for example, includes:
determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture; and sending the target picture to a client so that the client analyzes the original picture and the region information of the target region from the target picture, and hiding the target region in the original picture according to the region information and a set hiding mode.
Alternatively, the first and second electrodes may be,
receiving a target picture sent by a server, wherein the target picture is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
analyzing the original picture and the region information of the target region from the target picture;
and hiding the target area in the original picture according to the area information and a set hiding mode.
The methods disclosed in the embodiments of the present invention described above may be implemented in the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 801. The processor 801 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802, and combines the hardware to complete the steps of the method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 8, and may execute all the steps of the image processing methods shown in fig. 1 to 2 and fig. 4 to 5, so as to achieve the technical effects of the software service methods shown in fig. 1 to 2 and fig. 4 to 5, which are described with reference to fig. 1 to 2 and fig. 4 to 5 for brevity, and are not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium can be executed by one or more processors, the image processing method executed on the electronic device side is realized.
The processor is used for executing the picture processing program stored in the memory to realize the following steps of the picture processing method executed on the electronic equipment side:
determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture; and sending the target picture to a client so that the client analyzes the original picture and the region information of the target region from the target picture, and hiding the target region in the original picture according to the region information and a set hiding mode.
Alternatively, the first and second electrodes may be,
receiving a target picture sent by a server, wherein the target picture is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
analyzing the original picture and the region information of the target region from the target picture;
and hiding the target area in the original picture according to the area information and a set hiding mode.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. An image processing method, comprising:
determining a target area to be hidden in an original picture;
splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
and sending the target picture to a client so that the client analyzes the original picture and the region information of the target region from the target picture, and hiding the target region in the original picture according to the region information and a set hiding mode.
2. The method according to claim 1, wherein the original picture is a PNG picture, and the splicing of the original picture and the region information of the target region according to the set picture splicing manner to obtain the target picture comprises:
according to the format of a PNG data block in the PNG picture, packaging the area information of the target area to obtain a mask data block containing the area information;
analyzing a PNG file mark and a file header data block from the original picture;
and sequentially splicing the PNG file mark, the file header data block, the mask data block and other parts except the PNG file mark and the file header data block in the original picture to obtain a target picture.
3. The method as claimed in claim 2, wherein the encapsulating the area information of the target area according to the format of the PNG data block in the PNG picture to obtain a mask data block containing the area information comprises:
creating a blank data block in a local memory, wherein the size of the blank data block is the sum of the length value and a set value of the area information;
performing cyclic redundancy check on the region information to obtain a cyclic redundancy check code corresponding to the region information;
and writing the length value of the area information, the type value of the set data block, the area information and the cyclic redundancy check code into the blank data block in sequence to obtain a mask data block containing the area information.
4. An image processing method, comprising:
receiving a target picture sent by a server, wherein the target picture is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
analyzing the original picture and the region information of the target region from the target picture;
and hiding the target area in the original picture according to the area information and a set hiding mode.
5. The method as claimed in claim 4, wherein the original picture is a PNG picture, and the parsing the region information of the target region from the target picture comprises:
reading first content with a first set length from a first specified byte in the target picture, wherein the first content at least comprises a second set length;
reading second content of the second set length from a second specified byte in the target picture, and determining the second content as area information of the target area.
6. The method according to claim 4, wherein the hiding the target region in the original picture according to the region information and the set hiding manner includes:
determining the target area in the original picture according to the area information;
and recalculating the pixel value of each pixel point in the target region by using a set mask check operator.
7. The method according to claim 4, wherein the hiding the target region in the original picture according to the region information and the set hiding manner includes:
determining the target area in the original picture according to the area information;
and covering the target area by using a setting picture.
8. A picture processing apparatus, comprising:
the region determining module is used for determining a target region to be hidden in the original picture;
the image splicing module is used for splicing the original image and the area information of the target area according to a set image splicing mode to obtain a target image;
and the picture sending module is used for sending the target picture to a client so as to enable the client to analyze the original picture and the region information of the target region from the target picture and hide the target region in the original picture according to the region information and a set hiding mode.
9. A picture processing apparatus, comprising:
the image receiving module is used for receiving a target image sent by a server, and the target image is obtained by the server according to the following modes: determining a target area to be hidden in an original picture; splicing the original picture and the region information of the target region according to a set picture splicing mode to obtain a target picture;
the picture analysis module is used for analyzing the original picture and the area information of the target area from the target picture;
and the hiding module is used for hiding the target area in the original picture according to the area information and a set hiding mode.
10. An electronic device, comprising: a processor and a memory, the processor is used for executing the picture processing program stored in the memory to realize the picture processing method of any one of claims 1-3 or 4-7.
11. A storage medium storing one or more programs executable by one or more processors to implement the picture processing method according to any one of claims 1 to 3 or 4 to 7.
CN202110740400.6A 2021-06-30 2021-06-30 Picture processing method and device, electronic equipment and storage medium Pending CN113344790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110740400.6A CN113344790A (en) 2021-06-30 2021-06-30 Picture processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110740400.6A CN113344790A (en) 2021-06-30 2021-06-30 Picture processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113344790A true CN113344790A (en) 2021-09-03

Family

ID=77481982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110740400.6A Pending CN113344790A (en) 2021-06-30 2021-06-30 Picture processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113344790A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185628A (en) * 2021-11-19 2022-03-15 北京奇艺世纪科技有限公司 Picture adjusting method, device and equipment of iOS system and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243256A (en) * 2006-03-06 2007-09-20 Dainippon Printing Co Ltd Device for encrypting medical image
JP2013092855A (en) * 2011-10-25 2013-05-16 Sony Corp Image processing apparatus and program
CN106485164A (en) * 2016-09-27 2017-03-08 维沃移动通信有限公司 A kind of image processing method and mobile terminal
WO2019171128A1 (en) * 2018-03-06 2019-09-12 Yogesh Chunilal Rathod In-media and with controls advertisement, ephemeral, actionable and multi page photo filters on photo, automated integration of external contents, automated feed scrolling, template based advertisement post and actions and reaction controls on recognized objects in photo or video
CN111695107A (en) * 2020-05-29 2020-09-22 北京字节跳动网络技术有限公司 Verification method and device and electronic equipment
CN112653713A (en) * 2021-01-22 2021-04-13 深圳市房多多网络科技有限公司 Image downloading protection method and device and computing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243256A (en) * 2006-03-06 2007-09-20 Dainippon Printing Co Ltd Device for encrypting medical image
JP2013092855A (en) * 2011-10-25 2013-05-16 Sony Corp Image processing apparatus and program
CN106485164A (en) * 2016-09-27 2017-03-08 维沃移动通信有限公司 A kind of image processing method and mobile terminal
WO2019171128A1 (en) * 2018-03-06 2019-09-12 Yogesh Chunilal Rathod In-media and with controls advertisement, ephemeral, actionable and multi page photo filters on photo, automated integration of external contents, automated feed scrolling, template based advertisement post and actions and reaction controls on recognized objects in photo or video
CN111695107A (en) * 2020-05-29 2020-09-22 北京字节跳动网络技术有限公司 Verification method and device and electronic equipment
CN112653713A (en) * 2021-01-22 2021-04-13 深圳市房多多网络科技有限公司 Image downloading protection method and device and computing equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
小书同学: "在PNG图像中写入隐藏信息", Retrieved from the Internet <URL:https://www.jianshu.com/p/50a21d70e962> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185628A (en) * 2021-11-19 2022-03-15 北京奇艺世纪科技有限公司 Picture adjusting method, device and equipment of iOS system and computer readable medium
CN114185628B (en) * 2021-11-19 2024-04-12 北京奇艺世纪科技有限公司 Picture adjustment method, device and equipment of iOS (integrated operation system) and computer readable medium

Similar Documents

Publication Publication Date Title
US10963622B1 (en) Allowing operating system access to non-standard fonts in a network document
US7257776B2 (en) Systems and methods for scaling a graphical user interface according to display dimensions and using a tiered sizing schema to define display objects
US7293034B2 (en) Dynamically customizing a user interface for the aggregation of content
US20030068099A1 (en) Section extraction tool for PDF documents
US8689099B1 (en) Cross-domain communication
US20100064209A1 (en) Method for transforming web page objects
US20090128573A1 (en) Memory Based Content Display Interception
US9996512B2 (en) Customized processing of DOM objects
CN110955477A (en) Image self-defining method, device, equipment and storage medium
US20190377461A1 (en) Interactive file generation and execution
ES2266185T3 (en) PROCESSING OF DIGITAL DOCUMENTS.
CN113344790A (en) Picture processing method and device, electronic equipment and storage medium
US6429881B1 (en) Method and system for transitioning graphic elements of a network interface description document
US8645822B2 (en) Multi-platform presentation system
US10542176B2 (en) Enhancing graph visualization with supplemental data
US8818092B1 (en) Multi-threaded text rendering
US20190197986A1 (en) Methods for dynamically providing an image to be displayed
JP2006526190A (en) System and method for providing multiple renditions of document content
CN113377376A (en) Data packet generation method, data packet generation device, electronic device, and storage medium
CN107977451B (en) Method and device for adding dynamic content in display page and terminal equipment
US20070177215A1 (en) Text rendering contrast
CN113468454A (en) Method and device for rendering HTML (hypertext markup language) page
CN110288685B (en) Gear mode data display method and device based on svg shade function
CN110083419B (en) Power-saving page presentation method and equipment
US10810355B1 (en) Allowing operating system access to non-standard fonts in a network document

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: 20231204

Address after: 200335 room 205, floor 2, building 9, No. 365, Linhong Road, Changning District, Shanghai

Applicant after: Shanghai iqiyi New Media Technology Co.,Ltd.

Address before: 100080 10th and 11th floor, No.2 Beiyi street, Haidian District, Beijing

Applicant before: BEIJING QIYI CENTURY SCIENCE & TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right