CN104111777B - Image display method and device - Google Patents
Image display method and device Download PDFInfo
- Publication number
- CN104111777B CN104111777B CN201410293389.3A CN201410293389A CN104111777B CN 104111777 B CN104111777 B CN 104111777B CN 201410293389 A CN201410293389 A CN 201410293389A CN 104111777 B CN104111777 B CN 104111777B
- Authority
- CN
- China
- Prior art keywords
- pictures
- picture
- depth
- width ratio
- width
- 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
Links
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The disclosure belongs to field of computer technology on a kind of image display method and device.Methods described includes:Obtain picture to be shown;According to per pictures, respective depth-width ratio determines at least pictures shown in the i-th row in picture to be shown, i is positive integer;At least pictures determined are zoomed in and out according to respective depth-width ratio so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;The i-th row picture after scaling is shown;I is adjusted to i+1, continued executing with according to respective depth-width ratio is determined the step of at least pictures that the i-th row is shown per pictures in picture to be shown.Described device includes:Picture acquisition module, picture determining module, picture Zoom module, picture display module and operation circulation module.The length grown and be wider than framework and width that the disclosure can solve picture cause the problem of information content of picture is lost, and have reached the effect for the information content that increase picture is shown.
Description
Technical field
This disclosure relates to field of computer technology, more particularly to a kind of image display method and device.
Background technology
Picture can be all embedded in most of webpage, things is intuitively described by picture.Therefore, terminal is getting net
, it is necessary to be shown to the picture in webpage after page.
Shown because picture is carried in framework, therefore, terminal after the web data for carrying picture is got,
Framework is first loaded according to fixed position of the page layout in webpage, the framework has the length and width of fixation;Again from webpage number
Picture is read out in;The picture is loaded into the framework and shown.
Publisher has found at least there is following defect in correlation technique during the disclosure is realized:
The length of framework and width are fixed in webpage, and when the length and width growing and be wider than framework of picture, terminal is in display
The part in picture beyond framework can be hidden during picture, the information content missing for causing picture to show.
The content of the invention
To solve the problem of length grown and be wider than framework and the wide information content for causing picture to show of picture are lost, this public affairs
Open there is provided a kind of image display method and device.
According to the first aspect of the embodiment of the present disclosure there is provided a kind of image display method, including:
Obtain picture to be shown;
According to per pictures, respective depth-width ratio determines at least one figure shown in the i-th row in the picture to be shown
Piece, i is positive integer;
At least a pictures are zoomed in and out according to respective depth-width ratio described in determining so that the i-th row figure after scaling
The zoom width sum of piece is equal to display screen width;
The i-th row picture after scaling is shown;
The i is adjusted to i+1, continued executing with described according to respective high wide per pictures in the picture to be shown
Than determining the step of at least pictures that the i-th row is shown.
Optionally, it is described according to per pictures, respective depth-width ratio determines to show in the i-th row in the picture to be shown
An at least pictures, including:
Calculate in the picture to be shown per the respective depth-width ratio of pictures;
Selection depth-width ratio sum belongs to an at least pictures for predetermined interval;
The picture that an at least pictures are defined as showing in i-th row.
Optionally, the selection depth-width ratio sum belongs to an at least pictures for predetermined interval, including:
It is determined that during the i-th row picture, jth pictures are read from the picture to be shown, j is initially 1;
If j is 1, detect whether the depth-width ratio of the jth pictures belongs to the predetermined interval, if detecting described the
The depth-width ratio of j pictures belongs to the predetermined interval, then by the jth pictures be defined as selecting described at least one figure
Piece;If detecting, the depth-width ratio of the jth pictures is less than the minimum value of the predetermined interval, retains the jth pictures,
The j is adjusted to j+1, continued executing with described the step of read jth pictures from the picture to be shown;
If j is more than 1, detect whether the depth-width ratio sum of the j pictures read belongs to the predetermined interval, if inspection
The depth-width ratio sum for measuring the j pictures belongs to the predetermined interval, then by the j pictures be defined as selecting described in extremely
Few pictures;If detecting, the depth-width ratio sum of the j pictures is less than the minimum value of the predetermined interval, retains described
Jth pictures, j+1 is adjusted to by the j, continues executing with the step that jth pictures are read from the picture to be shown
Suddenly;If detecting, the depth-width ratio sum of the j pictures is more than the maximum of the predetermined interval, will be in the jth figure
The j-1 pictures read before piece are defined as at least pictures selected.
Optionally, in addition to:
Obtain the depth-width ratio of the display screen;
The predetermined interval is determined according to the depth-width ratio of the display screen.
Optionally, it is described will determine described in an at least pictures zoomed in and out according to respective depth-width ratio so that contracting
The zoom width sum for putting rear i-th row picture is equal to display screen width, including:
Obtain the depth-width ratio per pictures in the display screen width and an at least pictures;
The sum reciprocal of each depth-width ratio is calculated, by the display screen width divided by described and to obtain every pictures common
Scaling height;
By the scaling height divided by per the respective depth-width ratio of pictures, the zoom width of every pictures is obtained.
According to the second aspect of the embodiment of the present disclosure there is provided a kind of image display apparatus, including:
Picture acquisition module, is configured as obtaining picture to be shown;
Picture determining module, is configured as every in the picture to be shown that is got according to the picture acquisition module
The respective depth-width ratio of pictures determines at least pictures shown in the i-th row, and i is positive integer;
Picture Zoom module, be configured as by the picture determining module determine described in an at least pictures according to each
From depth-width ratio zoom in and out so that after scaling the zoom width sum of the i-th row picture be equal to display screen width;
Picture display module, is configured as the i-th row picture after being scaled to the picture Zoom module and shows;
Operation circulation module, is configured as the i being adjusted to i+1, continues executing with described according to the figure to be shown
Per pictures, respective depth-width ratio determines the operation of at least pictures shown in the i-th row in piece.
Optionally, the picture determining module, including:
Ratio calculation unit, is configured as calculating in the picture to be shown per the respective depth-width ratio of pictures;
Picture selecting unit, is configured as at least pictures for selecting depth-width ratio sum to belong to predetermined interval;
Picture determine unit, be configured as by the picture selecting unit select described in an at least pictures be defined as
The picture that i-th row is shown.
Optionally, the picture selecting unit, including:
Picture reads subelement, is configured as it is determined that during the i-th row picture, being read from the picture to be shown
Jth pictures, j is initially 1;
First choice subelement, if it is 1 to be configured as j, detects that the picture reads the jth that subelement is read
Whether the depth-width ratio of picture belongs to the predetermined interval, if detecting, the depth-width ratio of the jth pictures belongs to the fate
Between, then by the jth pictures be defined as selecting described in an at least pictures;If detecting, the height of the jth pictures is wide
Than the minimum value less than the predetermined interval, then retain the jth pictures, the j is adjusted to j+1, continue executing with described
The step of jth pictures being read from the picture to be shown;
Second selection subelement, if being configured as j more than 1, detects that the picture reads j that subelement has been read
Whether the depth-width ratio sum of picture belongs to the predetermined interval, if detecting, the depth-width ratio sum of the j pictures belongs to described
Predetermined interval, then by the j pictures be defined as selecting described in an at least pictures;If detecting the height of the j pictures
The wide minimum value for being less than the predetermined interval than sum, then retain the jth pictures, the j be adjusted into j+1, continue to hold
The step of jth pictures being read described in row from the picture to be shown;If detecting the depth-width ratio sum of the j pictures
More than the maximum of the predetermined interval, then the j-1 pictures read before the jth pictures are defined as to the institute selected
State an at least pictures.
Optionally, in addition to:
Ratio acquisition module, is configured as obtaining the depth-width ratio of the display screen;
Interval determination module, the depth-width ratio of the display screen for being configured as being got according to the ratio acquisition module is true
The fixed predetermined interval.
Optionally, the picture Zoom module, including:
Numerical value acquiring unit, is configured as obtaining in the display screen width and an at least pictures per pictures
Depth-width ratio;
Height calculation unit, is configured as calculating the inverse for each depth-width ratio that the numerical value acquiring unit is got
With, by the display screen width divided by it is described and obtain every pictures jointly scaling height;
Width calculation unit, is configured as calculating the height calculation unit into obtained scaling height divided by every
The respective depth-width ratio of picture, obtains the zoom width of every pictures.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of image display apparatus, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain picture to be shown;
According to per pictures, respective depth-width ratio determines at least one figure shown in the i-th row in the picture to be shown
Piece, i is positive integer;
At least a pictures are zoomed in and out according to respective depth-width ratio described in determining so that the i-th row figure after scaling
The zoom width sum of piece is equal to display screen width;
The i-th row picture after scaling is shown;
The i is adjusted to i+1, continued executing with described according to respective high wide per pictures in the picture to be shown
Than determining the step of at least pictures that the i-th row is shown.
The technical scheme provided by this disclosed embodiment can include the following benefits:
By according to per pictures, respective depth-width ratio determines at least one figure shown in the i-th row in picture to be shown
Piece;At least pictures determined are zoomed in and out according to respective depth-width ratio so that the scaling of the i-th row picture is wide after scaling
Spend sum and be equal to display screen width;The i-th row picture after scaling is shown;I is adjusted to i+1, continued executing with according to treating
Per pictures, respective depth-width ratio is determined the step of at least pictures that the i-th row is shown in the picture of display, is not being needed
At least pictures shown in the i-th row are capable of determining that in the case of framework, and an at least pictures are zoomed in and out aobvious
Show, it is ensured that the information content shown per pictures is not lost, and the length and width growing and be wider than framework for solving picture cause picture
The problem of information content of display is lost, has reached the effect for the information content that increase picture is shown.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary, this can not be limited
It is open.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows and meets this embodiment,
And be used to explain this principle together in specification.
Fig. 1 is a kind of flow chart of image display method according to an exemplary embodiment.
Fig. 2A is a kind of flow chart of image display method according to another exemplary embodiment.
Fig. 2 B are a kind of design sketch of image display method according to the present exemplary embodiment.
Fig. 3 is a kind of block diagram of image display apparatus according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of image display apparatus according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of device shown for picture according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent and this consistent all embodiment.On the contrary, they are only and such as appended right
The example of consistent apparatus and method in terms of be described in detail in claim, this some.
Fig. 1 is a kind of flow chart of image display method according to an exemplary embodiment, the image display method
Applied in terminal, as shown in figure 1, the image display method comprises the following steps.
In a step 101, picture to be shown is obtained.
Picture to be shown can be the Web page picture or terminal local that terminal is got from the webserver
The picture of storage, the present embodiment does not limit the source of picture.
In a step 102, according to determined in picture to be shown per the respective depth-width ratio of pictures the i-th row show to
Few pictures, i is positive integer.
The depth-width ratio of picture refers to the ratio for obtaining the actual height divided by developed width of picture.
Generally, terminal is the number that picture is determined according to the number of the framework set in the i-th row, so that it is determined that going out i-th
An at least pictures for row display.Framework is not set in the present embodiment in the i-th row, and therefore, terminal is needed according to picture
Depth-width ratio determine at least pictures that are shown in the i-th row.
In step 103, at least pictures determined are zoomed in and out according to respective depth-width ratio so that after scaling
The zoom width sum of i-th row picture is equal to display screen width.
Because an at least pictures need to show in a line, it therefore, it can to every figure in this at least a pictures
Piece is zoomed in and out so that the zoom width sum after scaling per pictures is equal to the width of display screen.Wherein, zoom width refers to
The width of picture after scaling.
In the present embodiment, terminal can carry out equal proportion scaling to every pictures, to ensure that picture is undistorted.
At step 104, the i-th row picture after scaling is shown.
Picture arrangement after every hypertonic in i-th row picture is put is shown on a display screen.Because the i-th row picture is
What the size after being scaled according to picture was directly displayed, and picture need not be added in framework, therefore, can be complete per pictures
Be not in the display space of waste in full display and display screen, it is to avoid the length and width of picture be more than framework length and
The problem of part picture that width is caused is hidden, adds the information content that picture is shown.
In step 105, i is adjusted to i+1, continued executing with according to respective high wide per pictures in picture to be shown
Than determining the step of at least pictures that the i-th row is shown.
After the i-th row picture has been shown, if terminal also needs to show i+1 row picture, i can be updated to
I+1, continues executing with step 101 to step 105, until terminating flow after having shown all pictures to be shown.
When terminal shows picture first, step 104 can also be revised as delaying the i-th row picture after scaling
Deposit, circulation performs step 101 to step 105, and at least a line picture of caching is shown together after predetermined condition is met.
Afterwards, terminal can perform the present embodiment offer step 101 show picture line by line to step 105.
In summary, the disclosure provide image display method, by according in picture to be shown per pictures each
Depth-width ratio determine at least pictures that are shown in the i-th row;By at least pictures determined according to respective depth-width ratio
Zoom in and out so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;To the i-th row picture after scaling
Shown;I is adjusted to i+1, continued executing with according to respective depth-width ratio is determined i-th per pictures in picture to be shown
The step of at least pictures for row display, at least one shown in the i-th row is capable of determining that in the case where not needing framework
Pictures, and display is zoomed in and out to an at least pictures, it is ensured that the information content shown per pictures is not lost, and solves figure
The problem of length grown and be wider than framework of piece and the wide information content for causing picture to show are lost, has reached what increase picture was shown
The effect of information content.
Fig. 2A is a kind of flow chart of image display method according to another exemplary embodiment, the picture display side
Method is applied in terminal, and as shown in Figure 2 A, the image display method comprises the following steps.
In step 201, picture to be shown is obtained.
Picture to be shown can be the Web page picture or terminal local that terminal is got from the webserver
The picture of storage, the present embodiment does not limit the source of picture.
In step 202., calculate in picture to be shown per the respective depth-width ratio of pictures;Selection depth-width ratio sum belongs to
An at least pictures for predetermined interval;The picture that an at least pictures are defined as showing in the i-th row, i is positive integer.
Generally, terminal is the number that picture is determined according to the number of the framework set in the i-th row, so that it is determined that going out i-th
An at least pictures for row display.Framework is not set in the present embodiment in the i-th row, and therefore, terminal is needed according to waiting to show
Per pictures, respective depth-width ratio determines at least pictures shown in the i-th row in the picture shown.That is, terminal calculates to be shown
Picture in per pictures respective depth-width ratios;Selection depth-width ratio sum belongs to an at least pictures for predetermined interval;Will at least
One pictures are defined as the picture shown in the i-th row.Wherein, i is positive integer.
The depth-width ratio of picture refers to the ratio for obtaining the actual height divided by developed width of picture.Such as, the reality of picture
Border height is 6 millimeters, and developed width is 5 millimeters, then depth-width ratio=6/5=1.2 of picture.
Predetermined interval is the interval of the picture for selecting to show in the i-th row.When calculating predetermined interval, the present embodiment is carried
The image display method of confession, in addition to:
Obtain the depth-width ratio of display screen;Predetermined interval is determined according to the depth-width ratio of display screen.
The depth-width ratio of display screen refers to the ratio that the actual height divided by developed width of display screen are obtained.Shown in calculating
After the depth-width ratio of display screen, terminal can obtain the minimum value and maximum of predetermined interval according to the depth-width ratio of display screen, according to most
Small value and maximum determine the predetermined interval.Wherein, minimum value and maximum can terminal obtained according to pre-defined algorithm,
It can based on experience value summarize and obtain, the present embodiment does not limit the acquisition modes of minimum value and maximum.
Such as, when the height of display screen is 73.6 centimetres, and width is 14.4 centimetres, depth-width ratio=73.6/ of display screen
14.4=5.1, it is that 2, maximum is 4 that minimum value can be now determined according to the depth-width ratio, it is determined that predetermined interval be [2,
4]。
In the present embodiment, because terminal according to the depth-width ratio of display screen adjusts predetermined interval so that the i-th row picture can
Adapt to display screen to zoom in and out, to beautify image display effect.
Wherein, selection depth-width ratio sum belongs to an at least pictures for predetermined interval, including:
1) it is determined that during the i-th row picture, jth pictures are read from picture to be shown, j is initially 1;
If 2) j is 1, whether the depth-width ratio of detection jth pictures belongs to predetermined interval, if detecting jth pictures
Depth-width ratio belongs to predetermined interval, then jth pictures are defined as at least pictures selected;If detecting jth pictures
Depth-width ratio is less than the minimum value of predetermined interval, then retains jth pictures, j is adjusted into j+1, continued executing with from figure to be shown
The step of jth pictures being read in piece;
3) if j is more than 1, detect whether the depth-width ratio sum of the j pictures read belongs to predetermined interval, if detection
The depth-width ratio sum for going out j pictures belongs to predetermined interval, then j pictures are defined as at least pictures selected;If detection
The depth-width ratio sum for going out j pictures is less than the minimum value of predetermined interval, then retains jth pictures, j is adjusted into j+1, continues to hold
The step of row reads jth pictures from picture to be shown;If detecting, the depth-width ratio sum of j pictures is more than predetermined interval
Maximum, then the j-1 pictures read before jth pictures are defined as at least pictures selected.
In order to make it easy to understand, the present embodiment with predetermined interval is illustrated exemplified by [2,4].It is determined that during the i-th row picture,
Terminal reads the 1st pictures in the picture got, obtains the depth-width ratio of the 1st pictures;If the depth-width ratio of the 1st pictures
More than 2 and less than 4, then terminal determines to need the 1st pictures being shown separately in the i-th row;If the depth-width ratio of the 1st pictures is small
In 2, then terminal retains the 1st pictures.The 2nd pictures are read from the picture got, the depth-width ratio of the 2nd pictures is obtained,
The depth-width ratio sum of the 1st pictures and the 2nd pictures is calculated, if depth-width ratio sum is more than 2 and less than 4, terminal determines to need
1st pictures and the 2nd pictures are included in the i-th row;If depth-width ratio sum is more than 4, terminal determines to need the 1st
Picture is shown separately in the i-th row;If depth-width ratio sum is less than 2, terminal retains the 2nd pictures, from the picture got
The 3rd pictures are read, the depth-width ratio of the 3rd pictures is obtained, the height for calculating the 1st pictures, the 2nd pictures and the 3rd pictures is wide
Than sum, continue to compare depth-width ratio sum and predetermined interval, until determining needs after at least pictures that the i-th row is shown
Exit circulation.Wherein, terminal can read picture according to the acquisition order of picture.
In step 203, at least pictures determined are zoomed in and out according to respective depth-width ratio so that after scaling
The zoom width sum of i-th row picture is equal to display screen width.
Because an at least pictures need to show in a line, it therefore, it can to every figure in this at least a pictures
Piece is zoomed in and out so that the zoom width sum after scaling per pictures is equal to display screen width.Wherein, zoom width refers to contracting
The width of picture after putting.In the present embodiment, terminal can carry out equal proportion scaling to every pictures, to ensure that picture does not lose
Very.
Wherein, at least pictures determined are zoomed in and out according to respective depth-width ratio so that the i-th row figure after scaling
The zoom width sum of piece is equal to display screen width, including:
1) depth-width ratio in display screen width and an at least pictures per pictures is obtained;
2) sum reciprocal of each depth-width ratio is calculated, it is by display screen width divided by high with the scaling of every pictures jointly is obtained
Degree;
3) height will be scaled divided by per the respective depth-width ratio of pictures, and will obtain the zoom width of every pictures.
The present embodiment is illustrated exemplified by showing 3 pictures in the i-th row to the scaling process of picture, it is assumed that m figures
Piece has depth-width ratio m, zoom width m and scaling height m, then zoom width m=scales height m/ depth-width ratios m.
Due to zoom width 1+ zoom width 2+ zoom width 3=display screen width, then (scale 1/ depth-width ratio 1 of height)+
(2/ depth-width ratio 2 of scaling height)+(3/ depth-width ratio 3 of scaling height)=display screen width, due to 3 pictures shown in same a line
Scaling it is highly identical, then scale height=display screen width/[(1/ the ratio of width to height 1)+(1/ the ratio of width to height 2)+(1/ the ratio of width to height 3)],
Calculate the sum reciprocal of each the ratio of width to height, by display screen width divided by and obtain every pictures jointly scaling height.
Height m/ depth-width ratio m are scaled further according to zoom width m=, zoom width m can be calculated respectively, height will be scaled
Degree divided by the respective depth-width ratio of every pictures, obtain the zoom width of every pictures.
In step 204, the i-th row picture after scaling is shown.
Picture arrangement after every hypertonic in i-th row picture is put is shown on a display screen.Because the i-th row picture is
What the size after being scaled according to picture was directly displayed, and picture need not be added in framework, therefore, can be complete per pictures
Be not in the display space of waste in full display and display screen, it is to avoid the length and width of picture be more than framework length and
The problem of part picture that width is caused is hidden, adds the information content that picture is shown.
The rectangle that refer in a kind of design sketch of image display method shown in Fig. 2 B, Fig. 2 B on display screen is according to contracting
The size determination of rear picture is put, for representing a pictures, then the 1st row shows 3 pictures, and the 2nd row shows 2 figures
Piece, the 3rd row shows 2 pictures, and the 4th row shows 2 pictures, and the 5th row shows 3 pictures.
In step 205, i is adjusted to i+1, continued executing with according to respective high wide per pictures in picture to be shown
Than determining the step of at least pictures that the i-th row is shown.
After the i-th row picture has been shown, if terminal also needs to show i+1 row picture, i can be updated to
I+1, continues executing with step 201 to step 205, until terminating flow after having shown all pictures to be shown.
When terminal shows picture first, step 204 can also be revised as delaying the i-th row picture after scaling
Deposit, circulation performs step 201 to step 205, and at least a line picture of caching is shown together after predetermined condition is met.
Afterwards, terminal can perform the present embodiment offer step 201 show picture line by line to step 205.
The image display method that the present embodiment is provided can be implemented as a new BOX Model and be added to CSS (Cascading
Stylesheet, CSS) in, rather than by hack original BOX Model is expanded, will not cause CSS with
Coupling is produced between JavaScript, so as to improve the maintainability and reliability of image display method.
In summary, the disclosure provide image display method, by according in picture to be shown per pictures each
Depth-width ratio determine at least pictures that are shown in the i-th row;By at least pictures determined according to respective depth-width ratio
Zoom in and out so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;To the i-th row picture after scaling
Shown;I is adjusted to i+1, continued executing with according to respective depth-width ratio is determined i-th per pictures in picture to be shown
The step of at least pictures for row display, at least one shown in the i-th row is capable of determining that in the case where not needing framework
Pictures, and display is zoomed in and out to an at least pictures, it is ensured that the information content shown per pictures is not lost, and solves figure
The problem of length grown and be wider than framework of piece and the wide information content for causing picture to show are lost, has reached what increase picture was shown
The effect of information content.
In addition, the depth-width ratio by obtaining display screen;Predetermined interval is determined according to the depth-width ratio of display screen, can be according to aobvious
The depth-width ratio of display screen adjusts predetermined interval so that the i-th row picture can adapt to display screen and zoom in and out, shown with beautifying picture
Effect.
Fig. 3 is a kind of block diagram of image display apparatus according to an exemplary embodiment, and the image display apparatus should
For in terminal, as shown in figure 3, the image display apparatus includes:Picture acquisition module 310, picture determining module 320, picture
Zoom module 330, picture display module 340 and operation circulation module 350.
The picture acquisition module 310, is configured as obtaining picture to be shown;
The picture determining module 320, is configured as every in the picture to be shown that is got according to picture acquisition module 310
The respective depth-width ratio of pictures determines at least pictures shown in the i-th row, and i is positive integer;
The picture Zoom module 330, is configured as at least pictures for determining picture determining module 320 according to each
From depth-width ratio zoom in and out so that after scaling the zoom width sum of the i-th row picture be equal to display screen width;
The picture display module 340, is configured as the i-th row picture after being scaled to picture Zoom module 330 and shows;
The operation circulation module 350, is configured as i being adjusted to i+1, continues executing with according to every in picture to be shown
The respective depth-width ratio of picture determines the operation of at least pictures shown in the i-th row.
In summary, the disclosure provide image display apparatus, by according in picture to be shown per pictures each
Depth-width ratio determine at least pictures that are shown in the i-th row;By at least pictures determined according to respective depth-width ratio
Zoom in and out so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;To the i-th row picture after scaling
Shown;I is adjusted to i+1, continued executing with according to respective depth-width ratio is determined i-th per pictures in picture to be shown
The step of at least pictures for row display, at least one shown in the i-th row is capable of determining that in the case where not needing framework
Pictures, and display is zoomed in and out to an at least pictures, it is ensured that the information content shown per pictures is not lost, and solves figure
The problem of length grown and be wider than framework of piece and the wide information content for causing picture to show are lost, has reached what increase picture was shown
The effect of information content.
Fig. 4 is a kind of block diagram of image display apparatus according to an exemplary embodiment, and the image display apparatus should
For in terminal, as shown in figure 4, the image display apparatus includes:Picture acquisition module 310, picture determining module 320, picture
Zoom module 330, picture display module 340 and operation circulation module 350.
The picture acquisition module 310, is configured as obtaining picture to be shown;
The picture determining module 320, is configured as every in the picture to be shown that is got according to picture acquisition module 310
The respective depth-width ratio of pictures determines at least pictures shown in the i-th row, and i is positive integer;
The picture Zoom module 330, is configured as at least pictures for determining picture determining module 320 according to each
From depth-width ratio zoom in and out so that after scaling the zoom width sum of the i-th row picture be equal to display screen width;
The picture display module 340, is configured as the i-th row picture after being scaled to picture Zoom module 330 and shows;
The operation circulation module 350, is configured as i being adjusted to i+1, continues executing with according to every in picture to be shown
The respective depth-width ratio of picture determines the operation of at least pictures shown in the i-th row.
Optionally, picture determining module 320, including:Ratio calculation unit 321, picture selecting unit 322 and picture are determined
Unit 323;
The ratio calculation unit 321, is configured as calculating in picture to be shown per the respective depth-width ratio of pictures;
The picture selecting unit 322, is configured as at least pictures for selecting depth-width ratio sum to belong to predetermined interval;
The picture determine unit 323, at least pictures for being configured as selecting picture selecting unit 322 are defined as
The picture that i-th row is shown.
Optionally, picture selecting unit 322, including:Picture reads subelement 3221, first choice subelement 3222 and the
Two selection subelements 3223;
The picture reads subelement 3221, is configured as it is determined that during the i-th row picture, reading the from picture to be shown
J pictures, j is initially 1;
The first choice subelement 3222, if it is 1 to be configured as j, detection picture reads the jth that subelement 3221 is read
Whether the depth-width ratio of pictures belongs to predetermined interval, if detecting, the depth-width ratio of jth pictures belongs to predetermined interval, by jth
Pictures are defined as at least pictures selected;If detecting, the depth-width ratio of jth pictures is less than the minimum value of predetermined interval,
Then retain jth pictures, j is adjusted to j+1, continue executing with the step of reading jth pictures from picture to be shown;
The second selection subelement 3223, if being configured as j more than 1, detection picture reads subelement 3221 and read
Whether the depth-width ratio sum of the j pictures taken belongs to predetermined interval, if detecting, the depth-width ratio sum of j pictures belongs to fate
Between, then j pictures are defined as at least pictures selected;If detecting, the depth-width ratio sum of j pictures is less than fate
Between minimum value, then retain jth pictures, j be adjusted to j+1, continue executing with from picture to be shown reading jth pictures
The step of;If detecting, the depth-width ratio sum of j pictures is more than the maximum of predetermined interval, will be read before jth pictures
The j-1 pictures taken are defined as at least pictures selected.
Optionally, the image display apparatus that the present embodiment is provided, in addition to:Ratio acquisition module 360 and interval determination mould
Block 370;
The ratio acquisition module 360, is configured as obtaining the depth-width ratio of display screen;
The interval determination module 370, the depth-width ratio of display screen for being configured as being got according to ratio acquisition module 360 is true
Determine predetermined interval.
Optionally, picture Zoom module 330, including:Numerical value acquiring unit 331, height calculation unit 332 and width calculation
Unit 333;
The numerical value acquiring unit 331, is configured as obtaining the height in display screen width and an at least pictures per pictures
Width ratio;
The height calculation unit 332, is configured as the inverse for each depth-width ratio that evaluation acquiring unit 331 is got
Sum, by display screen width divided by and obtain every pictures jointly scaling height;
The width calculation unit 333, is configured as calculating height calculation unit 332 into obtained scaling height divided by every
The respective depth-width ratio of picture, obtains the zoom width of every pictures.
In summary, the disclosure provide image display apparatus, by according in picture to be shown per pictures each
Depth-width ratio determine at least pictures that are shown in the i-th row;By at least pictures determined according to respective depth-width ratio
Zoom in and out so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;To the i-th row picture after scaling
Shown;I is adjusted to i+1, continued executing with according to respective depth-width ratio is determined i-th per pictures in picture to be shown
The step of at least pictures for row display, at least one shown in the i-th row is capable of determining that in the case where not needing framework
Pictures, and display is zoomed in and out to an at least pictures, it is ensured that the information content shown per pictures is not lost, and solves figure
The problem of length grown and be wider than framework of piece and the wide information content for causing picture to show are lost, has reached what increase picture was shown
The effect of information content.
In addition, the depth-width ratio by obtaining display screen;Predetermined interval is determined according to the depth-width ratio of display screen, can be according to aobvious
The depth-width ratio of display screen adjusts predetermined interval so that the i-th row picture can adapt to display screen and zoom in and out, shown with beautifying picture
Effect.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 5 is a kind of block diagram for image display apparatus 500 according to an exemplary embodiment.For example, device
500 can be mobile phone, and computer, digital broadcast terminal, messaging devices, game console, tablet device, medical treatment is set
It is standby, body-building equipment, personal digital assistant etc..
Reference picture 5, device 500 can include following one or more assemblies:Processing assembly 502, memory 504, power supply
Component 506, multimedia groupware 508, audio-frequency assembly 510, the interface 512 of input/output (I/O), sensor cluster 514, and
Communication component 516.
The integrated operation of the usual control device 500 of processing assembly 502, such as with display, call, data communication, phase
Machine operates the operation associated with record operation.Processing assembly 502 can refer to including one or more processors 518 to perform
Order, to complete all or part of step of above-mentioned method.In addition, processing assembly 502 can include one or more modules, just
Interaction between processing assembly 502 and other assemblies.For example, processing assembly 502 can include multi-media module, it is many to facilitate
Interaction between media component 508 and processing assembly 502.
Memory 504 is configured as storing various types of data supporting the operation in device 500.These data are shown
Example includes the instruction of any application program or method for operating on device 500, and contact data, telephone book data disappears
Breath, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile memory device or their group
Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) is erasable to compile
Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 can include power management system
System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 500.
Multimedia groupware 508 is included in the screen of one output interface of offer between described device 500 and user.One
In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings
Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action
Border, but also detection touches or slide related duration and pressure with described.In certain embodiments, many matchmakers
Body component 508 includes a front camera and/or rear camera.When device 500 be in operator scheme, such as screening-mode or
During video mode, front camera and/or rear camera can receive the multi-medium data of outside.Each front camera and
Rear camera can be a fixed optical lens system or with focusing and optical zoom capabilities.
Audio-frequency assembly 510 is configured as output and/or input audio signal.For example, audio-frequency assembly 510 includes a Mike
Wind (MIC), when device 500 be in operator scheme, when such as call model, logging mode and speech recognition mode, microphone by with
It is set to reception external audio signal.The audio signal received can be further stored in memory 504 or via communication set
Part 516 is sent.In certain embodiments, audio-frequency assembly 510 also includes a loudspeaker, for exports audio signal.
I/O interfaces 512 is provide interface between processing assembly 502 and peripheral interface module, above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock
Determine button.
Sensor cluster 514 includes one or more sensors, and the state for providing various aspects for device 500 is commented
Estimate.For example, sensor cluster 514 can detect opening/closed mode of device 500, the relative positioning of component is for example described
Component is the display and keypad of device 500, and sensor cluster 514 can be with 500 1 components of detection means 500 or device
Position change, the existence or non-existence that user contacts with device 500, the orientation of device 500 or acceleration/deceleration and device 500
Temperature change.Sensor cluster 514 can include proximity transducer, be configured to detect in not any physical contact
The presence of neighbouring object.Sensor cluster 514 can also include optical sensor, such as CMOS or ccd image sensor, for into
As being used in application.In certain embodiments, the sensor cluster 514 can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device
500 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation
In example, communication component 516 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 516 also includes near-field communication (NFC) module, to promote junction service.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application specific integrated circuits (ASIC), numeral
Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided
Such as include the memory 504 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 518 of device 500.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
Those skilled in the art will readily occur to this other implementations after considering specification and putting into practice disclosure herein
Scheme.The application is intended to this any modification, purposes or adaptations, and these modifications, purposes or adaptability become
Change and follow general principle originally and including the undocumented common knowledge or conventional techniques in the art of the disclosure.
Description and embodiments are considered only as exemplary, and this true scope and spirit are pointed out by following claim.
It should be appreciated that the precision architecture for being described above and being shown in the drawings originally is not limited to, and can
To carry out various modifications and changes without departing from the scope.This scope is only limited by appended claim.
Claims (9)
1. a kind of image display method, it is characterised in that including:
Obtain picture to be shown;
According to per pictures, respective depth-width ratio determines at least pictures, i shown in the i-th row in the picture to be shown
For positive integer, i-th row is not provided for showing the framework of picture;
At least a pictures are zoomed in and out according to respective depth-width ratio described in determining so that the i-th row picture after scaling
Zoom width sum is equal to display screen width;
The i-th row picture after scaling is shown;
The i is adjusted to i+1, continued executing with described according to true per the respective depth-width ratio of pictures in the picture to be shown
The step of being scheduled at least pictures that the i-th row is shown;
Wherein, it is described will determine described in an at least pictures zoomed in and out according to respective depth-width ratio so that i-th after scaling
The zoom width sum of row picture is equal to display screen width, including:
Obtain the depth-width ratio per pictures in the display screen width and an at least pictures;
The sum reciprocal of each depth-width ratio is calculated, the sum reciprocal of the display screen width divided by each depth-width ratio is obtained
Scaling height per pictures jointly;
By the scaling height divided by per the respective depth-width ratio of pictures, the zoom width of every pictures is obtained.
2. according to the method described in claim 1, it is characterised in that described according to each per pictures in the picture to be shown
From depth-width ratio determine at least pictures that are shown in the i-th row, including:
Calculate in the picture to be shown per the respective depth-width ratio of pictures;
Selection depth-width ratio sum belongs to an at least pictures for predetermined interval;
The picture that an at least pictures are defined as showing in i-th row.
3. method according to claim 2, it is characterised in that the selection depth-width ratio sum belongs to predetermined interval at least
One pictures, including:
It is determined that during the i-th row picture, jth pictures are read from the picture to be shown, j is initially 1;
If j is 1, detect whether the depth-width ratio of the jth pictures belongs to the predetermined interval, if detecting the jth
The depth-width ratio of picture belongs to the predetermined interval, then by the jth pictures be defined as selecting described in an at least pictures;If
Detect that the depth-width ratio of the jth pictures is less than the minimum value of the predetermined interval, then retain the jth pictures, by institute
State j and be adjusted to j+1, continue executing with described the step of read jth pictures from the picture to be shown;
If j is more than 1, detect whether the depth-width ratio sum of the j pictures read belongs to the predetermined interval, if detecting
The depth-width ratio sum of the j pictures belongs to the predetermined interval, then by the j pictures be defined as selecting described at least one
Pictures;If detecting, the depth-width ratio sum of the j pictures is less than the minimum value of the predetermined interval, retains the jth
Pictures, j+1 is adjusted to by the j, is continued executing with described the step of read jth pictures from the picture to be shown;
If detect the j pictures depth-width ratio sum be more than the predetermined interval maximum, will the jth pictures it
The j-1 pictures of preceding reading are defined as at least pictures selected.
4. according to the method in claim 2 or 3, it is characterised in that also include:
Obtain the depth-width ratio of the display screen;
The predetermined interval is determined according to the depth-width ratio of the display screen.
5. a kind of image display apparatus, it is characterised in that including:
Picture acquisition module, is configured as obtaining picture to be shown;
Picture determining module, is configured as every figure in the picture to be shown that is got according to the picture acquisition module
The respective depth-width ratio of piece determines at least pictures shown in the i-th row, and i is positive integer, and i-th row is not provided for display
The framework of picture;
Picture Zoom module, be configured as by the picture determining module determine described in an at least pictures according to respective
Depth-width ratio is zoomed in and out so that the zoom width sum of the i-th row picture is equal to display screen width after scaling;
Picture display module, is configured as the i-th row picture after being scaled to the picture Zoom module and shows;
Operation circulation module, is configured as the i being adjusted to i+1, continues executing with described according in the picture to be shown
Per pictures, respective depth-width ratio determines the operation of at least pictures shown in the i-th row;
Wherein, the picture Zoom module, including:
Numerical value acquiring unit, the height being configured as obtaining in the display screen width and an at least pictures per pictures is wide
Than;
Height calculation unit, is configured as calculating the sum reciprocal for each depth-width ratio that the numerical value acquiring unit is got, will
The sum reciprocal of the display screen width divided by each depth-width ratio obtains the scaling height of every pictures jointly;
Width calculation unit, is configured as calculating the height calculation unit into obtained scaling height divided by every pictures
Respective depth-width ratio, obtains the zoom width of every pictures.
6. device according to claim 5, it is characterised in that the picture determining module, including:
Ratio calculation unit, is configured as calculating in the picture to be shown per the respective depth-width ratio of pictures;
Picture selecting unit, is configured as at least pictures for selecting depth-width ratio sum to belong to predetermined interval;
Picture determine unit, be configured as by the picture selecting unit select described in an at least pictures be defined as described
The picture that i-th row is shown.
7. device according to claim 6, it is characterised in that the picture selecting unit, including:
Picture reads subelement, is configured as it is determined that during the i-th row picture, jth is read from the picture to be shown
Pictures, j is initially 1;
First choice subelement, if it is 1 to be configured as j, detects that the picture reads the jth pictures that subelement is read
Depth-width ratio whether belong to the predetermined interval, if detecting, the depth-width ratio of the jth pictures belongs to the predetermined interval,
By the jth pictures be defined as selecting described in an at least pictures;If detecting, the depth-width ratio of the jth pictures is less than
The minimum value of the predetermined interval, then retain the jth pictures, the j be adjusted into j+1, continues executing with described from described
The step of jth pictures being read in picture to be shown;
Second selection subelement, if being configured as j more than 1, detects that the picture reads the j pictures that subelement has been read
Depth-width ratio sum whether belong to the predetermined interval, if detecting, the depth-width ratio sum of the j pictures belongs to described predetermined
Interval, then by the j pictures be defined as selecting described in an at least pictures;If detecting the depth-width ratio of the j pictures
Sum is less than the minimum value of the predetermined interval, then retains the jth pictures, the j is adjusted into j+1, continue executing with institute
State the step of reading jth pictures from the picture to be shown;If detecting, the depth-width ratio sum of the j pictures is more than
The maximum of the predetermined interval, then by the j-1 pictures read before the jth pictures be defined as selecting described in extremely
Few pictures.
8. the device according to claim 6 or 7, it is characterised in that also include:
Ratio acquisition module, is configured as obtaining the depth-width ratio of the display screen;
Interval determination module, the depth-width ratio of the display screen for being configured as being got according to the ratio acquisition module determines institute
State predetermined interval.
9. a kind of image display apparatus, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain picture to be shown;
According to per pictures, respective depth-width ratio determines at least pictures, i shown in the i-th row in the picture to be shown
For positive integer, i-th row is not provided for showing the framework of picture;
At least a pictures are zoomed in and out according to respective depth-width ratio described in determining so that the i-th row picture after scaling
Zoom width sum is equal to display screen width;
The i-th row picture after scaling is shown;
The i is adjusted to i+1, continued executing with described according to true per the respective depth-width ratio of pictures in the picture to be shown
The step of being scheduled at least pictures that the i-th row is shown;
Wherein, it is described will determine described in an at least pictures zoomed in and out according to respective depth-width ratio so that i-th after scaling
The zoom width sum of row picture is equal to display screen width, including:
Obtain the depth-width ratio per pictures in the display screen width and an at least pictures;
The sum reciprocal of each depth-width ratio is calculated, the sum reciprocal of the display screen width divided by each depth-width ratio is obtained
Scaling height per pictures jointly;
By the scaling height divided by per the respective depth-width ratio of pictures, the zoom width of every pictures is obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410293389.3A CN104111777B (en) | 2014-06-26 | 2014-06-26 | Image display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410293389.3A CN104111777B (en) | 2014-06-26 | 2014-06-26 | Image display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104111777A CN104111777A (en) | 2014-10-22 |
CN104111777B true CN104111777B (en) | 2017-08-01 |
Family
ID=51708590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410293389.3A Active CN104111777B (en) | 2014-06-26 | 2014-06-26 | Image display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104111777B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105808102B (en) * | 2016-03-03 | 2019-11-08 | 北京小米移动软件有限公司 | Add the method and device of frame |
CN109697264B (en) * | 2017-10-23 | 2023-04-07 | 腾讯科技(深圳)有限公司 | Page element arrangement method and device, computing equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7398478B2 (en) * | 2003-11-14 | 2008-07-08 | Microsoft Corporation | Controlled non-proportional scaling display |
JP2006295314A (en) * | 2005-04-06 | 2006-10-26 | Sony Corp | Image processor and processing method, recording medium, and program |
CN102682099B (en) * | 2012-04-27 | 2015-04-22 | 北京百度网讯科技有限公司 | Method and device for providing target pictures in target areas |
CN103593820A (en) * | 2013-11-27 | 2014-02-19 | 深圳市金立通信设备有限公司 | Method for picture processing and terminal |
-
2014
- 2014-06-26 CN CN201410293389.3A patent/CN104111777B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104111777A (en) | 2014-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104503689B (en) | Application interface display methods and device | |
CN103916595B (en) | For obtaining the method for image and electronic installation for handling this method | |
CN104238912B (en) | application control method and device | |
CN103885712B (en) | Webpage method of adjustment, device and electronic equipment | |
CN104793843B (en) | desktop display method and device | |
CN107066172A (en) | The document transmission method and device of mobile terminal | |
CN104090735B (en) | The projecting method and device of a kind of picture | |
CN104536935B (en) | Calculate display methods, calculate edit methods and device | |
CN107423106A (en) | The method and apparatus for supporting more frame grammars | |
CN104598534B (en) | Picture method for folding and device | |
CN107315792A (en) | Method for updating pages, device, electronic equipment and computer-readable recording medium | |
CN104536787B (en) | Resource preloads method and device | |
CN104598131A (en) | Method and device for adjusting page display mode | |
CN104168422A (en) | Image processing method and device | |
CN108108671A (en) | Description of product information acquisition method and device | |
CN104461348A (en) | Method and device for selecting information | |
CN107193554A (en) | A kind of method and apparatus for generating front-end code | |
CN104298424A (en) | File operation method and device | |
CN104933700A (en) | Method and apparatus for image content recognition | |
CN106504295A (en) | Render the method and device of picture | |
CN107423059A (en) | Display methods, device and the terminal of the page | |
CN107368280A (en) | Method for controlling volume, device and the interactive voice equipment of interactive voice | |
CN106708967A (en) | Page display method and device | |
CN105094297A (en) | Display content zooming method and display content zooming device | |
CN104111777B (en) | Image display method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |