Method and apparatus of generating a webpage from an original design file comprising layers
First Claim
Patent Images
1. A webpage generating method, comprising:
- obtaining a size of an original design file, wherein the size includes display dimensions of the original design file;
obtaining a level of each layer folder comprised in the original design file, and combining all layers comprised in layer folders levels of which are greater than a preset value into one layer;
obtaining layer information of a layer comprised in the original design file in which all the layers comprised in the layer folders, the levels of which are greater than the preset value, are combined into one layer;
obtaining a material comprised in the layer; and
generating a webpage according to the size of the original design file, the layer information of the layer, and the material comprised in the layer;
wherein obtaining the material comprised in the layer comprises;
determining whether a type of the layer is text layer or image layer, wherein in response to determining that materials comprised in the layer is all text content, determining that the type of the layer is the text layer, and in response to determining that the materials comprised in the layer comprises both image materials and text content or comprises all image materials, determining that the type of the layer is image layer;
obtaining text content comprised in the layer in response to determining the type of the layer is text layer, and determining that the obtained text content is the material comprised in the layer; and
taking a screenshot of a smallest area comprising all materials comprised in the layer in response to determining the type of the layer is image layer, obtaining the screenshot corresponding to the layer, and determining that the screenshot is the material comprised in the layer.
1 Assignment
0 Petitions
Accused Products
Abstract
A webpage generating method includes: obtaining a size of an original design file and layer information of a layer included in the original design file; obtaining a material included in the layer; and generating a webpage according to the size of the original design file, the layer information of the layer, and the material included in the layer.
14 Citations
10 Claims
-
1. A webpage generating method, comprising:
-
obtaining a size of an original design file, wherein the size includes display dimensions of the original design file; obtaining a level of each layer folder comprised in the original design file, and combining all layers comprised in layer folders levels of which are greater than a preset value into one layer; obtaining layer information of a layer comprised in the original design file in which all the layers comprised in the layer folders, the levels of which are greater than the preset value, are combined into one layer; obtaining a material comprised in the layer; and generating a webpage according to the size of the original design file, the layer information of the layer, and the material comprised in the layer; wherein obtaining the material comprised in the layer comprises; determining whether a type of the layer is text layer or image layer, wherein in response to determining that materials comprised in the layer is all text content, determining that the type of the layer is the text layer, and in response to determining that the materials comprised in the layer comprises both image materials and text content or comprises all image materials, determining that the type of the layer is image layer; obtaining text content comprised in the layer in response to determining the type of the layer is text layer, and determining that the obtained text content is the material comprised in the layer; and taking a screenshot of a smallest area comprising all materials comprised in the layer in response to determining the type of the layer is image layer, obtaining the screenshot corresponding to the layer, and determining that the screenshot is the material comprised in the layer. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A webpage generating apparatus, the apparatus comprising:
-
a processor; a memory which stores computer readable instructions that when executed by the processor cause the processor to; obtain a size of an original design file, wherein the size includes display dimensions of the original design file; obtain a level of each layer folder comprised in the original design file, and combine all layers comprised in layer folders levels of which are greater than a preset value into one layer; obtain layer information of a layer comprised in the original design file in which all the layers comprised in the layer folders, the levels of which are greater than the preset value, are combined into one layer; obtain a material comprised in the layer; and generate a webpage according to the size of the original design file, the layer information of the layer, and the material comprised in the layer; wherein obtaining the material comprised in the layer comprises; determining whether a type of the layer is text layer or image layer, wherein in response to determining that materials comprised in the layer is all text content, determining that the type of the layer is the text layer, and in response to determining that the materials comprised in the layer comprises both image materials and text content or comprises all image materials, determining that the type of the layer is image layer; obtaining text content comprised in the layer in response to determining the type of the layer is text layer, and determining that the obtained text content is the material comprised in the layer; and taking a screenshot of a smallest area comprising all materials comprised in the layer in response to determining the type of the layer is image layer, to obtain the screenshot corresponding to the layer, and determining that the screenshot is the material comprised in the layer. - View Dependent Claims (7, 8, 9, 10)
-
Specification