Include a Other Software section in Help file
[geeqie.git] / src / pixbuf_util.c
index e1c9184..9d10630 100644 (file)
@@ -148,8 +148,8 @@ static PixbufInline inline_pixbuf_data[] = {
        { PIXBUF_INLINE_ICON_TRASH,     icon_trash },
        { PIXBUF_INLINE_ICON_HEIF,      icon_heic },
        { PIXBUF_INLINE_ICON_GRAYSCALE, icon_grayscale },
-       { PIXBUF_INLINE_ICON_NEXT_PAGE, icon_next_page },
-       { PIXBUF_INLINE_ICON_PREVIOUS_PAGE,     icon_previous_page },
+       { PIXBUF_INLINE_ICON_EXPOSURE,  icon_exposure },
+       { PIXBUF_INLINE_SPLIT_PANE_SYNC, icon_split_pane_sync },
        { NULL, NULL }
 };
 
@@ -297,7 +297,7 @@ GdkPixbuf *pixbuf_fallback(FileData *fd, gint requested_width, gint requested_he
                case FORMAT_CLASS_COLLECTION:
                        pixbuf = pixbuf_inline(PIXBUF_INLINE_COLLECTION);
                        break;
-               case FORMAT_CLASS_PDF:
+               case FORMAT_CLASS_DOCUMENT:
                        pixbuf = pixbuf_inline(PIXBUF_INLINE_ICON_PDF);
                        break;
                default:
@@ -1509,4 +1509,43 @@ void pixbuf_highlight_overunderexposed(GdkPixbuf *pb, gint x, gint y, gint w, gi
                        }
                }
 }
+
+/*
+ *-----------------------------------------------------------------------------
+ * pixbuf ignore alpha
+ *-----------------------------------------------------------------------------
+*/
+void pixbuf_ignore_alpha_rect(GdkPixbuf *pb,
+                 gint x, gint y, gint w, gint h)
+{
+   gboolean has_alpha;
+   gint pw, ph, prs;
+   guchar *p_pix;
+   guchar *pp;
+   gint i, j;
+
+   if (!pb) return;
+
+   pw = gdk_pixbuf_get_width(pb);
+   ph = gdk_pixbuf_get_height(pb);
+
+   if (x < 0 || x + w > pw) return;
+   if (y < 0 || y + h > ph) return;
+
+   has_alpha = gdk_pixbuf_get_has_alpha(pb);
+   if (!has_alpha) return;
+
+   prs = gdk_pixbuf_get_rowstride(pb);
+   p_pix = gdk_pixbuf_get_pixels(pb);
+
+   for (i = 0; i < h; i++)
+       {
+       pp = p_pix + (y + i) * prs + (x * 4 );
+       for (j = 0; j < w; j++)
+           {
+           pp[3] = 0xff;
+           pp+=4;
+           }
+       }
+}
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */