Giter Club home page Giter Club logo

Comments (15)

adityapatadia avatar adityapatadia commented on May 20, 2024 1

The issue is already pointed by #43 Can you tell me which PHP version do you use? I will release new version to fix this in 8-10 hours.

Thanks,

from php-image-resize.

juanpablocs avatar juanpablocs commented on May 20, 2024

thanks, temporary solution with my code

if(!function_exists('exif_read_data'))
        return $img;
....

from php-image-resize.

adityapatadia avatar adityapatadia commented on May 20, 2024

New version 1.5.4 fixes this.

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

@adityapatadia please, update info about package on packagist.org, because only version 1.5.3 is available as stable in composer for now

from php-image-resize.

adityapatadia avatar adityapatadia commented on May 20, 2024

I can see 1.5.4 in packagist. https://packagist.org/packages/eventviva/php-image-resize. Did you use exact number 1.5.3 in your composer file?

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

@adityapatadia no, I just use @stable as version

from php-image-resize.

adityapatadia avatar adityapatadia commented on May 20, 2024

It should work. Can you try 1.5.* ?

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

It works good for now. Thank you!

ср, 15 июн. 2016 г. в 10:27, Aditya Patadia [email protected]:

It should work. Can you try 1.5.* ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/eventviva/php-image-resize/issues/47#issuecomment-226109391,
or mute the thread
https://github.com/notifications/unsubscribe/ADRO9xQHOq3pGeyRwfEAP6J_hfwxAouLks5qL6l8gaJpZM4IoEb9
.

Best regards,
Nikita Chernyi (Backend Developer, DevOps).

about.me/nikus
https://about.me/nikus?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links

from php-image-resize.

tarhe avatar tarhe commented on May 20, 2024

I am using "eventviva/php-image-resize": "1.5.*" and I am still getting this error

local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined function Eventviva\exif_read_data()' in /home/mywebiste/vendor/eventviva/php-image-resize/src/ImageResize.php:106

from php-image-resize.

adityapatadia avatar adityapatadia commented on May 20, 2024

Please provide more information about system and platforms. Your sample code will also help.

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

Symfony error handler handles level 0 (muted with @) errors. Just set dummy error handler before and restore error handler after image manipulations

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

If you need example - ping me

from php-image-resize.

tarhe avatar tarhe commented on May 20, 2024

I am using Laravel 5.2

// resize
$image_resize = ImageResize::createFromString($imagedata);
$image_resize->quality_jpg = 100;
$image_resize->resize(200, 200);
$image_resize->save( base_path() . '/images/' . $image_new_name . '.' . 'jpg' );

$image_new_name is a variable with a name.

@rakshazi Please, I need an example.

from php-image-resize.

rakshazi avatar rakshazi commented on May 20, 2024

@tarhe
You need install php extension exif and gd, in alpine linux it will be (for php7): php7-exif php7-gd,
after that you need do following to fix "heisenbug" with corrupted image metadata, just use following code and all we'll be ok:

protected function resizeImage(string $image_new_name)
    {
        /**
         * Framework will throw ErrorException exif_read_data(image.jpg): Illegal IFD size
         * for some files, but these errors must be muted (@exif_read_data($filename))
         * that's why we set dummy error handler
         */
        set_error_handler(function ($level, $message, $file, $line) {
            //Do nothing
        });
        $image_resize = ImageResize::createFromString($imagedata);
        $image_resize->quality_jpg = 100;
        $image_resize->resize(200, 200);

        $image_resize->save( base_path() . '/images/' . $image_new_name . '.' . 'jpg' );
        /**
         * Disable our dummy error handler
         */
        restore_error_handler();
    }

from php-image-resize.

tarhe avatar tarhe commented on May 20, 2024

@rakshazi Thanks, I appreciate

from php-image-resize.

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.