Coder Social home page Coder Social logo

Comments (14)

oscarotero avatar oscarotero commented on June 2, 2024

Hahaha. I don't want to know!!
What library are you using? Gd or Imagick?

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

Imagick

from imagecow.

oscarotero avatar oscarotero commented on June 2, 2024

Hi. I cannot reproduce the error. It works fine to me.
Can I see your implementation? Maybe you have a rotate in somewhere.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

$image = $this->worker->load($file)->resizeCrop($options['resize']['width'], $options['resize']['height'], $options['resize']['x'], $options['resize']['y']);

The settings is this:

['resize' => ['width' => 150, 'height' => 150, 'x' => 'center', 'y' => 'middle']]

All the code is here, but that is truely all I'm doing with your lib.

from imagecow.

oscarotero avatar oscarotero commented on June 2, 2024

Ok. Right now I'm in a computer without imagick but I've take a look later.
I found this question: http://stackoverflow.com/questions/4266656/how-to-stop-php-imagick-auto-rotating-images-based-on-exif-orientation-data so I suppose imagick automatically rotates the image based on exif orientation data. Only by ensuring, can you tell me whether Gd library has the same issue?
Thanks.

from imagecow.

oscarotero avatar oscarotero commented on June 2, 2024

Hi, @AndreasHeiberg
I downloaded your photo and was testing but I cannot reproduce your error, sorry.
I've pushed a new branch (autorotate) with a new method to autorotate automatically the picture taking the info from the exif data.

$image->load($filename)->autoRotate()->transform($operations);

Can you check if it works now? And if it doesn't, can test your image directly in the imagecow library instead using your implementation (I guess your library is ok, but just in case :)

Thanks

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

Sorry I've been busy with other stuff. I'm testing now.

The issue is also there when using Gd.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

Interesting output after updating the package and using autoRotate()

http://selftape-scandinavia.s3.amazonaws.com/images/selftape-scandinavia.s3.amazonaws.com/2e7e373a-29a7-4bb5-bf34-63a948667df3.jpg/150x150.jpg

Plus there is a namespace error on line 381 of Imagick.php needs to be new \ImagickPixel(). Github is giving me a 404 on the online editor, otherwise I would give you a pull-request for that one.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

The files orientation exif data is 6.

I can't say that I have wrapped my head around this yet http://sylvana.net/jpegcrop/exif_orientation.html, but case 6 should be rotate(90) not -90. Doing so fixes it.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

Using this file http://d.pr/i/JPUV

Gives me http://d.pr/i/GzSI

Here's a fix claviska/SimpleImage#11

I guess I really should make a local clone, so I can send you these pull-requests :)

from imagecow.

oscarotero avatar oscarotero commented on June 2, 2024

Thanks so much!
I'll make some tests to see if everything works fine and them merge the changes to master.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

I thank you for helping me out!

from imagecow.

oscarotero avatar oscarotero commented on June 2, 2024

Hi. There is a new release (0.6.0) with your changes and a lot code styling fixes (to follow the psr-1 and psr2).
Let me know if you have some problems.

from imagecow.

andheiberg avatar andheiberg commented on June 2, 2024

Okay really weird.

So in production were I have Imagick installed everything works.

On my local machine I have Gd and the image is actually upside down.

I really need to setup Imagick on my local machine in order to test this, but it might be a while before I do so, as everything works in production :)

from imagecow.

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.