CN109525796A - A kind of Webp picture format conversion method - Google Patents

A kind of Webp picture format conversion method Download PDF

Info

Publication number
CN109525796A
CN109525796A CN201811519435.1A CN201811519435A CN109525796A CN 109525796 A CN109525796 A CN 109525796A CN 201811519435 A CN201811519435 A CN 201811519435A CN 109525796 A CN109525796 A CN 109525796A
Authority
CN
China
Prior art keywords
format
picture
webp
converted
picture file
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.)
Pending
Application number
CN201811519435.1A
Other languages
Chinese (zh)
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.)
Sichuan Shangtong Industrial Co Ltd
Original Assignee
Sichuan Shangtong Industrial 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 Sichuan Shangtong Industrial Co Ltd filed Critical Sichuan Shangtong Industrial Co Ltd
Priority to CN201811519435.1A priority Critical patent/CN109525796A/en
Publication of CN109525796A publication Critical patent/CN109525796A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of Webp picture format conversion methods, include the following steps: a, FileReader interface is called to read the picture file that user uploads into memory;B, picture file is converted into canvas;C, call canvas.toDataURL () that picture file is converted to Webp format;D, the picture file for having been converted into Webp format is put to showing in img label, and put in a label for downloading;E, it acknowledges receipt of user and clicks the corresponding download instruction of a label, the picture file for being converted into Webp format is downloaded to user.The present invention adds JavaScript technology using HTML, it uploads webp format picture file and converts picture format on webpage, then general picture format is downloaded, such as png format picture browses after allowing the computer that partially cannot directly browse webp format picture that webp format picture is converted into general format.

Description

A kind of Webp picture format conversion method
Technical field
The present invention relates to multimedia technology field, especially a kind of Webp picture format conversion method.
Background technique
WebP format, a kind of picture format for being intended to accelerate picture loading velocity of Google (google) exploitation.Picture pressure Contracting volume only about JPEG 2/3, and a large amount of server broadband resource and data space can be saved.Facebook,Ebay Test is had begun etc. well-known website and uses WebP format.
WebP had both supported lossy compression or had supported lossless compression.Coding jpeg file is compared, the WebP of same quality is encoded File needs to occupy more computing resources.
But Webp picture format is not still supported there are many computer at present, it is desirable to provide a kind of Webp picture to be converted The picture format supported at these computers.
Summary of the invention
To solve problems of the prior art, the present invention provides a kind of Webp picture format conversion methods.
The technical solution adopted by the present invention is that:
A kind of Webp picture format conversion method, includes the following steps:
A, FileReader interface is called to read the picture file that user uploads into memory;
B, picture file is converted into canvas;
C, call canvas.toDataURL () that picture file is converted to Webp format;
D, the picture file for having been converted into Webp format is put to showing in img label, and put to supplying down in a label It carries;
E, it acknowledges receipt of user and clicks the corresponding download instruction of a label, be converted into the picture file downloading of Webp format To user.
Preferably, which uses HTML and JavaScript, is connect by web browser calling Mouth, function complete the Webp format conversion of picture file.
The beneficial effects of the present invention are: adding JavaScript technology using HTML, webp format picture file is uploaded in net Picture format is converted on page, then downloads general picture format, such as png format picture, so that part cannot directly browse The computer of webp format picture browses after webp format picture being converted into general format.
Specific embodiment
The following describes the present invention in detail with reference to examples.
Embodiment
A kind of Webp picture format conversion method, includes the following steps:
A, FileReader interface is called to read the picture file that user uploads into memory;
B, picture file is converted into canvas;
C, call canvas.toDataURL () that picture file is converted to Webp format;
D, the picture file for having been converted into Webp format is put to showing in img label, and put to supplying down in a label It carries;
E, it acknowledges receipt of user and clicks the corresponding download instruction of a label, be converted into the picture file downloading of Webp format To user.
Specifically, which uses HTML and JavaScript, is connect by web browser calling Mouth, function complete the Webp format conversion of picture file.
A specific embodiment of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.

Claims (2)

1. a kind of Webp picture format conversion method, which comprises the steps of:
A, FileReader interface is called to read the picture file that user uploads into memory;
B, picture file is converted into canvas;
C, call canvas.toDataURL () that picture file is converted to Webp format;
D, the picture file for having been converted into Webp format is put to showing in img label, and put in a label for downloading;
E, it acknowledges receipt of user and clicks the corresponding download instruction of a label, the picture file for being converted into Webp format is downloaded to use Family.
2. Webp picture format conversion method according to claim 1, which is characterized in that the Webp picture format conversion side Method uses HTML and JavaScript, is converted by the Webp format that web browser calling interface, function complete picture file.
CN201811519435.1A 2018-12-12 2018-12-12 A kind of Webp picture format conversion method Pending CN109525796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811519435.1A CN109525796A (en) 2018-12-12 2018-12-12 A kind of Webp picture format conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811519435.1A CN109525796A (en) 2018-12-12 2018-12-12 A kind of Webp picture format conversion method

Publications (1)

Publication Number Publication Date
CN109525796A true CN109525796A (en) 2019-03-26

Family

ID=65796558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811519435.1A Pending CN109525796A (en) 2018-12-12 2018-12-12 A kind of Webp picture format conversion method

Country Status (1)

Country Link
CN (1) CN109525796A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104631A (en) * 2019-11-30 2020-05-05 四川商通实业有限公司 Webp picture format conversion method
CN112800372A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Page loading method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139292A (en) * 2013-01-22 2013-06-05 深圳市深信服电子科技有限公司 Method for processing pictures in hyper text transmission protocol (HTTP) proxy and proxy server and system
WO2015019368A1 (en) * 2013-08-05 2015-02-12 PISANI Sabino Device and method for format conversion of files for three-dimensional vision
CN104598902A (en) * 2015-01-29 2015-05-06 百度在线网络技术(北京)有限公司 Method and device for identifying screenshot and browser
WO2016193543A1 (en) * 2015-06-03 2016-12-08 Nokia Technologies Oy A method, an apparatus, a computer program for video coding
WO2017048300A1 (en) * 2015-09-18 2017-03-23 Rifl Media Llc Social network for curating and contextual discussion of hosted multi-media content
CN106709960A (en) * 2015-11-17 2017-05-24 北京国双科技有限公司 Image storage method, device and system
CN107680144A (en) * 2017-10-16 2018-02-09 郑州云海信息技术有限公司 A kind of method and device of WebP files conversion
CN107911456A (en) * 2017-11-17 2018-04-13 深圳泉眼体育运营管理有限公司 Flow optimization method, device, terminal device and the storage medium of picture loading
CN108600373A (en) * 2018-04-26 2018-09-28 广州沐思信息科技有限公司 A kind of Picture Generation Method, server and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139292A (en) * 2013-01-22 2013-06-05 深圳市深信服电子科技有限公司 Method for processing pictures in hyper text transmission protocol (HTTP) proxy and proxy server and system
WO2015019368A1 (en) * 2013-08-05 2015-02-12 PISANI Sabino Device and method for format conversion of files for three-dimensional vision
CN104598902A (en) * 2015-01-29 2015-05-06 百度在线网络技术(北京)有限公司 Method and device for identifying screenshot and browser
WO2016193543A1 (en) * 2015-06-03 2016-12-08 Nokia Technologies Oy A method, an apparatus, a computer program for video coding
WO2017048300A1 (en) * 2015-09-18 2017-03-23 Rifl Media Llc Social network for curating and contextual discussion of hosted multi-media content
CN106709960A (en) * 2015-11-17 2017-05-24 北京国双科技有限公司 Image storage method, device and system
CN107680144A (en) * 2017-10-16 2018-02-09 郑州云海信息技术有限公司 A kind of method and device of WebP files conversion
CN107911456A (en) * 2017-11-17 2018-04-13 深圳泉眼体育运营管理有限公司 Flow optimization method, device, terminal device and the storage medium of picture loading
CN108600373A (en) * 2018-04-26 2018-09-28 广州沐思信息科技有限公司 A kind of Picture Generation Method, server and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104631A (en) * 2019-11-30 2020-05-05 四川商通实业有限公司 Webp picture format conversion method
CN112800372A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Page loading method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111104631B (en) Webp picture format conversion method
CN103177015B (en) Web page image methods of exhibiting and system
US9563449B2 (en) Mobilizing a web application to take advantage of a native device capability
CN108337528A (en) A kind of method and apparatus of preview video
EP3766016A1 (en) Machine learning system for reduced network bandwidth transmission of content
CN105589836A (en) Document previewing method, terminal and server
JP2016517564A (en) Web-based keyboard, video and mouse (KVM) redirection system and method and application thereof
CN108416021B (en) Browser webpage content processing method and device, electronic equipment and readable medium
CN109525796A (en) A kind of Webp picture format conversion method
WO2020048189A1 (en) Image generation
CN109785939A (en) Medical image display methods, device, equipment and storage medium based on cloud
CN103118107A (en) Electronic specification implementation method based on cloud end
KR20100022920A (en) A web browser system using proxy server of a mobile communication terminal
CN102831154B (en) The method and apparatus of data in the Text Entry of preservation and display web page
CN105718512A (en) Method for calling native language by using JS language in Ios system
CN102209140A (en) Method of playing flash file of mobile communication equipment terminal through browser and apparatus thereof
CN105635613B (en) A kind of record screen method and apparatus of mobile device
CN104378428A (en) Method and device for downloading files
CN106210135A (en) Picture resource download process method, terminal and Resource Server
CN113163198B (en) Image compression method, decompression method, device, equipment and storage medium
CN105205151A (en) Method and system for saving browser page flow at mobile terminal
CN106649437A (en) Bar code scanning method and system
US20170124029A1 (en) System and method of producing dynamically customized images
CN114692053A (en) Lossless compression method for webpage picture, electronic equipment and storage medium
CN103942207A (en) Information processing method, device and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326