Krolyxon
Commit 6851d5c

Branches

Refs →

nsxiv6851d5c

Removed im member from img struct

Author
Bert
Date
2011-01-19 18:03 +0100
Parent
a7e30bb
Commit
6851d5c4e59640aedf3f23ff5ab6409d153c5ae3

+4 −5

2 files changed

  1. M image.c +4 −2
  2. M image.h +0 −3
M image.c View
@@ -40,16 +40,18 @@ void imlib_destroy() {
4040 }
4141
4242 void img_load(img_t *img, const char *filename) {
43+ Imlib_Image *im;
44+
4345 if (!img || !filename)
4446 return;
4547
4648 if (imlib_context_get_image())
4749 imlib_free_image();
4850
49− if (!(img->im = imlib_load_image(filename)))
51+ if (!(im = imlib_load_image(filename)))
5052 DIE("could not open image: %s", filename);
5153
52− imlib_context_set_image(img->im);
54+ imlib_context_set_image(im);
5355
5456 img->w = imlib_image_get_width();
5557 img->h = imlib_image_get_height();
M image.h View
@@ -19,8 +19,6 @@
1919 #ifndef IMAGE_H
2020 #define IMAGE_H
2121
22−#include <Imlib2.h>
23−
2422 #include "window.h"
2523
2624 typedef enum scalemode_e {
@@ -36,7 +34,6 @@ typedef struct img_s {
3634 int h;
3735 int x;
3836 int y;
39− Imlib_Image *im;
4037 } img_t;
4138
4239 void imlib_init(win_t*);