GithubHelp home page GithubHelp logo

Rotate issue about eternity HOT 6 CLOSED

boratanrikulu avatar boratanrikulu commented on June 29, 2024
Rotate issue

from eternity.

Comments (6)

Klar avatar Klar commented on June 29, 2024

I have the same issue, in the "preview" the image is correct (rotated). When I click the Image i.e the post it is not rotated correctly.

From my understanding it should be simple to fix?

Did someone already fix it?

from eternity.

Klar avatar Klar commented on June 29, 2024

It works if I set in config.yml disableAlwaysResize: true

Fix must be something todo with:

{{ if eq .Tags.Orientation 6 }}

{{ if not $.ctx.Site.Params.DisableAlwaysResize }}

Not sure how to fix it with disableAlwaysResize: false

from eternity.

boratanrikulu avatar boratanrikulu commented on June 29, 2024

Hi,

It should be fixed like this;

  1. We have some rules here; https://github.com/boratanrikulu/eternity/blob/main/layouts/partials/slides/slider.html#L29, it should be updated like this;
{{ with $img.Exif }}
    {{ if eq .Tags.Orientation 6 }}
        {{ $resizer = "1000x r270" }}
    {{ end }}
    {{ if eq .Tags.Orientation 3 }}
        {{ $resizer = "1000x r180" }}
    {{ end }}
{{ end }}
  1. Same rotate fix lines should be added here (to keep it DRY, a helper method would be nice): https://github.com/boratanrikulu/eternity/blob/main/layouts/partials/slides/slide.html#L27
{{ $resizer := "3000x r0" }}
{{ with $img.Exif }}
	{{ if eq .Tags.Orientation 6 }}
		{{ $resizer = "3000x r270" }}
	{{ end }}
	{{ if eq .Tags.Orientation 3 }}
		{{ $resizer = "3000x r180" }}
	{{ end }}
{{ end }}
{{ $img = $img.Resize $resizer }}

Sadly, I don't have time to fix it myself, PRs are welcome.

from eternity.

Aflynn50 avatar Aflynn50 commented on June 29, 2024

Awesome! Just been having this problem myself, managed to fix it thanks to this.

from eternity.

Aflynn50 avatar Aflynn50 commented on June 29, 2024

I've put up a PR to implement the changes.

from eternity.

boratanrikulu avatar boratanrikulu commented on June 29, 2024

Warning

This project is currently not being actively maintained.
Please do not create new issues on GitHub.

from eternity.

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.