Image Processing Method and Related Devices Based on URL Link Configuration
The method addresses limitations in local image processing by using URL linkage to process images via cloud-based imageMagick, enhancing scalability and management while preventing image leakage.
Patent Information
- Application Number
- CN202210352869.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the prior art, the image processing method is mainly based on local files, with limited processing capabilities, and cannot process a large number of pictures in real time. It is not convenient to share and reference rendered pictures on the Internet, and it is difficult to achieve unified management and access rights control, which is easy to lead to image leakage.
By creating http requests, stitching URL parameters, using imageMagick to process images in the cloud, and output image file streams, and using browser rendering and loading to achieve unified management and access control to prevent image leakage.
It realizes efficient processing and unified management of a large number of images, provides access control, prevents image leakage, and facilitates browser rendering and loading.
Smart Images

Figure CN114969587B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field, and in particular to an image processing method and related devices based on URL link configuration. Background Art
[0002] Image processing technology refers to the technology of a computer processing image information. Generally, image processing is based on local files, and relevant image processing is performed using software. The processing ability is limited, inconvenient to expand, and unable to perform real-time processing on a large number of pictures; and it is not convenient to share pictures on the network, nor is it convenient for browsers to reference and render pictures. Summary of the Invention
[0003] In view of this, the purpose of this application is to propose an image processing method and related devices based on URL link configuration to solve the above problems.
[0004] Based on the above purpose, the first aspect of this application provides an image processing method based on URL link configuration, including:
[0005] Create an http request;
[0006] In response to determining that a picture processing URL request is received, splice the http request with the URL parameters in the picture processing URL request to obtain a URL link;
[0007] Extract the URL parameters in the URL link;
[0008] Based on the URL parameters, use the imageMagick to process the picture in the cloud and output a picture file stream;
[0009] Based on the picture file stream, use a browser to render and load the picture.
[0010] Further, the using the imageMagick to process the picture in the cloud based on the URL parameters specifically includes:
[0011] Identify the first imageView parameter in the URL link;
[0012] Based on the first imageView parameter, process the picture to generate a first thumbnail of a preset size.
[0013] Further, the using the imageMagick to process the picture in the cloud based on the URL parameters further includes:
[0014] Identify the second imageView parameter in the URL link;
[0015] Process the first thumbnail based on the second imageView parameter to generate a second thumbnail with a fixed width and a height that changes according to a preset ratio.
[0016] Furthermore, the processing of the image in the cloud using the imageMagick based on the URL parameter further includes:
[0017] Identify the first imageMogr parameter in the URL link;
[0018] Process the image based on the first imageMogr parameter to generate the image with the total number of pixels less than a preset specified value.
[0019] Furthermore, the processing of the image in the cloud using the imageMagick based on the URL parameter further includes:
[0020] Identify the second imageMogr parameter in the URL link;
[0021] Gradually display the image based on the second imageMogr parameter.
[0022] Furthermore, the processing of the image in the cloud using the imageMagick based on the URL parameter further includes:
[0023] Identify the watermark parameter in the URL link;
[0024] Add a watermark to the image based on the watermark parameter.
[0025] The second aspect of the present application provides an image processing device configured based on a URL link, which is characterized by including:
[0026] A creation module, configured to: create an http request;
[0027] A splicing module, configured to: in response to determining that an image processing URL request is received, splice the http request and the URL parameter in the image processing URL request to obtain a URL link;
[0028] A parameter extraction module, configured to: use imageMagick to obtain the URL parameter in the URL link;
[0029] An imageMagick processing module, configured to: process the image in the cloud using the imageMagick based on the URL parameter and output an image file stream;
[0030] A browser processing module, configured to: based on the picture file stream, use a browser to render and load the picture.
[0031] The third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method provided in the first aspect of the present application is implemented.
[0032] The fourth aspect of the present application provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method provided in the first aspect of the present application.
[0033] As can be seen from the above, for the image processing method and related devices configured based on URL links provided by the present application, first, an http request needs to be created. After receiving the picture processing URL request, the http request is concatenated with the URL parameters in the picture processing URL request to obtain a URL link. Then, the URL parameters in the URL link are extracted, and based on this URL parameter, the picture is processed in the cloud using imageMagick, and a picture file stream is output. Finally, based on this picture file stream, the browser is used to render and load the picture to complete the processing of the picture. Since the processing methods of the pictures are all concatenated into the http request, pictures with the same processing method can share a URL link, and it is relatively easy to implement the processing of a large number of pictures. Since the processing of the pictures is executed according to the URL link, the processed images can be accessed through the URL, which is convenient for unified management and maintenance of the images, and access permission control can also be provided for the URL link to prevent the leakage of the images. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1 It is a flowchart of the image processing method configured based on URL links according to an embodiment of the present application;
[0036] Figure 2 It is a schematic diagram of the execution process of the image processing method configured based on URL links according to an embodiment of the present application;
[0037] Figure 3Flow chart of image processing based on the first imageView parameter in the embodiments of the present application;
[0038] Figure 4 Flow chart of image processing based on the second imageView parameter in the embodiments of the present application;
[0039] Figure 5 Flow chart of image processing based on the first imageMogr parameter in the embodiments of the present application;
[0040] Figure 6 Flow chart of image processing based on the second imageMogr parameter in the embodiments of the present application;
[0041] Figure 7 Flow chart of image processing based on the watermark parameter in the embodiments of the present application;
[0042] Figure 8 Flow chart of image processing based on the roundPic parameter in the embodiments of the present application;
[0043] Figure 9 Chart of parameters and corresponding effects in the embodiments of the present application;
[0044] Figure 10 Structural diagram of the image processing device based on the URL link configuration in the embodiments of the present application;
[0045] Figure 11 Structural diagram of the electronic device in the embodiments of the present application. Detailed implementation manners
[0046] To make the objectives, technical solutions and advantages of the present application clearer and more understandable, the following further elaborates on the present application in detail with reference to specific embodiments and the accompanying drawings.
[0047] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those with ordinary skills in the field to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0048] In related technologies, image processing techniques generally perform interactive processing based on a single current image. Different image processing operations such as doodling, adding watermarks, and blurring can be performed on the image. However, the processing efficiency for a large number of images is not high, which is inconvenient for websites that require image rendering. Moreover, the processed images cannot be accessed, making it difficult to achieve unified management and maintenance of images, and corresponding access permission control cannot be provided, easily resulting in image leakage.
[0049] The image processing method based on URL link configuration provided by the embodiments of the present application realizes the processing operation of images by splicing the URL parameters in the http request. It is more suitable for scenarios that require a large amount of image processing. At the same time, the processed images can be accessed through the URL. After processing, the image file stream is output, which is convenient for unified management and maintenance of images, provides access permission control, and prevents image leakage. The processed images are stored in the form of image file streams, which is convenient for browsers to render and load a large number of images.
[0050] In some embodiments, as Figure 1 shown, the image processing method based on URL link configuration includes:
[0051] Step 100: Create an http request.
[0052] In this step, to achieve image processing in the cloud, it is necessary to create a corresponding http request.
[0053] Step 200: In response to determining that a picture processing URL request is received, splice the http request with the URL parameters in the picture processing URL request to obtain a URL link.
[0054] Optionally, the URL link can be http: / / ip:port / cms / api-image / image / bucket / objectId / Path. Among them, the URL parameters are spliced to the position corresponding to Path. The objectId in the URL link is a string of randomly generated characters by the system. The objectId is returned by the server (the server for processing images) that uploads the picture to be processed to the user. The objectId serves as the unique identifier for the picture processing and is used for subsequent unified management of the processed pictures.
[0055] Optionally, the objectId is selected because in a distributed environment, the ordinary auto-incrementing Id will inevitably affect efficiency if it is to be incremented correctly. Therefore, the objectId is used as the object identifier. The objectId consists of a 12-bit value: the first 4 bytes represent the timestamp, which is the time when the document was created. It is incremented, which can ensure the overall incremental order of the objectId. However, this increment is not absolute because this time is only accurate to the second, and the objectIds generated within the same second on the same machine will also be different due to different pids. The objectId with a smaller pid is always ranked ahead of the one with a larger pid. Among them, pid is the abbreviation of Proportional, Integral, and Differential. Pid is a control algorithm that combines the three links of proportional, integral, and differential. Then the next 3 bits are the machine identification code, that is, in the same machine, each time an objectId is generated, these three bytes are always equal, which is used to determine the machine processing the picture. Immediately following are 2 bits which are the values of the process id; the last 3 bits are random values.
[0056] Step 300: Extract the URL parameters from the URL link.
[0057] In this step, it is necessary to extract the URL parameters from the URL link for performing corresponding picture processing actions according to the parameters.
[0058] Step 400: Based on the URL parameters, use imageMagick to process the picture in the cloud and output the picture file stream.
[0059] In this step, ImageMagick is a software used to create, edit, and composite images. It can read, convert, and write images in multiple formats. Image cutting, color replacement, application of various effects, rotation and combination of images, text, lines, polygons, ellipses, curves, stretching and rotating appended to images. ImageMagick supports most operating systems. ImageMagick can be used to read, write, and process more than 90 types of image files, including popular formats such as TIFF, JPEG, GIF, PNG, PDF, and PhotoCD. Using ImageMagick, images can be dynamically generated, and operations such as resizing, rotating, sharpening, color reduction, or adding special effects can be performed on one (or a group of) images, and the results of the operations can be saved in the same format or other formats. Operations on images can be carried out either through the command line or by programming in C / C++, Perl, Java, PHP, Python, or Ruby. Therefore, choosing ImageMagick to process images can meet the requirements of a large number of image processing tasks, and its characteristics of operating on images through the command line meet the requirements of processing images by using URL links.
[0060] Among them, as Figure 2 shown, the URL parameters mainly include: imageView, imageMogr, watermark, and / or roundPic parameters. The parameters of the imageView class are mainly used to adjust the size of the image; the parameters of the imageMogr class are mainly used to adjust the total number of image pixels and the display mode; the parameters of the watermark class are mainly used to add corresponding watermarks to the image.
[0061] Among them, the output image file stream means that the processed image is located in the same file, which is convenient for unified management and maintenance of the image, is conducive to providing access control, and prevents the leakage of the image. The processed image is stored in the form of an image file stream, which can also facilitate the browser to render and load a large number of images.
[0062] Step 500: Based on the image file stream, use the browser to render and load the image.
[0063] In this step, the processed image is rendered and loaded through the browser, which is convenient for users to view the image at any time.
[0064] As an optional embodiment, as Figure 3 shown, based on the URL parameters, use ImageMagick to process the image in the cloud, specifically including:
[0065] Step 411: Identify the first imageView parameter in the URL link.
[0066] Step 412: Process the picture based on the first imageView parameter to generate a first thumbnail of a preset size.
[0067] Optionally, if the first imageView parameter is imageView / 1 / w / 200 / h / 200, it means to crop the central part of the picture and generate a 200x200 thumbnail by scaling it proportionally. Here, w represents the width, h represents the height, and 200 represents the size. The parameter representing the size can be set according to the actual situation.
[0068] As an optional embodiment, as Figure 4 shown, based on the URL parameter, using imageMagick to process the picture in the cloud further includes:
[0069] Step 421: Identify the second imageView parameter in the URL link;
[0070] Step 422: Process the first thumbnail based on the second imageView parameter to generate a second thumbnail with a fixed width and a height that changes according to a preset ratio.
[0071] Optionally, if the second imageView parameter is imageView / 2 / w / 200, it means the width is fixed at 200px and the height is scaled proportionally to 133px to generate a 200x133 thumbnail. Here, w represents the width, 200 represents the fixed size, and if the height size is not input, it means it is scaled down or up to the default value of 133px. The parameter representing the size can be set according to the actual situation.
[0072] As an optional embodiment, as Figure 5 shown, based on the URL parameter, using imageMagick to process the picture in the cloud further includes:
[0073] Step 431: Identify the first imageMogr parameter in the URL link.
[0074] Step 432: Process the picture based on the first imageMogr parameter to generate a picture with the total number of pixels less than a preset specified value.
[0075] Optionally, if the first imageMogr parameter is imageMogr / thumbnail / 350000@, it means to generate a picture with the total number of pixels less than the specified value: 350000. Here, thumbnail represents caching, and 350000 represents the threshold of the number of pixels of the cached picture. This threshold can be set according to the actual situation.
[0076] As an alternative embodiment, as Figure 6 shown, based on the URL parameters, the image is processed in the cloud using ImageMagick, and further includes:
[0077] Step 441: Identify the second imageMogr parameter in the URL link.
[0078] Step 442: Gradually display the image based on the second imageMogr parameter.
[0079] Among them, if the second imageMogr parameter is imageMogr / thumbnail / 300x300 / interlace / 1, it means to gradually display the image.
[0080] As an alternative embodiment, as Figure 7 shown, based on the URL parameters, the image is processed in the cloud using ImageMagick, and further includes:
[0081] Step 451: Identify the watermark parameter in the URL link.
[0082] Step 452: Add a watermark to the image based on the watermark parameter.
[0083] Optionally, if watermark / 2 / text / 5rWL6K-V5LiA5LiL / dx / 300 / dy / 300 / fontsize / 17 is used as the watermark parameter, it means to add a watermark to the image, and the watermark content can be freely selected according to the actual situation.
[0084] As an alternative embodiment, as Figure 8 shown, based on the URL parameters, the image is processed in the cloud using ImageMagick, and further includes:
[0085] Step 461: Identify the roundPic parameter in the URL link.
[0086] Step 462: Make the image into a rounded corner based on the roundPic parameter.
[0087] Optionally, if the roundPic parameter is roundPic / radius / 50, it means to turn an image into a rounded corner.
[0088] Optionally, as Figure 9 shown, if the imageInfo parameter in the URL link is recognized, it means that the basic information of the image has been obtained; if the exif parameter in the URL link is recognized, it means that the exif information of the image has been obtained.
[0089] It should be noted that the method of the embodiments of the present application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present application, and these multiple devices will interact with each other to complete the described method.
[0090] It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0091] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides an image processing apparatus based on URL link configuration.
[0092] Referring to Figure 10 , the image processing apparatus based on URL link configuration includes:
[0093] A creation module 10, configured to: create an http request;
[0094] A splicing module 20, configured to: in response to determining that a picture processing URL request is received, splice the http request and the URL parameter in the picture processing URL request to obtain a URL link;
[0095] A parameter extraction module 30, configured to: extract the URL parameter in the URL link;
[0096] An imageMagick processing module 40, configured to: based on the URL parameter, use imageMagick to process the picture in the cloud and output a picture file stream;
[0097] A browser processing module 50, configured to: based on the picture file stream, use the browser to render and load the picture.
[0098] For the convenience of description, when describing the above apparatus, it is divided into various modules according to functions and described separately. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0099] The device of the above embodiment is used to implement the corresponding image processing method configured based on the URL link in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0100] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the image processing method configured based on the URL link described in any of the above embodiments.
[0101] Figure 11 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0102] The processor 1010 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0103] The memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0104] The input / output interface 1030 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0105] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to enable communication and interaction between this device and other devices. The communication module can achieve communication through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0106] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0107] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0108] The electronic device of the above embodiment is used to implement the corresponding image processing method configured based on a URL link in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0109] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the image processing method configured based on a URL link as described in any of the foregoing embodiments.
[0110] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0111] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the image processing method configured based on the URL link as described in any one of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0112] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; within the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
[0113] In addition, for the sake of simplicity of explanation and discussion, and so as not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the devices may be shown in block diagram form so as not to make the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0114] Although the present application has been described in connection with specific embodiments of the present application, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0115] The embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.
Claims
1. An image processing method based on URL link configuration, characterized in that, Including: Create an HTTP request; In response to determining that a picture processing URL request is received, splice the HTTP request with the URL parameters in the picture processing URL request to obtain a URL link; wherein, the URL link is http: / / ip:port / cms / api-image / image / bucket / objectId / Path, the URL parameters are spliced to the position corresponding to Path, and the objectId in the URL link is the unique identifier for picture processing; Extract the URL parameters from the URL link; Based on the URL parameters, use ImageMagick to process the picture in the cloud and output a picture file stream; Among them, using ImageMagick to process the picture in the cloud based on the URL parameters includes: identifying the first imageMogr parameter in the URL link; based on the first imageMogr parameter, processing the picture to generate the picture with the total number of pixels less than a preset specified value; identifying the second imageMogr parameter in the URL link; based on the second imageMogr parameter, gradually display the picture; identifying the roundPic parameter in the URL link; based on the roundPic parameter, make the picture into a rounded corner; Based on the picture file stream, use a browser to render and load the picture.
2. The method according to claim 1, wherein The using ImageMagick to process the picture in the cloud based on the URL parameters specifically includes: Identify the first imageView parameter in the URL link; Based on the first imageView parameter, process the picture to generate a first thumbnail with a preset size.
3. The method according to claim 2, wherein The using ImageMagick to process the picture in the cloud based on the URL parameters further includes: Identify the second imageView parameter in the URL link; Based on the second imageView parameter, process the first thumbnail to generate a second thumbnail with a fixed width and a height that changes according to a preset ratio.
4. The method according to claim 1, characterized in that The using ImageMagick to process the picture in the cloud based on the URL parameters further includes: Identify the watermark parameter in the URL link; Based on the watermark parameter, add a watermark to the picture.
5. An image processing device configured based on a URL link, characterized in that, Including: A creation module, configured to: create an HTTP request; The splicing module is configured to: in response to determining that a picture processing URL request is received, splice the http request and the URL parameters in the picture processing URL request to obtain a URL link; wherein, the URL link is http: / / ip:port / cms / api-image / image / bucket / objectId / Path, the URL parameters are spliced to the corresponding position of Path, and the objectId in the URL link is the unique identifier for picture processing; The parameter extraction module is configured to: extract the URL parameters in the URL link; The imageMagick processing module is configured to: based on the URL parameters, use the imageMagick to process the picture in the cloud and output a picture file stream; Wherein, using the imageMagick to process the picture in the cloud based on the URL parameters includes: identifying the first imageMogr parameter in the URL link; processing the picture based on the first imageMogr parameter to generate the picture with the total number of pixels less than a preset specified value; identifying the second imageMogr parameter in the URL link; gradually displaying the picture based on the second imageMogr parameter; identifying the roundPic parameter in the URL link; and making the picture into a rounded corner based on the roundPic parameter; The browser processing module is configured to: based on the picture file stream, use the browser to render and load the picture.
6. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
A picture processing method and a server
CN109448075A