[Rawstudio-commit] r949 - trunk/src

Anders Brander anders at brander.dk
Tue Nov 21 21:47:18 CET 2006


Author: abrander
Date: 2006-11-21 21:47:18 +0100 (Tue, 21 Nov 2006)
New Revision: 949

Modified:
   trunk/src/gtk-interface.c
   trunk/src/gtk-save-dialog.c
   trunk/src/rawstudio.c
   trunk/src/rawstudio.h
Log:
Added width, height and scale arguments to rs_photo_save().

Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c	2006-11-21 18:35:39 UTC (rev 948)
+++ trunk/src/gtk-interface.c	2006-11-21 20:47:18 UTC (rev 949)
@@ -1541,9 +1541,9 @@
 	g_string_free(save, TRUE);
 
 	if (rs->cms_enabled)
-		rs_photo_save(rs->photo, parsed_filename, filetype->filetype, rs->exportProfileFilename);
+		rs_photo_save(rs->photo, parsed_filename, filetype->filetype, rs->exportProfileFilename, -1, -1, 1.0);
 	else
-		rs_photo_save(rs->photo, parsed_filename, filetype->filetype, NULL);
+		rs_photo_save(rs->photo, parsed_filename, filetype->filetype, NULL, -1, -1, 1.0);
 	gui_status_push(_("File exported"));
 	g_free(parsed_filename);
 

Modified: trunk/src/gtk-save-dialog.c
===================================================================
--- trunk/src/gtk-save-dialog.c	2006-11-21 18:35:39 UTC (rev 948)
+++ trunk/src/gtk-save-dialog.c	2006-11-21 20:47:18 UTC (rev 949)
@@ -209,9 +209,9 @@
 		char *filename;
 		filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fc));
 		if (rs->cms_enabled)
-			rs_photo_save(rs->photo, filename, filetype->filetype, rs->exportProfileFilename);
+			rs_photo_save(rs->photo, filename, filetype->filetype, rs->exportProfileFilename, -1, -1, 1.0);
 		else
-			rs_photo_save(rs->photo, filename, filetype->filetype, NULL);
+			rs_photo_save(rs->photo, filename, filetype->filetype, NULL, -1, -1, 1.0);
 
 		rs_conf_set_filetype(CONF_SAVE_FILETYPE, filetype);
 

Modified: trunk/src/rawstudio.c
===================================================================
--- trunk/src/rawstudio.c	2006-11-21 18:35:39 UTC (rev 948)
+++ trunk/src/rawstudio.c	2006-11-21 20:47:18 UTC (rev 949)
@@ -79,7 +79,7 @@
 	RS_PHOTO *(*load)(const gchar *),
 	GdkPixbuf *(*thumb)(const gchar *),
 	void (*load_meta)(const gchar *, RS_METADATA *),
-	gboolean (*save)(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename))
+	gboolean (*save)(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename, gint width, gint height, gdouble scale))
 {
 	RS_FILETYPE *cur = filetypes;
 	if (filetypes==NULL)
@@ -401,7 +401,7 @@
 
 				rs_cache_load(photo);
 				rs_photo_prepare(photo);
-				rs_photo_save(photo, parsed_filename, queue->filetype, NULL); /* FIXME: profile */
+				rs_photo_save(photo, parsed_filename, queue->filetype, NULL, -1, -1, 1.0); /* FIXME: profile */
 				g_free(parsed_filename);
 				rs_photo_close(photo);
 				rs_photo_free(photo);
@@ -680,7 +680,7 @@
 }
 
 gboolean
-rs_photo_save(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename)
+rs_photo_save(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename, gint width, gint height, gdouble scale)
 {
 	GdkPixbuf *pixbuf;
 	RS_IMAGE16 *rsi;
@@ -691,7 +691,7 @@
 
 	/* transform and crop */
 	rsi = rs_image16_transform(photo->input, NULL,
-			NULL, photo->crop, -1, -1, TRUE, 1.0,
+			NULL, photo->crop, width, height, TRUE, 1.0,
 			photo->angle, photo->orientation);
 
 	/* actually save */

Modified: trunk/src/rawstudio.h
===================================================================
--- trunk/src/rawstudio.h	2006-11-21 18:35:39 UTC (rev 948)
+++ trunk/src/rawstudio.h	2006-11-21 20:47:18 UTC (rev 949)
@@ -242,7 +242,7 @@
 	RS_PHOTO *(*load)(const gchar *);
 	GdkPixbuf *(*thumb)(const gchar *);
 	void (*load_meta)(const gchar *, RS_METADATA *);
-	gboolean (*save)(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename);
+	gboolean (*save)(RS_PHOTO *photo, const gchar *filename, gint filetype, const gchar *profile_filename, gint width, gint height, gdouble scale);
 	struct _rs_filetype *next;
 } RS_FILETYPE;
 
@@ -258,7 +258,7 @@
 RS_PHOTO *rs_photo_new();
 void rs_photo_free(RS_PHOTO *photo);
 gboolean rs_photo_save(RS_PHOTO *photo, const gchar *filename, gint filetype,
-	const gchar *profile_filename);
+	const gchar *profile_filename, gint width, gint height, gdouble scale);
 RS_METADATA *rs_metadata_new();
 void rs_metadata_free(RS_METADATA *metadata);
 void rs_metadata_normalize_wb(RS_METADATA *meta);




More information about the Rawstudio-commit mailing list