Commit 8e94fdff authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

modify the expose handling to get the shadows.

Sat May 28 07:38:03 2005  Jonathan Blandford  <jrb@redhat.com>

        * shell/ev-view.c (draw_one_page): modify the expose handling to
        get the shadows.

        * shell/ev-window.c (update_action_sensitivity): Respect
        permissions field.  Kowtow to the man.

        * pdf/ev-poppler.cc: Get the permissions field.

        * tiff/*c: Make a tiny bit more robust.
parent 560a7e43
Sat May 28 07:38:03 2005 Jonathan Blandford <jrb@redhat.com>
* shell/ev-view.c (draw_one_page): modify the expose handling to
get the shadows.
* shell/ev-window.c (update_action_sensitivity): Respect
permissions field. Kowtow to the man.
* pdf/ev-poppler.cc: Get the permissions field.
* tiff/*c: Make a tiny bit more robust.
2005-05-26 Nickolay V. Shmyrev <nshmyrev@yandex.ru> 2005-05-26 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* djvu/djvu-document.c: * djvu/djvu-document.c:
......
...@@ -4,7 +4,6 @@ Improve Find system ...@@ -4,7 +4,6 @@ Improve Find system
Display location of results in thumbnails? Display location of results in thumbnails?
Only display thumbnails of pages found? Only display thumbnails of pages found?
Sidebar improvements for ps/pixbuf, or PDF files without a TOC. bug 164811 Sidebar improvements for ps/pixbuf, or PDF files without a TOC. bug 164811
Improve Printing Support: (libgnomeprintui?) Improve Printing Support: (libgnomeprintui?)
...@@ -14,16 +13,6 @@ Improve Printing Support: (libgnomeprintui?) ...@@ -14,16 +13,6 @@ Improve Printing Support: (libgnomeprintui?)
Document Properties Dialog for document meta-data bug 164843 Document Properties Dialog for document meta-data bug 164843
Make an object that handles the page count.
Move to having three sizing types:
* Free zooming
* constrain to width
* constrain to height
* also, maybe add a 1-1 button. Possibly dubious, though.
Add some code to sanity check documents, including: Add some code to sanity check documents, including:
* n_pages > 0 * n_pages > 0
...@@ -43,3 +32,8 @@ Move to three page views: ...@@ -43,3 +32,8 @@ Move to three page views:
* Single page (prolly default for some backends) * Single page (prolly default for some backends)
* Continuous scrolling bug 164597 * Continuous scrolling bug 164597
* Side-by-side continuous scrolling * Side-by-side continuous scrolling
Make an object that handles the page count.
Move to having three sizing types:
* Free zooming
* constrain to width
* constrain to height
...@@ -60,6 +60,19 @@ typedef enum ...@@ -60,6 +60,19 @@ typedef enum
EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6, EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6,
} EvDocumentUIHints; } EvDocumentUIHints;
typedef enum
{
EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT = 1 << 0,
EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
EV_DOCUMENT_PERMISSIONS_OK_TO_COPY = 1 << 2,
EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
EV_DOCUMENT_PERMISSIONS_FULL = (EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT
| EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY
| EV_DOCUMENT_PERMISSIONS_OK_TO_COPY
| EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES),
} EvDocumentPermissions;
typedef enum typedef enum
{ {
EV_DOCUMENT_INFO_TITLE = 1 << 0, EV_DOCUMENT_INFO_TITLE = 1 << 0,
...@@ -71,6 +84,7 @@ typedef enum ...@@ -71,6 +84,7 @@ typedef enum
EV_DOCUMENT_INFO_START_MODE = 1 << 6, EV_DOCUMENT_INFO_START_MODE = 1 << 6,
EV_DOCUMENT_INFO_CREATION_DATE = 1 << 7, EV_DOCUMENT_INFO_CREATION_DATE = 1 << 7,
EV_DOCUMENT_INFO_UI_HINTS = 1 << 8, EV_DOCUMENT_INFO_UI_HINTS = 1 << 8,
EV_DOCUMENT_INFO_PERMISSIONS = 1 << 9,
} EvDocumentInfoFields; } EvDocumentInfoFields;
struct _EvDocumentInfo struct _EvDocumentInfo
...@@ -84,6 +98,7 @@ struct _EvDocumentInfo ...@@ -84,6 +98,7 @@ struct _EvDocumentInfo
EvDocumentMode mode; EvDocumentMode mode;
GDate creation_date; GDate creation_date;
guint ui_hints; guint ui_hints;
guint permissions;
/* Mask of all the valid fields */ /* Mask of all the valid fields */
guint fields_mask; guint fields_mask;
......
...@@ -99,6 +99,7 @@ EvPageCache *ev_document_get_page_cache (EvDocument *document); ...@@ -99,6 +99,7 @@ EvPageCache *ev_document_get_page_cache (EvDocument *document);
GMutex *ev_document_get_doc_mutex (void); GMutex *ev_document_get_doc_mutex (void);
void ev_document_doc_mutex_lock (void); void ev_document_doc_mutex_lock (void);
void ev_document_doc_mutex_unlock (void); void ev_document_doc_mutex_unlock (void);
EvDocumentInfo *ev_document_get_info (EvDocument *document); EvDocumentInfo *ev_document_get_info (EvDocument *document);
gboolean ev_document_load (EvDocument *document, gboolean ev_document_load (EvDocument *document,
const char *uri, const char *uri,
......
...@@ -32,6 +32,7 @@ struct _EvPageCache ...@@ -32,6 +32,7 @@ struct _EvPageCache
double max_height_page_height; double max_height_page_height;
EvPageCacheInfo *size_cache; EvPageCacheInfo *size_cache;
EvDocumentInfo *page_info;
}; };
struct _EvPageCacheClass struct _EvPageCacheClass
...@@ -91,6 +92,7 @@ ev_page_cache_finalize (GObject *object) ...@@ -91,6 +92,7 @@ ev_page_cache_finalize (GObject *object)
g_free (page_cache->title); g_free (page_cache->title);
g_free (page_cache->size_cache); g_free (page_cache->size_cache);
ev_document_info_free (page_cache->page_info);
} }
EvPageCache * EvPageCache *
...@@ -180,6 +182,8 @@ _ev_page_cache_new (EvDocument *document) ...@@ -180,6 +182,8 @@ _ev_page_cache_new (EvDocument *document)
} }
} }
page_cache->page_info = ev_document_get_info (document);
/* make some sanity check assertions */ /* make some sanity check assertions */
if (! page_cache->uniform) if (! page_cache->uniform)
g_assert (page_cache->size_cache != NULL); g_assert (page_cache->size_cache != NULL);
...@@ -366,6 +370,15 @@ ev_page_cache_has_nonnumeric_page_labels (EvPageCache *page_cache) ...@@ -366,6 +370,15 @@ ev_page_cache_has_nonnumeric_page_labels (EvPageCache *page_cache)
return page_cache->has_labels; return page_cache->has_labels;
} }
const EvDocumentInfo *
ev_page_cache_get_info (EvPageCache *page_cache)
{
g_return_val_if_fail (EV_IS_PAGE_CACHE (page_cache), NULL);
return page_cache->page_info;
}
gboolean gboolean
ev_page_cache_next_page (EvPageCache *page_cache) ev_page_cache_next_page (EvPageCache *page_cache)
{ {
......
...@@ -50,6 +50,7 @@ void ev_page_cache_get_max_height_size (EvPageCache *page_cache, ...@@ -50,6 +50,7 @@ void ev_page_cache_get_max_height_size (EvPageCache *page_cache,
char *ev_page_cache_get_page_label (EvPageCache *page_cache, char *ev_page_cache_get_page_label (EvPageCache *page_cache,
gint page); gint page);
gboolean ev_page_cache_has_nonnumeric_page_labels (EvPageCache *page_cache); gboolean ev_page_cache_has_nonnumeric_page_labels (EvPageCache *page_cache);
const EvDocumentInfo *ev_page_cache_get_info (EvPageCache *page_cache);
/* Navigation */ /* Navigation */
gint ev_page_cache_get_current_page (EvPageCache *page_cache); gint ev_page_cache_get_current_page (EvPageCache *page_cache);
......
...@@ -305,6 +305,7 @@ pdf_document_get_info (EvDocument *document) ...@@ -305,6 +305,7 @@ pdf_document_get_info (EvDocument *document)
PopplerPageLayout layout; PopplerPageLayout layout;
PopplerPageMode mode; PopplerPageMode mode;
PopplerViewerPreferences view_prefs; PopplerViewerPreferences view_prefs;
PopplerPermissions permissions;
info = g_new0 (EvDocumentInfo, 1); info = g_new0 (EvDocumentInfo, 1);
...@@ -316,6 +317,7 @@ pdf_document_get_info (EvDocument *document) ...@@ -316,6 +317,7 @@ pdf_document_get_info (EvDocument *document)
EV_DOCUMENT_INFO_LAYOUT | EV_DOCUMENT_INFO_LAYOUT |
EV_DOCUMENT_INFO_START_MODE | EV_DOCUMENT_INFO_START_MODE |
/* Missing EV_DOCUMENT_INFO_CREATION_DATE | */ /* Missing EV_DOCUMENT_INFO_CREATION_DATE | */
EV_DOCUMENT_INFO_PERMISSIONS |
EV_DOCUMENT_INFO_UI_HINTS; EV_DOCUMENT_INFO_UI_HINTS;
...@@ -328,6 +330,7 @@ pdf_document_get_info (EvDocument *document) ...@@ -328,6 +330,7 @@ pdf_document_get_info (EvDocument *document)
"page-mode", &mode, "page-mode", &mode,
"page-layout", &layout, "page-layout", &layout,
"viewer-preferences", &view_prefs, "viewer-preferences", &view_prefs,
"permissions", &permissions,
NULL); NULL);
switch (layout) { switch (layout) {
...@@ -394,6 +397,19 @@ pdf_document_get_info (EvDocument *document) ...@@ -394,6 +397,19 @@ pdf_document_get_info (EvDocument *document)
info->ui_hints |= EV_DOCUMENT_UI_HINT_DIRECTION_RTL; info->ui_hints |= EV_DOCUMENT_UI_HINT_DIRECTION_RTL;
} }
info->permissions = 0;
if (permissions & POPPLER_PERMISSIONS_OK_TO_PRINT) {
info->permissions |= EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT;
}
if (permissions & POPPLER_PERMISSIONS_OK_TO_MODIFY) {
info->permissions |= EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY;
}
if (permissions & POPPLER_PERMISSIONS_OK_TO_COPY) {
info->permissions |= EV_DOCUMENT_PERMISSIONS_OK_TO_COPY;
}
if (permissions & POPPLER_PERMISSIONS_OK_TO_ADD_NOTES) {
info->permissions |= EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES;
}
return info; return info;
} }
......
...@@ -96,6 +96,7 @@ evince_LDADD= \ ...@@ -96,6 +96,7 @@ evince_LDADD= \
$(top_builddir)/cut-n-paste/zoom-control/libephywidgets.la \ $(top_builddir)/cut-n-paste/zoom-control/libephywidgets.la \
$(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la \ $(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la \
$(top_builddir)/lib/libev.la \ $(top_builddir)/lib/libev.la \
-ltiff -lz \
libevbackendfactory.la \ libevbackendfactory.la \
$(NULL) $(NULL)
......
...@@ -73,7 +73,7 @@ ev_pixbuf_cache_init (EvPixbufCache *pixbuf_cache) ...@@ -73,7 +73,7 @@ ev_pixbuf_cache_init (EvPixbufCache *pixbuf_cache)
pixbuf_cache->end_page = 0; pixbuf_cache->end_page = 0;
pixbuf_cache->job_list = g_new0 (CacheJobInfo, PAGE_CACHE_LEN (pixbuf_cache)); pixbuf_cache->job_list = g_new0 (CacheJobInfo, PAGE_CACHE_LEN (pixbuf_cache));
pixbuf_cache->preload_cache_size = 1; pixbuf_cache->preload_cache_size = 2;
pixbuf_cache->prev_job = g_new0 (CacheJobInfo, pixbuf_cache->preload_cache_size); pixbuf_cache->prev_job = g_new0 (CacheJobInfo, pixbuf_cache->preload_cache_size);
pixbuf_cache->next_job = g_new0 (CacheJobInfo, pixbuf_cache->preload_cache_size); pixbuf_cache->next_job = g_new0 (CacheJobInfo, pixbuf_cache->preload_cache_size);
} }
......
...@@ -900,8 +900,8 @@ get_page_extents (EvView *view, ...@@ -900,8 +900,8 @@ get_page_extents (EvView *view,
y = view->spacing; y = view->spacing;
/* Adjust for extra allocation */ /* Adjust for extra allocation */
x = x + MAX (0, widget->allocation.width - (width + view->spacing * 2))/2; x = x + MAX (0, widget->allocation.width - (width + border->left + border->right + view->spacing * 2))/2;
y = y + MAX (0, widget->allocation.height - (height + view->spacing * 2))/2; y = y + MAX (0, widget->allocation.height - (height + border->top + border->bottom + view->spacing * 2))/2;
} }
page_area->x = x; page_area->x = x;
...@@ -1607,11 +1607,12 @@ draw_one_page (EvView *view, ...@@ -1607,11 +1607,12 @@ draw_one_page (EvView *view,
GdkRectangle real_page_area; GdkRectangle real_page_area;
g_assert (view->document); g_assert (view->document);
if (! gdk_rectangle_intersect (page_area, expose_area, &overlap))
return;
ev_page_cache_get_size (view->page_cache, ev_page_cache_get_size (view->page_cache,
page, view->scale, page, view->scale,
&width, &height); &width, &height);
/* Render the document itself */ /* Render the document itself */
real_page_area = *page_area; real_page_area = *page_area;
...@@ -1620,38 +1621,37 @@ draw_one_page (EvView *view, ...@@ -1620,38 +1621,37 @@ draw_one_page (EvView *view,
real_page_area.width -= (border->left + border->right); real_page_area.width -= (border->left + border->right);
real_page_area.height -= (border->top + border->bottom); real_page_area.height -= (border->top + border->bottom);
if (! gdk_rectangle_intersect (&real_page_area, expose_area, &overlap))
return;
ev_document_misc_paint_one_page (GTK_WIDGET(view)->window, ev_document_misc_paint_one_page (GTK_WIDGET(view)->window,
GTK_WIDGET (view), GTK_WIDGET (view),
page_area, border); page_area, border);
current_pixbuf = ev_pixbuf_cache_get_pixbuf (view->pixbuf_cache, page); if (gdk_rectangle_intersect (&real_page_area, expose_area, &overlap)) {
current_pixbuf = ev_pixbuf_cache_get_pixbuf (view->pixbuf_cache, page);
if (current_pixbuf == NULL) if (current_pixbuf == NULL)
scaled_image = NULL; scaled_image = NULL;
else if (width == gdk_pixbuf_get_width (current_pixbuf) && else if (width == gdk_pixbuf_get_width (current_pixbuf) &&
height == gdk_pixbuf_get_height (current_pixbuf)) height == gdk_pixbuf_get_height (current_pixbuf))
scaled_image = g_object_ref (current_pixbuf); scaled_image = g_object_ref (current_pixbuf);
else else
/* FIXME: We don't want to scale the whole area, just the right /* FIXME: We don't want to scale the whole area, just the right
* area of it */ * area of it */
scaled_image = gdk_pixbuf_scale_simple (current_pixbuf, scaled_image = gdk_pixbuf_scale_simple (current_pixbuf,
width, height, width, height,
GDK_INTERP_NEAREST); GDK_INTERP_NEAREST);
if (scaled_image) { if (scaled_image) {
gdk_draw_pixbuf (GTK_WIDGET(view)->window, gdk_draw_pixbuf (GTK_WIDGET(view)->window,
GTK_WIDGET (view)->style->fg_gc[GTK_STATE_NORMAL], GTK_WIDGET (view)->style->fg_gc[GTK_STATE_NORMAL],
scaled_image, scaled_image,
overlap.x - real_page_area.x, overlap.x - real_page_area.x,
overlap.y - real_page_area.y, overlap.y - real_page_area.y,
overlap.x, overlap.y, overlap.x, overlap.y,
overlap.width, overlap.height, overlap.width, overlap.height,
GDK_RGB_DITHER_NORMAL, GDK_RGB_DITHER_NORMAL,
0, 0); 0, 0);
g_object_unref (scaled_image); g_object_unref (scaled_image);
}
} }
} }
...@@ -1895,7 +1895,7 @@ ev_view_init (EvView *view) ...@@ -1895,7 +1895,7 @@ ev_view_init (EvView *view)
{ {
GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS); GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS);
view->spacing = 10; view->spacing = 5;
view->scale = 1.0; view->scale = 1.0;
view->current_page = 0; view->current_page = 0;
view->pressed_button = -1; view->pressed_button = -1;
......
...@@ -190,12 +190,17 @@ update_action_sensitivity (EvWindow *ev_window) ...@@ -190,12 +190,17 @@ update_action_sensitivity (EvWindow *ev_window)
{ {
EvView *view; EvView *view;
EvDocument *document; EvDocument *document;
const EvDocumentInfo *info = NULL;
EvWindowPageMode page_mode; EvWindowPageMode page_mode;
gboolean sensitive, has_pages = FALSE, has_document; gboolean sensitive, has_pages = FALSE, has_document;
int n_pages = 0, page = -1; int n_pages = 0, page = -1;
gboolean ok_to_print = TRUE;
gboolean ok_to_copy = TRUE;
view = EV_VIEW (ev_window->priv->view); view = EV_VIEW (ev_window->priv->view);
document = ev_window->priv->document; document = ev_window->priv->document;
if (document)
info = ev_page_cache_get_info (ev_window->priv->page_cache);
page_mode = ev_window->priv->page_mode; page_mode = ev_window->priv->page_mode;
has_document = document != NULL; has_document = document != NULL;
if (has_document && ev_window->priv->page_cache) { if (has_document && ev_window->priv->page_cache) {
...@@ -204,17 +209,22 @@ update_action_sensitivity (EvWindow *ev_window) ...@@ -204,17 +209,22 @@ update_action_sensitivity (EvWindow *ev_window)
has_pages = has_document && n_pages > 0; has_pages = has_document && n_pages > 0;
} }
if (info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) {
ok_to_print = (info->permissions & EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT);
ok_to_copy = (info->permissions & EV_DOCUMENT_PERMISSIONS_OK_TO_COPY);
}
/* File menu */ /* File menu */
/* "FileOpen": always sensitive */ /* "FileOpen": always sensitive */
set_action_sensitive (ev_window, "FileSaveAs", has_document); set_action_sensitive (ev_window, "FileSaveAs", has_document && ok_to_copy);
set_action_sensitive (ev_window, "FilePrint", has_pages); set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print);
/* "FileCloseWindow": always sensitive */ /* "FileCloseWindow": always sensitive */
/* Edit menu */ /* Edit menu */
sensitive = has_pages && ev_document_can_get_text (document); sensitive = has_pages && ev_document_can_get_text (document);
set_action_sensitive (ev_window, "EditCopy", sensitive); set_action_sensitive (ev_window, "EditCopy", sensitive && ok_to_copy);
set_action_sensitive (ev_window, "EditSelectAll", sensitive); set_action_sensitive (ev_window, "EditSelectAll", sensitive && ok_to_copy);
set_action_sensitive (ev_window, "EditFind", set_action_sensitive (ev_window, "EditFind",
has_pages && EV_IS_DOCUMENT_FIND (document)); has_pages && EV_IS_DOCUMENT_FIND (document));
set_action_sensitive (ev_window, "Slash", set_action_sensitive (ev_window, "Slash",
...@@ -581,7 +591,7 @@ update_document_mode (EvWindow *window, EvDocumentMode mode) ...@@ -581,7 +591,7 @@ update_document_mode (EvWindow *window, EvDocumentMode mode)
static void static void
ev_window_setup_document (EvWindow *ev_window) ev_window_setup_document (EvWindow *ev_window)
{ {
EvDocumentInfo *info; const EvDocumentInfo *info;
EvDocument *document; EvDocument *document;
EvView *view = EV_VIEW (ev_window->priv->view); EvView *view = EV_VIEW (ev_window->priv->view);
EvSidebar *sidebar = EV_SIDEBAR (ev_window->priv->sidebar); EvSidebar *sidebar = EV_SIDEBAR (ev_window->priv->sidebar);
...@@ -615,9 +625,8 @@ ev_window_setup_document (EvWindow *ev_window) ...@@ -615,9 +625,8 @@ ev_window_setup_document (EvWindow *ev_window)
ev_page_action_set_document (EV_PAGE_ACTION (action), document); ev_page_action_set_document (EV_PAGE_ACTION (action), document);
update_action_sensitivity (ev_window); update_action_sensitivity (ev_window);
info = ev_document_get_info (document); info = ev_page_cache_get_info (ev_window->priv->page_cache);
update_document_mode (ev_window, info->mode); update_document_mode (ev_window, info->mode);
ev_document_info_free (info);
} }
static void static void
......
...@@ -25,6 +25,7 @@ evince_thumbnailer_LDADD= \ ...@@ -25,6 +25,7 @@ evince_thumbnailer_LDADD= \
$(LIBTIFF) \ $(LIBTIFF) \
$(top_builddir)/lib/libev.la \ $(top_builddir)/lib/libev.la \
$(top_builddir)/shell/libevbackendfactory.la \ $(top_builddir)/shell/libevbackendfactory.la \
-ltiff -lz \
$(NULL) $(NULL)
pixmapdir = $(pkgdatadir) pixmapdir = $(pkgdatadir)
......
...@@ -167,6 +167,8 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale) ...@@ -167,6 +167,8 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale)
{ {
TiffDocument *tiff_document = TIFF_DOCUMENT (document); TiffDocument *tiff_document = TIFF_DOCUMENT (document);
int width, height; int width, height;
gint rowstride, bytes;
guchar *pixels = NULL;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
GdkPixbuf *scaled_pixbuf; GdkPixbuf *scaled_pixbuf;
...@@ -180,8 +182,41 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale) ...@@ -180,8 +182,41 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale)
return NULL; return NULL;
} }
TIFFGetField (tiff_document->tiff, TIFFTAG_IMAGEWIDTH, &width); if (!TIFFGetField (tiff_document->tiff, TIFFTAG_IMAGEWIDTH, &width))
TIFFGetField (tiff_document->tiff, TIFFTAG_IMAGELENGTH, &height); {
pop_handlers ();
return NULL;
}
if (! TIFFGetField (tiff_document->tiff, TIFFTAG_IMAGELENGTH, &height))
{
pop_handlers ();
return NULL;
}
pop_handlers ();
/* Sanity check the doc */
if (width <= 0 || height <= 0)
return NULL;
rowstride = width * 4;
if (rowstride / 4 != width)
/* overflow */
return NULL;
bytes = height * rowstride;
if (bytes / rowstride != height)
/* overflow */
return NULL;
pixels = g_try_malloc (bytes);
if (!pixels)
return NULL;
pixbuf = gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, TRUE, 8,
width, height, rowstride,
(GdkPixbufDestroyNotify) g_free, NULL);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
TIFFReadRGBAImageOriented (tiff_document->tiff, width, height, (uint32 *)gdk_pixbuf_get_pixels (pixbuf), ORIENTATION_TOPLEFT, 1); TIFFReadRGBAImageOriented (tiff_document->tiff, width, height, (uint32 *)gdk_pixbuf_get_pixels (pixbuf), ORIENTATION_TOPLEFT, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment