{"id":16766039,"url":"https://github.com/mojtabaj/c-webp","last_synced_at":"2025-04-10T19:04:30.021Z","repository":{"id":48273301,"uuid":"516299706","full_name":"mojtabaJ/c-webp","owner":"mojtabaJ","description":"Convert jpeg/png to webp with JAVA (if at all possible) ","archived":false,"fork":false,"pushed_at":"2022-08-07T08:18:42.000Z","size":45,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T16:45:51.778Z","etag":null,"topics":["converter","image","image-compression","image-converter","image-format","java","jpg","png","webp","webp-converter"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mojtabaJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-21T09:06:35.000Z","updated_at":"2025-02-02T22:58:49.000Z","dependencies_parsed_at":"2022-08-12T19:41:28.669Z","dependency_job_id":null,"html_url":"https://github.com/mojtabaJ/c-webp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaJ%2Fc-webp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaJ%2Fc-webp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaJ%2Fc-webp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaJ%2Fc-webp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mojtabaJ","download_url":"https://codeload.github.com/mojtabaJ/c-webp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279197,"owners_count":21077406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","image","image-compression","image-converter","image-format","java","jpg","png","webp","webp-converter"],"created_at":"2024-10-13T06:05:08.019Z","updated_at":"2025-04-10T19:04:29.991Z","avatar_url":"https://github.com/mojtabaJ.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebP Converter  [![Maven Central](https://img.shields.io/maven-central/v/io.github.mojtabaj/c-webp)](https://search.maven.org/search?q=g:io.github.mojtabaj%20AND%20a:c-webp) \nA simple compression utility for converting images (jpeg, png, tiff) to  **WebP** format.\n\n\n \n\n## Installation\n\n- First make sure to install `cwebp` on your machine, e.g. via [this link](https://developers.google.com/speed/webp/docs/precompiled)\n\n### Maven dependency\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.mojtabaj\u003c/groupId\u003e\n  \u003cartifactId\u003ec-webp\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n\n### Usage\n\n```java\n//Use WebpConverter for converting image to webp byte with 80 quality\nbyte[] webpByte = WebpConverter.imageByteToWebpByte(imageByteArray, 80);\nbyte[] webpByte = WebpConverter.imageFileToWebpByte(\"../inputImage.png\", 80);\n\n//Use WebpConverter for converting image to webp file with 80 quality\nFile webpFile = WebpConverter.imageByteToWebpFile(imageByteArray,\"../outputImage.webp\", 80);\nFile webpFile = WebpConverter.imageFileToWebpFile(\"../inputImage.png\",\"../outputImage.webp\", 80);\n\n\n//Use CWebp to create and execute cwebp command to compress an image using the WebP format.\nCWebp cwebp = new CWebp()\n        .input(imageFilePath) // specify the input file.\n        .quality(80) //factor for RGB channels\n        .resize(512, 512) // resize the source to a rectangle with size width x height.\n        .output(outputFilePath); // specify the output WebP file\ncwebp.execute(); // executes the specified string command in a separate process.\n```\n\n\n## License\n\nCopyright 2022 Mojtaba Jalambadani\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements. See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership. The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the “License”); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaj%2Fc-webp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmojtabaj%2Fc-webp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaj%2Fc-webp/lists"}