You are not logged in.
Pages: 1
Just a simple question from the title: is ristretto "save copy..." feature lossless?.
I mean if it saves a new jpeg file (that would mean a lossy save) or if it just copies the existing file (that of course would be lossless).
Thanks
Offline
Looks like it just copies the file. From http://git.xfce.org/apps/ristretto/tree … n_window.c (uses g_copy_file):
/**
* cb_rstto_main_window_save_copy:
* @widget:
* @window:
*
*
*/
static void
cb_rstto_main_window_save_copy (GtkWidget *widget, RsttoMainWindow *window)
{
GtkWidget *dialog, *err_dialog;
gint response;
GFile *file, *s_file;
dialog = gtk_file_chooser_dialog_new(_("Save copy"),
GTK_WINDOW(window),
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
NULL);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
response = gtk_dialog_run(GTK_DIALOG(dialog));
if(response == GTK_RESPONSE_OK)
{
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
s_file = rstto_file_get_file(rstto_image_list_iter_get_file (window->priv->iter));
if ( FALSE == g_file_copy (
s_file,
file,
G_FILE_COPY_OVERWRITE,
NULL,
NULL,
NULL,
NULL) )
{
err_dialog = gtk_message_dialog_new(GTK_WINDOW(window),
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
_("Could not save file"));
gtk_dialog_run(GTK_DIALOG(err_dialog));
gtk_widget_destroy(err_dialog);
}
}
gtk_widget_destroy(dialog);
}
In addition, after the file save, both files are the same size and identical (using ImageMagik's compare utility)
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks for the quick and complete reply!
I would then suggest to put it there in the name - so users hadn't any doubts. I mean instead of just "save copy..." we could use "save copy... (lossless)".
I've also submitted a "save copy" improvement request on launchpad:
https://bugs.launchpad.net/ubuntu/+sour … ug/1284111
(just for info)
Thanks again
Offline
Pages: 1
[ Generated in 0.013 seconds, 10 queries executed - Memory usage: 526.15 KiB (Peak: 526.99 KiB) ]