From 7334bdfa51778d143958811bd38d4719fcbf72f0 Mon Sep 17 00:00:00 2001 From: Bert Date: Sun, 27 Feb 2011 13:03:16 +0100 Subject: Revert "Save rotated png-files with S-key" This reverts commit 090ee5405b70d6dfa16a8ca3a691dbd556c41bdb. --- image.c | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index 45e0926..5a69c20 100644 --- a/image.c +++ b/image.c @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include "config.h" @@ -29,9 +28,6 @@ int zl_cnt; float zoom_min; float zoom_max; -const short ori_left[8] = { 8, 7, 6, 5, 2, 1, 4, 3 }; -const short ori_right[8] = { 6, 5, 8, 7, 4, 3, 2, 1 }; - Imlib_Image *im_broken; void img_init(img_t *img, win_t *win) { @@ -94,8 +90,8 @@ int img_load(img_t *img, const char *filename) { img->scalemode = SCALE_DOWN; } - img->ori = img->o_ori = 1; - img->re = img->checkpan = 0; + img->re = 0; + img->checkpan = 0; img->w = imlib_image_get_width(); img->h = imlib_image_get_height(); @@ -103,25 +99,6 @@ int img_load(img_t *img, const char *filename) { return 1; } -int img_save(img_t *img) { - const char *fmt; - - if (!img || !img->im) - return 0; - - imlib_context_set_image(img->im); - - if (img->ori != img->o_ori) { - fmt = imlib_image_format(); - if (strcmp(fmt, "png") == 0) { - imlib_save_image(imlib_image_get_filename()); - return 1; - } - } - - return 0; -} - void img_close(img_t *img) { if (img && img->im) { imlib_context_set_image(img->im); @@ -364,17 +341,11 @@ void img_rotate(img_t *img, win_t *win, int d) { } void img_rotate_left(img_t *img, win_t *win) { - if (img) { - img_rotate(img, win, 3); - img->ori = ori_left[img->ori]; - } + img_rotate(img, win, 3); } void img_rotate_right(img_t *img, win_t *win) { - if (img) { - img_rotate(img, win, 1); - img->ori = ori_right[img->ori]; - } + img_rotate(img, win, 1); } void img_toggle_antialias(img_t *img) { -- cgit v1.2.3-54-g00ecf