CN113538220A - Method and device for processing gradually-changed semitransparent picture - Google Patents

Method and device for processing gradually-changed semitransparent picture Download PDF

Info

Publication number
CN113538220A
CN113538220A CN202110806551.7A CN202110806551A CN113538220A CN 113538220 A CN113538220 A CN 113538220A CN 202110806551 A CN202110806551 A CN 202110806551A CN 113538220 A CN113538220 A CN 113538220A
Authority
CN
China
Prior art keywords
color information
information
pixel width
basic
gradient
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
CN202110806551.7A
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.)
Beijing Tianmashikong Network Technology Co ltd
Original Assignee
Beijing Tianmashikong Network 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 Tianmashikong Network Technology Co ltd filed Critical Beijing Tianmashikong Network Technology Co ltd
Priority to CN202110806551.7A priority Critical patent/CN113538220A/en
Publication of CN113538220A publication Critical patent/CN113538220A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a device for processing a gradually-changed semitransparent picture, which are used for receiving the gradually-changed semitransparent picture to be processed and splitting the gradually-changed semitransparent picture to be processed into a gradually-changed part and a color information part; compressing the gradient portion into basic semi-transparent information and a first pixel width, wherein the basic semi-transparent information is a basic unit without repeated image characteristics in the gradient portion; compressing the color information part into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information; and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end. In the process, only basic semi-transparent information and the first pixel width, basic color information and the second pixel width are reserved when the gradient part and the color information part are compressed, so that the information storage in the compression process is reduced, the basic color information and the basic semi-transparent information are reserved, and the quality of the picture is ensured.

Description

Method and device for processing gradually-changed semitransparent picture
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for processing a gradually-changed semitransparent picture.
Background
In the installation of game software, a large number of picture resources with gradually changed semi-transparent parts usually occupy more capacity, so that the size of a game software installation package and the size of a game running memory are influenced. In order to reduce the size of the game software installation package and the size of the running memory, the gradually-changed semitransparent pictures need to be compressed.
In the prior art, for compression processing of a gradually-changing semitransparent picture, a method of directly reducing and then enlarging the picture or a compression mode of sacrificing details of the picture is generally adopted, so that the quality of the gradually-changing semitransparent picture is reduced in a reduction process.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for processing a gradually-changing semitransparent picture, so as to solve the problem that in the prior art, for compression processing of a gradually-changing semitransparent picture, a method of directly reducing and then enlarging the gradually-changing semitransparent picture is generally adopted, or a compression method of sacrificing details of the picture is used, so that the quality of the gradually-changing semitransparent picture is reduced in a reduction process. The specific scheme is as follows:
a processing method of a gradually-changed semitransparent picture is applied to a sending end and comprises the following steps:
receiving a to-be-processed gradient semitransparent picture, and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part;
compressing the gradient portion into base semi-transparent information and a first pixel width, wherein the base semi-transparent information is a basic unit without repeated image characteristics in the gradient portion;
compressing the color information into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information;
and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end.
The method described above, optionally, compressing the gradient portion into the base semi-transparent information and the first pixel width, includes:
making a black-and-white channel corresponding to the gradient part, and representing the semitransparent information corresponding to the gradient part through the black-and-white channel;
and selecting basic semi-transparent information in the black and white channel based on the image characteristics and acquiring a first pixel width corresponding to the basic semi-transparent information, wherein the first pixel width is the pixel width of the basic semi-transparent information in the gradual change part.
The method described above, optionally, compressing the color information part into basic color information and a second pixel width, includes:
traversing color features in the color information part, and selecting basic color information in the color special mode;
and acquiring a second pixel width in the color information part, wherein the second pixel width is the pixel width of the basic color information in the color information.
Optionally, the method for splitting the to-be-processed gradient translucent picture into the gradient portion and the color information portion includes:
acquiring a first channel of the gradually-changed semitransparent picture, and acquiring semitransparent information of the gradually-changed part in the first channel;
and acquiring a second channel of the gradually-changed semitransparent picture, and acquiring color information of the color information part in the second channel.
A processing method of a gradually-changed semitransparent picture is applied to a receiving end and comprises the following steps:
receiving base translucency information, a first pixel width, base color information, and a second pixel width;
generating a gradient portion based on the base translucency information and the first pixel width;
generating a color information portion based on the base color information and the second pixel width;
and superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed.
A processing device for gradually changing semitransparent pictures is applied to a sending end and comprises:
the splitting module is used for receiving a to-be-processed gradient semitransparent picture and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part;
a first compression module, configured to compress the gradient portion into base semi-transparent information and a first pixel width, where the base semi-transparent information is a basic unit in which no repeated image feature exists in the gradient portion;
a second compression module, configured to compress the color information into basic color information and a second pixel width, where the basic color information is a basic unit in which no repetitive color feature exists in the color information;
and the sending module is used for sending the basic semitransparent information, the first pixel width, the basic color information and the second pixel width to a receiving end.
The above apparatus, optionally, the first compression module includes:
the manufacturing unit is used for manufacturing a black and white channel corresponding to the gradual change part and representing the semitransparent information corresponding to the gradual change part through the black and white channel;
and the first selecting unit is used for selecting basic semi-transparent information in the black and white channel based on the image characteristics and acquiring a first pixel width corresponding to the basic semi-transparent information, wherein the first pixel width is the pixel width of the basic semi-transparent information in the gradual change part.
The above apparatus, optionally, the second compression module includes:
the second selection unit is used for traversing the color characteristics in the color information part and selecting basic color information in the color special mode;
a first obtaining unit, configured to obtain a second pixel width in the color information portion, where the second pixel width is a pixel width of the basic color information in the color information.
The above apparatus, optionally, the splitting module includes:
a second obtaining unit, configured to obtain a first channel of the gradient translucent picture, and obtain the translucent information of the gradient portion in the first channel;
a third obtaining unit, configured to obtain a second channel of the gradient translucent picture, and obtain color information of the color information portion in the second channel.
A processing device for gradually-changed semitransparent pictures is applied to a receiving end and comprises:
a receiving module for receiving basic semi-transparent information, a first pixel width, basic color information and a second pixel width;
a first generation module to generate a gradient portion based on the base translucency information and the first pixel width;
a second generating module for generating a color information part based on the base color information and the second pixel width;
and the superposition module is used for superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed.
Compared with the prior art, the invention has the following advantages:
the invention discloses a method and a device for processing a gradually-changed semitransparent picture, which are applied to a sending end, and the method comprises the following steps: receiving a to-be-processed gradient semitransparent picture, splitting the to-be-processed gradient semitransparent picture into a gradient part and receiving the to-be-processed gradient semitransparent picture, and splitting the to-be-processed gradient semitransparent picture into the gradient part and a color information part; compressing the gradient portion into basic semi-transparent information and a first pixel width, wherein the basic semi-transparent information is a basic unit without repeated image characteristics in the gradient portion; compressing the color information part into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information; and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end. In the process, only basic semi-transparent information and the first pixel width, basic color information and the second pixel width are reserved when the gradient part and the color information part are compressed, so that the information storage in the compression process is reduced, the basic color information and the basic semi-transparent information are reserved, and the quality of the picture is ensured.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a processing method of a gradient semitransparent picture disclosed in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating compression of a gradually-changing semitransparent picture according to an embodiment of the present application;
fig. 3 is another flowchart of a method for processing a gradient translucent picture according to an embodiment of the present application;
fig. 4 is a block diagram of a processing apparatus for gradient semitransparent pictures according to an embodiment of the present disclosure;
fig. 5 is a block diagram of another structure of a device for processing a gradient translucent picture according to an embodiment of the present application.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The invention discloses a method and a device for processing a gradually-changed semitransparent picture, which are applied to the processing process of the gradually-changed semitransparent picture. In the conventional gradual change semi-transparent picture resource output, a method of directly reducing and then enlarging picture resources is generally adopted when the picture resources want to compress the capacity, or details of the picture are sacrificed, so that the picture quality is reduced, namely destructive compression', and the invention aims to perform lossless compression on the gradual change semi-transparent picture resources, keep the quality unchanged, reduce the capacity by more than 90%, further make more resources meet other requirements, and further improve the running efficiency and the utilization rate of games. Aiming at the gradually-changed semitransparent picture resources, the invention adopts a new mode in the compression and reduction processes of the picture resources to achieve the purposes of reducing the resource capacity and keeping the quality unchanged.
In the embodiment of the present invention, the processing procedure includes a compression procedure at a sending end and a restoration procedure at a receiving end, where the sending end and the receiving end may be any terminals, the sending end includes an application for implementing picture compression, preferably, the application is Photoshop, and the sending end includes an application for implementing picture restoration, preferably, the application is Unity, so that the present invention provides a processing method for gradually changing a semitransparent picture, which is applied to the sending end, where an execution flow of the method is shown in fig. 1, and includes the steps of:
s101, receiving a to-be-processed gradient translucent picture, and splitting the to-be-processed gradient translucent picture into a gradient part and a color information part;
in the embodiment of the invention, the sending end receives the semi-transparent picture to be processed, the semi-transparent picture to be processed is opened in the sending end photoshop software, each semi-transparent picture to be processed in the photoshop software is a self-contained channel, black represents 100% transparency, white represents 100% opacity, and the gradual change part and the color information part of the semi-transparent picture to be processed are obtained in the channel, and the specific obtaining process is as follows: acquiring a first channel of the gradually-changed semitransparent picture, and acquiring semitransparent information of the gradually-changed part in the first channel; and acquiring a second channel of the gradually-changed semitransparent picture, and acquiring color information of the color information part in the second channel. The first channel and the second channel are corresponding channels in the photoshop software, the gradient portion is used for representing the gray-scale characteristics of the gradient semi-transparent picture to be processed, the gradient portion is a gray-scale picture, the gradient portion adopts a black-and-white channel mode to represent semi-transparent information through the black-and-white channel, the color information portion is used for representing the color information of the gradient semi-transparent picture to be processed, and the color information portion is a color picture.
S102, compressing the gradient portion into basic semi-transparent information and a first pixel width, wherein the basic semi-transparent information is a basic unit without repeated image features in the gradient portion;
in an embodiment of the present invention, the gradient portion includes semi-transparent information, a black-and-white channel corresponding to the gradient portion is created, the semi-transparent information is represented based on the black-and-white channel, and basic semi-transparent information is selected in the black-and-white channel by cutting based on the image feature of the semi-transparent information, where the basic semi-transparent information is a basic unit representing the image information in the gradient portion, and is a minimum unit to which the same content in the gradient portion can be compressed, and is a non-repeating segment in the image feature, and preferably, the basic semi-transparent picture is a JPG picture, for example, a pixel, as shown in fig. 2, and the basic semi-transparent information is shown in 2-1 in fig. 2. And simultaneously acquiring a first pixel width corresponding to the basic semi-transparent information, wherein the first pixel width is the pixel width of the basic semi-transparent information in the gradual change part. For example, if the gradient portion is a gradient picture from top to bottom, the pixel width is the pixel width of the gradient picture.
Opening a picture and clicking a layer panel, directly clicking the layer by pressing a ctrl + left mouse button to form a selected area, opening the channel panel, building a new channel, filling white in the selected area, copying and pasting a black-white channel picture into the layer panel.
S103, compressing the color information part into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color features in the color information;
in an embodiment of the present invention, the color information portion includes color features of the to-be-processed gradient translucent picture, the color features are traversed, and basic color information is selected in the color features in a cropping manner, where the basic color information is a basic unit in which no repetitive color feature exists in the color information, and preferably, the color features are color values corresponding to colors, and the basic color information is a minimum unit including all color information in the to-be-processed gradient translucent picture and is a non-repetitive segment in the color feature, and preferably, the basic color information unit is an IPG picture as shown in fig. 2, and the basic color information is 2-2.
Furthermore, if the color part information is a single color and does not have gradual change, a suction pipe tool can be adopted to directly suck the basic color information.
S104, sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end.
In the embodiment of the present invention, for the gradual change portion, all information is not retained in the compression process, and only the basic translucent information and the first pixel width are retained, so that the occupied space is small, as shown in fig. 2, the basic translucent information after the gradual change portion is compressed is identified based on the wang software, and the obtained information is as follows: item type: see picture king IPG picture file, resolution: 1 × 455, size: 1.55 KB. As for the color information, not all information is retained in the compression process, and only the basic color information and the second pixel width are retained, so that the occupied space is small, as shown in fig. 2, the basic color information after the color information is partially compressed is identified based on the wang software, and the obtained information is as follows: item type: see king JPG picture file, resolution: 3 × 3, size: 1.10 KB. After the compression is performed based on the compression method, the to-be-processed gradient translucent picture is 2.65KB, so that the space occupation is reduced, and further, the basic translucent information, the first pixel width, the basic color information and the second pixel width are sent to a receiving end, so that the receiving end restores the to-be-processed gradient translucent picture based on the basic translucent information, the first pixel width, the basic color information and the second pixel width.
The invention discloses a method for processing a gradually-changed semitransparent picture, which is applied to a sending end and comprises the following steps: receiving a to-be-processed gradient semitransparent picture, and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part; compressing the gradient portion into basic semi-transparent information and a first pixel width, wherein the basic semi-transparent information is a basic unit without repeated image characteristics in the gradient portion; compressing the color information part into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information; and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end. In the process, only basic semi-transparent information and the first pixel width, basic color information and the second pixel width are reserved when the gradient part and the color information part are compressed, so that the information storage in the compression process is reduced, the basic color information and the basic semi-transparent information are reserved, and the quality of the picture is ensured.
The embodiment of the invention provides a processing method of a gradually-changed semitransparent picture, which is applied to a receiving end, wherein the execution flow of the processing method is shown in figure 3, and the processing method comprises the following steps:
s201, receiving basic semi-transparent information, first pixel width, basic color information and second pixel width;
in this embodiment of the present invention, it is preferable that the receiving end includes a game engine Unity, and the receiving end receives the transmitted basic translucent information, the first pixel width, the basic color information, and the second pixel width.
S202, generating a gradient part based on the basic semi-transparent information and the first pixel width;
in the embodiment of the invention, the basic semi-transparent information and the first pixel width information are restored, and the basic semi-transparent information is stretched to the original size along the non-gradient direction based on the first pixel width in the restoration process to obtain the gradient part.
S203, generating a color information part based on the basic color information and the second pixel width;
in the embodiment of the present invention, the reduction is performed based on the basic color information and the second pixel width, and the reduction process is performed by stretching the color-based information to an original size in a non-gradual change direction based on the second pixel width to obtain the color information portion.
Further, if the basic color information indicates that there is no gradation for a single color, the second pixel width includes two pixel width values:
and S204, overlapping the gradient part and the color information part to obtain a gradient semitransparent picture to be processed.
In the embodiment of the invention, the gradient part and the color information part are superposed to obtain the gradient semitransparent picture to be processed based on the game engine Unity. The method for superposing the two kinds of picture information in the game engine is similar to that of photoshop, the process is only reversed, color blocks of the color information display part need to be amplified to the original size, channel resources of the gradual change display part need to be amplified to the original size, and the gradual change semitransparent picture to be processed can be automatically generated by superposing the two kinds of picture information.
The invention discloses a processing method of a gradually-changed semitransparent picture, which is applied to a receiving end and comprises the following steps: receiving base translucency information, a first pixel width, base color information, and a second pixel width; generating a gradient portion based on the base translucency information and the first pixel width; generating a color information portion based on the base color information and the second pixel width; and superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed. In the above process, the gradual change portion may restore the picture with unchanged quality based on the basic translucent information and the first pixel width, and the color information portion may restore the picture with unchanged quality based on the basic color information and the second pixel width, and since the picture quality of the gradual change portion and the color basic information portion is unchanged, the quality of the gradual change translucent picture to be processed, which is superimposed based on the gradual change portion and the color information portion, is unchanged.
Based on the foregoing processing method for a gradually-changed semitransparent picture, which is applied to a sending end, an embodiment of the present invention provides a processing apparatus for a gradually-changed semitransparent picture, which is applied to a sending end, and a structural block diagram of the processing apparatus is shown in fig. 4, and includes:
a splitting module 301, a first compression module 302, a second compression module 303, and a sending module 304.
Wherein the content of the first and second substances,
the splitting module 301 is configured to receive a to-be-processed gradient translucent picture, and split the to-be-processed gradient translucent picture into a gradient portion and a color information portion;
the first compression module 302 is configured to compress the gradient portion into base semi-transparent information and a first pixel width, where the base semi-transparent information is a basic unit in which no repeated image feature exists in the gradient portion;
the second compression module 303 is configured to partially compress the color information into basic color information and a second pixel width, where the basic color information is a basic unit in which there is no repetitive color feature in the color information;
the sending module 304 is configured to send the basic semi-transparent information, the first pixel width, the basic color information, and the second pixel width to a receiving end.
The invention discloses a processing device of a gradually-changed semitransparent picture, which is applied to a sending end and comprises the following components: receiving a to-be-processed gradient semitransparent picture, and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part; compressing the gradient portion into basic semi-transparent information and a first pixel width, wherein the basic semi-transparent information is a basic unit without repeated image characteristics in the gradient portion; compressing the color information part into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information; and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end. In the process, only basic semi-transparent information and the first pixel width, basic color information and the second pixel width are reserved when the gradient part and the color information part are compressed, so that the information storage in the compression process is reduced, the basic color information and the basic semi-transparent information are reserved, and the quality of the picture is ensured.
In this embodiment of the present invention, the first compression module package 302 includes:
a production unit 305 and a first selection unit 306.
Wherein the content of the first and second substances,
the making unit 305 is configured to make a black-and-white channel corresponding to the gradient portion, and represent the translucent information corresponding to the gradient portion through the black-and-white channel;
the first selecting unit 306 is configured to select basic semi-transparent information in the black-and-white channel based on the image feature to which the image belongs, and obtain a first pixel width corresponding to the basic semi-transparent information, where the first pixel width is a pixel width of the basic semi-transparent information in the gradient portion.
In this embodiment of the present invention, the second compression module 303 includes:
a second selecting unit 307 and a first acquiring unit 308.
Wherein the content of the first and second substances,
the second selecting unit 307 is configured to traverse the color features in the color information part, and select basic color information in the color special type;
the first obtaining unit 308 is configured to obtain a second pixel width in the color information portion, where the second pixel width is a pixel width of the basic color information in the color information.
In this embodiment of the present invention, the splitting module 301 includes:
a second acquisition unit 309 and a third acquisition unit 310.
Wherein the content of the first and second substances,
the second obtaining unit 309, configured to obtain a first channel of the gradient translucent picture, and obtain the translucent information of the gradient portion in the first channel;
the third obtaining unit 310 is configured to obtain a second channel of the gradient translucent picture, and obtain color information of the color information portion in the second channel.
Based on the foregoing processing method for a gradually-changed semitransparent picture, which is applied to a receiving end, an embodiment of the present invention further provides a processing apparatus for a gradually-changed semitransparent picture, which is applied to a receiving end, and a structural block diagram of the processing apparatus is shown in fig. 5, and includes:
a receiving module 401, a first generating module 402, a second generating module 403 and a superimposing module 404.
Wherein the content of the first and second substances,
the receiving module 401 is configured to receive basic semi-transparent information, a first pixel width, basic color information, and a second pixel width;
the first generating module 402, configured to generate a gradient portion based on the base translucency information and the first pixel width;
the second generating module 403 is configured to generate a color information part based on the base color information and the second pixel width;
the superimposing module 404 is configured to superimpose the gradient portion and the color information portion to obtain a gradient semitransparent picture to be processed.
The invention discloses a processing device of a gradually-changed semitransparent picture, which is applied to a receiving end and comprises the following components: receiving base translucency information, a first pixel width, base color information, and a second pixel width; generating a gradient portion based on the base translucency information and the first pixel width; generating a color information portion based on the base color information and the second pixel width; and superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed. In the above process, the gradual change portion may restore the picture with unchanged quality based on the basic translucent information and the first pixel width, and the color information portion may restore the picture with unchanged quality based on the basic color information and the second pixel width, and since the picture quality of the gradual change portion and the color basic information portion is unchanged, the quality of the gradual change translucent picture to be processed, which is superimposed based on the gradual change portion and the color information portion, is unchanged.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A processing method of a gradually-changed semitransparent picture is applied to a sending end and comprises the following steps:
receiving a to-be-processed gradient semitransparent picture, and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part;
compressing the gradient portion into base semi-transparent information and a first pixel width, wherein the base semi-transparent information is a basic unit without repeated image characteristics in the gradient portion;
compressing the color information into basic color information and a second pixel width, wherein the basic color information is a basic unit without repeated color characteristics in the color information;
and sending the basic semi-transparent information, the first pixel width, the basic color information and the second pixel width to a receiving end.
2. The method of claim 1, wherein compressing the gradient portion to a base semi-transparent information and a first pixel width comprises:
making a black-and-white channel corresponding to the gradient part, and representing the semitransparent information corresponding to the gradient part through the black-and-white channel;
and selecting basic semi-transparent information in the black and white channel based on the image characteristics and acquiring a first pixel width corresponding to the basic semi-transparent information, wherein the first pixel width is the pixel width of the basic semi-transparent information in the gradual change part.
3. The method of claim 1, wherein compressing the color information portion into base color information and a second pixel width comprises:
traversing color features in the color information part, and selecting basic color information in the color special mode;
and acquiring a second pixel width in the color information part, wherein the second pixel width is the pixel width of the basic color information in the color information.
4. The method according to claim 1, wherein splitting the to-be-processed gradient translucent picture into a gradient portion and a color information portion comprises:
acquiring a first channel of the gradually-changed semitransparent picture, and acquiring semitransparent information of the gradually-changed part in the first channel;
and acquiring a second channel of the gradually-changed semitransparent picture, and acquiring color information of the color information part in the second channel.
5. A processing method of a gradually-changed semitransparent picture is applied to a receiving end and comprises the following steps:
receiving base translucency information, a first pixel width, base color information, and a second pixel width;
generating a gradient portion based on the base translucency information and the first pixel width;
generating a color information portion based on the base color information and the second pixel width;
and superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed.
6. The utility model provides a processing apparatus of gradual change translucent picture which is characterized in that, is applied to the sending end, includes:
the splitting module is used for receiving a to-be-processed gradient semitransparent picture and splitting the to-be-processed gradient semitransparent picture into a gradient part and a color information part;
a first compression module, configured to compress the gradient portion into base semi-transparent information and a first pixel width, where the base semi-transparent information is a basic unit in which no repeated image feature exists in the gradient portion;
a second compression module, configured to compress the color information into basic color information and a second pixel width, where the basic color information is a basic unit in which no repetitive color feature exists in the color information;
and the sending module is used for sending the basic semitransparent information, the first pixel width, the basic color information and the second pixel width to a receiving end.
7. The apparatus of claim 6, wherein the first compression module comprises:
the manufacturing unit is used for manufacturing a black and white channel corresponding to the gradual change part and representing the semitransparent information corresponding to the gradual change part through the black and white channel;
and the first selecting unit is used for selecting basic semi-transparent information in the black and white channel based on the image characteristics and acquiring a first pixel width corresponding to the basic semi-transparent information, wherein the first pixel width is the pixel width of the basic semi-transparent information in the gradual change part.
8. The apparatus of claim 6, wherein the second compression module comprises:
the second selection unit is used for traversing the color characteristics in the color information part and selecting basic color information in the color special mode;
a first obtaining unit, configured to obtain a second pixel width in the color information portion, where the second pixel width is a pixel width of the basic color information in the color information.
9. The apparatus of claim 6, wherein the splitting module comprises:
a second obtaining unit, configured to obtain a first channel of the gradient translucent picture, and obtain the translucent information of the gradient portion in the first channel;
a third obtaining unit, configured to obtain a second channel of the gradient translucent picture, and obtain color information of the color information portion in the second channel.
10. The processing device of the gradually-changed semitransparent picture is applied to a receiving end and comprises the following components:
a receiving module for receiving basic semi-transparent information, a first pixel width, basic color information and a second pixel width;
a first generation module to generate a gradient portion based on the base translucency information and the first pixel width;
a second generating module for generating a color information part based on the base color information and the second pixel width;
and the superposition module is used for superposing the gradient part and the color information part to obtain a gradient semitransparent picture to be processed.
CN202110806551.7A 2021-07-16 2021-07-16 Method and device for processing gradually-changed semitransparent picture Pending CN113538220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110806551.7A CN113538220A (en) 2021-07-16 2021-07-16 Method and device for processing gradually-changed semitransparent picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110806551.7A CN113538220A (en) 2021-07-16 2021-07-16 Method and device for processing gradually-changed semitransparent picture

Publications (1)

Publication Number Publication Date
CN113538220A true CN113538220A (en) 2021-10-22

Family

ID=78099752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110806551.7A Pending CN113538220A (en) 2021-07-16 2021-07-16 Method and device for processing gradually-changed semitransparent picture

Country Status (1)

Country Link
CN (1) CN113538220A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110101792A (en) * 2010-03-09 2011-09-16 (주)네오위즈게임즈 System and method for lossless compression and decompression of image data
CN102821279A (en) * 2012-07-31 2012-12-12 北京天神互动科技有限公司 Picture compression method keeping with alpha channel
CN106296757A (en) * 2015-06-09 2017-01-04 中兴通讯股份有限公司 A kind of image processing method and device
CN106886353A (en) * 2017-02-23 2017-06-23 腾讯科技(深圳)有限公司 The display processing method and device of a kind of user interface
CN107871330A (en) * 2017-12-11 2018-04-03 北京龙创悦动网络科技有限公司 The compression and restoring method of ETC textures, device and realization device
CN111193948A (en) * 2020-01-07 2020-05-22 上海步频电子科技有限公司 Picture transmission and display method and system of display terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110101792A (en) * 2010-03-09 2011-09-16 (주)네오위즈게임즈 System and method for lossless compression and decompression of image data
CN102821279A (en) * 2012-07-31 2012-12-12 北京天神互动科技有限公司 Picture compression method keeping with alpha channel
CN106296757A (en) * 2015-06-09 2017-01-04 中兴通讯股份有限公司 A kind of image processing method and device
CN106886353A (en) * 2017-02-23 2017-06-23 腾讯科技(深圳)有限公司 The display processing method and device of a kind of user interface
CN107871330A (en) * 2017-12-11 2018-04-03 北京龙创悦动网络科技有限公司 The compression and restoring method of ETC textures, device and realization device
CN111193948A (en) * 2020-01-07 2020-05-22 上海步频电子科技有限公司 Picture transmission and display method and system of display terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JMUYJL: "数字图像处理——第八章 图像压缩", pages 1 - 6, Retrieved from the Internet <URL:https://blog.csdn.net/LLyj_/article/details/116724019> *

Similar Documents

Publication Publication Date Title
US11429852B2 (en) Convolution acceleration and computing processing method and apparatus, electronic device, and storage medium
CN101930337B (en) Method for processing on-screen display and associated embedded system
CN111090384B (en) Soft keyboard display method and device
JP2617007B2 (en) Interactive large image processing method
CN102723093B (en) A kind of caching method of image file
CN113538220A (en) Method and device for processing gradually-changed semitransparent picture
CN113011432A (en) Two-dimensional code layered display and identification method and device
CN115471417A (en) Image noise reduction processing method, apparatus, device, storage medium, and program product
CN113992981A (en) Video image processing method and device
CN112685494A (en) Data visualization method, device, equipment and medium
JPH07118002B2 (en) Image processing device
CN112101464B (en) Deep learning-based image sample data acquisition method and device
JP3624013B2 (en) Image processing method and apparatus
CN109064543A (en) A kind of graphical textures load rendering method
JP4375199B2 (en) Image processing apparatus and program
CN114022594B (en) Slope-type geographic information element graph processing method and device
CN111179388B (en) Cartoon editing method and terminal based on 3D scene
CN101227565A (en) System and method for adding dynamic picture in real time image
CN116170643A (en) Multimedia data processing method, system, device, storage medium and program product
CN117827179A (en) Data processing method, device, electronic equipment and storage medium
CN116012532A (en) Live-action three-dimensional model light-weight method and system
CN116758186A (en) Local redrawing method and device
CN118264857A (en) Method, device, electronic equipment, readable storage medium and computer program product for playing video with transparent channel
CN114845163A (en) Recording file compression device and method
JPH04169980A (en) Rendering device

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