WO2017080158A1 - 图片处理方法、设备及系统 - Google Patents

图片处理方法、设备及系统 Download PDF

Info

Publication number
WO2017080158A1
WO2017080158A1 PCT/CN2016/082625 CN2016082625W WO2017080158A1 WO 2017080158 A1 WO2017080158 A1 WO 2017080158A1 CN 2016082625 W CN2016082625 W CN 2016082625W WO 2017080158 A1 WO2017080158 A1 WO 2017080158A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
image
access request
cropping
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/082625
Other languages
English (en)
French (fr)
Inventor
路飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
LeTV Sports Culture Develop Beijing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeTV Sports Culture Develop Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, LeTV Sports Culture Develop Beijing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Priority to RU2016140215A priority Critical patent/RU2016140215A/ru
Priority to US15/245,209 priority patent/US20170132755A1/en
Publication of WO2017080158A1 publication Critical patent/WO2017080158A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Definitions

  • the embodiments of the present invention relate to the field of information technologies, and in particular, to a picture processing method, device, and system.
  • the terminal device may be a computer, a mobile phone, a tablet computer, or the like.
  • the terminal device may be a computer, a mobile phone, a tablet computer, or the like.
  • different terminal devices have different display requirements for the same picture.
  • it is usually required to process the pictures into pictures of different sizes, and then upload the processed pictures to the domain name acceleration server, so that the terminal device can quickly acquire the pictures.
  • the processing of pictures is mainly performed manually, that is, the picture editing personnel perform image processing according to the size display requirements of the terminal device.
  • the photo editor needs to re-process the image whenever there is a new terminal device size display requirement. If there are a large number of different image size display requirements, it will consume a lot of labor costs, resulting in low efficiency of image processing.
  • the embodiment of the invention provides a method, a device and a system for processing a picture, which are used to solve the defect that the picture processing needs to be performed manually in the prior art, realize automatic processing of the picture, and improve the efficiency of the picture processing.
  • the embodiment of the invention provides a picture processing method, including:
  • the picture access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size;
  • the target cropped picture corresponding to the requested picture and having the same aspect ratio of the picture is obtained, and the target cut picture is cut by the picture cropping server according to the aspect ratio of the picture Cut the captured image;
  • An embodiment of the present invention provides another image processing method, including:
  • the picture cropping instruction includes a picture and a width ratio of the picture
  • the domain name acceleration server sends the clipped picture to the domain name acceleration server, so that when the domain name acceleration server receives the picture access request, the picture aspect ratio is the same as the cropping ratio, but the width and height are different,
  • the cropped picture is scaled to obtain a picture of the picture access request.
  • An embodiment of the present invention provides a domain name acceleration server, including:
  • the receiving unit receives a picture access request sent by the terminal device, where the picture access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size;
  • a detecting unit configured to detect whether the picture access request meets a preset picture access request rule
  • an acquiring unit configured to acquire, according to the preset picture access request rule, a target cropping picture corresponding to the requested picture and having the same aspect ratio of the picture, the target cropping picture is a picture cutting server according to the a picture obtained by cropping the width and height ratio of the picture;
  • a scaling unit configured to scale a width and height of the target cropped image according to the requested picture width and height size
  • a sending unit configured to send the scaled picture to the terminal device.
  • An embodiment of the present invention provides a picture cropping server, including:
  • a receiving unit configured to receive an input picture cropping instruction, where the picture cropping instruction includes a picture and a width ratio of the picture;
  • a cropping unit configured to cut the image according to the cropping ratio
  • a sending unit configured to send the clipped picture to the domain name acceleration server, so that when the domain name acceleration server receives the picture access request, the picture aspect ratio is the same as the cropping ratio, but the width and height are not At the same time, the cropped picture is scaled to obtain a picture of the picture access request.
  • An embodiment of the present invention provides a picture processing system, including:
  • a domain name acceleration server configured to receive a picture access request sent by the terminal device, where the picture access request carries size information of the requested picture, the size information includes a width to height ratio of the picture, and a width and height size; and detecting the picture access Whether the request meets the preset picture access request rule; if yes, the target cropped picture corresponding to the requested picture and having the same aspect ratio of the picture is obtained, and the target cut picture is performed by the picture cropping server according to the picture width ratio And cropping the acquired image; and scaling the width and height of the target cropped image according to the requested image width and height; and transmitting the scaled image to the terminal device;
  • a picture cropping server configured to receive an input picture cropping instruction, where the picture cropping instruction includes a picture and a width and height crop ratio of the picture; and the picture is cropped according to the cropping ratio; and the cropped picture is Send to the domain name acceleration server.
  • the image processing method, device and system provided by the embodiment of the invention cuts the same photo according to different ratios of width and height according to requirements, and obtains multiple cropped pictures; when the terminal device requests the ratio of the aspect ratio of the picture to the ratio of the cropped picture
  • the cropped picture is directly scaled according to the requested picture width and height, which changes the defect that the picture needs to be processed manually by the prior art, realizes automatic processing of the picture, and improves the efficiency of the picture processing.
  • FIG. 1 is a flowchart of a picture processing method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another image processing method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of still another image processing method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of still another image processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a domain name acceleration server according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another domain name acceleration server according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a picture cropping server according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another picture cropping server according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a picture processing system according to an embodiment of the present invention.
  • An embodiment of the present invention provides an image processing method, which can be applied to a domain name acceleration server. As shown in FIG. 1, the method includes:
  • the image access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size.
  • the terminal device may be a mobile phone, or may be a computer, a mobile phone, or a tablet computer, which is not limited in the embodiment of the present invention.
  • the picture has a width to height ratio of 1:1 and a width and height of 300 pixels.
  • the image access request carries a URL corresponding to the requested picture.
  • the preset picture access request rule may be set according to the needs of the user, or may be set according to the system default mode, which is not limited in the embodiment of the present invention.
  • the preset picture access request rule matches the URL corresponding to the picture access request with the preset URL, and the preset URL is generated according to the URL corresponding to the cropped picture.
  • a plurality of preset URLs may be generated according to the URL corresponding to the cropped picture.
  • the URL corresponding to the cropped image is:
  • the generated preset URL may be:
  • the preset URL can be:
  • the preset URL may be generated according to the URL corresponding to the cropped picture, the image format supported by the domain name acceleration server, and the supported image zoom width and height.
  • the image format can be jpg, jpeg, png, gif and other formats.
  • the corresponding URL for cropping the image is:
  • the generated preset URL can be:
  • the step 102 may be specifically: detecting whether the URL corresponding to the picture access request matches the preset URL.
  • the URL corresponding to the image access request is:
  • the target cropping picture is a picture obtained by the picture cropping server according to the aspect ratio of the picture.
  • the requested image is a picture with a width to height ratio of 1:1 and a width and height of 300 pixels.
  • the target cropped image corresponding to the requested image is selected, and the target cropped image is a picture with a width to height ratio of 1:1 and a width and height of 200 pixels.
  • the step 104 may be: sending the scaled picture to the terminal device by using the image filtering image_filter module.
  • the request picture is a smiley picture
  • the requested smile picture corresponds to a width to height ratio of 1:1
  • the width and height are both 300 pixels.
  • the aspect ratio of the target cropped smile image saved in the domain name acceleration server is 1:1.
  • the width and height are both 200 pixels
  • the target cropped smiley picture size is wide and the size is zoomed It is 300 pixels.
  • the image that meets the requirements of the terminal device can be directly obtained, thereby avoiding manually cutting the same image into images of different size information, and realizing different sizes of the same image. Automatic processing to improve the efficiency of image processing.
  • the scaled picture may also be saved, when another terminal device requests a picture of the same size as the scaled picture.
  • the scaled picture can be directly sent to the requested terminal device, thereby saving system resources consumed by reprocessing the picture.
  • An image processing method provided by an embodiment of the present invention performs cropping according to different ratios of width and height according to requirements, and acquires multiple cropped pictures; when the ratio of the width and height of the picture requested by the terminal device is the same as the ratio of the cropped picture
  • the cropping picture is directly scaled according to the requested picture width and height, which changes the defect of the image processing in the prior art, and realizes the automatic processing of the picture and improves the efficiency of the picture processing.
  • An embodiment of the present invention provides another image processing method, which can be applied to a domain name acceleration server. As shown in FIG. 2, the method includes:
  • the image access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size.
  • the method further includes: receiving a plurality of cropped pictures sent by the image cropping server, where the plurality of cropped pictures are tailored to different pictures according to different aspect ratios. a picture; save the plurality of cropped pictures.
  • step 203 Detects whether the picture access request meets a preset picture access request rule. If the picture access request meets the preset picture access request rule, step 203 is performed; if the picture access request does not meet the preset picture access request rule, step 206 is performed.
  • the image access request carries a URL corresponding to the requested image
  • the preset image access request rule matches the URL corresponding to the image access request with a preset URL, where the preset URL is a URL corresponding to the cropped image.
  • a plurality of preset URLs may be generated according to the URL corresponding to the cropped picture.
  • the step 202 may be specifically: detecting whether the URL corresponding to the picture access request matches the preset URL.
  • the target cropping picture is a picture obtained by the picture cropping server according to the aspect ratio of the picture.
  • the step 204 may be: sending the scaled picture to the terminal device by using the image filtering image_filter module.
  • the image that meets the requirements of the terminal device can be directly obtained, thereby avoiding manually cutting the same image into images of different size information, and realizing different sizes of the same image. Automatic processing to improve the efficiency of image processing.
  • the scaled picture may also be saved, when another terminal device requests a picture of the same size as the scaled picture.
  • the scaled picture can be directly sent to the requested terminal device, thereby saving system resources consumed by reprocessing the picture.
  • the method further includes: synchronizing the scaled picture to each node of the domain name server.
  • the prompt information is used to prompt that the requested image does not conform to the specification.
  • the prompt information may be a text prompt information, an audio prompt information, or a picture prompt information, which is not limited in the embodiment of the present invention.
  • the prompt information may be a text prompt information that prompts that the requested picture does not conform to the specification, an audio prompt information that prompts that the requested picture does not conform to the specification, or a picture prompt information that prompts that the requested picture does not conform to the specification.
  • Another image processing method provided by the embodiment of the present invention according to the same photo, according to the demand
  • the cropping is performed according to the different ratios of the width and the height, and when the ratio of the width and height of the image requested by the terminal device is the same as the ratio of the cropped image, the cropped image is directly scaled according to the requested image width and height, and the existing image is changed.
  • it is necessary to manually process the defects of the picture, realize automatic processing of the picture, and improve the efficiency of the picture processing.
  • the embodiment of the present invention provides another image processing method, which can be applied to a picture cropping server. As shown in FIG. 3, the method includes:
  • the picture cropping instruction includes a picture and a width and height crop ratio of the picture.
  • step 301 may specifically be: when the user selects a certain image on the operation interface of the image processing software installed on the image cropping server and sets a cropping frame on the image, the image cropping server Received a picture cropping command. By selecting the size and scale of the crop frame, the user can set the width and height crop ratio corresponding to the image.
  • the aspect ratio of the picture may be a width and a height of the cropping ratio, and may be a different ratio of the width and height, which is not limited in the embodiment of the present invention.
  • the width and height of the picture can be 1:1, or 1:2, 1:3, and so on.
  • the step 302 may specifically be: the image processing software installed on the image cropping server, after receiving the cropping ratio, cropping the image.
  • the image processing software may crop the image by calling an image processing tool interface.
  • the picture selected by the user is a smiley picture
  • the width and height of the smiley picture is 1:1
  • the width and height are respectively 212 pixels.
  • the smile image is cut by the image processing software, and the size information of the cropped smile picture is wide and high.
  • the ratio is 1:1
  • the width and height are 212 pixels * 212 pixels.
  • the cropped picture is scaled to obtain the picture. Access the requested image.
  • the zoomed image can be directly obtained to meet the requirements of the terminal device.
  • the image can be used to manually cut the same image into images of different size information, and realize automatic processing of different sizes of the same image. Improve the efficiency of image processing.
  • the domain name acceleration server receives the same request picture width and height ratio as the cropping ratio, but the width and height are the same, the cropped picture may be directly sent to the terminal device.
  • the step 303 may be: pre-storing the cropped image in a storage device, and sending the cropped image to the domain name acceleration server when receiving the notification information sent by the user. Or send the cropped image directly to the domain name acceleration server. By sending the clipped picture to the domain name acceleration server, the speed at which the user can obtain the picture can be guaranteed.
  • the domain name acceleration server pair The cropping server sends a cropped smiley image with a width and height of 212 pixels and scales it to a smiley image with a width and height of 200 pixels.
  • the domain name acceleration server cuts the picture.
  • the server sends a clipping smile image with a width and height of 212 pixels to zoom, and zooms into a smiley image with a width and height of 500 pixels.
  • a clipping smile image with a width and height of 212 pixels to zoom, and zooms into a smiley image with a width and height of 500 pixels.
  • the cost and time for manually processing the smiley face image can be saved, thereby improving the processing efficiency of the smiley face image.
  • Another image processing method provided by the embodiment of the present invention performs cropping according to different ratios of width and height according to requirements, and obtains multiple cropped images; when the ratio of the width and height of the image requested by the terminal device is proportional to the cropped image At the same time, the cropped picture is directly scaled according to the requested picture width and height, which changes the defect that the picture needs to be processed manually by the prior art, realizes automatic processing of the picture, and improves the efficiency of the picture processing.
  • the embodiment of the present invention provides another image processing method, which can be applied to a picture cropping server. As shown in FIG. 4, the method includes:
  • the picture cropping instruction includes a picture and a width and height crop ratio of the picture.
  • the image processing component may be a component in the image processing software installed on the image cropping server. Specifically, it can be a GraphicsMagick image processing tool.
  • the cropped picture is scaled to obtain a picture of the picture access request.
  • the domain name acceleration server receives the same request image aspect ratio as the cropping ratio, but the width and height are different, the zoomed image can be directly obtained to meet the requirements of the terminal device.
  • the picture can avoid artificially cutting the same picture into pictures of different size information, realizing automatic processing of different sizes of the same picture, and improving the efficiency of picture processing.
  • the domain name acceleration server receives the same request picture width and height ratio as the cropping ratio, but the width and height are the same, the cropped picture may be directly sent to the terminal device.
  • Another image processing method provided by the embodiment of the present invention performs cropping according to different ratios of width and height according to requirements, and obtains multiple cropped pictures; when the ratio of the width and height of the picture requested by the terminal device is proportional to the cropped picture At the same time, the cropped picture is directly scaled according to the requested picture width and height, which changes the defect that the picture needs to be processed manually by the prior art, realizes automatic processing of the picture, and improves the efficiency of the picture processing.
  • the embodiment of the present invention provides a domain name acceleration server.
  • the domain name acceleration server includes: a receiving unit 51, a detecting unit 52, an obtaining unit 53, The scaling unit 54 and the transmitting unit 55.
  • the receiving unit 51 receives a picture access request sent by the terminal device, where the picture access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size.
  • the terminal device may be a mobile phone, or may be a computer, a mobile phone, or a tablet computer, which is not limited in the embodiment of the present invention.
  • the detecting unit 52 is configured to detect whether the picture access request meets a preset picture access request rule.
  • the image access request carries a URL corresponding to the requested picture.
  • the preset picture access request rule may be set according to the needs of the user, or may be set according to the system default mode, which is not limited in the embodiment of the present invention.
  • the obtaining unit 53 is configured to: if the picture access request meets the preset picture access request rule, acquire a target cropping picture corresponding to the requested picture and having the same aspect ratio of the picture, the target cropping picture is a picture cutting server according to The picture is obtained by cropping the picture in a wide aspect ratio.
  • the scaling unit 54 is configured to scale the width and height of the target cropped picture according to the requested picture width and height.
  • the sending unit 55 is configured to send the scaled picture to the terminal device.
  • the domain name acceleration server provided by the embodiment of the present invention cuts the same photo according to different ratios of width and height according to requirements, and obtains multiple cropped pictures; when the ratio of the width and height of the picture requested by the terminal device is the same as the ratio of the cropped picture
  • the cropping picture is directly scaled according to the requested picture width and height, which changes the defect of the image processing in the prior art, and realizes the automatic processing of the picture and improves the efficiency of the picture processing.
  • the embodiment of the present invention provides another domain name acceleration server.
  • the domain name acceleration server includes: a receiving unit 61, a detecting unit 62, and an obtaining unit 63.
  • the receiving unit 61 receives a picture access request sent by the terminal device, where the picture access request carries size information of the requested picture, where the size information includes a width to height ratio of the picture, and a width and height size.
  • the detecting unit 62 is configured to detect whether the picture access request meets a preset picture access request rule.
  • the obtaining unit 63 is configured to: if the picture access request meets the preset picture access request rule, acquire a target cropping picture corresponding to the requested picture and having the same aspect ratio of the picture, the target cropping picture is a picture cutting server according to The picture is obtained by cropping the picture in a wide aspect ratio.
  • the scaling unit 64 is configured to scale the width and height of the target cropped picture according to the requested picture width and height.
  • the sending unit 65 is configured to send the scaled picture to the terminal device.
  • the apparatus also includes a storage unit 66.
  • the receiving unit 61 is further configured to receive a plurality of cropped pictures sent by the picture cropping server, where the plurality of cropped pictures are pictures obtained by cropping the different photos according to different aspect ratios by the picture cropping server.
  • the saving unit 66 is configured to save the plurality of cropped pictures.
  • the image access request carries a URL corresponding to the requested image, and the preset image
  • the access request rule matches the URL corresponding to the picture access request with the preset URL, and the preset URL is generated according to the URL corresponding to the cropped picture.
  • the detecting unit 62 is specifically configured to detect whether a URL corresponding to the picture access request matches the preset URL.
  • the apparatus also includes an output unit 67.
  • the output unit 67 is configured to: if the picture access request does not meet the preset picture access request rule, if not, output the prompt information, where the prompt information is used to prompt the request picture to not conform to the specification.
  • the apparatus also includes a synchronization unit 68.
  • the synchronization unit 68 is configured to synchronize the scaled picture to each node of the domain name server.
  • the domain name acceleration server provided by the embodiment of the present invention cuts the same photo according to different ratios of width and height according to requirements, and obtains multiple cropped pictures; when the ratio of the width and height of the picture requested by the terminal device is the same as the ratio of the cropped picture
  • the cropping picture is directly scaled according to the requested picture width and height, which changes the defect of the image processing in the prior art, and realizes the automatic processing of the picture and improves the efficiency of the picture processing.
  • an embodiment of the present invention provides a picture cropping server.
  • the picture cropping server includes: a receiving unit 71, a cropping unit 72, and a sending unit 73.
  • the receiving unit 71 is configured to receive an input picture cropping instruction, where the picture cropping instruction includes a picture and a width and height crop ratio of the picture.
  • the cropping unit 72 is configured to crop the image according to the cropping ratio.
  • the sending unit 73 is configured to send the clipped picture to the domain name acceleration server.
  • the cropped picture is scaled to obtain the picture. Access the requested image.
  • a picture cropping server provided by an embodiment of the present invention according to the same photo, according to requirements
  • the cropping is performed according to the different ratios of the width and the height, and when the ratio of the width and height of the image requested by the terminal device is the same as the ratio of the cropped image, the cropped image is directly scaled according to the requested image width and height, and the existing image is changed.
  • it is necessary to manually process the defects of the picture, realize automatic processing of the picture, and improve the efficiency of the picture processing.
  • the embodiment of the present invention provides another image cropping server.
  • the image cropping server includes: a receiving unit 81, a cropping unit 82, and a sending unit 83. .
  • the receiving unit 81 is configured to receive an input picture cropping instruction, where the picture cropping instruction includes a picture and a width and height crop ratio of the picture.
  • the cropping unit 82 is configured to crop the image according to the cropping ratio.
  • the sending unit 83 is configured to send the clipped picture to the domain name acceleration server.
  • the cropped picture is scaled to obtain the picture. Access the requested image.
  • Another image cropping server provided by the embodiment of the present invention cuts the same photo according to different ratios of width and height according to requirements, and obtains multiple cropped images; when the ratio of the width and height of the image requested by the terminal device is proportional to the cropped image At the same time, the cropped picture is directly scaled according to the requested picture width and height, which changes the defect that the picture needs to be processed manually by the prior art, realizes automatic processing of the picture, and improves the efficiency of the picture processing.
  • the embodiment of the present invention provides a picture processing system, as shown in FIG. 9, including: a domain name acceleration server 91 and a picture cropping server 92.
  • the domain name acceleration server 91 is configured to receive a picture access request sent by the terminal device, where the picture access request carries size information of the requested picture, the size information includes a width to height ratio of the picture, and a width and height size; and the picture is detected. Whether the access request meets the preset picture access request rule; if yes, the target cropped picture corresponding to the requested picture and having the same aspect ratio of the picture is obtained, and the target cut picture is the picture cropping server 92 according to the picture width and height And scaling the acquired image; and scaling the width and height of the target cropped image according to the requested image width and height; and transmitting the scaled image to the terminal device.
  • a picture cropping server 92 configured to receive an input picture cropping instruction, where the picture cropping instruction includes a picture and a width and height crop ratio of the picture; and the picture is cropped according to the cropping ratio; and the cropped The picture is sent to the domain name acceleration server 91.
  • the image processing system provided by the embodiment of the present invention performs cropping according to different ratios of width and height according to requirements, and obtains multiple cropped images; when the ratio of the width and height of the image requested by the terminal device is the same as the ratio of the cropped image
  • the cropping picture is directly scaled according to the requested picture width and height, which changes the defect of the image processing in the prior art, and realizes the automatic processing of the picture and improves the efficiency of the picture processing.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Processing Or Creating Images (AREA)
  • Facsimiles In General (AREA)
  • Image Processing (AREA)

Abstract

一种图片处理方法、设备及系统,涉及信息技术领域,适用于图片的处理,能够提高图片处理的效率。所述方法包括:接收终端设备发送的图片访问请求(101),所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;检测所述图片访问请求是否符合预置图片访问请求规则(102);若符合,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片(103),所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片;根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放(104);将缩放后的图片发送给所述终端设备(105)。

Description

图片处理方法、设备及系统 技术领域
本发明实施例涉及信息技术领域,尤其涉及一种图片处理方法、设备及系统。
背景技术
随着互联网技术的不断发展,图片的在互联网领域的使用越来越广泛。尤其是在终端设备上安装的应用程序中,图片已成为不可或缺的组成部分。其中,终端设备可以为电脑、手机、平板电脑等。通常不同的终端设备对同一张图片的展示需求不同。为了满足不同终端设备的不同需求,通常需要将图片处理成不同尺寸的图片,然后将处理后的图片上传至域名加速服务器,从而终端设备能够快速地获取图片。
目前,主要通过人工的方式进行图片的处理,即图片编辑人员根据终端设备的尺寸展示需求进行图片的处理。然而,通过人工的方式进行图片的处理时,每当有新的终端设备尺寸展示需求时,图片编辑人员都需要重新进行图片的处理。若存在大量不同的图片尺寸展示需求时,会消耗大量的人工成本,导致图片处理的效率较低。
发明内容
本发明实施例提供一种图片处理方法、设备及系统,用以解决现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
本发明实施例提供一种图片处理方法,包括:
接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;
检测所述图片访问请求是否符合预置图片访问请求规则;
若符合,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁 剪获取的图片;
根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;
将缩放后的图片发送给所述终端设备。
本发明实施例提供另一种图片处理方法,包括:
接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;
根据所述裁剪比例,对所述图片进行裁剪;
将所述裁剪后的图片发送给域名加速服务器,以便于当所述域名加速服务器在接收到图片访问请求中的图片宽高比例与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
本发明实施例提供一种域名加速服务器,包括:
接收单元,接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;
检测单元,用于检测所述图片访问请求是否符合预置图片访问请求规则;
获取单元,用于若所述图片访问请求符合预置图片访问请求规则,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片;
缩放单元,用于根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;
发送单元,用于将缩放后的图片发送给所述终端设备。
本发明实施例提供一种图片裁剪服务器,包括:
接收单元,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;
裁剪单元,用于根据所述裁剪比例,对所述图片进行裁剪;
发送单元,用于将所述裁剪后的图片发送给域名加速服务器,以便于当所述域名加速服务器在接收到图片访问请求中的图片宽高比例与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
本发明实施例提供一种图片处理系统,包括:
域名加速服务器,用于接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;检测所述图片访问请求是否符合预置图片访问请求规则;若符合,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片;根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;将缩放后的图片发送给所述终端设备;
图片裁剪服务器,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;根据所述裁剪比例,对所述图片进行裁剪;将所述裁剪后的图片发送给域名加速服务器。
本发明实施例提供的图片处理方法、设备及系统,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种图片处理方法的流程图;
图2为本发明实施例提供的另一种图片处理方法的流程图;
图3为本发明实施例提供的又一种图片处理方法的流程图;
图4为本发明实施例提供的再一种图片处理方法的流程图;
图5为本发明实施例提供的一种域名加速服务器的结构示意图;
图6为本发明实施例提供的另一种域名加速服务器的结构示意图;
图7为本发明实施例提供的一种图片裁剪服务器的结构示意图;
图8为本发明实施例提供的另一种图片裁剪服务器的结构示意图;
图9为本发明实施例提供的一种图片处理系统的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供了一种图片处理方法,可以应用于域名加速服务器,如图1所示,所述方法包括:
101、接收终端设备发送的图片访问请求。
其中,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小。所述终端设备可以为手机、也可以为电脑、手机、平板电脑,本发明实施例不做限定。例如,图片的宽高比例为1:1,宽高大小均为300像素。
102、检测所述图片访问请求是否符合预置图片访问请求规则。
其中,所述图片访问请求中携带有请求图片对应的URL。预置图片访问请求规则可以根据用户的需要进行设置,也可以根据系统默认模式设置,本发明实施例不做限定。例如,所述预置图片访问请求规则为图片访问请求对应的URL与预置URL相匹配,所述预置URL为根据裁剪图片对应的URL生成的。根据裁剪图片对应的URL可以生成多个预置URL。
例如,裁剪图片对应的URL为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11.jpg。其中,URL中携带有裁剪图片的宽高比例为1:1,裁剪图片的格式等。根据所述裁剪图片对应的URL,生成的预置URL可以为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_w_h.jpg,其中w代表图片宽大小,h代表图片高大小。具体地,预置URL可以为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_200_200.jpg、http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_300_300.jpg等。
此外,还可以根据裁剪图片对应的URL,域名加速服务器支持的图片格式、支持的图片缩放宽高大小等,生成预置URL。其中,图片格式可以为jpg、jpeg、png、gif等格式。
例如,裁剪图片的对应的URL为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11.jpg,
生成的预置URL可以为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_500_500.jpeg;
也可以为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_500_500.gif等。
对于本发明实施例,步骤102具体可以为:检测所述图片访问请求对应的URL是否与所述预置URL相匹配。
例如,所述图片访问请求对应的URL为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_200_200.jpg,域名加速服务器上保存有根据裁剪图片生成的URL为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_200_200.jpg,则确认所述图片访问请求对应的URL与预置URL相匹配。
103、若所述图片访问请求符合预置图片访问请求规则,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片。
其中,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片。
例如,若图片访问请求对应的URL为:
http://i1.letvimg.com/yunzhuanma/sms/201408/19/tl130_1/11_300_300.jpg,请求的图片为宽高比例为1:1、宽高大小均为300像素的图片,则获取与所述请求图片相对应的目标裁剪图片,目标裁剪图片为宽高比例为1:1、宽高大小均为200像素的图片。
104、根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放。
对于本发明实施例,步骤104具体可以为:通过调用图片过滤image_filter模块,将缩放后的图片发送给所述终端设备。
例如,所述请求图片为笑脸图片,请求的笑脸图片对应的宽高比例为1:1,宽高大小均为300像素,域名加速服务器中保存的目标裁剪笑脸图片的宽高比例为1:1,宽高大小均为200像素,则将目标裁剪笑脸图片宽高大小均缩放 为300像素。
105、将缩放后的图片发送给所述终端设备。
对于本发明实施例,通过对裁剪图片进行缩放,能够直接获取到满足终端设备需求的图片,从而能够避免通过人工的方式将同一图片裁剪为不同的尺寸信息的图片,实现同一图片的不同尺寸的自动处理,提高图片处理的效率。
对于本发明实施例,在将缩放后的图片发送给所述终端设备之后,还可以将所述缩放后的图片进行保存,当有其他的终端设备请求与所述缩放后的图片相同尺寸的图片时,可以直接将该缩放后的图片发送给请求的终端设备,从而能够节省重新处理图片所消耗的系统资源。
本发明实施例提供的一种图片处理方法,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
本发明实施例提供了另一种图片处理方法,可以应用于域名加速服务器,如图2所示,所述方法包括:
201、接收终端设备发送的图片访问请求。
其中,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小。
对于本发明实施例,在步骤201之前,具体还可以包括:接收图片裁剪服务器发送的多个裁剪图片,所述多个裁剪图片为所述图片裁剪服务器按照不同宽高比例对不同照片进行裁剪获取的图片;将所述多个裁剪图片保存。
202、检测所述图片访问请求是否符合预置图片访问请求规则。若所述图片访问请求符合预置图片访问请求规则,则执行步骤203;若所述图片访问请求不符合预置图片访问请求规则,则执行步骤206。
其中,所述图片访问请求中携带有请求图片对应的URL,所述预置图片访问请求规则为图片访问请求对应的URL与预置URL相匹配,所述预置URL为根据裁剪图片对应的URL生成的。根据裁剪图片对应的URL可以生成多个预置URL。此外,还可以根据裁剪图片对应的URL,域名加速服务器支持 的图片格式、支持的图片缩放宽高大小等,生成预置URL。
对于本发明实施例,步骤202具体可以为:检测所述图片访问请求对应的URL是否与所述预置URL相匹配。
203、获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片。
其中,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片。
204、根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放。
对于本发明实施例,步骤204具体可以为:通过调用图片过滤image_filter模块,将缩放后的图片发送给所述终端设备。
205、将缩放后的图片发送给所述终端设备。
对于本发明实施例,通过对裁剪图片进行缩放,能够直接获取到满足终端设备需求的图片,从而能够避免通过人工的方式将同一图片裁剪为不同的尺寸信息的图片,实现同一图片的不同尺寸的自动处理,提高图片处理的效率。
对于本发明实施例,在将缩放后的图片发送给所述终端设备之后,还可以将所述缩放后的图片进行保存,当有其他的终端设备请求与所述缩放后的图片相同尺寸的图片时,可以直接将该缩放后的图片发送给请求的终端设备,从而能够节省重新处理图片所消耗的系统资源。
对于本发明实施例,在步骤205之后具体还可以包括:将所述缩放后的图片同步到域名服务器的各个节点。
206、输出提示信息。
其中,所述提示信息用于提示请求图片不符合规范。所述提示信息可以为文字提示信息、音频提示信息,也可以为图片提示信息,本发明实施例不做限定。具体地,所述提示信息可以为提示请求图片不符合规范的文字提示信息、提示请求图片不符合规范的音频提示信息或者提示请求图片不符合规范的图片提示信息等。通过输出提示信息,可以使终端设备对应的用户及时获知图片访问情况,从而可以提升用户的体验。
本发明实施例提供的另一种图片处理方法,对同一张照片,按照需求按 照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
本发明实施例提供了又一种图片处理方法,可以应用于图片裁剪服务器,如图3所示,所述方法包括:
301、接收输入的图片裁剪指令。
其中,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例。
对于本发明实例,步骤301具体可以为:当用户在安装在图片裁剪服务器上的图片处理软件的操作界面上选择某一图片并设定在该图片上选定裁剪框时,所述图片裁剪服务器接收到图片裁剪指令。用户通过选定裁剪框的大小和比例,就可以设定该图片对应的宽高裁剪比例。
需要说明的是,所述图片的宽高裁剪比例可以为一个宽高裁剪比例,也可以为不同宽高裁剪比例,本发明实施例不做限定。例如,图片的宽高裁剪比例可以为1:1,也可以为1:2、1:3等。
302、根据所述裁剪比例,对所述图片进行裁剪。
对于本发明实施例,步骤302具体可以为:安装在图片裁剪服务器上的图片处理软件在接收到所述裁剪比例后,对所述图片进行裁剪。具体地,图像处理软件可以通过调用图片处理工具接口,对所述图片进行裁剪。
例如,用户选定的图片为笑脸图片,笑脸图片的宽高裁剪比例为1:1,宽高大小分别为212像素,通过图片处理软件裁剪笑脸图像,裁剪后的笑脸图片的尺寸信息为宽高比例为1:1,宽高大小为212像素*212像素。
303、将所述裁剪后的图片发送给域名加速服务器。
进一步地,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
对于本发明实施例,当所述域名加速服务器接收到与所述裁剪比例相同的请求图片宽高比例,但宽高大小不同时,通过对裁剪图片进行缩放,能够直接获取到满足终端设备需求的图片,从而能够避免通过人工的方式将同一图片裁剪为不同的尺寸信息的图片,实现同一图片的不同尺寸的自动处理, 提高图片处理的效率。当所述域名加速服务器接收到与所述裁剪比例相同的请求图片宽高比例,但宽高大小相同时,可以直接将所述裁剪图片发送给终端设备。
对于本发明实施例,步骤303具体可以为:将所述裁剪后的图片预先保存在存储设备中,当接收到用户发送的通知信息时,再将所述裁剪后的图片发送给域名加速服务器。或者将所述裁剪后的图片直接发送给域名加速服务器。通过将所述裁剪后的图片发送给域名加速服务器,可以保证用户获取图片的速度。
例如,当所述域名加速服务器接收的图片访问请求中的请求图片为笑脸图片,且请求的笑脸图片的宽高比例为1:1,宽高大小均为200像素时,所述域名加速服务器对图片裁剪服务器发送的宽高大小均为212像素的裁剪笑脸图片进行缩放,缩放为宽高大小均为200像素的笑脸图像。当所述域名加速服务器接收的图片访问请求中的请求图片为笑脸图片,且请求的笑脸图片的宽高比例为1:1,宽高大小均为500像素时,所述域名加速服务器对图片裁剪服务器发送的宽高大小均为212像素的裁剪笑脸图片进行缩放,缩放为宽高大小均为500像素的笑脸图像。对于本发明实施例,通过自动将笑脸图片处理为宽高大小均为200像素或者500像素的笑脸图像,能够节省人工对笑脸图片进行处理所消耗的成本和时间,从而能够提高笑脸图片的处理效率。
本发明实施例提供的又一种图片处理方法,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
本发明实施例提供了再一种图片处理方法,可以应用于图片裁剪服务器,如图4所示,所述方法包括:
401、接收输入的图片裁剪指令。
其中,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例。
402、调用图片处理组件,按照根据所述裁剪比例,对所述图片进行裁剪。
其中,图片处理组件可以为安装在图片裁剪服务器上的图片处理软件中的组件。具体地,可以为GraphicsMagick图片处理工具。
403、将所述裁剪后的图片发送给域名加速服务器。
进一步地,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。对于本发明实施例,当所述域名加速服务器接收到与所述裁剪比例相同的请求图片宽高比例,但宽高大小不同时,通过对裁剪图片进行缩放,能够直接获取到满足终端设备需求的图片,从而能够避免通过人工的方式将同一图片裁剪为不同的尺寸信息的图片,实现同一图片的不同尺寸的自动处理,提高图片处理的效率。当所述域名加速服务器接收到与所述裁剪比例相同的请求图片宽高比例,但宽高大小相同时,可以直接将所述裁剪图片发送给终端设备。
本发明实施例提供的再一种图片处理方法,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
进一步地,作为图1所述方法的具体实现,本发明实施例提供了一种域名加速服务器,如图5所示,所述域名加速服务器包括:接收单元51、检测单元52、获取单元53、缩放单元54、发送单元55。
接收单元51,接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小。其中,所述终端设备可以为手机、也可以为电脑、手机、平板电脑,本发明实施例不做限定。
检测单元52,用于检测所述图片访问请求是否符合预置图片访问请求规则。
其中,所述图片访问请求中携带有请求图片对应的URL。预置图片访问请求规则可以根据用户的需要进行设置,也可以根据系统默认模式设置,本发明实施例不做限定。
获取单元53,用于若所述图片访问请求符合预置图片访问请求规则,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片。
缩放单元54,用于根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放。
发送单元55,用于将缩放后的图片发送给所述终端设备。
需要说明的是,本发明实施例提供的一种域名加速服务器所涉及各功能单元的其他相应描述,可以参考图1所示方法的对应描述,在此不再赘述。
本发明实施例提供的一种域名加速服务器,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
进一步地,作为图2所述方法的具体实现,本发明实施例提供了另一种域名加速服务器,如图6所示,所述域名加速服务器包括:接收单元61、检测单元62、获取单元63、缩放单元64、发送单元65。
接收单元61,接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小。
检测单元62,用于检测所述图片访问请求是否符合预置图片访问请求规则。
获取单元63,用于若所述图片访问请求符合预置图片访问请求规则,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片。
缩放单元64,用于根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放。
发送单元65,用于将缩放后的图片发送给所述终端设备。
所述装置还包括:保存单元66。
接收单元61,还用于接收图片裁剪服务器发送的多个裁剪图片,所述多个裁剪图片为所述图片裁剪服务器按照不同宽高比例对不同照片进行裁剪获取的图片。
保存单元66,用于将所述多个裁剪图片保存。
其中,所述图片访问请求中携带有请求图片对应的URL,所述预置图片 访问请求规则为图片访问请求对应的URL与预置URL相匹配,所述预置URL为根据裁剪图片对应的URL生成的。
所述检测单元62,具体用于检测所述图片访问请求对应的URL是否与所述预置URL相匹配。
所述装置还包括:输出单元67。
输出单元67,用于若所述图片访问请求不符合预置图片访问请求规则,则若不符合,则输出提示信息,其中,所述提示信息用于提示请求图片不符合规范。
所述装置还包括:同步单元68。
同步单元68,用于将所述缩放后的图片同步到域名服务器的各个节点。
需要说明的是,本发明实施例提供的另一种域名加速服务器所涉及各功能单元的其他相应描述,可以参考图2所示方法的对应描述,在此不再赘述。
本发明实施例提供的一种域名加速服务器,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
进一步地,作为图3所述方法的具体实现,本发明实施例提供了一种图片裁剪服务器,如图7所示,所述图片裁剪服务器包括:接收单元71、裁剪单元72、发送单元73。
接收单元71,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例。
裁剪单元72,用于根据所述裁剪比例,对所述图片进行裁剪。
发送单元73,用于将所述裁剪后的图片发送给域名加速服务器。
进一步地,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
需要说明的是,本发明实施例提供的一种图片裁剪服务器所涉及各功能单元的其他相应描述,可以参考图3所示方法的对应描述,在此不再赘述。
本发明实施例提供的一种图片裁剪服务器,对同一张照片,按照需求按 照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
进一步地,作为图4所述方法的具体实现,本发明实施例提供了另一种图片裁剪服务器,如图8所示,所述图片裁剪服务器包括:接收单元81、裁剪单元82、发送单元83。
接收单元81,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例。
裁剪单元82,用于根据所述裁剪比例,对所述图片进行裁剪。
发送单元83,用于将所述裁剪后的图片发送给域名加速服务器。
进一步地,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
需要说明的是,本发明实施例提供的另一种图片裁剪服务器所涉及各功能单元的其他相应描述,可以参考图4所示方法的对应描述,在此不再赘述。
本发明实施例提供的另一种图片裁剪服务器,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
进一步地,本发明实施例提供一种图片处理系统,如图9所示,包括:域名加速服务器91和图片裁剪服务器92。
域名加速服务器91,用于接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;检测所述图片访问请求是否符合预置图片访问请求规则;若符合,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器92按照所述图片宽高比例进行裁剪获取的图片;根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;将缩放后的图片发送给所述终端设备。
图片裁剪服务器92,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;根据所述裁剪比例,对所述图片进行裁剪;将所述裁剪后的图片发送给域名加速服务器91。
本发明实施例提供的一种图片处理系统,对同一张照片,按照需求按照宽高的不同比例进行裁剪,获取多张裁剪的图片;当终端设备请求的图片宽高比例与裁剪图片比例相同时,直接根据请求的图片宽高大小对裁剪图片进行缩放,改变了现有技术中需要通过人工的方式进行图片的处理的缺陷,实现图片的自动处理,提高图片处理的效率。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (17)

  1. 一种图片处理方法,其特征在于,包括:
    接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;
    检测所述图片访问请求是否符合预置图片访问请求规则;
    若符合,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片;
    根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;
    将缩放后的图片发送给所述终端设备。
  2. 根据权利要求1所述的图片处理方法,其特征在于,在接收终端设备发送的图片访问请求之前,还包括:
    接收图片裁剪服务器发送的多个裁剪图片,所述多个裁剪图片为所述图片裁剪服务器按照不同宽高比例对不同照片进行裁剪获取的图片;
    将所述多个裁剪图片保存。
  3. 根据权利要求1所述的图片处理方法,其特征在于,所述图片访问请求中携带有请求图片对应的URL,所述预置图片访问请求规则为图片访问请求对应的URL与预置URL相匹配,所述预置URL为根据裁剪图片对应的URL生成的。
  4. 根据权利要求3所述的图片处理方法,其特征在于,检测所述图片访问请求是否符合预置图片访问请求规则包括:
    检测所述图片访问请求对应的URL是否与所述预置URL相匹配。
  5. 根据权利要求1-4中任一项所述的图片处理方法,其特征在于,在检测所述图片访问请求是否符合预置图片访问请求规则之后,所述方法还包括:
    若不符合,则输出提示信息,其中,所述提示信息用于提示请求图片不符合规范。
  6. 根据权利要求1-4中任一项所述的图片处理方法,其特征在于,将缩放后的图片发送给所述终端设备之后,所述方法还包括:
    将所述缩放后的图片同步到域名服务器的各个节点。
  7. 一种图片处理方法,其特征在于,包括:
    接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;
    根据所述裁剪比例,对所述图片进行裁剪;
    将所述裁剪后的图片发送给域名加速服务器,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
  8. 根据权利要求7所述的图片处理方法,特征在于,所述根据所述裁剪比例,对所述图片进行裁剪包括:
    调用图片处理组件,按照根据所述裁剪比例,对所述图片进行裁剪。
  9. 一种域名加速服务器,其特征在于,包括:
    接收单元,接收终端设备发送的图片访问请求,所述图片访问请求中携带有请求图片的尺寸信息,所述尺寸信息包括图片的宽高比例,以及宽高大小;
    检测单元,用于检测所述图片访问请求是否符合预置图片访问请求规则;
    获取单元,用于若所述图片访问请求符合预置图片访问请求规则,则获取与所述请求图片相对应并且图片宽高比例相同的目标裁剪图片,所述目标裁剪图片为图片裁剪服务器按照所述图片宽高比例进行裁剪获取的图片;
    缩放单元,用于根据所述请求图片宽高大小对所述目标裁剪图片的宽高大小进行缩放;
    发送单元,用于将缩放后的图片发送给所述终端设备。
  10. 根据权利要求9所述的域名加速服务器,其特征在于,所述装置还包括:保存单元,
    所述接收单元,还用于接收图片裁剪服务器发送的多个裁剪图片,所述多个裁剪图片为所述图片裁剪服务器按照不同宽高比例对不同照片进行裁剪获取的图片;
    所述保存单元,用于将所述多个裁剪图片保存。
  11. 根据权利要求9所述的域名加速服务器,其特征在于,所述图片访问请求中携带有请求图片对应的URL,所述预置图片访问请求规则为图片访问请求对应的URL与预置URL相匹配,所述预置URL为根据裁剪图片对应的URL生成的。
  12. 根据权利要求11所述的域名加速服务器,其特征在于,
    所述检测单元,具体用于检测所述图片访问请求对应的URL是否与所述预置URL相匹配。
  13. 根据权利要求9-12中任一项所述的域名加速服务器,其特征在于,所述装置还包括:
    输出单元,用于若所述图片访问请求不符合预置图片访问请求规则,则输出提示信息,其中,所述提示信息用于提示请求图片不符合规范。
  14. 根据权利要求9-12中任一项所述的域名加速服务器,其特征在于,所述装置还包括:
    同步单元,用于将所述缩放后的图片同步到域名服务器的各个节点。
  15. 一种图片裁剪服务器,其特征在于,包括:
    接收单元,用于接收输入的图片裁剪指令,所述图片裁剪指令包括图片和所述图片的宽高裁剪比例;
    裁剪单元,用于根据所述裁剪比例,对所述图片进行裁剪;
    发送单元,用于将所述裁剪后的图片发送给域名加速服务器,以便于当所述域名加速服务器接收的图片访问请求中的图片宽高比例,与所述裁剪比例相同,但宽高大小不同时,对所述裁剪后的图片进行缩放得到所述图片访问请求的图片。
  16. 根据权利要求15所述的图片裁剪服务器,其特征在于,包括:
    所述裁剪单元,具体用于调用图片处理组件,按照根据所述裁剪比例,对所述图片进行裁剪。
  17. 一种图片处理系统,其特征在于,包括权利要求9-14中任一项所述的域名加速服务器和权利要求15-16任一项所述的图片裁剪服务器。
PCT/CN2016/082625 2015-11-11 2016-05-19 图片处理方法、设备及系统 Ceased WO2017080158A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
RU2016140215A RU2016140215A (ru) 2015-11-11 2016-05-19 Способ, устройство и система для обработки изображений
US15/245,209 US20170132755A1 (en) 2015-11-11 2016-08-24 Method, device and system for processing image

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510767668.3 2015-11-11
CN201510767668.3A CN105868224A (zh) 2015-11-11 2015-11-11 图片处理方法、设备及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/245,209 Continuation US20170132755A1 (en) 2015-11-11 2016-08-24 Method, device and system for processing image

Publications (1)

Publication Number Publication Date
WO2017080158A1 true WO2017080158A1 (zh) 2017-05-18

Family

ID=56624376

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/082625 Ceased WO2017080158A1 (zh) 2015-11-11 2016-05-19 图片处理方法、设备及系统

Country Status (3)

Country Link
CN (1) CN105868224A (zh)
RU (1) RU2016140215A (zh)
WO (1) WO2017080158A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647590A (zh) * 2018-04-25 2018-10-12 董志忠 一种智能头像处理算法
CN114463169A (zh) * 2021-12-24 2022-05-10 深圳万兴软件有限公司 图像数据增强方法、装置、设备及存储介质
CN115567737A (zh) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 一种裁取后图片替换方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354491B (zh) * 2016-08-22 2019-12-31 天脉聚源(北京)教育科技有限公司 一种图片处理方法及装置
CN109710337A (zh) * 2018-12-17 2019-05-03 深圳壹账通智能科技有限公司 图片上传方法、装置、计算机设备和存储介质
CN110532906A (zh) * 2019-08-14 2019-12-03 合肥智圣新创信息技术有限公司 一种基于人脸识别图片的共享方法及系统
CN112669221A (zh) * 2020-12-23 2021-04-16 深圳市科漫达智能管理科技有限公司 一种图片上传的方法、相关装置及计算机存储介质
CN114693517A (zh) * 2020-12-29 2022-07-01 广州探途天下科技有限公司 图片裁剪方法、装置及计算设备
CN116385336B (zh) * 2022-12-14 2024-04-12 广州市斯睿特智能科技有限公司 基于深度学习的焊缝检测方法、系统、装置及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215967A1 (en) * 2007-02-23 2008-09-04 Tabblo, Inc. Method and system for online transformation using an image URL application programming interface (API)
US20090327231A1 (en) * 2008-06-27 2009-12-31 Microsoft Corporation Inline enhancement of web lists
CN101789961A (zh) * 2009-12-31 2010-07-28 优视科技有限公司 一种用于移动通讯设备终端的图片缩放系统及其应用方法
CN102737034A (zh) * 2011-03-30 2012-10-17 北京千橡网景科技发展有限公司 提供图片的方法和设备
CN102946418A (zh) * 2012-10-26 2013-02-27 北京奇虎科技有限公司 一种终端设备、一种图片提供系统和一种图片传输方法
CN102970331A (zh) * 2012-10-26 2013-03-13 北京奇虎科技有限公司 图片提供系统
CN103903221A (zh) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 一种图片生成方法、装置和系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215967A1 (en) * 2007-02-23 2008-09-04 Tabblo, Inc. Method and system for online transformation using an image URL application programming interface (API)
US20090327231A1 (en) * 2008-06-27 2009-12-31 Microsoft Corporation Inline enhancement of web lists
CN101789961A (zh) * 2009-12-31 2010-07-28 优视科技有限公司 一种用于移动通讯设备终端的图片缩放系统及其应用方法
CN102737034A (zh) * 2011-03-30 2012-10-17 北京千橡网景科技发展有限公司 提供图片的方法和设备
CN102946418A (zh) * 2012-10-26 2013-02-27 北京奇虎科技有限公司 一种终端设备、一种图片提供系统和一种图片传输方法
CN102970331A (zh) * 2012-10-26 2013-03-13 北京奇虎科技有限公司 图片提供系统
CN103903221A (zh) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 一种图片生成方法、装置和系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647590A (zh) * 2018-04-25 2018-10-12 董志忠 一种智能头像处理算法
CN114463169A (zh) * 2021-12-24 2022-05-10 深圳万兴软件有限公司 图像数据增强方法、装置、设备及存储介质
CN115567737A (zh) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 一种裁取后图片替换方法及装置
CN115567737B (zh) * 2022-09-21 2023-05-16 飞狐信息技术(天津)有限公司 一种裁取后图片替换方法及装置

Also Published As

Publication number Publication date
RU2016140215A (ru) 2018-06-26
RU2016140215A3 (zh) 2018-06-26
CN105868224A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
WO2017080158A1 (zh) 图片处理方法、设备及系统
US9864811B2 (en) Terminal device, system for providing picture and method for transmitting picture
CN102984494B (zh) 一种视频通讯方法及装置
JP6219813B2 (ja) グラフィックス共有
CN103824252A (zh) 图片处理方法及系统
CN113521728B (zh) 云应用的实现方法、装置、电子设备和存储介质
CN107656911B (zh) 表格处理方法及其系统
US20160057087A1 (en) Processing media messages based on the capabilities of the receiving device
EP2953055A1 (en) Two-dimensional code processing method and terminal
CN104199728B (zh) 图片传送信息展示方法和装置
CN106200881A (zh) 一种数据展示方法及装置与虚拟现实设备
KR20090015936A (ko) 데이터 획득 장치. 데이터 획득 장치를 위한 방법, 및 서버장치
CN104754223A (zh) 一种生成缩略图的方法及拍摄终端
CN107908337A (zh) 分享图像内容的方法和装置
CN106453572A (zh) 基于云服务器同步图像的方法及系统
CN105635569A (zh) 拍摄方法、装置以及终端
KR20120017172A (ko) 휴대용 단말기에서 지오 태깅 시 전력 제어 장치 및 방법
CN115361184B (zh) 隐私保护方法及相关产品
CN115037741B (zh) 一种文件传输方法及装置
CN111240614A (zh) 投屏处理方法、装置和设备
CN106209859A (zh) 基于WiFi‑SD卡的图像无线即时分享系统及其运行方法
US20160142778A1 (en) Network camera, network camera control terminal, and video recording/delivering system
CN113873044B (zh) 数据传输方法、系统、设备及存储介质
CN111385484A (zh) 信息处理方法和装置
CN104349169B (zh) 一种图像处理方法及电子设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2016140215

Country of ref document: RU

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16863343

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16863343

Country of ref document: EP

Kind code of ref document: A1