Code Monkey home page Code Monkey logo

php-imageoptim-api's Introduction

ImageOptim

ImageOptim is a GUI for lossless image optimization tools: Zopfli, PNGOUT, OxiPNG, AdvPNG, PNGCrush, JPEGOptim, Jpegtran, Guetzli, Gifsicle, SVGO, svgcleaner and MozJPEG.

Building

Requires:

git clone --recursive https://imageoptim.com ImageOptim
cd ImageOptim

To get started, open imageoptim/ImageOptim.xcodeproj. It will automatically download and build all subprojects when run in Xcode.

In case of build errors, these sometimes help:

git submodule update --init
cd gifsicle # or pngquant
make clean
make

php-imageoptim-api's People

Contributors

kornelski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-imageoptim-api's Issues

PHP 8 compatibility

Hi,

This project doesn't seem to have had activity in 5 years but worth a shot : Can we expect PHP 8 support in the future ?

Thanks.

Php 7.4 exception: "Trying to access array offset on value of type int"

In the process of upgrading php from 7.1 to 7.4 for the app using this library and it looks like 7.4 is a bit more strict with certain things and is causing the following code (line 2) to throw an exception "Trying to access array offset on value of type int" and fail.

https://github.com/ImageOptim/php-imageoptim-api/blob/master/src/Request.php#L163
$status = intval($status[1]);
$errorMessage = $status[2];
I think the issue is that the first line is setting $status to an int, and then trying to treat it like an array in the next line, which PHP 7.4 now throws and exception for (before it would just be null and carry on)

https://www.php.net/manual/en/migration74.incompatible.php
"Array-style access of non-arrays
Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice."

Possible simple fix at the moment is just to swap the two lines around.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.