CN115049544A - Picture processing method and device and computer readable storage medium - Google Patents
Picture processing method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN115049544A CN115049544A CN202110255194.XA CN202110255194A CN115049544A CN 115049544 A CN115049544 A CN 115049544A CN 202110255194 A CN202110255194 A CN 202110255194A CN 115049544 A CN115049544 A CN 115049544A
- Authority
- CN
- China
- Prior art keywords
- processing
- target picture
- picture
- thumbnail
- preset coefficient
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 19
- 238000000034 method Methods 0.000 claims abstract description 64
- 230000008569 process Effects 0.000 claims abstract description 27
- 230000004044 response Effects 0.000 claims abstract description 9
- 238000004590 computer program Methods 0.000 claims description 13
- 238000005520 cutting process Methods 0.000 claims description 5
- 230000002452 interceptive effect Effects 0.000 abstract description 7
- 238000005516 engineering process Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000015572 biosynthetic process Effects 0.000 description 6
- 238000003786 synthesis reaction Methods 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010295 mobile communication Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000002194 synthesizing effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 229920000642 polymer Polymers 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Studio Circuits (AREA)
Abstract
The invention provides a picture processing method, which comprises the following steps: acquiring processing information corresponding to a target picture, wherein the processing information comprises a thumbnail and a preset coefficient; in response to an operation instruction for the thumbnail, zooming a first key path corresponding to the operation instruction according to a preset coefficient, and generating a second key path corresponding to the target picture; and processing the target picture according to the second key path to obtain a processed target picture. The invention also discloses a video data processing device and a computer readable storage medium. The picture processing method, the picture processing device and the computer readable storage medium can realize the picture processing of the target picture by using the picture processing of the thumbnail, so that the terminal occupies less heap memory in the picture processing process, the use of the heap memory is further saved, the interactive response speed is improved, and the occurrence of OOM abnormity in the picture processing process is effectively prevented.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and a device for processing an image, and a computer-readable storage medium.
Background
With the continuous progress of technology development, picture pixels are higher and higher, and thus the picture size is also increasing, and the picture size is a non-negligible factor in processing the picture.
Currently, when a terminal encounters various scenes requiring picture processing, some mature underlying technologies such as ffmpeg are usually used to process cropping, rotation, composition, and the like of an image. However, when these terminals perform image processing, it is necessary to read in the entire original image data or all image data that needs to be synthesized, which results in excessive use of the heap memory, and consumes a very long time in the process of loading images, which affects the speed of interactive response.
Disclosure of Invention
The invention aims to provide a picture processing method, picture processing equipment and a computer readable storage medium, which are used for processing a thumbnail to realize picture processing on a target picture and solve the problem of excessive memory occupation in the picture processing process.
Specifically, the present invention provides a method for processing a picture, which comprises the following steps: acquiring processing information corresponding to a target picture, wherein the processing information comprises a thumbnail and a preset coefficient; responding to an operation instruction for the thumbnail, zooming a first key path corresponding to the first operation instruction according to the preset coefficient, and generating a second key path corresponding to the target picture; and processing the target picture according to the second key path to obtain a processed target picture.
Specifically, the invention provides a method for processing a picture, which comprises the following steps: the method comprises the steps that a first terminal sends processing information corresponding to a target picture to a second terminal, wherein the processing information comprises a thumbnail and a preset coefficient; the second terminal responds to an operation instruction of the thumbnail, zooms a first key path corresponding to the first operation instruction according to the preset coefficient, and generates a second key path corresponding to the target picture; and the second terminal processes the target picture according to the second key path to obtain a processed target picture.
Specifically, the present invention provides a video data processing apparatus, comprising: a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program to implement the steps of the picture processing method as described above.
In particular, the present invention provides a computer-readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement the picture processing method as described above.
The picture processing method, the picture processing device and the computer readable storage medium provided by the invention can generate the second key path corresponding to the target picture by acquiring the processing information corresponding to the target picture, responding to the operation instruction of the thumbnail after the processing information comprises the thumbnail and the preset coefficient, zooming the operation instruction according to the preset coefficient, and processing the target picture according to the second key path to obtain the processed target picture, so that the terminal occupies less heap memory in the picture processing process, the use of the heap memory is saved, the interactive response speed is improved, and the occurrence of OOM (object-oriented memory) abnormity in the picture processing process is effectively prevented.
Drawings
Fig. 1 is a flowchart of a method for processing a picture according to an embodiment of the present invention;
fig. 2 is a partial flowchart of a method for processing a picture according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a target picture being zoomed into a thumbnail in the picture processing method according to an embodiment of the present invention;
fig. 4 is a partial flowchart of a method for processing a picture according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating scaling of an operation instruction into a second critical path in the method for processing an image according to the embodiment of the invention;
fig. 6 is a schematic view of an application scenario of a method for processing a picture according to an embodiment of the present invention;
fig. 7 shows a block diagram of a terminal;
fig. 8 is a flowchart of a method for processing a picture according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a picture processing device according to an embodiment of the present invention.
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.
Example one
An embodiment of the present invention provides a method for processing a picture, and fig. 1 is a flowchart of the method for processing the picture according to the embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step 110: and acquiring processing information corresponding to the target picture, wherein the processing information comprises a thumbnail and a preset coefficient.
Specifically, the processing information may be, but is not limited to, information stored in the terminal itself, or information transmitted from another terminal. The target picture may be, but is not limited to, a normal-sized and normal-sized picture that requires image processing. The thumbnail may be, but is not limited to, a picture generated according to a preset coefficient based on a normal picture.
In an embodiment, as shown in fig. 2, the step of acquiring processing information corresponding to the target picture, where the processing information includes a thumbnail and a preset coefficient includes:
step 210: acquiring a target picture;
step 220: keeping the aspect ratio of the target picture unchanged, and generating a thumbnail corresponding to the target picture according to a preset coefficient.
Specifically, the acquisition target picture may be, but is not limited to, acquired from the terminal itself, or acquired from another terminal. And under the condition of keeping the aspect ratio of the target picture unchanged, generating a thumbnail corresponding to the target picture according to a preset coefficient. The preset coefficient may be, but not limited to, set by the user, or may be automatically generated according to the size of the terminal memory. The preset coefficient is a reference value for generating a thumbnail corresponding to the target picture, the thumbnail being displayed in the operation area with a lower memory occupied than the target picture. The height and width size of the thumbnail is equal to/the preset coefficient of the height and width size of the target picture corresponding to the thumbnail. For example, as shown in fig. 3, the normal picture 31 has a height H1 and a width W1, and the thumbnail picture 32 has a height H2 and a width W2 after scaling by a preset coefficient S.
In an embodiment, as shown in fig. 4, the step of acquiring processing information corresponding to the target picture, where the processing information includes a thumbnail and a preset coefficient includes:
step 410: detecting whether the self heap memory occupation is larger than a preset value;
step 420: and if the occupation of the heap memory is larger than a preset value, executing the step of acquiring processing information corresponding to the target picture, wherein the processing information comprises a thumbnail and a preset coefficient.
Specifically, the predetermined value may be, but is not limited to, zero, that is, as long as it is detected that the heap memory of the image capture device is occupied, the step of obtaining processing information corresponding to the target image is performed, where the processing information includes a thumbnail and a preset coefficient. The predetermined value may be set according to the terminal conditions.
Step 120: and responding to an operation instruction of the thumbnail, zooming the first key path corresponding to the operation instruction according to a preset coefficient, and generating a second key path corresponding to the target picture.
Specifically, in the process of displaying a thumbnail in the operation area, the user performs a picture processing operation with respect to the thumbnail. The operation instruction may be, but is not limited to, cropping, synthesizing, rotating, and the like of the thumbnail. In one embodiment, the operation instructions include: cutting the thumbnail; and/or performing a composition operation on the thumbnail; and/or perform a rotation operation on the thumbnail. Specifically, a first critical path corresponding to the operation instruction is calculated according to a preset coefficient, and a second critical path for performing picture processing on the target picture is generated. For example, as shown in fig. 5, if the cropping or synthesis region 51 specified by the first key path for the thumbnail has height H3 and W3, respectively, and the rotation angle a has relative coordinates (DX, DY) with respect to the top left vertex of the thumbnail, the second key path generated by the preset coefficient has coordinates (DX S, DY S) with respect to the top left vertex of the target picture for the cropping or synthesis region 52 specified by the pair of second key paths, and has height H4 ═ H3 ═ S, W4 ═ W3 ×, respectively, and the rotation angle a is recorded. The rotation angle a may be, but is not limited to, equal to zero.
Step 130: and processing the target picture according to the second key path to obtain a processed target picture.
Specifically, after the second critical path is generated, an api corresponding to a bitmap or ffmpeg is called for processing, and an image-processed target picture is generated. If the target picture is cut, executing a cutting area on the target picture, generating a target picture after picture processing, and rotating the target picture by an angle A; if the image needs to be merged is the synthesis operation, the image needing to be merged is zoomed to the size of the determined synthesis area and rotates by an angle A, the bitmap generated in the step is recorded as bm2, a draw function is called, the original image bm1 is drawn firstly, then bm2 is drawn, and the function parameters are transmitted to the upper left corner coordinates after playback. In an embodiment, the step of processing the target picture according to the second critical path to obtain a processed target picture includes: and processing the target picture through the bottom library so as to save the heap memory.
According to the picture processing method provided by the embodiment of the application, after the processing information comprises the thumbnail and the preset coefficient, the processing information responds to the operation instruction of the thumbnail after zooming the first key path corresponding to the operation instruction according to the preset coefficient, the second key path corresponding to the target picture is generated, and the target picture is processed according to the second key path to obtain the processed target picture, so that the occupied heap memory of the terminal in the picture processing process is less, the use of the heap memory is saved, the interactive response speed is improved, and the occurrence of OOM abnormity in the picture processing process is effectively prevented.
Example two
As shown in fig. 6, an application scenario schematic diagram of a picture processing method according to an embodiment of the present invention is provided, where the application scenario includes a first terminal 61 and a second terminal 62, where the first terminal 61 is configured to send processing information corresponding to a target picture to the second terminal 62, and the processing information includes a thumbnail and a preset coefficient. The second terminal 62 is configured to respond to an operation instruction for the thumbnail, scale the first critical path corresponding to the operation instruction according to a preset coefficient, generate a second critical path corresponding to the target picture, and process the target picture according to the second critical path to obtain a processed target picture. When the target picture is processed according to the second critical path, the target picture can be processed by using a C + + based bottom library such as ffmpeg, so that the occupied heap memory of the terminal in the picture processing process is less, the use of the heap memory is saved, the interactive response speed is improved, and OOM abnormity is effectively prevented from occurring in the picture processing process.
In an embodiment, the first terminal 61 may be a smart phone, a tablet computer, or the like, and is configured to send processing information corresponding to the target picture to the second terminal 62, where the processing information includes a thumbnail and a preset coefficient.
In an embodiment, the second terminal 62 may be a smart phone, a Personal Computer (PC), a kiosk, a laptop Computer, or the like, and is configured to respond to an operation instruction for the thumbnail, scale a first critical path corresponding to the operation instruction according to a preset coefficient, generate a second critical path corresponding to the target picture, and process the target picture according to the second critical path to obtain a processed target picture.
Fig. 7 shows a block diagram of a terminal. The structure shown in fig. 7 is applicable to the first terminal 61 and the second terminal 62. As shown in fig. 7, the terminal 10 includes a memory 102, a memory controller 104, one or more processors 106 (only one shown), a peripheral interface 108, a radio frequency module 110, a positioning module 112, a camera module 114, an audio module 116, a screen 118, and a key module 120. These components communicate with each other via one or more communication buses/signal lines 122.
It will be appreciated that the configuration shown in fig. 7 is merely illustrative and that terminal 10 may include more or fewer components than shown in fig. 7 or may have a different configuration than shown in fig. 7. The components shown in fig. 7 may be implemented in hardware, software, or a combination thereof.
The memory 102 may be used to store software programs and modules, such as program instructions/modules corresponding to the connection method of the screen projection in the embodiment of the present invention, and the processor 106 executes various functional applications and data processing by running the software programs and modules stored in the storage controller 104, that is, implements the above-mentioned picture processing method.
In some embodiments, the peripheral interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 110 is used for receiving and transmitting electromagnetic waves, so as to achieve mutual conversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. The rf module 110 may include various existing circuit elements for performing these functions, such as an antenna, an rf transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The rf module 110 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network described above may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), bluetooth, Wireless Fidelity (WiFi) (e.g., institute of electrical and electronics engineers standard IEEE802.11 a, IEEE802.11 b, IEEE802.1 g, and/or IEEE802.1 n), Voice over internet (VoIP), Wireless internet for internet Access (Wi-Max), and any other suitable protocols for short message Communication, and may even include those protocols that have not yet been developed.
The positioning module 112 is used for acquiring the current position of the terminal 10. Examples of the positioning module 112 include, but are not limited to, a global positioning satellite system (GPS), a wireless local area network-based positioning technology, or a mobile communication network-based positioning technology.
The camera module 114 is used to take a picture or video. The pictures or videos taken may be stored in the memory 102 and transmitted through the radio frequency module 110.
The screen 118 provides an output interface between the terminal 10 and the user. In particular, screen 118 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some of the output results are for some of the user interface objects. It is understood that the screen 118 may also include a touch screen. The touch screen provides both an output and an input interface between the terminal 10 and a user. In addition to displaying video output to users, touch screens also receive user input, such as user clicks, swipes, and other gesture operations, so that user interface objects respond to these user input. The technology of detecting user input may be based on resistive, capacitive, or any other possible touch detection technology. Specific examples of touch screen display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.
The key module 120 also provides an interface for user input to the terminal 10, and the user may press various keys to cause the terminal 10 to perform various functions.
An embodiment of the present invention provides a method for processing a picture, and fig. 8 is a flowchart of the method for processing the picture according to the embodiment of the present invention. As shown in fig. 8, the method includes the steps of:
step 810: the first terminal sends processing information corresponding to the target picture to the second terminal, and the processing information comprises a thumbnail and a preset coefficient.
Specifically, the processing information may be, but is not limited to, information stored in the terminal itself, or information transmitted from another terminal. The target picture may be, but is not limited to, a normal-sized and normal-sized picture that requires image processing. The thumbnail may be, but is not limited to, a picture generated according to a preset coefficient based on a normal picture.
In one embodiment, the first terminal sends processing information corresponding to the target picture to the second terminal, and the step of processing the information including the thumbnail and the preset coefficient includes: the first terminal obtains the target picture, keeps the aspect ratio of the target picture unchanged, and generates a thumbnail corresponding to the target picture according to a preset coefficient.
Specifically, the acquisition target picture may be, but is not limited to, acquired from the terminal itself, or acquired from another terminal. And under the condition of keeping the height-width ratio of the target picture unchanged, generating a thumbnail corresponding to the target picture according to a preset coefficient. The preset coefficient may be, but not limited to, set by the user, or may be automatically generated according to the size of the terminal memory. The preset coefficient is a reference value for generating a thumbnail corresponding to the target picture, and the thumbnail is displayed in the operation area and occupies a lower heap memory than the target picture. The height and width size of the thumbnail is equal to the height and width size/preset coefficient of the target picture corresponding to the thumbnail. For example, as shown in fig. 3, the normal picture 31 has a height H1 and a width W1, and the thumbnail picture 32 has a height H2 and a width W2 after scaling by a preset coefficient S.
Step 820: and the second terminal responds to the operation instruction of the thumbnail, scales the first key path corresponding to the operation instruction according to a preset coefficient, and generates a second key path corresponding to the target picture.
Specifically, in the process of displaying a thumbnail in the operation area, the user performs a picture processing operation with respect to the thumbnail. The operation instruction may be, but is not limited to, cropping, synthesizing, rotating, and the like of the thumbnail. In one embodiment, the operation instructions include: cutting the thumbnail; and/or performing a composition operation on the thumbnail; and/or perform a rotation operation on the thumbnail.
Specifically, a first critical path corresponding to the operation instruction is calculated according to a preset coefficient, and a second critical path for performing picture processing on the target picture is generated. For example, as shown in fig. 5, if the cropping or composition region 51 specified by the first key path for the thumbnail has a height H3 and a width W3, respectively, and the rotation angle a has relative coordinates (DX, DY) with respect to the top left vertex of the thumbnail, the second key path pair generated based on the preset coefficient has coordinates (DX S, DY S) with respect to the top left vertex of the target picture, and the height H4 and the width W4, respectively, and the rotation angle a is recorded. The rotation angle a may be, but is not limited to, equal to zero.
Step 830: and the second terminal processes the target picture according to the second key path to obtain a processed target picture.
Specifically, after the second critical path is generated, an api corresponding to a bitmap or ffmpeg is called for processing, and an image-processed target picture is generated. If the target picture is cut, executing a cutting area on the target picture, generating a target picture after picture processing, and rotating the target picture by an angle A; if the image needs to be merged is the synthesis operation, the image needing to be merged is zoomed to the size of the determined synthesis area and is rotated by an angle A, the bitmap generated in the step is recorded as bm2, a draw function is called, the original image bm1 is drawn firstly, then bm2 is drawn, and the function parameters are transferred to the upper left corner coordinates after playback. In an embodiment, the step of processing, by the second terminal, the target picture according to the second critical path to obtain a processed target picture specifically includes: and the second terminal processes the target picture through the bottom library so as to save the heap memory.
According to the picture processing method provided by the embodiment of the application, after the processing information comprises the thumbnail and the preset coefficient, the processing information responds to the operation instruction of the thumbnail after zooming the first key path corresponding to the operation instruction according to the preset coefficient, the second key path corresponding to the target picture is generated, and the target picture is processed according to the second key path to obtain the processed target picture, so that the occupied heap memory of the terminal in the picture processing process is less, the use of the heap memory is saved, the interactive response speed is improved, and the occurrence of OOM abnormity in the picture processing process is effectively prevented.
The above embodiment of the method for processing the picture is described in detail, and based on the method for processing the picture described in the above embodiment, an embodiment of the present invention further provides a device corresponding to the method.
Fig. 9 is a schematic diagram illustrating a composition of a video data processing apparatus according to an embodiment of the present invention, and as shown in fig. 9, the apparatus includes a memory 91 and a processor 92.
The memory 91 is used to store a computer program;
the processor 92 is used for executing a computer program to implement the steps of the picture processing method provided in any one of the above embodiments. Since the embodiment of the device part and the embodiment of the method part correspond to each other, the embodiment of the device part is described with reference to the embodiment of the method part, and is not described again here.
According to the video data processing device, the thumbnail can be used for picture processing, so that the picture processing can be performed on the target picture, the heap memory occupied by the terminal in the picture processing process is small, the use of the heap memory is saved, the interactive response speed is improved, and OOM abnormity can be effectively prevented from occurring in the picture processing process.
The above embodiment of the method for processing the picture is described in detail, and based on the method for processing the picture described in the above embodiment, the embodiment of the present invention further provides a computer-readable storage medium corresponding to the method.
A computer-readable storage medium, on which a computer program is stored, the computer storage medium having computer program instructions stored thereon, the computer program instructions, when executed by a processor, implementing the processing method of pictures provided by any of the above embodiments. Since the embodiment of the computer-readable storage medium portion and the embodiment of the method portion correspond to each other, please refer to the embodiment of the method portion for description of the embodiment of the computer-readable storage medium portion, which is not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 a process, method, article, or apparatus that comprises the element.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, where the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. A picture processing method is characterized by comprising the following steps:
acquiring processing information corresponding to a target picture, wherein the processing information comprises a thumbnail and a preset coefficient;
in response to an operation instruction for the thumbnail, zooming a first key path corresponding to the operation instruction according to the preset coefficient, and generating a second key path corresponding to the target picture;
and processing the target picture according to the second key path to obtain a processed target picture.
2. The method for processing the picture according to claim 1, wherein the step of obtaining the processing information corresponding to the target picture, the processing information including the thumbnail and the preset coefficient comprises:
acquiring the target picture;
keeping the aspect ratio of the target picture unchanged, and generating a thumbnail corresponding to the target picture according to the preset coefficient.
3. The method for processing the picture according to claim 1, wherein the step of processing the target picture according to the second critical path to obtain a processed target picture comprises:
and processing the target picture through a bottom library so as to save the heap memory.
4. The method for processing the picture according to claim 1, wherein the step of obtaining the processing information corresponding to the target picture, the processing information including the thumbnail and the preset coefficient comprises:
detecting whether the self heap memory occupation is larger than a preset value;
and if the occupation of the heap memory is larger than a preset value, executing processing information corresponding to the acquired target picture, wherein the processing information comprises a thumbnail and a preset coefficient.
5. The picture processing method according to any one of claims 1 to 4, wherein the operation instruction comprises:
performing cutting operation on the thumbnail; and/or
Performing a composition operation on the thumbnail; and/or
And performing rotation operation on the thumbnail.
6. A picture processing method is characterized by comprising the following steps:
the method comprises the steps that a first terminal sends processing information corresponding to a target picture to a second terminal, wherein the processing information comprises a thumbnail and a preset coefficient;
the second terminal responds to an operation instruction of the thumbnail, zooms a first key path corresponding to the operation instruction according to the preset coefficient, and generates a second key path corresponding to the target picture;
and the second terminal processes the target picture according to the second key path to obtain a processed target picture.
7. The picture processing method according to claim 6, wherein the first terminal sends processing information corresponding to the target picture to the second terminal, and the step of processing the information including the thumbnail and the preset coefficient comprises:
and the first terminal acquires the target picture, keeps the aspect ratio of the target picture unchanged, and generates a thumbnail corresponding to the target picture according to the preset coefficient.
8. The method for processing the picture according to claim 6, wherein the step of processing, by the second terminal, the target picture according to the second critical path to obtain the processed target picture specifically includes:
and the second terminal processes the target picture through a bottom library so as to save heap memory.
9. An apparatus for processing pictures, characterized in that the apparatus comprises: a memory and a processor;
the memory is used for storing a computer program;
the processor is adapted to execute the computer program to implement the steps of the method of processing pictures according to any of claims 1-8.
10. A computer readable storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement a method of processing a picture as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110255194.XA CN115049544A (en) | 2021-03-09 | 2021-03-09 | Picture processing method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110255194.XA CN115049544A (en) | 2021-03-09 | 2021-03-09 | Picture processing method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115049544A true CN115049544A (en) | 2022-09-13 |
Family
ID=83156393
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110255194.XA Pending CN115049544A (en) | 2021-03-09 | 2021-03-09 | Picture processing method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115049544A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005275454A (en) * | 2004-03-22 | 2005-10-06 | Fuji Photo Film Co Ltd | Image processing method, image processing system, image processing device and image processing program |
WO2014178233A1 (en) * | 2013-04-30 | 2014-11-06 | ソニー株式会社 | Image processing device, image processing method and program |
CN106327429A (en) * | 2016-10-24 | 2017-01-11 | 腾讯科技(深圳)有限公司 | Picture synthesis method and device and terminal equipment |
CN111666157A (en) * | 2020-04-03 | 2020-09-15 | 中国科学院电子学研究所苏州研究院 | Rapid processing method and system for geographic space image data |
CN112291627A (en) * | 2020-10-12 | 2021-01-29 | 广州市百果园网络科技有限公司 | Video editing method and device, mobile terminal and storage medium |
-
2021
- 2021-03-09 CN CN202110255194.XA patent/CN115049544A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005275454A (en) * | 2004-03-22 | 2005-10-06 | Fuji Photo Film Co Ltd | Image processing method, image processing system, image processing device and image processing program |
WO2014178233A1 (en) * | 2013-04-30 | 2014-11-06 | ソニー株式会社 | Image processing device, image processing method and program |
CN106327429A (en) * | 2016-10-24 | 2017-01-11 | 腾讯科技(深圳)有限公司 | Picture synthesis method and device and terminal equipment |
CN111666157A (en) * | 2020-04-03 | 2020-09-15 | 中国科学院电子学研究所苏州研究院 | Rapid processing method and system for geographic space image data |
CN112291627A (en) * | 2020-10-12 | 2021-01-29 | 广州市百果园网络科技有限公司 | Video editing method and device, mobile terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108513070B (en) | Image processing method, mobile terminal and computer readable storage medium | |
US10497097B2 (en) | Image processing method and device, computer readable storage medium and electronic device | |
CN110100251B (en) | Apparatus, method, and computer-readable storage medium for processing document | |
CN109089043B (en) | Shot image preprocessing method and device, storage medium and mobile terminal | |
CN104869305B (en) | Method and apparatus for processing image data | |
CN108449641B (en) | Method, device, computer equipment and storage medium for playing media stream | |
CN108495045B (en) | Image capturing method, image capturing apparatus, electronic apparatus, and storage medium | |
US20220094846A1 (en) | Method for selecting image based on burst shooting and electronic device | |
JP2017526316A (en) | Method, apparatus, program and recording medium for processing moving picture file identifier | |
CN109068063B (en) | Three-dimensional image data processing and displaying method and device and mobile terminal | |
CN110839174A (en) | Image processing method and device, computer equipment and storage medium | |
CN111355998A (en) | Video processing method and device | |
CN111176602A (en) | Picture display method and device, storage medium and intelligent device | |
CN110178111B (en) | Image processing method and device for terminal | |
CN111325220B (en) | Image generation method, device, equipment and storage medium | |
CN113409427A (en) | Animation playing method and device, electronic equipment and computer readable storage medium | |
CN111050211B (en) | Video processing method, device and storage medium | |
CN110502290A (en) | Interface display method, device, display equipment and storage medium | |
CN108305262A (en) | File scanning method, device and equipment | |
US11600300B2 (en) | Method and device for generating dynamic image | |
CN113472980A (en) | Image processing method, device, equipment, medium and chip | |
CN110992268B (en) | Background setting method, device, terminal and storage medium | |
CN112235650A (en) | Video processing method, device, terminal and storage medium | |
CN111770275A (en) | Shooting method and device, electronic equipment and readable storage medium | |
CN111556248A (en) | Shooting method, shooting device, storage medium and mobile terminal |
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 |