A kind of electronic reading processing method and system that adapts to screen resolution
Technical field
The invention belongs to the electron reading applied technical field, be specifically related to a kind of electronic reading processing method and system that adapts to screen resolution.
Background technology
Popularizing and application of computer network, make that the development of electron reading is very rapid, because its unique convenience, increasing people like coming viewing electronic reading materials by computing machine or other equipment, and common electron reading comprises e-book, e-dictionary, electronic newspaper, e-magazine and electronic journal etc.
The space of a whole page size of present electron reading has two types, a kind of is to adjust space of a whole page size automatically according to the size of display screen automatically, still, and layout again when this mode need show, can't realize the reproduction of former formula master, and need during layout a large amount of calculating cause inefficiency again; Another is the fixed layout size, can realize the display effect of the former formula of master, and display efficiency is very high.Electron reading at present popular, that realize based on the flash technology just belongs to back a kind of.But this method can not be adjusted according to the resolution of user display screen curtain, can not drag, can only present in the fixedly place of user's screen with fixing size, if the space of a whole page of electron reading is too big, the resolution sizes that has surpassed screen then can't be checked the full content of electron reading, influence the reading of user to electron reading, for example, if effective space of a whole page size of electron reading is set to 1024*768 or bigger, the low resolution user of 800*600 can't read complete electron reading information so in this case, and portions of electronics reading matter information will be reduced by screen; That is to say, the resolution dimensions that can not adapt to screen when the screen of electron reading is read at present usually, in order to address the above problem, guarantee that electron reading can show completely, existing electron reading all adopts the space of a whole page size that can guarantee compatible screen minimum display resolution when making, the screen resolution user of like this can be compatible early stage 800*600, the space of a whole page size of electron reading also is limited in the range of size of 800*600, even the resolution of current most of user's screens has been higher than this size such as 1024*768,1280*1024 or 1600*1200 have so just sacrificed most of people's screen area.
If the space of a whole page size of electron reading can accomplish to adapt with screen resolution, promptly still can there be suitable manner to show the space of a whole page under the resolution in early days, will utilize most of people's screen to read the zone more fully.
Summary of the invention
At the defective that exists in the prior art, the purpose of this invention is to provide a kind of electronic reading processing method and system that adapts to screen resolution, by the electron reading that these method and system are handled, its space of a whole page can satisfy the reading needs of the people under the various screen resolutions.
For reaching above purpose, the technical solution used in the present invention is: a kind of electronic reading processing method that adapts to screen resolution may further comprise the steps:
(1) when the user needs viewing electronic reading materials, at first detect the user's computer screen resolution, the space of a whole page size with screen resolution and electron reading compares then, and the result that will compare feeds back to the user;
(2) user as required and the comparative result of step (1) selects the reading method of electron reading to read, and described reading method comprises that full frame mode is read with 1: 1 mode and reads.
Further, after in the step (1) space of a whole page size of electron reading in the resolution of screen and the step (1) being compared, its result is: the resolution of screen equals the space of a whole page size of electron reading greater than the space of a whole page size of electron reading, the resolution of screen less than the space of a whole page size of electron reading, the resolution of screen;
Further, in the step (2), described full frame mode is read, and is meant that space of a whole page adjusted size with electron reading is the content that shows electron reading after the true resolution of screen again;
Mode was read in described 1: 1, be meant the space of a whole page size constancy that keeps electron reading, the content of electron reading directly is presented in user's the display screen, if the resolution of screen less than the space of a whole page size of electron reading, then comes the space of a whole page of translation electron reading to show regional area in screen by mouse.
Further, in the step (2), when full frame mode is read, when the space of a whole page adjusted size of electron reading is the true resolution of screen, the method that adopts is: all the elements in the electron reading are considered as image, according to the scaling between the space of a whole page size of the true resolution of screen and electron reading the whole space of a whole page of electron reading is carried out convergent-divergent, be adjusted into the true resolution of screen, just the whole space of a whole page of electron reading and all the elements in the electron reading all are used as image, after image carried out convergent-divergent, be the true resolution of screen with the space of a whole page adjusted size of electron reading;
Further, the method for image zoom comprises: neighbour take a sample interpolation algorithm, linear interpolation algorithm and cube interpolation algorithm, and, wherein, the take a sample characteristics of interpolation algorithm of neighbour are: mass ratio is relatively poor behind the image zoom, but convergent-divergent efficient height is fit to the dynamic space of a whole page and draws; The characteristics of linear interpolation algorithm and cube interpolation algorithm are: mass ratio is higher behind the image zoom, and convergent-divergent efficient is slightly slow, is fit to the static space of a whole page and draws;
Again further, described full frame mode is read and is comprised quick screen mode toggle and high-quality screen mode toggle, if the user pursue frame per second accurately, can select quick screen mode toggle, the convergent-divergent of electron reading adopts neighbour's interpolation algorithm of taking a sample under this kind mode; If the user pursues the display quality of electron reading, then can select the high-quality screen mode toggle, the convergent-divergent of electron reading adopts linear interpolation algorithm or cube interpolation algorithm under this kind mode;
Further, in the step (2), when mode was read in 1: 1, if screen resolution is less than the space of a whole page size of electron reading, when coming the space of a whole page of translation electron reading in screen, to show regional area by mouse, if when not having the roller message of other object response mouse in the space of a whole page of electron reading, the roller message of the space of a whole page of electron reading response mouse then, the space of a whole page of electron reading rolls on screen, the content of local repressentation electron reading; Described object is meant the component in the electron reading, as contents such as literal, animation, figure, image, form and videos;
Further, in the step (2), when mode was read in 1: 1, if screen resolution is less than the space of a whole page size of electron reading, when coming the space of a whole page of translation electron reading to show regional area in screen by mouse, if when mouse moves to the edge of screen, then the space of a whole page of electron reading rolls, electron reading can carry out parallel moving by mouse moving like this, and the user can see the local content of electron reading.
A kind of electron reading disposal system that adapts to screen resolution, this system comprises: screen detects comparison module and coupled reading method is selected module, and described reading method selects module to comprise full frame mode read module and 1: 1 mode read module;
Described screen detects comparison module, is used to detect the user's computer screen resolution, then the resolution of screen and the space of a whole page size of electron reading are compared, and the result that will compare gives user prompt information;
Described reading method selects module to be used for providing corresponding reading method according to user's selection, and wherein, full frame mode read module is used for showing after the true resolution that space of a whole page adjusted size with electron reading is a screen content of electron reading again; 1: 1 mode read module is used for the content of electron reading directly is presented at user's display screen, if the resolution of screen is less than the space of a whole page size of electron reading, then this module support comes the space of a whole page of translation electron reading to show regional area in screen by mouse.
Effect of the present invention is: adopt method and system of the present invention, can make electron reading in manufacturing process, the user can customize the electron reading space of a whole page of any size, carrying out passing through switching when electron reading is read then, electron reading all can easily be read under the resolution of various screens, can make current main-stream is that the user of higher screen resolution obtains good reading experience, has also taken into account the little user of screen resolution simultaneously.
Description of drawings
Fig. 1 is the process flow diagram of the method for the invention;
Fig. 2 is the electronic journal space of a whole page synoptic diagram that the space of a whole page is of a size of 1024*768;
Fig. 3 is that resolution is the synoptic diagram that the screen of 800*600 shows electronic journal shown in Figure 2 when adopting full frame reading method;
Fig. 4 is that resolution is the synoptic diagram that the screen of 800*600 shows electronic journal shown in Figure 2 when adopting 1: 1 reading method, is illustrated as scroll and shows, can carry out scroll by mouse and browse;
Fig. 5 is the structural representation of system of the present invention.
Embodiment
Below in conjunction with instantiation and accompanying drawing, the present invention is described in further detail:
A kind of electron reading disposal system that adapts to screen resolution, this system comprises: screen detects comparison module and coupled reading method is selected module, and described reading method selects module to comprise full frame mode read module and 1: 1 mode read module;
When this system works, at first detect comparison module and detect the user's computer screen resolution by screen, then the resolution of screen and the space of a whole page size of electron reading are compared, and the result that will compare gives user prompt information;
The user selects reading method according to the information that screen detects comparison module, when if the user selects full frame mode viewing electronic reading materials, then full frame mode read module is the content that shows electron reading after the true resolution of screen again with the space of a whole page adjusted size of electron reading; When if the user selects 1: 1 mode viewing electronic reading materials, then 1: 1 mode read module directly is presented at the content of electron reading in user's the display screen, if the resolution of screen is less than the space of a whole page size of electron reading, then this module support comes the space of a whole page of translation electron reading to show regional area in screen by mouse.
Embodiment 1
Present embodiment is an example with electronic journal common in the electron reading, specify the processing procedure of the method for the invention, in the present embodiment, the producer of electronic journal is according to the main flow of present most computer users screen resolution, the space of a whole page of determining this electronic journal is of a size of 1024*768, the space of a whole page size of electronic journal is that unit determines with the pixel, determine it is the same with the resolution of calculating screen, then the particular content of electronic journal is filled into the space of a whole page of electron reading, the electronic journal that obtains completing, as shown in Figure 2, when the user reads this electronic journal, when adopting method of the present invention, as shown in Figure 1, a kind of electronic reading processing method that adapts to screen resolution may further comprise the steps:
(1) when the user needs viewing electronic reading materials, at first detect the user's computer screen resolution, then the resolution dimensions of screen and the space of a whole page size of the middle electron reading of step (1) are compared, and the result that will compare feeds back to the user;
In the present embodiment, when the user reads electronic journal shown in Figure 2, at first detecting this user's computer screen resolution is 800*600, be unit then with the pixel, the resolution of screen and the space of a whole page size 1024*768 of electronic journal are compared, through relatively, determine the space of a whole page size of the resolution of screen less than electronic journal, the result that will compare feeds back to the computer user then;
(2) user as required and the comparative result of step (1) selects the reading method of electron reading to read, and described reading method comprises that full frame mode is read with 1: 1 mode and reads;
When full frame mode is read, be the content that shows electron reading after the true resolution of screen again with the space of a whole page adjusted size of electron reading, can guarantee that like this full content in the electron reading space of a whole page all can be presented in the screen;
In the present embodiment, the user wishes to see the full content of electronic journal, prompting according to step (1) is the space of a whole page size of the resolution of screen less than electronic journal, therefore, the user selects full frame mode to read electronic journal, at this moment, all the elements in the electronic journal are considered as image, (long scaling is: 800/1024 according to the scaling between the space of a whole page size (1024mm*768mm) of the true resolution (800*600) of screen and electronic journal; Wide scaling is: 600/768) the whole space of a whole page to electronic journal carries out convergent-divergent, be adjusted into the true resolution of screen, just the whole space of a whole page of electronic journal and all the elements in the electronic journal all are used as image, after image carried out convergent-divergent, the true resolution that the space of a whole page size 1024*768 of electronic journal is adjusted into screen is 800*600, as shown in Figure 3, the user can read and browse;
The method of image being carried out convergent-divergent comprises: neighbour take a sample interpolation algorithm, linear interpolation algorithm and cube interpolation algorithm, in the present embodiment, the user pursue frame per second accurately, therefore select quick screen mode toggle, the convergent-divergent of electron reading adopts neighbour's interpolation algorithm of taking a sample under this kind mode; Certainly, if other user pursues the display quality of electron reading, then can select the high-quality screen mode toggle, the convergent-divergent of electron reading can adopt linear interpolation algorithm or cube interpolation algorithm under this kind mode.
Embodiment 2
The present embodiment difference from Example 1 is, in the step (2), the user has selected 1: 1 mode viewing electronic reading materials, because, adopt embodiment 1 described technical scheme user can see the full content of electronic journal, electronic journal dwindles the back displaying contents, therefore, the particular content that comprises in the electronic journal is also corresponding to diminish, the user may not see Chu to the content of part, therefore, if when the user wishes to see the content of electronic journal and do not change the size of electronic journal, should select the method;
In the present embodiment, when mode was carried out the reading of electron reading in 1: 1, keeping the space of a whole page size of electronic journal is that 1024*768 is constant, the content of electronic journal directly is presented in user's the display screen, but, because in the present embodiment, the resolution 800*600 of user's computer screen is less than the space of a whole page size 1024*768 of electronic journal, the partial content user of electronic journal can not see, as shown in Figure 4, in order to see needed content, at this moment, the user can come the space of a whole page of translation electronic journal to show regional area in screen by mouse, as shown in Figure 2, when not having the roller message of other object response mouse in the present embodiment in the space of a whole page of electronic journal, the space of a whole page of electronic journal directly responds the roller message of mouse, the space of a whole page of electronic journal rolls on screen, the content of local repressentation electronic journal; Described object is meant the component in the electron reading, as contents such as literal, animation, figure, image, form and videos; When if mouse moves to the edge of screen, then the space of a whole page of electronic journal rolls, and electronic journal can carry out parallel moving by mouse moving like this, and the user can see the local content of needed electronic journal.
The method that adopts when the user reads other electron reading such as e-book, e-dictionary, electronic newspaper, e-magazine is identical with the method for the foregoing description.
Method of the present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention draws other embodiment, belongs to technological innovation scope of the present invention equally.