aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-19 18:03:32 +0100
committerBert <ber.t@gmx.com>2011-01-19 18:03:32 +0100
commit6851d5c4e59640aedf3f23ff5ab6409d153c5ae3 (patch)
tree81f75e0cc15b9528bc1da6019d1827f442d1cc10
parenta7e30bb081ab0a27147f97b8851d7bb76c39c51b (diff)
Removed im member from img struct
-rw-r--r--image.c6
-rw-r--r--image.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/image.c b/image.c
index 65f79de..38d54d4 100644
--- a/image.c
+++ b/image.c
@@ -40,16 +40,18 @@ void imlib_destroy() {
}
void img_load(img_t *img, const char *filename) {
+ Imlib_Image *im;
+
if (!img || !filename)
return;
if (imlib_context_get_image())
imlib_free_image();
- if (!(img->im = imlib_load_image(filename)))
+ if (!(im = imlib_load_image(filename)))
DIE("could not open image: %s", filename);
- imlib_context_set_image(img->im);
+ imlib_context_set_image(im);
img->w = imlib_image_get_width();
img->h = imlib_image_get_height();
diff --git a/image.h b/image.h
index 17a913c..b719e7a 100644
--- a/image.h
+++ b/image.h
@@ -19,8 +19,6 @@
#ifndef IMAGE_H
#define IMAGE_H
-#include <Imlib2.h>
-
#include "window.h"
typedef enum scalemode_e {
@@ -36,7 +34,6 @@ typedef struct img_s {
int h;
int x;
int y;
- Imlib_Image *im;
} img_t;
void imlib_init(win_t*);