Methods, apparatus, devices, readable storage media, and products for adjusting image size.

The method and apparatus adjust image size by resizing the background image while preserving decorative content, addressing content loss and improving image quality through automated layout adjustments.

JP2026520483APending Publication Date: 2026-06-23BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-05-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Current image size adjustment methods often result in the loss of image content and degrade image quality due to manual resizing based on user-determined sizes, leading to a poor user experience.

Method used

A method and apparatus that adjusts image size by removing decorative content from the background image, resizing the background image based on a user-defined or preset target size, and then re-adding the decorative content according to layout information to maintain image integrity.

Benefits of technology

Preserves image content and enhances image quality by ensuring decorative elements are not lost during resizing, allowing for precise and user-friendly image adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026520483000001_ABST
    Figure 2026520483000001_ABST
Patent Text Reader

Abstract

Embodiments of this disclosure provide a method, apparatus, device, readable storage medium, and product for adjusting image size. The method includes displaying an image to be adjusted and preset adjustment controls, wherein the image to be adjusted consists of a background image and decorative content; determining a target adjustment size determined by the user based on the adjustment controls in response to a user trigger operation on the adjustment controls; performing a size adjustment operation on the background image based on the target adjustment size and obtaining the adjusted background image; determining layout information corresponding to the decorative content based on the target adjustment size; adding the decorative content to the adjusted background image based on the layout information and obtaining the target image. Thus, provided that the decorative content of the image to be adjusted is not lost, the decorative content can be laid out more effectively, and the image quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] [Cross - Reference to Related Applications] This application claims priority to a Chinese patent application with an application number of 202310640029.5 and a title of "Method, Apparatus, Device, Readable Storage Medium, and Product for Adjusting Image Size", filed on May 31, 2023, and the entire content of this application is incorporated herein by reference.

[0002] Embodiments of the present disclosure relate to the field of image processing technology, and in particular, to a method, apparatus, device, readable storage medium, and product for adjusting image size.

Background Art

[0003] In the process of generating an image, the size of the generated image may not meet the individual needs of the user, and the user may also need to adjust the image size. For example, based on a preset image material, the user can generate a poster including the image material, background, text, and pattern decoration. However, the size of this poster may not meet the individual needs of the user, and the user may also need to perform an operation to adjust the size of this poster.

[0004] Current size adjustment operations generally depend on the target size determined by the user and directly perform size adjustment operations on the image. However, when adjusting the image size by the above method, the effective content in the image may be lost, and the effect of image size adjustment may decrease.

Summary of the Invention

[0005] Embodiments of the present disclosure provide a method, apparatus, device, readable storage medium, and product for adjusting image size, which are used to solve the technical problem that the current image size adjustment method may cause loss of image content.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for adjusting the size of an image. This method includes displaying an image to be adjusted and preset adjustment controls, wherein the image to be adjusted consists of a background image and decorative content; determining a target adjustment size determined by the user based on the adjustment controls in response to a user trigger operation on the adjustment controls; performing a size adjustment operation on the background image based on the target adjustment size and obtaining the adjusted background image; determining layout information corresponding to the decorative content based on the target adjustment size; adding the decorative content to the adjusted background image based on the layout information and obtaining the target image.

[0007] In a second aspect, an apparatus for adjusting image size is provided in an embodiment of the present disclosure. The apparatus comprises a display module used to display an image to be adjusted and preset adjustment controls, wherein the image to be adjusted is comprised of a display module consisting of a background image and decorative content; a determination module used by the user to determine a target adjustment size based on the adjustment controls in response to a user trigger operation on the adjustment controls; an adjustment module used to perform a size adjustment operation on the background image based on the target adjustment size and to obtain an adjusted background image; and an addition module used to determine layout information corresponding to the decorative content based on the target adjustment size, add the decorative content to the adjusted background image based on the layout information, and obtain a target image.

[0008] In a third aspect, an electronic device comprising a processor and memory is provided in an embodiment of the present disclosure. The memory stores computer-executable instructions, and the processor implements a method by which at least one processor adjusts image size as described in the first aspect and various possible designs of the first aspect by executing the computer-executable instructions stored in the memory.

[0009] In a fourth aspect, a computer-readable storage medium is provided in embodiments of the present disclosure. The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, a method for adjusting the image size described in the first aspect and various possible designs of the first aspect is implemented.

[0010] In a fifth aspect, a computer program product is provided, which includes a computer program, when executed by a processor, implements a method for adjusting image sizes as described in the first aspect and various possible designs of the first aspect. [Brief explanation of the drawing]

[0011] To more clearly illustrate the embodiments of this disclosure or the technical solutions in the prior art, the accompanying drawings that may be used in the description of the embodiments or the prior art are briefly introduced below. Clearly, the accompanying drawings in the following description are some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these without any creative effort.

[0012] [Figure 1] This is a schematic diagram illustrating the process of adjusting the image size provided in this disclosure. [Figure 2] This is a schematic diagram illustrating the interface interactions provided by embodiments of this disclosure. [Figure 3]This is a schematic diagram illustrating the process of a method for adjusting image size provided by another embodiment of the present disclosure. [Figure 4] This is a schematic diagram showing the cropping of an image provided by the embodiments of this disclosure. [Figure 5] This is a schematic diagram illustrating a process for adjusting the image size provided in yet another embodiment of the present disclosure. [Figure 6] This is a schematic diagram showing the structure of an image resizing device provided by embodiments of this disclosure. [Figure 7] This is a schematic diagram showing the structure of an electronic device (700) provided by embodiments of this disclosure. [Modes for carrying out the invention]

[0013] To further clarify the purpose, technical solutions, and advantages of the embodiments of this disclosure, the technical solutions in the embodiments of this disclosure will be described clearly and completely below, in conjunction with the accompanying drawings of the embodiments of this disclosure. Clearly, the embodiments described are not all of the embodiments of this disclosure, but only a portion of them. All other embodiments that can be obtained by a person skilled in the art based on the embodiments of this disclosure without requiring any creative effort are all within the scope of this disclosure.

[0014] To address the technical problem that current methods for resizing images may result in the loss of image content, this disclosure provides methods, apparatus, devices, readable storage media, and products for resizing images.

[0015] It should be noted that the methods, apparatus, devices, readable storage media, and products provided in this disclosure for adjusting image size are applicable to any application scenario for adjusting image size.

[0016] The current method for adjusting image size generally involves randomly resizing the image based on a size determined by the user. Alternatively, the user can manually resize the image according to a predetermined cropping area. However, adjusting image size using the first method may result in the loss of text or decorative content within the image and affect image quality. Adjusting image size using the second method requires manual operation by the user, which is cumbersome and less precise, resulting in a poor user experience.

[0017] In the process of solving the above technical problems, the inventors, through research, discovered that it is possible to quickly adjust the size of an image without losing detail in the image. This is achieved by removing decorative content from the image to be adjusted during the adjustment process, and adjusting only the size of the background image. Furthermore, after the background image size adjustment is complete, decorative content can be added to the adjusted background image to obtain the target image.

[0018] Figure 1 is a schematic diagram illustrating the process of a method for adjusting image size provided by an embodiment of the present disclosure. As shown in Figure 1, this method is: The process includes step 101, which displays the image to be adjusted and preset adjustment controls, wherein the image to be adjusted consists of a background image and decorative content.

[0019] The implementing body of this embodiment is an image resizing device that can be coupled to a terminal device and can perform image resizing operations based on user trigger operations on the terminal device. Alternatively, this image resizing device may be coupled to a server, which is connected to the terminal device in a communicative manner. This allows the terminal device to perform image resizing operations and control the terminal device to display the cropped target image based on the terminal device sending an image resizing request.

[0020] In this embodiment, the user can perform an image adjustment operation on the image to be adjusted on the terminal device. In some embodiments, the image to be adjusted may be uploaded by the user to a preset storage route, or may be generated by the terminal device based on the pixel material uploaded by the user and the decorative content determined by the user. In the present disclosure, there is no limitation thereto. In some embodiments, the image to be adjusted may include a background image and decorative content. This background image is composed of at least one layer. The decorative content may include text decorative content, pattern decorative content, and the like.

[0021] For example, the image to be adjusted may be a poster corresponding to a specific item, and this poster may include a background image composed of at least one layer, text decorative content, pattern decorative content, and the like.

[0022] In order to realize an operation of adjusting the image size of the image to be edited, the image to be adjusted and the preset adjustment control can be displayed. Optionally, the image to be adjusted can be displayed in the first display area of the interface, and this adjustment control can be displayed in the second display area. In some embodiments, the first display area and the second display area may be arranged vertically, may be arranged horizontally, or the second display area may be displayed within the first display area. In the present disclosure, there is no limitation thereto.

[0023] Step 102: In response to the user's trigger operation on the adjustment control, determine the target adjustment size determined by the user based on the adjustment control.

[0024] In this embodiment, after the adjustment control is displayed, the user can perform a trigger operation on this adjustment control. In some embodiments, this trigger operation includes, but is not limited to, operations such as single-click, double-click, long-press, and drag. Based on this adjustment control, the user can determine a target adjustment size, and then perform an operation to adjust the size of the image to be edited based on this target adjustment size.

[0025] Step 103: Based on the target adjustment size, perform an operation to adjust the size of the background image and obtain the adjusted background image.

[0026] In this embodiment, since the image to be adjusted includes a background image and decorative content, directly adjusting the size of the image to be edited may cause the decorative content to be cropped, potentially affecting image quality.

[0027] Therefore, in order to adjust the image size without losing the decorative content of the image to be adjusted, the decorative content of the image to be edited is removed, and the adjusted background image can be obtained by performing a size adjustment operation on the background image based on the target adjusted size.

[0028] Please note that resizing operations performed on the background image based on the target adjustment size include, but are not limited to, cropping and stretching operations.

[0029] Step 104: Based on the target adjustment size, determine the layout information corresponding to the decorative content, add the decorative content to the adjusted background image based on the layout information, and obtain the target image.

[0030] In this embodiment, after the operation to adjust the size of the background image is completed, decorative content can be added to the adjusted background image again. However, if the size of the background image changes after cropping, and decorative content is added to match the original position, it may exceed the position of the adjusted background image. Therefore, in order to rationally position the decorative content, layout information corresponding to the decorative content can be determined based on the target adjustment size, and the decorative content can be added to the adjusted background image based on the layout information to obtain the target image.

[0031] The method for adjusting the image size provided by this embodiment involves determining a target adjustment size, removing decorative content from the image to be adjusted, and then performing a size adjustment operation on the background image based on this target adjustment size. After cropping, layout information corresponding to the decorative content is determined based on the target adjustment size, and the decorative content is added to the adjusted background image based on the layout information to obtain the target image. This ensures that the decorative content in the image to be adjusted is not lost, allows for better layout of the decorative content, and improves image quality.

[0032] Selectively, based on any one of the embodiments described above, step 102 includes the step of displaying a preset adjustment size generation page in response to the user's trigger operation on the adjustment control, the adjustment size generation page containing at least one preset adjustment size. On the adjustment size generation page, in response to the user's selection operation on the at least one preset adjustment size, the adjustment size selected by the user is determined as the target adjustment size.

[0033] In this embodiment, multiple adjustment sizes, including 1080*1080, 1080*1920, and 940*788, may be pre-set for user selection.

[0034] In response to a user trigger operation on the adjustment control, a preset adjustment size generation page can be displayed, where at least one preset adjustment size is shown. The user can perform a selection operation on the adjustment size generation page according to their actual needs. In response to the user's selection operation for any adjustment size, the adjustment size selected by the user can be determined as the target adjustment size.

[0035] The figure is a schematic diagram illustrating the interaction of the interface provided by the embodiments of this disclosure. As shown in Figure 2, the image to be adjusted 21 and the preset adjustment controls 22 can be displayed. In response to a user trigger operation on the adjustment controls 22, a preset adjustment size generation page 23 can be displayed, which contains at least one preset adjustment size 24. The user can perform a selection operation among the at least one preset adjustment size 24 according to their actual needs and determine the adjustment size 24 selected by the user as the target adjustment size.

[0036] The method for adjusting the image size provided in this embodiment enhances the interaction method and simplifies the method for determining the target adjustment size by displaying at least one preset adjustment size on the adjustment size generation page in response to a user trigger operation on the adjustment control. This allows the user to quickly determine the target adjustment size through a simple trigger operation.

[0037] Selectively, based on any one of the embodiments described above, step 102 includes the step of displaying a preset adjustment size generation page in response to the user's trigger operation on the adjustment control, the adjustment size generation page including an adjustment size creation control. In response to the user's trigger operation on the adjustment size creation control, the target adjustment size entered by the user is obtained based on the adjustment size creation control.

[0038] In this embodiment, the user can define the target adjustment size to be generated according to their actual needs. In response to the user's trigger operation on the adjustment control, a preset adjustment size generation page is displayed, which includes an adjustment size creation control. In some embodiments, this adjustment size creation control may be a numerical input control. Based on the adjustment size creation control, the user can User-defined You can input an adjustment size and retrieve the target adjustment size entered by the user's adjustment size creation control.

[0039] The method for adjusting the image size provided in this embodiment allows the user to customize the size of the adjusted target image to better suit their individual needs by displaying an adjustment size creation control on the adjustment size generation page in response to the user's trigger operation on the adjustment control, thereby enabling the user to determine a user-defined target adjustment size based on this adjustment size creation control.

[0040] Selectively, based on any one of the embodiments described above, step 102 includes the step of determining image parameters corresponding to the image to be adjusted in response to a user trigger operation on the adjustment control, wherein the image parameters include at least one of the background image size, the amount of decorative content, and the size of the decorative content.

[0041] From among several preset image layout templates, a target layout template that matches the image parameters is determined, and the image layout template includes the image size and decorative content layout parameters.

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

[0043] In this embodiment, various different image layout templates can be pre-configured, each defining image size and layout parameters for decorative content.

[0044] After acquiring the image to be adjusted, the system can determine image parameters corresponding to the image in response to a user trigger operation on the adjustment control. These image parameters include at least one of the following: background image size, amount of decorative content, and size of decorative content. Based on these image parameters, the system determines a target layout template that matches the image parameters from among multiple image layout templates.

[0045] For example, the image to be adjusted contains five decorative elements, and the display position of each decorative element can be determined. Based on this quantity and display position, the image layout template that has the same quantity as the image to be adjusted and has a similar display position is selected from among several image layout templates and designated as the target layout template.

[0046] 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.

[0047] The method for adjusting the image size provided by this embodiment simplifies the process of adjusting the image size by automatically determining a target adjustment size that matches the image to be adjusted, based on the image parameters corresponding to the image to be adjusted, and then determining a target adjustment size based on the target layout template.

[0048] Figure 3 is a schematic diagram illustrating the process of a method for adjusting the image size provided by another embodiment of the present disclosure. Based on any one of the embodiments described above, as shown in Figure 3, step 103 includes the following steps 301 and 302.

[0049] Step 301: Identify whether the background image contains the target object and obtain the identification result.

[0050] Step 302: Based on the identification result and the target adjustment size, perform an operation to adjust the size of the background image and obtain the adjusted background image.

[0051] In this embodiment, the background image may include significant target objects such as portraits, patterns, and identifiers. To avoid the target objects being cut off during the cropping process and resulting in an incomplete background image, it is possible to identify whether the background image contains target objects and obtain the identification result before cropping. In some embodiments, the identification operation for target objects can be implemented via a preset identification algorithm. For example, this identification algorithm may be a neural network model that identifies significant features. Alternatively, the identification operation for target objects can be implemented using any method capable of identifying significant features, and this disclosure is not limited thereto.

[0052] Furthermore, for different identification results, a size adjustment operation can be performed on the background image based on the identification result and the target adjustment size, and the adjusted background image can be obtained.

[0053] The method for adjusting the image size provided by this embodiment identifies whether a target object is included in the background image based on a preset identification algorithm and obtains the identification result. By performing a background image resizing operation based on the identification result, the loss of part of the target object's image during the cropping process is avoided, and image quality is improved.

[0054] Furthermore, based on any one of the above embodiments, step 302 includes, if the identification result indicates that the background image contains a target object, a step of performing a resizing operation on the background image around the target object based on the target adjustment size to obtain the adjusted background image, where the adjusted background image contains at least a portion of the target object. If the identification result indicates that the background image does not contain a target object, the adjusted background image is obtained by performing a random resizing operation on the background image based on the target adjustment size.

[0055] In this embodiment, if a target object is detected in the background image, in order to avoid the target object being cut out during the cropping process and resulting in an incomplete background image, an operation is performed during the cropping process to adjust the size of the background image around the target object based on the target adjustment size, and an adjusted background image is obtained. Here, the adjusted background image includes at least a portion of the target object.

[0056] In practical applications, the target object may be a portrait. During the cropping process, resizing operations can be performed around the portrait's position. If the target adjustment size is small, the process of resizing around the portrait's position can be used to crop the body portion of the portrait while retaining the face area.

[0057] Selectively, if the background image does not contain the target object in the identification result, any content that would be useful in the cropping process will not be cropped. Therefore, based on the target adjustment size, an operation can be performed to randomly adjust the size of the background image, and the adjusted background image can be obtained.

[0058] Figure 4 is a schematic diagram illustrating image cropping provided by embodiments of the present disclosure. As shown in Figure 4, the background image 41 may include a target object 42. During the cropping process, an adjustment operation can be performed around the target object 42 based on the target adjustment size to obtain an adjusted background image 43, where the adjusted background image 43 includes at least a portion of the target object 42.

[0059] The method for adjusting the image size provided by this embodiment improves image quality by performing a resizing operation around the target image when the target object is present in the background image, thereby avoiding the loss of part of the target object's image during the cropping process.

[0060] Figure 5 is a schematic diagram illustrating the process of adjusting the image size provided by another embodiment of the present disclosure. Based on any one of the above embodiments, the decorative content includes text decorative content and pattern decorative content. As shown in Figure 5, step 104 includes the following steps 501, 502 and 503.

[0061] Step 501: Determine 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.

[0062] Step 502: Based on the display parameters of the pattern decoration content in the image to be adjusted, second layout information corresponding to the pattern decoration content is determined.

[0063] Step 503: The target image is obtained by adding the text decoration content and pattern decoration content to the adjusted background image, based on the first layout information and the second layout information, respectively.

[0064] In this embodiment, the decorative content includes text decorative content and pattern decorative content. Taking the image to be edited as an example of an article poster, the text decorative content may be an introduction to the copywriter corresponding to the article, and the pattern decorative content may be a more beautiful small pattern, etc.

[0065] In the process of placing decorative content on an adjusted background image, a first layout information for text decorative content and a second layout information corresponding to pattern decorative content can be determined to improve the overall aesthetics of the placement.

[0066] Selectively, during the image cropping process, the image being edited may be changed from a horizontal layout to a vertical layout, or vice versa, and this layout change may alter the text layout. Therefore, the first layout information for the text decoration content can be determined based on the image size and target adjustment size corresponding to the image being adjusted.

[0067] Furthermore, regarding pattern decoration content, by determining second layout information according to the display parameters of the image to be edited, it is possible to ensure that the display effect of the pattern decoration content does not change between the target image and the image to be edited. Therefore, based on the first and second layout information, text decoration content and pattern decoration content can be added to the adjusted background image, respectively, and the target image can be obtained.

[0068] The method for adjusting the image size provided by this embodiment can improve the display effect of decorative content in a target image by determining first layout information for text decorative content based on the image size and target adjustment size corresponding to the image to be adjusted, and determining second layout information corresponding to pattern decorative content based on the display parameters of pattern decorative content in the image to be adjusted.

[0069] Furthermore, based on any one of the above embodiments, step 501 includes the step of determining that, with respect to 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 height of the image size corresponding to the image to be adjusted is greater than the width and the height of the target adjustment size is less than the width, then the first layout information of the text decoration content is determined to be a vertical layout. With respect to text decoration content displayed in the center of the image to be adjusted, then the first layout information of the text decoration content is determined to be a center layout.

[0070] In this embodiment, in order to make the layout of the text decoration content more aesthetically pleasing, for 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 height of the image size corresponding to the image to be adjusted is greater than the width and the height of the target adjustment size is less than the width, then the first layout information of the text decoration content is determined to be a vertical layout.

[0071] For example, if the image being adjusted in portrait orientation is switched to the target image in landscape orientation, the text decoration content will be adjusted to a left-to-right layout. If the image being adjusted in landscape orientation is switched to the target image in portrait orientation, the text decoration content will be adjusted to a top-to-bottom layout.

[0072] Selectively, for text decoration content displayed in the center of the image being adjusted, the first layout information of the text decoration content is determined to be a centered layout. For example, even if the image is cropped, the centered text decoration content is only slightly affected, so centered pure text may remain in its centered position.

[0073] The method for adjusting image size provided by this embodiment adjusts the arrangement of text decoration content to a left-to-right layout when the vertical version of the image to be adjusted is switched to a horizontal version of the target image. When the horizontal version of the image to be adjusted is switched to a vertical version of the target image, the arrangement of text decoration content is adjusted to a top-to-bottom layout. Since center-aligned pure text remains in its center-aligned position, the text decoration content of the target image can be made more aesthetically pleasing and the image quality can be improved.

[0074] Furthermore, based on any one of the above embodiments, step 502 includes the step of determining the position information of the pattern decoration content in the image to be adjusted. If the pattern decoration content is within a preset target area, the text decoration content is controlled to remain within the preset target area of ​​the adjusted background image. If the pattern decoration content is outside the preset target area and overlaps with other decoration content, cover information is determined between the pattern decoration content and other decoration content in the image to be adjusted, and the display position of the pattern decoration content in the adjusted background image is determined based on the cover information and the display position of the 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 is determined in the image to be adjusted, the pattern decoration content is controlled to be displayed within the blank area, and the second layout information is obtained.

[0075] In this embodiment, by determining second layout information for pattern decoration content according to the display parameters of the image to be edited, the display effect of the pattern decoration content does not change in the target image and the image to be edited.

[0076] The positional information of pattern decoration content in the image to be adjusted can be selectively determined. If the pattern decoration content is within a preset target area, the system controls the text decoration content to remain within the preset target area of ​​the adjusted background image. In some embodiments, this target area may be a corner area. For example, pattern decoration content located in a corner remains in the corner position even after the background image has been cropped, so the display effect of the pattern decoration content does not change in the target image and the image being edited.

[0077] If pattern decoration content is selectively located outside a preset target area and overlaps with other decoration content, cover information between the pattern decoration content and other decoration content in the image to be adjusted is determined, and the display position of the pattern decoration content in the adjusted background image is determined based on the cover information and the display positions of the other decoration content. For example, if pattern decoration content is placed on a target object in the image to be edited and blocks the target object, this pattern decoration content can remain on the target object and block the target object even after the cropping of the background image is completed.

[0078] If pattern decoration content is selectively located outside a preset target area and does not overlap with other decoration content, a blank area is determined in the image to be adjusted, the pattern decoration content is controlled to be displayed within the blank area, and second layout information is obtained. For pattern decoration content of the image to be edited that is in a blank area, this pattern decoration content can be placed within the blank area of ​​the adjusted background image even after the cropping from the background image is complete.

[0079] The method for adjusting the image size provided by this embodiment improves the appearance and image quality of the target image by keeping the pattern decoration content in the corners in the corner positions according to their relative positions, keeping the pattern decoration content that overlaps with other decoration content overlapping with other decoration content, and embedding the pattern decoration content that is outside the preset target area and does not overlap with other decoration content into a new size blank area based on its original position.

[0080] Figure 6 is a schematic diagram showing the structure of an image resizing device provided by embodiments of the present disclosure. As shown in Figure 6, the device comprises a display module 61, a determination module 62, an adjustment module 63, and an add-on module 64. In some embodiments, the display module 61 is used to display the image to be adjusted and preset adjustment controls, where the image to be adjusted consists of a background image and decorative content. The determination module 62 is used to determine a target adjustment size determined by the user based on the adjustment controls, in response to a user trigger operation on the adjustment controls. The adjustment module 63 is used to perform a resizing operation on the background image based on the target adjustment size and to obtain the adjusted background image. The add-on module 64 is used to determine layout information corresponding to the decorative content based on the target adjustment size, and to add the decorative content to the adjusted background image based on the layout information and to obtain the target image.

[0081] Furthermore, based on any one of the above embodiments, the determination module is used to display a preset adjustment size generation page in response to the user's trigger operation on the adjustment control, the adjustment size generation page includes at least one preset adjustment size. On the adjustment size generation page, in response to the user's operation to select the at least one preset adjustment size, the adjustment size selected by the user is determined as the target adjustment size.

[0082] Furthermore, based on any one of the above embodiments, the decision module is used to display a preset adjustment size generation page in response to the user's trigger operation on the adjustment control, the adjustment size generation page includes an adjustment size creation control. In response to the user's trigger operation on the adjustment size creation control, the system obtains the target adjustment size entered by the user based on the adjustment size creation control.

[0083] Furthermore, based on any one of the above embodiments, the determination module is used to determine image parameters corresponding to the image to be adjusted in response to a user trigger operation on the adjustment control. Here, the image parameters include at least one of the background image size, the amount of decorative content, and the size of the decorative content. A target layout template that matches the image parameters is determined from a plurality of preset image layout templates. Here, the image layout template includes the image size and layout parameters for the decorative content. The adjustment size corresponding to the target layout template is determined as the target adjustment size.

[0084] Furthermore, based on any one of the above embodiments, the adjustment module is used to identify whether the background image contains a target object and to obtain the identification result. Based on the identification result and the target adjustment size, a size adjustment operation is performed on the background image and the adjusted background image is obtained.

[0085] Furthermore, based on any one of the above embodiments, the adjustment module is used to obtain the adjusted background image by performing a resizing operation on the background image around the target object based on the target adjustment size, if the identification result indicates that the background image contains the target object. Here, the adjusted background image includes at least a portion of the target object. If the identification result indicates that the background image does not contain the target object, the adjusted background image is obtained by performing a random resizing operation on the background image based on the target adjustment size.

[0086] Furthermore, based on any one of the above embodiments, the decorative content includes the text decorative content and the pattern decorative content. The additional module is used 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. Second layout information corresponding to the pattern decorative content is determined based on the display parameters of the pattern decorative content in the image to be adjusted. The target image is obtained by adding the text decorative content and the pattern decorative content to the adjusted background image based on the first layout information and the second layout information, respectively.

[0087] Furthermore, based on any one of the above embodiments, the additive module is used to determine that, with respect to text decoration content arranged horizontally and / or vertically in the image to be adjusted, the first layout information of the text decoration content is horizontal 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. If the height of the image size corresponding to 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 vertical. With respect to 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 centered.

[0088] Furthermore, based on any one of the above embodiments, the additive module is used to determine the positional information of the pattern decoration content in the image to be adjusted. If the pattern decoration content is within a preset target area, the module controls the text decoration content to remain within the preset target area of ​​the adjusted background image. If the pattern decoration content is outside the preset target area and overlaps with other decoration content, the module determines cover information between the pattern decoration content and other decoration content in the image to be adjusted, and determines the display position of the pattern decoration content in the adjusted background image based on the cover information and the display positions of the other decoration content. If the pattern decoration content is outside the preset target area and does not overlap with other decoration content, the module determines a blank area in the image to be adjusted, controls the module to display the pattern decoration content within the blank area, and obtains the second layout information.

[0089] The device provided by this embodiment can be used to implement the technical solution of the embodiment of the method described above, and its implementation principle and technical effect are similar, therefore they will not be described again in this embodiment.

[0090] To realize the above embodiments, embodiments of this disclosure further provide an electronic device comprising a processor and memory.

[0091] The aforementioned memory stores computer-executable instructions.

[0092] The processor performs the method for adjusting the image size described in any one of the embodiments by executing computer-executable instructions stored in the memory.

[0093] Figure 7 is a schematic diagram showing the structure of an electronic device 700 provided by an embodiment of the present disclosure. As shown in Figure 7, this electronic device 700 may be a terminal device or a server. In some embodiments, the terminal device may be a mobile device such as a mobile phone, laptop computer, digital broadcast receiver, personal information device (PDA), tablet computer (PAD), portable multimedia player (PMP), or in-vehicle terminal (such as an in-vehicle navigation terminal), or a fixed terminal such as a digital TV or desktop PC, but is not limited to these. The electronic device shown in Figure 7 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0094] As shown in Figure 7, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701 that can perform various appropriate operations and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage device 708 into random access memory (RAM) 703. RAM 703 stores various programs and data necessary for the operation of the electronic device 700. The processing unit 701, ROM 702, and 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.

[0095] Typically, the I / O interface 705 can be connected to input devices 706, including touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707, including liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708, including magnetic tape, hard drives, etc.; and communication devices 709. The communication device 709 can allow the electronic device 700 to communicate with other devices wirelessly or via wired connections to exchange data. Figure 7 shows the electronic device 700 with various devices, but it should be understood that it is not necessary to implement or include all of the devices shown. Alternatively, more or fewer devices may be implemented or included.

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

[0097] It should be noted that the computer-readable media described herein may be computer-readable signal media, computer-readable storage media, or any combination of the two. Computer-readable storage media may, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media include, but are not limited to, electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage components, magnetic storage components, or any appropriate combination of the above. In this disclosure, computer-readable storage media may also be any tangible medium containing or storing programs that are used by, or can be used in combination with, instruction execution systems, devices, or components. In this disclosure, a computer-readable signal medium may include data signals propagated in the baseband or as part of a carrier wave, which hold computer-readable program code. The data signals propagated in this manner may include, but are not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit programs used by or in combination with instruction execution systems, devices, or components. The program code contained in the computer-readable medium can be transmitted using any suitable medium, including, but not limited to, electric wires, fiber optic cables, radio frequency (RF), or any suitable combination thereof.

[0098] To realize the above embodiments, embodiments of the present disclosure further provide a computer-readable storage medium on which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method for adjusting the image size described in any one of the above embodiments is realized.

[0099] To realize the above embodiments, the embodiments of the present disclosure further provide a computer program product including a computer program that, when executed by a processor, implements a method for adjusting the image size described in any one of the above embodiments.

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

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

[0102] Computer program code for performing the operations disclosed herein can be written in one or more programming design languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and traditional procedural programming languages ​​such as the C language or similar programming languages. The program code may run entirely on the user's computer, partially on the user's computer, partially on the user's computer as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. If a remote computer is involved, the remote computer may be connected to the user's computer via any kind of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (for example, connected via the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architectures, functions, and operations that can be implemented in systems, methods, and computer program products based on various embodiments of this disclosure. In this regard, each box in a flowchart or block diagram may represent a module, program segment, or part of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions shown within the boxes may occur in a different order than shown in the accompanying drawings. For example, two boxes shown consecutively may actually be executed substantially in parallel, or they may be executed in reverse order depending on the functions involved. It should also be noted that each box in a block diagram and / or flowchart, and combinations of boxes in a block diagram and / or flowchart, may be implemented based on a dedicated hardware-based system that performs the specified function or operation, or by a combination of dedicated hardware and computer instructions.

[0104] The units described in embodiments of this disclosure and relating to them may be implemented via software or via hardware. In some embodiments, the naming of a unit may not, in some cases, constitute a limitation on the unit itself; for example, the first acquisition unit may also be described as "a unit for acquiring at least two Internet Protocol addresses."

[0105] In this specification, the functions described above may be performed, at least in part, by one or more hardware logic components. For example, non-limiting exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standards (ASSPs), systems-on-a-chip (SOCs), and composite programmable logic devices (CPLDs).

[0106] In the context of this disclosure, machine-readable media may be tangible media that contain or can store programs used by or in combination with instruction execution systems, apparatuses, or devices. Machine-readable media may be machine-readable signal media or machine-readable storage media. Machine-readable media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the above contents. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above contents.

[0107] The above description is merely a description of preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the scope of the disclosure relating to this disclosure is not limited to technical solutions formed by specific combinations of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the above-disclosed concepts, for example, technical solutions formed by replacing the above features with similarly functional technical features disclosed in this disclosure (but not limited to these).

[0108] Furthermore, although each operation is described in a specific order, this should not be understood as requiring such operations to be performed in a specific order or sequential sequence as shown. Multitasking and parallel processing may be advantageous in certain environments. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments, individually or in any suitable subcombination.

[0109] While this subject matter is described using language specific to the structural features and / or logical operation of the method, it should be understood that the subject matter defined in the attached claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely exemplary forms of implementing the claims.

Claims

1. A method for adjusting the image size, The process involves displaying the 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 user trigger operation on the adjustment control, the system determines the target adjustment size determined by the user based on the adjustment control. Based on the target adjustment size, the background image is resized, and the adjusted background image is obtained. A method comprising determining layout information corresponding to the decorative content based on the target adjustment size, and obtaining a target image by adding the decorative content to the adjusted background image based on the layout information.

2. In response to the user's trigger operation on the adjustment control, determining the target adjustment size determined by the user based on the adjustment control is: In response to the user's trigger operation on the adjustment control, a preset adjustment size generation page is displayed, and the adjustment size generation page contains at least one preset adjustment size. The adjustment size generation page includes determining the adjustment size selected by the user as the target adjustment size in response to the user's selection operation for at least one preset adjustment size. The method according to claim 1.

3. In response to the user's trigger operation on the adjustment control, determining the target adjustment size determined by the user based on the adjustment control is: In response to the user's trigger operation on the adjustment control, a preset adjustment size generation page is displayed, and the adjustment size generation page includes an adjustment size creation control. This includes, in response to the user's trigger operation on the adjustment size creation control, obtaining the target adjustment size entered by the user based on the adjustment size creation control, The method according to claim 1.

4. In response to a user trigger operation on the adjustment control, determining the target adjustment size determined by the user based on the adjustment control is: In response to a user trigger operation on the adjustment control, the image parameters corresponding to the image to be adjusted are determined, wherein the image parameters include at least one of the background image size, the amount of decorative content, and the size of the decorative content. The process involves determining a target layout template that matches the image parameters from a set of preset image layout templates, wherein the image layout template includes layout parameters for image size and decorative content. This includes determining the adjustment size corresponding to the target layout template as the target adjustment size, The method according to claim 1.

5. Obtaining an adjusted background image by performing a size adjustment operation on the background image based on the target adjustment size is: Identify whether the background image contains the target object and obtain the identification result. This includes obtaining an adjusted background image by performing a resizing operation on the background image based on the identification result and the target adjustment size, The method according to claim 1.

6. By performing a size adjustment operation on the background image based on the identification result and the target adjustment size, an adjusted background image can be obtained. In the identification result, if the background image contains a target object, the adjusted background image is obtained by performing a resizing operation on the background image around the target object based on the target adjustment size, wherein the adjusted background image contains at least a portion of the target object. If the identification result does not include the target object in the background image, the adjusted background image is obtained by performing a random resizing operation on the background image based on the target adjustment size. The method according to claim 5.

7. The aforementioned decorative content includes text decorative content and pattern decorative content. Based on the target adjustment size, layout information corresponding to the decorative content is determined, and based on the layout information, the decorative content is added to the adjusted background image to obtain the target image. Based on the image size corresponding to the image to be adjusted and the target adjustment size, the first layout information of the text decoration content is determined. Based on the display parameters of the pattern decoration content in the image to be adjusted, a second layout information corresponding to the pattern decoration content is determined. This includes obtaining a target image by adding the text decoration content and pattern decoration content to the adjusted background image based on the first layout information and the second layout information, respectively. The method according to any one of claims 1 to 6.

8. Determining 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 is: With respect to 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, the first layout information of the text decoration content is determined to be a horizontal layout; and if the height of the image size corresponding to 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. With respect to the text decoration content displayed in the center of the image to be adjusted, the first layout information of the text decoration content determines that it is laid out in the center. The method according to claim 7.

9. Determining second layout information corresponding to the pattern decoration content based on the display parameters of the pattern decoration content in the image to be adjusted means that Determining the positional information of the pattern decoration content in the image to be adjusted, If the pattern decoration content is within a preset target area, control is made so that the text decoration content remains within the preset target area of ​​the adjusted background image. If the pattern decoration content is located outside the preset target area and overlaps with other decoration content, the cover information of the pattern decoration content and the other decoration content in the image to be adjusted is determined, and the display position of the pattern decoration content in the adjusted background image is determined based on the cover information and the display position of the other decoration content. If the pattern decoration content is located outside the preset target area and does not overlap with other decoration content, the process includes determining a blank area in the image to be adjusted, controlling the display of the pattern decoration content within the blank area, and obtaining the second layout information. The method according to claim 7.

10. A device for adjusting image size, A display module used to display the image to be adjusted and preset adjustment controls, wherein the image to be adjusted is a display module consisting of a background image and decorative content, A determination module used to determine the target adjustment size determined by the user based on the adjustment control, in response to a user trigger operation on the adjustment control. An adjustment module used to perform a size adjustment operation on the background image based on the target adjustment size and to obtain the adjusted background image, The system includes an additional module used to determine layout information corresponding to the decorative content based on the target adjustment size, add the decorative content to the adjusted background image based on the layout information, and obtain a target image. Device.

11. Equipped with a processor and memory, The aforementioned memory stores computer-executable instructions. The processor performs the method for adjusting the image size according to any one of claims 1 to 9 by executing computer-executable instructions stored in the memory. electronic equipment.

12. A computer-readable storage medium, The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method for adjusting the image size described in any one of claims 1 to 9 is realized.

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