CN108124147B - Method and system for synthesizing audio PNG picture - Google Patents

Method and system for synthesizing audio PNG picture Download PDF

Info

Publication number
CN108124147B
CN108124147B CN201711184119.9A CN201711184119A CN108124147B CN 108124147 B CN108124147 B CN 108124147B CN 201711184119 A CN201711184119 A CN 201711184119A CN 108124147 B CN108124147 B CN 108124147B
Authority
CN
China
Prior art keywords
data
audio
data block
audio address
png picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711184119.9A
Other languages
Chinese (zh)
Other versions
CN108124147A (en
Inventor
刘德建
郑瑞明
陈庆良
吴载俭
蔡皇宇
樊小龙
刘威
陈丽丽
李正
岳万恕
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201711184119.9A priority Critical patent/CN108124147B/en
Publication of CN108124147A publication Critical patent/CN108124147A/en
Application granted granted Critical
Publication of CN108124147B publication Critical patent/CN108124147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal
    • H04N9/8211Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal the additional signal being a sound signal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Abstract

The invention provides a method and a system for synthesizing a voiced PNG picture, wherein the method comprises the following steps: acquiring PNG picture and audio address data; analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block; adding the audio address data to the image end data block; verifying the image end data block added with the audio address data; and after the verification is successful, sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file to generate a sound PNG picture. The generated PNG picture can be identified and compiled by an android or ios compiler and the file increment of the new PNG picture is very small. And subsequently, the generated PNG picture is analyzed to obtain audio address data therein, and audio is requested to be played according to the audio address data set.

Description

method and system for synthesizing audio PNG picture
Technical Field
the invention relates to the technical field of synthesis of pictures and audios, in particular to a method and a system for synthesizing a vocal PNG picture.
background
With the development of multimedia technology, the user's demand for exhibition is no longer limited to still pictures, but more and more tends to play pictures and audio simultaneously, so the picture and audio synthesis technology is in force. There are many existing picture and audio synthesis software on the market today, such as: the method comprises the steps of drawing sound and shadow, sony vegas, AE and the like, but pictures and audio are synthesized by the software to become videos, synthesized files are too large, or the synthesized PNG pictures cannot be identified and applied by an android or ios compiler, and the synthesized PNG pictures or files cannot be dynamically analyzed and restored.
disclosure of Invention
the technical problem to be solved by the invention is as follows: provided are a method and a system for synthesizing a voiced PNG picture, which can effectively solve the problems that a synthesized file is too large, cannot be compiled and cannot be restored.
in order to solve the technical problems, the invention adopts the technical scheme that:
A method for synthesizing a voiced PNG picture comprises the following steps:
Acquiring PNG picture and audio address data;
analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block;
adding the audio address data to the image end data block;
Verifying the image end data block added with the audio address data;
and after the verification is successful, sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file to generate a sound PNG picture.
the invention provides another technical scheme as follows:
a system for synthesizing voiced PNG pictures, comprising:
The first acquisition module is used for acquiring PNG pictures and audio address data;
The first analysis module is used for analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block;
An audio address adding module, configured to add the audio address data to the image end data block;
the verification module is used for verifying the image end data block added with the audio address data;
And the picture generation module is used for sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file after the verification is successful so as to generate the audio PNG picture.
the invention has the beneficial effects that: and analyzing the PNG picture to obtain a data block of the PNG picture, adding the audio address data to the image end data block, and finally sequentially storing other data blocks and the modified image end data block to generate a new PNG picture. The PNG picture thus generated can be identified and compiled by an android or ios compiler and the file increment of the new PNG picture is very small. And subsequently, the generated PNG picture is analyzed to obtain audio address data therein, and audio is requested to be played according to the audio address data set.
Drawings
Fig. 1 is a schematic flow chart of a method for synthesizing a voiced PNG picture according to an embodiment of the present invention;
Fig. 2 is a schematic structural diagram of a system for synthesizing voiced PNG pictures according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a system for synthesizing voiced PNG pictures according to a first embodiment of the present invention.
description of reference numerals:
1. a first acquisition module; 11. a second acquisition module; 12. an encryption module; 2. a first parsing module; 3. an audio address adding module; 31. a first modification module; 32. a second modification module; 4. a checking module; 5. a picture generation module; 6. a third obtaining module; 7. a display module; 8. a second parsing module; 9. a decryption module; 10. a fourth obtaining module; 11. and a playing module.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: and analyzing the PNG picture to obtain all data blocks of the PNG picture, and adding audio address data to the image end data block.
referring to fig. 1, the present invention provides:
a method for synthesizing a voiced PNG picture comprises the following steps:
acquiring PNG picture and audio address data;
Analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block;
Adding the audio address data to the image end data block;
verifying the image end data block added with the audio address data;
And after the verification is successful, sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file to generate a sound PNG picture.
as can be seen from the above description, the method for synthesizing a voiced PNG picture according to the present invention has the following beneficial effects: the generated voiced PNG picture can be compiled by an android or ios compiler and the file increment of the voiced PNG picture is very small.
further, the structure of the image end data block includes length, data block type code, data block data, and cyclic redundancy detection, and adding the audio address data to the image end data block specifically includes:
modifying the data block data into the audio address data;
Modifying the length to the length of the audio address data.
further, the verifying the image end data block to which the audio address data is added specifically includes:
and checking according to the cyclic redundancy detection rule and the data in the data block type code.
As can be seen from the above description, the above modification method can ensure that the inherent attributes of the PNG picture are not changed, and ensure that the generated voiced PNG picture can be normally displayed and compiled.
further, the acquiring the audio address data specifically includes:
Acquiring an audio address;
And encrypting the audio address to obtain audio address data.
as can be seen from the above description, in order to ensure data security, an audio address may be encrypted and then added to an end-of-image data block of a PNG picture.
Further, after generating the audio PNG picture, the method further includes:
Acquiring a sound PNG picture;
displaying the voiced PNG picture;
Analyzing the PNG picture to obtain audio address data;
Decrypting the audio address data to obtain an audio address;
acquiring a corresponding audio file from the server according to the audio address obtained by decryption;
And playing the audio file.
as can be seen from the above description, when the user uses the audio PNG picture, the user can directly use the corresponding compiler to display the audio PNG picture, and at the same time, the audio PNG picture is analyzed to obtain audio address data, and the audio address is used to request the server for playing the corresponding audio file. If the audio address data is encrypted, the audio address data is decrypted to obtain the audio address, and then the subsequent steps are carried out.
Referring to fig. 2, another technical solution of the present invention is:
A system for synthesizing a voiced PNG picture corresponds to the method for synthesizing the voiced PNG picture, and comprises the following steps:
The first acquisition module 1 is used for acquiring PNG pictures and audio address data;
the first analysis module 2 is configured to analyze the PNG picture to obtain all data blocks of the PNG picture, where all the data blocks include an image end data block;
an audio address adding module 3, configured to add the audio address data to the image end data block;
the checking module 4 is used for checking the image end data block added with the audio address data;
and the picture generation module 5 is used for sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file after the verification is successful, so as to generate the audio PNG picture.
Further, the structure of the image end data block includes length, data block type code, data block data, and cyclic redundancy detection, and the audio address adding module 3 specifically includes:
A first modification module 31, configured to modify the data block data into the audio address data;
A second modification module 32, configured to modify the length to the length of the audio address data.
Further, the checking module 4 is specifically configured to check according to the cyclic redundancy detection rule and data in the data block type code.
further, the first obtaining module 1 specifically includes:
A second obtaining module 11, configured to obtain an audio address;
And the encryption module 12 is configured to encrypt the audio address to obtain audio address data.
further, the method also comprises the following steps:
a third obtaining module 6, configured to obtain a voiced PNG picture;
A display module 7, configured to display the audio PNG picture;
the second analysis module 8 is used for analyzing the PNG picture to obtain audio address data;
the decryption module 9 is configured to decrypt the audio address data to obtain an audio address;
a fourth obtaining module 10, configured to obtain a corresponding audio file from the server according to the decrypted audio address;
And the playing module 11 is configured to play the audio file.
the following are two specific embodiments of the present invention, and before describing the embodiments, the file structure of the PNG picture is briefly described:
the file of the PNG is composed of a plurality of data blocks, and the information of the specific data blocks is as follows:
Each database is composed of four parts, namely, a Length of 4 bytes, a Chunk Type Code of 4 bytes, a Chunk Data of variable byte Length, and a Cyclic Redundancy Check (CRC) of 4 bytes, wherein the Chunk Data stores Data specified according to the Chunk Type Code, and the CRC stores a CRC for detecting whether an error exists.
the values in the crc field are calculated from the data in the data block type code field and the data block data field. The CRC domain specific algorithm is defined in ISO 3309 and ITU-T v.42 and its value is calculated as the following CRC code generator polynomial:
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1。
Referring to fig. 1, a first embodiment of the present invention is:
a method for synthesizing a voiced PNG picture comprises the following steps:
acquiring a PNG picture and an audio address;
Encrypting the audio address to obtain audio address data;
analyzing the PNG picture, and reading all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block, and the structure of the image end data block comprises length, data block type codes, data block data and cyclic redundancy detection; specifically, reading the PNG picture, and splitting the PNG file format to obtain each data block of the PNG picture by using a structure of a data block consisting of a 4-byte length, a 4-byte data block type code, a variable-byte length data block data and a 4-byte CRC;
modifying data block data of the image end data block into the audio address data;
modifying the length to the length of the audio address data;
Performing CRC32 encryption on data in the data block type code field and the database data field according to the value in the cyclic redundancy detection field, and recalculating the value in the cyclic redundancy detection field of the image end data block;
after the verification is successful, sequentially storing all the analyzed data blocks except the image end data block and the image data block added with the audio address data into the same file according to the reading sequence to generate a sound PNG picture;
acquiring a sound PNG picture;
Reading a PNG picture, and displaying the audio PNG picture;
analyzing and splitting the PNG picture by using a structure that the data block consists of a 4-byte length data block type code, a 4-byte data block type code, a variable-byte length data block data and a 4-byte CRC to obtain each data block of the PNG picture and obtain an image end data block;
analyzing the image end data block, and reading data block data with variable length in the image end data block, wherein the data block data with variable length is audio address data;
decrypting the audio address data to obtain an audio address;
acquiring a corresponding audio file from the server according to the audio address obtained by decryption;
and playing the audio file.
referring to fig. 3, the second embodiment of the present invention is:
a system for synthesizing voiced PNG pictures, comprising:
the first acquisition module 1 is used for acquiring PNG pictures and audio address data; the first obtaining module 1 specifically includes: a second obtaining module 11, configured to obtain an audio address; the encryption module 12 is configured to encrypt the audio address to obtain audio address data;
the first analysis module 2 is configured to analyze the PNG picture to obtain all data blocks of the PNG picture, where all the data blocks include an image end data block; the structure of the image end data block comprises length, data block type code, data block data and cyclic redundancy detection;
an audio address adding module 3, configured to add the audio address data to the image end data block; the audio address adding module 3 specifically includes: a first modification module 31, configured to modify the data block data into the audio address data; a second modification module 32, configured to modify the length to the length of the audio address data.
the checking module 4 is used for checking according to the cyclic redundancy detection rule and the data in the data block type code;
The picture generation module 5 is used for sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file after the verification is successful, and generating a sound PNG picture;
a third obtaining module 6, configured to obtain a voiced PNG picture;
a display module 7, configured to display the audio PNG picture;
the second analysis module 8 is used for analyzing the PNG picture to obtain audio address data;
The decryption module 9 is configured to decrypt the audio address data to obtain an audio address;
A fourth obtaining module 10, configured to obtain a corresponding audio file from the server according to the decrypted audio address;
and the playing module 11 is configured to play the audio file.
The synthesis method and the synthesis system of the voiced PNG picture can be applied to various scenes needing to play pictures and audio. For example, in an educational product, each subject is courseware and courseware images and texts are in the same place, so that sometimes students are not very clear about pictures in the courseware, a teacher hopes to explain the contents in the pictures, address links of audio files explained by the teacher are synthesized with the original pictures, and when the students click the synthesized pictures during use, the voices explained by the teacher can be played, so that the picture influence effect is more obvious, and the learning interest and school effect of the students are greatly increased.
in summary, the method and system for synthesizing the voiced PNG picture provided by the present invention can generate the PNG picture including the audio link, play the audio file while displaying the picture, and have the advantages of being recognizable and interpretable by the android and ios compiler and having a small file increment.
the above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for synthesizing a voiced PNG picture is characterized by comprising the following steps:
acquiring PNG picture and audio address data;
analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block;
Adding the audio address data to the image end data block;
verifying the image end data block added with the audio address data;
and after the verification is successful, sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file to generate a sound PNG picture.
2. the method of claim 1, wherein the structure of the end-of-image data block comprises length, data block type code, data block data, and cyclic redundancy detection, and wherein adding the audio address data to the end-of-image data block specifically comprises:
modifying the data block data into the audio address data;
Modifying the length to the length of the audio address data.
3. the method of claim 2, wherein verifying the end-of-image data block to which the audio address data is added specifically comprises:
And checking according to the cyclic redundancy detection rule and the data in the data block type code.
4. the method of synthesizing a voiced PNG picture according to claim 1, characterized in that the acquiring of audio address data specifically includes:
acquiring an audio address;
And encrypting the audio address to obtain audio address data.
5. the method of synthesizing a voiced PNG picture according to claim 4, characterized by further comprising, after generating the voiced PNG picture:
Acquiring a sound PNG picture;
displaying the voiced PNG picture;
analyzing the PNG picture to obtain audio address data;
Decrypting the audio address data to obtain an audio address;
acquiring a corresponding audio file from the server according to the audio address obtained by decryption;
and playing the audio file.
6. A system for synthesizing voiced PNG pictures, comprising:
the first acquisition module is used for acquiring PNG pictures and audio address data;
the first analysis module is used for analyzing the PNG picture to obtain all data blocks of the PNG picture, wherein all the data blocks comprise an image end data block;
an audio address adding module, configured to add the audio address data to the image end data block;
the verification module is used for verifying the image end data block added with the audio address data;
and the picture generation module is used for sequentially storing all the data blocks except the image end data block and the image data block added with the audio address data into the same file after the verification is successful so as to generate the audio PNG picture.
7. the system for synthesizing a voiced PNG picture according to claim 6, wherein the structure of the image end data block includes length, data block type code, data block data, and cyclic redundancy detection, and the audio address adding module specifically includes:
The first modification module is used for modifying the data block data into the audio address data;
and the second modification module is used for modifying the length into the length of the audio address data.
8. the system for synthesizing a voiced PNG picture according to claim 7, characterized in that the check module is specifically configured to check according to the rule of cyclic redundancy detection and the data in the data block type code.
9. the system for synthesizing a voiced PNG picture according to claim 6, characterized in that the first obtaining module specifically includes:
The second acquisition module is used for acquiring the audio address;
and the encryption module is used for encrypting the audio address to obtain audio address data.
10. the system for synthesizing a voiced PNG picture according to claim 9, characterized by further comprising:
the third acquisition module is used for acquiring the audio PNG picture;
the display module is used for displaying the audio PNG picture;
the second analysis module is used for analyzing the PNG picture to obtain audio address data;
the decryption module is used for decrypting the audio address data to obtain an audio address;
the fourth acquisition module is used for acquiring a corresponding audio file from the server according to the audio address obtained by decryption;
and the playing module is used for playing the audio file.
CN201711184119.9A 2017-11-23 2017-11-23 Method and system for synthesizing audio PNG picture Active CN108124147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711184119.9A CN108124147B (en) 2017-11-23 2017-11-23 Method and system for synthesizing audio PNG picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711184119.9A CN108124147B (en) 2017-11-23 2017-11-23 Method and system for synthesizing audio PNG picture

Publications (2)

Publication Number Publication Date
CN108124147A CN108124147A (en) 2018-06-05
CN108124147B true CN108124147B (en) 2019-12-10

Family

ID=62227856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711184119.9A Active CN108124147B (en) 2017-11-23 2017-11-23 Method and system for synthesizing audio PNG picture

Country Status (1)

Country Link
CN (1) CN108124147B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609968B (en) * 2012-03-05 2015-06-24 深圳市优利麦克科技开发有限公司 Method and system for realizing audio picture
CN102819851B (en) * 2012-08-08 2015-03-18 成都思珩网络科技有限公司 Method for implementing sound pictures by using computer
CN103646048A (en) * 2013-11-25 2014-03-19 宇龙计算机通信科技(深圳)有限公司 Method and device for achieving multimedia pictures
CN104991950A (en) * 2015-07-16 2015-10-21 百度在线网络技术(北京)有限公司 Picture generating method, display method and corresponding devices
CN106777204B (en) * 2016-12-23 2020-08-07 北京安云世纪科技有限公司 Picture data processing method and device and mobile terminal

Also Published As

Publication number Publication date
CN108124147A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
US20090063277A1 (en) Associating information with a portion of media content
CN105122370A (en) Syntax-aware manipulation of media files in a container format
US11269998B2 (en) Image data alteration detection device, image data alteration detection method, and data structure of image data
US20090197238A1 (en) Educational content presentation system
WO2023142957A1 (en) Method and apparatus for verifying display terminal, storage medium, and electronic device
CN112668453A (en) Video identification method and related equipment
CN105740661B (en) A kind of method and apparatus for protecting application program
CN109151520B (en) Method, device, electronic equipment and medium for generating video
JP5646187B2 (en) Access method, generation method, user apparatus, and generation apparatus
CN108124147B (en) Method and system for synthesizing audio PNG picture
CN117371002A (en) Model encryption method, model decryption method, encryption device, and readable storage medium
US10607001B2 (en) Web-based electronic document service apparatus capable of authenticating document editing and operating method thereof
CN114826623B (en) Mock test message processing method and device
JP6874593B2 (en) Data playback device, data playback method, and data structure of image data
CN102970580A (en) Video file encryption and decryption method and system
Zhang et al. A Chunked and Disordered Data Privacy Protection Algorithm: Application to Resource Platform Systems
Juanda et al. Designing Comprehensive Independent Learning Interactive Multimedia and its Resources Demands
CN103823650A (en) Display system and display method for endorsement handwriting
Ur Rehman et al. An Efficient Audio Encryption Scheme Based on Elliptic Curve over Finite Fields
JP7130050B2 (en) Secure and consistent video compression across devices
CN115099200B (en) Tamper-proof text processing method and device and computer equipment
Gomez-Ricardez et al. A low distortion audio self-recovery algorithm robust to discordant size content replacement attack
Siahaan et al. The Best Tutorial to Learn Database Programming with Java GUI, MariaDB, and SQL Server
Siahaan et al. Java Programming For Developers: The Definitive Guide to Learn JDBC And Database Applications
US8826442B2 (en) Media playback decoder tracing

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
GR01 Patent grant
GR01 Patent grant