CN108961363A - A kind of composition method of electronic photo and electronic photo book - Google Patents

A kind of composition method of electronic photo and electronic photo book Download PDF

Info

Publication number
CN108961363A
CN108961363A CN201810596672.1A CN201810596672A CN108961363A CN 108961363 A CN108961363 A CN 108961363A CN 201810596672 A CN201810596672 A CN 201810596672A CN 108961363 A CN108961363 A CN 108961363A
Authority
CN
China
Prior art keywords
photo
ratio
width
height
typesetting
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
CN201810596672.1A
Other languages
Chinese (zh)
Other versions
CN108961363B (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.)
God Blessed Polytron Technologies Inc
Original Assignee
God Blessed Polytron Technologies Inc
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 God Blessed Polytron Technologies Inc filed Critical God Blessed Polytron Technologies Inc
Priority to CN201810596672.1A priority Critical patent/CN108961363B/en
Publication of CN108961363A publication Critical patent/CN108961363A/en
Application granted granted Critical
Publication of CN108961363B publication Critical patent/CN108961363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of composition methods of electronic photo, comprising the following steps: step S110: obtaining typesetting template, obtains the ratio of width to height of photo filling region in typesetting template, be set as first the ratio of width to height;Step S120: photo is obtained, the ratio of width to height of photo is obtained, is set as second the ratio of width to height;Step S130: obtaining the difference of first the ratio of width to height and second the ratio of width to height, judges the difference whether less than the first preset value, if so, step 140 is executed, if it is not, executing step S150;Step S140: photo is filled into the photo filling region of the typesetting template;First the ratio of width to height of photo filling region in typesetting template: being adjusted to second the ratio of width to height of photo by step S150, and photo is filled into the photo filling region of typesetting template adjusted.The invention also discloses a kind of composition methods of electronic photo book.Adjust automatically typesetting may be implemented in electronic photo book composition method disclosed by the invention, saves the typesetting time, and the electronic photo book balanced proportion after typesetting improves the aesthetics of electronic photo book.

Description

A kind of composition method of electronic photo and electronic photo book
Technical field
The present invention relates to electronic composition technical field more particularly to a kind of composition methods of electronic photo, and utilize institute State the electronic photo book composition method of electronic photo composition method design.
Background technique
Photo book refers to that user uses the photo of oneself, mixes text and background, the similar magazine that typesetting is fabricated to is the same Picture album.Traditional approach makes a photo book, needs user to consume long time and goes to carry out typesetting, major part is made commonly to disappear Expense person is fed up with, to lose desire to purchase.
With the development of computer technology, books typesetting is carried out using electronic computer, to help to make electronic photo book As very real needs.But existing electronic photo book or producer is needed to devote a tremendous amount of time typesetting or do Electronic photo book ratio out is inconsistent, affects beauty, if printing, also will affect printing effect.
Summary of the invention
Aiming at the problem that encountering in the production of existing electronic photo book, the embodiment of the invention provides a kind of electronic photo typesettings Method, and using the electronic photo book composition method of electronic photo composition method design, adjust automatically row may be implemented Version, saves the typesetting time, and the electronic photo book balanced proportion after typesetting improves the aesthetics of electronic photo book.
A kind of electronic photo composition method provided in an embodiment of the present invention, comprising the following steps:
Step S110: obtaining typesetting template, obtains the ratio of width to height of photo filling region in typesetting template, and it is wide high to be set as first Than;
Step S120: photo is obtained, the ratio of width to height of photo is obtained, is set as second the ratio of width to height;
Step S130: obtaining the difference of first the ratio of width to height and second the ratio of width to height, judges whether the difference is pre- less than first If value, if so, step S140 is executed, if it is not, executing step S150;
Step S140: the photo is filled into the photo filling region of the typesetting template, and photo is marked;
First the ratio of width to height of photo filling region in typesetting template: being adjusted to second the ratio of width to height of photo by step S150, And the photo is filled into the photo filling region of the typesetting template adjusted, and photo is marked.
The embodiment of the present invention also provides a kind of electronic photo book composition method, comprising the following steps:
Step S210: obtaining all typesetting templates of design motif, obtains photo filling region in all typesetting templates The ratio of width to height is set as first the ratio of width to height collection;
Step S220: obtaining all photos, obtains the ratio of width to height of all photos, is set as second the ratio of width to height collection;
Step S230: extracting second aspect ratio value that second the ratio of width to height is concentrated, obtain second aspect ratio value with First the ratio of width to height concentrates the difference of each first aspect ratio value, obtains the first difference collection, whether judges the first difference concentration There is the difference less than the first preset value, if so, then choosing the minimal difference that first difference is concentrated, the photo is filled into The photo filling region of the corresponding typesetting template of the minimal difference, and photo is marked;
Step S240: whether all second wide high level for judging that second the ratio of width to height is concentrated all extract and the first preset value Compare, if it is not, step 230 is executed, if so, executing step S250;
Step 250: judging whether that all photos are filled into the photo filling region of typesetting template;If it is not, executing step Rapid S260, if so, executing step S270;
For the photo of each Zhang Shangwei typesetting, following step is executed:
Step 260: being concentrated from the first difference of the photo, choose minimal difference, judge that the minimal difference is corresponding Whether typesetting template has been filled with photo, if it is not, by of photo filling region in the corresponding typesetting template of the minimal difference One the ratio of width to height is adjusted to second the ratio of width to height of the photo, and the photo is filled into the photograph of the typesetting template adjusted Piece filling region, and photo is marked;If so, choosing the minimal difference in remaining difference, judgment step is re-executed;Directly The photo filling region of typesetting template is filled into all photos;
Step S270: the typesetting template of all filling photos is generated into electronic photo book.
Wherein, typesetting template is obtained, the typesetting template of storage in the server in advance is obtained specially from server.
For layman or the user group of time preciousness, electronic photo typesetting side provided in an embodiment of the present invention Method and electronic photo book composition method improve the defect that traditional mode needs user's depth to participate in cumbersome design cycle.Pass through Typesetting template photo filling region is matched with the ratio of width to height of photo, realizes the Automatic Typesetting of photo, while to make Electronic photo book balanced proportion, typesetting is beautiful.For example user has submitted 100 photos, electronic photo book provided by the invention Composition method, can be with one desk calendar of moment generation, a book, a wall calendar ... while multiple designed commercial product recommendings To user, it is easy the desire for allowing user to generate secondary consumption.To realize that commodity are purchased again at lower cost.
Preferably, the electronic photo composition method step S140 specifically includes the following steps:
Step S141: judging whether there is portrait in photo, if it is not, step S142 is executed, if so, executing step 150;
Step 142: the photo is filled into the photo filling region of the typesetting template.
Further, the photo that the photo is filled into the typesetting template is filled in the electronic photo composition method Region or the photo filling region that the photo is filled into the typesetting template adjusted, specifically include the photo It is sized by second the ratio of width to height, the photo is made to fill the photo filling region in the full typesetting template.
Photo is filled into the photo filling region of the typesetting template described in the electronic photo composition method, it is a kind of Specific implementation is the URL that the URL of photo is filled into the arrangement nodes of photo filling region of typesetting template.
Preferably, step S230 judges that first difference is concentrated with less than first in the electronic photo book composition method Further include the following steps after the difference of preset value:
Step S231: judging whether there is portrait in photo, if so, by photo in the corresponding typesetting template of the minimal difference First the ratio of width to height of filling region is adjusted to second the ratio of width to height of photo, and the photo is filled into the typesetting adjusted The photo filling region of template, if it is not, executing step 232;
Step 232: the photo is filled into the photo filling region of the typesetting template.
Further, photo is filled into the photo fill area of the typesetting template in the electronic photo book composition method Domain or the photo filling region that the photo is filled into the typesetting template adjusted, specifically include by the photo by Second the ratio of width to height is sized, and the photo is made to fill the photo filling region in the full typesetting template.
The embodiment of the present invention also provides a kind of electronic equipment, including memory, processor and storage are on a memory simultaneously The computer program that can be run on a processor, processor realize above-mentioned electronic photo composition method or electricity when executing program Sub- photo book composition method.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, computer Above-mentioned electronic photo composition method or electronic photo book composition method are realized when program is executed by processor.
Detailed description of the invention
Fig. 1 is electronic photo composition method flow diagram in the embodiment of the present invention 1;
Fig. 2 is electronic photo composition method preferred embodiment flow diagram in the embodiment of the present invention 1;
Fig. 3 is electronic photo book composition method flow diagram in the embodiment of the present invention 2.
Specific embodiment
In the following, being described further in conjunction with attached drawing and specific embodiment to the present invention, it should be noted that not Under the premise of conflicting, new implementation can be formed between various embodiments described below or between each technical characteristic in any combination Example.
Embodiment 1:
As shown in Figure 1, a kind of electronic photo composition method provided in an embodiment of the present invention, electronics provided in this embodiment shines Piece composition method can realize that electronic equipment includes memory, processing by electronic equipment or electronic photo composing system Device and storage are on a memory and the computer program that can run on a processor, processor realize following walk when executing program It is rapid:
Step S110: obtaining typesetting template, obtains the ratio of width to height of photo filling region in typesetting template, and it is wide high to be set as first Than;
Wherein, typesetting template can be by designing and producing into the standard typesetting templates of various themes, standard typesetting mould early period Version generally comprises copy editor area, scheme of colour, photo filling region etc., according to the theme of template inside copy editor area, There is preset text composition.When making electronic photo or electronic photo book, two kinds of typesetting selection modes can be provided, it is a kind of For Automatic Typesetting, one kind is customized typesetting.Automatic Typesetting mode is selected, then can not modify the text in copy editor area, no Scheme of colour is modified, but uses preset text composition and scheme of colour, and arrange using electronic photo provided in this embodiment Photo is filled into photo filling region by version method.When using customized typesetting, client can editor copy editor area text, Scheme of colour is selected, and after editting text and choosing scheme of colour, uses electronic photo typesetting provided in this embodiment Photo is filled into photo filling region by method.
The theme standard typesetting template designed and produced can be saved in memory or special server, for using It is called when electronic photo composition method provided in this embodiment.Any other, which can also be saved in, can save setting for electronic data In standby, such as USB flash disk, mobile hard disk etc..
Meanwhile the standard typesetting template of various themes can also obtain the typesetting mould of some professions by way of downloading Version, and be saved into memory or other electronic data storages.
Typesetting template is obtained in step S110, specifically, realizes that electronics provided in this embodiment shines when enabling electronic equipment When piece composition method, processor will be according to required theme, automatically from memory or server or other electron numbers The standard typesetting template for meeting theme is extracted in equipment according to storing.It is automatic to obtain simultaneously for the standard typesetting template obtained Then the width and length of its photo filling region calculate the ratio of width and height, form first the ratio of width to height, be denoted as a1.
Step S120: photo is obtained, the ratio of width to height of photo is obtained, is set as second the ratio of width to height;
User only needs to select the photo for the electronic data format for needing to carry out typesetting, and the photo of selection is inputted electronics In equipment, the automatic width and height for obtaining photo is calculated the width of photo and the ratio of height by the processor of electronic equipment Value, is denoted as b1.
Step S130: obtaining the difference of first the ratio of width to height and second the ratio of width to height, judge difference whether less than the first preset value, If so, step S140 is executed, if it is not, executing step S150;
Processor passes through company | a1-b1 | the difference for calculating first the ratio of width to height and second the ratio of width to height is denoted as c, then compares c It is judged as the ratio of photo and the photo filling region of typesetting template if c < p with the size of preset first preset value p Ratio match executes step S140 if c >=p and judges the ratio of the ratio of photo and the photo filling region of typesetting template It mismatches, executes step S150.Wherein the first preset value p has the default value of setting in standard typesetting template, is such as set as 0.5, it also can according to need setting.Smaller, the ratio of the photo and photo filling region that get of first preset value p setting Matching degree is higher, but correspondingly, might have more photos cannot directly and photo filling region ratio match, need basis Step S150 further realizes the ratio match of photo Yu photo filling region.
Step S140: photo is filled into the photo filling region of typesetting template;And marking photo state is True, is indicated Photo is typesetted.
First the ratio of width to height of photo filling region in typesetting template: being adjusted to second the ratio of width to height of photo by step S150, And photo is filled into the photo filling region of typesetting template adjusted, and marking photo state is True, has indicated photo Through typesetted.
In step S150, first the ratio of width to height of photo filling region in typesetting template is adjusted to the second wide height of photo Than specifically, zooming in and out, reaching to typesetting photo filling region on the basis of the center of photo filling region in typesetting template The ratio of width to height to photo filling region is consistent with second the ratio of width to height, realizes the matching of photo filling region and photographic scale.
For layman or the user group of time preciousness, electronic photo typesetting side provided in an embodiment of the present invention Method improves the defect that traditional mode needs user's depth to participate in cumbersome design cycle.By by typesetting template photo fill area Domain is matched with the ratio of width to height of photo, realizes the Automatic Typesetting of photo, while to arrange using the electronic photo of the present embodiment The electronic photo book balanced proportion of version method production, typesetting are beautiful.
As shown in Fig. 2, in the further preferred embodiments of electronic photo composition method provided in an embodiment of the present invention, it is described The step 140 of electronic photo composition method specifically includes the following steps:
Step S141: judging whether there is portrait in photo, if it is not, step S142 is executed, if so, executing step 150;
In step S141, face recognition technology can be used, judges in photo whether to include face, if including people Face illustrates there is portrait in photo, for there is the photo of portrait, if photo is directly filled into photo filling region, although The matching of photographic scale was carried out, but due to not being complete ratio match, still there is portrait and be typeset template covering May, the ratio by the ratio match of photo filling region at photo is needed, therefore can realize using the method for step S150 Photo filling region exactly matches the ratio of photo, avoids photo from being typeset template and blocks, to avoid the portrait quilt in photo It blocks.If illustrating that the photo is not portrait without face, only landscape shines, and can carry out blocking for marginal portion, therefore, The method in step S142 can be directly used, photo is filled into photo filling region.
Step 142: the photo is filled into the photo filling region of the typesetting template.
Wherein, the ratio match of photo and typesetting template photo filling region is realized by above-mentioned method.Meanwhile In the design process of standard typesetting template, the common-use size of photo also can take into account, most of photo can be filled with photo The matching of ratio and size is realized in region, i.e. photo can fill full photo filling region.Although but still there are photo and shining Piece filling region realizes ratio match, but the problem of size Incomplete matching, i.e., photo cannot be filled up completely full photo filling The problem of region or photo size have exceeded photo filling region, at this point, by the following method, realizing that photo and photo are filled out Fill the matching of area size.I.e. after photo to be filled into the photo filling region of typesetting template or photo is filled into adjustment Typesetting template photo filling region when, on the basis of the center of photo, photo is sized by second the ratio of width to height, until Photo fills the photo filling region in set solid version template.
Wherein, photo is filled into the photo filling region of typesetting template, a kind of specific implementation is in the present embodiment The URL (Uniform Resource Locator, uniform resource locator) of photo is filled into the photo filling of typesetting template The URL of the arrangement nodes in region realizes the association of photo and photo filling region.
Embodiment 2:
As shown in figure 3, the embodiment of the present invention also provides a kind of electronic photo book composition method, the electronics that embodiment provides shines Piece book composition method can realize that electronic equipment includes memory, place by electronic equipment or electronic photo composing system The computer program managing device and storage on a memory and can running on a processor, processor are realized following when executing program Step:
Step S210: obtaining all typesetting templates of design motif, obtains photo filling region in all typesetting templates The ratio of width to height is set as first the ratio of width to height collection;
Wherein, it can need to design multiple pages according to what theme was expressed for each theme, each Pages Design There is standard typesetting template, all typesetting templates of design motif are obtained in step S210, electronic equipment is obtained automatically and set for this All standard typesetting templates of theme are counted, meanwhile, for each of all typesetting templates got typesetting template, respectively First the ratio of width to height for calculating its photo filling region, is denoted as a1, a2, a3 ... respectively, and all first the ratio of width to height are formed first The ratio of width to height collection A, A=[a1, a2, a3 ...].
Step S220: obtaining all photos, obtains the ratio of width to height of all photos, is set as second the ratio of width to height collection;
User only needs to select all photos for the electronic data format for needing to carry out typesetting, and the photo of selection is inputted In electronic equipment, the automatic width and height for obtaining photo is calculated the width and height of photo by the processor of electronic equipment Second the ratio of width to height, be denoted as b1, b2, b3 respectively ..., by all second the ratio of width to height form the second the ratio of width to height collection B, B=[b1, b2、b3……]。
Step S230: extracting second aspect ratio value that second the ratio of width to height is concentrated, and obtains the second aspect ratio value and first The ratio of width to height concentrates the difference of each first aspect ratio value, obtains the first difference collection, judges whether the first difference concentration has less than the The photo is filled into the minimal difference if so, then choosing the minimal difference of the first difference concentration by the difference of one preset value The photo filling region of corresponding typesetting template;And marking photo state is True, indicates that photo is typesetted.
Electronic equipment extracts second aspect ratio value from second the ratio of width to height collection B first, such as extracts b1, then divides Not Ji Suan b1 and first the ratio of width to height each of concentrate the difference of the first aspect ratio value, be denoted as c1=| a1-b2 |, c2=| a2-b1 |, C3=| a3-b1 | ..., and obtain the first difference collection C, C and be denoted as C=[c1, c2, c3 ...], and judge in the first difference collection C Difference c1, c2, c3 ... in whether have difference less than the first preset value p, if so, such as c1, c4, c6 are respectively less than first Preset value p then compares the size of c1, c4, c6, and such as c1 > c4 > c6 then chooses and typesetting template corresponding to the a6 of c6 is calculated, And photo is filled into the photo filling region of typesetting template corresponding to a6.All values in such as c1, c2, c3 ... are not Less than p, then illustrates that the ratio of the photo filling region of the photo and all typesetting templates mismatches, need using subsequent side Method realizes the ratio match of photo and typesetting template photo filling region.
Step S240: whether all second wide high level for judging that second the ratio of width to height is concentrated all extract and the first preset value Compare, if it is not, step 230 is executed, if so, executing step S250;
Its implementation can be when often extracting one second wide high level of second the ratio of width to height concentration, carry out to the value Label, identifies second aspect ratio value and has been handled.Then the second aspect ratio value that all second the ratio of width to height are concentrated is traversed, If there is the second aspect ratio value does not mark, then being judged as has the second aspect ratio value not extract, and otherwise, is judged to all Two aspect ratio values have been extracted.
Step 250: judging whether that all photos are filled into the photo filling region of typesetting template;If it is not, executing step Rapid S260, if so, executing step S270;
The state of all photos is judged whether all for True, if it is to judge that the state of all photos, which marks, All photos complete ratio match, and if there is the state of photo is not labeled as True, then judgement has photo not complete Ratio match needs to realize the ratio match of these photos Yu typesetting template photo filling region by executing step S260.
For the photo of each Zhang Shangwei typesetting, following step is executed:
Step 260: being concentrated from the first difference of the photo, choose minimal difference, judge that the minimal difference is corresponding Whether typesetting template has been filled with photo, if it is not, by of photo filling region in the corresponding typesetting template of the minimal difference One the ratio of width to height is adjusted to second the ratio of width to height of the photo, and photo is filled into the photo fill area of typesetting template adjusted Domain re-executes judgment step if so, choosing the minimal difference in remaining difference;Until all photos are filled into typesetting The photo filling region of template;
For no ratio match for completing photo and typesetting template photo filling region, it is primarily due in above-mentioned comparison In the process, all difference c1, c2, c3 ... in the first difference collection C are all larger than or are equal to the first preset value p.It is judged as shining The photo filling region ratio of piece and typesetting template mismatches.In response to this, it needs to choose difference in the first difference collection C The smallest difference then chooses typesetting template corresponding to the first aspect ratio value a3 of calculating difference c3 if c3 is the smallest difference, And judge whether the corresponding typesetting template of a3 has been matched by other photos, if be matched, select the first difference set C The smallest difference, such as c5 in middle residue difference, then choose typesetting template corresponding to the first aspect ratio value a5 of calculating difference c5, And judge whether the corresponding typesetting template of a5 has been matched by other photos, if it is not, by typesetting template corresponding to a5 The ratio of width to height of photo filling region be adjusted to second the ratio of width to height, and the photo is filled into the photograph of a5 typesetting template adjusted In piece filling region, while the state of photo is labeled as True.Until the state of all photos is noted as True, i.e., Judge that all photos complete ratio match.
Step S270: the typesetting template of all filling photos is generated into electronic photo book.
The photo book of generation can be the e-book of PDF format, the electronic photo book row that can also be provided through this embodiment Version method generates microblogging book, wechat book etc..
It further, further include following after step S230 judges that the first difference is concentrated with the difference less than the first preset value Step:
Step S231: judging whether there is portrait in photo, if so, photo in the corresponding typesetting template of minimal difference is filled First the ratio of width to height in region is adjusted to second the ratio of width to height of photo, and the photo that photo is filled into typesetting template adjusted is filled out Region is filled, and marking the state of photo is True, if it is not, executing step 232;
Step 232: photo being filled into the photo filling region of the typesetting template, and marks the state of photo to be True。
Further, photo is filled into the photo filling region of typesetting template in electronic photo book composition method or incited somebody to action Photo is filled into the photo filling region of typesetting template adjusted, specifically includes and is sized photo by second the ratio of width to height, Make the photo filling region in photo filling set solid version template.
For layman or the user group of time preciousness, electronic photo book typesetting provided in an embodiment of the present invention Method improves the defect that traditional mode needs user's depth to participate in cumbersome design cycle.By the way that typesetting template photo is filled Region is matched with the ratio of width to height of photo, realizes the Automatic Typesetting of photo, while making the electronic photo book ratio of production equal Weighing apparatus, typesetting are beautiful.For example user has submitted 100 photos, electronic photo book composition method provided by the invention can be raw with moment Cheng Yiben desk calendar, a book, a wall calendar ... at the same multiple designed commercial product recommendings to user, be easy that user is allowed to produce The desire of raw secondary consumption.To realize that commodity are purchased again at lower cost.
The present embodiment is the method provided using embodiment 1, carries out typesetting to a collection of photo that user provides and is fabricated to electricity Sub- photo book, part same as Example 1, it will not be described here.
Embodiment 3:
The embodiment of the present invention also provides a kind of electronic equipment, including memory, processor and storage are on a memory simultaneously The computer program that can be run on a processor, processor realize above-mentioned electronic photo composition method or electricity when executing program Sub- photo book composition method.
The above embodiment is only the preferred embodiment of the present invention, and the scope of protection of the present invention is not limited thereto, The variation and replacement for any unsubstantiality that those skilled in the art is done on the basis of the present invention belong to institute of the present invention Claimed range.

Claims (10)

1. a kind of electronic photo composition method, which comprises the following steps:
Step S110: obtaining typesetting template, obtains the ratio of width to height of photo filling region in typesetting template, is set as first the ratio of width to height;
Step S120: photo is obtained, the ratio of width to height of photo is obtained, is set as second the ratio of width to height;
Step S130: obtaining the difference of first the ratio of width to height and second the ratio of width to height, judge the difference whether less than the first preset value, If so, step S140 is executed, if it is not, executing step S150;
Step S140: the photo is filled into the photo filling region of the typesetting template, and photo is marked;
Step S150: first the ratio of width to height of photo filling region in typesetting template is adjusted to second the ratio of width to height of photo, and will The photo is filled into the photo filling region of the typesetting template adjusted, and photo is marked.
2. the method as described in claim 1, which is characterized in that the step S140 specifically includes the following steps:
Step S141: judging whether there is portrait in photo, if it is not, step S142 is executed, if so, executing step 150;
Step 142: the photo is filled into the photo filling region of the typesetting template.
3. method according to claim 2, which is characterized in that fill the photo that the photo is filled into the typesetting template Region or the photo filling region that the photo is filled into the typesetting template adjusted, specifically include the photo It is sized by second the ratio of width to height, the photo is made to fill the photo filling region in the full typesetting template.
4. the method as described in claim 1, which is characterized in that the acquisition typesetting template is specially obtained from server The typesetting template of storage in the server in advance.
5. the method as described in Claims 1-4 is any, which is characterized in that described that photo is filled into the typesetting template Photo filling region, specifically includes: the URL of photo is filled into the URL of the arrangement nodes of the photo filling region of typesetting template.
6. a kind of electronic photo book composition method, which comprises the following steps:
Step S210: obtaining all typesetting templates of design motif, and the width for obtaining photo filling region in all typesetting templates is high Than being set as first the ratio of width to height collection;
Step S220: obtaining all photos, obtains the ratio of width to height of all photos, is set as second the ratio of width to height collection;
Step S230: extracting second aspect ratio value that second the ratio of width to height is concentrated, and obtains second aspect ratio value and first The ratio of width to height concentrates the difference of each first aspect ratio value, obtains the first difference collection, and it is small to judge whether the first difference concentration has In the difference of the first preset value, if so, then choosing the minimal difference that first difference is concentrated, the photo is filled into described The photo filling region of the corresponding typesetting template of minimal difference, and photo is marked;
Step S240: judging whether all second wide high level that second the ratio of width to height is concentrated all extract the first difference collection of building, If it is not, step 230 is executed, if so, executing step S250;
Step 250: judging whether that all photos are filled into the photo filling region of typesetting template;If it is not, executing step S260, if so, executing step S270;
For the photo of each Zhang Shangwei typesetting, following step is executed:
Step 260: being concentrated from the first difference of the photo, choose minimal difference, judge the corresponding typesetting of the minimal difference Whether template has been filled with photo, if it is not, wide by first of photo filling region in the corresponding typesetting template of the minimal difference Second the ratio of width to height of height than being adjusted to the photo, and the photo that the photo is filled into the typesetting template adjusted is filled out Region is filled, and photo is marked;If so, choosing the minimal difference in remaining difference, judgment step is re-executed;Until institute There is photo to be filled into the photo filling region of typesetting template;
Step S270: the typesetting template of all filling photos is generated into electronic photo book.
7. method as claimed in claim 6, which is characterized in that the step S230 judges that first difference is concentrated with and is less than Further include the following steps after the difference of first preset value:
Step S231: judging whether there is portrait in photo, if so, photo in the corresponding typesetting template of the minimal difference is filled First the ratio of width to height in region is adjusted to second the ratio of width to height of photo, and the photo is filled into the typesetting template adjusted Photo filling region, if it is not, execute step 232;
Step 232: the photo is filled into the photo filling region of the typesetting template.
8. the method as described in claim 6 or 7, which is characterized in that the photo is filled into the photograph of the typesetting template Piece filling region or the photo filling region that the photo is filled into the typesetting template adjusted, specifically include institute It states photo to be sized by second the ratio of width to height, the photo is made to fill the photo filling region in the full typesetting template.
9. a kind of electronic equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes side described in any one of claim 1-8 when executing described program Method.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program The method as described in claim 1-8 any one is realized when being executed by processor.
CN201810596672.1A 2018-06-11 2018-06-11 Typesetting method of electronic photo and electronic photo book Active CN108961363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810596672.1A CN108961363B (en) 2018-06-11 2018-06-11 Typesetting method of electronic photo and electronic photo book

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810596672.1A CN108961363B (en) 2018-06-11 2018-06-11 Typesetting method of electronic photo and electronic photo book

Publications (2)

Publication Number Publication Date
CN108961363A true CN108961363A (en) 2018-12-07
CN108961363B CN108961363B (en) 2023-11-28

Family

ID=64488082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810596672.1A Active CN108961363B (en) 2018-06-11 2018-06-11 Typesetting method of electronic photo and electronic photo book

Country Status (1)

Country Link
CN (1) CN108961363B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241093A (en) * 2022-02-28 2022-03-25 世纪开元智印互联科技集团股份有限公司 Method and system for automatically typesetting photo book without shielding

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009218702A (en) * 2008-03-07 2009-09-24 Dainippon Printing Co Ltd Typesetting device, typesetting method and typesetting processing program
JP2010097305A (en) * 2008-10-15 2010-04-30 Dainippon Printing Co Ltd Typesetting device, typesetting method, and typesetting processing program
JP2012069006A (en) * 2010-09-24 2012-04-05 Sharp Corp Layout selection device, layout selection method, layout selection program, and computer-readable recording medium, and content display device and content generation method
JP2012169787A (en) * 2011-02-10 2012-09-06 Canon Inc Photo book creation device and control method of the same
US20130108157A1 (en) * 2011-10-28 2013-05-02 Raymond William Ptucha Image Recomposition From Face Detection And Facial Features
US20140307980A1 (en) * 2013-03-07 2014-10-16 Shutterfly, Inc. Adaptive and fast image collage creation
US20150054853A1 (en) * 2013-08-23 2015-02-26 Adobe Systems Incorporated Systems and methods of automatic image sizing
CN105718439A (en) * 2016-03-04 2016-06-29 广州微印信息科技有限公司 Picture typesetting method based on face recognition

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009218702A (en) * 2008-03-07 2009-09-24 Dainippon Printing Co Ltd Typesetting device, typesetting method and typesetting processing program
JP2010097305A (en) * 2008-10-15 2010-04-30 Dainippon Printing Co Ltd Typesetting device, typesetting method, and typesetting processing program
JP2012069006A (en) * 2010-09-24 2012-04-05 Sharp Corp Layout selection device, layout selection method, layout selection program, and computer-readable recording medium, and content display device and content generation method
JP2012169787A (en) * 2011-02-10 2012-09-06 Canon Inc Photo book creation device and control method of the same
US20130108157A1 (en) * 2011-10-28 2013-05-02 Raymond William Ptucha Image Recomposition From Face Detection And Facial Features
US20140307980A1 (en) * 2013-03-07 2014-10-16 Shutterfly, Inc. Adaptive and fast image collage creation
US20150054853A1 (en) * 2013-08-23 2015-02-26 Adobe Systems Incorporated Systems and methods of automatic image sizing
CN105718439A (en) * 2016-03-04 2016-06-29 广州微印信息科技有限公司 Picture typesetting method based on face recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241093A (en) * 2022-02-28 2022-03-25 世纪开元智印互联科技集团股份有限公司 Method and system for automatically typesetting photo book without shielding
CN114241093B (en) * 2022-02-28 2022-06-17 世纪开元智印互联科技集团股份有限公司 Method and system for automatically typesetting photo book without shielding

Also Published As

Publication number Publication date
CN108961363B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
CN107622104B (en) Character image identification and marking method and system
JP5993642B2 (en) Information processing apparatus, control method thereof, and program
JP6045232B2 (en) Image processing apparatus, image processing method, and program
CN102663125B (en) Method and system for collecting microblog contents to make electronic document
CN102332034B (en) Portrait picture retrieval method and device
CN103488749B (en) A kind of network electronic album display method and system
JP7341676B2 (en) Apparatus, method, and program
CN101430714B (en) Content structuring process method and system based on model
JP7341677B2 (en) Apparatus, method, and program
JP6282065B2 (en) Image processing apparatus, image processing method, and program
CN105931096A (en) Commodity detail page making method
CN109726394A (en) Short text Subject Clustering method based on fusion BTM model
CN104378659A (en) Personalization recommendation method based on smart television
CN109033472A (en) Picture retrieval method and device, computer equipment and computer-readable medium
WO2017131771A1 (en) Identify a model that matches a 3d object
CN106445900A (en) Table style processing method and device
CN100392641C (en) Method for implementing automatic typesetting based on cloning block
CN108961363A (en) A kind of composition method of electronic photo and electronic photo book
WO2015120771A1 (en) Method and device for classification of quality of digital image
WO2011139555A2 (en) Automated template layout system
WO2011139549A2 (en) Automated template layout method
CN107077594A (en) Mark the visual media on mobile device
Chen et al. Fusing pointwise and pairwise labels for supporting user-adaptive image retrieval
CN104216882B (en) File mask method and device
CN101504723B (en) Projection space establishing method and apparatus

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