imd->color_profile_input < COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS)
{
const gchar *file = options->color_profile.input_file[imd->color_profile_input - COLOR_PROFILE_FILE];
-
+
if (!is_readable_file(file)) return FALSE;
input_type = COLOR_PROFILE_FILE;
imd->color_profile_from_image = COLOR_PROFILE_NONE;
exif = exif_read_fd(imd->image_fd);
-
+
if (exif)
{
profile = exif_get_color_profile(exif, &profile_len);
exif_free_fd(imd->image_fd, exif);
}
-
+
if (profile)
{
}
image_update_util(imd);
-
+
if (screen_profile)
{
g_free(screen_profile);
screen_profile = NULL;
}
-
+
return !!cm;
}
DEBUG_1("%s read ahead started for :%s", get_exec_time(), imd->read_ahead_fd->path);
imd->read_ahead_il = image_loader_new(imd->read_ahead_fd);
-
+
image_loader_delay_area_ready(imd->read_ahead_il, TRUE); /* we will need the area_ready signals later */
g_signal_connect(G_OBJECT(imd->read_ahead_il), "error", (GCallback)image_read_ahead_error_cb, imd);
g_assert(imd->image_fd->pixbuf);
image_change_pixbuf(imd, imd->image_fd->pixbuf, image_zoom_get(imd), FALSE);
}
-
+
// file_cache_dump(image_get_cache());
return success;
}
if (is_readable_file(imd->image_fd->path))
{
PixbufRenderer *pr;
-
+
pr = PIXBUF_RENDERER(imd->pr);
pr->zoom = zoom; /* store the zoom, needed by the loader */
if (imd->unknown == TRUE)
{
GdkPixbuf *pixbuf;
-
+
pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
image_change_pixbuf(imd, pixbuf, zoom, FALSE);
g_object_unref(pixbuf);
a notification that removes the pixbuf from cache and unrefs it. Therefore we must ref it
here before it is taken over by the renderer. */
if (pixbuf) g_object_ref(pixbuf);
-
+
if (imd->image_fd)
{
if (imd->image_fd->user_orientation)
{
ColorMan *cm;
if (!imd) return FALSE;
-
+
cm = imd->cm;
if (!cm) return FALSE;
return color_man_get_status(cm, image_profile, screen_profile);
void image_select(ImageWindow *imd, gboolean select)
{
if (!imd->has_frame) return;
-
+
if (select)
{
gtk_widget_set_state(imd->widget, GTK_STATE_SELECTED);
void image_set_selectable(ImageWindow *imd, gboolean selectable)
{
if (!imd->has_frame) return;
-
+
gtk_frame_set_shadow_type(GTK_FRAME(imd->frame), GTK_SHADOW_NONE);
gtk_container_set_border_width(GTK_CONTAINER(imd->frame), selectable ? 4 : 0);
}
NULL);
pixbuf_renderer_set_parent((PixbufRenderer *)imd->pr, (GtkWindow *)imd->top_window);
-
+
image_stereo_set(imd, options->stereo.mode);
pixbuf_renderer_stereo_fixed_set((PixbufRenderer *)imd->pr,
options->stereo.fixed_w, options->stereo.fixed_h,
g_object_unref(imd->pr);
gtk_widget_set_can_focus(imd->frame, TRUE);
gtk_widget_set_app_paintable(imd->frame, TRUE);
-
+
#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(imd->frame), "draw",
G_CALLBACK(selectable_frame_draw_cb), NULL);