GithubHelp home page GithubHelp logo

Comments (6)

stefangabos avatar stefangabos commented on June 16, 2024

ok, i will add it in the coming days. thank you!

from zebra_image.

stefangabos avatar stefangabos commented on June 16, 2024

See documentation.
Let me know if it works

from zebra_image.

tohizma avatar tohizma commented on June 16, 2024

Sorry for late report

It's works!

But there's warning in PHP 7.1.1 (XAMPP), gone in PHP 7.4.1 (sorry for testing only in 2 PHP version I has)

Warning: preg_match() expects parameter 2 to be string, resource given in D:\xampp\htdocs\tesbed\Zebra_Image.php on line 1561

Maybe unrelated to Interlace switch. Here this my test code:

require 'Zebra_Image.php';

$image = new Zebra_Image();

$image->auto_handle_exif_orientation = false;

$image->source_path = 'img-source.jpg';
$image->target_path = 'output-interlace.jpg';

$image->jpeg_quality = 100;
$image->jpeg_interlace = true;

$image->preserve_aspect_ratio = true;
$image->enlarge_smaller_images = true;
$image->preserve_time = true;

if (!$image->resize(1000, 1000, ZEBRA_IMAGE_CROP_CENTER)) {

    // if there was an error, let's see what the error is about
    switch ($image->error) {

        case 1:
            echo 'Source file could not be found!';
            break;
        case 2:
            echo 'Source file is not readable!';
            break;
        case 3:
            echo 'Could not write target file!';
            break;
        case 4:
            echo 'Unsupported source file format!';
            break;
        case 5:
            echo 'Unsupported target file format!';
            break;
        case 6:
            echo 'GD library version does not support target file format!';
            break;
        case 7:
            echo 'GD library is not installed!';
            break;
        case 8:
            echo '"chmod" command is disabled via configuration!';
            break;
        case 9:
            echo '"exif_read_data" function is not available';
            break;

    }

// if no errors
} else echo 'Success!';

echo '<img src="output-interlace.jpg">';

from zebra_image.

stefangabos avatar stefangabos commented on June 16, 2024

Should be fixed now

from zebra_image.

tohizma avatar tohizma commented on June 16, 2024

Great it is fixed now.

Thank you very much!

from zebra_image.

stefangabos avatar stefangabos commented on June 16, 2024

Thank you for you feedback

from zebra_image.

Related Issues (20)

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.