WO2022134632A1 - 作品处理方法及装置 - Google Patents

作品处理方法及装置 Download PDF

Info

Publication number
WO2022134632A1
WO2022134632A1 PCT/CN2021/113713 CN2021113713W WO2022134632A1 WO 2022134632 A1 WO2022134632 A1 WO 2022134632A1 CN 2021113713 W CN2021113713 W CN 2021113713W WO 2022134632 A1 WO2022134632 A1 WO 2022134632A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
target
processed
aspect ratio
pictures
Prior art date
Application number
PCT/CN2021/113713
Other languages
English (en)
French (fr)
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 北京达佳互联信息技术有限公司
Publication of WO2022134632A1 publication Critical patent/WO2022134632A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a work processing method and device.
  • a work processing method comprising:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • the work When the work is to be published, obtain multiple pictures corresponding to the work to be published, determine the target stitching template matching the number and size of the pictures based on the number and size of the pictures, and then follow the instructions of the target stitching template. to splicing these multiple pictures, and use the spliced target picture as the preview picture of the work to be published, so as to publish the work, so that after the work is published, what other users see when browsing the work is the preview picture. , so that all the pictures in the work can be seen at one time, no manual operation by the user is required, the operation is simple, and the efficiency of human-computer interaction is improved.
  • a work processing device comprising:
  • an acquiring unit configured to acquire a plurality of pictures corresponding to the work in response to the release instruction of the work
  • a determining unit configured to determine a target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template is matched with the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • a splicing unit configured to splicing the multiple pictures according to the display position indicated by the target splicing template to obtain the target picture
  • the publishing unit is configured to use the target picture as a preview picture of the work, and publish the work.
  • an electronic device comprising:
  • memory for storing instructions executable by the processor
  • processor configured to execute the instructions to implement the following steps:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • a computer-readable storage medium when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can perform the following steps:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • a computer program product including a computer program, which implements the following steps when the computer program is executed by a processor:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • FIG. 1 is a schematic diagram of an implementation environment of a work processing method according to an exemplary embodiment
  • FIG. 2 is a flowchart of a work processing method according to an exemplary embodiment
  • FIG. 3 is a flowchart of a work processing method according to an exemplary embodiment
  • FIG. 4 is a schematic diagram of a splicing template according to an exemplary embodiment
  • FIG. 5 is a block diagram of a work processing apparatus according to an exemplary embodiment
  • FIG. 6 is a block diagram of an electronic device 600 according to an exemplary embodiment.
  • the user information involved in this disclosure is the information authorized by the user or fully authorized by all parties.
  • FIG. 1 is a schematic diagram of an implementation environment of a work processing method according to an exemplary embodiment.
  • the implementation environment includes an electronic device 101 and a server 102 .
  • the electronic device 101 is a smart phone, a smart watch, a laptop computer, an MP3 player (Moving Picture Experts Group Audio Layer III, a moving picture expert compression standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture expert compression standard) Audio layer 4) At least one of devices such as players and laptops.
  • the electronic device 101 is connected to the server 102 through wired or wireless communication, which is not limited in this embodiment of the present disclosure.
  • a plurality of pictures are stored in the electronic device 101, so that the user can select a picture to be displayed from the plurality of pictures.
  • the electronic device 101 takes the selected picture as a picture corresponding to the work to be published, and then sends the plurality of pictures to the server 102 .
  • the electronic device 101 generally refers to one of a plurality of electronic devices, and the embodiment of the present disclosure is only exemplified by the electronic device 101 .
  • the number of the above-mentioned terminals is more or less.
  • the above-mentioned electronic devices are only a few, or the above-mentioned electronic devices are dozens or hundreds, or more, the embodiments of the present disclosure do not limit the number and device types of the electronic devices.
  • the server 102 is at least one of a server, multiple servers, a cloud server, a cloud computing platform and a virtualization center.
  • the server 102 is connected to the electronic device 101 through wired or wireless communication, which is not limited in this embodiment of the present disclosure.
  • the server 102 receives multiple pictures sent by the electronic device 101, and then publishes the multiple pictures as a work, so that the electronic devices corresponding to other users can obtain the works corresponding to the multiple pictures, and then display the multiple pictures.
  • the number of the above servers is more or less, which is not limited in the embodiments of the present disclosure.
  • server 102 also includes other functional servers in order to provide more comprehensive and diverse services.
  • Fig. 2 is a flow chart of a work processing method according to an exemplary embodiment. Referring to Fig. 2, the method includes:
  • step S201 the electronic device acquires a plurality of pictures corresponding to the work in response to the release instruction for the work.
  • step S202 the electronic device determines a target splicing template based on the number of pictures and the size of the plurality of pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture.
  • step S203 the electronic device splices the multiple pictures according to the display position indicated by the target splicing template to obtain the target picture.
  • step S204 the electronic device uses the target picture as a preview picture of the work, and publishes the work.
  • splicing the multiple pictures to obtain the target picture includes:
  • the sorting information of the plurality of pictures determine the corresponding display positions of the plurality of pictures in the target splicing template
  • the multiple pictures are spliced to obtain the target picture.
  • determining the target splicing template includes:
  • determining the picture layout of each picture based on the aspect ratio of each picture includes:
  • the aspect ratio of the picture is greater than the aspect ratio threshold, determine the picture layout of the picture as a vertical version
  • the aspect ratio of the picture is equal to the aspect ratio threshold, determine the picture layout of the picture as a square version
  • the picture layout of the picture is determined to be landscape.
  • the method further includes:
  • the stitching template corresponding to the picture layout of the first picture is determined as the target stitching template, and the first picture
  • the display order indicated by the corresponding sorting information is the most advanced, and the sorting information is used to indicate the display order of the plurality of pictures.
  • the method further includes:
  • the size of the to-be-processed picture is adjusted according to the target aspect ratio corresponding to the target splicing template, and the to-be-processed picture is a picture whose size does not conform to the target aspect ratio.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • adjusting the size of the image to be processed includes:
  • the picture format of the picture to be processed is a vertical version, and the aspect ratio of the picture to be processed is greater than or equal to the first target aspect ratio, the width and height of the picture to be processed are proportionally scaled;
  • the picture to be processed is centered and cropped;
  • the width and height of the picture to be processed are proportionally scaled
  • the picture to be processed is horizontal and the aspect ratio of the picture to be processed is greater than the second target aspect ratio, the picture to be processed is centered and cropped.
  • the center cropping of the to-be-processed picture includes:
  • the to-be-processed picture is centered and cropped.
  • centering and cropping the picture to be processed includes:
  • the image to be processed is centered and cropped.
  • Fig. 3 is a flowchart of a work processing method according to an exemplary embodiment. Referring to Fig. 3, the method includes:
  • step S301 the electronic device acquires a plurality of pictures corresponding to the work in response to the release instruction for the work.
  • the electronic device obtains multiple pre-stored pictures, and displays the multiple pictures, and each picture corresponds to a corresponding check control, so that the user can trigger the corresponding Check the control to select from these multiple images, and the user triggers the publish control after the selection is complete.
  • the electronic device triggers a release instruction for the work in response to the user's triggering operation, so that the electronic device, in response to the release instruction, acquires multiple pictures selected by the user as multiple pictures corresponding to the work to be released.
  • step S302 the electronic device determines the picture layout of each picture based on the aspect ratio of each picture.
  • the aspect ratio of the picture is the ratio of the width and height of the picture.
  • the directions of width and height may be different in different usage scenarios.
  • the width of the picture is the side parallel to the upper and lower sides of the screen of the smartphone
  • the height of the picture is the two sides of the left and right sides of the screen of the smartphone.
  • the width of the picture is the side parallel to the left and right sides of the screen of the smartphone
  • the height of the picture is the upper and lower sides of the screen of the smartphone. parallel sides.
  • the width of the picture is the side parallel to the upper and lower sides of the screen of the desktop computer
  • the height of the picture is the side parallel to the left and right sides of the screen of the desktop computer.
  • the process of determining the picture layout includes: the electronic device determines the aspect ratio of the picture based on the size of the picture, and then compares the aspect ratio of the picture with an aspect ratio threshold to determine the picture layout of the picture .
  • the electronic device determines the picture layout of the picture as a vertical version; in the case that the aspect ratio of the picture is equal to the aspect ratio threshold, the electronic device determines the picture layout of the picture as a vertical version; The picture layout of the picture is determined as the square version; in the case that the aspect ratio of the picture is smaller than the aspect ratio threshold, the electronic device determines the picture layout of the picture as the horizontal version.
  • the aspect ratio threshold is 1.
  • both a and b are any positive values, which are not limited in the embodiments of the present disclosure.
  • the parameter height in the above process is a and the width is b is only an exemplary way of illustration. In some embodiments, other parameters can be used to represent the width and height of the picture, which is not limited by the embodiments of the present disclosure. .
  • step S303 the electronic device determines the picture layout with the largest number of corresponding pictures as the target picture layout.
  • step S304 the electronic device determines a target stitching template corresponding to the target picture layout and the number of pictures, and the target stitching template is used to determine the display position of the picture.
  • FIG. 4 is a schematic diagram of a splicing template according to an exemplary embodiment.
  • the splicing template shown in the first column in FIG. 4 is used, that is, the vertical splicing template;
  • the splicing template shown in the second column in Figure 4 is used, that is, the square version splicing template; in the case that the picture layouts of these multiple pictures are all horizontal versions, the third column in Figure 4 is used.
  • the splicing template shown is the horizontal splicing template.
  • the picture layout with the largest number of corresponding pictures is adopted, that is, in the case that the number of pictures corresponding to the vertical layout is more than the number of pictures corresponding to other picture layouts, also That is, when the number of pictures corresponding to the vertical version is the largest, the splicing template shown in the first column in Figure 4 is used, that is, the vertical splicing template; the number of pictures corresponding to the square version is more than that of other picture layouts.
  • the splicing template shown in the second column in Figure 4 is used, that is, the splicing template of the square version;
  • the splicing template shown in the third column in FIG. 4 is used, that is, the horizontal layout splicing template.
  • the picture layout of the picture is determined, so that the target stitching template is determined based on the picture layout with the largest number of corresponding pictures, so that the determined target stitching module is more in line with the picture layout and picture quantity of the multiple pictures, and then Improve the display effect.
  • the electronic device when the electronic device acquires the multiple pictures, acquires the sorting information of the multiple pictures, and the sorting information is also the order in which the multiple pictures are checked, and the sorting information is used to indicate The display order of the multiple pictures.
  • the electronic device determines the splicing template corresponding to the picture layout of the first picture in the pictures corresponding to the at least two picture layouts as the target splicing template, and the first picture The display order indicated by the sorting information corresponding to a picture comes first.
  • the splicing template corresponding to the image layout of the image with the highest image ranking information is used as the target splicing template.
  • the splicing template shown in the first column in FIG. 4 is used, that is, the vertical version.
  • the splicing template shown in the first column of 4 is the vertical splicing template.
  • the splicing module corresponding to the first image is used. Since the first image is generally the image that the user most wants to display, it is determined based on the first image.
  • the target splicing template is more suitable for displaying the pictures that users most want to display, thereby improving the display effect.
  • the splicing templates shown in FIG. 4 above are only some exemplary splicing templates.
  • the splicing templates include other types.
  • the embodiments of the present disclosure do not limit the specific types of the splicing templates.
  • step S305 the electronic device splices the multiple pictures according to the display position indicated by the target splicing template to obtain the target picture.
  • the electronic device adds the plurality of pictures to the target splicing template according to the display position indicated by the target splicing template, so as to realize the splicing of the plurality of pictures, and then obtain the target picture.
  • the electronic device determines the corresponding display of the multiple pictures in the target splicing template according to the sorting information of the multiple pictures. position, and stitch the multiple pictures according to the determined display position. That is, each display position in the target splicing template corresponds to corresponding position information, and the position information is used to indicate the corresponding label of each display position, so that based on the correspondence between the sorting information and the label, it is determined that multiple pictures are spliced in the target. The corresponding display position in the template, and then realize the splicing of the multiple pictures.
  • the third splicing template of the vertical splicing template shown in the first column in FIG. determined as the target splicing template, according to the sorting information of these 3 pictures, the display position corresponding to the picture whose sorting information is 1 in the target splicing template is determined as the display position on the left in the target splicing template, and the sorting information
  • the display position corresponding to the picture of 2 in the target splicing template is determined as the display position of the upper right half of the target splicing template, and the corresponding display position of the picture whose sorting information is 3 in the target splicing template is determined. It is the display position of the lower right half of the target splicing template, so as to realize the splicing of these three pictures.
  • the operation is simple, and the efficiency of human-computer interaction is improved.
  • the pictures that the user wants to display first are displayed in the front position, and the processing process is more intelligent, so that the display effect can be improved.
  • the electronic device detects the aspect ratio of the plurality of pictures, and when there is a picture to be processed in the plurality of pictures, the electronic device adjusts the to-be-processed picture according to the target aspect ratio corresponding to the target splicing template
  • the size of the picture, the picture to be processed is a picture whose size does not conform to the target aspect ratio.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • the first target aspect ratio is the target aspect ratio corresponding to the picture whose layout is vertical
  • the second target aspect ratio The ratio is the target aspect ratio corresponding to the image whose layout is landscape.
  • the electronic device When the picture format of the picture to be processed is vertical, and the aspect ratio of the picture to be processed is greater than or equal to the first target aspect ratio, the electronic device proportionally scales the width and height of the picture to be processed; When the picture format of the processed picture is vertical, and the aspect ratio of the to-be-processed picture is smaller than the first target aspect ratio, the electronic device performs center cropping on the to-be-processed picture; if the picture format of the to-be-processed picture is horizontal When the aspect ratio of the picture to be processed is less than or equal to the second target aspect ratio, the width and height of the picture to be processed are proportionally scaled; When the aspect ratio of the processed picture is greater than the second target aspect ratio, the electronic device performs center cropping on the to-be-processed picture.
  • the size adjustment method corresponding to the aspect ratio of the picture is used, the width and height of the picture are proportionally scaled or the picture is centered and cropped, so that the picture is more suitable for the target stitching template. Improve the intelligence of the image processing process, thereby improving the display effect.
  • the first target aspect ratio is any positive value less than 1
  • the second target aspect ratio is any positive value greater than 1
  • the embodiment of the present disclosure has no effect on the first target aspect ratio and the second target aspect ratio.
  • the specific value of the ratio is not limited. The following is an example of the first target aspect ratio being 9:16 and the second target aspect ratio being 2:1:
  • the height of the image to be processed is a and the width is b.
  • the size of the image to be processed is proportionally scaled. Width and height; in the case of (a:b)>9:16, center crop the image to be processed.
  • the picture layout of the picture to be processed is horizontal, in the case of (a:b) ⁇ 2:1, the width and height of the picture to be processed are proportionally scaled; when (a:b)>2:1 In the case of , the image to be processed is centered and cropped.
  • the process of scaling the width and height of the picture to be processed by the electronic device proportionally includes: the electronic device shortens the width and height of the picture to be processed according to the same proportion based on the size of the corresponding display position in the target splicing template .
  • the electronic device shortens the height of the picture to be processed to 90% of 15cm, that is, 13.5cm, and shortens the width of the picture to be processed to 90% of 10cm, that is, 9cm, so that the picture to be processed can be displayed in the in the target splice template.
  • the picture to be processed can meet the requirements of the target splicing template, and the integrity of the content of the picture to be processed is guaranteed, and the intelligence of the picture processing process is improved.
  • the process of centering and cropping the picture to be processed includes: centering and cropping the to-be-processed picture based on the position of the person in the to-be-processed picture.
  • the cropped picture can still completely include the person in the picture, and the intelligence of the picture processing process is improved, thereby improving the display effect.
  • the electronic device recognizes the position of the person in the picture to be processed, and then uses the position of the person as the center point to centrally crop the picture to be processed, so as to ensure that the cropped picture to be processed is centered on the person to improve the intelligence of the picture cropping process, thereby improving the display effect of the picture to be processed.
  • the target stitching template used when stitching pictures based on the number and size of the pictures, so as to stitch the pictures according to the display position indicated by the target stitching template, and then obtain the target picture for display.
  • the picture includes multiple pictures, so that other users can see all the pictures in the work at one time, without the need for manual operation by the user, the operation is simple, and the efficiency of human-computer interaction is improved.
  • step S306 the electronic device uses the target picture as a preview picture of the work, and publishes the work.
  • the electronic device uses the target picture as a preview picture of the work, so as to publish the work to the target server.
  • the target server is a server corresponding to a content sharing platform, or the target server is of another type, which is not limited in the embodiments of the present disclosure.
  • the work After the work is published, other users can obtain the work through their corresponding electronic devices, and then display the work.
  • the preview image of the work is displayed, that is, the target image is displayed.
  • Other users can perform sliding operations on the interface displaying the target image, and the electronic device corresponding to the user responds to the user. to display the multiple pictures one by one.
  • the multiple pictures are displayed according to the sorting information of the multiple pictures.
  • the plurality of pictures are displayed in other manners, which are not limited in the embodiments of the present disclosure.
  • the embodiments of the present disclosure provide a solution, by obtaining multiple pictures corresponding to the work to be published when the work is to be published, and determining a target splicing template matching the number and size of the pictures based on the number and size of the pictures. , and then stitch the multiple pictures according to the display position indicated by the target stitching template, and use the target picture obtained by stitching as the preview picture of the work to be published to publish the work, so that after the work is published, other users can browse the work. What you see is the preview picture, so you can see all the pictures in the work at one time, without the need for manual operation by the user, the operation is simple, and the efficiency of human-computer interaction is improved.
  • Fig. 5 is a block diagram of an apparatus for processing works according to an exemplary embodiment. Referring to Fig. 5, the apparatus includes:
  • the obtaining unit 501 is configured to obtain a plurality of pictures corresponding to the work in response to the release instruction of the work;
  • Determining unit 502 is configured to determine a target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number of pictures and the size, and the target splicing template is used to determine the display position of the picture;
  • the splicing unit 503 is configured to splicing the multiple pictures according to the display position indicated by the target splicing template to obtain the target picture;
  • the publishing unit 504 is configured to use the target picture as a preview picture of the work, and publish the work.
  • the apparatus obtains multiple pictures corresponding to the work to be published when the work is to be published, and determines the target splicing matching the number and size of the pictures based on the number and size of the pictures. template, and then stitch the multiple pictures according to the display position indicated by the target stitching template, and use the target picture obtained by stitching as the preview picture of the work to be published to publish the work, so that after the work is published, other users can browse the work. What the work sees is the preview picture, so that all the pictures in the work can be seen at one time, without the need for manual operation by the user, the operation is simple, and the efficiency of human-computer interaction is improved.
  • the splicing unit 503 is configured to obtain sorting information of the multiple pictures based on the target splicing template, where the sorting information is used to indicate the display order of the multiple pictures; according to the sorting of the multiple pictures information, determine the corresponding display positions of the plurality of pictures in the target splicing template; stitch the plurality of pictures according to the determined display positions to obtain the target picture.
  • the determining unit 502 includes a layout determining subunit and a template determining subunit;
  • the layout determination subunit is configured to determine the image layout of each image based on the aspect ratio of each image
  • the layout determination subunit is further configured to determine the image layout with the largest number of corresponding images as the target image layout
  • the template determination subunit is configured to determine a target splicing template corresponding to the target picture layout and the number of pictures.
  • the layout determining subunit is configured to determine the picture layout of the first picture as a vertical version when the aspect ratio of the picture is greater than an aspect ratio threshold; When the ratio is equal to the aspect ratio threshold, the picture layout of the picture is determined to be square; when the aspect ratio of the picture is smaller than the aspect ratio threshold, the picture layout of the picture is determined to be landscape.
  • the template determination subunit is further configured to, in the case that the number of pictures corresponding to the at least two picture layouts is the same, the picture layout of the first picture in the pictures corresponding to the at least two picture layouts
  • the corresponding splicing template is determined to be the target splicing template, and the display order indicated by the sorting information corresponding to the first picture is the highest, and the sorting information is used to indicate the display order of the plurality of pictures.
  • the apparatus further includes:
  • an adjustment unit configured to adjust the size of the to-be-processed picture according to the target aspect ratio corresponding to the target splicing template when there is a to-be-processed picture in the plurality of pictures, and the to-be-processed picture is a size that does not meet the target Aspect ratio images.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • the adjustment unit is configured to proportionally scale the width and height of the to-be-processed image when the layout information of the to-be-processed image is vertical and the aspect ratio of the to-be-processed image is greater than or equal to the first target aspect ratio height; when the layout information of the picture to be processed is vertical, and the aspect ratio of the picture to be processed is smaller than the first target aspect ratio, the picture to be processed is centered and cropped; in the layout of the picture to be processed When the information is horizontal, and the aspect ratio of the to-be-processed picture is less than or equal to the second target aspect ratio, the width and height of the to-be-processed picture are proportionally scaled; And if the aspect ratio of the to-be-processed picture is greater than the second target aspect ratio, the to-be-processed picture is centered and cropped.
  • the apparatus further includes:
  • the cropping unit is configured to center crop the picture to be processed based on the position of the person in the picture to be processed.
  • the cropping unit is configured to identify a person's position in the picture to be processed; and use the person's position as a center point to center crop the picture to be processed.
  • FIG. 6 is a block diagram of an electronic device 600 according to an exemplary embodiment.
  • the electronic device 600 is: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture expert compression standard audio layer 3) Level 4) Player, laptop or desktop computer.
  • Electronic device 600 may also be called user equipment, portable electronic device, laptop electronic device, desktop electronic device, and the like by other names.
  • the electronic device 600 includes: one or more processors 601 and one or more memories 602 .
  • the processor 601 includes one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 601 is implemented by at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array).
  • the processor 601 also includes a main processor and a co-processor.
  • the main processor is a processor for processing data in a wake-up state, also called a CPU (Central Processing Unit, central processing unit); the co-processor is used for processing standby A low-power processor for data in state.
  • CPU Central Processing Unit
  • the processor 601 is integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 601 further includes an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 602 includes one or more computer-readable storage media that are non-transitory. Memory 602 also includes high-speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, a non-transitory computer-readable storage medium in memory 602 is used to store at least one program code for execution by processor 601 to implement the following steps:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the sorting information of the plurality of pictures determine the corresponding display positions of the plurality of pictures in the target splicing template
  • the multiple pictures are spliced to obtain the target picture.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the aspect ratio of the picture is greater than the aspect ratio threshold, determine the picture layout of the picture as a vertical version
  • the aspect ratio of the picture is equal to the aspect ratio threshold, determine the picture layout of the picture as a square version
  • the picture layout of the picture is determined to be landscape.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the stitching template corresponding to the picture layout of the first picture is determined as the target stitching template, and the first picture
  • the display order indicated by the corresponding sorting information is the most advanced, and the sorting information is used to indicate the display order of the plurality of pictures.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the size of the to-be-processed picture is adjusted according to the target aspect ratio corresponding to the target splicing template, and the to-be-processed picture is a picture whose size does not conform to the target aspect ratio.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • the at least one program code is also used to be executed by the processor 601 to implement the following steps:
  • the picture format of the picture to be processed is a vertical version, and the aspect ratio of the picture to be processed is greater than or equal to the first target aspect ratio, the width and height of the picture to be processed are proportionally scaled;
  • the picture to be processed is centered and cropped;
  • the width and height of the picture to be processed are proportionally scaled
  • the picture to be processed is horizontal and the aspect ratio of the picture to be processed is greater than the second target aspect ratio, the picture to be processed is centered and cropped.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the to-be-processed picture is centered and cropped.
  • the at least one program code is further configured to be executed by the processor 601 to implement the following steps:
  • the image to be processed is centered and cropped.
  • the electronic device 600 further includes: a peripheral device interface 603 and at least one peripheral device.
  • the processor 601, the memory 602 and the peripheral device interface 603 are connected through a bus or a signal line.
  • Each peripheral device is connected to the peripheral device interface 603 through a bus, a signal line or a circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 604 , a display screen 605 , a camera 606 , an audio circuit 607 , a positioning component 608 and a power supply 609 .
  • the peripheral device interface 603 can be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 601 and the memory 602 .
  • processor 601, memory 602, and peripherals interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 601, memory 602, and peripherals interface 603 or The two can be implemented on a separate chip or circuit board, which is not limited by the embodiments of the present disclosure.
  • the radio frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 604 communicates with the communication network and other communication devices via electromagnetic signals.
  • the radio frequency circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • the radio frequency circuit 604 is capable of communicating with other electronic devices through at least one wireless communication protocol.
  • the wireless communication protocols include, but are not limited to, metropolitan area networks, mobile communication networks of various generations (2G, 3G, 4G and 5G), wireless local area networks and/or WiFi (Wireless Fidelity, wireless fidelity) networks.
  • the radio frequency circuit 604 further includes a circuit related to NFC (Near Field Communication, short-range wireless communication), which is not limited in the present disclosure.
  • the display screen 605 is used for displaying UI (User Interface, user interface).
  • the UI includes graphics, text, icons, video, and any combination thereof.
  • display screen 605 is a touch display screen
  • display screen 605 also has the ability to acquire touch signals on or above the surface of display screen 605 .
  • the touch signal can be input to the processor 601 as a control signal for processing.
  • the display screen 605 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 605 there is one display screen 605, which is provided on the front panel of the electronic device 600; in other embodiments, there are at least two display screens 605, which are respectively provided on different surfaces of the electronic device 600 or in a folded design; In still other embodiments, the display screen 605 is a flexible display screen disposed on a curved or folded surface of the electronic device 600 . Even, the display screen 605 is set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 605 is made of materials such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
  • the camera assembly 606 is used to capture images or video.
  • camera assembly 606 includes a front-facing camera and a rear-facing camera.
  • the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device.
  • there are at least two rear cameras which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function, the main camera It is integrated with the wide-angle camera to achieve panoramic shooting and VR (Virtual Reality, virtual reality) shooting functions or other integrated shooting functions.
  • camera assembly 606 also includes a flash.
  • the flash is a single color temperature flash or a dual color temperature flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • Audio circuit 607 includes a microphone and a speaker.
  • the microphone is used to collect the sound waves of the user and the environment, convert the sound waves into electrical signals and input them to the processor 601 for processing, or to the radio frequency circuit 604 to realize voice communication.
  • the microphone is an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert the electrical signal from the processor 601 or the radio frequency circuit 604 into sound waves.
  • the loudspeaker is a traditional thin-film loudspeaker or a piezoelectric ceramic loudspeaker.
  • the loudspeaker When the loudspeaker is a piezoelectric ceramic loudspeaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves that humans cannot hear for distance measurement and other purposes.
  • the audio circuit 607 also includes a headphone jack.
  • the positioning component 608 is used to locate the current geographic location of the electronic device 600 to implement navigation or LBS (Location Based Service).
  • the positioning component 608 is a positioning component based on the GPS (Global Positioning System, global positioning system) of the United States, the Beidou system of China, the Grenas system of Russia, or the Galileo system of the European Union.
  • Power supply 609 is used to power various components in electronic device 600 .
  • the power source 609 is alternating current, direct current, a primary battery or a rechargeable battery. Where the power source 609 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
  • the electronic device 600 also includes one or more sensors 610 .
  • the one or more sensors 610 include, but are not limited to, an acceleration sensor 611 , a gyro sensor 612 , a pressure sensor 613 , a fingerprint sensor 614 , an optical sensor 615 and a proximity sensor 616 .
  • the acceleration sensor 611 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 600 .
  • the acceleration sensor 611 can be used to detect the components of the gravitational acceleration on the three coordinate axes.
  • the processor 601 can control the display screen 605 to display the user interface in a landscape view or a portrait view based on the gravitational acceleration signal collected by the acceleration sensor 611 .
  • the acceleration sensor 611 can also be used for game or user movement data collection.
  • the gyroscope sensor 612 can detect the body direction and rotation angle of the electronic device 600 , and the gyroscope sensor 612 can cooperate with the acceleration sensor 611 to collect the 3D actions of the user on the electronic device 600 . Based on the data collected by the gyroscope sensor 612, the processor 601 can implement the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 613 is disposed on the side frame of the electronic device 600 and/or the lower layer of the display screen 605 .
  • the processor 601 can perform left and right hand recognition or quick operation based on the holding signal collected by the pressure sensor 613 .
  • the processor 601 realizes the control of the operability controls on the UI interface based on the user's pressure operation on the display screen 605 .
  • the operability controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
  • the fingerprint sensor 614 is used to collect the user's fingerprint, and the processor 601 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 614 , or the fingerprint sensor 614 identifies the user's identity based on the collected fingerprint. In the case that the identity of the user is identified as a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings.
  • the fingerprint sensor 614 is provided on the front, back, or side of the electronic device 600 . In the case where the electronic device 600 is provided with physical buttons or the manufacturer's logo, the fingerprint sensor 614 is integrated with the physical buttons or the manufacturer's logo.
  • Optical sensor 615 is used to collect ambient light intensity.
  • the processor 601 can control the display brightness of the display screen 605 based on the ambient light intensity collected by the optical sensor 615 . In some embodiments, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is decreased. In another embodiment, the processor 601 can also dynamically adjust the shooting parameters of the camera assembly 606 based on the ambient light intensity collected by the optical sensor 615 .
  • Proximity sensor 616 also referred to as a distance sensor, is typically provided on the front panel of electronic device 600 .
  • Proximity sensor 616 is used to collect the distance between the user and the front of electronic device 600 .
  • the processor 601 controls the display screen 605 to switch from the bright screen state to the off screen state;
  • the processor 601 controls the display screen 605 to switch from the screen-off state to the screen-on state.
  • the structure shown in FIG. 6 does not constitute a limitation on the electronic device 600.
  • the electronic device 600 includes more or less components than those shown in the figure, or a combination of some components, or a different arrangement of components.
  • a computer-readable storage medium including instructions, such as a memory 602 including instructions, and the above-mentioned instructions are executed by the processor 601 of the electronic device 600 to complete the following steps:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the sorting information of the plurality of pictures determine the corresponding display positions of the plurality of pictures in the target splicing template
  • the multiple pictures are spliced to obtain the target picture.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the aspect ratio of the picture is greater than the aspect ratio threshold, determine the picture layout of the picture as a vertical version
  • the aspect ratio of the picture is equal to the aspect ratio threshold, determine the picture layout of the picture as a square version
  • the picture layout of the picture is determined to be landscape.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the stitching template corresponding to the picture layout of the first picture is determined as the target stitching template, and the first picture
  • the display order indicated by the corresponding sorting information is the most advanced, and the sorting information is used to indicate the display order of the plurality of pictures.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the size of the to-be-processed picture is adjusted according to the target aspect ratio corresponding to the target splicing template, and the to-be-processed picture is a picture whose size does not conform to the target aspect ratio.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • the picture format of the picture to be processed is a vertical version, and the aspect ratio of the picture to be processed is greater than or equal to the first target aspect ratio, the width and height of the picture to be processed are proportionally scaled;
  • the picture to be processed is centered and cropped;
  • the width and height of the picture to be processed are proportionally scaled
  • the picture to be processed is horizontal and the aspect ratio of the picture to be processed is greater than the second target aspect ratio, the picture to be processed is centered and cropped.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the to-be-processed picture is centered and cropped.
  • the above instructions are executed by the processor 601 of the electronic device 600, and can also complete the following steps:
  • the image to be processed is centered and cropped.
  • the computer-readable storage medium is Read-Only Memory (ROM), Random Access Memory (RAM), Compact Disc Read-Only Memory (CD-ROM) ), magnetic tapes, floppy disks, and optical data storage devices, etc.
  • a computer program product including a computer program, the computer program being executed by the processor 601 of the electronic device to complete the following steps:
  • the target splicing template based on the number of pictures and the size of the multiple pictures, the target splicing template matches the number and size of the pictures, and the target splicing template is used to determine the display position of the picture;
  • the target image is used as the preview image of the work, and the work is published.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the sorting information of the plurality of pictures determine the corresponding display positions of the plurality of pictures in the target splicing template
  • the multiple pictures are spliced to obtain the target picture.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the aspect ratio of the picture is greater than the aspect ratio threshold, determine the picture layout of the picture as a vertical version
  • the aspect ratio of the picture is equal to the aspect ratio threshold, determine the picture layout of the picture as a square version
  • the picture layout of the picture is determined to be landscape.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the stitching template corresponding to the picture layout of the first picture is determined as the target stitching template, and the first picture
  • the display order indicated by the corresponding sorting information is the most advanced, and the sorting information is used to indicate the display order of the plurality of pictures.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the size of the to-be-processed picture is adjusted according to the target aspect ratio corresponding to the target splicing template, and the to-be-processed picture is a picture whose size does not conform to the target aspect ratio.
  • the target aspect ratio includes a first target aspect ratio and a second target aspect ratio
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the width and height of the picture to be processed are proportionally scaled
  • the picture to be processed is centered and cropped;
  • the width and height of the picture to be processed are proportionally scaled
  • the picture to be processed is horizontal and the aspect ratio of the picture to be processed is greater than the second target aspect ratio, the picture to be processed is centered and cropped.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the to-be-processed picture is centered and cropped.
  • the computer program is executed by the processor 601 of the electronic device, and can also complete the following steps:
  • the image to be processed is centered and cropped.

Abstract

本公开关于一种作品处理方法及装置,属于计算机技术领域。本公开提供的方案,通过在要发布作品的情况下,获取待发布的作品对应的多张图片,基于这多张图片的图片数量和尺寸,确定与图片数量和尺寸匹配的目标拼接模板,进而按照目标拼接模板所指示的显示位置,来拼接这多张图片,将拼接得到的目标图片作为待发布作品的预览图片,以发布该作品,使得该作品发布完成后,其他用户浏览该作品看到的便是该预览图片,从而能够一次性看到该作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。

Description

作品处理方法及装置
本公开基于申请日为2020年12月23日、申请号为202011540248.9的中国专利申请,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及计算机技术领域,尤其涉及一种作品处理方法及装置。
背景技术
随着互联网技术的发展,互联网逐渐成为社交活动的一个重要场所,用户能够在互联网上将多张图片发布为一个作品,以便通过发布的作品来分享自己的生活。
发明内容
根据本公开的实施例的第一方面,提供一种作品处理方法,该方法包括:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
通过在要发布作品的情况下,获取待发布的作品对应的多张图片,基于这多张图片的图片数量和尺寸,确定与图片数量和尺寸匹配的目标拼接模板,进而按照目标拼接模板所指示的显示位置,来拼接这多张图片,将拼接得到的目标图片作为待发布作品的预览图片,以发布该作品,使得该作品发布完成后,其他用户浏览该作品看到的便是该预览图片,从而能够一次性看到该作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。
根据本公开实施例的第二方面,提供一种作品处理装置,该装置包括:
获取单元,被配置为响应于对作品的发布指令,获取该作品对应的多张图片;
确定单元,被配置为基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
拼接单元,被配置为按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
发布单元,被配置为将该目标图片作为该作品的预览图片,发布该作品。
根据本公开实施例的第三方面,提供一种电子设备,包括:
处理器;
用于存储该处理器可执行指令的存储器;
其中,该处理器被配置为执行该指令,以实现下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
根据本公开实施例的第四方面,提供一种计算机可读存储介质,当该计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
根据本公开实施例的第五方面,提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据一示例性实施例示出的一种作品处理方法的实施环境示意图;
图2是根据一示例性实施例示出的一种作品处理方法的流程图;
图3是根据一示例性实施例示出的一种作品处理方法的流程图;
图4是根据一示例性实施例示出的一种拼接模板示意图;
图5是根据一示例性实施例示出的一种作品处理装置的框图;
图6是根据一示例性实施例示出的一种电子设备600的框图。
具体实施方式
本公开所涉及的用户信息为经用户授权或者经过各方充分授权的信息。
图1是根据一示例性实施例示出的一种作品处理方法的实施环境示意图,参见图1,该实施环境包括:电子设备101和服务器102。
电子设备101为智能手机、智能手表、手提电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器和膝上型便携计算机等设备中的至少一种。电子设备101通过有线或无线通信方式与服务器102进行连接,本公开的实施例对此不加以限定。电子设备101中存储有多张图片,以便用户从该多张图片中选择要展示的图片。电子设备101响应于用户的选中操作,将被选中的图片作为待发布的作品对应的图片,进而将这多张图片发送给服务器102。
电子设备101泛指多个电子设备中的一个,本公开的实施例仅以电子设备101来举例说明。本领域技术人员能够知晓,在另一些实施例中,上述终端的数量更多或更少。比如上述电子设备仅为几个,或者上述电子设备为几十个或几百个,或者更多数量,本公开的实施例对电子设备的数量和设备类型均不加以限定。
服务器102为一台服务器、多台服务器、云服务器、云计算平台和虚拟化中心中的至少一种。服务器102通过有线或无线通信方式与电子设备101进行连接,本公开的实施例对此不加以限定。服务器102接收电子设备101发送的多张图片,进而将这多张图片发布为一个作品,以便其他用户对应的电子设备能够获取到这多张图片对应的作品,进而展示这多张图片。在另一些实施例中,上述服务器的数量更多或更少,本公开的实施例对此不加以限定。在一些实施例中,服务器102还包括其他功能服务器,以便提供更全面且多样化的服务。
图2是根据一示例性实施例示出的一种作品处理方法的流程图,参见图2,该方法包括:
在步骤S201中,电子设备响应于对作品的发布指令,获取该作品对应的多张图片。
在步骤S202中,电子设备基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置。
在步骤S203中,电子设备按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片。
在步骤S204中,电子设备将该目标图片作为该作品的预览图片,发布该作品。
本公开的实施例提供的方案,通过在要发布作品的情况下,获取待发布的作品对应的多张图片,基于这多张图片的图片数量和尺寸,确定与图片数量和尺寸匹配的目标拼接模板,进而按照目标拼接模板所指示的显示位置,来拼接这多张图片,将拼接得到的目标图片作为待发布作品的预览图片,以发布该作品,使得该作品发布完成后,其他用户浏览该作品看到的便是该预览图片,从而能够一次性看到该作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。
在一些实施例中,按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片包括:
基于该目标拼接模板,获取该多张图片的排序信息,该排序信息用于指示该多张图片的显示顺序;
按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置;
按照所确定的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,基于图片数量及该多张图片的尺寸,确定目标拼接模板包括:
基于每张图片的宽高比,确定每张图片的图片版式;
将对应图片数量最多的图片版式,确定为目标图片版式;
确定与该目标图片版式和该图片数量对应的目标拼接模板。
在一些实施例中,基于每张图片的宽高比,确定每张图片的图片版式包括:
在该图片的宽高比大于宽高比阈值的情况下,将该图片的图片版式确定为竖版;
在该图片的宽高比等于宽高比阈值的情况下,将该图片的图片版式确定为方版;
在该图片的宽高比小于宽高比阈值的情况下,将该图片的图片版式确定为横版。
在一些实施例中,该方法还包括:
在至少两个图片版式对应的图片数量相同的情况下,将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前,该排序信息用于指示该多张图片的显示顺序。
在一些实施例中,该方法还包括:
在该多张图片中存在待处理图片的情况下,按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。
在一些实施例中,该目标宽高比包括第一目标宽高比和第二目标宽高比;
按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸包括:
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比大于等于第一目标宽高比 的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比小于第一目标宽高比的情况下,则对该待处理图片进行居中裁剪;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,对该待处理图片进行居中裁剪包括:
基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。
在一些实施例中,基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪包括:
识别该待处理图片中的人物位置;
以该人物位置为中心点,对该待处理图片进行居中裁剪。
图3是根据一示例性实施例示出的一种作品处理方法的流程图,参见图3,该方法包括:
在步骤S301中,电子设备响应于对作品的发布指令,获取该作品对应的多张图片。
其中,该电子设备中预先存储有多张图片,电子设备获取预先存储的多张图片,并展示这多张图片,各张图片对应有相应的勾选控件,以便用户通过触发各张图片对应的勾选控件,来从这多张图片中进行选择,用户在选择完成后触发发布控件。电子设备响应于用户的触发操作,触发对作品的发布指令,以便该电子设备响应于该发布指令,获取被用户选中的多张图片,作为待发布的作品对应的多张图片。
在步骤S302中,电子设备基于每张图片的宽高比,确定每张图片的图片版式。
其中,图片的宽高比即为图片的宽和高的比值,对于确定图片的宽和高的过程,不同的使用场景下宽和高的方向可能不同。以电子设备为智能手机为例,在智能手机位于竖屏状态的情况下,图片的宽为与智能手机的屏幕的上下两个边平行的边,图片的高为与智能手机的屏幕的左右两个边平行的边;而在智能手机位于横屏状态的情况下,图片的宽为与智能手机的屏幕的左右两个边平行的边,图片的高为与智能手机的屏幕的上下两个边平行的边。以电子设备为台式计算机为例,图片的宽为与台式计算机的屏幕的上下两个边平行的边,图片的高为与台式计算机的屏幕的左右两个边平行的边。
在一些实施例中,图片版式的确定过程包括:电子设备基于图片的尺寸,确定该图片的宽高比,进而将比较该图片的宽高比与宽高比阈值,以确定该图片的图片版式。
通过比较各张图片的宽高比和宽高比阈值,以便确定各张图片的图片版式。在该图片的 宽高比大于宽高比阈值的情况下,电子设备将该图片的图片版式确定为竖版;在该图片的宽高比等于宽高比阈值的情况下,电子设备将该图片的图片版式确定为方版;在该图片的宽高比小于宽高比阈值的情况下,电子设备将该图片的图片版式确定为横版。其中,该宽高比阈值为1。
也即是,假设图片的高为a,宽为b,在a>b的情况下,该图片的图片版式为竖版;在a=b的情况下,该图片的图片版式为方版;在a<b的情况下,该图片的图片版式为横版。其中,a和b均为任意正数值,本公开的实施例对此不加以限定。
上述过程中的参数高为a,宽为b仅为一种示例性的说明方式,在一些实施例中,能够采用其他参数来表示图片的宽和高,本公开的实施例对此不加以限定。
在步骤S303中,电子设备将对应图片数量最多的图片版式,确定为目标图片版式。
在步骤S304中,电子设备确定与该目标图片版式和该图片数量对应的目标拼接模板,该目标拼接模板用于确定图片的显示位置。
其中,各个图片版式的图片及不同图片数量对应的拼接模板参见图4,图4是根据一示例性实施例示出的一种拼接模板示意图。
例如,在这多张图片的图片版式均为竖版的情况下,采用图4中第一列所示的拼接模板,也即是竖版拼接模板;在这多张图片的图片版式均为方版的情况下,采用图4中第二列所示的拼接模板,也即是方版拼接模板;在这多张图片的图片版式均为横版的情况下,采用图4中第三列所示的拼接模板,也即是横版拼接模板。在这多张图片对应于至少两个图片版式的情况下,采用对应图片数量最多的图片版式,也即是,在竖版对应的图片数量多于其他图片版式对应的图片数量的情况下,也即是,在竖版对应的图片数量最多的情况下,采用图4中第一列所示的拼接模板,也即是竖版拼接模板;在方版对应的图片数量多于其他图片版式对应的图片数量的情况下,也即是,在方版对应的图片数量最多的情况下,采用图4中第二列所示的拼接模板,也即是方版拼接模板;在横版对应的图片数量多于其他图片版式对应的图片数量的情况下,也即是,在横版对应的图片数量最多的情况下,采用图4中第三列所示的拼接模板,也即是横版拼接模板。
通过上述步骤S302至步骤S304来确定图片的图片版式,以便基于对应图片数量最多的图片版式来确定目标拼接模板,使得确定出来的目标拼接模块更加符合这多张图片的图片版式和图片数量,进而提高显示效果。
在一些实施例中,电子设备在获取到这多张图片的情况下,获取这多张图片的排序信息,该排序信息也即是这多张图片被勾选的顺序,该排序信息用于指示该多张图片的显示顺序。 在至少两个图片版式对应的图片数量相同的情况下,电子设备将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前。
也即是,在有两个图片版式或三个图片版式对应的图片数量相同的情况下,采用图片排序信息靠前的图片的图片版式对应的拼接模板,作为目标拼接模板。例如,在竖版和横版对应的图片数量相同,且排序信息为1的图片对应的图片版式为竖版的情况下,采用图4中第一列所示的拼接模板,也即是竖版拼接模板;在竖版和横版对应的图片数量相同,且排序信息为1的图片对应的图片版式为方版,排序信息为2的图片对应的图片版式为竖版的情况下,则采用图4中第一列所示的拼接模板,也即是竖版拼接模板。
通过在有两个图片版式对应的图片数量相同的情况下,采用排序在最前的图片对应的拼接模块,由于排序在最前的图片一般是用户最想展示的图片,基于排序在最前的图片确定出的目标拼接模板,更加适用于展示用户最想展示的图片,从而提高显示效果。
上述图4中所示出的拼接模板,仅为一些示例性的拼接模板,在一些实施例中,该拼接模板包括其他类型,本公开的实施例对拼接模板的具体类型不加以限定。
在步骤S305中,电子设备按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,电子设备按照目标拼接模板所指示的显示位置,将这多张图片添加至该目标拼接模板中,实现对该多张图片的拼接,进而得到该目标图片。
上述过程是以随机拼接这多张图片为例来进行说明的,在另一些实施例中,电子设备按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置,按照所确定的显示位置,拼接该多张图片。也即是,目标拼接模板中的各个显示位置对应有相应的位置信息,该位置信息用于指示各个显示位置对应的标号,以便基于排序信息与标号的对应关系,确定多张图片在该目标拼接模板中所对应的显示位置,进而实现对这多张图片的拼接。
例如,对于待发布的包含3张图片的作品,在这3张图片对应的图片版式均为竖版的情况下,将图4中第一列所示的竖版拼接模板的第3种拼接模板,确定为该目标拼接模板,按照这3张图片的排序信息,将排序信息为1的图片在该目标拼接模板中所对应的显示位置,确定为目标拼接模板中左边的显示位置,将排序信息为2的图片在该目标拼接模板中所对应的显示位置,确定为目标拼接模板中右边上半部分的显示位置,将排序信息为3的图片在该目标拼接模板中所对应的显示位置,确定为目标拼接模板中右边下半部分的显示位置,进而实现对这3张图片的拼接。
通过获取多张图片的排序信息,以便按照排序信息,确定这多张图片在目标模板中对应的位置,进而实现对这多张图片的拼接,无需用户手动拼接,操作简便,提高人机交互效率,而且使得用户想要优先展示的图片显示在靠前的位置,处理过程更加智能,从而能够提高显示效果。
在一些实施例中,电子设备检测该多张图片的宽高比,在该多张图片中存在待处理图片的情况下,电子设备按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。通过在多张图片中存在尺寸不符合目标宽高比的待处理图片时,按照目标拼接模板对应的目标宽高比,来调整待处理图片的尺寸,提高图片处理过程的智能性,使得各张图片都符合目标拼接模板对应的目标宽高比,提高各张图片的显示效果。
其中,该目标宽高比包括第一目标宽高比和第二目标宽高比,该第一目标宽高比为图片版式为竖版的图片对应的目标宽高比,该第二目标宽高比为图片版式为横版的图片对应的目标宽高比。在该待处理图片的图片版式为竖版,且该待处理图片的宽高比大于等于第一目标宽高比的情况下,电子设备等比例缩放该待处理图片的宽和高;在该待处理图片的图片版式为竖版,且该待处理图片的宽高比小于第一目标宽高比的情况下,电子设备对该待处理图片进行居中裁剪;在该待处理图片的图片版式为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;在该待处理图片的图片版式为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,电子设备对该待处理图片进行居中裁剪。通过在图片的宽高比不满足要求的情况下,采用与图片的宽高比相应的尺寸调整方式,等比例缩放图片的宽和高或对图片进行居中裁剪,使得图片更加适应目标拼接模板,提高图片处理过程的智能性,进而提高显示效果。
其中,该第一目标宽高比为小于1的任意正数值,该第二目标宽高比为大于1的任意正数值,本公开的实施例对第一目标宽高比和第二目标宽高比的具体取值不加以限定。下面以该第一目标宽高比为9:16,第二目标宽高比为2:1为例来进行说明:
仍假设待处理图片的高为a,宽为b,对于该待处理图片的图片版式为竖版的情况,在(a:b)<9:16的情况下,等比例缩放该待处理图片的宽和高;在(a:b)>9:16的情况下,对该待处理图片进行居中裁剪。对于该待处理图片的图片版式为横版的情况,在(a:b)<2:1的情况下,等比例缩放该待处理图片的宽和高;在(a:b)>2:1的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,电子设备等比例缩放该待处理图片的宽和高的过程包括:电子设备基于该目标拼接模板中对应显示位置的尺寸,按照相同比例,缩短该待处理图片的宽和高。例 如,在第一目标宽高比为9:16,但待处理图片的高为15厘米(cm),宽为10cm的情况下,以目标拼接模板中对应显示位置的高为16cm,宽为9cm为例,电子设备将待处理图片的高缩短为15cm的90%,也即是13.5cm,将待处理图片的宽缩短为10cm的90%,也即是9cm,从而使得待处理图片能够展示在目标拼接模板中。
通过等比例缩放待处理图片的宽和高,使得待处理图片能够满足目标拼接模板的要求,并且保证待处理图片的内容的完整性,提高图片处理过程的智能性。
其中,对该待处理图片进行居中裁剪的过程包括:基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。通过基于图片中的人物位置裁剪图片,使得裁剪后的图片仍能完整包括图片中的人物,提高图片处理过程的智能性,从而提高显示效果。
在一些实施例中,电子设备识别该待处理图片中的人物位置,进而以该人物位置为中心点,来对该待处理图片进行居中裁剪,以保证裁剪后的待处理图片是以人物为中心的,提高图片裁剪过程的智能性,从而提高该待处理图片的显示效果。
通过上述步骤303至步骤304,能够基于图片的数量和尺寸,确定拼接图片时采用的目标拼接模板,以便按照目标拼接模板所指示的显示位置拼接图片,进而得到用于展示的目标图片,该目标图片包括多张图片,使得其他用户能够一次性看到作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。
在步骤S306中,电子设备将该目标图片作为该作品的预览图片,发布该作品。
在一些实施例中,电子设备将该目标图片作为该作品的预览图片,从而将该作品发布至目标服务器。其中,该目标服务器为内容分享类平台对应的服务器,或者,该目标服务器为其他类型,本公开的实施例对此不加以限定。
该作品发布后,其他用户即可通过各自对应的电子设备获取到该作品,进而展示该作品。在对该作品的展示过程中,展示该作品的预览图片,也即是,展示该目标图片,其他用户能够通过在展示该目标图片的界面中进行滑动操作,该用户对应的电子设备响应于用户的滑动操作,逐个展示该多张图片。
在逐个展示该多张图片的过程中,按照该多张图片的排序信息,展示该多张图片。在一些实施例中,采用其他方式展示该多张图片,本公开的实施例对此不加以限定。
本公开的实施例提供方案,通过在要发布作品的情况下,获取待发布的作品对应的多张图片,基于这多张图片的图片数量和尺寸,确定与图片数量和尺寸匹配的目标拼接模板,进而按照目标拼接模板所指示的显示位置,来拼接这多张图片,将拼接得到的目标图片作为待发布作品的预览图片,以发布该作品,使得该作品发布完成后,其他用户浏览该作品看到的 便是该预览图片,从而能够一次性看到该作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。对于待发布的包含多张图片的作品,通过聚合这多张图片,也即是,通过将这多张图片拼接为一张目标图片,并在拼接该多张图片的过程中,调整待处理图片的尺寸,如截取相应位置,以便将这多张图片拼接成最佳的展示样式,提高图片拼接过程的智能性,从而提高这多张图片的显示效果。
图5是根据一示例性实施例示出的一种作品处理装置的框图,参见图5,该装置包括:
获取单元501,被配置为响应于对作品的发布指令,获取该作品对应的多张图片;
确定单元502,被配置为基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
拼接单元503,被配置为按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
发布单元504,被配置为将该目标图片作为该作品的预览图片,发布该作品。
本公开的实施例提供的装置,通过在要发布作品的情况下,获取待发布的作品对应的多张图片,基于这多张图片的图片数量和尺寸,确定与图片数量和尺寸匹配的目标拼接模板,进而按照目标拼接模板所指示的显示位置,来拼接这多张图片,将拼接得到的目标图片作为待发布作品的预览图片,以发布该作品,使得该作品发布完成后,其他用户浏览该作品看到的便是该预览图片,从而能够一次性看到该作品中的所有图片,无需用户手动操作,操作简便,提高人机交互效率。
在一些实施例中,该拼接单元503,被配置为基于该目标拼接模板,获取该多张图片的排序信息,该排序信息用于指示该多张图片的显示顺序;按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置;按照所确定的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,该确定单元502包括版式确定子单元和模板确定子单元;
该版式确定子单元,被配置为基于每张图片的宽高比,确定每张图片的图片版式;
该版式确定子单元,还被配置为将对应图片数量最多的图片版式,确定为目标图片版式;
该模板确定子单元,被配置为确定与该目标图片版式和该图片数量对应的目标拼接模板。
在一些实施例中,该版式确定子单元,被配置为在该图片的宽高比大于宽高比阈值的情况下,将该第一图片的图片版式确定为竖版;在该图片的宽高比等于宽高比阈值的情况下,将该图片的图片版式确定为方版;在该图片的宽高比小于宽高比阈值的情况下,将该图片的图片版式确定为横版。
在一些实施例中,该模板确定子单元,还被配置为在至少两个图片版式对应的图片数量相同的情况下,将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前,该排序信息用于指示该多张图片的显示顺序。
在一些实施例中,该装置还包括:
调整单元,被配置为在该多张图片中存在待处理图片的情况下,按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。
在一些实施例中,该目标宽高比包括第一目标宽高比和第二目标宽高比;
该调整单元,被配置为在该待处理图片的版式信息为竖版,且该待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放该待处理图片的宽和高;在该待处理图片的版式信息为竖版,且该待处理图片的宽高比小于第一目标宽高比的情况下,对该待处理图片进行居中裁剪;在该待处理图片的版式信息为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;在该待处理图片的版式信息为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,该装置还包括:
裁剪单元,被配置为基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。
在一些实施例中,该裁剪单元,被配置为识别该待处理图片中的人物位置;以该人物位置为中心点,对该待处理图片进行居中裁剪。
图6是根据一示例性实施例示出的一种电子设备600的框图。该电子设备600是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。电子设备600还可能被称为用户设备、便携式电子设备、膝上型电子设备、台式电子设备等其他名称。
通常,电子设备600包括有:一个或多个处理器601和一个或多个存储器602。
处理器601包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器601采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器601还包括主处理器和协处理器,主处理器是用于处理唤醒状态下的数据的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于处理待 机状态下的数据的低功耗处理器。在一些实施例中,处理器601集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器601还包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器602包括一个或多个计算机可读存储介质,该计算机可读存储介质是非暂态的。存储器602还包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器602中的非暂态的计算机可读存储介质用于存储至少一个程序代码,该至少一个程序代码用于被处理器601所执行以实现下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
基于该目标拼接模板,获取该多张图片的排序信息,该排序信息用于指示该多张图片的显示顺序;
按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置;
按照所确定的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
基于每张图片的宽高比,确定每张图片的图片版式;
将对应图片数量最多的图片版式,确定为目标图片版式;
确定与该目标图片版式和该图片数量对应的目标拼接模板。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
在该图片的宽高比大于宽高比阈值的情况下,将该图片的图片版式确定为竖版;
在该图片的宽高比等于宽高比阈值的情况下,将该图片的图片版式确定为方版;
在该图片的宽高比小于宽高比阈值的情况下,将该图片的图片版式确定为横版。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
在至少两个图片版式对应的图片数量相同的情况下,将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前,该排序信息用于指示该多张图片的显示顺序。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
在该多张图片中存在待处理图片的情况下,按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。
在一些实施例中,该目标宽高比包括第一目标宽高比和第二目标宽高比;
该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比小于第一目标宽高比的情况下,对该待处理图片进行居中裁剪;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。
在一些实施例中,该至少一个程序代码还用于被处理器601所执行以实现下述步骤:
识别该待处理图片中的人物位置;
以该人物位置为中心点,对该待处理图片进行居中裁剪。
在一些实施例中,电子设备600还包括有:外围设备接口603和至少一个外围设备。处理器601、存储器602和外围设备接口603之间通过总线或信号线相连。各个外围设备通过总线、信号线或电路板与外围设备接口603相连。在一些实施例中,外围设备包括:射频电路604、显示屏605、摄像头606、音频电路607、定位组件608和电源609中的至少一种。
外围设备接口603能够被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器601和存储器602。在一些实施例中,处理器601、存储器602和外围设备接口603被集成在同一芯片或电路板上;在一些其他实施例中,处理器601、存储器602和外围设备接口603中的任意一个或两个能够在单独的芯片或电路板上实现,本公开的实施例对此不加以限定。
射频电路604用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路604通过电磁信号与通信网络以及其他通信设备进行通信。射频电路604将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。在一些实施例中,射频电 路604包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路604能够通过至少一种无线通信协议来与其它电子设备进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路604还包括NFC(Near Field Communication,近距离无线通信)有关的电路,本公开对此不加以限定。
显示屏605用于显示UI(User Interface,用户界面)。该UI包括图形、文本、图标、视频及其它们的任意组合。在显示屏605是触摸显示屏的情况下,显示屏605还具有采集在显示屏605的表面或表面上方的触摸信号的能力。该触摸信号能够作为控制信号输入至处理器601进行处理。此时,显示屏605还能够用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏605为一个,设置电子设备600的前面板;在另一些实施例中,显示屏605为至少两个,分别设置在电子设备600的不同表面或呈折叠设计;在再一些实施例中,显示屏605是柔性显示屏,设置在电子设备600的弯曲表面上或折叠面上。甚至,显示屏605被设置成非矩形的不规则图形,也即异形屏。显示屏605采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件606用于采集图像或视频。在一些实施例中,摄像头组件606包括前置摄像头和后置摄像头。通常,前置摄像头设置在电子设备的前面板,后置摄像头设置在电子设备的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件606还包括闪光灯。闪光灯是单色温闪光灯或双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,能够用于不同色温下的光线补偿。
音频电路607包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器601进行处理,或者输入至射频电路604以实现语音通信。出于立体声采集或降噪的目的,麦克风为多个,分别设置在电子设备600的不同部位。其中,麦克风是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器601或射频电路604的电信号转换为声波。扬声器是传统的薄膜扬声器或压电陶瓷扬声器。在扬声器是压电陶瓷扬声器的情况下,不仅能够将电信号转换为人类可听见的声波,还能够将电信号转换为人类听不见 的声波以进行测距等用途。在一些实施例中,音频电路607还包括耳机插孔。
定位组件608用于定位电子设备600的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件608是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。
电源609用于为电子设备600中的各个组件进行供电。电源609是交流电、直流电、一次性电池或可充电电池。在电源609包括可充电电池的情况下,该可充电电池能够支持有线充电或无线充电。该可充电电池还能够用于支持快充技术。
在一些实施例中,电子设备600还包括有一个或多个传感器610。该一个或多个传感器610包括但不限于:加速度传感器611、陀螺仪传感器612、压力传感器613、指纹传感器614、光学传感器615以及接近传感器616。
加速度传感器611能够检测以电子设备600建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器611能够用于检测重力加速度在三个坐标轴上的分量。处理器601能够基于加速度传感器611采集的重力加速度信号,控制显示屏605以横向视图或纵向视图显示用户界面。加速度传感器611还能够用于游戏或者用户的运动数据的采集。
陀螺仪传感器612能够检测电子设备600的机体方向及转动角度,陀螺仪传感器612能够与加速度传感器611协同采集用户对电子设备600的3D动作。处理器601基于陀螺仪传感器612采集的数据,能够实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器613设置在电子设备600的侧边框和/或显示屏605的下层。在压力传感器613设置在电子设备600的侧边框的情况下,能够检测用户对电子设备600的握持信号,由处理器601基于压力传感器613采集的握持信号进行左右手识别或快捷操作。在压力传感器613设置在显示屏605的下层的情况下,由处理器601基于用户对显示屏605的压力操作,实现对UI界面上的可操作性控件的控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器614用于采集用户的指纹,由处理器601基于指纹传感器614采集到的指纹识别用户的身份,或者,由指纹传感器614基于采集到的指纹识别用户的身份。在识别出用户的身份为可信身份的情况下,由处理器601授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器614被设置电子设备600的正面、背面或侧面。在电子设备600上设置有物理按键或厂商Logo的情况下,指纹传感器614与物理按键或厂商Logo集成在一起。
光学传感器615用于采集环境光强度。在一个实施例中,处理器601能够基于光学传感器615采集的环境光强度,控制显示屏605的显示亮度。在一些实施例中,在环境光强度较高的情况下,调高显示屏605的显示亮度;在环境光强度较低的情况下,调低显示屏605的显示亮度。在另一个实施例中,处理器601还能够基于光学传感器615采集的环境光强度,动态调整摄像头组件606的拍摄参数。
接近传感器616,也称距离传感器,通常设置在电子设备600的前面板。接近传感器616用于采集用户与电子设备600的正面之间的距离。在一个实施例中,在接近传感器616检测到用户与电子设备600的正面之间的距离逐渐变小的情况下,由处理器601控制显示屏605从亮屏状态切换为息屏状态;在接近传感器616检测到用户与电子设备600的正面之间的距离逐渐变大的情况下,由处理器601控制显示屏605从息屏状态切换为亮屏状态。
本领域技术人员能够理解,图6中示出的结构并不构成对电子设备600的限定,在另一些实施例中,电子设备600包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种包括指令的计算机可读存储介质,例如包括指令的存储器602,上述指令由电子设备600的处理器601执行以完成下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
基于该目标拼接模板,获取该多张图片的排序信息,该排序信息用于指示该多张图片的显示顺序;
按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置;
按照所确定的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
基于每张图片的宽高比,确定每张图片的图片版式;
将对应图片数量最多的图片版式,确定为目标图片版式;
确定与该目标图片版式和该图片数量对应的目标拼接模板。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
在该图片的宽高比大于宽高比阈值的情况下,将该图片的图片版式确定为竖版;
在该图片的宽高比等于宽高比阈值的情况下,将该图片的图片版式确定为方版;
在该图片的宽高比小于宽高比阈值的情况下,将该图片的图片版式确定为横版。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
在至少两个图片版式对应的图片数量相同的情况下,将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前,该排序信息用于指示该多张图片的显示顺序。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
在该多张图片中存在待处理图片的情况下,按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。
在一些实施例中,该目标宽高比包括第一目标宽高比和第二目标宽高比;
上述指令由电子设备600的处理器601执行,还能完成下述步骤:
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比小于第一目标宽高比的情况下,对该待处理图片进行居中裁剪;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。
在一些实施例中,上述指令由电子设备600的处理器601执行,还能完成下述步骤:
识别该待处理图片中的人物位置;
以该人物位置为中心点,对该待处理图片进行居中裁剪。
在一些实施例中,计算机可读存储介质是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序产品,包括计算机程序,该计算机程序由电子设备的处理器601执行,以完成下述步骤:
响应于对作品的发布指令,获取该作品对应的多张图片;
基于图片数量及该多张图片的尺寸,确定目标拼接模板,该目标拼接模板与该图片数量以及尺寸匹配,该目标拼接模板用于确定图片的显示位置;
按照该目标拼接模板所指示的显示位置,拼接该多张图片,得到目标图片;
将该目标图片作为该作品的预览图片,发布该作品。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
基于该目标拼接模板,获取该多张图片的排序信息,该排序信息用于指示该多张图片的显示顺序;
按照该多张图片的排序信息,确定该多张图片在该目标拼接模板中所对应的显示位置;
按照所确定的显示位置,拼接该多张图片,得到该目标图片。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
基于每张图片的宽高比,确定每张图片的图片版式;
将对应图片数量最多的图片版式,确定为目标图片版式;
确定与该目标图片版式和该图片数量对应的目标拼接模板。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
在该图片的宽高比大于宽高比阈值的情况下,将该图片的图片版式确定为竖版;
在该图片的宽高比等于宽高比阈值的情况下,将该图片的图片版式确定为方版;
在该图片的宽高比小于宽高比阈值的情况下,将该图片的图片版式确定为横版。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
在至少两个图片版式对应的图片数量相同的情况下,将该至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为该目标拼接模板,该第一图片对应的排序信息所指示的显示顺序最靠前,该排序信息用于指示该多张图片的显示顺序。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
在该多张图片中存在待处理图片的情况下,按照该目标拼接模板对应的目标宽高比,调整该待处理图片的尺寸,该待处理图片为尺寸不符合该目标宽高比的图片。
在一些实施例中,该目标宽高比包括第一目标宽高比和第二目标宽高比;
该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为竖版,且该待处理图片的宽高比小于第一目标宽高比的情 况下,对该待处理图片进行居中裁剪;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放该待处理图片的宽和高;
在该待处理图片的图片版式为横版,且该待处理图片的宽高比大于第二目标宽高比的情况下,对该待处理图片进行居中裁剪。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
基于该待处理图片中的人物位置,对该待处理图片进行居中裁剪。
在一些实施例中,该计算机程序由电子设备的处理器601执行,还能完成下述步骤:
识别该待处理图片中的人物位置;
以该人物位置为中心点,对该待处理图片进行居中裁剪。
本公开所有实施例均能够单独被执行,还能够与其他实施例相结合被执行,均视为本公开要求的保护范围。

Claims (29)

  1. 一种作品处理方法,所述方法包括:
    响应于对作品的发布指令,获取所述作品对应的多张图片;
    基于图片数量及所述多张图片的尺寸,确定目标拼接模板,所述目标拼接模板与所述图片数量以及尺寸匹配,所述目标拼接模板用于确定图片的显示位置;
    按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片;
    将所述目标图片作为所述作品的预览图片,发布所述作品。
  2. 根据权利要求1所述的作品处理方法,其中,所述按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片包括:
    基于所述目标拼接模板,获取所述多张图片的排序信息,所述排序信息用于指示所述多张图片的显示顺序;
    按照所述多张图片的排序信息,确定所述多张图片在所述目标拼接模板中所对应的显示位置;
    按照所确定的显示位置,拼接所述多张图片,得到所述目标图片。
  3. 根据权利要求1所述的作品处理方法,其中,所述基于图片数量及所述多张图片的尺寸,确定目标拼接模板包括:
    基于每张图片的宽高比,确定每张图片的图片版式;
    将对应图片数量最多的图片版式,确定为目标图片版式;
    确定与所述目标图片版式和所述图片数量对应的目标拼接模板。
  4. 根据权利要求3所述的作品处理方法,其中,所述基于每张图片的宽高比,确定所述多张图片中每张图片的图片版式包括:
    在所述图片的宽高比大于宽高比阈值的情况下,将所述图片的图片版式确定为竖版;
    在所述图片的宽高比等于宽高比阈值的情况下,将所述图片的图片版式确定为方版;
    在所述图片的宽高比小于宽高比阈值的情况下,将所述图片的图片版式确定为横版。
  5. 根据权利要求3所述的作品处理方法,其中,所述方法还包括:
    在至少两个图片版式对应的图片数量相同的情况下,将所述至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为所述目标拼接模板,所述第一图片对应的排序信息所指示的显示顺序最靠前,所述排序信息用于指示所述多张图片的显示顺序。
  6. 根据权利要求1所述的作品处理方法,其中,所述方法还包括:
    在所述多张图片中存在待处理图片的情况下,按照所述目标拼接模板对应的目标宽高比, 调整所述待处理图片的尺寸,所述待处理图片为尺寸不符合所述目标宽高比的图片。
  7. 根据权利要求6所述的作品处理方法,其中,所述目标宽高比包括第一目标宽高比和第二目标宽高比;
    所述按照所述目标拼接模板对应的目标宽高比,调整所述待处理图片的尺寸包括:
    在所述待处理图片的图片版式为竖版,且所述待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;
    在所述待处理图片的图片版式为竖版,且所述待处理图片的宽高比小于第一目标宽高比的情况下,对所述待处理图片进行居中裁剪;
    在所述待处理图片的图片版式为横版,且所述待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;
    在所述待处理图片的图片版式为横版,且所述待处理图片的宽高比大于第二目标宽高比的情况下,对所述待处理图片进行居中裁剪。
  8. 根据权利要求7所述的作品处理方法,其中,所述对所述待处理图片进行居中裁剪包括:
    基于所述待处理图片中的人物位置,对所述待处理图片进行居中裁剪。
  9. 根据权利要求8所述的作品处理方法,其中,所述基于所述待处理图片中的人物位置,对所述待处理图片进行居中裁剪包括:
    识别所述待处理图片中的人物位置;
    以所述人物位置为中心点,对所述待处理图片进行居中裁剪。
  10. 一种作品处理装置,所述装置包括:
    获取单元,被配置为响应于对作品的发布指令,获取所述作品对应的多张图片;
    确定单元,被配置为基于图片数量及所述多张图片的尺寸,确定目标拼接模板,所述目标拼接模板与所述图片数量以及尺寸匹配,所述目标拼接模板用于确定图片的显示位置;
    拼接单元,被配置为按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片;
    发布单元,被配置为将所述目标图片作为所述作品的预览图片,发布所述作品。
  11. 根据权利要求10所述的作品处理装置,其中,所述拼接单元,被配置为基于所述目标拼接模板,获取所述多张图片的排序信息,所述排序信息用于指示所述多张图片的显示顺序;按照所述多张图片的排序信息,确定所述多张图片在所述目标拼接模板中所对应的显示位置;按照所确定的显示位置,拼接所述多张图片,得到所述目标图片。
  12. 根据权利要求10所述的作品处理装置,其中,所述确定单元包括版式确定子单元和模板确定子单元;
    所述版式确定子单元,被配置为基于每张图片的宽高比,确定每张图片的图片版式;
    所述版式确定子单元,还被配置为将对应图片数量最多的图片版式,确定为目标图片版式;
    所述模板确定子单元,被配置为确定与所述目标图片版式和所述图片数量对应的目标拼接模板。
  13. 根据权利要求12所述的作品处理装置,其中,所述版式确定子单元,被配置为在所述图片的宽高比大于宽高比阈值的情况下,将所述图片的图片版式确定为竖版;在所述图片的宽高比等于宽高比阈值的情况下,将所述图片的图片版式确定为方版;在所述图片的宽高比小于宽高比阈值的情况下,将所述图片的图片版式确定为横版。
  14. 根据权利要求12所述的作品处理装置,其中,所述模板确定子单元,还被配置为在至少两个图片版式对应的图片数量相同的情况下,则将所述至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为所述目标拼接模板,所述第一图片对应的排序信息所指示的显示顺序最靠前,所述排序信息用于指示所述多张图片的显示顺序。
  15. 根据权利要求10所述的作品处理装置,其中,所述装置还包括:
    调整单元,被配置为在所述多张图片中存在待处理图片的情况下,按照所述目标拼接模板对应的目标宽高比,调整所述待处理图片的尺寸,所述待处理图片为尺寸不符合所述目标宽高比的图片。
  16. 根据权利要求15所述的作品处理装置,其中,所述目标宽高比包括第一目标宽高比和第二目标宽高比;
    所述调整单元,被配置为在所述待处理图片的版式信息为竖版,且所述待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;在所述待处理图片的版式信息为竖版,且所述待处理图片的宽高比小于第一目标宽高比的情况下,对所述待处理图片进行居中裁剪;在所述待处理图片的版式信息为横版,且所述待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;在所述待处理图片的版式信息为横版,且所述待处理图片的宽高比大于第二目标宽高比的情况下,对所述待处理图片进行居中裁剪。
  17. 根据权利要求16所述的作品处理装置,其中,所述装置还包括:
    裁剪单元,被配置为基于所述待处理图片中的人物位置,对所述待处理图片进行居中裁 剪。
  18. 根据权利要求17所述的作品处理装置,其中,所述裁剪单元,被配置为识别所述待处理图片中的人物位置;以所述人物位置为中心点,对所述待处理图片进行居中裁剪。
  19. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现下述步骤:
    响应于对作品的发布指令,获取所述作品对应的多张图片;
    基于图片数量及所述多张图片的尺寸,确定目标拼接模板,所述目标拼接模板与所述图片数量以及尺寸匹配,所述目标拼接模板用于确定图片的显示位置;
    按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片;
    将所述目标图片作为所述作品的预览图片,发布所述作品。
  20. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    基于所述目标拼接模板,获取所述多张图片的排序信息,所述排序信息用于指示所述多张图片的显示顺序;
    按照所述多张图片的排序信息,确定所述多张图片在所述目标拼接模板中所对应的显示位置;
    按照所确定的显示位置,拼接所述多张图片,得到所述目标图片。
  21. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    基于每张图片的宽高比,确定每张图片的图片版式;
    将对应图片数量最多的图片版式,确定为目标图片版式;
    确定与所述目标图片版式和所述图片数量对应的目标拼接模板。
  22. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    在所述图片的宽高比大于宽高比阈值的情况下,将所述图片的图片版式确定为竖版;
    在所述图片的宽高比等于宽高比阈值的情况下,将所述图片的图片版式确定为方版;
    在所述图片的宽高比小于宽高比阈值的情况下,将所述图片的图片版式确定为横版。
  23. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以 实现下述步骤:
    在至少两个图片版式对应的图片数量相同的情况下,将所述至少两个图片版式对应的图片中,第一图片的图片版式所对应的拼接模板,确定为所述目标拼接模板,所述第一图片对应的排序信息所指示的显示顺序最靠前,所述排序信息用于指示所述多张图片的显示顺序。
  24. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    在所述多张图片中存在待处理图片的情况下,按照所述目标拼接模板对应的目标宽高比,调整所述待处理图片的尺寸,所述待处理图片为尺寸不符合所述目标宽高比的图片。
  25. 根据权利要求19所述的电子设备,其中,所述目标宽高比包括第一目标宽高比和第二目标宽高比;
    所述处理器还被配置为执行所述指令,以实现下述步骤:
    在所述待处理图片的图片版式为竖版,且所述待处理图片的宽高比大于等于第一目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;
    在所述待处理图片的图片版式为竖版,且所述待处理图片的宽高比小于第一目标宽高比的情况下,对所述待处理图片进行居中裁剪;
    在所述待处理图片的图片版式为横版,且所述待处理图片的宽高比小于等于第二目标宽高比的情况下,等比例缩放所述待处理图片的宽和高;
    在所述待处理图片的图片版式为横版,且所述待处理图片的宽高比大于第二目标宽高比的情况下,对所述待处理图片进行居中裁剪。
  26. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    在裁剪所述待处理图片的情况下,基于所述待处理图片中的人物位置,对所述待处理图片进行居中裁剪。
  27. 根据权利要求19所述的电子设备,其中,所述处理器还被配置为执行所述指令,以实现下述步骤:
    识别所述待处理图片中的人物位置;
    以所述人物位置为中心点,对所述待处理图片进行居中裁剪。
  28. 一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行以下步骤:
    响应于对作品的发布指令,获取所述作品对应的多张图片;
    基于图片数量及所述多张图片的尺寸,确定目标拼接模板,所述目标拼接模板与所述图片数量以及尺寸匹配,所述目标拼接模板用于确定图片的显示位置;
    按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片;
    将所述目标图片作为所述作品的预览图片,发布所述作品。
  29. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现以下步骤:
    响应于对作品的发布指令,获取所述作品对应的多张图片;
    基于图片数量及所述多张图片的尺寸,确定目标拼接模板,所述目标拼接模板与所述图片数量以及尺寸匹配,所述目标拼接模板用于确定图片的显示位置;
    按照所述目标拼接模板所指示的显示位置,拼接所述多张图片,得到目标图片;
    将所述目标图片作为所述作品的预览图片,发布所述作品。
PCT/CN2021/113713 2020-12-23 2021-08-20 作品处理方法及装置 WO2022134632A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011540248.9 2020-12-23
CN202011540248.9A CN112667835A (zh) 2020-12-23 2020-12-23 作品处理方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022134632A1 true WO2022134632A1 (zh) 2022-06-30

Family

ID=75408981

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113713 WO2022134632A1 (zh) 2020-12-23 2021-08-20 作品处理方法及装置

Country Status (2)

Country Link
CN (1) CN112667835A (zh)
WO (1) WO2022134632A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667835A (zh) * 2020-12-23 2021-04-16 北京达佳互联信息技术有限公司 作品处理方法、装置、电子设备及存储介质
CN113407189B (zh) * 2021-07-15 2023-11-17 广州博冠信息科技有限公司 图片物料的处理方法、装置、存储介质与电子设备
CN114118029A (zh) * 2021-11-29 2022-03-01 维沃移动通信有限公司 图像处理方法、装置、设备和存储介质
CN114564131B (zh) * 2022-03-01 2024-03-12 抖音视界有限公司 一种内容发布方法、装置、计算机设备及存储介质
CN115695937A (zh) * 2022-10-26 2023-02-03 努比亚技术有限公司 一种基于视频的截图拼图方法、设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893464A (zh) * 2016-03-28 2016-08-24 乐视控股(北京)有限公司 一种设置相册封面图片的方法、装置及手机
CN106658141A (zh) * 2016-11-29 2017-05-10 维沃移动通信有限公司 一种视频处理方法及移动终端
CN112116618A (zh) * 2020-09-08 2020-12-22 杭州艾耕科技有限公司 一种合成图片自动切割方法
CN112667835A (zh) * 2020-12-23 2021-04-16 北京达佳互联信息技术有限公司 作品处理方法、装置、电子设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106611404A (zh) * 2016-11-22 2017-05-03 维沃移动通信有限公司 一种选择拼图模板的方法及移动终端
CN106780314B (zh) * 2016-12-29 2020-02-07 维沃移动通信有限公司 一种拼图预览的方法及移动终端
CN107330858B (zh) * 2017-06-30 2020-12-04 北京乐蜜科技有限责任公司 一种图片处理方法、装置、电子设备及存储介质
CN111008933B (zh) * 2019-12-17 2022-07-12 荣耀终端有限公司 一种图片处理方法、装置、电子设备及存储介质
CN111461985A (zh) * 2020-03-31 2020-07-28 维沃移动通信有限公司 图片处理方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893464A (zh) * 2016-03-28 2016-08-24 乐视控股(北京)有限公司 一种设置相册封面图片的方法、装置及手机
CN106658141A (zh) * 2016-11-29 2017-05-10 维沃移动通信有限公司 一种视频处理方法及移动终端
CN112116618A (zh) * 2020-09-08 2020-12-22 杭州艾耕科技有限公司 一种合成图片自动切割方法
CN112667835A (zh) * 2020-12-23 2021-04-16 北京达佳互联信息技术有限公司 作品处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112667835A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
CN112162671B (zh) 直播数据处理方法、装置、电子设备及存储介质
WO2021008456A1 (zh) 图像处理方法、装置、电子设备及存储介质
US20210153629A1 (en) Method for processing images, electronic device, and storage medium
WO2022134632A1 (zh) 作品处理方法及装置
CN110841285B (zh) 界面元素的显示方法、装置、计算机设备及存储介质
CN108737897B (zh) 视频播放方法、装置、设备及存储介质
US11954200B2 (en) Control information processing method and apparatus, electronic device, and storage medium
US20220164159A1 (en) Method for playing audio, terminal and computer-readable storage medium
CN109922356B (zh) 视频推荐方法、装置和计算机可读存储介质
CN109862412B (zh) 合拍视频的方法、装置及存储介质
CN110769313B (zh) 视频处理方法及装置、存储介质
WO2022028241A1 (zh) 预览封面生成方法及电子设备
CN112565806B (zh) 虚拟礼物赠送方法、装置、计算机设备及介质
WO2022095465A1 (zh) 信息显示方法及装置
CN111897465B (zh) 弹窗显示方法、装置、设备及存储介质
CN111142838A (zh) 音频播放方法、装置、计算机设备及存储介质
US11720219B2 (en) Method, apparatus and device for displaying lyric, and storage medium
CN109783176B (zh) 切换页面的方法和装置
WO2022199102A1 (zh) 图像处理方法及装置
CN111539795A (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
CN111385525B (zh) 视频监控方法、装置、终端及系统
WO2022033272A1 (zh) 图像处理方法以及电子设备
CN108664300B (zh) 一种画中画模式下的应用界面显示方法及装置
CN111105474A (zh) 字体绘制方法、装置、计算机设备及计算机可读存储介质
CN113535039B (zh) 更新页面的方法、装置、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21908637

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.10.2023)