CN104317502B - The edit methods and editing device of picture - Google Patents

The edit methods and editing device of picture Download PDF

Info

Publication number
CN104317502B
CN104317502B CN201410602766.7A CN201410602766A CN104317502B CN 104317502 B CN104317502 B CN 104317502B CN 201410602766 A CN201410602766 A CN 201410602766A CN 104317502 B CN104317502 B CN 104317502B
Authority
CN
China
Prior art keywords
picture
parameter
editor
key
value pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410602766.7A
Other languages
Chinese (zh)
Other versions
CN104317502A (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.)
Guoxing Network Co ltd
Original Assignee
BEIJING XINHUA RUIDE ELECTRONIC READING 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 BEIJING XINHUA RUIDE ELECTRONIC READING TECHNOLOGY Co Ltd filed Critical BEIJING XINHUA RUIDE ELECTRONIC READING TECHNOLOGY Co Ltd
Priority to CN201410602766.7A priority Critical patent/CN104317502B/en
Publication of CN104317502A publication Critical patent/CN104317502A/en
Application granted granted Critical
Publication of CN104317502B publication Critical patent/CN104317502B/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
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition

Abstract

The invention discloses a kind of edit methods of picture and editing device.Wherein, the edit methods include:After picture editor is started, the configuration file of the picture editor of establishment is obtained;The picture address of picture editing parameter and picture to be edited is configured according to configuration file;Picture to be edited is read from the picture address of picture to be edited;Obtain picture editor's mode of the picture to be edited indicated by picture editor's parameter;Editing picture, which is treated, using picture editor's mode carries out picture editor, the picture after being edited.Using the present invention, solve the problems, such as that processing picture is cumbersome in the prior art, improves the efficiency of processing picture operation.

Description

The edit methods and editing device of picture
Technical field
The present invention relates to picture processing field, in particular to the edit methods and editing device of a kind of picture.
Background technology
As scaling shearing of the people to picture requires more and more higher, the complexity of the parameter of picture scaling shear treatment Also more and more higher.
Specifically, the zooming parameter of picture scaling processing includes:The path of pretreatment picture, new height, new width And the form of output;The shear parameters of picture shear treatment include:Pre-process the path of picture, the x coordinate that shearing originates, cut The y-coordinate for cutting the beginning, the width, the height of interception frame and the form of output that intercept frame.
Increasing for number of parameters can make user obtain the effect of more preferable picture processing, but when user performs above-mentioned contracting Also can some troubles when the operation put or sheared:1. neglecting some parameters during input, neglecting some parameters may Cause picture processing mistake;Or 2. each user call image processing function can only zoom in and out processing, or can only carry out Shear treatment, if user thinks that scaling is completed to shear again, or scaled after shearing, can only be after the completion of once calling terminates again Shearing function is called to carry out funcall in next step;3. to be inputted when same operation handles a collection of picture a large amount of Parameter do repeated work) user will feel inconvenient.
For handling the problem of picture is cumbersome in the prior art, effective solution is not yet proposed at present.
The content of the invention
For handling the problem of picture is cumbersome in correlation technique, effective solution is not yet proposed at present, therefore, It is a primary object of the present invention to provide the edit methods and editing device of a kind of picture, to solve the above problems.
To achieve these goals, according to an aspect of the invention, there is provided a kind of edit methods of picture, the editor Method includes:After picture editor is started, the configuration file of the picture editor of establishment is obtained;Picture is configured according to configuration file Editing parameter;Picture to be edited is read from the picture address of picture to be edited;Obtain to be edited indicated by picture editor's parameter Picture editor's mode of picture;Editing picture, which is treated, using picture editor's mode carries out picture editor, the picture after being edited.
Further, configuring picture editing parameter according to configuration file includes:According to preset format in configuration file it is defeated Enter picture editor's parameter, wherein, picture editor's parameter includes shear parameters and/or zooming parameter.
Further, picture editor's parameter is zooming parameter, wherein, picture is inputted in configuration file according to preset format Editing parameter includes:First key-value pair of zooming parameter is set in configuration file, wherein, the first key-value pair is zooming parameter The mapping of the value of property parameters and property parameters, the first key-value pair include:Picture after zoom width, scaling height and editor Form key-value pair.
Further, picture editor's parameter is shear parameters, wherein, picture is inputted in configuration file according to preset format Editing parameter includes:Second key-value pair of shear parameters is set in configuration file, wherein, the second key-value pair is shear parameters The mapping of the value of property parameters and property parameters, the second key-value pair include:Shear coordinate, shearing width, shear height and volume The key-value pair of the form of picture after volume.
Further, obtaining picture editor's mode of the picture to be edited indicated by picture editor's parameter includes:Decomposition is matched somebody with somebody Put picture editor's parameter in file;If it is shear parameters to decompose obtained picture editor's parameter, it is determined that picture to be edited Picture editor's mode is shearing;If it is zooming parameter to decompose obtained picture editor's parameter, it is determined that the picture of picture to be edited Edit mode is scaling;If it is zooming parameter and shear parameters to decompose obtained picture editor's parameter, it is determined that picture to be edited Picture editor's mode for scaling and scaling.
Further, the configuration file of the picture editor of establishment includes:The property parameters of picture editor's parameter are joined with attribute Several default values.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of editing device of picture, the editor Device includes:First acquisition module, for after picture editor is started, obtaining the configuration file of the picture editor of establishment;Match somebody with somebody Module is put, for configuring picture editing parameter according to configuration file;Read module, for the picture address reading from picture to be edited Take picture to be edited;Second acquisition module, for obtaining the picture editor side of the picture to be edited indicated by picture editor's parameter Formula;Editor module, picture editor, the picture after being edited are carried out for treating editing picture using picture editor's mode.
Further, configuration module includes:Input module, compiled for inputting picture in configuration file according to preset format Parameter is collected, wherein, picture editor's parameter includes shear parameters and/or zooming parameter.
Further, picture editor's parameter is zooming parameter, wherein, configuration module includes:First setup module, for First key-value pair of zooming parameter is set in configuration file, wherein, the first key-value pair is the property parameters and attribute of zooming parameter The mapping of the value of parameter, the first key-value pair include:The key assignments of the form of picture after zoom width, scaling height and editor It is right.
Further, picture editor's parameter is shear parameters, wherein, configuration module includes:Second setup module, for Second key-value pair of shear parameters is set in configuration file, wherein, the second key-value pair is the property parameters and attribute of shear parameters The mapping of the value of parameter, the second key-value pair include:Shear the lattice of the picture after coordinate, shearing width, shear height and editor The key-value pair of formula.
Further, the second acquisition module includes:Decomposing module, for decomposing picture editor's parameter in configuration file; First determining module, in the case where decomposing obtained picture editor's parameter and being shear parameters, determining picture to be edited Picture editor's mode is shearing;Second determining module, for decomposing the situation that obtained picture editor's parameter is zooming parameter Under, the picture editor's mode for determining picture to be edited is scaling;3rd determining module, for decomposing obtained picture editor ginseng In the case that number is zooming parameter and shear parameters, the picture editor's mode for determining picture to be edited is scaling and scaling.
Using the embodiment of the present invention, picture editing parameter is configured by configuration file, compiled according to the picture in configuration file Collect picture editor's mode indicated by parameter and edlin is entered to picture, it is complicated in the prior art using simple parameter configuration replacement Parameter be manually entered, can simply and quickly editing picture, and it is more only to use a configuration file to complete simultaneously Kind edit operation.By the above embodiment of the present invention, to it is a collection of need the picture for carrying out identical edit operation to handle when, Without input identical picture editor's parameter is repeated several times, only need to easily change I/O Address can complete to scheme this batch The processing of piece, it can be completed with a collection of editor for needing to carry out the mass picture of identical edit operation using a configuration file. By the embodiment of the present invention, solve the problems, such as that processing picture is cumbersome in the prior art, improve processing picture operation Efficiency.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the edit methods of picture according to embodiments of the present invention;
Fig. 2 is a kind of flow chart of the edit methods of optional picture according to embodiments of the present invention;
Fig. 3 is the flow chart of the edit methods of the optional picture of another kind according to embodiments of the present invention;And
Fig. 4 is the schematic diagram of the editing device of picture according to embodiments of the present invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model that the present invention protects Enclose.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or Order beyond those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product Or the intrinsic other steps of equipment or unit.
Fig. 1 is the flow chart of the edit methods of picture according to embodiments of the present invention, as shown in figure 1, this method is included such as Lower step:
Step S102, after picture editor is started, obtain the configuration file of the picture editor of establishment.
Wherein, configuration file can be Properties files, and the Properties files are a kind of storage key-value pairs File.
Step S104, picture editing parameter is configured according to configuration file.
Step S106, picture to be edited is read from the picture address of picture to be edited.
Step S108, obtain picture editor's mode of the picture to be edited indicated by picture editor's parameter.
Step S110, treat editing picture using picture editor's mode and carry out picture editor, the picture after being edited.
Using the embodiment of the present invention, picture editing parameter is configured according to configuration file, compiled according to the picture in configuration file Collect picture editor's mode indicated by parameter and edlin is entered to picture, it is complicated in the prior art using simple parameter configuration replacement Parameter be manually entered, can simply and quickly editing picture, and it is more only to use a configuration file to complete simultaneously Kind edit operation.By the above embodiment of the present invention, to it is a collection of need the picture for carrying out identical edit operation to handle when, Without input identical picture editor's parameter is repeated several times, only need to easily change I/O Address can complete to scheme this batch The processing of piece, it can be completed with a collection of editor for needing to carry out the mass picture of identical edit operation using a configuration file. By the embodiment of the present invention, solve the problems, such as that processing picture is cumbersome in the prior art, improve processing picture operation Efficiency.
In above-described embodiment, the picture address and picture of picture to be edited can be inputted by the interface of picture editor's program The address preserved after editor, what above-mentioned I/O Address preserved after picture address and picture editor including picture to be edited Address.
Fig. 2 is a kind of flow chart of the edit methods of optional picture according to embodiments of the present invention.As shown in Fig. 2 should Edit methods comprise the following steps:
Step S202, introduce jar file.
Wherein, jar file is Java ARchive files, i.e. Java archive file, is a kind of with platform-independent file Form, can be by multiple one file of file synthesis.
Step S204, newly-built imgProcessing.properties files.
Wherein, imgProcessing.properties files are the configuration file in above-described embodiment.
Step S206, the key-value pair of newly-built pretreatment in imgProcessing.properties files.
Wherein, step S206 corresponds to the step S104 in above-described embodiment;The key-value pair of pretreatment is joined including picture editor The picture address of number and picture to be edited.
Step S208, call imgProcessing () editing picture.
Step S210, return to the picture after editor.
Specifically, the form that need to only set picture to pre-process in newly-built imgProcessing.properties files Key-value pair, call the imgProcessing () can complete to picture processing operation.
Embodiment shown in Fig. 2 provides a kind of simple, efficiently picture processing method, utilizes Api explanations and jar texts Part carries out outer packaging, coordinates Imagemagick of the prior art to carry out edit operation, wherein, Api Application Programming Interface, i.e. application program become interface, are some pre-defined functions;Imagemagick is one Individual free establishment, editor, the software of synthesising picture.
By the above embodiment of the present invention, the setting to picture editor's parameter can be completed using configuration file, without hand The complicated editing parameter of dynamic input, can simply, efficiently complete the editor to picture.
According to the above embodiment of the present invention, configuring picture editing parameter according to configuration file can include:According to default lattice Formula inputs picture editor's parameter in configuration file, wherein, picture editor's parameter includes shear parameters and/or zooming parameter.
Wherein, preset format can be the certain order format provided according to Api picture editor's parameter, be arranged in word Value (value i.e. in key-value pair) of the symbol string as a pair of key-value pairs in imgProcessing.properties files.With Family oneself defines the key (key i.e. in key-value pair) that title forms this pair of key assignments plus the Api prefixes provided.
Specifically, shear parameters can include shearing key-value pair, and the key of shearing key-value pair prefix is:Model_SH_ It is self-defined;Zooming parameter can include scaling key-value pair, and the key of scaling key-value pair prefix is:Model_NA_ is self-defined.
The prefix for the key for shearing key-value pair and the key of scaling key-value pair can be passed through in the above embodiment of the present invention Prefix determine picture editor's mode, if Model_SH_ is shearing manipulation, Model_NA_ is zoom operations.
In the above embodiment of the present invention, shear parameters form can be key-value pair:key:Valve, i.e.
Model_SH_ User Defineds:
x/<X_Axis>/y/<Y_Axis>/w/<Width>/h/<Height>/format/<Format>.Wherein, X_ Axis is X-axis, and Y_Axis is y-axis, and Width is width, Height is height, Format is form.
Zooming parameter form can also be key-value pair:key:Value, i.e.
Model_NA_ User Defineds:w/<Width>/h/<Height>/format/<Format>.Wherein, Width is Width, Height are height, Format is form.
By the above embodiment of the present invention, inputting picture editor's parameter in configuration file according to preset format can prompt All parameters needed for user's input editing picture, the problem of parameter is easily missed when being manually entered parameter is avoided, is improved Input the accuracy of picture editor's parameter;By inputting shear parameters and/or zooming parameter, Ke Yi in same configuration file A variety of operations (e.g., while carry out scaling and the shearing of picture) are carried out in once editing to picture, solve in the prior art one A kind of secondary the problem of can only carrying out operation to picture, improve the efficiency of picture editor.
In the above embodiment of the present invention, picture editor's parameter is zooming parameter, wherein, configured according to preset format Picture editor's parameter is inputted in file to be included:First key-value pair of zooming parameter is set in configuration file, wherein, first Key-value pair for zooming parameter property parameters and property parameters value mapping, the first key-value pair includes:Zoom width, scaling are high The key-value pair of the form of picture after spending and editing.
For example, certain pictures are carried out with 400 × 600px scaling, and exported with png forms.It is above-mentioned according to the present invention Embodiment, defining key values is:Model_NA_style1, and configure key assignments in imgProcessing.properties files It is right:Model_NA_style1:w/400/h/600/format/png.User only needs when carrying out the zoom operations to the picture ImgProcessing (address of processed picture, Model_SH_style1, the address preserved after picture processing) is directly invoked, It can be achieved to carry out picture 400 × 600px scaling and exported with png forms.It is also, identical carrying out this to plurality of pictures Zoom operations when, without inputting zooming parameter again, directly invoke above-mentioned imgProcessing () i.e. can be achieved to multiple Picture is carried out 400 × 600px scaling and exported with png forms.Picture processing therein can be that picture editor is handled.
The address preserved after picture processing in above-described embodiment can be:The result of processing is put into the A files of D disks Under.
By the above embodiment of the present invention, only zooming parameter need to be pre-configured with using a configuration file, needed to figure Piece carries out calling the configuration file when meeting the scaling of zooming parameter, you can realizes the scaling to picture;Needing to multiple figures Piece carries out calling the configuration file during identical zoom operations, without inputting zooming parameter again, only with need to changing input and output Location can complete the scaling to plurality of pictures.
In the above embodiment of the present invention, picture editor's parameter is shear parameters, wherein, configured according to preset format Picture editor's parameter is inputted in file to be included:Second key-value pair of shear parameters is set in configuration file, wherein, second Key-value pair for shear parameters property parameters and property parameters value mapping, the second key-value pair can include:Shearing coordinate, cut Cut the key-value pair of the form of the picture after width, shear height and editor.
Described above, x/<X_Axis>/y/<Y_Axis>/w/<Width>/h/<Height>/format/<Format>, X, y, w, h and format are key, and X_Axis is the value of X-axis, and Y_Axis is the value of y-axis, and Width is the value of width, Height It is form for the value of height, Format.
For example, certain pictures is sheared, wherein, shear parameters are as follows:Starting point is X-axis 20px, Y-axis 20px, A width of 200px of frame is intercepted, intercepts a height of 100px of frame, the form of output is jpg forms.
According to the above embodiment of the present invention, defining key values is:Model_SH_style1, and Key-value pair is configured in imgProcessing.prop-erties files:Model_SH_style1:x/20/y/20/w/200/h/ 100/format/jpg.It is (processed need to only to directly invoke imgProcessing when carrying out shearing manipulation to the picture by user The address of picture, Model_SH_style1, the address preserved after picture processing), you can realize and above-mentioned shearing is carried out to the picture Operate and exported with jpg forms.Also, when carrying out the identical shearing manipulation to plurality of pictures, without inputting shearing again Parameter, directly invoke above-mentioned imgProcessing () and can be achieved to carry out plurality of pictures identical shearing manipulation and with jpg Form exports.
By the above embodiment of the present invention, only shear parameters need to be pre-configured with using a configuration file, needed to figure Piece carries out calling the configuration file when meeting the shearing of shear parameters, you can realizes the shearing to picture;Needing to multiple figures Piece carries out calling the configuration file during identical shearing manipulation, without inputting shear parameters again, only with need to changing input and output Location can complete the shearing to plurality of pictures.
In the above embodiment of the present invention, the picture editor side of the picture to be edited indicated by picture editor's parameter is obtained Formula can include:Decompose picture editor's parameter in configuration file;If it is shear parameters to decompose obtained picture editor's parameter, The picture editor's mode for determining picture to be edited is shearing;If it is zooming parameter to decompose obtained picture editor's parameter, it is determined that Picture editor's mode of picture to be edited is scaling;If picture editor's parameter that decomposition obtains is zooming parameter and shear parameters, The picture editor's mode for then determining picture to be edited is scaling and scaling.
Specifically, in the above embodiment of the present invention, default picture editor's mode editor can be used to scheme by key Piece.In the case where decomposing obtained picture editor's parameter and being shear parameters, it is determined that picture editor's mode of picture to be edited , can be to the predetermined shearing manipulation of picture using the key of shearing key-value pair for shearing;Compiled in the picture that decomposition obtains In the case of parameter is collected as zooming parameter, it is determined that picture editor's mode of picture to be edited is scaling, uses scaling key-value pair Key can be to the predetermined zoom operations of picture;Obtained picture editor's parameter is being decomposed as zooming parameter and is being cut In the case of cutting parameter, it is determined that picture editor's mode of picture to be edited is scaling and scaling, while uses shearing key-value pair Key and the key of scaling key-value pair can complete shearing set in advance and zoom operations to picture.
It is it should be further stated that complete to picture using the key of shearing key-value pair and the key of scaling key-value pair at the same time In the case of shearing and zoom operations, pipe can be used to realize the key's of the shearing key-value pair and key of scaling key-value pair Use simultaneously.
Wherein, pipe is |, it is the multiple key of link that it, which is acted on, and successional processing is carried out to a pictures.
Fig. 3 is the flow chart of the edit methods of the optional picture of another kind according to embodiments of the present invention.With reference to Fig. 3 The above embodiment of the present invention is discussed in detail, as shown in figure 3, the edit methods comprise the following steps:
Step S302, call imgProcessing ().
Step S304, read picture editor's parameter in imgProcessing.properties files.
Step S306, the picture editor's parameter read is decomposed, picture editor's parameter after being decomposed.
Step S308, according to picture editor's parameter after decomposition, obtain different picture editor's modes.
Step S310, call Imagemagick instruments.
Specifically, Imagemagick instruments are called according to above-mentioned picture editor's mode editing picture.
Step S312, return to the picture after editor.
For example, zoomed in and out again after being sheared to certain pictures, wherein, shear parameters are:Starting point X-axis 20px, Y Axle 20px, a width of 200px of frame is intercepted, intercept a height of 100px, the output format jpg of frame.Zooming parameter is:Picture is entered 400 × 600px of row scaling is simultaneously exported with png forms.
According to the above embodiment of the present invention, user, which can directly adjust, preserves imgProcessing inside the jar provided (address of processed picture, Model_SH_style1 | Model_NA_style1, the address preserved after picture processing), you can It is above-mentioned to picture progress first to shear the operation scaled afterwards.
If user wants first to zoom in and out certain pictures to shear again, only need to be by imgProcessing () Model_SH_style1 | Model_NA_style1 replaces with Model_NA_style1 | and Model_SH_style1, calling should ImgProcessing () can carry out first scaling the operation sheared afterwards to picture.
By the above embodiment of the present invention, only need to simply, efficiently be divided by a configuration file can according to basis Picture editor's parameter after solution enters edlin to picture, when needing to doing same treatment with batch of plurality of pictures, as long as repairing Change the I/O Address in the configuration file, input identical picture editor's parameter without being repeated several times, improve defeated Enter the accuracy of picture editor's parameter.
According to the above embodiment of the present invention, the configuration file of the picture editor of establishment can include:Picture editor's parameter The default value of property parameters and property parameters.
Specifically, when the property parameters for detecting picture editor's parameter are default value, prompt message is issued the user with, is carried Show that with whether the default value is changed, after user chooses whether to change the default value, figure is carried out according to the instruction of user by user Piece editor.If user select change the default value, display modification property parameters dialog box, and change the default value it Afterwards, according to amended property parameters editing picture;If user's selection is not changed, the default value editing picture is used.
By the above embodiment of the present invention, sent out when the property parameters for detecting picture editor's parameter are default value to user Go out prompting, user can be prompted when user forgets to input some parameters, avoid and parameter is easily missed when being manually entered parameter The problem of, the accuracy for inputting picture editor's parameter is improved, improves the editorial efficiency of picture.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not The order being same as herein performs shown or described step.
Fig. 4 is the schematic diagram of the editing device of picture according to embodiments of the present invention, as shown in figure 4, the editing device can With including:First acquisition module 10, configuration module 30, read module 50, the second acquisition module 70 and editor module 90.
Wherein, the first acquisition module 10 is used for after picture editor is started, and obtains the configuration text of the picture editor of establishment Part;Configuration module 30 is used for the picture address that picture editing parameter and picture to be edited are configured according to configuration file;Read module 50 are used to read picture to be edited from the picture address of picture to be edited;Second acquisition module 70 is used to obtain picture editor's parameter Picture editor's mode of indicated picture to be edited;Editor module 90 enters for treating editing picture using picture editor's mode Row picture editor, the picture after being edited.
Using the embodiment of the present invention, the picture address of picture editing parameter and picture to be edited is configured by configuration file, Editor module enters edlin according to picture editor's mode indicated by picture editor's parameter in configuration file to picture, uses letter Single parameter configuration replaces parameter complicated to be in the prior art manually entered, can simply and quickly editing picture, and only needing A variety of edit operations can be completed simultaneously using a configuration file.By the above embodiment of the present invention, to it is a collection of need into When the picture of the identical edit operation of row is handled, identical picture editor's parameter is inputted without being repeated several times, is only needed easily Modification I/O Address can complete processing to this batch of picture, using a configuration file can complete with it is a collection of need into The editor of the mass picture of the identical edit operation of row.By the embodiment of the present invention, solve and handle picture operation in the prior art The problem of cumbersome, improve the efficiency of processing picture operation.
Wherein, above-mentioned I/O Address is the picture address of picture to be edited, and the picture address includes being schemed by editor The address preserved after the address of piece and picture editor.
According to the above embodiment of the present invention, configuration module can include:Input module, for being configured according to preset format Picture editor's parameter, and the picture address of input picture to be edited are inputted in file, wherein, picture editor's parameter includes shearing and joined Number and/or zooming parameter.
Wherein, preset format can be the certain order format provided according to Api picture editor's parameter, be arranged in word Value (value i.e. in key-value pair) of the symbol string as a pair of key-value pairs in imgProcessing.properties files.With Family oneself defines the key (key i.e. in key-value pair) that title forms this pair of key assignments plus the Api prefixes provided.
Specifically, shear parameters can include shearing key-value pair, and the key of shearing key-value pair prefix is:Model_SH_ It is self-defined;Zooming parameter can include scaling key-value pair, and the key of scaling key-value pair prefix is:Model_NA_ is self-defined.
The prefix for the key for shearing key-value pair and the key of scaling key-value pair can be passed through in the above embodiment of the present invention Prefix determine picture editor's mode, if Model_SH_ is shearing manipulation, Model_NA_ is zoom operations.
In the above embodiment of the present invention, shear parameters form can be key-value pair:key:Valve, i.e.
Model_SH_ User Defineds:
x/<X_Axis>/y/<Y_Axis>/w/<Width>/h/<Height>/format/<Format>.Wherein, X_ Axis is X-axis, and Y_Axis is y-axis, and Width is width, Height is height, Format is form.
Zooming parameter form can also be key-value pair:key:Value, i.e.
Model_NA_ User Defineds:w/<Width>/h/<Height>/format/<Format>.Wherein, Width is Width, Height are height, Format is form.
By the above embodiment of the present invention, picture editor's parameter and to be edited is inputted in configuration file according to preset format The picture address of picture can prompt all parameters needed for user's input editing picture, and it is easy when being manually entered parameter to avoid The problem of missing parameter, improve the accuracy of input picture editor's parameter;By inputting shearing ginseng in same configuration file Number and/or zooming parameter, a variety of operations can be carried out to picture in once editing and (e.g., while carry out the scaling of picture and cut Cut), solve the problems, such as once carry out picture a kind of operation in the prior art, improve the efficiency of picture editor.
In the above embodiment of the present invention, picture editor's parameter is zooming parameter, wherein, configuration module can include: First setup module, for setting the first key-value pair of zooming parameter in configuration file, wherein, the first key-value pair is joined for scaling The mapping of several property parameters and values of property parameters, the first key-value pair include:After zoom width, scaling height and editor The key-value pair of the form of picture.
By the above embodiment of the present invention, only zooming parameter need to be pre-configured with using a configuration file, needed to figure Piece carries out calling the configuration file when meeting the scaling of zooming parameter, you can realizes the scaling to picture;Needing to multiple figures Piece carries out calling the configuration file during identical zoom operations, without inputting zooming parameter again, only with need to changing input and output Location can complete the scaling to plurality of pictures.
According to the above embodiment of the present invention, picture editor's parameter is shear parameters, wherein, configuration module can include:The Two setup modules, for setting the second key-value pair of shear parameters in configuration file, wherein, the second key-value pair is shear parameters Property parameters and property parameters value mapping, the second key-value pair includes:Shear coordinate, shearing width, shear height and The key-value pair of the form of picture after editor.
Described above, x/<X_Axis>/y/<Y_Axis>/w/<Width>/h/<Height>/format/<Format>, X, y, w, h and format are key, and X_Axis is the value of X-axis, and Y_Axis is the value of y-axis, and Width is the value of width, Height It is form for the value of height, Format.
According to the above embodiment of the present invention, defining key values is:Model_SH_style1, and Key-value pair is configured in imgProcessing.prop-erties files:Model_SH_style1:x/20/y/20/w/200/h/ 100/format/jpg.It is (processed need to only to directly invoke imgProcessing when carrying out shearing manipulation to the picture by user The address of picture, Model_SH_style1, the address preserved after picture processing), you can realize and above-mentioned shearing is carried out to the picture Operate and exported with jpg forms.Also, when carrying out the identical shearing manipulation to plurality of pictures, without inputting shearing again Parameter, directly invoke above-mentioned imgProcessing () and can be achieved to carry out plurality of pictures identical shearing manipulation and with jpg Form exports.
By the above embodiment of the present invention, only shear parameters need to be pre-configured with using a configuration file, needed to figure Piece carries out calling the configuration file when meeting the shearing of shear parameters, you can realizes the shearing to picture;Needing to multiple figures Piece carries out calling the configuration file during identical shearing manipulation, without inputting shear parameters again, only with need to changing input and output Location can complete the shearing to plurality of pictures.
According to the above embodiment of the present invention, the second acquisition module can include:Decomposing module, for decomposing in configuration file Picture editor's parameter;First determining module, in the case that picture editor's parameter for being obtained in decomposition is shear parameters, really Picture editor's mode of fixed picture to be edited is shearing;Second determining module, picture editor's parameter for being obtained in decomposition are In the case of zooming parameter, the picture editor's mode for determining picture to be edited is scaling;3rd determining module, for decomposing In the case that the picture editor's parameter arrived is zooming parameter and shear parameters, the picture editor's mode for determining picture to be edited is contracting Put and scale.
Specifically, in the above embodiment of the present invention, default picture editor's mode editor can be used to scheme by key Piece.In the case where decomposing obtained picture editor's parameter and being shear parameters, it is determined that picture editor's mode of picture to be edited , can be to the predetermined shearing manipulation of picture using the key of shearing key-value pair for shearing;Compiled in the picture that decomposition obtains In the case of parameter is collected as zooming parameter, it is determined that picture editor's mode of picture to be edited is scaling, uses scaling key-value pair Key can be to the predetermined zoom operations of picture;Obtained picture editor's parameter is being decomposed as zooming parameter and is being cut In the case of cutting parameter, it is determined that picture editor's mode of picture to be edited is scaling and scaling, while uses shearing key-value pair Key and the key of scaling key-value pair can complete shearing set in advance and zoom operations to picture.
It is it should be further stated that complete to picture using the key of shearing key-value pair and the key of scaling key-value pair at the same time In the case of shearing and zoom operations, pipe can be used to realize the key's of the shearing key-value pair and key of scaling key-value pair Use simultaneously.
Wherein, pipe is |, it is the multiple key of link that it, which is acted on, and successional processing is carried out to a pictures.
By the above embodiment of the present invention, only need to simply, efficiently be divided by a configuration file can according to basis Picture editor's parameter after solution enters edlin to picture, when needing to doing same treatment with batch of plurality of pictures, as long as repairing Change the I/O Address in the configuration file, input identical picture editor's parameter without being repeated several times, improve defeated Enter the accuracy of picture editor's parameter.
Modules provided in the present embodiment are identical with the application method that the corresponding step of embodiment of the method is provided, should Can also be identical with scene.It is noted, of course, that the scheme that above-mentioned module is related to can be not limited in above-described embodiment one Content and scene, and above-mentioned module may operate in terminal or mobile terminal, can pass through software or hardware is realized.
As can be seen from the above description, the present invention realizes following technique effect:
Using the embodiment of the present invention, the picture address of picture editing parameter and picture to be edited is configured by configuration file, Edlin is entered to picture according to picture editor's mode indicated by picture editor's parameter in configuration file, uses simple parameter Configuration replaces parameter complicated to be in the prior art manually entered, can simply and quickly editing picture, and need to only use one Configuration file can complete a variety of edit operations simultaneously.By the above embodiment of the present invention, need to carry out identical volume to a collection of The picture of volume operation inputs identical picture editor's parameter without being repeated several times, only need to easily change input when being handled OPADD can complete the processing to this batch of picture, can complete to need to carry out identical volume with a collection of using a configuration file Collect the editor of the mass picture of operation.By the embodiment of the present invention, solve processing in the prior art picture is cumbersome and ask Topic, improve the efficiency of processing picture operation.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (8)

  1. A kind of 1. edit methods of picture, it is characterised in that including:
    After picture editor is started, the configuration file of the picture editor of establishment is obtained, the configuration file is used to store key assignments It is right;
    Picture editing parameter is configured according to the configuration file;
    The picture to be edited is read from the picture address of picture to be edited;
    Obtain picture editor's mode of the picture to be edited indicated by picture editor's parameter;
    Picture editor, the picture after being edited are carried out to the picture to be edited using picture editor's mode;
    Wherein, the configuration file of the picture editor of the establishment includes:The property parameters of picture editor's parameter and the category The default value of property parameter;
    Wherein, configuring picture editing parameter according to the configuration file includes:
    Picture editor's parameter is inputted in the configuration file according to preset format,
    Wherein, picture editor's parameter includes shear parameters and/or zooming parameter, and the shear parameters include shearing key assignments Right, the zooming parameter includes scaling key-value pair, according to the key of shearing key-value pair prefix and the scaling key-value pair Key prefix determines the edit mode of the picture to be edited.
  2. 2. edit methods according to claim 1, it is characterised in that picture editor's parameter is the zooming parameter, Wherein, picture editor's parameter is inputted in the configuration file according to preset format includes:
    First key-value pair of the zooming parameter is set in the configuration file, wherein, first key-value pair is the contracting The mapping of the property parameters of parameter and the value of the property parameters is put, first key-value pair includes:Zoom width, scaling height And the key-value pair of the form of the picture after the editor.
  3. 3. edit methods according to claim 1, it is characterised in that picture editor's parameter is the shear parameters, Wherein, picture editor's parameter is inputted in the configuration file according to preset format includes:
    Second key-value pair of the shear parameters is set in the configuration file, wherein, second key-value pair is cut to be described The mapping of the property parameters of parameter and the value of the property parameters is cut, second key-value pair includes:Shear coordinate, shearing width The key-value pair of the form of picture after degree, shear height and the editor.
  4. 4. edit methods according to claim 1, it is characterised in that obtain described indicated by picture editor's parameter Picture editor's mode of picture to be edited includes:
    Decompose picture editor's parameter in the configuration file;
    If it is the shear parameters to decompose obtained picture editor's parameter, it is determined that picture editor's mode of the picture to be edited For shearing;
    If it is the zooming parameter to decompose obtained picture editor's parameter, it is determined that picture editor's mode of the picture to be edited For scaling;
    If it is the zooming parameter and the shear parameters to decompose obtained picture editor's parameter, it is determined that the picture to be edited Picture editor's mode for scaling and scaling.
  5. A kind of 5. editing device of picture, it is characterised in that including:
    First acquisition module, for after picture editor is started, obtaining the configuration file of the picture editor of establishment, the configuration File is used to store key-value pair;
    Configuration module, for configuring picture editing parameter according to the configuration file;
    Read module, for reading the picture to be edited from the picture address of picture to be edited;
    Second acquisition module, for obtaining the picture editor side of the picture to be edited indicated by picture editor's parameter Formula;
    Editor module, for carrying out picture editor to the picture to be edited using picture editor's mode, after obtaining editor Picture;
    Wherein, the configuration file of the picture editor of the establishment includes:The property parameters of picture editor's parameter and the category The default value of property parameter;
    Wherein, the configuration module includes:
    Input module, for picture editor's parameter to be inputted in the configuration file according to preset format,
    Wherein, picture editor's parameter includes shear parameters and/or zooming parameter, and the shear parameters include shearing key assignments Right, the zooming parameter includes scaling key-value pair, according to the key of shearing key-value pair prefix and the scaling key-value pair Key prefix determines the edit mode of the picture to be edited.
  6. 6. editing device according to claim 5, it is characterised in that picture editor's parameter is the zooming parameter, Wherein, the configuration module includes:
    First setup module, for setting the first key-value pair of the zooming parameter in the configuration file, wherein, described One key-value pair includes for the property parameters and the mapping of the value of the property parameters, first key-value pair of the zooming parameter: The key-value pair of the form of picture after zoom width, scaling height and the editor.
  7. 7. editing device according to claim 5, it is characterised in that picture editor's parameter is the shear parameters, Wherein, the configuration module includes:
    Second setup module, for setting the second key-value pair of the shear parameters in the configuration file, wherein, described Two key-value pairs include for the property parameters and the mapping of the value of the property parameters, second key-value pair of the shear parameters: Shear the key-value pair of the form of the picture after coordinate, shearing width, shear height and the editor.
  8. 8. editing device according to claim 5, it is characterised in that second acquisition module includes:
    Decomposing module, for decomposing picture editor's parameter in the configuration file;
    First determining module, in the case that picture editor's parameter for being obtained in decomposition is the shear parameters, it is determined that described Picture editor's mode of picture to be edited is shearing;
    Second determining module, in the case that picture editor's parameter for being obtained in decomposition is the zooming parameter, it is determined that described Picture editor's mode of picture to be edited is scaling;
    3rd determining module, for decomposing obtained picture editor's parameter as the zooming parameter and the feelings of the shear parameters Under condition, the picture editor's mode for determining the picture to be edited is scaling and scaling.
CN201410602766.7A 2014-10-31 2014-10-31 The edit methods and editing device of picture Active CN104317502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410602766.7A CN104317502B (en) 2014-10-31 2014-10-31 The edit methods and editing device of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410602766.7A CN104317502B (en) 2014-10-31 2014-10-31 The edit methods and editing device of picture

Publications (2)

Publication Number Publication Date
CN104317502A CN104317502A (en) 2015-01-28
CN104317502B true CN104317502B (en) 2018-03-09

Family

ID=52372738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410602766.7A Active CN104317502B (en) 2014-10-31 2014-10-31 The edit methods and editing device of picture

Country Status (1)

Country Link
CN (1) CN104317502B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096363A (en) * 2015-06-30 2015-11-25 北京金山安全软件有限公司 Picture editing method and picture editing device
CN105787871A (en) * 2016-03-24 2016-07-20 广州酷狗计算机科技有限公司 Method and device for synthesizing pictures
CN105915789B (en) * 2016-04-29 2019-10-29 努比亚技术有限公司 A kind of method and apparatus recordable picture production and make picture
CN106371702A (en) * 2016-09-07 2017-02-01 北京金山软件有限公司 Image information editing method and device and mobile terminal
CN107273541A (en) * 2017-07-05 2017-10-20 武汉斗鱼网络科技有限公司 Network picture display method, device and electric terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156953A (en) * 2011-03-17 2011-08-17 深圳市五巨科技有限公司 Method and device for realizing batch processing of images
CN102419705A (en) * 2011-09-30 2012-04-18 广州杰赛科技股份有限公司 Method and device for generating and managing Web geographic information system (GIS) client control
CN102508851A (en) * 2011-09-27 2012-06-20 深圳市五巨科技有限公司 Image upload processing method and image upload processing system
CN103150745A (en) * 2011-12-06 2013-06-12 腾讯科技(深圳)有限公司 Method and device capable of editing a picture on line
CN103390023A (en) * 2013-06-17 2013-11-13 携程计算机技术(上海)有限公司 Image processing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8274523B2 (en) * 2009-07-30 2012-09-25 Eastman Kodak Company Processing digital templates for image display

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156953A (en) * 2011-03-17 2011-08-17 深圳市五巨科技有限公司 Method and device for realizing batch processing of images
CN102508851A (en) * 2011-09-27 2012-06-20 深圳市五巨科技有限公司 Image upload processing method and image upload processing system
CN102419705A (en) * 2011-09-30 2012-04-18 广州杰赛科技股份有限公司 Method and device for generating and managing Web geographic information system (GIS) client control
CN103150745A (en) * 2011-12-06 2013-06-12 腾讯科技(深圳)有限公司 Method and device capable of editing a picture on line
CN103390023A (en) * 2013-06-17 2013-11-13 携程计算机技术(上海)有限公司 Image processing method and system

Also Published As

Publication number Publication date
CN104317502A (en) 2015-01-28

Similar Documents

Publication Publication Date Title
CN104317502B (en) The edit methods and editing device of picture
CN110399420B (en) Export method, electronic equipment and medium of configurable Excel format
CN104281995B (en) The method and apparatus that picture adds watermark
CN110309113B (en) Log analysis method, system and equipment
CN110321119A (en) The generation method of data processing module, server and client side
CN107844093A (en) A kind of custom feature block and configuration method for packing based on component models
CN104536997A (en) Method and device for data batch processing of client interface
US8271867B2 (en) Program for displaying and operating table
CN106156189A (en) A kind of label generating method and device, information getting method and device
CN102043586A (en) Method and device for displaying background color in electronic form
CN104657668A (en) Terminal
CN107330399A (en) Chinese character separating method, device, computer-readable storage medium and electronic equipment
JP2004302678A (en) Database search path display method
CN110532559A (en) The processing method and processing device of rule
CN106815019B (en) WEB interface integration method and device of Hadoop distributed algorithm
CN111885298B (en) Image processing method and device
CN104216626B (en) A kind of image acquiring method and electronic equipment
CN103135891A (en) Method and device for processing user interface
CN114003329A (en) Data display component creating method and device, storage medium and electronic device
CN112328149B (en) Picture format setting method and device and electronic equipment
CN104461054B (en) A kind of input unit and method of restricted character string length
CN111026310B (en) Transaction menu generation method and device
CN112802157A (en) Picture editing method and device, electronic equipment and storage medium
CN112288835A (en) Image text extraction method and device and electronic equipment
JP7069766B2 (en) Information processing equipment and information processing programs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100094, C, building 301, building 18, North Taiping Road, Beijing, Haidian District

Applicant after: DATANG NETWORK CO.,LTD.

Address before: 100094 Yongjia North Road, Beijing, No. 6, No.

Applicant before: BEIJING XINHUA RUIDE TECHNOLOGY CO.,LTD.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100094 Beijing city Haidian District Taiping Road 18 city building C 301

Patentee after: Guoxing Network Co.,Ltd.

Address before: 100094 Beijing city Haidian District Taiping Road 18 city building C 301

Patentee before: DATANG NETWORK CO.,LTD.