Skip to content

[Discussions] What is the practical sense for needRotate boolean? #32

Answered by CaiJingLong
bambinoua asked this question in Q&A
Discussion options

You must be logged in to vote

The exif of jpeg maybe contains orientation attr.

A example to know it: https://developer.mozilla.org/en-US/docs/Web/CSS/image-orientation

See the attr info to read wiki.

This value range is 1~8, but only 1, 3, 6 and 8 can be seen when using.

A document of MIT: https://www.media.mit.edu/pia/Research/deepview/exif.html#orientation

From load to render graph:

graph TD;
    A[Load Image] --> B{exif orientation = 6 or 8?};
    B -- 6 --> C[Rotate counterclockwise by 90 degrees];
    B -- 8 --> D[Rotate clockwise by 90 degrees];
    B -- other values --> E[No rotation];
    C --> F[Render rotated image];
    D --> F;
    E --> F;
Loading

This is image size getter about the attrib…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bambinoua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #30 on March 08, 2023 07:12.