Download the PHP package maestroerror/php-heic-to-jpg without Composer

On this page you can find all versions of the php package maestroerror/php-heic-to-jpg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-heic-to-jpg

php-heic-to-jpg

The easiest way to convert HEIC/HEIF images to JPEG with PHP and Laravel framework. It uses binary file created with Go language and has no dependencies on any other PHP libraries, extensions or third-part software

Installation

Run command in your project's root directory

Usage

Using the class "HeicToJpeg" is extremely simple. You need full location of any HEIC image to pass in "convert" function and call "saveAs" (save as file) or "get" (get file contents) methods.

For MacOS users

It should detect the OS itself, but if you want to specify architecture, it is recommended to use convertOnMac instead. The second argument is architecture of your system, by default set as "amd64", but you can specify "arm64" (AArch64, M1)
Note: As reported by several users, M1 Macbook works on amd64 binary file, so if arm64 doesn't work for you, just try convertOnMac("image1.heic")

Force arm64 for linux

In case of linux, for some reason, if it doesn't detect your architecture correct or just the php-heic-to-jpg-linux-arm64 binary is working for you well, (From v1.0.4) you can force it to use in convert and convertFromUrl by passing true as third argument:

isHeic method

Before converting, you can use the isHeic method (contributed by pbs-dg) to check if a file is HEIC format.

convertFromUrl method

If your image is available publicly, you can easily convert and save it in your file system using convertFromUrl method:

Handling 'mdat' File Conversion Issues

If you encounter an issue where the module cannot convert certain images produced by Samsung devices (detailed in this issue), resulting in the error error reading "meta" box: got box type "mdat" instead, you can take the following steps:

heif-converter-image is already required by composer in this (php-heic-to-jpg) package. heif-converter-image depends on libheif and provides installation scripts for various platforms refer to it's documentation.

The php-heic-to-jpg package automatically detects the presence of the heif-converter-image package and will attempt to use its Command Line Interface (CLI) executable for conversion if default conversion fails.

In case the package cannot find the heif-converter-image CLI, you can specify the path as an argument in the convert and convertOnMac methods like so:

With these steps, you should be able to handle the conversion of images that were previously causing issues.

Credits

I would like to say thanks to these people. Their work helped me to build heicToJpg file with Go:

Support

Support Our Work? 🌟 You can help us keep the code flowing by making a small donation. Every bit of support goes a long way in maintaining and improving our open-source contributions. Click the button below to contribute. Thank you for your generosity!

Or use QR code:


Log

27/02/2023
Built executables for MacOs (OS X / Darwin) with command sudo /home/maestroerror/go/bin/xgo --targets=darwin/* github.com/MaestroError/php-heic-to-jpg
04/03/2023
Added pest test and workflows for linux, windows and macos. Run tests locally with ./vendor/bin/pest

To Do

All versions of php-heic-to-jpg with dependencies

PHP Build Version
Package Version
Requires maestroerror/heif-converter Version 0.2
php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maestroerror/php-heic-to-jpg contains the following files

Loading the files please wait ....