Image size adjustment method and apparatus, and device, readable storage medium and product

By only adjusting the background image in image size adjustment and re-adding decorative content according to the target size, the problem of loss of image content and cumbersome operation is solved, and the image quality and user experience are improved.

WO2024245110A1PCT designated stage expired Publication Date: 2024-12-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095039
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-05-23
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The existing image size adjustment methods can easily lead to loss of image content, and the user's operations are cumbersome and inaccurate, affecting the image quality.

Method used

By displaying the image to be adjusted and the preset adjustment controls, after the user determines the target adjustment size, only adjusts the background image, removes the decoration content, and determines the layout information of the decoration content based on the target size, and adds it to the adjusted background image superior.

Benefits of technology

It effectively avoids the loss of image content, improves image quality, simplifies user operations, and improves the accuracy and user experience of image size adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095039_05122024_PF_FP_ABST
    Figure CN2024095039_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are an image size adjustment method and apparatus, and a device, a readable storage medium and a product. The method comprises: displaying an image to be adjusted and a preset adjustment control, wherein the image to be adjusted is composed of a background image and decorative content; in response to a trigger operation of a user on the adjustment control, determining a target adjustment size, which is determined by the user on the basis of the adjustment control; on the basis of the target adjustment size, performing a size adjustment operation on the background image, so as to obtain an adjusted background image; and according to the target adjustment size, determining layout information corresponding to the decorative content, and adding the decorative content to the adjusted background image on the basis of the layout information, so as to obtain a target image. Therefore, on the basis of ensuring that decorative content in an image to be adjusted is not lost, the decorative content can have a better layout, thereby improving the image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Image size adjustment method, device, equipment, readable storage medium and product

[0001] This application claims priority to Chinese invention patent application number 202310640029.5 filed on May 31, 2023, entitled “Image resizing method, device, apparatus, readable storage medium and product”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to an image resizing method, apparatus, device, readable storage medium, and product. Background Art

[0003] During the image generation process, the generated image size may not meet the user's personalized needs, and the user may need to adjust the image size. For example, a user may generate a poster based on a preset image material, including image material, background, text, and pattern decorations. However, the poster size may not meet the user's personalized needs, and the user may need to adjust the poster size.

[0004] Current resizing operations generally directly resize images based on a target size determined by the user. However, using these methods to resize images may result in loss of valid content in the image, resulting in poor image resizing results.

[0005] Summary of the Invention

[0006] The embodiments of the present disclosure provide an image resizing method, apparatus, device, readable storage medium, and product, which are used to solve the technical problem that current image resizing methods may cause loss of image content.

[0007] In a first aspect, an embodiment of the present disclosure provides an image resizing method, comprising: displaying an image to be adjusted and a preset adjustment control, wherein the image to be adjusted consists of a background image and decorative content; in response to a user triggering an operation on the adjustment control, determining a target adjustment size determined by the user based on the adjustment control; performing a resizing operation on the background image based on the target adjustment size to obtain an adjusted background image; determining layout information corresponding to the decorative content according to the target adjustment size, and adding the decorative content to the adjusted background image based on the layout information to obtain a target image.

[0008] In a second aspect, an embodiment of the present disclosure provides an image resizing device, comprising: a display module for displaying an image to be adjusted and a preset adjustment control, wherein the image to be adjusted consists of a background image and decorative content; a determination module for determining, in response to a user triggering an operation on the adjustment control, a target adjustment size determined by the user based on the adjustment control; an adjustment module for performing a resizing operation on the background image based on the target adjustment size to obtain an adjusted background image; and an adding module for determining layout information corresponding to the decorative content according to the target adjustment size, and adding the decorative content to the adjusted background image based on the layout information to obtain a target image.

[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the image size adjustment method described in the first aspect and various possible designs of the first aspect.

[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the image size adjustment method described in the first aspect and various possible designs of the first aspect is implemented.

[0011] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image size adjustment method described in the first aspect and various possible designs of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] FIG1 is a schematic diagram of a flow chart of an image size adjustment method provided by an embodiment of the present disclosure;

[0014] FIG2 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure;

[0015] FIG3 is a schematic diagram of a flow chart of an image size adjustment method provided by yet another embodiment of the present disclosure;

[0016] FIG4 is a schematic diagram of an image cropping method provided by an embodiment of the present disclosure;

[0017] FIG5 is a schematic diagram of a flow chart of an image size adjustment method provided by yet another embodiment of the present disclosure;

[0018] FIG6 is a schematic structural diagram of an image size adjustment device provided by an embodiment of the present disclosure;

[0019] FIG7 is a schematic structural diagram of an electronic device 700 provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0021] In order to solve the technical problem that current image resizing methods may cause loss of image content, the present disclosure provides an image resizing method, apparatus, device, readable storage medium and product.

[0022] It should be noted that the image resizing method, apparatus, device, readable storage medium, and product provided by the present disclosure can be applied to any application scenario of resizing an image.

[0023] Current image resizing methods typically resize images randomly based on a user-specified size. Alternatively, they resize images based on a manually defined cropping area. However, the first method can cause the loss of text and decorative content, impacting image quality. The second method requires manual resizing, which is cumbersome and inaccurate, resulting in a poor user experience.

[0024] In the process of solving the above technical problems, the inventors discovered through research that, in order to quickly resize an image without losing detail, the decorative content in the image to be resized can be removed during the resizing process, and only the background image can be resized. Furthermore, after the background image is resized, the decorative content can be added to the resized background image to obtain the target image.

[0025] FIG1 is a flow chart of an image resizing method according to an embodiment of the present disclosure. As shown in FIG1 , the method includes:

[0026] Step 101: Display an image to be adjusted and preset adjustment controls, wherein the image to be adjusted consists of a background image and decorative content.

[0027] The execution subject of this embodiment is an image resizing device. This image resizing device can be coupled to a terminal device, thereby enabling image resizing operations based on a user's triggering operation on the terminal device. Alternatively, the image resizing device can be coupled to a server that is communicatively connected to the terminal device. This allows the terminal device to transmit an image resizing request to enable image resizing operations and control the terminal device to display the cropped target image.

[0028] In this embodiment, a user can perform image adjustment operations on a terminal device for an image to be adjusted. In some embodiments, the image to be adjusted can be uploaded by the user to a preset storage path, or generated by the terminal device based on user-uploaded image material and user-defined decorative content, which is not limited by this disclosure. In some embodiments, the image to be adjusted can include a background image and decorative content. The background image can be composed of at least one layer. The decorative content can include text decorative content, pattern decorative content, etc.

[0029] For example, the image to be adjusted may be a poster corresponding to a certain object, and the poster may include a background image composed of at least one layer, text decoration content, pattern decoration content, etc.

[0030] To enable image resizing of an image to be edited, the image to be resized and preset resizing controls may be displayed. Optionally, the image to be resized may be displayed in a first display area of ​​the display interface, and the resizing controls may be displayed in a second display area. In some embodiments, the first and second display areas may be arranged vertically or horizontally, or the second display area may be displayed within the first display area, although this disclosure does not limit this.

[0031] Step 102: In response to a user triggering operation on the adjustment control, determining a target adjustment size determined by the user based on the adjustment control.

[0032] In this embodiment, after the adjustment control is displayed, the user can trigger the adjustment control. In some embodiments, the triggering operation includes but is not limited to single-clicking, double-clicking, long pressing, dragging, etc. The user can determine the target adjustment size based on the adjustment control, so that the image to be edited can be resized based on the target adjustment size.

[0033] Step 103: resize the background image based on the target resize to obtain an adjusted background image.

[0034] In this embodiment, since the image to be adjusted includes a background image and decorative content, directly resizing the image to be edited may cause the decorative content to be cropped, thereby affecting image quality.

[0035] Therefore, in order to adjust the image size without losing the decorative content in the image to be adjusted, the decorative content in the image to be edited can be removed, and the background image can be resized based on the target adjustment size to obtain the adjusted background image.

[0036] It should be noted that the resizing operation performed on the background image based on the target resizing includes but is not limited to adjustment operations such as cropping and stretching.

[0037] Step 104 : Determine layout information corresponding to the decoration content according to the target adjustment size, and add the decoration content to the adjusted background image based on the layout information to obtain a target image.

[0038] In this embodiment, after the background image is resized, the decorative content can be re-added to the resized background image. However, after cropping the background image, the background image size changes. Adding the decorative content based on the original position may extend beyond the position of the resized background image. Therefore, to properly position the decorative content, the layout information corresponding to the decorative content can be determined based on the target resized image. Based on the layout information, the decorative content can be added to the resized background image to obtain the target image.

[0039] The image resizing method provided in this embodiment removes the decorative content from the image to be resized after determining the target resize, and then resizes the background image based solely on the target resize. After cropping, the layout information corresponding to the decorative content is determined based on the target resize. Based on this layout information, the decorative content is added to the resized background image to obtain the target image. This ensures that the decorative content in the image to be resized is not lost while maintaining a better layout of the decorative content, thereby improving image quality.

[0040] Optionally, based on any of the above embodiments, step 102 includes: in response to the user triggering the adjustment control, displaying a preset resize generation page, the resize generation page including at least one preset resize; and in response to the user selecting the at least one preset resize on the resize generation page, determining the user-selected resize as the target resize.

[0041] In this embodiment, a plurality of adjustment sizes may be preset for the user to select, for example, the adjustment sizes include 1080*1080, 1080*1920, 940*788, etc.

[0042] In response to a user triggering an adjustment control, a preset resize generation page may be displayed, wherein the resize generation page displays at least one preset adjustment size. The user may select an adjustment size on the resize generation page based on actual needs. In response to the user selecting any adjustment size, the user-selected adjustment size may be determined as the target adjustment size.

[0043] FIG2 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure. As shown in FIG2 , an image 21 to be adjusted and a preset adjustment control 22 may be displayed. In response to a user triggering adjustment control 22, a preset adjustment size generation page 23 may be displayed. Adjustment size generation page 23 includes at least one preset adjustment size 24. The user may select from the at least one preset adjustment size 24 based on actual needs, and the selected adjustment size 24 is determined as the target adjustment size.

[0044] The image resizing method provided in this embodiment displays at least one preset resizing size on the resizing generation page in response to a user triggering operation on an resizing control, thereby enabling the user to quickly determine the target resizing size through a simple triggering operation, thereby enriching the interaction method and simplifying the method for determining the target resizing size.

[0045] Optionally, based on any of the above embodiments, step 102 includes: in response to the user triggering the resize control, displaying a preset resize generation page, the resize generation page including the resize creation control; and in response to the user triggering the resize creation control, obtaining a target resize input by the user based on the resize creation control.

[0046] In this embodiment, the user can customize the target adjustment size based on actual needs. In response to the user triggering the adjustment control, a preset adjustment size generation page is displayed, which includes an adjustment size creation control. In some embodiments, the adjustment size creation control can be a numeric input control. The user can enter a customized adjustment size based on the adjustment size creation control, and the target adjustment size entered by the user in the adjustment size creation control is used.

[0047] The image resizing method provided in this embodiment displays a resizing creation control on the resizing generation page in response to the user's triggering operation on the resizing control, so that the user can determine a customized target resizing size based on the resizing creation control, so that the size of the adjusted target image is more in line with the user's personalized needs.

[0048] Optionally, based on any of the above embodiments, step 102 includes: in response to the user triggering the adjustment control, determining the image parameters corresponding to the image to be adjusted, wherein the image parameters include at least one of the background image size, the number of decorative contents, and the decorative content size.

[0049] A target layout template matching the image parameters is determined from a plurality of preset image layout templates, wherein the image layout template includes image size and decoration content layout parameters.

[0050] The adjustment size corresponding to the target layout template is determined as the target adjustment size.

[0051] In this embodiment, a variety of different image layout templates may be preset, wherein the image layout templates define image size and decoration content layout parameters.

[0052] After acquiring the image to be adjusted, in response to a user triggering an adjustment control, image parameters corresponding to the image to be adjusted can be determined, where the image parameters include at least one of background image size, number of decorative elements, and decorative element size. Based on the image parameters, a target layout template that matches the image parameters is determined from among multiple image layout templates.

[0053] For example, if the image to be adjusted includes five decorative contents, the display positions of the decorative contents can be determined separately. Based on the number and display positions, an image layout template with the same number of the images to be adjusted and similar display positions is determined as the target layout template from multiple image layout templates.

[0054] In order to automatically determine the target adjustment size, after determining the target layout template, the adjustment size corresponding to the target layout template may be determined as the target adjustment size.

[0055] The image resizing method provided in this embodiment determines a target layout template based on image parameters corresponding to the image to be adjusted, and determines a target resizing size based on the target layout template, thereby automatically determining a target resizing size that matches the image to be adjusted, thereby simplifying the operational process of image resizing.

[0056] FIG3 is a flowchart of an image size adjustment method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG3 , step 103 includes the following steps 301 and 302 .

[0057] Step 301: Identify whether the background image includes a target object and obtain a recognition result.

[0058] Step 302: resize the background image according to the recognition result and the target resize to obtain an adjusted background image.

[0059] In this embodiment, the background image may include a significant target object, such as a portrait, pattern, or logo. To avoid cropping the target object during the cropping process, which would result in an incomplete background image, it is possible to identify whether the background image includes the target object before cropping to obtain a recognition result. In some embodiments, the target object can be recognized using a preset recognition algorithm. For example, the recognition algorithm can be a neural network model capable of recognizing significant features. Alternatively, the target object can be recognized using any method capable of recognizing significant features, and this disclosure does not limit this.

[0060] Furthermore, for different recognition results, a size adjustment operation may be performed on the background image according to the recognition result and the target size adjustment to obtain an adjusted background image.

[0061] The image resizing method provided in this embodiment uses a preset recognition algorithm to identify whether a background image includes a target object and obtain a recognition result. Based on the recognition result, the background image is resized, thereby preventing the loss of part of the target object during cropping and improving image quality.

[0062] Further, based on any of the above embodiments, step 302 includes: if the recognition result indicates that the background image includes the target object, resizing the background image around the target object according to the target resizing to obtain the resized background image, wherein the resized background image includes at least a portion of the target object. If the recognition result indicates that the background image does not include the target object, randomly resizing the background image according to the target resizing to obtain the resized background image.

[0063] In this embodiment, if it is detected that the background image includes a target object, in order to avoid cropping the target object during the cropping process, resulting in an incomplete background image, during the cropping process, the background image can be resized around the target object according to the target adjustment size to obtain an adjusted background image, wherein the adjusted background image includes at least part of the target object.

[0064] For example, the target object may be a portrait. During the cropping process, resizing can be performed around the portrait. If the target object is small, the resizing process around the portrait can crop the body while preserving the face.

[0065] Alternatively, if the recognition result indicates that the background image does not include the target object, no effective content will be cropped during the cropping process. Therefore, the background image can be randomly resized according to the target resize to obtain an adjusted background image.

[0066] Figure 4 is a schematic diagram of image cropping provided by an embodiment of the present disclosure. As shown in Figure 4, the background image 41 may include a target object 42. During the cropping process, a size adjustment operation can be performed around the target object 42 according to the target adjustment size to obtain an adjusted background image 43, wherein the adjusted background image 43 includes at least part of the target object 42.

[0067] The image resizing method provided in this embodiment performs a resizing operation around a target image when the target object exists in a background image, thereby avoiding the loss of part of the target object image during the cropping process and improving image quality.

[0068] FIG5 is a flowchart of an image resizing method according to another embodiment of the present disclosure. Based on any of the above embodiments, the decoration content includes text decoration content and pattern decoration content. As shown in FIG5 , step 104 includes the following steps 501 , 502 , and 503 .

[0069] Step 501: Determine first layout information of the text decoration content according to the image size corresponding to the image to be adjusted and the target adjustment size.

[0070] Step 502: Determine second layout information corresponding to the pattern decoration content according to display parameters of the pattern decoration content in the image to be adjusted.

[0071] Step 503: Add the text decoration content and the pattern decoration content to the adjusted background image based on the first layout information and the second layout information respectively to obtain a target image.

[0072] In this embodiment, the decoration content includes text decoration content and pattern decoration content. Still taking the image to be edited as an item poster as an example, the text decoration content can be a copywriting introduction corresponding to the item, and the pattern decoration content can be a relatively beautiful small pattern.

[0073] In the process of placing the decorative content on the adjusted background image, in order to make the overall placement result more beautiful, first layout information of the text decorative content and second layout information corresponding to the pattern decorative content may be determined separately.

[0074] Optionally, the image cropping process may cause the layout of the image to be edited to change from a horizontal layout to a vertical layout, or vice versa. This change in layout may also cause a change in the text layout. Therefore, the first layout information of the text decoration content can be determined based on the image size corresponding to the image to be adjusted and the target adjustment size.

[0075] Furthermore, for the pattern decoration content, second layout information can be determined based on the display parameters of the image to be edited, ensuring that the display effect of the pattern decoration content remains unchanged in both the target image and the image to be edited. Therefore, based on the first layout information and the second layout information, the text decoration content and the pattern decoration content can be added to the adjusted background image, respectively, to obtain the target image.

[0076] The image size adjustment method provided in this embodiment determines the first layout information of the text decoration content based on the image size corresponding to the image to be adjusted and the target adjustment size, and determines the second layout information corresponding to the pattern decoration content according to the display parameters of the pattern decoration content in the image to be adjusted, thereby improving the display effect of the decoration content in the target image.

[0077] Further, based on any of the above embodiments, step 501 includes: for the text decoration content arranged horizontally and / or vertically in the image to be adjusted, if the width in the image size corresponding to the image to be adjusted is greater than the height, and the width in the target adjustment size is less than the height, then determining that the first layout information of the text decoration content is a horizontal layout. If the height in the image size corresponding to the image to be adjusted is greater than the width, and the height in the target adjustment size is less than the width, then determining that the first layout information of the text decoration content is a vertical layout. For the text decoration content displayed in the center of the image to be adjusted, determining that the first layout information of the text decoration content is a centered layout.

[0078] In this embodiment, to enhance the aesthetics of the layout of the text decoration content, for text decoration content arranged horizontally and / or vertically in the image to be adjusted, if the width of the image to be adjusted is greater than the height, and the width of the target adjustment size is less than the height, the first layout information of the text decoration content is determined to be a horizontal layout. If the height of the image to be adjusted is greater than the width, and the height of the target adjustment size is less than the width, the first layout information of the text decoration content is determined to be a vertical layout.

[0079] For example, when a vertical image to be adjusted is switched to a horizontal target image, the layout of the text decoration content is adjusted to left-right layout. When a horizontal image to be adjusted is switched to a vertical target image, the layout of the text decoration content is adjusted to top-bottom layout.

[0080] Optionally, for the text decoration content displayed in the center of the image to be adjusted, the first layout information of the text decoration content is determined to be a center layout. For example, image cropping has little effect on the centered text decoration content, so the centered pure text can still be in the center position.

[0081] The image resizing method provided in this embodiment adjusts the layout of text decoration content to a left-right layout when switching from a vertical image to a horizontal target image. When switching from a horizontal image to a vertical target image, the layout of text decoration content is adjusted to a top-to-bottom layout. Centered plain text remains centered, thereby enhancing the aesthetics of text decoration content in the target image and improving image quality.

[0082] Further, based on any of the above embodiments, step 502 includes: determining the position information of the pattern decoration content in the image to be adjusted. If the pattern decoration content is within the preset target area, then controlling the text decoration content to remain within the preset target area in the adjusted background image. If the pattern decoration content is outside the preset target area and overlaps with other decoration contents, then determining the covering information of the pattern decoration content and other decoration contents in the image to be adjusted, and then determining the display position of the pattern device content in the adjusted background image based on the covering information and the display position of other decoration contents. If the pattern decoration content is outside the preset target area and does not overlap with other decoration contents, then determining the blank area in the image to be adjusted, then controlling the pattern decoration content to be displayed within the blank area to obtain the second layout information.

[0083] In this embodiment, for the pattern decoration content, the second layout information may be determined according to the display parameters in the image to be edited, so that the display effect of the pattern decoration content remains unchanged in the target image and the image to be edited.

[0084] Optionally, the position information of the pattern decoration content in the image to be adjusted can be determined. If the pattern decoration content is within a preset target area, the text decoration content is controlled to remain within the preset target area in the adjusted background image. In some embodiments, the target area can be a corner area. For example, the pattern decoration content located in the corner remains in the corner position after the background image is cropped, so that the display effect of the pattern decoration content in the target image and the image to be edited remains unchanged.

[0085] Optionally, if the decorative pattern content is outside the preset target area and overlaps with other decorative content, information about the overlap between the decorative pattern content and the other decorative content in the image to be adjusted is determined, and the display position of the decorative pattern content in the adjusted background image is determined based on the overlap information and the display position of the other decorative content. For example, if the decorative pattern content is located on a target object in the image to be edited, thereby obscuring the target object, the decorative pattern content may still be placed on the target object after the background image is cropped, thereby obscuring the target object.

[0086] Alternatively, if the decorative pattern content is outside the preset target area and does not overlap with other decorative content, a blank area in the image to be adjusted is determined, and the decorative pattern content is controlled to be displayed within the blank area, thereby obtaining second layout information. For decorative pattern content located within the blank area of ​​the image to be edited, after the background image is cropped, the decorative pattern content may still be placed within the blank area of ​​the adjusted background image.

[0087] The image size adjustment method provided in this embodiment makes the pattern decoration content in the corners more beautiful and improves the image quality by continuing to place the pattern decoration content in the corners according to the relative position, continuing to overlap the pattern decoration content that overlaps with other decoration content with other decoration content, and filling the pattern decoration content that is outside the preset target area and does not overlap with other decoration content into the blank area of ​​the new size according to the original position.

[0088] Figure 6 is a structural schematic diagram of the image resizing device provided by an embodiment of the present disclosure. As shown in Figure 6, the device includes: a display module 61, a determination module 62, an adjustment module 63, and an addition module 64. In some embodiments, the display module 61 is used to display the image to be adjusted and a preset adjustment control, wherein the image to be adjusted consists of a background image and decorative content. The determination module 62 is used to determine the target adjustment size determined by the user based on the adjustment control in response to the user's triggering operation on the adjustment control. The adjustment module 63 is used to perform a size adjustment operation on the background image based on the target adjustment size to obtain an adjusted background image. The addition module 64 is used to determine the layout information corresponding to the decorative content according to the target adjustment size, and add the decorative content to the adjusted background image based on the layout information to obtain a target image.

[0089] Further, based on any of the above embodiments, the determination module is configured to: in response to the user triggering the adjustment control, display a preset resize generation page, wherein the resize generation page includes at least one preset resize; and in response to the user selecting the at least one preset resize on the resize generation page, determine the user-selected resize as the target resize.

[0090] Further, based on any of the above embodiments, the determining module is configured to: in response to the user triggering the resizing control, display a preset resizing generation page, the resizing generation page including the resizing creation control; and in response to the user triggering the resizing creation control, obtain a target resizing input by the user based on the resizing creation control.

[0091] Further, based on any of the above embodiments, the determination module is configured to: in response to a user triggering operation on the adjustment control, determine image parameters corresponding to the image to be adjusted, wherein the image parameters include at least one of background image size, number of decorative content, and decorative content size; determine a target layout template that matches the image parameters from a plurality of preset image layout templates, wherein the image layout template includes image size and decorative content layout parameters; and determine the adjustment size corresponding to the target layout template as the target adjustment size.

[0092] Furthermore, based on any of the above embodiments, the adjustment module is configured to: identify whether the background image includes a target object to obtain a recognition result, and resize the background image according to the recognition result and the target resize to obtain an adjusted background image.

[0093] Further, based on any of the above embodiments, the adjustment module is configured to: if the recognition result indicates that the background image includes the target object, resize the background image around the target object according to the target resize to obtain the resized background image, wherein the resized background image includes at least a portion of the target object; and if the recognition result indicates that the background image does not include the target object, perform a random resize operation on the background image according to the target resize to obtain the resized background image.

[0094] Furthermore, based on any of the above embodiments, the decorative content includes text decorative content and pattern decorative content. The adding module is configured to: determine first layout information for the text decorative content based on the image size corresponding to the image to be adjusted and the target adjustment size; determine second layout information corresponding to the pattern decorative content based on display parameters of the pattern decorative content in the image to be adjusted; and add the text decorative content and pattern decorative content to the adjusted background image based on the first layout information and the second layout information, respectively, to obtain a target image.

[0095] Furthermore, based on any of the above embodiments, the adding module is used to: for the text decoration content arranged horizontally and / or vertically in the image to be adjusted, if the width in the image size corresponding to the image to be adjusted is greater than the height, and the width in the target adjustment size is less than the height, then determine that the first layout information of the text decoration content is a horizontal layout. If the height in the image size corresponding to the image to be adjusted is greater than the width, and the height in the target adjustment size is less than the width, then determine that the first layout information of the text decoration content is a vertical layout. For the text decoration content displayed in the center of the image to be adjusted, determine that the first layout information of the text decoration content is a centered layout.

[0096] Further, based on any of the above embodiments, the adding module is used to: determine the position information of the pattern decoration content in the image to be adjusted. If the pattern decoration content is within the preset target area, the text decoration content is controlled to remain within the preset target area in the adjusted background image. If the pattern decoration content is outside the preset target area and overlaps with other decoration contents, the covering information of the pattern decoration content and other decoration contents in the image to be adjusted is determined, and the display position of the pattern device content in the adjusted background image is determined according to the covering information and the display position of other decoration contents. If the pattern decoration content is outside the preset target area and does not overlap with other decoration contents, the blank area in the image to be adjusted is determined, and the pattern decoration content is controlled to be displayed within the blank area to obtain the second layout information.

[0097] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0098] In order to implement the above embodiment, an embodiment of the present disclosure further provides an electronic device, including: a processor and a memory.

[0099] The memory stores computer-executable instructions.

[0100] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image size adjustment method as described in any one of the above embodiments.

[0101] FIG7 is a schematic diagram of the structure of an electronic device 700 provided in an embodiment of the present disclosure. As shown in FIG7 , the electronic device 700 may be a terminal device or a server. In some embodiments, the terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG7 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0102] As shown in FIG7 , the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0103] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 7 shows an electronic device 700 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0105] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0106] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image size adjustment method as described in any of the above embodiments is implemented.

[0107] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program. When the computer program is executed by a processor, the image size adjustment method as described in any of the above embodiments is implemented.

[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0110] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some embodiments, the name of a unit does not necessarily limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0113] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0114] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0116] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0117] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A method for adjusting image size, comprising: Displaying an image to be adjusted and preset adjustment controls, wherein the image to be adjusted consists of a background image and decorative content; In response to a triggering operation of the adjustment control by the user, determining a target adjustment size determined by the user based on the adjustment control; Performing a size adjustment operation on the background image based on the target size adjustment to obtain an adjusted background image; The layout information corresponding to the decoration content is determined according to the target adjustment size, and the decoration content is added to the adjusted background image based on the layout information to obtain a target image.

2. The method according to claim 1, wherein: The step of determining, in response to a triggering operation of the adjustment control by the user, a target adjustment size determined by the user based on the adjustment control, comprises: In response to the user triggering operation on the adjustment control, displaying a preset adjustment size generation page, wherein the adjustment size generation page includes at least one preset adjustment size; In response to the user's selection operation on the at least one preset resize in the resize generation page, the resize selected by the user is determined as the target resize.

3. The method according to claim 1, wherein: The step of determining, in response to a triggering operation of the adjustment control by the user, a target adjustment size determined by the user based on the adjustment control, comprises: In response to the user triggering operation on the adjustment control, displaying a preset adjustment size generation page, wherein the adjustment size generation page includes an adjustment size creation control; In response to the user's triggering operation on the resize creation control, a target resize input by the user based on the resize creation control is acquired.

4. The method according to claim 1, wherein: The step of determining, in response to a triggering operation of the adjustment control by the user, a target adjustment size determined by the user based on the adjustment control, comprises: In response to a user triggering operation on the adjustment control, determining image parameters corresponding to the image to be adjusted, wherein the image parameters include at least one of background image size, decoration content quantity, and decoration content size; Determining a target layout template that matches the image parameters from among a plurality of preset image layout templates, wherein the image layout template includes image size and decoration content layout parameters; The adjustment size corresponding to the target layout template is determined as the target adjustment size.

5. The method according to claim 1, wherein: The step of performing a size adjustment operation on the background image based on the target size adjustment to obtain the adjusted background image includes: Identify whether the background image includes a target object, and obtain a recognition result; The background image is resized according to the recognition result and the target resize to obtain an adjusted background image.

6. The method according to claim 5, wherein: The step of performing a size adjustment operation on the background image according to the recognition result and the target size adjustment to obtain an adjusted background image includes: If the recognition result is that the target object is included in the background image, resizing the background image around the target object according to the target resizing to obtain the adjusted background image, wherein the adjusted background image includes at least a portion of the target object; If the recognition result is that the background image does not include the target object, a random resizing operation is performed on the background image according to the target resizing to obtain the adjusted background image.

7. The method according to any one of claims 1 to 6, wherein: The decoration content includes text decoration content and pattern decoration content; The step of determining layout information corresponding to the decoration content according to the target adjustment size, and adding the decoration content to the adjusted background image based on the layout information to obtain the target image includes: Determine first layout information of the text decoration content according to the image size corresponding to the image to be adjusted and the target adjustment size; determining second layout information corresponding to the pattern decoration content according to display parameters of the pattern decoration content in the image to be adjusted; The text decoration content and the pattern decoration content are added to the adjusted background image based on the first layout information and the second layout information respectively to obtain a target image.

8. The method according to claim 7, wherein: The determining the first layout information of the text decoration content according to the image size corresponding to the image to be adjusted and the target adjustment size includes: For the text decoration content arranged horizontally and / or vertically in the image to be adjusted, if the width of the image size corresponding to the image to be adjusted is greater than the height, and the width of the target adjustment size is less than the height, then the first layout information of the text decoration content is determined to be a horizontal layout; if the image size corresponding to the image to be adjusted is greater than the height, and the width of the target adjustment size is less than the height, then the first layout information of the text decoration content is determined to be a horizontal layout; If the height of the corresponding image size is greater than the width, and the height of the target adjustment size is less than the width, then determining that the first layout information of the text decoration content is a vertical layout; For the text decoration content displayed in the center of the image to be adjusted, it is determined that the first layout information of the text decoration content is a center layout.

9. The method according to claim 7, wherein: The determining, according to the display parameters of the pattern decoration content in the image to be adjusted, the second layout information corresponding to the pattern decoration content includes: Determining position information of the pattern decoration content in the image to be adjusted; If the pattern decoration content is within the preset target area, controlling the text decoration content to remain within the preset target area in the adjusted background image; If the pattern decoration content is outside the preset target area and overlaps with other decoration content, then determine the covering information of the pattern decoration content and other decoration content in the image to be adjusted, and then determine the display position of the pattern device content in the adjusted background image according to the covering information and the display position of other decoration content; If the pattern decoration content is outside the preset target area and does not overlap with other decoration content, a blank area in the image to be adjusted is determined, and the pattern decoration content is controlled to be displayed in the blank area to obtain the second layout information.

10. An image size adjustment device, comprising: A display module, used for displaying an image to be adjusted and preset adjustment controls, wherein the image to be adjusted is composed of a background image and decorative content; a determination module, configured to determine, in response to a triggering operation of the adjustment control by the user, a target adjustment size determined by the user based on the adjustment control; An adjustment module, configured to perform a size adjustment operation on the background image based on the target size adjustment to obtain an adjusted background image; The adding module is used to determine the layout information corresponding to the decoration content according to the target adjustment size, and add the decoration content to the adjusted background image based on the layout information to obtain the target image.

11. An electronic device, comprising: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs The image resizing method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the image size adjustment method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for adjusting the image size according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Image size adjustment method and device, equipment, readable storage medium and product

    CN116661930A

  • Method and device for achieving automatic adjusting of images

    CN104240180A

  • Image processing method and electronic device

    CN104423946A

  • Picture processing method and apparatus

    CN105678686A

  • Picture modification method and device

    CN107092428A