CN101656814A - Method and device for adding sound file to JPEG file - Google Patents
Method and device for adding sound file to JPEG file Download PDFInfo
- Publication number
- CN101656814A CN101656814A CN200810144972A CN200810144972A CN101656814A CN 101656814 A CN101656814 A CN 101656814A CN 200810144972 A CN200810144972 A CN 200810144972A CN 200810144972 A CN200810144972 A CN 200810144972A CN 101656814 A CN101656814 A CN 101656814A
- Authority
- CN
- China
- Prior art keywords
- file
- audio files
- mark
- length
- jpeg file
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method for adding a sound file to a JPEG file, which is performed on equipment with audio and video functions and comprises the following steps of: acquiring the sound file through the equipment; acquiring the JPEG file through the equipment; and adding the sound file to an idle domain of the JPEG file. The invention also provides a method for playing the sound file when auser watches the JPEG file, which comprises the following steps of: opening the JPEG file; reading a total length of the idle domain embedded with the sound file and a length of an extension name ofa file name and then determining the byte length of the sound file; reading out bytes of which the number is equal to the determined length from the JPEG file; and creating a binary file, writing thebytes of which the number is equal to the determined length from the JPEG file into the binary file, and then taking the binary file as a sound file to be played when the user watches the JPEG file.
Description
Technical field
The present invention relates to a kind of image processing method and system based on JPEG, more specifically, relate to and a kind ofly add audio files to method and device in the jpeg file, a kind of method of the file that when presenting jpeg file, plays sound and device and a kind of above-mentioned image processing method and system of comprising.
Background technology
In recent years, along with the technology of imaging device constantly develops, it is increasing that image becomes.In order in less image size, to comprise more information, when imaging, adopt the JPEG compress technique at present usually, form the image file of jpeg format.This is because when forming jpeg image file, and being considered to of can abandoning in the image usually to be comprised presents unimportant information to image, and therefore, the JPEG compress technique has the ability of astonishing reduction memory space.Compare with the bitmap of unpressed BMP or TIF form, the size of jpeg image file have only usually they 10% or littler.
But, do not comprise the information in photograph taking place in most of jpeg file of taking, particularly by the captured photo of the camera of not supporting the GPS function.Along with the photo that the user takes is more and more, when longer a period of time was watched photo again after taking, the user can forget that usually this photo is to take wherein.
In addition, when taking pictures by the digital camera of GPS function, can form the jpeg file of (Exchangeable Image File, the exchangeable image file) form that has Exif, in the header file information of this Exif file, include the positional information of spot for photography.But,, and on shown picture, do not show this information because the form of this positional information is a text formatting, therefore, the user only under the situation of calling the picture attribute, can obtain this positional information, and this makes the user feel very inconvenient in use.
Therefore, need new image processing method and device, it can add the positional information audio files in the jpeg file to, and play position information voice file is next user-friendly simultaneously when presenting jpeg file.
Summary of the invention
In view of the above problems, a kind of new image processing method and system are provided, utilize this image processing method and system, audio files can be added in the jpeg file, and when utilizing image viewer to watch this jpeg file, play this audio files, thereby make the user when watching the photo of many shootings, can easily know the spot for photography of every photo etc., increase user's ease of use thus.
According to an aspect of the present invention, provide a kind of method that is used for adding at jpeg file audio files, this method is carried out on the equipment with Voice ﹠ Video ability, and described method comprises: obtain audio files by described equipment; Obtain jpeg file by described equipment; Described audio files is added in the idle domain of described jpeg file.
According to a further aspect in the invention, provide a kind of method of the file that is used for playing sound when watching jpeg file, wherein said audio files is embedded in the idle domain of described jpeg file, and described method comprises: open described jpeg file; The described idle domain of search in described jpeg file; After searching described idle domain, read file-name extension name length and file-name extension name respectively, and determine the byte length of described audio files; From the end of described file-name extension name, from described jpeg file, read out byte with determined length; Create binary file, and will be written to this binary file, as audio files, for when watching described jpeg file, playing from the byte that described jpeg file reads out determined length.
According to a further aspect in the invention, provide a kind of equipment that is used for adding at jpeg file audio files, described equipment comprises: the audio files deriving means is used to obtain audio files; The jpeg file deriving means is used to obtain jpeg file; And the audio files adding set, be used for described audio files is added to the idle domain of described jpeg file.
According to a further aspect in the invention, a kind of equipment of the file that is used for playing sound when watching jpeg file is provided, wherein said audio files is embedded in the idle domain of described jpeg file, and described equipment comprises: the jpeg file device for opening is used to open described jpeg file; Searcher is used in the described COM of described jpeg file search territory; First read-out device is used for after searching described idle domain, reads file-name extension name length and file-name extension name respectively, and determines the byte length of described audio files; Second read-out device is used for the end from described file extension, reads out the byte with determined length from described jpeg file; Creation apparatus is used to create binary file, and will be written to this binary file from the byte that described jpeg file reads out determined length by described second reading device, as audio files, and this audio files is exported to image viewer; And image viewer, be used to watch jpeg file and play the audio files that is received.
By the content of reference below in conjunction with the description of the drawings and claims, and along with understanding more comprehensively of the present invention, other purposes of the present invention and result will understand and easy to understand more.
Description of drawings
Describe the present invention below with reference to the drawings and specific embodiments, wherein:
Fig. 1 shows the division header file table in the jpeg file;
Fig. 2 shows according to embodiments of the invention, audio files is added to the flow chart of the method in the jpeg file;
Fig. 3 shows according to embodiments of the invention, the flow chart of the method for the file that plays sound when watching jpeg file;
Fig. 4 shows according to embodiments of the invention, is used for adding at jpeg file the schematic diagram of the jpeg image forming device of audio files;
Fig. 5 shows according to embodiments of the invention, the schematic diagram of the jpeg image browsing apparatus of the file that is used for playing sound when watching jpeg file; And
Fig. 6 shows according to embodiments of the invention, is used for adding at jpeg file the system of the audio files and the file that plays sound when watching jpeg file.
In institute's drawings attached, identical label is indicated similar or corresponding feature or function.
Detailed Description Of The Invention
Below with reference to accompanying drawings embodiments of the invention are elaborated.
Before embodiment was elaborated, at first the header file to JPEG briefly introduced.
Fig. 1 shows the header file table in the jpeg file.
As described in Figure 1, in the header file table, only show the basic token (marker) of baseline jpeg, institute is underlined all to start with FF (hexadecimal).Wherein, mark 0xFFFE is used for mark COM territory, is used to write comment field, and its length is with two byte representations, and therefore, the variable-length in COM territory should be no more than 64K.
When the recorded voice file, use the 8K sample rate, it was two seconds that single channel, each sampled point adopt 16bit coding and recording time, under this condition recording substance was saved as the wav file, its file size is 32K.Therefore, when being embedded in such audio files in the COM territory, the length that can satisfy the COM territory fully is no more than the condition of 64k.In addition, if this recording substance of 2 seconds is stored as the audio files of other form of handling through overcompression, such as ogg, during the vorbit file, its size is 10K, much smaller than 64K.That is to say that when adopting the audio files of other compressed format, size is that the audio files of 64K can be corresponding to the recording substance of time span far more than 2 seconds.
In addition, generally speaking, the phrase that is used to explain the spot for photography comprises 2 words usually, such as " Beijing ", is approximately 1 second and say the needed time of this phrase " Beijing " with normal word speed, and promptly the time span of its recording substance is 1 second.As can be seen from the above, can will be embedded in the COM territory of header file fully, and satisfy the regulation of the length in COM territory less than 64K such as " Beijing " or the audio files (its size is less than 64K) that comprises more words.Here, the COM territory only is to be used for illustration, can also use other idle domain in the jpeg file, such as the reservation territory 0xFF02 among Fig. 1,0xFFBF.In the present invention, utilize above-mentioned characteristic to realize audio files is added in the idle domain of jpeg file just.
Following specifying with reference to Fig. 2 and 3 added audio files in the jpeg file process.This process is to implement in the equipment with Voice ﹠ Video disposal ability (hereinafter, being called the audio/video treatment facility).
Fig. 2 shows according to embodiments of the invention, audio files is added to the flow chart of the method in the jpeg file.In this embodiment, be example with audio files " Beijing.amr ", and specify as idle domain with the COM territory in the header file of jpeg file and how to utilize audio/video treatment facility 200 in jpeg file, to add audio files.Simple in order to illustrate, in the following embodiments, all describe as idle domain with the COM territory in the header file of jpeg file.Be noted that in an embodiment of the present invention, can also use other idle domain in the jpeg file, such as the reservation territory 0xFF02 among Fig. 1,0xFFBF.
As shown in Figure 2, in step S210, at first, obtain audio files " Beijing.amr " by audio/video treatment facility 200.In this step, audio files " Beijing.amr " can be the audio files that has write down that reads from audio/video treatment facility 200, also can be the audio files that the user obtains by recording.In addition, be noted that except the amr form that this audio files can also be the file that adopts other form, such as wav file, rm file, mp3 file, MP4 file or other audio file.
At step S220, obtain jpeg file by audio/video treatment facility 200.Equally, in this step, the jpeg file that is obtained can be the jpeg file that has write down that reads from audio/video treatment facility 200, also can be the jpeg file that audio/video treatment facility 200 is just being taken.
In step S230, audio/video treatment facility 200 adds audio files " Beijing.amr " in the COM territory in the header file of jpeg file.Below step S230 is described in more detail.Here, step S230 further comprises substep S231~S237.
At step S231, open jpeg file in read-write mode.Then, search mark 0xFFDA in the header file of JPEG, this mark is used to indicate scan line to begin.
After searching mark 0xFFDA, at step S232, the data that mark 0xFFDA is later comprise 0xFFDA, read in buffer storage to carry out buffer memory.
After the data later to mark 0xFFDA are carried out buffer memory, at step S233, file pointer is moved to the 0xFF of 0xFFDA, in jpeg file, write mark 0xFFFE, it is used for mark COM territory.The length of this mark is 2 bytes.Then, file pointer is moved two bytes, write mark " Place Voice " in jpeg file, its expression has audio files.The length of mark " Place Voice " is fixed as 11 bytes.In addition, also write mark extension length in jpeg file, it is used to indicate extension name length.The length of mark extension length is 1 byte.In addition, also write mark extension in jpeg file, it is used to write down extension name.In this example, because expansion .amr by name, and the length of .amr is 4, so the content that is write down among the mark Extension is .amr, its length is 4.Should be appreciated that, because different extension name has different length, so according to different extension name, the length of mark Extension is variable.
Need to prove that two bytes between mark " Place Voice " and the mark 0xFFFE are marked as Length, it is used for writing down the total length in COM territory.
Then, in step S234, open audio files beijing.amr, and calculate the size of this audio files in the readable mode of binary system.
After calculating the size of this audio files, at step S235, judge whether the size of this audio files surpasses preset value T=64k-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension).Wherein, the length of mark 0xFFFE, length, " Place Voice ", extension length is constant.Particularly, the length of mark 0xFFFE is 2 bytes, and the length of Length is 2 bytes, and the length of " Place Voice " is 11 bytes, and the length of Extension Length is 1 byte.In addition, according to different extension name, the length of mark Extension is variable, and it generally is no more than 10.Therefore, this preset value is set to T=64k-26 usually.When the size of this audio files does not surpass this preset value, proceed to step S236.Otherwise this process finishes.
At step S236, beijing.amr reads in internal memory with audio files, writes jpeg file then.After writing audio files beijing.amr, more former 0xFFDA and later data are write jpeg file.
Subsequently, at step S237, calculate mark 0xFFFE, length, " Place Voice ", extension length, extension and audio files length and.Then, with the back of jpeg file pointer movement, above-mentioned length and (with two byte representations) are written among the length to 0xFFFE.
After finishing aforesaid operations, close jpeg file and audio files.
Below exemplarily provided the process of how in jpeg file, to add audio files, the file that how to play sound has been described when watching jpeg file below in conjunction with Fig. 3.
Fig. 3 shows according to embodiments of the invention, the flow chart of the method for the file that plays sound when watching jpeg file.In the present embodiment, be " Beijing.amr " and be that idle domain is that example describes still with the COM territory with audio files.
As shown in Figure 3, at first,, open jpeg file in readable mode at step S310.
Then, in step S320, determine whether there is audio files in this jpeg file.Particularly, at first, whether search exists 0xFFFE in the header file of JPEG, promptly whether has the COM territory.If there is not the COM territory, then there is not audio files in this jpeg file, if process finishes. search the COM territory, behind the COM territory, read two bytes, with the length that obtains to write down among the label L ength, the i.e. total length in COM territory.If less than 15, then there is not audio files in the total length in COM territory in this jpeg file, process finishes.If the total length in COM territory, reads 11 bytes again greater than 15.If 11 bytes that read are " Place Voice ", then there is audio files in this jpeg file.Otherwise, then there is not audio files in this jpeg file, process finishes.
After searching the COM territory and determining to exist " Place Voice ", after promptly determining to have audio files in this jpeg file, in step S330, after from jpeg file, reading 11 bytes, read 1 byte again, promptly read the extension name length of audio files.After this, reading an extension name length byte of audio files again, to obtain the reading file-name extension name, is .amr in this example.
Then, in step S340, after reading an extension name length byte of audio files, end from the file-name extension name, from jpeg file, read out [(length that writes down among the label L ength)-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension)] individual byte again, and store in the internal memory.In the aforementioned calculation formula, the value that writes down among the label L ength is meant the total length in COM territory.The length of mark 0xFFFE is 2, and the length of label L ength is 2, and the length of mark " Place Voice " is 11, and the length of mark extensionlength is 1.The length of mark Extension is the file-name extension name length that is read.As can be known, the resulting result of aforementioned calculation formula is exactly in fact the length of audio files from the description of the method for audio files being added to jpeg file.In fact [(length that writes down among the label L ength)-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension)] the individual byte of therefore, reading from jpeg file is exactly the audio files that is added.
Subsequently, in step S350, create a binary file, its file is called xxxx.amr, in this example, called after " Beijing.amr ", and [(length that writes down among the label L ength)-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension)] the individual byte that will be preserved in internal memory is written in this binary file, as audio files, be beijing.amr, and output it to image viewer.In step S360, when watching this jpeg file, utilize image viewer to play this audio files " Beijing.amr ".
Top embodiment has exemplarily illustrated the preferred embodiments of the present invention, can also carry out various suitable distortion to the foregoing description.This distortion also should drop within protection scope of the present invention.
For example, the order of step S210 and S220 can be exchanged.
In addition, though above-mentioned process of audio files being added to the process in the jpeg file and the file that plays sound when watching jpeg file is described with two embodiment independently, but can also be with above-mentioned two processes combination, add to audio files in the jpeg file and when watching jpeg file, play this audio files realizing.
Above-mentioned being used for of the present invention added audio files to jpeg file and the method for the file that plays sound when watching jpeg file, can adopt software to realize, also can adopt hardware to realize, or adopts way of hardware and software combination to realize.
Fig. 4 shows the block diagram according to the jpeg image forming device 400 of the embodiment of the invention.As shown in Figure 4, jpeg image forming device 400 comprises audio files deriving means 410, jpeg file deriving means 420, and audio files adding set 430.This audio files adding set 430 further comprises jpeg file device for opening 431, searcher 432, read-out device 433, buffer storage 434, mobile device 435, writing station 436, audio files device for opening 437, calculation element 438 and judgment means 439.
Obtain audio files and jpeg file by audio files deriving means 410 and jpeg file deriving means 420 at first, respectively.Here, audio files can be the audio files that has write down that reads from audio/video treatment facility 200, also can be the audio files that the user obtains by recording.In addition, this audio files can have different forms, such as amr file, wav file, ogg file, and rm file, mp3 file, mp4 file or other audio file.Equally, this jpeg file can be the jpeg file that has write down that reads in the audio/video treatment facility 200, also can be the jpeg file of just taking.
After obtaining audio files and jpeg file, jpeg file device for opening 431 is opened jpeg file in read-write mode.Searcher 432 is searched for mark 0xFFDA in the header file information of jpeg file.
Searching mark 0xFFDA, read-out device 433 is the later data of mark-sense 0xFFDA from jpeg file, comprise 0xFFDA, and the data of being read are outputed to carry out buffer memory in the buffer storage 434.
After the data of being read were carried out buffer memory, mobile device 435 moved to the 0xFF of mark 0xFFDA with file pointer, and write the 0xFFFE mark by writing station 436 in jpeg file, was used to identify the COM territory.After writing mark 0xFFFE, mobile device 435 moves two bytes with file pointer, and writes mark " Place Voice " by writing station 436 in jpeg file, has audio files among its expression JPEG.After writing mark " Place Voice ", writing station 436 also writes mark extensionlength in jpeg file, and it is used to indicate extension name length, and mark extension, and it is used to write down extension name.
Then, audio files device for opening 437 is opened audio files in the readable mode of binary system, and calculates the size of this audio files by calculation element 438.
After calculating the size of this audio files, judgment means 439 judges whether the size of this audio files surpasses preset value T=64k-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension).Wherein, the length of mark 0xFFFE, length, " Place Voice ", extension length is constant.Particularly, the length of mark 0xFFFE is 2 bytes, and the length of Length is 2 bytes, and the length of " Place Voice " is 11 bytes, and the length of Extension Length is 1 byte.In addition, according to different extension name, the length of mark Extension is variable, and it generally is no more than 10.Therefore, this preset value is set to T=64k-26 usually.
When the size of this audio files does not surpass this preset value, audio files is cached to buffer storage 434, writing station 436 writes jpeg file with this audio files then.After writing audio files, 0xFFDA that writing station 436 is stored buffer storage 434 again and later data write in the jpeg file.
After writing former 0xFFDA and later data, calculation element 438 calculate mark 0xFFFE, length, " Place Voice ", extension length, extension and audio files length and.Then, mobile device 435 to the back of mark 0xFFFE, and is written to the jpeg file pointer movement among the mark length with above-mentioned length and (with two byte representations) by writing station 436.
Fig. 5 shows according to embodiments of the invention, the schematic diagram of the jpeg image browsing apparatus 500 of the file that is used for playing sound when watching jpeg file.
As shown in Figure 5, jpeg image browsing apparatus 500 comprises jpeg file device for opening 510, determines device 520, mobile device 530, reading device 540, buffer storage 550, creation apparatus 560 and image viewer 570.
At first, jpeg file device for opening 510 is opened jpeg file in readable mode.Then, determine device 520 searches for whether there is mark 0xFFFE in the header file of JPEG, i.e. the COM territory.
After searching the COM territory, mobile device 530 moves two bytes backward with file pointer.Then, reading device 540 reads 11 bytes.Determine whether device 520 definite 11 bytes that read are " Place Voice ".
After determining unit 520 determined there is audio files in this jpeg file, reading device 540 read 1 byte again, promptly reads the extension name length of audio files.
After reading extension name length, reading device 540 is reading this extension name length byte, to obtain file extension.
After reading file extension, reading device 540 reads out [(length that writes down among the label L ength)-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension)] individual byte from JPEG, and the byte that this is read is delivered to carry out buffer memory in the buffer storage 550.
Subsequently, creating unit 560 is created a binary file, its file is called xxxx.amr, be in this example " Beijing.amr ", and [(length that writes down among the label L ength)-(length of mark 0xFFFE)-(length of mark length)-(length of mark Place Voice)-(length of mark Extension length)-(length of mark Extension)] the individual byte that will be preserved in buffer storage 550 is written in this binary file, as audio files, and output it to image viewer 570, when watching this jpeg file, play this audio files for image viewer 570.
Fig. 6 shows jpeg image treatment system 600 according to an embodiment of the invention, and it comprises as shown in Figure 4 jpeg image forming device 400 and jpeg image browsing apparatus 500.
Method or the technology described in conjunction with embodiment disclosed herein can directly be presented as hardware, by the software module that processor is carried out, the perhaps combination of these two.A software module may reside in the RAM memory, flash memory, and the ROM memory, eprom memory, eeprom memory, register, hard disk, mobile disk, CD-ROM is perhaps in the storage medium of any other form well known in the art.A kind of storage medium can be coupled with processor, make processor can be from this storage medium read message, and to this storage medium write information.In replacing example, storage medium may be integral to the processor.Processor and storage medium may reside among the ASIC.This ASIC may reside in terminal or other places.Replace in the example at one, the discrete assembly that processor and storage medium can be used as in terminal or other places is resident.
Beneficial effect
By above in conjunction with the accompanying drawings to the detailed description of the embodiment of the invention, be not difficult to find out: utilize jpeg image processing method provided by the invention and device, individual information of interest can be made audio files adds in the COM territory of jpeg file, and when watching this jpeg file, play this audio files by image viewer, can be so that the user can be when watching the photo of many shootings, can easily know information of interest about every photo, such as the spot for photography of this photo etc., thereby increase user convenience.
Provide the foregoing description of described disclosed embodiment can make those skilled in the art can realize or use the present invention.But for a person skilled in the art, the various modifications of these embodiment are conspicuous, and the general principles of definition here also can be applied to other embodiment on the basis that does not break away from the spirit and scope of the invention.Therefore, the embodiment that the present invention is not limited to illustrate here, but consistent with the widest scope that meets principle disclosed herein and novel feature.
Claims (24)
1, a kind of method that is used for adding audio files at jpeg file, this method is carried out on the equipment with Voice ﹠ Video ability, and described method comprises:
Obtain audio files by described equipment;
Obtain jpeg file by described equipment;
Described audio files is added in the idle domain of described jpeg file.
2, the method for claim 1, wherein described audio files is added in the idle domain of described jpeg file and also comprises:
Open described jpeg file;
Search is used to first mark of indicating scan line to begin in the header file of described jpeg file;
After finding described first mark, the data that this first mark is later, comprise this first be marked in, read in and carry out buffer memory in the buffer;
After the later data of described first mark are carried out buffer memory, the file pointer of described JPEG is moved to described first mark, write second mark to described jpeg file, wherein said second mark is used to indicate described idle domain;
After writing described second mark, open described audio files;
Described audio files is write in the described idle domain of described jpeg file, and
After writing described audio files, more described buffer institute data in buffer is write in the described jpeg file.
3, method as claimed in claim 2, wherein, the step that writes second mark to described jpeg file also comprises:
Described file pointer is moved two bytes, and write the 3rd mark to described jpeg file, described the 3rd mark is used in reference to be shown in and has described audio files in the described jpeg file.
4, method as claimed in claim 3 also comprises;
After writing described the 3rd mark, write the 4th and the 5th mark to described jpeg file, the wherein said the 4th and the 5th mark is respectively applied for the extension name length and the extension name of the described audio files of indication.
5, method as claimed in claim 4 also comprises:
Calculate the size of described audio files, and judge whether described audio files length surpasses preset value T=64k-(length of second mark)-2-(length of the 3rd mark)-(length of the 4th mark)-(length of the 5th mark),
If the length of described audio files does not surpass described preset value, then described audio files is write in the described jpeg file.
6, the method for claim 1, wherein described idle domain can be the COM territory or keep the territory.
7, the method for claim 1, wherein described audio files is the audio files that has write down that reads from described equipment.
8, the method for claim 1, wherein described audio files is that the user obtains by recording.
9, the method for claim 1, wherein described audio files audio file that can be different-format.
10, the method for claim 1, wherein described jpeg file is the jpeg file that has write down that reads from described equipment.
11, the method for claim 1, wherein described jpeg file is the jpeg file that described equipment is just being taken.
12, the method for claim 1, wherein described equipment can be to have the mobile device of the function of taking pictures and one of have among the PC of image viewer.
13, a kind of method of the file that is used for when watching jpeg file, playing sound, described method comprises:
Open described jpeg file;
Read the total length and the file-name extension name length that embed the idle domain that described audio files is arranged, and determine the byte length of described audio files;
From the end of file-name extension name, from described JPEG, read out a determined length byte;
Create binary file, and will read out a determined length byte from described jpeg file and be written to this binary file, as audio files, for when watching described jpeg file, playing.
14, method as claimed in claim 13, wherein said idle domain can be the COM territories or keep the territory.
15, method as claimed in claim 13 also comprises step:
Determine whether there is audio files in the idle domain of described jpeg file;
If have audio files in the idle domain of described jpeg file, then read the total length and the file-name extension name length of described idle domain.
16, a kind of equipment that is used for adding audio files at jpeg file, described equipment comprises:
The audio files deriving means is used to obtain audio files;
The jpeg file deriving means is used to obtain jpeg file; And
The audio files adding set is used for described audio files is added to the idle domain of described jpeg file.
17, equipment as claimed in claim 16, wherein, described audio files adding set also comprises:
The jpeg file device for opening is used to open described jpeg file;
Searcher is used for being used to first mark of indicating scan line to begin in the search of the header file of described jpeg file;
Read-out device is used for after finding described first mark, read this first mark later comprise this first data in being marked at;
Buffer storage is used for the later data of this first mark to being read, comprise this first be marked in, carry out buffer memory;
Writing station is used for after the later data of described first mark are carried out buffer memory, and the file pointer of described JPEG is moved to described first mark, writes second mark to described jpeg file, and wherein said second mark is used to indicate described idle domain;
The audio files device for opening is used for opening described audio files after writing described second mark;
The audio files writing station is used for described audio files is write the described idle domain of described jpeg file, and
Data cached writing station is used for after writing described audio files, more described buffer institute data in buffer is write in the described jpeg file.
18, equipment as claimed in claim 17, wherein, the said write device also is used for,
After writing described second mark, described file pointer is moved two bytes, and write the 3rd mark to described jpeg file, wherein said the 3rd mark is used in reference to be shown in and has described audio files in the described jpeg file.
19, equipment as claimed in claim 18, wherein, the said write device also is used for,
After writing described the 3rd mark, write the 4th and the 5th mark to described jpeg file, the wherein said the 4th and the 5th mark is respectively applied for the extension name length and the extension name of the described audio files of indication.
20, equipment as claimed in claim 19 also comprises:
Calculation element is used to calculate the size of described audio files, and
Judgment means is used to judge whether the size of described audio files surpasses preset value T=64k-(length of second mark)-2-(length of the 3rd mark)-(length of the 4th mark)-(length of the 5th mark),
If the size of described audio files does not surpass described preset value T, then described audio files is write described jpeg file.
21, equipment as claimed in claim 16, wherein, described idle domain is the COM territory or keeps the territory.
22, a kind of equipment of the file that is used for when watching jpeg file, playing sound, described equipment comprises:
The jpeg file device for opening is used to open described jpeg file;
First read-out device is used to read the total length that embeds the idle domain that described audio files is arranged and the file-name extension name length of described audio files;
First determines device, is used for total length and file-name extension name length according to the idle domain of being read, determines the byte length of described audio files;
Second read-out device is used for from the end of file-name extension name, reads out a determined byte length byte from described JPEG;
Creation apparatus is used to create binary file, and will read out a determined byte length byte from described jpeg file by described second reading device and be written to this binary file, as audio files, and this audio files is exported to image viewer; And
Image viewer is used to watch jpeg file and plays the audio files that is received.
23, equipment as claimed in claim 22 wherein, comprises that also second determines device, is used for determining whether the idle domain of described JPEG exists audio files.
24, a kind of jpeg image treatment system, it comprises as any one described equipment among the claim 16-21 with as any one described equipment among the claim 22-23.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810144972A CN101656814A (en) | 2008-08-18 | 2008-08-18 | Method and device for adding sound file to JPEG file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810144972A CN101656814A (en) | 2008-08-18 | 2008-08-18 | Method and device for adding sound file to JPEG file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101656814A true CN101656814A (en) | 2010-02-24 |
Family
ID=41710887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810144972A Pending CN101656814A (en) | 2008-08-18 | 2008-08-18 | Method and device for adding sound file to JPEG file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101656814A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169643A (en) * | 2010-02-26 | 2011-08-31 | 卢君毅 | Dynamic electronic answering making method |
CN103177611A (en) * | 2011-12-23 | 2013-06-26 | 李云峰 | Method for realizing multimedia courseware on E-ink book |
CN103327277A (en) * | 2013-07-05 | 2013-09-25 | 成都品果科技有限公司 | Phonographic photo generation method and method for merging and storing picture data and voice data |
CN103500187A (en) * | 2013-09-13 | 2014-01-08 | 北京奇虎科技有限公司 | Method and device for processing pictures in browser and browser |
CN103646048A (en) * | 2013-11-25 | 2014-03-19 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for achieving multimedia pictures |
CN104506751A (en) * | 2014-12-19 | 2015-04-08 | 天脉聚源(北京)科技有限公司 | Method and device for generating electronic postcard with voice |
CN106572229A (en) * | 2015-10-09 | 2017-04-19 | 中兴通讯股份有限公司 | Method for storing recording, displaying and playing picture formed recording and terminal |
CN106575361A (en) * | 2014-08-21 | 2017-04-19 | 三星电子株式会社 | Method of providing visual sound image and electronic device implementing the same |
-
2008
- 2008-08-18 CN CN200810144972A patent/CN101656814A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169643A (en) * | 2010-02-26 | 2011-08-31 | 卢君毅 | Dynamic electronic answering making method |
CN103177611A (en) * | 2011-12-23 | 2013-06-26 | 李云峰 | Method for realizing multimedia courseware on E-ink book |
CN103327277A (en) * | 2013-07-05 | 2013-09-25 | 成都品果科技有限公司 | Phonographic photo generation method and method for merging and storing picture data and voice data |
CN103500187A (en) * | 2013-09-13 | 2014-01-08 | 北京奇虎科技有限公司 | Method and device for processing pictures in browser and browser |
WO2015035944A1 (en) * | 2013-09-13 | 2015-03-19 | 北京奇虎科技有限公司 | Method and apparatus for processing picture in browser, and browser |
CN103500187B (en) * | 2013-09-13 | 2017-03-15 | 北京奇虎科技有限公司 | A kind of method for carrying out picture processing in a browser, device and browser |
CN103646048A (en) * | 2013-11-25 | 2014-03-19 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for achieving multimedia pictures |
CN106575361A (en) * | 2014-08-21 | 2017-04-19 | 三星电子株式会社 | Method of providing visual sound image and electronic device implementing the same |
US10684754B2 (en) | 2014-08-21 | 2020-06-16 | Samsung Electronics Co., Ltd. | Method of providing visual sound image and electronic device implementing the same |
CN106575361B (en) * | 2014-08-21 | 2020-11-24 | 三星电子株式会社 | Method for providing visual sound image and electronic equipment for implementing the method |
CN104506751A (en) * | 2014-12-19 | 2015-04-08 | 天脉聚源(北京)科技有限公司 | Method and device for generating electronic postcard with voice |
CN106572229A (en) * | 2015-10-09 | 2017-04-19 | 中兴通讯股份有限公司 | Method for storing recording, displaying and playing picture formed recording and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101656814A (en) | Method and device for adding sound file to JPEG file | |
US6915012B2 (en) | System and method of storing data in JPEG files | |
US20180025215A1 (en) | Anonymous live image search | |
US20070250526A1 (en) | Using speech to text functionality to create specific user generated content metadata for digital content files (eg images) during capture, review, and/or playback process | |
US20090041428A1 (en) | Recording audio metadata for captured images | |
US10424339B2 (en) | Marking media files | |
JP4946789B2 (en) | Digest data creation device and digest data creation method | |
JP4476786B2 (en) | Search device | |
TWI236294B (en) | Method and device for capturing digital video | |
CN103327277A (en) | Phonographic photo generation method and method for merging and storing picture data and voice data | |
US20050232498A1 (en) | System and method of storing data in JPEG files | |
JP5089641B2 (en) | Video image printing apparatus and video image printing program | |
US20150288991A1 (en) | Creation of a marked media module | |
JP2004153764A (en) | Meta-data production apparatus and search apparatus | |
CN102855235B (en) | For e-file sets up the method and apparatus of relative time information | |
WO2007058268A1 (en) | Associating device | |
JP5349488B2 (en) | Imaging device, output device, program, and imaging method of imaging device | |
JP2007037031A (en) | Editing apparatus and method | |
JP4937795B2 (en) | Content-associated information display method, content-associated information display device, program thereof, and recording medium | |
JP4821462B2 (en) | Recording apparatus and method, reproducing apparatus and method, and program | |
JP6508635B2 (en) | Reproducing apparatus, reproducing method, reproducing program | |
JP4946433B2 (en) | Information distribution apparatus and program | |
JP2005039354A (en) | Metadata input method and editing system | |
JP2014179943A (en) | Reproduction device, reproduction method, and reproduction control method | |
JP3835440B2 (en) | Video photographing device, photographing information changing device and photographing information changing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20100224 |