CN106354381B - Image file processing method and device - Google Patents

Image file processing method and device Download PDF

Info

Publication number
CN106354381B
CN106354381B CN201510433758.9A CN201510433758A CN106354381B CN 106354381 B CN106354381 B CN 106354381B CN 201510433758 A CN201510433758 A CN 201510433758A CN 106354381 B CN106354381 B CN 106354381B
Authority
CN
China
Prior art keywords
area
image file
according
user
module
Prior art date
Application number
CN201510433758.9A
Other languages
Chinese (zh)
Other versions
CN106354381A (en
Inventor
吴福城
李科慧
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to CN201510433758.9A priority Critical patent/CN106354381B/en
Publication of CN106354381A publication Critical patent/CN106354381A/en
Application granted granted Critical
Publication of CN106354381B publication Critical patent/CN106354381B/en

Links

Abstract

The application discloses a method and a device for processing an image file. The method comprises the following steps: loading a first image file to be processed through a preset template, wherein the preset template comprises a first area; responding to user operation, and selecting a frame of a first area where a first image file is located; detecting a moving operation executed by a user on a frame of a first area; and when the movement operation is detected, adjusting the size of the first area in the preset template according to the movement direction and the movement distance of the movement operation. By using the technical scheme, the size of the image file display area can be flexibly changed, and the utilization rate of the image file processing equipment is improved.

Description

Image file processing method and device

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for processing an image file.

Background

With the popularization of image acquisition equipment, a user can acquire various image files anytime and anywhere, and can combine a plurality of pictures shot by the user in a jigsaw puzzle mode to share the pictures on a social network for display.

In the existing jigsaw method, a user can zoom in or out on a picture in a display area of the picture, but a plurality of display areas in a jigsaw template are fixed, and the size of the display areas cannot be changed by the user. If different display areas are used, the current jigsaw template needs to be quitted and reselected from the existing jigsaw templates. Therefore, the existing method can not provide personalized jigsaw template design, the jigsaw experience of the user is reduced, and the resource utilization rate of the image processing equipment is not high.

Disclosure of Invention

In view of this, the present invention provides a method and an apparatus for processing an image file, which can flexibly change the size of the image file display area and improve the utilization rate of image file processing equipment.

The technical scheme of the invention is realized as follows:

the invention provides a processing method of an image file, which loads a first image file to be processed through a preset template, wherein the preset template comprises a first area; responding to user operation, and selecting a frame of a first area where a first image file is located; detecting a moving operation executed by a user on a frame of a first area; and when the movement operation is detected, adjusting the size of the first area in the preset template according to the movement direction and the movement distance of the movement operation.

The invention also provides a processing device of the image file, which comprises: the loading module is used for loading a first image file to be processed through a preset template, and the preset template comprises a first area; the selecting module is used for responding to user operation and selecting a frame of a first area where the first image file loaded by the loading module is located; the detection module is used for detecting the moving operation executed by the user on the frame of the first area selected by the selection module; and the adjusting module is used for adjusting the size of the first area in the preset template according to the moving direction and the moving distance of the moving operation when the detecting module detects the moving operation.

Compared with the prior art, the image file processing method provided by the invention can provide the individually designed jigsaw template, is convenient for flexible operation of a user, and simultaneously improves the resource utilization rate of the image processing equipment.

Drawings

FIG. 1 is a flowchart illustrating a method for processing an image file according to an embodiment of the present invention;

FIG. 2A is a schematic diagram of an interface for selecting a frame according to an embodiment of the invention;

FIG. 2B is a schematic diagram of an interface for adjusting the size of the first region according to an embodiment of the invention;

FIG. 2C is a schematic view of an interface for adjusting the size of the first region according to another embodiment of the invention;

FIG. 3 is a flowchart illustrating a method for processing an image file according to another embodiment of the present invention;

FIG. 4 is a schematic view of an interface for adjusting the size of the second region according to an embodiment of the invention;

FIG. 5 is a schematic view of an interface for adjusting the size of a second region according to another embodiment of the present invention;

FIG. 6 is a flowchart illustrating a method for processing an image file according to another embodiment of the present invention;

FIG. 7 is a diagram illustrating an interface for exchanging image files according to an embodiment of the present invention;

FIG. 8 is a diagram illustrating an interface for processing an image file according to an embodiment of the present invention;

FIG. 9 is a block diagram of an apparatus for processing image files according to an embodiment of the present invention;

FIG. 10 is a block diagram of an apparatus for processing image files according to another embodiment of the present invention;

FIG. 11 is a block diagram of an image file processing apparatus according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

FIG. 1 is a flowchart illustrating a method for processing an image file according to an embodiment of the invention. Referring to fig. 1, the method includes:

step 101, loading a first image file to be processed through a preset template.

The preset template comprises a first area, and the loaded first image file is displayed in the first area.

Step 102, responding to user operation, and selecting a frame of a first area where the first image file is located.

In this step, the operation of the user is received, the step of selecting the border of the first area includes that the user presses the border of the first area for a long time, and the user clicks the border of the first area or double clicks the border of the first area. When the user selects the border, the border may be highlighted, for example, by changing the color of the border, the line type or thickness of the border lines, and the like.

FIG. 2A is a schematic diagram of an interface for selecting a frame according to an embodiment of the invention. As shown in FIG. 2A, the jigsaw template 200 includes a first area 220 for displaying the first image file, the border of the first area 220 is 210, and when the finger 230 of the user clicks the border 210, the line of the border is thickened to be highlighted, which indicates that the border 210 will be subsequently operated.

And 103, detecting the moving operation of the user on the frame of the first area.

In this step, the moving operation includes that the user uses a single finger to move one side or one corner of the frame, or the user uses two fingers to select two sides of the frame and then moves the two sides inwards or outwards. While the moving operation is detected, coordinate values of a touch point when the user's finger touches the screen may be recorded, for example, expressed by (x, y) in a two-dimensional rectangular coordinate system.

Fig. 2B is a schematic interface diagram illustrating adjustment of the size of the first region according to an embodiment of the invention. As shown in fig. 2B, the two fingers 240 and 250 of the user move outward while pressing the frame 210, and when the two fingers move, the coordinates of two touch points when the fingers 240 and 250 press the frame 210 are recorded and recorded as (x), respectively1,y1) And (x)2,y2)。

And 104, when the moving operation is detected, adjusting the size of the first area in a preset template according to the moving direction and the moving distance of the moving operation.

In this step, the manner of adjusting the first region may be determined according to the moving direction, the adjustment ratio may be determined according to the moving distance, and the size of the first region may be adjusted according to the ratio. The size and position of the border of the first area are adjusted at the same time as the first area is adjusted.

Specifically, when the user's finger moves inward, the first area may be reduced in size; the size of the first area may be enlarged when the user's finger is moved outward. The moving distance may be defined as a distance between two fingers or a distance between a single finger with respect to a reference point, and then a ratio of the moving distances at two times before and after the movement is used as a proportional value for enlarging or reducing the first area. Wherein the zooming in or out may change the initial aspect ratio of the first region.

As shown in fig. 2B, the outward movement of the user's finger is detected, and it is determined that the first area 220 is to be enlarged; coordinate value (x) of two fingers1,y1) And (x)2,y2) Calculating a moving distance ofThe ratio of the first region 220 to be enlarged is calculated based on the ratio of the two distances between the finger and the finger. After the finger movement is over, the first area is adjusted to 260, whose border is identified by the dashed line 270, wherein the center point of the first area 220 remains unchanged.

In an embodiment, a user first performs editing processing on a first image file displayed in a first area, and then adjusts the first area in a preset template according to the processed first image file.

Specifically, before adjusting the first region, the user may enlarge, reduce, or rotate the first image file, and then based on the displayed content of the enlarged, reduced, or rotated first image file, the user adjusts the size or position of the first region according to the desired displayed image effect, for example, enlarges, reduces, or rotates the first region.

Fig. 2C is a schematic interface diagram illustrating adjustment of the size of the first region according to another embodiment of the invention. As shown in fig. 2C, when the user zooms in 280 the first image file displayed in the first area 220 to be displayed in a gray area, the user may zoom in the first area based on the display effect of the zoomed-in first image file in the frame 210 at this time, and the frame of the zoomed-in first area is changed from 210 to the frame 290 identified by a dotted line.

In one embodiment, if the user enlarges the first area, the border of the enlarged first area does not exceed the size of the processed first image file, so that no blank area exists when the first image file is displayed in the first area, that is, the border of the first area is always located within the boundary of the first image file.

In this case, whether or not the frame of the enlarged first region exceeds the boundary of the processed first image file may be compared in the horizontal direction and the vertical direction. If the width of the frame of the adjusted first area is judged to be larger than the width of the processed first image file, based on the abscissa of the central point between the two fingers, transversely reducing the first area according to the ratio of the width of the processed first image file to the width of the adjusted frame; and if the length of the frame of the adjusted first area is judged to be larger than the length of the processed first image file, longitudinally reducing the first area according to the ratio of the length of the processed first image file to the length of the adjusted frame based on the vertical coordinate of the central point between the two fingers.

In addition, in order to ensure that the first area is always positioned in the preset template, whether the frame of the enlarged first area exceeds the size of the preset template can be respectively compared from the transverse direction and the longitudinal direction.

In another embodiment, if the user reduces the first area, and the frame of the reduced first area does not exceed the size of the processed first image file, so that no blank area exists when the first image file is displayed in the first area, whether the frame of the reduced first area does not exceed the boundary of the processed first image file may be compared from the horizontal direction and the vertical direction, respectively.

In addition, in order to ensure the minimum image display effect, the frame of the reduced first region is not smaller than the preset minimum size, and the frame of the reduced first region may be compared from the horizontal direction and the vertical direction to be not smaller than the preset minimum size. For example, the minimum size is 50 pixels by 50 pixels.

According to the embodiment of the invention, a first image file to be processed is loaded through a preset template; responding to user operation, and selecting a frame of a first area where a first image file is located; detecting a moving operation executed by a user on a frame of a first area; when the moving operation is detected, the size of the first area is adjusted in the preset template according to the moving direction and the moving distance of the moving operation, the size of the image file display area can be flexibly changed, a user does not need to quit the current template to select other templates again, the needed jigsaw template is designed in a personalized mode, the flexible operation of the user is facilitated, and meanwhile the resource utilization rate of the image processing equipment is improved.

FIG. 3 is a flowchart illustrating a method for processing an image file according to another embodiment of the invention. Referring to fig. 3, the method includes:

step 301, loading a first image file and at least one second image file to be processed through a preset template.

The preset template comprises a plurality of areas for displaying the image files, wherein each image file corresponds to one area and comprises a first area where the first image file is located and a second area where at least one second image file is located. By receiving an operation of a user, a corresponding image file is loaded in each area.

Step 302, in response to a user operation, selecting a border of a first area where the first image file is located.

Step 303, detecting a moving operation performed by the user on the border of the first area.

And 304, when the moving operation is detected, adjusting the size of the first area in a preset template according to the moving direction and the moving distance of the moving operation.

For the steps 302, 303, and 304, reference may be made to the descriptions of the steps 102, 103, and 104, which are not described herein again.

And 305, adjusting the second area of each second image file according to the adjusted position of the frame of the first area and a preset rule.

In an embodiment, the border of the first area and the border of any one of the second areas are not overlapped, the remaining space in the preset template is determined according to the adjusted position of the border of the first area, and then the size or the position of the second area is adjusted according to the size of the remaining space.

Specifically, if the preset rule is to ensure that the border of the adjusted first area and the border of the adjusted second area are still not overlapped, if the border of the first area is enlarged before, the second area is reduced or moved according to the size of the remaining space; if the frame of the first area is reduced, the frame of the second area is enlarged or kept unchanged according to the size of the residual space.

FIG. 4 is a schematic view of an interface for adjusting the size of the second region according to an embodiment of the invention. As shown in fig. 4, a first image file and a second image file are loaded in a preset template 400, where the frame of the first area is 410, and the frame of the second area is 430, and the first area and the second area are not overlapped. Upon detecting the user moving the bezel 410 outward with a single finger, the first area is enlarged and the bezel changes to 420 as shown in dashed lines. Then, in the remaining space of the template 400 except for the first area, the center point of the second area is kept unchanged, the second area is reduced, and the border is changed from 430 to 440. So adjusted that the first area and the second area still do not overlap.

Of course, the position of the frame 430 can be moved in the remaining space without any intersection with the frame 420, thereby ensuring that the first area and the second area still do not overlap. This operation is not shown in fig. 4.

In addition, a preset rule may be set to overlap between the adjusted border of the first region and the adjusted border of the second region, so that the second region may be reduced according to the size of the remaining space and a predetermined overlap area, or the border of the second region may be maintained unchanged. Still taking fig. 4 as an example, the frame of the second region is reduced from 430 to 450, so that the frame 420 of the adjusted first region and the frame 450 of the second region are partially crossed, that is, the overlapping area between the first region included in the frame 420 and the second region included in the frame 450 is smaller, or the frame 430 of the second region may be maintained unchanged, so that the overlapping area between the first region included in the frame 420 and the second region included in the frame 430 is larger.

In a specific implementation, a list of preset rules may be provided to the user, and one of the preset rules may be selected by the user to adjust the size or position of the second region.

In another embodiment, the border of the first region overlaps with the border of any one of the second regions, and the area of the overlap between the adjusted first region and the adjusted second region is obtained. The area of overlap may be positive or negative. When the overlapping area is a negative value, it indicates that the adjusted first region and the second region do not overlap each other. The preset rule may include: if the overlapped area is larger than the first preset area, the second area is reduced according to the size of the residual space. Or, if the overlapped area is smaller than a second predetermined area, the second area is enlarged according to the size of the remaining space.

In a specific implementation, the first predetermined area or the second predetermined area may be set as a part of the area of the second region. For example, the first predetermined area is 50% of the area of the second region, and if the overlapped area is larger than 50% of the area of the second region, the second region may be reduced, and the overlapped area may be reduced, so as to ensure the basic display effect of the two image files. For example, the second predetermined area is 10% of the area of the second region, and if the overlapped area is less than 10% of the area of the second region, the second region is enlarged such that the overlapped area of the enlarged second region and the first region is increased. When the overlapping area can be changed from a negative value to a positive value by enlarging the second region, the first region and the second region are changed from non-overlapping to overlapping.

FIG. 5 is a schematic view of an interface for adjusting the size of the second region according to another embodiment of the invention. As shown in fig. 5, a first image file and a second image file are loaded in a preset template 500, where a frame of the first area is 510 and a frame of the second area is 530, and the first and second image files overlap with each other. After receiving the operation of the user and reducing the first region to the frame 520, the first region and the second region included in the frame 530 do not overlap any more, and the overlapping area is a negative value. After the second area is enlarged to the frame 540, the first area included in the frame 520 and the second area included in the frame 540 are overlapped again, so that the original style of the jigsaw template is maintained.

According to the embodiment of the invention, the first image file and the at least one second image file to be processed are loaded through the preset template, and the second area of the at least one second image file is adjusted according to the position of the border of the adjusted first area and the preset rule, so that the sizes of a plurality of areas can be flexibly changed on the current template, the self-adaptive adjustment of the area border in the jigsaw template is realized, and a personalized jigsaw design scheme is provided.

FIG. 6 is a flowchart illustrating a method for processing an image file according to another embodiment of the present invention. As shown in fig. 6, the method includes:

step 601, loading a first image file and at least one second image file to be processed through a preset template.

Step 602, responding to the user operation, selecting a border of a first area where the first image file is located.

Step 603, detecting a moving operation performed by the user on the border of the first area.

And step 604, when the moving operation is detected, adjusting the size of the first area in a preset template according to the moving direction and the moving distance of the moving operation.

And 605, adjusting the second area in which the at least one second image file is respectively located according to the adjusted position of the frame of the first area and a preset rule.

In steps 601 to 605, reference may be made to the descriptions of steps 301 to 305, which are not described herein again.

Step 606, in response to a user operation, selecting a first image file.

Step 607, judging whether the duration time of the selected first image file exceeds a first preset time; if yes, go to step 608-610; otherwise, steps 611 to 613 are performed.

Step 608, detecting a moving operation performed by the user on the first image file.

In one embodiment, upon detecting the moving operation, a thumbnail of the first image file is output at the touch position, so that the user can intuitively feel that the image file is being moved.

And step 609, acquiring the touch position of the user when the moving operation is detected.

And 610, when the touch position enters the second area and the moving operation is finished, displaying the first image file in the second area and displaying the second image file in the first area.

In one embodiment, when the acquired touch position is detected to be located in the second area, the frame of the second area is highlighted, for example, the color of the frame, the line type or thickness of the frame line, and the like are changed to prompt that the user has moved to be within the range of the second area. In a specific implementation, the touch position is represented by coordinates (x, y), the coordinates are compared with the position of the frame of the second area, and when the touch position enters the range of the abscissa and the range of the ordinate of the frame, the touch position is determined to be located in the second area.

When the user lifts the finger to indicate that the moving operation is finished, the first image file and the second image file are exchanged at the moment and can be represented in the form of animation, then the jigsaw template at the moment is updated, the first image file is displayed in the second area, and the second image file is displayed in the first area.

FIG. 7 is a diagram illustrating an interface for exchanging image files according to an embodiment of the invention. As shown in fig. 7, after the user's finger 730 presses the first image file 710 for a long time, the image file is moved, and the moved first image file is represented as 710'. When the touch position 730 of the finger is located in the second area, the frame 720 is displayed in a bold manner, and when the user finishes moving the finger, the image files in the two areas are exchanged.

In other embodiments, the second image file may be moved to the first area, and then the two image files are interchanged.

Step 611, output processing options.

And if the selected duration time of the first image file does not exceed the first preset time, displaying a processing option on an interface of the jigsaw template. Wherein, the processing options can comprise any item or any combination of items of changing image files, rotating image files, turning image files and changing the color tones of the image files.

FIG. 8 is a diagram illustrating an interface for processing an image file according to an embodiment of the invention. As shown in fig. 8, when the user selects the first image file with his finger, a processing option prompt bar 830 is output in the first area 810, which includes a replacement mark 831, a rotation mark 832, a flip mark 833, and a tone mark 834 for changing the image file.

Step 612, in response to the user operation, determines a selected one of the processing options.

Step 613, editing the first image file according to the selected processing option.

As shown in fig. 8, when the user clicks the replacement mark 831, an image file is newly selected as a first image file, and the previous image file is replaced in the first area; when the user clicks the rotation indicator 832, the first image file is rotated by multiple angles, for example, by 90 degrees in a clockwise direction; after the user clicks the flip mark 833, the first image file is flipped to the left or to the right; after the user clicks the tone mark 834 of the changed image file, a special effect list column may be further displayed, for example, the special effect list column is superimposed on the preset template in a floating layer manner, image files with different tones are listed in the special effect list column for the user to select, and after the user clicks one of the special effects, a special effect filter is operated on the first image file to generate a new image file to replace the previous first image file.

Further, the location of the output processing option may be within the first region, or may also be partially within the first region. When the user selects the second image file, a processing option is also output, as shown in FIG. 8, for each image file 810 and 820 to perform the editing processing operation individually.

In this embodiment, in response to a user operation, a first image file is selected, whether the duration of the selected first image file exceeds a first predetermined time is determined, if yes, a moving operation performed on the first image file by the user is detected, when the moving operation is detected, a touch position of the user is obtained, when the touch position enters a second area and the moving operation is finished, the first image file is displayed in the second area, and a second image file is displayed in the first area; otherwise, outputting the processing options, responding to the user operation, determining one processing option selected from the processing options, and editing and processing the first image file according to the selected processing option, so that the user can flexibly exchange the image files in the current jigsaw template, and can independently edit and process each image file, thereby avoiding the jigsaw operation after all the image files are processed in advance before the jigsaw, greatly simplifying the operation process, and improving the efficiency of jigsaw design.

Fig. 9 is a schematic structural diagram of an apparatus 900 for processing an image file according to an embodiment of the present invention, which includes a loading module 910, a selecting module 920, a detecting module 930, and an adjusting module 940. Wherein the content of the first and second substances,

a loading module 910, configured to load a first image file to be processed through a preset template, where the preset template includes a first area;

a selecting module 920, configured to select, in response to a user operation, a border of a first area where the first image file loaded by the loading module 910 is located;

a detecting module 930, configured to detect a moving operation performed by the user on the border of the first area selected by the selecting module 920; and a process for the preparation of a coating,

an adjusting module 940, configured to, when the detecting module 930 detects the moving operation, adjust the size of the first area in the preset template according to the moving direction and the moving distance of the moving operation.

In one embodiment, the default template further comprises at least one second region; the loading module 910 is further configured to load at least one second image file to be processed through a preset template when the first image file is loaded through the preset template; the adjusting module 940 is further configured to, after the size of the first area is adjusted in the preset template, adjust the second area where the at least one second image file loaded by the loading module 910 is located according to the position of the border of the adjusted first area and the preset rule.

In one embodiment, there is no overlap between the first region and any of the second regions; an adjusting module 940, configured to determine a remaining space in the preset template according to the adjusted position of the border of the first region; if the first area is enlarged before, reducing the second area according to the size of the residual space; if the first area was previously reduced, the second area is enlarged according to the size of the remaining space.

In one embodiment, the first region and any of the second regions overlap; an adjusting module 940, configured to obtain an area of overlap between the adjusted first region and the second region; if the overlapped area is larger than the first preset area, reducing the second area according to the size of the residual space; and if the overlapped area is smaller than a second preset area, enlarging the second area according to the size of the residual space.

FIG. 10 is a block diagram of an apparatus 1000 for processing image files according to another embodiment of the present invention. The image file processing apparatus 1000 is the apparatus 900 shown in fig. 9, and further includes:

a first processing module 950, configured to, in response to a user operation, perform editing processing on the first image file loaded by the loading module 910;

accordingly, the adjusting module 940 is further configured to adjust the first area in the preset template according to the first image file processed by the first processing module 950.

In an embodiment, the selecting module 920 is further configured to select the first image file in response to a user operation; a detecting module 930, configured to detect a moving operation performed on the first image file by the user when the duration of the first image file selected by the selecting module 920 exceeds a first predetermined time;

accordingly, the apparatus 1000 further comprises:

an obtaining module 960, configured to obtain a touch position of the user when the moving operation is detected by the detecting module 930;

the exchanging module 970 is configured to display the first image file in the second area and display the second image file in the first area when the touch position obtained by the obtaining module 960 enters the second area and the moving operation detected by the detecting module 930 is ended.

In an embodiment, when the duration of the selection of the first image file by the middle module 920 does not exceed the first predetermined time, the apparatus 1000 further includes:

an output module 980 for outputting processing options;

a determination module 990 for determining a selected one of the processing options output from the output module 980 in response to a user operation;

the second processing module 1010 is configured to perform editing processing on the first image file according to the processing option determined by the determining module 990.

FIG. 11 is a block diagram of an image file processing apparatus 1100 according to an embodiment of the present invention. The server 1100 may include: a processor 1110, a memory 1120, a port 1130, and a bus 1140. The processor 1110 and the memory 1120 are interconnected by a bus 1140. Processor 1110 can receive and transmit data via port 1130. Wherein the content of the first and second substances,

the processor 1110 is configured to execute modules of machine-readable instructions stored by the memory 1120.

Memory 1120 stores modules of machine-readable instructions executable by processor 1110. The modules of instructions executable by processor 1110 include: a loading module 1121, a selecting module 1122, a detecting module 1123, and an adjusting module 1124. Wherein the content of the first and second substances,

the loading module 1121, when executed by the processor 1110, may be: loading a first image file to be processed through a preset template, wherein the preset template comprises a first area;

selection module 1122, when executed by processor 1110, may be: in response to a user operation, selecting a frame of a first area where the first image file loaded by the loading module 1121 is located;

the detection module 1123, when executed by the processor 1110, may be: detecting a moving operation performed by a user on a border of the first area selected by the selecting module 1122;

the adjustment module 1124 when executed by the processor 1110 may be: when the detecting module 1123 detects the moving operation, the size of the first area is adjusted in the preset template according to the moving direction and the moving distance of the moving operation.

In one embodiment, the memory 1120 stores instruction modules executable by the processor 1110 that further include: a first processing module 1125.

The first processing module 1125, when executed by the processor 1110, may be: in response to a user operation, performing editing processing on the first image file loaded by the loading module 1121;

accordingly, the adjustment module 1124 when executed by the processor 1110 may be: the first region is adjusted in the preset template according to the first image file processed by the first processing module 1125.

In one embodiment, selection module 1122, when executed by processor 1110, may be: selecting a first image file in response to a user operation; the detection module 1123, when executed by the processor 1110, may be: when the duration of the selection of the first image file by the selection module 1122 exceeds a first predetermined time, detecting a moving operation performed on the first image file by the user;

the memory 1120 stores modules of instructions executable by the processor 1110 that further include:

the obtaining module 1126, when executed by the processor 1110, may be: when the detection module 1123 detects a moving operation, acquiring a touch position of a user;

the switching module 1127, when executed by the processor 1110, may be: when the touch position obtained by the obtaining module 1126 enters the second area and the moving operation detected by the detecting module 1123 ends, the first image file is displayed in the second area and the second image file is displayed in the first area.

In one embodiment, when the duration of time that the first image file is selected by the selection module 1122 does not exceed the first predetermined time, the memory 1120 stores modules of instructions executable by the processor 1110 that further include:

an output module 1128 for outputting processing options;

a determination module 1129, configured to determine, in response to a user operation, one processing option selected from the processing options output by the output module 1128;

a second processing module 1101, configured to perform editing processing on the first image file according to the processing option determined by the determining module 1129.

It can be seen that the instruction modules stored in the memory 1120, when executed by the processor 1110, can implement various functions of the loading module, the selecting module, the detecting module, the adjusting module, the first processing module, the obtaining module, the exchanging module, the outputting module, the determining module and the second processing module in the foregoing embodiments.

In the above device embodiment, the specific method for each module and unit to implement its own function is described in the method embodiment, and is not described herein again.

In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

In addition, each of the embodiments of the present invention can be realized by a data processing program executed by a data processing apparatus such as a computer. It is clear that the data processing program constitutes the invention. Further, the data processing program, which is generally stored in one storage medium, is executed by directly reading the program out of the storage medium or by installing or copying the program into a storage device (such as a hard disk and/or a memory) of the data processing device. Such a storage medium therefore also constitutes the present invention. The storage medium may use any type of recording means, such as a paper storage medium (e.g., paper tape, etc.), a magnetic storage medium (e.g., a flexible disk, a hard disk, a flash memory, etc.), an optical storage medium (e.g., a CD-ROM, etc.), a magneto-optical storage medium (e.g., an MO, etc.), and the like.

The invention therefore also discloses a storage medium in which a data processing program is stored which is designed to carry out any one of the embodiments of the method according to the invention described above.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. A method for processing an image file, comprising:
loading a first image file and at least one second image file to be processed through a preset template, wherein the preset template comprises a first area and at least one second area, the first image file is located in the first area, and the at least one second image file is respectively located in the second area;
in response to user operation, performing editing processing on the first image file displayed in the first area;
responding to the operation of a user according to the processed first image file, and selecting a frame of the first area; detecting a moving operation performed on a frame of the first area by a user; when the moving operation is detected, adjusting the size of the first area in the preset template according to the moving direction and the moving distance of the moving operation;
outputting a list of preset rules to a user in the current jigsaw template, and receiving the preset rules selected by the user from the list;
and adjusting the size or the position of each second area according to the adjusted position of the frame of the first area and the selected preset rule.
2. The method of claim 1, wherein the resizing the first region in the preset template comprises:
and enlarging or reducing the first area, and enabling no blank area to exist when the first image file is displayed in the adjusted first area.
3. The method according to claim 1, wherein the preset rule is that there is no overlap between the adjusted first region and any one of the adjusted second regions;
the adjusting the size of each second area comprises:
determining the residual space in the preset template according to the adjusted position of the frame of the first area;
if the first area is enlarged before, reducing the second area according to the size of the residual space;
and if the first area is reduced before, enlarging the second area according to the size of the residual space.
4. The method according to claim 1, wherein the preset rule is an overlap between the adjusted first region and any one of the adjusted second regions;
the adjusting the size of each second area comprises:
acquiring the overlapping area between the adjusted first region and the second region;
if the overlapped area is larger than the first preset area, reducing the second area according to the size of the residual space;
and if the overlapped area is smaller than a second preset area, enlarging the second area according to the size of the residual space.
5. The method of claim 1, wherein the resizing the first region in the preset template according to the moving direction and the moving distance of the moving operation comprises:
determining a mode for adjusting the first area according to the moving direction;
and determining an adjusted proportion according to the moving distance, and adjusting the size of the first area according to the proportion.
6. The method of claim 1, wherein the resizing the first region in the preset template according to the moving direction and the moving distance of the moving operation comprises:
if the editing processing of the first image file is amplification, the first area is amplified;
if the editing processing of the first image file is reduction, reducing the first area;
and if the editing processing of the first image file is rotation, rotating the first area.
7. The method of claim 1, further comprising:
when the duration time of the selected processed first image file exceeds a first preset time, detecting the moving operation executed by a user on the processed first image file;
when the moving operation is detected, acquiring a touch position of the user;
and when the touch position enters a second area and the moving operation is finished, displaying the processed first image file in the second area, and displaying a second image file corresponding to the second area in the adjusted first area.
8. The method of claim 7, further comprising:
when the moving operation is detected, outputting a thumbnail of the processed first image file at the touch position; and/or the presence of a gas in the gas,
and when the touch position is detected to be located in the second area, highlighting a frame of the second area.
9. The method of claim 6, wherein when magnifying the first region, the method further comprises:
whether the border of the enlarged first region exceeds the boundary of the processed first image file is compared in the horizontal direction and the vertical direction.
10. The method of claim 1, further comprising:
when the selected duration time of the processed first image file does not exceed a first preset time, outputting a processing option, wherein the processing option comprises any one item or any combination of several items in the image file replacement, the image file rotation, the image file turning and the image file color tone changing;
determining a selected one of the processing options in response to a user operation;
and editing the processed first image file according to the selected processing option.
11. An apparatus for processing an image file, comprising:
the device comprises a loading module, a processing module and a processing module, wherein the loading module is used for loading a first image file and at least one second image file to be processed through a preset template, the preset template comprises a first area and at least one second area, the first image file is located in the first area, and the at least one second image file is respectively located in the second area;
the selecting module is used for responding to user operation and editing the first image file displayed in the first area; responding to the operation of a user according to the processed first image file, and selecting a frame of the first area;
the detection module is used for detecting the moving operation executed by the user on the frame of the first area selected by the selection module; and a process for the preparation of a coating,
the adjusting module is used for adjusting the size of the first area in the preset template according to the moving direction and the moving distance of the moving operation when the detecting module detects the moving operation; and outputting a list of preset rules to a user in the current jigsaw template, receiving the preset rules selected by the user from the list, and adjusting the size or the position of each second area according to the adjusted position of the frame of the first area and the selected preset rules.
12. The apparatus of claim 11, wherein the means for adjusting is configured to enlarge or reduce the first area and cause no blank area to exist when the first image file is displayed in the adjusted first area.
13. The apparatus according to claim 12, wherein the preset rule is that there is no overlap between the adjusted first region and any one of the adjusted second regions;
the adjusting module is used for determining the residual space in the preset template according to the adjusted position of the frame of the first area; if the first area is enlarged before, reducing the second area according to the size of the residual space; and if the first area is reduced before, enlarging the second area according to the size of the residual space.
14. The apparatus according to claim 12, wherein the preset rule is an overlap between the adjusted first region and any one of the adjusted second regions;
the adjusting module is used for acquiring the overlapped area between the adjusted first area and the second area; if the overlapped area is larger than the first preset area, reducing the second area according to the size of the residual space; and if the overlapped area is smaller than a second preset area, enlarging the second area according to the size of the residual space.
15. The apparatus of claim 11, wherein the adjusting module is configured to determine a manner of adjusting the first area according to the moving direction; and determining an adjusted proportion according to the moving distance, and adjusting the size of the first area according to the proportion.
16. The apparatus according to claim 11, wherein the detecting module is further configured to detect a moving operation performed on the processed first image file by a user when the duration that the processed first image file is selected exceeds a first predetermined time;
the device further comprises:
the acquisition module is used for acquiring the touch position of the user when the detection module detects the moving operation;
and the exchange module is used for displaying the processed first image file in the second area and displaying the second image file corresponding to the second area in the adjusted first area when the touch position obtained by the obtaining module enters the second area and the moving operation detected by the detecting module is finished.
17. The apparatus of claim 16, wherein the detection module is further configured to output a thumbnail of the processed first image file at the touch location when the movement operation is detected; and/or highlighting a frame of the second area when the touch position is detected to be positioned in the second area.
18. A computer-readable storage medium having stored thereon computer-readable instructions for causing at least one processor to perform the method of any one of claims 1 to 10.
CN201510433758.9A 2015-07-22 2015-07-22 Image file processing method and device CN106354381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510433758.9A CN106354381B (en) 2015-07-22 2015-07-22 Image file processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510433758.9A CN106354381B (en) 2015-07-22 2015-07-22 Image file processing method and device

Publications (2)

Publication Number Publication Date
CN106354381A CN106354381A (en) 2017-01-25
CN106354381B true CN106354381B (en) 2019-12-20

Family

ID=57842890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510433758.9A CN106354381B (en) 2015-07-22 2015-07-22 Image file processing method and device

Country Status (1)

Country Link
CN (1) CN106354381B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530035A (en) * 2013-10-09 2014-01-22 深圳市中兴移动通信有限公司 Touch control terminal and area operating method of touch control terminal
CN103634650A (en) * 2013-11-06 2014-03-12 康佳集团股份有限公司 Intelligent television platform-based picture processing method and intelligent television platform-based picture processing system
CN103985084A (en) * 2014-05-06 2014-08-13 青岛海信电器股份有限公司 Image processing method and device
CN104239315A (en) * 2013-06-09 2014-12-24 北京三星通信技术研究有限公司 Picture correlation method
CN104637040A (en) * 2013-11-12 2015-05-20 携程计算机技术(上海)有限公司 Method and device utilizing Photoshop to realize picture splicing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239315A (en) * 2013-06-09 2014-12-24 北京三星通信技术研究有限公司 Picture correlation method
CN103530035A (en) * 2013-10-09 2014-01-22 深圳市中兴移动通信有限公司 Touch control terminal and area operating method of touch control terminal
CN103634650A (en) * 2013-11-06 2014-03-12 康佳集团股份有限公司 Intelligent television platform-based picture processing method and intelligent television platform-based picture processing system
CN104637040A (en) * 2013-11-12 2015-05-20 携程计算机技术(上海)有限公司 Method and device utilizing Photoshop to realize picture splicing
CN103985084A (en) * 2014-05-06 2014-08-13 青岛海信电器股份有限公司 Image processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
美图秀秀如何拼图(拼长图)及拼图的小技巧2;wangziokokok;《百度经验》;20150520;第2、6-7页 *

Also Published As

Publication number Publication date
CN106354381A (en) 2017-01-25

Similar Documents

Publication Publication Date Title
US9811349B2 (en) Displaying operations performed by multiple users
US8830184B2 (en) Image displaying device, image displaying method, and program for displaying images
CN105981368B (en) Picture composition and position guidance in an imaging device
JP5171968B2 (en) Accelerate rendering of web-based content
US9785327B1 (en) Interactive user interface
US7956869B1 (en) Proximity based transparency of windows aiding in obscured window selection
US9063563B1 (en) Gesture actions for interface elements
US8473860B2 (en) Multi-layer user interface with flexible parallel and orthogonal movement
CN100517316C (en) Image file list display device
WO2013175784A1 (en) Electronic camera, image display device, and image display program
JP6298522B2 (en) Application for viewing images
US20140354845A1 (en) Identifying Dominant and Non-Dominant Images in a Burst Mode Capture
US8917286B2 (en) Image processing device, information processing device, image processing method, and information processing method
US9600166B2 (en) Asynchronous handling of a user interface manipulation
US9699351B2 (en) Displaying image thumbnails in re-used screen real estate
US8823726B2 (en) Color balance
US8578292B2 (en) Simultaneous document zoom and centering adjustment
US20130169579A1 (en) User interactions
US9531947B2 (en) Gesture mapping for image filter input parameters
US9886931B2 (en) Multi operation slider
US8854324B2 (en) Information processing control device
WO2012128835A1 (en) Gesture-based configuration of image processing techniques
JP5986232B2 (en) User interface tool for image cropping and angle correction
US10282055B2 (en) Ordered processing of edits for a media editing application
KR101497172B1 (en) Altering the appearance of a digital image using a shape

Legal Events

Date Code Title Description
C06 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