CN106933794A - Picture layout method and device, electronic equipment, computer-readable storage medium - Google Patents

Picture layout method and device, electronic equipment, computer-readable storage medium Download PDF

Info

Publication number
CN106933794A
CN106933794A CN201710150649.5A CN201710150649A CN106933794A CN 106933794 A CN106933794 A CN 106933794A CN 201710150649 A CN201710150649 A CN 201710150649A CN 106933794 A CN106933794 A CN 106933794A
Authority
CN
China
Prior art keywords
picture
pattern
typesetting
floating
size
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.)
Granted
Application number
CN201710150649.5A
Other languages
Chinese (zh)
Other versions
CN106933794B (en
Inventor
于刚
孙上斌
宋卫卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN201710150649.5A priority Critical patent/CN106933794B/en
Publication of CN106933794A publication Critical patent/CN106933794A/en
Application granted granted Critical
Publication of CN106933794B publication Critical patent/CN106933794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Manufacture Or Reproduction Of Printing Formes (AREA)
  • Preparing Plates And Mask In Photomechanical Process (AREA)

Abstract

The invention discloses a kind of picture layout method and device, electronic equipment, computer-readable storage medium, its method includes:According to the original size of picture, the typesetting pattern of picture is set;If typesetting pattern is floating pattern, size and the position of the corresponding picture layout of floating pattern are calculated;Size and position according to picture layout, judge whether the word filled outside picture meets default filling standard, if so, carrying out typesetting to picture according to floating pattern.One typesetting pattern is first set according to the original size of picture using the present invention, typesetting pattern is further verified, so that final typesetting effect is more attractive in appearance, more meet user's reading habit, user is obtained good reading experience.Meanwhile, manual intervention is not required to during typesetting, improve the efficiency of whole typesetting process.

Description

Picture layout method and device, electronic equipment, computer-readable storage medium
Technical field
The present invention relates to software field, and in particular to a kind of picture layout method and device, electronic equipment, Computer Storage Medium.
Background technology
Word and picture have been generally comprised in file.When typesetting is carried out to file, in order that the effect of typesetting is more beautiful See, it is necessary to reasonably set the position of picture and word.Had nothing in common with each other due to the size of picture in file, picture hereof Position nor unalterable, the typesetting to picture in file directly can not carry out typesetting according to one style, it is necessary to according to The actual conditions of picture set its specific typesetting pattern one by one.Can be realized scheming according to picture actual conditions by manual type Piece typesetting, but this mode is inefficient.Accordingly, it would be desirable to a kind of picture layout mode, can realize picture layout with efficient, The effect that typesetting simultaneously can meet user's reading habit and typesetting can lift the reading experience of user.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on State picture layout method and device, electronic equipment, the computer-readable storage medium of problem.
According to an aspect of the invention, there is provided a kind of picture layout method, it includes:
According to the original size of picture, the typesetting pattern of picture is set;
If typesetting pattern is floating pattern, size and the position of the corresponding picture layout of floating pattern are calculated;
Size and position according to picture layout, judge whether the word filled outside picture meets default filling standard, if It is that typesetting is carried out to picture according to floating pattern.
According to another aspect of the present invention, there is provided a kind of picture layout device, it includes:
Setup module, is suitable to be set according to the original size of picture the typesetting pattern of picture;
Pattern judge module, is suitable to judge whether typesetting pattern is floating pattern;
Computing module, if being suitable to pattern judge module judges that typesetting pattern is floating pattern, is calculated floating pattern pair The size of the picture layout answered and position;
Filling judge module, is suitable to the size according to picture layout and position, judges whether the word filled outside picture accords with Close default filling standard;
Floating type-setting module, if being suitable to filling judge module judges that the word filled outside picture meets default filling mark Standard, typesetting is carried out according to floating pattern to picture.
According to another aspect of the invention, there is provided a kind of electronic equipment, including:Processor, memory, communication interface and Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device above-mentioned The corresponding operation of picture layout method.
In accordance with a further aspect of the present invention, there is provided a kind of computer-readable storage medium, be stored with the storage medium to A few executable instruction, the executable instruction makes the corresponding operation of for example above-mentioned picture layout method of the computing device.
It is former according to picture according to picture layout method and device, electronic equipment, computer-readable storage medium that the present invention is provided The size of beginning, sets the typesetting pattern of picture.If typesetting pattern is floating pattern, the corresponding picture row of floating pattern is calculated The size of version and position.Size and position according to picture layout, judge whether the word filled outside picture meets default filling Standard, if so, carrying out typesetting to picture according to floating pattern.One row is first set according to the original size of picture using the present invention Pressing formula, further verifies to typesetting pattern, so that final typesetting effect is more attractive in appearance, more meet user's reading habit, makes User obtains good reading experience.Meanwhile, manual intervention is not required to during typesetting, improve the efficiency of whole typesetting process.
Described above is only the general introduction of technical solution of the present invention, in order to better understand technological means of the invention, And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by specific embodiment of the invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the flow chart of according to embodiments of the present invention one picture layout method;
Fig. 2 shows the flow chart of according to embodiments of the present invention two picture layout method;
Fig. 3 a- Fig. 3 c show the schematic diagram of picture layout pattern;
Fig. 4 shows the functional block diagram of according to embodiments of the present invention three picture layout device;
Fig. 5 shows the functional block diagram of according to embodiments of the present invention four picture layout device;
Fig. 6 shows the structural representation of according to embodiments of the present invention six a kind of electronic equipment.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.Conversely, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Embodiment one
Fig. 1 shows the flow chart of according to embodiments of the present invention one picture layout method, as shown in figure 1, picture layout Method specifically includes following steps:
Step S101, according to the original size of picture, sets the typesetting pattern of picture.
Word and picture are contained in the original document such as file of pdf files format typesetting format, by these files Again, it is necessary to set the typesetting pattern of wherein word and picture when typesetting is the file of streaming typesetting format.It is of the invention main right The typesetting of picture is illustrated.If the typesetting pattern of picture sets improper, may cause occur a large amount of blank, figure around picture Piece and picture intersect setting situations such as, make user read when reading experience it is not good.
Because picture there may be such as horizontal picture, longitudinal picture plurality of picture, in typesetting, it is necessary to former according to picture The size of beginning, goes to set the typesetting pattern of picture.Herein, the typesetting pattern of picture can be including pattern placed in the middle, floating pattern etc.. After the original size for getting picture, according to the original size of picture, picture can be set to pattern placed in the middle or floating Pattern.
Step S102, judges whether typesetting pattern is floating pattern.
Judge whether the typesetting pattern for setting is floating pattern, if floating pattern, perform step S103, continue to floating Pattern such as is calculated, is verified at the step.If typesetting pattern is pattern placed in the middle, step S106 is performed.
Step S103, is calculated size and the position of the corresponding picture layout of floating pattern.
Floating pattern includes floating set location and floating typesetting ratio.Floating set location designates picture floating and sets Put in the position of client screen.According to floating set location, the position of the corresponding picture of floating pattern can be obtained.The row of floating Version ratio designates the ratio that picture width after floating is set accounts for the width of whole client screen.According to floating typesetting ratio and The width of client screen, can be calculated the width and its corresponding height of the corresponding picture of floating pattern, i.e. picture row The size of version.
Step S104, size and position according to picture layout judge whether the word filled outside picture meets default filling out Fill standard.
There is word in original document in addition to picture.After the size of picture layout and position has been obtained, on this basis, Further go to fill remaining word, and judge whether the word of filling meets default filling standard.If meeting, step is performed S105, otherwise performs step S106.
Default filling standard can include that the space in picture left side or right side blank can be filled up, schemed by the word of such as filling The space of piece left side or right side blank can only fill word, it is not possible to be further continued for filling other pictures etc..Default filling standard Can be configured according to actual displayed situation.
Step S105, typesetting is carried out according to floating pattern to picture.
Size and position according to the corresponding picture layout of floating pattern being calculated, typesetting is carried out to picture.Enter one Step, can also accordingly on the left of picture or right side blank is partially filled with word, the typesetting of the whole original document of completion.
Step S106, typesetting is carried out according to pattern placed in the middle to picture.
Pattern placed in the middle further comprises typesetting ratio placed in the middle, and typesetting ratio placed in the middle designates and is centrally located rear picture width and accounts for whole The ratio of the width of individual client screen.The width and corresponding height of picture layout can be calculated according to typesetting ratio placed in the middle Degree.Picture typesetting placed in the middle is arranged on client screen by width and height according to picture layout, and further corresponding by text Word is arranged on picture below or above.
If it should be noted that step S101 set picture typesetting pattern be pattern placed in the middle when, to typesetting pattern After being judged, step S106 can be directly performed, typesetting is carried out to picture according to pattern placed in the middle.If the figure that step S101 is set The typesetting pattern of piece is floating pattern, by after the checking of step S103- steps S104, it is found that floating pattern does not meet checking knot Really, typesetting can be carried out to picture using pattern placed in the middle again, performs step S106, typesetting is carried out to picture according to pattern placed in the middle.
According to the picture layout method that the present invention is provided, according to the original size of picture, the typesetting pattern of picture is set.If Typesetting pattern is floating pattern, is calculated size and the position of the corresponding picture layout of floating pattern.According to picture layout Size and position, judge whether the word filled outside picture meets default filling standard, if so, entering to picture according to floating pattern Row typesetting.One typesetting pattern is first set according to the original size of picture using the present invention, typesetting pattern is further verified, So that final typesetting effect is more attractive in appearance, more meet user's reading habit, user is set to obtain good reading experience.Meanwhile, row Manual intervention is not required to during version, the efficiency of whole typesetting process is improve.
Embodiment two
Fig. 2 shows the flow chart of according to embodiments of the present invention two picture layout method, as shown in Fig. 2 picture layout Method comprises the following steps:
Step S201, according to the original size of picture, sets the typesetting pattern of picture.
The typesetting pattern of picture includes pattern placed in the middle, floating pattern etc., pattern placed in the middle will picture it is placed in the middle be arranged on visitor In the screen of family end, wherein, pattern placed in the middle further comprises typesetting ratio placed in the middle.Typesetting ratio placed in the middle can for 100%, 80%, 60% etc., the size of picture layout can be calculated according to typesetting ratio placed in the middle, typesetting ratio 80% placed in the middle is picture layout Width for client screen width 80%, the height of picture layout can be adjusted accordingly.Specific typesetting placed in the middle Ratio is configured according to the width of the original size of picture and client screen.Floating pattern include floating set location and Floating typesetting ratio.Floating pattern will picture float and be arranged on the left side or right side of client screen.According to floating, position is set Putting can set picture specifically on the left side of client screen or right side.Picture can be calculated according to floating typesetting ratio The size of typesetting.Floating typesetting ratio can be 50%, 30% etc..Floating set location left side, floating typesetting ratio 50% are Picture is arranged on the left side of client screen, and the width of picture layout is the 50% of the width of client screen, picture layout Height can be adjusted accordingly.Specific floating typesetting ratio is configured according to the original size of picture, floats and sets position Putting can be configured according to home position of the picture in original document, and such as position of the picture in original document is in original text Left side in part, floating set location is left side;Right side of position of the picture in original document in original document, floats Set location is right side.Or according to the order read from left to right, there is no word in original document before picture, only in picture After have a word, floating set location is left side, and picture layout is arranged on the left side of client screen, is filled out on the right side of client screen Fill word;There is word in original document before picture, floating set location is right side, and picture layout is arranged on the right side of client screen Side, left side filling word of client screen etc..Specific setting can be configured according to actual conditions.
The typesetting pattern of picture is set to pattern placed in the middle or floating pattern can be configured according to following two modes:
The original size of picture is got, according to the original size of picture, the original depth-width ratio example of picture is calculated.If picture More than default depth-width ratio example, such as default depth-width ratio example is 1 to original depth-width ratio example:1.2, the original depth-width ratio example of picture is 1:2, I.e. picture is horizontal picture, and width is 2 times of height, and the typesetting pattern for setting picture is pattern placed in the middle.Otherwise, picture is set Typesetting pattern be floating pattern.
Or the width of the original size of picture and client screen is got, calculate the original width of picture and client The width ratio of screen.Herein, mainly according to shared by the original width of picture shared by pixel and the width of client screen Pixel is compared, if the ratio of the pixel shared by the original width of picture and the pixel shared by the width of client screen is more than Preset ratio, such as preset ratio are 1.5:1, the typesetting pattern that can set picture is pattern placed in the middle.Such as the picture of client screen Element is 1080x 1920, and pixel is 1080 wherein shared by the width of client screen.When the original size of picture is 3072x 2304, when the pixel shared by width is 3072 pixel, i.e., the width institute of pixel and client screen shared by the original width of picture It is 2.84 to account for pixel ratio:Pixel shared by the original width of 1, i.e. picture is objective compared with pixel shared by the width of client screen Family end screen can clearly show that the original pixel of picture, and the typesetting pattern that can set picture is pattern placed in the middle.If conversely, It is such as objective when pixel ratio shared by the width of pixel and client screen shared by the original width of picture is less than or equal to preset ratio The pixel of family end screen is 1080x 1920, and pixel is 1080 wherein shared by the width of client screen.When the original chi of picture Very little is 800x600, when the pixel shared by width is 800 pixel, i.e., pixel and client screen shared by the original width of picture Pixel ratio shared by width is 0.7:1, if now picture is set to pattern placed in the middle, shown after picture can be caused to be stretched, picture Display effect is unintelligible, and reading experience is not good, accordingly, it is considered to reading habit, the typesetting pattern for setting picture is floating pattern.In advance If ratio is different according to different client's end pixels, different values can be set, be configured with specific reference to performance, herein Do not limit.
Which kind of mode more than specifically used is configured can be according to the picture in actually used client screen, file It is configured etc. actual conditions, is not limited herein.
Further, being left white for two ends one fixed width can also be set in client screen, so as to presented after whole typesetting Reading effect is more preferably.Now, the above-mentioned ratio with client screen width that is referring to should be client screen in addition to being left white The ratio of width.
Step S202, judges whether typesetting pattern is floating pattern.
Judge whether the typesetting pattern for setting is floating pattern, if floating pattern, perform step S203, continue to floating Pattern such as is calculated, is verified at the step.If typesetting pattern is pattern placed in the middle, step S207 is performed.
Step S203, is calculated size and the position of the corresponding picture layout of floating pattern.
Floating set location designates the position that picture floating is arranged on client screen.According to floating set location, can To obtain the position of the corresponding picture of floating pattern.Set location of such as floating is a left side, and the position of picture is a left side for client screen Side.Floating typesetting ratio designates the ratio that picture width after floating is set accounts for the width of whole client screen.According to floating The width of typesetting ratio and client screen, can be calculated the width and its corresponding height of the corresponding picture of floating pattern Degree, the i.e. size of picture layout.The width that typesetting ratio is 40%, client screen that such as floats is 200, in client screen Both sides are also respectively left white 20, and the width that calculating can obtain picture layout is (200-20-20) * 40%=64.It is original according to picture Size, such as depth-width ratio example be 2:1, the height that can be calculated picture layout is 128.
Step S204, the size of width, picture layout according to client screen and position, obtain client screen in figure The size of remainder after piece typesetting.
Width according to client screen, the size of the picture layout being calculated and position are further calculated except figure The size of the outer client screen remainder of piece.Herein, the size of client screen remainder refers to client screen in addition to picture Curtain after picture layout, the size of the remainder of, picture identical with picture height left side or right side blank.Such as client screen Width be 200, be also respectively left white 20 in the both sides of client screen, the width of the picture layout being calculated is 64, picture row The height of version is 128, and the width of remainder is 200-20-20-64=96, and the height of remainder is 128.
Step S205, the size according to remainder, the section size of space and/or text between font, the word of the word of filling Between-line spacing size between word, judges whether the ratio of the word filling remainder of filling reaches default filling standard.
Between-line spacing size between the size of space, word between the font size, word according to the word to be filled, calculates word and fills out Shared size after filling.If font is No. four fonts, the height and width of each word are interval width between 0.5, word and are 0.3, between-line spacing is highly that section interval height is 0.8 etc. between 0.4, word between word, number of words such as 10,000 words according to word, calculating The size for obtaining word filling is that the width of filling is 64, is highly 120.The size and the size of remainder that word is filled Compare, the ratio of the word filling remainder filled is 93%.Judge that the word of filling fills the ratio of remainder Whether default filling standard is reached, and such as default filling standard is that the ratio of the word filling remainder of filling is higher than 90%, can Default filling standard has been reached with the ratio for judging the word filling remainder of filling, step S206 has been performed.Conversely, performing step Rapid S207.
It should be noted that presetting filling standard herein only includes that the word of filling accounts for the ratio of whole remainder, such as Shown in Fig. 3 a, the right side of floating typesetting picture is remainder, and after remainder is filled by word, filling word filling is remaining Partial ratio is higher than 90%, judges that the ratio of the word filling remainder of filling reaches default filling standard.Such as Fig. 3 b institutes Show, the right side of floating typesetting picture is remainder, after remainder is filled by word and another pictures, filling word is filled out The ratio for filling remainder is only 40%, and the ratio of another pictures filling remainder is 50%, therefore, judge the text of filling The ratio of word filling remainder can not reach default filling standard.As shown in Figure 3 c, the right side of floating typesetting picture is residue Part, after remainder is filled by word, filling word is less than due to there is multiple segmentations, the ratio for filling remainder 90%, judging the ratio of the word filling remainder of filling can not reach default filling standard.More than it is for example, real Default filling standard can be set according to actual conditions when applying, not limit herein.
Step S206, typesetting is carried out according to floating pattern to picture.
Size and position according to the corresponding picture layout of floating pattern being calculated, typesetting is carried out to picture.Enter one Step, can also accordingly on the left of picture or right side blank is partially filled with word, the typesetting of the whole original document of completion.
Step S207, typesetting is carried out according to pattern placed in the middle to picture.
If the typesetting pattern of the picture that step S201 is set is pattern placed in the middle, after judging typesetting pattern, can Directly to perform step S207, typesetting is carried out to picture according to the pattern placed in the middle for setting.During typesetting, according to typesetting ratio meter placed in the middle Calculation obtains the width and corresponding height of picture layout.Picture is centrally positioned in client screen, and it is further corresponding Word is arranged on picture below or above.
If the typesetting pattern of the picture that step S201 is set is floating pattern, by the checking of step S203- steps S205 Afterwards, it is found that floating pattern does not meet the result, typesetting can be carried out to picture using pattern placed in the middle again, perform step S207, Again typesetting is carried out to picture according to pattern placed in the middle.
According to the picture layout method that the present invention is provided, one typesetting pattern is first set according to the original size of picture, it is right Typesetting pattern is further verified.Judge whether the ratio for filling word filling remainder reaches default filling standard to test Whether card typesetting pattern rationally, so that final typesetting effect is more attractive in appearance, more meet user's reading habit, obtains user good Reading experience.Meanwhile, manual intervention is not required to during typesetting, improve the efficiency of whole typesetting process.
Embodiment three
Fig. 4 shows the functional block diagram of according to embodiments of the present invention three picture layout device.As shown in figure 4, picture is arranged Version device includes such as lower module:
Setup module 410, is suitable to be set according to the original size of picture the typesetting pattern of picture.
Word and picture are contained in the original document such as file of pdf files format typesetting format, by these files Again when typesetting is the file of streaming typesetting format, setup module 410 needs to set the typesetting pattern of wherein word and picture.This The main typesetting to picture of invention is illustrated.If the typesetting pattern of picture sets improper, appearance around picture may be caused A large amount of blank, picture and pictures intersect setting situations such as, make user's reading experience when reading not good.
Because picture there may be such as horizontal picture, longitudinal picture plurality of picture, in typesetting, setup module 410 is needed To go to set the typesetting pattern of picture according to the original size of picture.Herein, the typesetting pattern of picture can include sample placed in the middle Formula, floating pattern etc..Setup module 410, according to the original size of picture, will can be schemed after the original size for getting picture Piece is set to pattern placed in the middle or floating pattern.Pattern placed in the middle will picture be placed in the middle is arranged in client screen, wherein, occupy Middle pattern further comprises typesetting ratio placed in the middle.Typesetting ratio placed in the middle can be 100%, 80%, 60% etc., according to typesetting ratio placed in the middle Example can be calculated the size of picture layout, and typesetting ratio 80% placed in the middle is that the width of picture layout is the width of client screen The 80% of degree, the height of picture layout can be adjusted accordingly.Specific typesetting ratio placed in the middle is according to the original size of picture Width with client screen is configured.Floating pattern includes floating set location and floating typesetting ratio.Floating pattern Will picture float and be arranged on the left side or right side of client screen.Picture can be set specifically in visitor according to floating set location The left side or right side of family end screen.The size of picture layout can be calculated according to floating typesetting ratio.Floating typesetting ratio Example can be 50%, 30% etc..Floating set location left side, floating typesetting ratio 50% are that picture is arranged on client screen Left side, the width of picture layout is the 50% of the width of client screen, and the height of picture layout can be adjusted accordingly. Specific floating typesetting ratio is configured according to the original size of picture, and floating set location can be according to picture in original document In home position be configured, such as left side of position of the picture in original document in original document, floating set location On the left of as;Right side of position of the picture in original document in original document, floating set location is right side.Or root According to the order read from left to right, there is no word in original document before picture, only there is word after picture, floating set location is Left side, picture layout is arranged on the left side of client screen, the right side filling word of client screen;In original document before picture There is word, floating set location is right side, and picture layout is arranged on the right side of client screen, the left side filling of client screen Word etc..Specific setting can be configured according to actual conditions.
Pattern judge module 420, is suitable to judge whether typesetting pattern is floating pattern.
Pattern judge module 420 judges whether the typesetting pattern for setting is floating pattern, if floating pattern, performs calculating Module 430, continuation such as is calculated floating pattern, is verified at the step.
Computing module 430, if being suitable to pattern judge module 420 judges that typesetting pattern is floating pattern, is calculated floating The size of the corresponding picture layout of pattern and position.
Floating pattern includes floating set location and floating typesetting ratio.Floating set location designates picture floating and sets Put in the position of client screen.Computing module 430 can obtain the corresponding picture of floating pattern according to floating set location Position.Floating typesetting ratio designates the ratio that picture width after floating is set accounts for the width of whole client screen.Calculate mould Block 430 can be calculated the width of the corresponding picture of floating pattern according to floating typesetting ratio and the width of client screen And its corresponding height, the i.e. size of picture layout.
Filling judge module 440, is suitable to the size according to picture layout and position, judge outside picture filling word whether Meet default filling standard.
There is word in original document in addition to picture.Size and the position of picture layout have been obtained in execution computing module 430 Postpone, on this basis, further go to fill remaining word, filling judge module 440 judges whether the word of filling meets Default filling standard.If meeting, floating type-setting module 450 is performed.
Default filling standard can include that the space in picture left side or right side blank can be filled up, schemed by the word of such as filling The space of piece left side or right side blank can only fill word, it is not possible to be further continued for filling other pictures etc..Default filling standard Can be configured according to actual displayed situation.
Floating type-setting module 450, if being suitable to filling judge module 440 judges that the word filled outside picture meets default filling out Standard is filled, typesetting is carried out to picture according to floating pattern.
The size of the corresponding picture layout of floating pattern that floating type-setting module 450 is calculated according to computing module 430 And position, typesetting is carried out to picture.Further, floating type-setting module 450 can also be corresponding on the left of picture or right side blank Word is partially filled with, the typesetting of whole original document is completed.
According to the picture layout device that the present invention is provided, according to the original size of picture, the typesetting pattern of picture is set.If Typesetting pattern is floating pattern, is calculated size and the position of the corresponding picture layout of floating pattern.According to picture layout Size and position, judge whether the word filled outside picture meets default filling standard, if so, entering to picture according to floating pattern Row typesetting.One typesetting pattern is first set according to the original size of picture using the present invention, typesetting pattern is further verified, So that final typesetting effect is more attractive in appearance, more meet user's reading habit, user is set to obtain good reading experience.Meanwhile, row Manual intervention is not required to during version, the efficiency of whole typesetting process is improve.
Example IV
Fig. 5 shows the functional block diagram of according to embodiments of the present invention four picture layout device.As shown in figure 5, with Fig. 4 phases Than picture layout device also includes such as lower module:
Setup module 410 is further included:Ratio setting module 411 and width setup module 412.Ratio setting module If 411 are suitable to the original depth-width ratio example of picture more than default depth-width ratio example, the typesetting pattern for setting picture is pattern placed in the middle;It is no Then, the typesetting pattern for setting picture is floating pattern.
Ratio setting module 411 gets the original size of picture, according to the original size of picture, calculates picture original Depth-width ratio example.If more than default depth-width ratio example, such as default depth-width ratio example is 1 to the original depth-width ratio example of picture:1.2, picture is original Depth-width ratio example be 1:2, i.e. picture are horizontal picture, and width is 2 times of height, and ratio setting module 411 sets picture Typesetting pattern is pattern placed in the middle.Otherwise, the typesetting pattern that ratio setting module 411 sets picture is floating pattern.
If width setup module 412 is suitable to pixel shared by the width of pixel and client screen shared by the original width of picture Ratio is more than preset ratio, and the typesetting pattern for setting picture is pattern placed in the middle;Otherwise, the typesetting pattern for setting picture is floating sample Formula.
Width setup module 412 gets the width of the original size of picture and client screen, calculates picture original The width ratio of width and client screen.Herein, the main picture according to shared by the original width of picture of width setup module 412 Pixel shared by the width of element and client screen is compared, if pixel and client screen shared by the original width of picture Width shared by pixel ratio be more than preset ratio, such as preset ratio be 1.5:1, width setup module 412 can be set The typesetting pattern of picture is pattern placed in the middle.Pixel such as client screen is 1080x 1920, the wherein width of client screen Shared pixel is 1080.When the original size of picture is 3072x2304, and pixel shared by width is 3072 pixel, i.e. picture Pixel ratio shared by the width of pixel and client screen shared by original width is 2.84:Shared by the original width of 1, i.e. picture Pixel is compared with pixel shared by the width of client screen, and client screen can clearly show that the original pixel of picture, wide The typesetting pattern that degree setup module 412 can set picture is pattern placed in the middle.If conversely, pixel shared by the original width of picture and When pixel ratio shared by the width of client screen is less than or equal to preset ratio, such as the pixel of client screen is 1080x 1920, pixel is 1080 wherein shared by the width of client screen.When the original size of picture is 800x600, shared by width When pixel is 800 pixel, i.e., pixel ratio is 0.7 shared by the width of pixel and client screen shared by the original width of picture: 1, if now picture is set to pattern placed in the middle by width setup module 412, shown after picture can be caused to be stretched, picture display effect Really unintelligible, reading experience is not good, accordingly, it is considered to reading habit, the typesetting pattern that width setup module 412 sets picture is floating Dynamic pattern.Preset ratio is different according to different client's end pixels, can set different values, is carried out with specific reference to performance Set, do not limit herein.
More than the specific use of setup module 410 which module be configured can according to actually used client screen, The actual conditions such as the picture in file are configured, and do not limit herein.
Further, setup module 410 can also set being left white for two ends one fixed width in client screen, so that whole row The reading effect presented after version is more preferably.Now, the above-mentioned ratio with client screen width that is referring to should be client screen The ratio of the width in addition to being left white.
Computing module 430 is further included:Floating Size calculation module 431 and floating position computing module 432.Floating chi Very little computing module 431 is suitable to the width according to floating typesetting ratio and client screen, is calculated the corresponding figure of floating pattern The size of piece typesetting.Floating position computing module 432 is suitable to according to floating set location, obtains the corresponding position of floating pattern.
Floating set location designates the position that picture floating is arranged on client screen.Floating position computing module 432 According to floating set location, the position of the corresponding picture of floating pattern can be obtained.Set location of such as floating is a left side, floating position The position that computing module 432 obtains picture is the left side of client screen.Floating typesetting ratio designates picture after floating is set Width accounts for the ratio of the width of whole client screen.Floating Size calculation module 431 is according to floating typesetting ratio and client The width of screen, can be calculated the width and its corresponding height, the i.e. chi of picture layout of the corresponding picture of floating pattern It is very little.The width that typesetting ratio is 40%, client screen that such as floats is 200, and 20 are also respectively left white in the both sides of client screen, is floated The width that the calculating of dynamic Size calculation module 431 can obtain picture layout is (200-20-20) * 40%=64.Floating size meter Module 431 is calculated according to the original size of picture, such as depth-width ratio example is 2:1, the height that can be calculated picture layout is 128.
Remainder computing module 460, is suitable to, according to the width of client screen, the size of picture layout and position, obtain To the size of client screen remainder after picture layout.
Remainder computing module 460 is according to the width of client screen, the size of the picture layout being calculated and position Put the size for being further calculated the client screen remainder in addition to picture.Herein, client screen is remaining in addition to picture Partial size refers to client screen after picture layout, the remainder of, picture left side identical with picture height or right side blank The size divided.Width such as client screen is 200, and 20, floating Size calculation mould are also respectively left white in the both sides of client screen The width of the picture layout that block 431 is calculated is 64, and the height of picture layout is 128, and remainder computing module 460 is calculated The width of remainder is obtained for 200-20-20-64=96, the height of remainder is 128.
Filling judge module 440 is further adapted for the size according to remainder, section between font, the word of the word of filling Between-line spacing size between the size of space and/or word, judges whether the ratio of the word filling remainder of filling reaches default filling out Fill standard.
Filling judge module 440 is according to between-line spacing between the size of space, word between font size, the word of the word to be filled Size, calculates size shared after word is filled.If font is No. four fonts, the height and width of each word are 0.5, word Between interval width be 0.3, between-line spacing highly is that section interval height is 0.8 etc. between 0.4, word between word, according to the number of words of word Such as 10,000 words, the size that filling judge module 440 is calculated word filling is that the width of filling is 64, is highly 120.Filling Compared with the size of remainder, the word filled fills remainder to the size that judge module 440 fills word Ratio is 93%.Filling judge module 440 judges whether the ratio of the word filling remainder of filling reaches default filling mark Standard, such as default filling standard is that the ratio of the word filling remainder of filling is higher than 90%, and filling judge module 440 judges to fill out The ratio of the word filling remainder for filling reaches default filling standard, performs floating type-setting module 450.
It should be noted that presetting filling standard herein only includes that the word of filling accounts for the ratio of whole remainder, such as Shown in Fig. 3 a, the right side of floating typesetting picture is remainder, and after remainder is filled by word, filling word filling is remaining Partial ratio is higher than 90%, and filling judge module 440 judges that the ratio of the word filling remainder of filling reaches default filling out Standard is filled, floating type-setting module 450 is performed.As shown in Figure 3 b, the right side of floating typesetting picture is remainder, works as remainder After word and the filling of another pictures, the ratio of filling word filling remainder is only 40%, and another pictures filling is surplus The ratio of remaining part point is 50%, therefore, filling judge module 440 judges that the ratio of the word filling remainder of filling can not reach To default filling standard, type-setting module 470 placed in the middle is performed.As shown in Figure 3 c, the right side of floating typesetting picture is remainder, when After remainder is filled by word, due to there are multiple segmentations, the ratio for filling remainder is less than 90%, filling to filling word Judge module 440 judges that the ratio of the word filling remainder of filling can not reach default filling standard, performs typesetting placed in the middle Module 470.More than it is for example, can be set according to actual conditions when implementing and presets filling standard, does not limit herein.
Type-setting module 470 placed in the middle, if being suitable to fill judge module 440, to judge that the word filled outside picture does not meet default Filling standard, then carry out typesetting according to pattern placed in the middle to picture.
If filling judge module 440 judges that the word filled outside picture does not meet default filling standard, typesetting mould placed in the middle Block 470 carries out typesetting using pattern placed in the middle to picture.During 470 typesetting of type-setting module placed in the middle, calculated according to typesetting ratio placed in the middle To the width and corresponding height of picture layout.Be centrally positioned in picture in client screen by type-setting module 470 placed in the middle, goes forward side by side Word is arranged on picture below or above by one step accordingly.
Type-setting module 470 placed in the middle is further adapted for:If pattern judge module 420 judges that typesetting pattern is not floating pattern, Typesetting is carried out to picture according to pattern placed in the middle.
If pattern judge module 420 judges that typesetting pattern is not floating pattern, type-setting module placed in the middle can be directly performed 470.Type-setting module 470 placed in the middle carries out typesetting according to the pattern placed in the middle for setting to picture.
According to the picture layout device that the present invention is provided, one typesetting pattern is first set according to the original size of picture, it is right Typesetting pattern is further verified.Judge whether the ratio for filling word filling remainder reaches default filling standard to test Whether card typesetting pattern rationally, so that final typesetting effect is more attractive in appearance, more meet user's reading habit, obtains user good Reading experience.Meanwhile, manual intervention is not required to during typesetting, improve the efficiency of whole typesetting process.
Embodiment five
The embodiment of the present application five provides a kind of nonvolatile computer storage media, the computer-readable storage medium storage There is an at least executable instruction, the computer executable instructions can perform the picture layout side in above-mentioned any means embodiment Method.
Embodiment six
Fig. 6 shows the structural representation of according to embodiments of the present invention six a kind of electronic equipment, present invention specific implementation Example is not limited implementing for electronic equipment.
As shown in fig. 6, the server can include:Processor (processor) 602, communication interface (Communications Interface) 604, memory (memory) 606 and communication bus 608.
Wherein:
Processor 602, communication interface 604 and memory 606 complete mutual communication by communication bus 608.
Communication interface 604, communicates for the network element with miscellaneous equipment such as client or other servers etc..
Processor 602, for configuration processor 610, can specifically perform the correlation in above-mentioned picture layout embodiment of the method Step.
Specifically, program 610 can include program code, and the program code includes computer-managed instruction.
Processor 602 is probably central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.The one or more processors that server includes, can be same type of processors, such as one or more CPU;Can also It is different types of processor, such as one or more CPU and one or more ASIC.
Memory 606, for depositing program 610.Memory 606 may include high-speed RAM memory, it is also possible to also include Nonvolatile memory (non-volatile memory), for example, at least one magnetic disk storage.
Program 610 specifically can be used for so that processor 602 performs following operation:
In a kind of optional implementation method, program 610 is used to cause processor 602 according to the original size of picture, if Put the typesetting pattern of picture;If typesetting pattern be floating pattern, be calculated the corresponding picture layout of floating pattern size and Position;Size and position according to picture layout, judge whether the word filled outside picture meets default filling standard, if so, Typesetting is carried out to picture according to floating pattern.
In a kind of optional implementation method, if judging, the word filled outside picture does not meet default filling standard, Program 610 is used to cause that processor 602 carries out typesetting according to pattern placed in the middle to picture.
In a kind of optional implementation method, typesetting pattern includes pattern placed in the middle and/or floating pattern;Pattern placed in the middle includes Typesetting ratio placed in the middle;Floating pattern includes floating set location and floating typesetting ratio.
In a kind of optional implementation method, if the original depth-width ratio example of picture is more than default depth-width ratio example, program 610 is used In so that the typesetting pattern that processor 602 sets picture is pattern placed in the middle;Otherwise, program 610 is used to cause that processor 602 is set The typesetting pattern of picture is floating pattern.
In a kind of optional implementation method, if the width ratio of the original width of picture and client screen is more than default Ratio, the typesetting pattern that program 610 is used to processor 602 is set picture is pattern placed in the middle;Otherwise, the typesetting of picture is set Pattern is floating pattern.
In a kind of optional implementation method, program 610 is used to cause processor 602 according to floating typesetting ratio and client The width of screen is held, the size of the corresponding picture layout of floating pattern is calculated;According to floating set location, floating sample is obtained The corresponding position of formula.
In a kind of optional implementation method, program 610 be used to causing processor 602 according to the width of client screen, The size of picture layout and position, obtain the size of client screen remainder after picture layout.
In a kind of optional implementation method, program 610 is used to cause processor 602 according to the size of remainder, fills out Between-line spacing size between the section size of space and/or word between font, the word of the word for filling, judges the word filling remainder of filling Whether the ratio divided reaches default filling standard;If so, carrying out typesetting to picture according to floating pattern;Otherwise, according to sample placed in the middle Formula carries out typesetting to picture.
In a kind of optional implementation method, if typesetting pattern is pattern placed in the middle, program 610 is used to cause processor 602 Typesetting is carried out to picture according to pattern placed in the middle.
Each step implements the corresponding steps and unit that may refer in above-mentioned picture layout embodiment in program 610 In corresponding description, will not be described here.It is apparent to those skilled in the art that, convenience and letter for description Clean, the equipment of foregoing description and the specific work process of module may be referred to the corresponding process description in preceding method embodiment, Will not be repeated here.
The scheme provided by the present embodiment, according to the original size of picture, sets the typesetting pattern of picture.If typesetting sample Formula is floating pattern, is calculated size and the position of the corresponding picture layout of floating pattern.Size according to picture layout and Position, judges whether the word filled outside picture meets default filling standard, if so, being arranged picture according to floating pattern Version.One typesetting pattern is first set according to the original size of picture using the present invention, typesetting pattern is further verified, so that Final typesetting effect is more attractive in appearance, more meet user's reading habit, user is obtained good reading experience.Meanwhile, typesetting Manual intervention is not required in journey, the efficiency of whole typesetting process is improve.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system Structure be obvious.Additionally, the present invention is not also directed to any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this hair Bright preferred forms.
In specification mentioned herein, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify one or more that the disclosure and helping understands in each inventive aspect, exist Above to the description of exemplary embodiment of the invention in, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, and wherein each claim is in itself All as separate embodiments of the invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Unit or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, can use any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can the alternative features of or similar purpose identical, equivalent by offer carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection is appointed One of meaning mode can be used in any combination.
All parts embodiment of the invention can be realized with hardware, or be run with one or more processor Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) come realize in picture layout device according to embodiments of the present invention some or The some or all functions of person's whole part.The present invention is also implemented as perform method as described herein one Point or whole equipment or program of device (for example, computer program and computer program product).It is such to realize this hair Bright program can be stored on a computer-readable medium, or can have the form of one or more signal.It is such Signal can be downloaded from internet website and obtained, or be provided on carrier signal, or be provided in any other form.
It should be noted that above-described embodiment the present invention will be described rather than limiting the invention, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol being located between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element is not excluded the presence of as multiple Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
The invention discloses:A1. a kind of picture layout method, it includes:
According to the original size of picture, the typesetting pattern of picture is set;
If the typesetting pattern is floating pattern, size and the position of the corresponding picture layout of the floating pattern are calculated Put;
Size and position according to the picture layout, judge whether the word filled outside picture meets default filling mark Standard, if so, carrying out typesetting to picture according to floating pattern.
A2. the method according to A1, wherein, methods described also includes:If judging, the word filled outside picture is not inconsistent Default filling standard is closed, then typesetting is carried out to picture according to pattern placed in the middle.
A3. the method according to A1, wherein, the typesetting pattern includes pattern placed in the middle and/or floating pattern;The residence Middle pattern includes typesetting ratio placed in the middle;The floating pattern includes floating set location and floating typesetting ratio.
A4. the method according to A1, wherein, the size original according to picture, the typesetting pattern for setting picture enters One step includes:
If more than default depth-width ratio example, the typesetting pattern for setting picture is sample placed in the middle to the original depth-width ratio example of the picture Formula;Otherwise, the typesetting pattern for setting picture is floating pattern.
A5. the method according to A1, wherein, the size original according to picture, the typesetting pattern for setting picture enters One step includes:
If pixel ratio shared by the width of pixel and client screen shared by the original width of picture is more than preset ratio, if The typesetting pattern for putting picture is pattern placed in the middle;Otherwise, the typesetting pattern for setting picture is floating pattern.
A6. the method according to A1, wherein, if the typesetting pattern is floating pattern, it is calculated described floating The size of the corresponding picture layout of dynamic pattern and position further include:
According to floating typesetting ratio and the width of client screen, the corresponding picture layout of the floating pattern is calculated Size;
According to floating set location, the corresponding position of the floating pattern is obtained.
A7. the method according to A1, wherein, in the size according to the picture layout and position, judge picture Before whether the word of outer filling meets default filling standard, methods described also includes:
Width, the size of the picture layout and position according to client screen, obtain the client screen in figure The size of remainder after piece typesetting.
A8. the method according to A7, wherein, the size and position according to the picture layout is judged outside picture Whether the word of filling meets default filling standard further includes:
Between-line spacing between the section size of space and/or word between size according to remainder, font, the word of the word of filling Size, judges whether the ratio of the word filling remainder of the filling reaches default filling standard;If so, according to floating Dynamic pattern carries out typesetting to picture;Otherwise, typesetting is carried out to picture according to pattern placed in the middle.
A9. the method according to A1, wherein, methods described also includes:
If the typesetting pattern is pattern placed in the middle, typesetting is carried out to picture according to the pattern placed in the middle.
The invention also discloses:B10. a kind of picture layout device, it includes:
Setup module, is suitable to be set according to the original size of picture the typesetting pattern of picture;
Pattern judge module, is suitable to judge whether the typesetting pattern is floating pattern;
Computing module, if being suitable to the pattern judge module judges that the typesetting pattern is floating pattern, is calculated institute State size and the position of the corresponding picture layout of floating pattern;
Filling judge module, is suitable to the size according to the picture layout and position, judges that the word filled outside picture is It is no to meet default filling standard;
Floating type-setting module, if being suitable to filling judge module judges that the word filled outside picture meets default filling mark Standard, typesetting is carried out according to floating pattern to picture.
B11. the device according to B10, wherein, described device also includes:
Type-setting module placed in the middle, if being suitable to the filling judge module judges that the word filled outside picture does not meet default filling out Standard is filled, then typesetting is carried out to picture according to pattern placed in the middle.
B12. the device according to B10, wherein, the typesetting pattern includes pattern placed in the middle and/or floating pattern;It is described Pattern placed in the middle includes typesetting ratio placed in the middle;The floating pattern includes floating set location and floating typesetting ratio.
B13. the device according to B12, wherein, the setup module is further included:
Ratio setting module, if being suitable to the original depth-width ratio example of the picture more than default depth-width ratio example, sets picture Typesetting pattern is pattern placed in the middle;Otherwise, the typesetting pattern for setting picture is floating pattern.
B14. the device according to B10, wherein, the setup module is further included:
Width setup module, if being suitable to pixel ratio shared by the width of pixel and client screen shared by the original width of picture Example is more than preset ratio, and the typesetting pattern for setting picture is pattern placed in the middle;Otherwise, the typesetting pattern for setting picture is floating sample Formula.
B15. the device according to B10, wherein, the computing module is further included:
Floating Size calculation module, is suitable to the width according to floating typesetting ratio and client screen, is calculated described The size of the corresponding picture layout of floating pattern;
Floating position computing module, is suitable to according to floating set location, obtains the corresponding position of the floating pattern.
B16. the device according to B10, wherein, before the filling judge module, described device also includes:
Remainder computing module, is suitable to width according to client screen, the size of the picture layout and position, obtains To the size of client screen remainder after picture layout.
B17. the device according to B16, wherein, the filling judge module is further adapted for:
Between-line spacing between the section size of space and/or word between size according to remainder, font, the word of the word of filling Size, judges whether the ratio of the word filling remainder of the filling reaches default filling standard.
B18. the device according to B11, wherein, the type-setting module placed in the middle is further adapted for:If the pattern is sentenced Disconnected module judges that the typesetting pattern is not floating pattern, and typesetting is carried out to picture according to the pattern placed in the middle.
The invention also discloses:C19. a kind of electronic equipment, including:Processor, memory, communication interface and communication are total Line, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as The corresponding operation of picture layout method any one of A1-A9.
The invention also discloses:D20. a kind of computer-readable storage medium, being stored with the storage medium at least one can hold Row instruction, the executable instruction makes picture layout method of the computing device as any one of A1-A9 corresponding Operation.

Claims (10)

1. a kind of picture layout method, it includes:
According to the original size of picture, the typesetting pattern of picture is set;
If the typesetting pattern is floating pattern, size and the position of the corresponding picture layout of the floating pattern are calculated;
Size and position according to the picture layout, judge whether the word filled outside picture meets default filling standard, if It is that typesetting is carried out to picture according to floating pattern.
2. method according to claim 1, wherein, methods described also includes:If judging the word filled outside picture not Meet default filling standard, then typesetting is carried out to picture according to pattern placed in the middle.
3. method according to claim 1, wherein, the typesetting pattern includes pattern placed in the middle and/or floating pattern;It is described Pattern placed in the middle includes typesetting ratio placed in the middle;The floating pattern includes floating set location and floating typesetting ratio.
4. method according to claim 1, wherein, the size original according to picture sets the typesetting pattern of picture Further include:
If more than default depth-width ratio example, the typesetting pattern for setting picture is pattern placed in the middle to the original depth-width ratio example of the picture;It is no Then, the typesetting pattern for setting picture is floating pattern.
5. method according to claim 1, wherein, the size original according to picture sets the typesetting pattern of picture Further include:
If pixel ratio shared by the width of pixel and client screen shared by the original width of picture is more than preset ratio, figure is set The typesetting pattern of piece is pattern placed in the middle;Otherwise, the typesetting pattern for setting picture is floating pattern.
6. method according to claim 1, wherein, if the typesetting pattern is floating pattern, it is calculated described The size of the corresponding picture layout of floating pattern and position further include:
According to floating typesetting ratio and the width of client screen, the chi of the corresponding picture layout of the floating pattern is calculated It is very little;
According to floating set location, the corresponding position of the floating pattern is obtained.
7. method according to claim 1, wherein, in the size according to the picture layout and position, judge figure Before whether the word filled outside piece meets default filling standard, methods described also includes:
Width, the size of the picture layout and position according to client screen, obtain the client screen and are arranged in picture The size of remainder after version.
8. a kind of picture layout device, it includes:
Setup module, is suitable to be set according to the original size of picture the typesetting pattern of picture;
Pattern judge module, is suitable to judge whether the typesetting pattern is floating pattern;
Computing module, if being suitable to the pattern judge module judges that the typesetting pattern is floating pattern, is calculated described floating The size of the corresponding picture layout of dynamic pattern and position;
Filling judge module, is suitable to the size according to the picture layout and position, judges whether the word filled outside picture accords with Close default filling standard;
Floating type-setting module, if being suitable to filling judge module judges that the word filled outside picture meets default filling standard, presses Typesetting is carried out to picture according to floating pattern.
9. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction wants the computing device such as right Ask the corresponding operation of picture layout method any one of 1-7.
10. a kind of computer-readable storage medium, be stored with an at least executable instruction, the executable instruction in the storage medium Make picture layout method corresponding operation of the computing device as any one of claim 1-7.
CN201710150649.5A 2017-03-14 2017-03-14 Picture layout method and device, electronic equipment, computer storage media Active CN106933794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710150649.5A CN106933794B (en) 2017-03-14 2017-03-14 Picture layout method and device, electronic equipment, computer storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710150649.5A CN106933794B (en) 2017-03-14 2017-03-14 Picture layout method and device, electronic equipment, computer storage media

Publications (2)

Publication Number Publication Date
CN106933794A true CN106933794A (en) 2017-07-07
CN106933794B CN106933794B (en) 2018-07-13

Family

ID=59432287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710150649.5A Active CN106933794B (en) 2017-03-14 2017-03-14 Picture layout method and device, electronic equipment, computer storage media

Country Status (1)

Country Link
CN (1) CN106933794B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107920015A (en) * 2017-11-17 2018-04-17 北京小米移动软件有限公司 Issue the method for picture and the device of issue picture
CN109741424A (en) * 2018-12-29 2019-05-10 北京金山安全软件有限公司 Method and device for inserting picture around character and electronic equipment
CN112434487A (en) * 2020-10-27 2021-03-02 北京奇艺世纪科技有限公司 Image-text typesetting method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08287052A (en) * 1995-04-18 1996-11-01 Toppan Printing Co Ltd Device for preparing dtp composition data
CN101956290A (en) * 2009-07-10 2011-01-26 H.斯托尔两合公司 Flat knitting machine with yarn guide capable of being coupled with driving mechanism
CN102103592A (en) * 2009-12-18 2011-06-22 北京大学 Automatic typesetting method and system
CN104252444A (en) * 2013-06-27 2014-12-31 腾讯科技(北京)有限公司 Typesetting method, module and system for magazine application
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method
CN106445903A (en) * 2015-08-04 2017-02-22 腾讯科技(深圳)有限公司 Image-text data typesetting method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08287052A (en) * 1995-04-18 1996-11-01 Toppan Printing Co Ltd Device for preparing dtp composition data
CN101956290A (en) * 2009-07-10 2011-01-26 H.斯托尔两合公司 Flat knitting machine with yarn guide capable of being coupled with driving mechanism
CN102103592A (en) * 2009-12-18 2011-06-22 北京大学 Automatic typesetting method and system
CN104252444A (en) * 2013-06-27 2014-12-31 腾讯科技(北京)有限公司 Typesetting method, module and system for magazine application
CN106445903A (en) * 2015-08-04 2017-02-22 腾讯科技(深圳)有限公司 Image-text data typesetting method and apparatus
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107920015A (en) * 2017-11-17 2018-04-17 北京小米移动软件有限公司 Issue the method for picture and the device of issue picture
CN109741424A (en) * 2018-12-29 2019-05-10 北京金山安全软件有限公司 Method and device for inserting picture around character and electronic equipment
CN112434487A (en) * 2020-10-27 2021-03-02 北京奇艺世纪科技有限公司 Image-text typesetting method and device and electronic equipment
CN112434487B (en) * 2020-10-27 2024-01-30 北京奇艺世纪科技有限公司 Image-text typesetting method and device and electronic equipment

Also Published As

Publication number Publication date
CN106933794B (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN107977414B (en) Image style migration method and system based on deep learning
CN103678631B (en) page rendering method and device
CN106933794A (en) Picture layout method and device, electronic equipment, computer-readable storage medium
CN107516290B (en) Image conversion network acquisition method and device, computing equipment and storage medium
CN103198121B (en) Browser sets the method and browser of background
CN103003839B (en) Split storage of anti-aliased samples
CN107807807B (en) Signal source scaling method and system for display window
CN111161195B (en) Feature map processing method and device, storage medium and terminal
CN105787874B (en) Method and device for mosaic processing of screenshot
CN111080655A (en) Image segmentation and model training method, device, medium and electronic equipment
CN106204439A (en) The method and system of picture self-adaptive processing
CN108595211B (en) Method and apparatus for outputting data
US20160314502A1 (en) System and method for streamlining the design and development process of multiple advertising units
US9129441B2 (en) Lookup tables for text rendering
CN103970726A (en) Image-text typesetting implementation method and device
CN113849254A (en) Self-adaptive adjusting method of page layout and computing equipment
CN107392316B (en) Network training method and device, computing equipment and computer storage medium
CN109815424A (en) Web page picture display methods and terminal device
CN106844606A (en) The focus processing method and processing device of webpage
CN106610824A (en) Page height self-adaptation method and apparatus
CN109324984A (en) The method and apparatus of cyclic addressing are used in convolution algorithm
CN104750691B (en) A kind of self-defined webpage generating method and device
CN107977923B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN107025098A (en) The method and device of rendering text
CN102119409A (en) Drawing device and drawing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant