Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only for explaining the present invention, is not intended to limit the present invention.
The present invention, by setting in advance a threshold value, has specified the summary info size that image is corresponding.When carrying out the preview of image by network, only download summary info, and described summary info is decoded, generate the synoptic diagram picture of the described image corresponding with described summary info, described synoptic diagram is looked like to dwindle, and the synoptic diagram picture after dwindling described in showing, thereby improved by the speed of network preview image, while having solved by wireless memory apparatus access image files, slow, the inefficient problem of speed, has promoted user's experience.
embodiment mono-
Fig. 1 shows the realization flow of the image preview method that the embodiment of the present invention one provides, and for convenience of explanation, only shows part related to the present invention.
Described method is applied to intelligent terminal.Described intelligent terminal includes but not limited to mobile phone, panel computer and computer.Described intelligent terminal is connected with storage medium by wireless memory apparatus.Wherein, described storage medium is the external storage mediums such as USB flash disk, SD card, described wireless memory apparatus is communicated by letter with the wireless connections between storage medium for realizing intelligent terminal, thereby makes can pass through wireless network transmissions data between intelligent terminal and storage medium.Described wireless storage medium also can have built-in storage medium.
As shown in Figure 1, described image preview method comprises:
In step S101, receive the solicited message of user to image preview, described request packets of information is containing filename and/or the routing information of this image.
In the present embodiment, intelligent terminal accesses storage medium by wireless memory apparatus.Intelligent terminal receive user to the solicited message of image preview after, the image reading in storage medium by wireless network carries out preview.Described reception user can be for receiving user by such as clicking or double-click the image preview solicited message of the operation inputs such as icon of image to the solicited message of image preview.Described request information comprises filename and/or the routing information of image, and described routing information is preferably the store path of described image in storage medium.Described image is preferably the picture of following JPEG2000 standard.
In step S102, download the summary info of the image corresponding with described filename and/or routing information.
In the present embodiment, described image is preferably the picture of JPEG2000 standard, and JPEG picture has the progressive transmission characteristic of circulation, and the profile of first transmitting image, then progressively transmits data, improves constantly picture quality, allow image by dim to clear demonstration.Therefore at a JPEG picture, circulate in progressive transmitting procedure, arranging from transmission section start (downloading section start) to the view data predetermined threshold value is the summary info of this image.Described predetermined threshold value is preferably the arbitrary value in 300KB to 500KB scope.Described summary info can be also 1/10th of view data size, as long as comprised the view data that can show image outline.
In step S103, based on described summary info, generate the synoptic diagram picture of described image.
In the present embodiment, according to existing picture decoding method, accessed summary info is decoded, but the present invention has only obtained the summary info of image, accessed summary info is not all data of a complete image, therefore, the present invention only decodes to the summary info of image, i.e. the decoding data to image previous section only.
Preferably, described summary info comprises file header parameter information; Described step S103 is specially:
A. according to the data field initial address in file header parameter information, read the view data in downloaded summary info, read view data is decoded.
In the present embodiment, the essential information that described file header parameter information has comprised a complete image, for example width of image, elevation information, and the type information of image is, the initial address of view data etc.Described file header parameter information appears in image data transmission stream and is downloaded as first data.
Download to after the summary info within the scope of predetermined threshold value, according to the data field initial address in file header parameter information, read downloaded summary info, and read summary info is decoded.
B. until the view data in summary info is all decoded, finish the process of decoding, the image obtaining is the synoptic diagram picture of the described image corresponding with described summary info.
In the present embodiment, owing to only having downloaded the summary info of image, while reading summary info according to the data initial address in file header parameter information, when reading according to the data address after predetermined threshold value scope, will find that file is imperfect, read less than any data, now, jump out the process of decoding, finish the process of decoding, the image obtaining is the synoptic diagram picture of the described image corresponding with described summary info.
By step S103, the summary info within the scope of described predetermined threshold value is decoded, generate corresponding synoptic diagram picture.Although the synoptic diagram picture generating is also clear not as original image, only comprised the profile of original image, user passes through generated synoptic diagram picture and has enough realized the Discern and judge to original image, reaches the effect of preview.
In step S104, the described synoptic diagram generating is looked like to dwindle, and the synoptic diagram picture after dwindling described in showing.
As a preferred exemplifying embodiment of the present invention, different intelligent terminals has different operating system, and different operating system has different thumbnail standards.According to the thumbnail standard of operating system, the described synoptic diagram generating is looked like to dwindle into the thumbnail standard that meets operating system.
Exemplary, for mobile phone, its thumbnail is generally 320 * 240 pixels, and color mode is RGB.Therefore, by step S103, generate after the synoptic diagram picture that summary info is corresponding, described synoptic diagram is looked like to dwindle into the image that 320 * 240 pixels, color mode are RGB.
As another preferred exemplifying embodiment of the present invention, by step S103, generate after the synoptic diagram picture that summary info is corresponding, receive the configuration information of user to described synoptic diagram picture.Described configuration information can be length information, width information and image type, and described image type is any in bianry image, gray level image, thumbnail and True color RGB image.According to described configuration information, the image type of described synoptic diagram picture is adjusted, and the described synoptic diagram through image type adjustment is looked like to dwindle bianry image, gray level image, thumbnail or the True color RGB image of the synoptic diagram picture after dwindling described in demonstration.
Preferably, described method also comprises the steps:
Synoptic diagram after described dwindling is looked like to leave in local data base, and be its assigns access path, access path, filename and the size of the synoptic diagram picture after dwindling described in recording in local data base.
In the present embodiment, the synoptic diagram after described dwindling is looked like to leave in the local data base of intelligent terminal, and be its assigns access path, record synoptic diagram picture after dwindling access path, filename and the size thereof in local data base.Thereby when again receiving user to the solicited message of described image preview, according to the file name of image, file size or access path, the synoptic diagram obtaining from local data base after corresponding dwindling looks like to show, avoided again obtaining described image by network request, further improved the speed of image preview.
In the present embodiment, by the summary info of predetermined threshold value specify image, when carrying out network preview image, only download the summary info of image, and described image outline information is decoded, generate the synoptic diagram picture of the described image that summary info is corresponding, described synoptic diagram is looked like to dwindle, and the synoptic diagram picture after dwindling described in showing, thereby improved by the speed of wireless network preview image, while having solved by wireless memory apparatus access image files, slow, the inefficient problem of speed, has promoted user's experience.
embodiment bis-
Fig. 2 shows the composition structure of the image preview device that the embodiment of the present invention two provides, and for convenience of explanation, only shows part related to the present invention.Described application of installation is in intelligent terminal, and described intelligent terminal includes but not limited to mobile phone, panel computer and computer.
As shown in Figure 2, described device comprises:
Receiver module 21, for receiving the solicited message of user to image preview, described request packets of information is containing filename and/or the routing information of this image.
Download module 22, according to described filename and/or routing information, downloads the summary info of described image.
In the present embodiment, described image is preferably the picture of JPEG2000 standard, and JPEG picture has the progressive transmission characteristic of circulation, and the profile of first transmitting image, then progressively transmits data, improves constantly picture quality, allow image by dim to clear demonstration.Therefore at a JPEG picture, circulate in progressive transmitting procedure, arranging from transmission section start (downloading section start) to the view data predetermined threshold value is the summary info of this image.Described predetermined threshold value is preferably the arbitrary value in 300KB to 500KB scope.Described summary info can be also 1/10th of view data size, as long as comprised the view data that can show image outline.
Generation module 23, for generating the synoptic diagram picture of described image based on described summary info.
Further, described summary info comprises file header parameter information, described generation module specifically for:
Data field initial address according in file header parameter information, reads the view data in downloaded summary info, and read view data is decoded; Obtain the synoptic diagram picture of the described image corresponding with described summary info.
The present embodiment, by the view data within the scope of described predetermined threshold value is decoded, generates the synoptic diagram picture of described image.The synoptic diagram generating looks like to be enough to meet the Discern and judge of user to image.Owing to only need to obtaining the summary info of image, thus the time that while having reduced widely by Network Capture image, Internet Transmission takies improved the speed of image preview
Dwindle module 24, the described synoptic diagram generating is looked like to dwindle, and the synoptic diagram picture after dwindling described in showing.
In the present embodiment, described in dwindle module 24 according to the thumbnail standard of operating system, the described synoptic diagram generating is looked like to dwindle into the thumbnail standard that meets operating system.
Alternatively, described device also comprises image type adjusting module 25.
Described image type adjusting module 25 is for adjusting the image type of the described synoptic diagram picture being obtained by generation module 23.
Described image type is any in bianry image, gray level image, thumbnail and True color RGB image.
Preferably, described device also comprises:
Memory module 26, for the synoptic diagram after described dwindling is looked like to leave in local data base, and is its assigns access path, access path, filename and the size of the synoptic diagram picture after dwindling described in recording in local data base.
In the present embodiment, the synoptic diagram after described dwindling is looked like to leave in the local data base of intelligent terminal, and be its assigns access path, record access path, filename and the size thereof of the synoptic diagram after dwindling.Thereby when again receiving user to the solicited message of described image preview, according to image corresponding dwindle after file name, file size or the access path of synoptic diagram picture, synoptic diagram after dwindling described in obtaining from local data base looks like to show, avoided again by network request, obtaining described image, further improved the speed that image shows.
In the present embodiment, by a threshold value is set, specified the summary info size of image.When carrying out the preview of image by network, only download the summary info of image, described image outline information is decoded, generate the synoptic diagram picture of the described image that summary info is corresponding, described synoptic diagram is looked like to dwindle, and the synoptic diagram picture after dwindling described in showing, thereby improved by the speed of network preview image, while having solved by wireless memory apparatus access image files, slow, the inefficient problem of speed, has promoted user's experience greatly.
Those of ordinary skills it is also understood that, the all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be in being stored in a computer read/write memory medium, described storage medium, comprises ROM/RAM, disk, CD etc.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention.For example, modules is just divided according to function logic, but is not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional module also, just for the ease of mutual differentiation, is not limited to protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.