commit 7595a4e65fec20fa3554501df3349733e065932e
Author: Nikias Bassen <[email protected]>
Date: Wed Aug 25 13:36:55 2010 +0200
fix artwork back_color writing when no vertical_padding is set
src/ithumb-writer.c | 43 ++++++++++++++++++++++++++++---------------
1 files changed, 28 insertions(+), 15 deletions(-)
---
diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
index 62bcc54..63c75a1 100644
--- a/src/ithumb-writer.c
+++ b/src/ithumb-writer.c
@@ -147,11 +147,6 @@ pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = get_RGB_565_pixel (img_info->back_color,
byte_order);
}
- line += (height+vertical_padding)*dest_width;
- for (w = 0 ; w < dest_width; w++) {
- result[line + w] = get_RGB_565_pixel (img_info->back_color,
- byte_order);
- }
}
for (h = 0; h < height; h++) {
@@ -175,6 +170,15 @@ pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = packed_pixel;
}
}
+
+ for (h = height + vertical_padding; h < img_info->height; h++) {
+ gint line = h * dest_width;
+ gint w;
+ for (w = 0 ; w < dest_width; w++) {
+ result[line + w] = get_RGB_565_pixel (img_info->back_color,
+ byte_order);
+ }
+ }
return result;
}
@@ -249,11 +253,6 @@ pack_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = get_RGB_555_pixel (img_info->back_color,
byte_order, TRUE);
}
- line += (height+vertical_padding)*dest_width;
- for (w = 0 ; w < dest_width; w++) {
- result[line + w] = get_RGB_555_pixel (img_info->back_color,
- byte_order, TRUE);
- }
}
for (h = 0; h < height; h++) {
@@ -278,6 +277,15 @@ pack_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = packed_pixel;
}
}
+
+ for (h = height + vertical_padding; h < img_info->height; h++) {
+ gint line = h * dest_width;
+ gint w;
+ for (w = 0 ; w < dest_width; w++) {
+ result[line + w] = get_RGB_555_pixel (img_info->back_color,
+ byte_order, TRUE);
+ }
+ }
return result;
}
@@ -349,11 +357,6 @@ pack_RGB_888 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = get_RGB_888_pixel (img_info->back_color,
byte_order, TRUE);
}
- line += (height+vertical_padding)*img_info->width;
- for (w = 0 ; w < img_info->width; w++) {
- result[line + w] = get_RGB_888_pixel (img_info->back_color,
- byte_order, TRUE);
- }
}
for (h = 0; h < height; h++) {
@@ -378,6 +381,16 @@ pack_RGB_888 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat
*img_info,
result[line + w] = packed_pixel;
}
}
+
+ for (h = height + vertical_padding; h < img_info->height; h++) {
+ gint line = h*img_info->width;
+ gint w;
+
+ for (w = 0 ; w < img_info->width; w++) {
+ result[line + w] = get_RGB_888_pixel (img_info->back_color,
+ byte_order, TRUE);
+ }
+ }
return (guint16 *)result;
}
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2