Media processing method and apparatus, and electronic device

By displaying the canvas in the screen area and using gesture operations for media expansion, the problem that known media sizes do not meet the usage needs is solved, achieving efficient media expansion and user-friendly operation experience.

WO2025162463A1PCT designated stage Publication Date: 2025-08-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/075572
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-04
Filing Date
2025-01-27
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

In the prior art, it is known that when the size of the media does not meet the usage needs, it lacks efficient expansion solutions and makes it difficult for users to operate.

Method used

By obtaining the media to be expanded, displaying the canvas in the screen area based on the target size, and using the user's gesture operations on the canvas to zoom and move, determining the extended area, combining the extended area for media expansion, and generating the target media.

Benefits of technology

It realizes efficient expansion of known media, improving user operation convenience and expansion effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025075572_07082025_PF_FP_ABST
    Figure CN2025075572_07082025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a media processing method and apparatus, and an electronic device. A specific implementation of the method comprises: acquiring media to be expanded; on the basis of a target size, presenting, in a screen area, a canvas that satisfies the target size, such that said media is displayed in an area of the canvas, wherein the upper side of the canvas is covered with a transparent view having a gesture operation function; on the basis of a gesture operation of a user on the canvas, zooming and moving said media under a restricted condition; on the basis of a result of zooming and moving said media, determining an expansion area around said media; and in view of the expansion area, obtaining target media that satisfy the target size after said media is expanded. The method achieves the aim of expanding known media to be expanded, and a user can perform a more convenient setting operation on said media before media expansion, thereby improving the processing effect of media expansion and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Media processing method, device and electronic equipment

[0001] This application claims priority to the Chinese invention patent application entitled “Media processing method, device and electronic device” and application number 202410160537.8 filed on February 4, 2024. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of media processing technology, and in particular to a media processing method, device, and electronic device. Background Art

[0003] With the continuous development and improvement of digital image, video, and other media technologies, the application of digital media is becoming increasingly widespread. Digital media not only brings numerous conveniences but also adds more fun to our lives. In some cases, people need to expand existing media. For example, when the size of existing media is insufficient for use, or when people want to obtain richer media materials based on existing media, an efficient solution for expanding existing media is needed. Summary of the Invention

[0004] The present disclosure provides a media processing method, device, and electronic device.

[0005] According to a first aspect, a media processing method is provided, comprising: obtaining media to be expanded; displaying a canvas that meets the target size in a screen area based on a target size, so that the media to be expanded is displayed in the area of ​​the canvas; scaling and moving the media to be expanded within constraints based on user gesture operations on the canvas; determining an expansion area around the media to be expanded based on the results of scaling and moving the media to be expanded; and obtaining target media that meets the target size after the media to be expanded is expanded, based on the expansion area.

[0006] According to a second aspect, a media processing device is provided, which includes: a first acquisition module for acquiring media to be expanded; a generation module for displaying a canvas that meets the target size in a screen area based on the target size, so that the media to be expanded is displayed in the area of ​​the canvas; an operation module for scaling and moving the media to be expanded within restrictions based on user gesture operations on the canvas; a determination module for determining an expansion area around the media to be expanded based on the results of scaling and moving the media to be expanded; and a second acquisition module for obtaining target media that meets the target size after the media to be expanded is expanded, in combination with the expansion area.

[0007] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.

[0008] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the program.

[0009] According to a fifth aspect, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer executable instructions, which implement any one of the methods of the first aspect when executed by a device.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0012] FIG1 is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure;

[0013] FIG2 is a schematic diagram of a link scenario of extended media according to an exemplary embodiment;

[0014] FIG3 is a flow chart of a media processing method according to an exemplary embodiment of the present disclosure;

[0015] FIG4 is a schematic diagram of a media processing scenario according to an exemplary embodiment of the present disclosure;

[0016] FIG5 is a block diagram of a media processing device according to an exemplary embodiment of the present disclosure;

[0017] FIG6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0018] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0019] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0020] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a," "the," and "the" used in this disclosure are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0021] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."

[0022] See FIG1 , which is a schematic diagram of an exemplary system architecture applying an embodiment of the present disclosure.

[0023] As shown in FIG1 , system architecture 100 may include terminal devices 102, network 103, and server 104. It should be understood that the number or types of terminal devices, networks, and servers in FIG1 are merely illustrative. Any number or type of terminal devices, networks, and servers may be used as needed.

[0024] The network 103 is used to provide a medium for communication links between terminal devices and servers. The network 103 can include various connection types, such as wired or wireless communication links or optical fiber cables.

[0025] The terminal device 102 can interact with the server through the network 103 to receive or send requests or information, etc. The terminal device 102 can be various electronic devices, including but not limited to smart phones, tablet computers, laptops, desktop computers, and smart wearable devices, etc.

[0026] The server 104 can store, analyze, and process the received data, and can also send control commands or requests to terminal devices or other servers. The server can provide services in response to user service requests. It is understood that a server can provide one or more services, and the same service can be provided by multiple servers.

[0027] Based on the system architecture shown in FIG1 , in the embodiment of the present disclosure, user 101 can input the media to be expanded and text guidance information through terminal device 102, and set the target size and expansion area for generating the target media through terminal device 102. Then, terminal device 102 can send the media to be expanded, the target size, the expansion area, and the text guidance information to server 104 via network 103. After receiving the media to be expanded, the target size, the expansion area, and the text guidance information, server 104 can perform expansion processing on the media to be expanded based on the target size, the expansion area, and the text guidance information to obtain the target media. Finally, server 104 can return the target media to terminal device 102 via network 103, allowing user 101 to view the effect of the target media through terminal device 102 and save the target media.

[0028] Referring to FIG. 2 , it is a schematic diagram showing a link scenario of extended media according to an exemplary embodiment.

[0029] As shown in Figure 2, a user can first input original media A through a third-party application installed on a terminal device. Original media A can be displayed in the third-party application's media editing interface. The user can then edit original media A through the media editing interface and, after editing, trigger the media expansion function. The third-party application can then display the media expansion interface, generate a default canvas within the media expansion interface, and display the edited media as the to-be-expanded media B in the default canvas area.

[0030] The user can perform setting operations through the media extension interface, such as setting the aspect ratio of the canvas, or setting the multiple of media expansion, etc. The third-party application can determine the target size for generating the target media based on the setting operations performed by the user through the media extension interface, and display the canvas that meets the target size in the media extension interface, and display the media to be expanded B in the new canvas area. The user can also perform media adjustment operations through the media extension interface, such as scaling the media to be expanded B, or adjusting the position area of ​​the media to be expanded B in the canvas. The third-party application can determine the area that needs to be expanded around the media to be expanded B based on the adjustment operations performed by the user through the media extension interface. The user can also enter text guidance information through the media extension interface, and the text guidance information is used to guide the expansion of the media to be expanded B.

[0031] Next, the third-party application can generate a mask bitmap C based on the set canvas size (i.e., the target size) and the area occupied by the media to be expanded B in the canvas. The size of the mask bitmap C is the same as the target size, the area occupied by the media to be expanded B in the mask bitmap C is black, and the area to be expanded around the media to be expanded B is white. Then, the terminal device uploads the media to be expanded B and the mask bitmap C to the storage device in the service platform respectively, and obtains the resource locators of the media to be expanded B and the mask bitmap C respectively. The third-party application can generate a media extension task request based on the resource locators of the media to be expanded B and the mask bitmap C and the text guidance information. The terminal device then sends the media extension task request to the computing device in the service platform.

[0032] Finally, the computing device in the service platform can complete the media extension task based on the media extension task request. Specifically, based on the resource locator included in the media extension task request, the computing device in the service platform can retrieve the to-be-extended media B and the mask bitmap C from the storage device in the service platform. Guided by the text guidance information included in the media extension task request, the computing device in the service platform can extend the to-be-extended media B based on the mask bitmap C to obtain the extended target media D. After completing the media extension task, the computing device in the service platform can return the target media D to the terminal device, which can then display the target media D to the user through the result display interface of the third-party application.

[0033] The present disclosure will be described in detail below with reference to specific embodiments.

[0034] FIG3 is a flow chart of a media processing method according to an exemplary embodiment. The method can be applied to a terminal device. In this embodiment, for ease of understanding, an example is given with reference to a terminal device capable of installing a third-party application. Those skilled in the art will appreciate that the terminal device may include, but is not limited to, a mobile terminal device such as a smartphone, a smart wearable device, a tablet computer, and the like. It should be noted that the media involved in this embodiment may be an image or a video. The method may include the following steps:

[0035] As shown in FIG3 , in step 301 , the media to be expanded is obtained and a target size is determined, and in step 302 , based on the target size, a canvas meeting the target size is displayed in the screen area so that the media to be expanded is displayed in the canvas area.

[0036] In this embodiment, a third-party application for media processing is installed on the terminal device. The user can open the third-party application and input existing original media through the media processing interface provided by the third-party application. This original media can be a newly captured photo or video, or a video selected from a photo library stored on the terminal device. It is understood that this embodiment is not limited to this aspect. In one implementation, the original media can be directly used as the media to be expanded.

[0037] In another implementation, the original media can also be edited, and the media after the editing process can be used as the media to be expanded. Specifically, the original media can be displayed in the media editing interface provided by a third-party application, and various media editing tools can be provided in the media editing interface. The user can perform various editing operations on the original media using the media editing tools provided in the editing interface. The original media can be edited based on the user's operation. The editing process of the original media can include but is not limited to trimming the original media, adding new elements to the original media, adjusting the color of the original media, adding special effects to the original media, etc. After the user completes the editing operation on the original media, a preset operation can be performed to trigger the activation of the media expansion function. The preset operation can include but is not limited to the operation of clicking a preset button, a preset gesture operation, etc. In response to the user's preset operation, the media after the above-mentioned editing process can be used as the media to be expanded.

[0038] Since the present embodiment can edit the media before expanding the media, there is no need to store the edited media before uploading it, thereby improving the efficiency of media expansion and enhancing the user experience.

[0039] In this embodiment, after enabling the media expansion feature, a third-party application can provide a media expansion interface on the terminal device. In this media expansion interface, an initial canvas can be initially displayed at a default size, and the media to be expanded can be displayed in the initial canvas area. The default size can be the size of the media to be expanded, enlarged by a preset factor based on the aspect ratio of the media to be expanded.

[0040] The media expansion interface displays a configuration tool that allows users to set the canvas aspect ratio or the media expansion multiple. For example, users can use the configuration tool to set the canvas aspect ratio to the same as the media to be expanded, set the canvas aspect ratio to a specific aspect ratio, or customize the canvas aspect ratio. If the canvas aspect ratio is set to the same as the media to be expanded, the media expansion multiple can be further set.

[0041] Each time the user completes settings, the canvas size can be determined based on the user's settings. For example, if the canvas aspect ratio is set to the same as the aspect ratio of the media to be expanded, the media expansion multiple is further obtained, and the canvas size can be determined based on the size of the media to be expanded and the media expansion multiple. If the canvas aspect ratio is set to a specified aspect ratio, the canvas size pre-set for the specified aspect ratio can be obtained. If the canvas aspect ratio is set to a custom aspect ratio, the canvas size can be calculated based on pre-set calculation rules.

[0042] The final canvas size is used as the target size. Therefore, if the user has not set the canvas aspect ratio, the default size of the initial canvas can be used as the target size. If the user has set the canvas aspect ratio at least once, the last set canvas size can be used as the target size.

[0043] In this embodiment, after determining the target canvas size, a canvas meeting the target size can be displayed in the media expansion interface, with the media to be expanded displayed within the canvas area, for example, the media to be expanded can be displayed in the center of the canvas. A transparent view with gesture control functionality can be overlaid above the canvas, and a layer scaling function can be added to this transparent view. Users can scale and move the media to be expanded using the transparent view above the canvas. When the transparent view detects additional gestures, it can trigger scaling and moving of the layer of the media to be expanded.

[0044] In step 303 , based on the user's gesture operation on the canvas, the media to be expanded is scaled and moved within the constraints.

[0045] In this embodiment, in response to user gestures on the canvas, the target media can be scaled and moved within constraints. Specifically, the constraints can include at least two aspects. First, they can limit the location of the target media, such as the canvas range. Second, they can limit the scaling factor of the target media, for example, by limiting the maximum size of the target media to be enlarged or the minimum size of the target media to be reduced.

[0046] Specifically, a first aspect ratio of the medium to be expanded and a second aspect ratio of the canvas can be determined. If the first aspect ratio is smaller than the second aspect ratio, the size of the medium to be expanded can be determined as the maximum enlargement size when the height of the medium to be expanded is the same as the height of the canvas, and the size that is smaller than the maximum enlargement size by a preset multiple can be determined as the minimum reduction size. As shown in FIG4 , the aspect ratio of medium to be expanded 401 is smaller than the aspect ratio of canvas 402. Therefore, when the height of the medium to be expanded is the same as the height of the canvas, the size of medium to be expanded 401a can be determined as the maximum enlargement size, and the size of medium to be expanded 401b, which is smaller than the size of medium to be expanded 401a by a preset multiple, can be determined as the minimum reduction size.

[0047] If the first aspect ratio is equal to the second aspect ratio, the canvas size can be determined as the maximum enlargement size, and the size that is smaller than the maximum enlargement size by a predetermined multiple can be determined as the minimum reduction size. As shown in FIG4 , the aspect ratio of to-be-expanded medium 403 is equal to the aspect ratio of canvas 404. Therefore, the size of canvas 404 can be determined as the maximum enlargement size, and the size of to-be-expanded medium 403a, which is smaller than canvas 404 by a predetermined multiple, can be determined as the minimum reduction size.

[0048] If the first aspect ratio is greater than the second aspect ratio, the size of the medium to be expanded can be determined as the maximum enlarged size when the width of the medium to be expanded is the same as the width of the canvas, and the size that is smaller than the maximum enlarged size by a preset multiple can be determined as the minimum reduced size. As shown in FIG4 , the aspect ratio of medium to be expanded 405 is smaller than the aspect ratio of canvas 406. Therefore, when the width of the medium to be expanded is the same as the width of the canvas, the size of medium to be expanded 405a can be determined as the maximum enlarged size, and the size of medium to be expanded 405b, which is smaller than the size of medium to be expanded 405a by a preset multiple, can be determined as the minimum reduced size.

[0049] It should be noted that the above-mentioned preset multiple can be any reasonable value determined based on experience, and this embodiment does not limit the specific value of the above-mentioned preset multiple.

[0050] After determining the maximum enlargement size and the minimum reduction size of the media to be expanded, the media to be expanded can be scaled between the maximum enlargement size and the minimum reduction size within the canvas according to the user's zoom gesture operation on the canvas. In addition, the media to be expanded can be moved within the canvas according to the user's movement gesture operation on the canvas. For example, if the media to be expanded has reached the maximum enlargement size and the user continues to enlarge the media to be expanded, the enlargement of the media to be expanded can be stopped. If the media to be expanded has reached the minimum reduction size and the user continues to reduce the media to be expanded, the reduction of the media to be expanded can be stopped. If the edge of the media to be expanded has overlapped with the edge of the canvas and the user continues to enlarge the media to be expanded or move it to an area outside the canvas, the enlargement or movement of the media to be expanded can be stopped.

[0051] Since the present embodiment sets the maximum enlargement size and the minimum reduction size of the media to be expanded, it avoids the situation where the media expansion effect is poor due to improper operation of the user, which helps to improve the media expansion effect.

[0052] In step 304, an expansion area around the media to be expanded is determined according to the result of scaling and moving the media to be expanded.

[0053] In this embodiment, after a user completes scaling and moving the to-be-expanded media, the user can trigger a media expansion command. In response to the user-triggered media expansion command, an expansion area surrounding the to-be-expanded media can be determined. The media expansion command can be a user clicking a preset media expansion initiation button or a pre-set media expansion initiation gesture. Specifically, based on the scaling and movement results and the canvas size, the location of the to-be-expanded media within the canvas can be determined. The area outside the to-be-expanded media within the canvas is then used as the expansion area surrounding the to-be-expanded media, thereby filling the expansion area.

[0054] In one implementation, a mask bitmap corresponding to the target media can be determined based on the results of scaling and moving the target media. This mask bitmap indicates the location of the target media within the target media and the expansion area surrounding the target media. Specifically, the mask bitmap can be generated based on the target size and the location of the target media within the canvas. The mask bitmap's size matches the target size, and the area occupied by the target media within the mask bitmap is black, while the area surrounding the target media that needs to be expanded is white.

[0055] Since this embodiment indicates the location area of ​​the to-be-expanded media in the target media and the expansion area around the to-be-expanded media through the mask bitmap, the media expansion effect is improved.

[0056] In step 305, the target medium that meets the target size is obtained after the medium to be expanded is expanded in combination with the expansion area.

[0057] In this embodiment, the media to be expanded can be expanded based on the expansion area surrounding the media to be expanded, resulting in target media that meets the target size. In one implementation, the terminal device can be equipped with a pre-trained machine learning model. Information about the media to be expanded and the expansion area can be input into the machine learning model, which then expands the media to fill the expansion area, resulting in the target media.

[0058] In another implementation, the terminal device can also upload the media to be expanded and the mask bitmap to a server, allowing the server to expand the media to be expanded based on the mask bitmap to obtain target media and return the target media to the terminal device. Specifically, the terminal device can upload the media to be expanded and the mask bitmap, obtain the resource locators corresponding to the media to be expanded and the mask bitmap, and can also obtain text guidance information input by the user. The terminal device can then generate a media expansion task request based on the resource locators corresponding to the media to be expanded and the mask bitmap, and send the media expansion task request to the server. In response to the media expansion task request, the server obtains the media to be expanded and the mask bitmap based on the resource locators corresponding to the media to be expanded and the mask bitmap. Then, using a pre-trained machine learning model and guided by the text guidance information, the server generates extended media based on the mask bitmap and the media to be expanded. The server then replaces the area of ​​the extended media occupied by the media to be expanded with the media to be expanded. In order to avoid edge jumps, the edge of the medium to be extended in the replaced extended media may be blurred to obtain the target media, which is then returned to the terminal device by the server.

[0059] The present disclosure provides a media processing method, which obtains the media to be expanded and determines the target size. Based on the target size, a canvas that meets the target size is displayed in the screen area, so that the media to be expanded is displayed in the area of ​​the canvas, and a transparent view with gesture operation function is covered above the canvas. Based on the user's gesture operation on the canvas, the media to be expanded is scaled and moved within the constraints. According to the results of scaling and moving the media to be expanded, the expansion area around the media to be expanded is determined, and combined with the expansion area, the target media that meets the target size after the media to be expanded is obtained. In this way, the purpose of expanding the known media to be expanded is achieved, and the user can perform more convenient setting operations on the media to be expanded before the media is expanded, thereby improving the effect of media expansion processing and enhancing the user experience.

[0060] It should be noted that although the operations of the methods of the embodiments of the present disclosure are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in this specific order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowcharts can be performed in a different order. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0061] Corresponding to the aforementioned media processing method embodiment, the present disclosure also provides an embodiment of a media processing device.

[0062] As shown in FIG5 , FIG5 is a block diagram of a media processing device according to an exemplary embodiment of the present disclosure, which may include: a first acquisition module 501 , a generation module 502 , an operation module 503 , a determination module 504 and a second acquisition module 505 .

[0063] The first acquisition module 501 is used to acquire the medium to be expanded and determine the target size.

[0064] The generating module 502 is configured to display a canvas meeting the target size in the screen area based on the target size, so that the media to be expanded is displayed in the area of ​​the canvas.

[0065] The operation module 503 is used to scale and move the to-be-expanded media within the constraints based on the user's gesture operation on the canvas.

[0066] The determination module 504 is configured to determine an expansion area around the media to be expanded according to the results of scaling and moving the media to be expanded.

[0067] The second acquisition module 505 is configured to combine the expansion area to obtain target media that meets the target size after the media to be expanded is expanded.

[0068] In some embodiments, the first acquisition module 501 is configured to: display the original media on the media editing interface, edit the original media based on the user's operation on the original media through the editing interface, and obtain the edited media as the media to be expanded in response to the user's preset operation.

[0069] In other embodiments, the operation module 503 is configured to: determine the maximum enlargement size and the minimum reduction size of the media to be expanded, scale the media to be expanded between the maximum enlargement size and the minimum reduction size within the canvas range according to the user's zoom gesture operation on the expanded media on the canvas, and move the media to be expanded within the canvas range according to the user's move gesture operation on the expanded media on the canvas.

[0070] In other embodiments, the operation module 503 determines the maximum enlargement size and the minimum reduction size of the medium to be expanded by determining a first aspect ratio of the medium to be expanded and a second aspect ratio of the canvas. If the first aspect ratio is less than the second aspect ratio, the maximum enlargement size is determined as the size of the medium to be expanded when the height of the medium to be expanded and the height of the canvas are the same, and the minimum reduction size is determined as the size that is smaller than the maximum enlargement size by a preset multiple. If the first aspect ratio is equal to the second aspect ratio, the maximum enlargement size is determined as the size of the canvas, and the minimum reduction size is determined as the size that is smaller than the maximum enlargement size by a preset multiple. If the first aspect ratio is greater than the second aspect ratio, the maximum enlargement size is determined as the size of the medium to be expanded when the width of the medium to be expanded and the width of the canvas are the same, and the minimum reduction size is determined as the size that is smaller than the maximum enlargement size by a preset multiple.

[0071] In other embodiments, the determination module 504 is configured to determine a mask bitmap corresponding to the target media based on the results of scaling and moving the media to be expanded, where the mask bitmap is used to indicate the location area of ​​the media to be expanded in the target media and the expansion area around the media to be expanded.

[0072] In other embodiments, the second acquisition module 505 is configured to upload the media to be expanded and the mask bitmap to the server, so that the server expands the media to be expanded based on the mask bitmap and the media to be expanded to obtain the target media.

[0073] In other embodiments, the device may further include: an input module (not shown in the figure).

[0074] The input module is used to obtain text guidance information input by the user.

[0075] The second acquisition module 505 can upload the media to be expanded and the mask bitmap to the server in the following manner, so that the server performs expansion based on the mask bitmap and the media to be expanded: uploading the media to be expanded and the mask bitmap, and obtaining resource locators corresponding to the media to be expanded and the mask bitmap, respectively; generating a media expansion task request based on the resource locators and text guidance information; and sending the media expansion task request to the server to instruct the server to expand the image to be expanded based on the media expansion task request.

[0076] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0077] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: The embodiments of the present disclosure provide a media processing method and device, which obtains the media to be expanded and determines the target size. Based on the target size, a canvas that meets the target size is displayed in the screen area, so that the media to be expanded is displayed in the area of ​​the canvas, and a transparent view with gesture operation function is covered above the canvas. Based on the gesture operation of the user on the canvas, the media to be expanded is scaled and moved within the restriction conditions. According to the result of scaling and moving the media to be expanded, the expansion area around the media to be expanded is determined, and combined with the expansion area, the target media that meets the target size after the media to be expanded is obtained. Thereby, the purpose of expanding the known media to be expanded is achieved, and the user can perform more convenient setting operations on the media to be expanded before the media is expanded, thereby improving the effect of media expansion processing and enhancing the user experience.

[0078] Some embodiments of the present disclosure provide an electronic device. The electronic device includes a processor and a memory, which can be used to implement a client or a server. The memory is used to non-transiently store computer-executable instructions (e.g., one or more computer program modules). The processor is used to run the computer-executable instructions, and when the computer-executable instructions are run by the processor, one or more steps in the media processing method described above can be executed, thereby implementing the media processing method described above. The memory and the processor can be interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0079] For example, the processor may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device to perform desired functions.

[0080] For example, the memory may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor may execute one or more computer program modules to implement various functions of the electronic device. Various applications and various data, as well as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.

[0081] It should be noted that, in the embodiments of the present disclosure, the specific functions and technical effects of the electronic device can be referred to the above description of the media processing method, which will not be repeated here.

[0082] Figure 6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the media processing method provided by the embodiments of the present disclosure. The electronic device 920 may be a terminal device, etc., which can be used to implement a client or a server. The electronic device 920 may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that the electronic device 920 shown in Figure 6 is only an example and does not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.

[0083] As shown in FIG6 , the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.

[0084] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG6 shows the electronic device 920 with various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.

[0085] For example, according to an embodiment of the present disclosure, the above-mentioned media processing method 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 non-transitory computer-readable medium, and the computer program includes program code for executing the above-mentioned media processing method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the media processing method provided by the embodiment of the present disclosure can be implemented.

[0086] Some embodiments of the present disclosure provide a storage medium. For example, the storage medium may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions. When the non-transitory computer-executable instructions are executed by a processor, the media processing method described in the embodiments of the present disclosure may be implemented. For example, when the non-transitory computer-executable instructions are executed by a processor, one or more steps of the media processing method described above may be performed.

[0087] For example, the storage medium may be applied to the above-mentioned electronic device. For example, the storage medium may include a memory in the electronic device.

[0088] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.

[0089] For example, the description of the storage medium can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium can refer to the description of the media processing method above, and are not repeated here.

[0090] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. 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 thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. 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 a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit 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.

[0091] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0092] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A media processing method, comprising: Get the media to be expanded; Based on the target size, displaying a canvas meeting the target size in the screen area so that the media to be expanded is displayed in the area of the canvas; Based on the user's gesture operation on the canvas, scaling and moving the media to be expanded within the constraints; determining an expansion area around the media to be expanded according to a result of scaling and moving the media to be expanded; as well as Combined with the expansion area, a target medium that meets the target size is obtained after the medium to be expanded is expanded.

2. The method according to claim 1, wherein obtaining the media to be expanded comprises: Display original media in the media editing interface; Editing the original media based on the user's operation on the original media through the editing interface; as well as In response to a preset operation of the user, the media after the editing process is obtained as the media to be expanded.

3. The method according to claim 1 , wherein scaling and moving the to-be-expanded media within constraints based on a user's gesture operation on the canvas comprises: Determining a maximum enlargement size and a minimum reduction size of the medium to be expanded; According to a user's zoom gesture operation on the media to be expanded on the canvas, the media to be expanded is zoomed in and out between the maximum zoom-in size and the minimum zoom-out size within the canvas; as well as According to the user's gesture operation on the media to be expanded on the canvas, the media to be expanded is moved within the range of the canvas.

4. The method according to claim 3, wherein determining the maximum enlargement size and the minimum reduction size of the to-be-expanded media comprises: Determining a first aspect ratio of the to-be-expanded media and a second aspect ratio of the canvas; If the first aspect ratio is smaller than the second aspect ratio, the size of the medium to be expanded when the height of the medium to be expanded is the same as the height of the canvas is determined as the maximum enlargement size, and the size that is smaller than the maximum enlargement size by a preset multiple is determined as the minimum reduction size; If the first aspect ratio is equal to the second aspect ratio, determining the size of the canvas as the maximum enlarged size, and determining a size that is smaller than the maximum enlarged size by the preset multiple as the minimum reduced size; as well as If the first aspect ratio is greater than the second aspect ratio, the size of the medium to be expanded when the width of the medium to be expanded is the same as the width of the canvas is determined as the maximum enlargement size, and the size that is smaller than the maximum enlargement size by the preset multiple is determined as the minimum reduction size.

5. The method according to claim 1 , wherein determining the expansion area around the medium to be expanded according to the result of scaling and moving the medium to be expanded comprises: as well as Determining a mask bitmap corresponding to the target medium according to the results of scaling and moving the medium to be expanded; The mask bitmap is used to indicate the location area of the to-be-expanded medium in the target medium and the expansion area around the to-be-expanded medium.

6. The method according to claim 5, wherein obtaining the target medium that meets the target size after expanding the medium to be expanded in combination with the expansion area comprises: Uploading the media to be expanded and the mask bitmap to a server, so that the server performs expansion based on the mask bitmap and the media to be expanded to obtain target media; as well as The target media is received from the server.

7. The method according to claim 6, further comprising: Get the text guidance information entered by the user; and The step of uploading the medium to be expanded and the mask bitmap to a server, and causing the server to expand the medium based on the mask bitmap and the medium to be expanded, comprises: Uploading the media to be expanded and the mask bitmap, and obtaining resource locators corresponding to the media to be expanded and the mask bitmap respectively; generating a media extension task request based on the resource locator and the text guide information; and The media extension task request is sent to the server to instruct the server to perform extension processing on the image to be extended based on the media extension task request.

8. A media processing device, comprising: A first acquisition module, configured to acquire the media to be expanded; A generating module, configured to display a canvas meeting the target size in a screen area based on the target size, so that the media to be expanded is displayed in the area of the canvas; An operation module, configured to scale and move the media to be expanded within a constraint condition based on a user's gesture operation on the canvas; a determining module, configured to determine an expansion area around the media to be expanded based on a result of scaling and moving the media to be expanded; as well as The second acquisition module is configured to combine the expansion area to obtain target media that meets the target size after expanding the medium to be expanded.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data rendering method and device, electronic equipment and computer storage medium

    CN114037748A

  • Image processing method and device, equipment and storage medium

    CN115878248A

  • Image processing method and device, electronic equipment and storage medium

    CN116884004A

  • Image processing method, electronic equipment and storage medium

    CN117455799A

  • Image processing method, device and equipment, computer readable storage medium and product

    CN117573013A