All Projects → lincollincol → HEIF-converter

lincollincol / HEIF-converter

Licence: MIT License
Converter for High Efficiency Image Format(HEIF)

Programming Languages

kotlin
9241 projects
shell
77523 projects
RenderScript
48 projects

Projects that are alternatives of or similar to HEIF-converter

heic-convert
🤳 convert heic/heif images to jpeg and png
Stars: ✭ 104 (+333.33%)
Mutual labels:  jpg, png, convert, heif, heic, heic-to-jpg, heic-to-png
HEIF
Mac OS X: Convert any image to HEIF/HEIC format
Stars: ✭ 58 (+141.67%)
Mutual labels:  jpg, png, jpeg, convert, heif, heic
Markdown Themeable Pdf
ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
Stars: ✭ 130 (+441.67%)
Mutual labels:  png, jpeg, convert
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (+425%)
Mutual labels:  jpg, png, heic
autosvg
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector
Stars: ✭ 35 (+45.83%)
Mutual labels:  jpg, png, convert
Optimise Images
Batch image resizer, optimiser and profiler using ImageMagick convert, OptiPNG, JpegOptim and optional ZopfliPNG, Guetzli and MozJPEG.
Stars: ✭ 64 (+166.67%)
Mutual labels:  jpg, png, jpeg
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+25291.67%)
Mutual labels:  png, jpeg, heic
node-pdftocairo
📃 Node.js wrapper for pdftocairo - PDF to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo
Stars: ✭ 17 (-29.17%)
Mutual labels:  png, jpeg, convert
dom-to-image-more
Generates an image from a DOM node using HTML5 canvas
Stars: ✭ 231 (+862.5%)
Mutual labels:  jpg, png, jpeg
ok-file-formats
Decoders for PNG, JPEG, WAV, and a few other file formats
Stars: ✭ 72 (+200%)
Mutual labels:  jpg, png
libheif-sharp
Provides .NET bindings for libheif.
Stars: ✭ 30 (+25%)
Mutual labels:  heif, heic
ee.Screen
Takes screenshots of web pages for the list of URLs. Various resolutions, multiple formats (JPG, PDF, PNG and TXT)
Stars: ✭ 19 (-20.83%)
Mutual labels:  jpg, png
jimp-compact
✏️ Lightweight version of Jimp -- An image processing library written entirely in JavaScript for Node.js
Stars: ✭ 55 (+129.17%)
Mutual labels:  png, jpeg
pixl
🚀 Lightweight image processing library in C++11
Stars: ✭ 31 (+29.17%)
Mutual labels:  png, jpeg
img2gcode
convert jpg, png,gif to gcode with nodejs and jimp
Stars: ✭ 31 (+29.17%)
Mutual labels:  png, jpeg
whatsapp-jpeg-repair
A handy tool to fix jpeg files downloaded from WhatsApp and prevent errors upon opening these files in Adobe Photoshop.
Stars: ✭ 30 (+25%)
Mutual labels:  jpg, jpeg
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+441.67%)
Mutual labels:  jpg, png
tinypng-free
Use the upload api of tinypng's homeage to compress images
Stars: ✭ 29 (+20.83%)
Mutual labels:  jpg, png
image-optimizer
Image optimization using PHP
Stars: ✭ 28 (+16.67%)
Mutual labels:  jpg, png
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+9383.33%)
Mutual labels:  png, jpeg

HEIF-converter

GitHub release (latest by date) GitHub
GitHub followers GitHub stars GitHub forks

Converter for High Efficiency Image Format(HEIF) to other image format

Available formats

  • JPEG
  • PNG
  • WEBP

Download

Gradle

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.lincollincol:HEIF-converter:1.3'
}

Maven

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>
<dependency>
  <groupId>com.github.lincollincol</groupId>
  <artifactId>Repo</artifactId>
  <version>1.3</version>
</dependency>

Usage

HeifConverter.useContext(this)
                .fromUrl("https://github.com/nokiatech/heif/raw/gh-pages/content/images/crowd_1440x960.heic")
                .withOutputFormat(HeifConverter.Format.PNG)
                .withOutputQuality(100) // optional - default value = 100. Available range (0 .. 100)
                .saveFileWithName("Image_Converted_Name_2") // optional - default value = uuid random string
                .saveResultImage(true) // optional - default value = true
                .convert {
                    println(it[HeifConverter.Key.IMAGE_PATH] as String)
                    resultImage.setImageBitmap((it[HeifConverter.Key.BITMAP] as Bitmap))
                }

convert function

  • Lambda, inside convert method, will return map of Objects. If you want to get result bitmap, you need to get value by libarry key HeifConverter.Key.BITMAP and cast it to Bitmap

  • If you need path to converted image - use HeifConverter.Key.IMAGE_PATH key and cast map value to String.

saveResultImage function

  • Set false, if you need bitmap only without saving.
  • You can skip this function if you want to save converted image, because it is true by default

saveFileWithName function

  • Use custom file name.
  • Skip this function if you don't need custom converted image name, because UUID generate unique name by default.

withOutputQuality function

  • Use this function if you need custom output quality.
  • Skip this function if you don't need custom output quality, default quality - 100

withOutputFormat function

  • Set output image format.
  • Use values from HeifConverter.Format. (Current available: PNG, JPEG, WEBP).

from (Source)

  • Convert heic image from sources such file, url, bytes, input stream etc.
  • You can call this function only one time. If you call this function few times - converter will use last called source.

Based on

heifreader by yohhoy

License

MIT License

Copyright (c) 2020 lincollincol

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].