Image generation method, apparatus and device
By editing the image in image editing mode and drawing a second image using different drawing parameters after receiving a confirmation to generate the image, the distortion and inconsistency caused by image scaling are solved, resulting in better visual and display effects.
Patent Information
- Application Number
- CN202210376729.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-09-08
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2037-09-08
AI Technical Summary
In the image generation process, scaling down images proportionally in existing technologies can easily lead to distortion and inconsistencies in the displayed objects.
By editing the first image in image editing mode, editing data is obtained. After receiving a confirmation and generation instruction, a second image is drawn based on different drawing parameters, so that the sizes of the first and second images are inconsistent. The attribute values of various display objects in the image are adjusted, such as font size, spacing and graphic ratio.
It effectively solves the problems of image distortion and inconsistency of displayed objects, and improves the visual effect and display quality of images.
Smart Images

Figure CN114820880B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to image generation methods, apparatus and devices. Background Technology
[0002] With the development of information technology, information graphics technology has been widely used. Through information graphics technology, certain information can be converted into two-dimensional graphs (such as line charts, waveform charts, trend charts, etc.) for analysis. For example, quarterly sales data of a company can be converted into trend graphs; statistical data on people of different age groups can be converted into age distribution charts; and stock operation information can be converted into stock candlestick charts, etc.
[0003] Image generation typically involves two stages: editing and confirmation. During image editing, a larger image is generated to allow the user to clearly see the entire image. Upon receiving confirmation, to improve display quality and meet transmission requirements, the image generated in the editing stage can be scaled down to a smaller size. However, scaling down can easily lead to image distortion, thus necessitating a more visually appealing image generation solution. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this specification provides image generation methods, apparatus and devices.
[0005] According to a first aspect of an embodiment of this specification, an image generation method is provided, the method comprising:
[0006] In image editing mode, the first image drawn based on the first drawing parameters and using source data is edited to obtain edit data; the source data is statistical data.
[0007] Upon receiving the confirmation generation instruction, a second image is drawn based on the second drawing parameters, using the source data and the editing data;
[0008] The first image drawn based on the first drawing parameters has a different size than the second image drawn based on the second drawing parameters.
[0009] Optionally, the drawing parameter values include one or more of the following: image display area size, font size, character spacing, graphic scaling ratio, graphic spacing, and border size of the editing data.
[0010] Optionally, the rendering parameter values for rendering the first image are determined based on the resolution of the device performing the method; or,
[0011] The drawing parameter values for drawing the first image are determined based on the first parameter setting instruction; or,
[0012] The drawing parameters for the second image are preset values; or,
[0013] The drawing parameter values for drawing the second image are determined based on the second parameter setting command.
[0014] Optionally, drawing the second image based on the second drawing parameters and using the source data and the editing data includes:
[0015] Based on one or more of the aforementioned graphic scaling ratio and graphic spacing, an initial second image is drawn using the source data;
[0016] By utilizing one or more of the image's display area size, font size, character spacing, and editing data border size, the editing data is mapped onto the initial second image to obtain the second image.
[0017] Optionally, the drawing parameters are used to graphically represent the source data as a two-dimensional line graph.
[0018] Optionally, the first image / second image includes a trend chart of the product object.
[0019] Optionally, the editing data includes the edited content and positional information for determining the position of the edited content on the canvas. Drawing a second image using the editing data includes:
[0020] The position of the edited content on the canvas is determined using the position information in the edited data, and the edited content is drawn at that position on the canvas.
[0021] Optionally, the size of the first image is larger than the size of the second image.
[0022] Optionally, the method further includes:
[0023] The image information carrying the second image is sent to the server. The image information is used to instruct the server to generate the URL of the second image and send the URL to the target terminal indicated by the image information.
[0024] Optionally, the method further includes:
[0025] Based on the object addition instruction, select the time period corresponding to the first image;
[0026] The source data corresponding to the time period is used as the source data for drawing the first image.
[0027] Optionally, editing the first image drawn based on the first drawing parameters and using the source data to obtain edit data includes:
[0028] Based on the first drawing parameters, the first image is drawn using the source data;
[0029] According to the user's editing instructions, tags are added to the first image to obtain editing data.
[0030] According to a second aspect of the embodiments of this specification, an image generation apparatus is provided, the apparatus comprising:
[0031] The editing module is used to edit a first image drawn based on first drawing parameters and using source data in image editing mode, and obtain edit data; the source data is statistical data.
[0032] The drawing module is used to draw a second image based on the second drawing parameters and the source data and the editing data after receiving the confirmation generation instruction;
[0033] The first image drawn based on the first drawing parameters has a different size than the second image drawn based on the second drawing parameters.
[0034] According to a third aspect of the embodiments of this specification, a computer device is provided, comprising:
[0035] processor;
[0036] Memory used to store processor-executable instructions;
[0037] The processor is configured as follows:
[0038] In image editing mode, the first image drawn based on the first drawing parameters and using source data is edited to obtain edit data; the source data is statistical data.
[0039] Upon receiving the confirmation generation instruction, a second image is drawn based on the second drawing parameters, using the source data and the editing data;
[0040] The first image drawn based on the first drawing parameters has a different size than the second image drawn based on the second drawing parameters.
[0041] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:
[0042] In the embodiments of this specification, in the image editing state, the first image drawn using the source data can be edited to obtain edit data. After receiving the confirmation generation instruction, the second image can be drawn based on the source data and the edit data. Since the drawing parameter values used to draw the first image and the second image are different, the sizes of the two images can be inconsistent, thereby effectively solving problems such as image distortion and incoordination of various displayed objects in the image.
[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0045] Figure 1A This is a flowchart illustrating an image generation method according to an exemplary embodiment of this specification.
[0046] Figure 1B This is a rendering of a first image and a second image shown in this specification according to an exemplary embodiment.
[0047] Figure 1C This is a schematic diagram illustrating an information interaction according to an exemplary embodiment of this specification.
[0048] Figure 2 This is an application scenario diagram illustrating an image generation method according to an exemplary embodiment of this specification.
[0049] Figure 3 This is a hardware structure diagram of the computer device containing the image generation device described in this manual.
[0050] Figure 4 This is a block diagram illustrating an image generation apparatus according to an exemplary embodiment of this specification. Detailed Implementation
[0051] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0052] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims 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 and all possible combinations of one or more of the associated listed items.
[0053] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, 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 "when," "when," or "in response to determination."
[0054] With the development of information technology, information graphics technology has been widely used. Through information graphics technology, certain information can be converted into two-dimensional graphs (such as line charts, waveform charts, trend charts, etc.) for analysis. For example, quarterly sales data of a company can be converted into trend graphs; statistical data on people of different age groups can be converted into age distribution charts; and stock operation information can be converted into stock candlestick charts, etc.
[0055] Taking a financial management application as an example, product objects can be added based on user commands in scenarios such as communication or information posting, and displayed in the form of images. For example, users can add trend charts of products they are interested in (such as stocks, funds, etc.) to the current discussion, opinion, or answer, and can also add text descriptions to the trend charts in the form of labels. It is clear that during the trend chart editing stage, trend charts can be added, and labels can be edited. Understandably, during the trend chart editing stage, users can choose whether to add labels. The trend chart can be a technical graph that displays trading information from the stock market or futures market using curves or candlestick charts on a coordinate graph. In one example, the horizontal axis of the coordinate system can be a time period, the upper half of the vertical axis can be the stock price or index for that time period, and the lower half can display the trading volume. Labels can be text descriptions of the trend chart.
[0056] During the editing phase, to allow users to clearly see the entire image, a larger display area can be used to show a larger image, allowing users to quickly select the area where they need to add labels or other editing information. However, after receiving confirmation to generate the image, a smaller image is needed to improve the display effect and meet transmission or storage requirements. Therefore, adding product objects involves two image sizes. Both sizes use the same source data and editing data, but their display ratios differ. Simply reducing the larger image to a smaller one based on aspect ratio can cause image distortion and inconsistencies between displayed objects. In particular, compression often occurs in one direction while the other is left unadjusted or only slightly adjusted, resulting in significant image distortion.
[0057] To provide a visually better image generation solution, in the image editing state, the first image drawn using source data can be edited according to the editing instructions to obtain edit data. After receiving the confirmation generation instruction, a second image can be drawn based on the source data and the edit data. Since the drawing parameter values used to draw the first image and the second image are different, the sizes of the two images can be inconsistent, thereby effectively solving problems such as image distortion and incoordination of various displayed objects in the image.
[0058] This manual can be applied to devices that require image generation, which can be either client or server devices. In one scenario, the client device can obtain source data for drawing an image from the server device and then draw the image. The client device can be any electronic device capable of drawing images, including handheld or other electronic devices. Examples include cellular phones, media players, or other handheld portable devices; smaller portable devices such as wristwatches or pendant devices; other wearable or miniaturized devices; gaming equipment; tablets; laptops; desktop computers; televisions; computers integrated into computer monitors; or other electronic devices. The server device can be a server or a server cluster.
[0059] like Figure 1A As shown, Figure 1A This is a flowchart illustrating an image generation method according to an exemplary embodiment of this specification, the method including the following steps:
[0060] In step 101, in image editing mode, the first image drawn using source data is edited according to editing instructions to obtain edit data.
[0061] In step 102, after receiving the confirmation generation instruction, a second image is drawn based on the source data and the edit data.
[0062] The drawing parameters used to draw the first image and the second image are different, so that the sizes of the two images are inconsistent.
[0063] In image editing mode, a first image can be generated and edited. The source data can be data used to draw the first image, which can include two-dimensional line charts such as line graphs, waveform charts, or trend charts. For example, if the first image is an age distribution chart, the source data can be source data used to draw the age distribution chart; similarly, the first image can include a trend chart of a product object. If the first image is a trend chart of a product object such as a stock / fund, the source data can be source data used to draw the stock / fund trend chart.
[0064] In image editing mode, you can add the first image of an object based on the object addition command. For example, in discussion scenarios or opinion expression scenarios, you can add a trend chart of a product. When adding a product trend chart, you can select the product and the time period. Different source data can be obtained based on different time periods.
[0065] In image editing mode, the first image can also be edited, for example, by adding text descriptions in the form of labels. These descriptions can include explanations of the first image, highlighting key selling points or other information that needs to be noted. Editing commands can be generated based on user-triggered actions. After editing the first image according to these commands, edit data can be obtained. This edit data can then be used to perform further editing operations.
[0066] In one example, the edit data includes not only the displayed edit content but also positional information used to determine the location of the edit content on the canvas. The canvas can be the canvas used to draw the second image. Therefore, when drawing the second image based on the edit data, the positional information in the edit data can be used to determine the location of the edit content on the canvas, and the edit content can be drawn at that location on the canvas. For example, a base image can be drawn first based on source data, and then the positional information in the edit data can be used to determine the location of the edit content within the base image, and the edit content can then be drawn at that location on the base image.
[0067] As an example, location information can include coordinate information from a two-dimensional line graph. For instance, when the horizontal coordinate system in a two-dimensional line graph represents time, the location information can include the time information corresponding to the edited content. This allows the location of the edited content to be determined based on the time information when drawing the second graph. For example, if the edited content is the label information for a bar chart, the time information of that bar chart can be used as the time information for the label information. Therefore, when drawing the second graph, the label information can be drawn at the position corresponding to the time information. Thus, mapping the edited data between the first and second graphs using time information avoids errors in the placement of labels when drawing the second graph.
[0068] In some cases, the location information can include both horizontal and vertical coordinates, thereby determining the position of the edited content based on the horizontal and vertical coordinates and enabling the redrawing and restoration of the edited content.
[0069] Position information can be one or more factors that determine the position of the edited content on the artboard. Other factors can also be included to determine the position of the edited content on the artboard, such as whether the graphic frame displaying the edited content extends left or right from the time point. These are not listed here. As an example, other influencing factors can be pre-defined in the drawing strategy for drawing the second image.
[0070] After the user completes editing, they can trigger a confirmation command by clicking the confirmation button. Upon receiving the confirmation command, the execution terminal can draw a second image based on the source data and the edited data. When drawing the first and second images, the same drawing strategy can be used, but different drawing parameter values can be employed to ensure that the sizes of the first and second images are different.
[0071] Regarding the sizes of the first and second images, in some scenarios, editing can be performed first, followed by display. Therefore, as one example, the first image is larger than the second image. This allows for a larger first image to be provided during image editing, enabling users to clearly see the entire image. In the final confirmation stage, a smaller second image is provided to improve the display effect and meet transmission requirements. It is understandable that in other application scenarios, the first image can be smaller than the second image.
[0072] Specifically, a first set of drawing parameter values (including at least one drawing parameter value) can be set for the first image, and a second set of drawing parameter values (including at least one drawing parameter value) can be set for the second image. For the same drawing parameters, different values are used when drawing the first and second images. The main purpose is to ensure that the two images have different sizes and achieve a better display effect at their respective sizes. Therefore, the first set of drawing parameter values is determined to adapt to the size of the first image, and the second set of drawing parameter values is determined to adapt to the size of the second image. The second image drawn using the drawing parameter values from the second set, compared to the first image drawn using the drawing parameter values from the first set, allows for finer adjustments based on the inconsistency in the drawing parameter values.
[0073] The drawing parameters can include the size of the image's display area, as well as the attribute values of each object (primitive) in the image, such as the size and spacing of the primitives. The image may contain primitives such as characters and graphics; characters can be independent characters or characters within labels. For example, ... Figure 1BAs shown, the information above the trend chart includes related stocks / funds such as "Shanghai Composite Index," "1A0001.SH," and "3016.53," with text inside the labels such as "Bought" and "Sold." The graph can be used to describe information such as stock prices at each point in time, such as... Figure 1B As shown, a bar chart is used to describe the stock price at each point in time. Furthermore, edited content within the data can often be displayed within the chart frame to distinguish it from the underlying chart.
[0074] As an example, the drawing parameter values may include one or more of the following: font size, character spacing, graphic scaling ratio, graphic spacing, and border size of the edited data.
[0075] For the character mapping in the first and second images, character sizes are set to suit different image sizes. This ensures that characters of the appropriate size are displayed within the corresponding image size, avoiding character distortion caused by forced compression and resulting in a better image display. Characters at different locations can have the same or different font sizes. For example, the size of characters inside a label can differ from the size of characters outside.
[0076] Regarding the mapping of characters in the first and second images, and considering different image size requirements, character spacing is set to suit the corresponding image size. This ensures that displaying characters with the appropriate character spacing in an image of that size will result in a better display effect. For example, it can avoid the defect of drastically reducing character spacing due to forced compression, leading to indistinct spacing between adjacent characters. Alternatively, it can avoid the phenomenon where compression in only one direction (or one direction with much stronger compression than the other) results in significantly shortened spacing in the direction with stronger compression, while the spacing in the uncompressed or weakly compressed directions remains large.
[0077] For the mapping of graphics in the first and second images, and for different image size requirements, a suitable graphic scaling ratio is set for the corresponding image size, so as to realize the scaling of graphics in the image of that size based on the graphic scaling ratio, thereby achieving the appropriate adjustment of graphics.
[0078] Regarding the mapping of graphics in the first and second images, and considering different image size requirements, appropriate graphic spacing is set for images of corresponding sizes. This ensures that displaying graphics with the appropriate spacing within an image of that size improves the overall display effect. For example, it avoids the defect of drastically reducing graphic spacing due to forced compression, resulting in indistinct spacing between adjacent graphics. Alternatively, it avoids the phenomenon where compression in only one direction (or one direction with stronger compression than the other) leads to a significant reduction in spacing in the direction with stronger compression, while the spacing in the uncompressed or weakly compressed directions remains large.
[0079] For mapping the edited data in the first and second images, and considering different image size requirements, a border size suitable for the corresponding image size is set. This ensures that the border of that size is displayed in the image of that size, avoiding situations where the border overlaps other information. For example, it prevents the border of a label from covering other information.
[0080] Understandably, in order to achieve better results for images of different sizes, other fine-tuning adjustments can be made to the attributes of primitives in the image, which will not be listed here.
[0081] like Figure 1B As shown, Figure 1B This specification illustrates the effect of a first image and a second image according to an exemplary embodiment. In the example, the first image can be displayed in a product addition interface. In the first image, product information is displayed in a daily format based on drawing parameter values suitable for the first image size. The first image is editable, and labels such as "bought" and "sold" can be added. In the second image, a second image is drawn with drawing parameter values suitable for the second image size, allowing for appropriate adjustments to the attribute values of the graphic elements in the second image, resulting in a better display effect and avoiding issues such as character distortion and inconsistent spacing. In this example, the second image is displayed in a discussion initiation interface. After adding supplementary explanations, the information can be sent to the target terminal via the server by clicking the "send" control. It is evident that character distortion and other issues do not appear in the second image.
[0082] Regarding the method for determining the drawing parameter values in the first image, as an example, the drawing parameter values of the first image can be determined based on a first parameter setting instruction. The first parameter setting instruction can be an instruction generated based on a user-triggered operation. For example, in a preset parameter setting interface, the user can set the drawing parameter values in the first image. As another example, different parameter value sets are configured for different resolutions; by obtaining the parameter value set corresponding to the device resolution, the drawing parameter values of the first image can be obtained. Here, the device can be the device executing the image generation method. It is evident that configuring different parameter value sets for different resolutions can improve the display effect of the first image.
[0083] Regarding the method for determining the drawing parameter values in the second image, as an example, the drawing parameter values of the second image can be determined based on a second parameter setting instruction. This instruction can be generated based on a user-triggered operation. For example, in a preset parameter setting interface, the user can set the drawing parameter values in the second image, thereby obtaining the drawing parameter values and achieving controllability of the parameter values. As another example, different parameter value sets can be configured for different resolutions. By obtaining the parameter value set corresponding to the device resolution, the drawing parameter values of the second image can be obtained. Here, the device can be the device executing the image generation method. It is evident that configuring different parameter value sets for different resolutions can improve the display effect of the second image.
[0084] In some cases, there is a need to send the second image to other terminals, but the resolution of other terminals is difficult to determine. Therefore, the drawing parameter values of the second image can be specified in advance, that is, the drawing parameter values of the second image can be set to fixed values, so that different terminals can display the same second image.
[0085] For example, in scenarios such as initiating discussions or expressing opinions, image information carrying a second image can be sent to a server, which then forwards it to the target terminal. As an example, image information carrying the second image can be sent to a server, whereby the image information instructs the server to generate a URL (Uniform Resource Locator, URL address, etc.) for the second image, and then send the URL to the target terminal indicated by the image information.
[0086] like Figure 1C As shown, Figure 1C This specification illustrates an information interaction diagram based on an exemplary embodiment. A first user terminal, in image editing mode, edits a first image drawn using source data according to editing instructions to obtain edit data. After receiving a confirmation generation instruction, it draws a second image based on the source data and the edit data. Then, it sends image information carrying the second image to a server. The drawing parameter values used to draw the first and second images are different, resulting in inconsistent image sizes. The server can generate a URL for the second image based on the received image information and send the URL to the second user terminal indicated by the image information. The second user terminal can parse the URL to view the second image.
[0087] Furthermore, since all source and edit data can be obtained from the first image when drawing the second image, different drawing parameters can be set according to requirements to achieve different effects in the second image. The method of obtaining source and edit data provides convenience for later expansion, and corresponding functions can be added based on the obtained source and edit data.
[0088] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.
[0089] The following example illustrates one of the cases.
[0090] like Figure 2 As shown, Figure 2 This is an application scenario diagram illustrating an image generation method according to an exemplary embodiment of this specification. For adding an image of a product object, the process begins by entering a publisher page (e.g., a discussion page, opinion page, or answer page) (step 201). Based on the user's addition instruction, the product's trend chart data is obtained (step 202), and a first set of drawing parameter values for drawing the trend chart (large image) is obtained (step 203). The product trend chart (large image) is then drawn using the first set of drawing parameter values and the trend chart data (step 204). Based on the user's editing instruction, tag information for the product trend chart is added (step 205). After receiving a confirmation generation instruction, the trend chart data and tag information are obtained (step 206), and a second set of drawing parameter values for the trend chart (small image) is obtained (step 207). The product trend chart (small image) is then drawn using the second set of drawing parameter values, the trend chart data, and the tag information (step 208).
[0091] As can be seen, two different sets of parameters are configured for the stock / fund chart. These include the font size of the relevant stock / fund information above the chart, the size of the chart display area, the font size of the values within the chart, the size of the labels added to the chart, the text size within the labels, and various spacing parameters displayed on the chart. Using the same data source with different configuration parameters achieves a consistent and better visual effect. If different scale charts are needed later, only the drawing parameters need to be configured to achieve the desired visual effect.
[0092] Corresponding to the embodiments of the aforementioned image generation method, this specification also provides embodiments of an image generation apparatus and the electronic equipment to which it is applied.
[0093] The embodiments of the image generation apparatus described in this specification can be applied to computer devices. The apparatus embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of the computer device loading the corresponding computer program instructions from non-volatile memory into memory and executing them. From a hardware perspective, such as... Figure 3 The diagram shown is a hardware structure diagram of a computer device containing the image generation apparatus described in this specification. (Except for...) Figure 3 In addition to the processor 310, memory 330, network interface 320, and non-volatile memory 340 shown, the computer device in which the device 331 is located in the embodiment may also include other hardware depending on the actual function of the device, which will not be described in detail here.
[0094] like Figure 4 As shown, Figure 4 This is a block diagram illustrating an image generation apparatus according to an exemplary embodiment of the present specification, the apparatus comprising:
[0095] The editing module 41 is used to edit the first image drawn using source data according to editing instructions in image editing mode, and obtain editing data.
[0096] The drawing module 42 is used to draw a second image based on the source data and the edit data after receiving the confirmation generation instruction.
[0097] The drawing parameters used to draw the first image and the second image are different, so that the sizes of the two images are inconsistent.
[0098] Optionally, the drawing parameter values include one or more of the following: image display area size, font size, character spacing, graphic scaling ratio, graphic spacing, and border size of the editing data.
[0099] Optionally, the drawing parameter values for drawing the first image are determined based on the resolution of the device executing the apparatus.
[0100] Optionally, the drawing parameter values for drawing the first image are determined based on the first parameter setting instruction.
[0101] Optionally, the drawing parameters for drawing the second image are preset values.
[0102] Optionally, the drawing parameter values for drawing the second image are determined based on the second parameter setting instruction.
[0103] Optionally, the first image / second image includes a trend chart of the product object.
[0104] Optionally, the editing data includes the edited content and position information for determining the position of the edited content on the canvas. The drawing module 42 is specifically used to: determine the position of the edited content on the canvas using the position information in the editing data, and draw the edited content at that position on the canvas.
[0105] Optionally, the size of the first image is larger than the size of the second image.
[0106] Optionally, the device further includes ( Figure 4 (Not shown):
[0107] The information sending module is used to send image information carrying the second image to the server. The image information is used to instruct the server to generate the URL of the second image and send the URL to the target terminal indicated by the image information.
[0108] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0109] Accordingly, embodiments of this specification also provide a computer device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to:
[0110] In image editing mode, the first image drawn using source data is edited according to editing instructions to obtain edit data;
[0111] Upon receiving the confirmation generation instruction, a second image is drawn based on the source data and the edit data;
[0112] The drawing parameters used to draw the first image and the second image are different, so that the sizes of the two images are inconsistent.
[0113] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0114] Accordingly, embodiments of this specification also provide a computer storage medium storing program instructions, the program instructions including:
[0115] In image editing mode, the first image drawn using source data is edited according to editing instructions to obtain edit data;
[0116] Upon receiving the confirmation generation instruction, a second image is drawn based on the source data and the edit data;
[0117] The drawing parameters used to draw the first image and the second image are different, so that the sizes of the two images are inconsistent.
[0118] The embodiments of this specification may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may 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, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0119] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.
[0120] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.
[0121] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. An image generation method, the method comprising: In image editing mode, the first image, drawn using source data based on the first drawing parameter values, is edited to obtain edit data; The source data is statistical data; Upon receiving the confirmation generation instruction, a second image with a different size from the first image is drawn based on a second drawing parameter value that is different from the first drawing parameter value, using the source data and the editing data; The image contains one or more primitives, and the drawing parameter values include the attribute values of the primitives in the image; The second drawing parameter value is adapted to the size of the second image so that, during the drawing of the second image, the attribute values of the primitives contained in the second image can be adjusted to adapt to the size of the second image.
2. The method according to claim 1, wherein the drawing parameter values include: One or more of the following: image display area size, font size, character spacing, graphic scaling ratio, graphic spacing, and border size for editing data.
3. The method according to claim 2, wherein the first rendering parameter value for rendering the first image is determined based on the resolution of the device performing the method; or, The first drawing parameter value for drawing the first image is determined based on a first parameter setting instruction; or, The second drawing parameter value for drawing the second image is a preset value; or, The second drawing parameter value for drawing the second image is determined based on the second parameter setting instruction.
4. The method according to claim 2, wherein drawing the second image based on the second drawing parameters and using the source data and the editing data comprises: Based on one or more of the aforementioned graphic scaling ratio and graphic spacing, an initial second image is drawn using the source data; By utilizing one or more of the image's display area size, font size, character spacing, and editing data border size, the editing data is mapped onto the initial second image to obtain the second image.
5. The method according to claim 1, wherein the drawing parameters are used to graphically represent the source data as a two-dimensional line graph.
6. The method according to claim 1, wherein the first image / second image includes a trend chart of the product object.
7. The method according to any one of claims 1 to 6, wherein the editing data includes edited content and positional information for determining the position of the edited content on the canvas, and drawing a second image using the editing data includes: The position of the edited content on the canvas is determined using the position information in the edited data, and the edited content is drawn at that position on the canvas.
8. The method according to any one of claims 1 to 6, wherein the size of the first image is larger than the size of the second image.
9. The method according to any one of claims 1 to 6, wherein the method further comprises: The image information carrying the second image is sent to the server. The image information is used to instruct the server to generate the URL of the second image and send the URL to the target terminal indicated by the image information.
10. The method according to any one of claims 1 to 6, wherein the method further comprises: Based on the object addition instruction, select the time period corresponding to the first image; The source data corresponding to the time period is used as the source data for drawing the first image.
11. The method according to any one of claims 1 to 6, wherein editing the first image drawn based on the first drawing parameters and using source data to obtain edit data comprises: Based on the first drawing parameters, the first image is drawn using the source data; According to the user's editing instructions, tags are added to the first image to obtain editing data.
12. An image generation apparatus, the apparatus comprising: The editing module is used to edit the first image drawn using source data based on the first drawing parameter values in image editing mode, and obtain edit data. The source data is statistical data; The drawing module is used to draw a second image with a different size from the first image based on a second drawing parameter value that is different from the first drawing parameter value, using the source data and the editing data, after receiving a confirmation generation instruction; The image contains one or more primitives, and the drawing parameter values include the attribute values of the primitives in the image; The second drawing parameter value is adapted to the size of the second image so that, during the drawing of the second image, the attribute values of the primitives contained in the second image can be adjusted to adapt to the size of the second image.
13. A computer device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured as follows: In image editing mode, the first image drawn based on the first drawing parameter values and using source data is edited to obtain edit data; the source data is statistical data. Upon receiving the confirmation generation instruction, a second image with a different size from the first image is drawn based on a second drawing parameter value that is different from the drawing parameter value in the first drawing parameters, using the source data and the editing data; The image contains one or more primitives, and the drawing parameter values include the attribute values of the primitives in the image; The second drawing parameter value is adapted to the size of the second image so that, during the drawing of the second image, the attribute values of the primitives contained in the second image can be adjusted to adapt to the size of the second image.
Citation Information
Patent Citations
Dynamic visual statistical data display and navigation system and method for limited display device
US20120303548A1