Skip to content
Snippets Groups Projects
Commit 1e4a78c8 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Merge branch 'complete-exif-rotations' of https://github.com/Ferada/feh into...

Merge branch 'complete-exif-rotations' of https://github.com/Ferada/feh into Ferada-complete-exif-rotations
parents 9803fc41 0dd07456
No related branches found
No related tags found
No related merge requests found
......@@ -717,3 +717,15 @@ void gib_imlib_image_orientate(Imlib_Image im, int orientation)
imlib_context_set_image(im);
imlib_image_orientate(orientation);
}
void gib_imlib_image_flip_horizontal(Imlib_Image im)
{
imlib_context_set_image(im);
imlib_image_flip_horizontal();
}
void gib_imlib_image_flip_vertical(Imlib_Image im)
{
imlib_context_set_image(im);
imlib_image_flip_vertical();
}
......@@ -181,6 +181,8 @@ void gib_imlib_parse_color(char *col, int *r, int *g, int *b, int *a);
void gib_imlib_parse_fontpath(char *path);
Imlib_Font gib_imlib_load_font(char *name);
void gib_imlib_image_orientate(Imlib_Image im, int orientation);
void gib_imlib_image_flip_horizontal(Imlib_Image im);
void gib_imlib_image_flip_vertical(Imlib_Image im);
#ifdef __cplusplus
}
......
......@@ -294,10 +294,22 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
}
file->ed = exifData;
if (orientation == 3)
if (orientation == 2)
gib_imlib_image_flip_horizontal(*im);
else if (orientation == 3)
gib_imlib_image_orientate(*im, 2);
else if (orientation == 4)
gib_imlib_image_flip_vertical(*im);
else if (orientation == 5) {
gib_imlib_image_orientate(*im, 3);
gib_imlib_image_flip_vertical(*im);
}
else if (orientation == 6)
gib_imlib_image_orientate(*im, 1);
else if (orientation == 7) {
gib_imlib_image_orientate(*im, 3);
gib_imlib_image_flip_horizontal(*im);
}
else if (orientation == 8)
gib_imlib_image_orientate(*im, 3);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment