Skip to content

Commit

Permalink
larger image
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Dec 29, 2023
1 parent 6feb91d commit 2344b51
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions plugins/notify/notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ show_notification (DB_playItem_t *track, char *image_filename, dbus_uint32_t rep

// GdkPixbuf *img = _load_image_from_cover(image_filename);

uint32_t *image_bytes = malloc(16);

struct {
dbus_int32_t width;
dbus_int32_t height;
Expand All @@ -312,16 +310,17 @@ show_notification (DB_playItem_t *track, char *image_filename, dbus_uint32_t rep
dbus_int32_t channels;
} image_data;

image_data.width = 2;
image_data.height = 2;
image_data.stride = 8;
image_data.width = 64;
image_data.height = 64;
image_data.stride = image_data.width * 4;
image_data.has_alpha = 0;
image_data.bits_per_sample = 32;
image_data.channels = 4;
image_bytes[0] = 0x00000000;
image_bytes[1] = 0xffffffff;
image_bytes[2] = 0x00000000;
image_bytes[3] = 0xffffffff;

uint32_t *image_bytes = malloc (image_data.width * image_data.width * sizeof (uint32_t));
for (int i = 0; i < image_data.width * image_data.height; i++) {
image_bytes[i] = 0xff0000ff;
}

DBusMessageIter iter, sub;

Expand Down Expand Up @@ -386,9 +385,7 @@ show_notification (DB_playItem_t *track, char *image_filename, dbus_uint32_t rep
DBUS_TYPE_BYTE_AS_STRING,
&data_sub);

{
dbus_message_iter_append_fixed_array (&data_sub, DBUS_TYPE_BYTE, &image_bytes, 16);
}
{ dbus_message_iter_append_fixed_array (&data_sub, DBUS_TYPE_BYTE, &image_bytes, 16); }

dbus_message_iter_close_container (&image_sub, &data_sub);
}
Expand All @@ -408,7 +405,7 @@ show_notification (DB_playItem_t *track, char *image_filename, dbus_uint32_t rep

replaces_id = notify_send (msg, replaces_id);

free (image_bytes);
free (image_bytes);
}

if (should_wait_for_cover) {
Expand Down

0 comments on commit 2344b51

Please sign in to comment.