In message <[email protected]> on Thu, 06 Dec 2012 
00:36:04 +0100 (CET), Richard Levitte <[email protected]> said:

richard> In message 
<CAMVVJJawwF7q7Cd1JFU3S6DVQ27=k=0wzzgkdy1mfd5qkit...@mail.gmail.com> on Wed, 5 
Dec 2012 23:27:10 +0100, Alexandre Jullien <[email protected]> said:
richard> 
richard> alex.jullien> Hello,
richard> alex.jullien> 
richard> alex.jullien> It could be interesting if in the next release the 
aspect ratio of facebook banner is added to the
richard> alex.jullien> default list (14th astpect ratio).
richard> alex.jullien> 
richard> alex.jullien> I don't know what to do exactly, but I guess it deals 
with clipping.c :
richard> alex.jullien> g->aspect_presets [...] part
richard> alex.jullien> 
richard> alex.jullien> For information, the facebook banner size isĀ 850 x 315 
pixels .
richard> 
richard> G+ cover aspect ratio would be good as well, then.  The G+ cover size 
is 940x180.

Should anyone be interested, the diff to add these is attached.

Cheers,
Richard

-- 
Richard Levitte                         [email protected]
                                        http://richard.levitte.org/

"Life is a tremendous celebration - and I'm invited!"
-- from a friend's blog, translated from Swedish
diff --git a/src/iop/clipping.c b/src/iop/clipping.c
index 2376928..79dfeab 100644
--- a/src/iop/clipping.c
+++ b/src/iop/clipping.c
@@ -66,7 +66,7 @@
 DT_MODULE(4)
 
 // number of gui ratios in combo box
-#define NUM_RATIOS 13
+#define NUM_RATIOS 15
 
 /** flip H/V, rotate an image, then clip the buffer. */
 typedef enum dt_iop_clipping_flags_t
@@ -1512,6 +1512,8 @@ void gui_init(struct dt_iop_module_t *self)
   dt_bauhaus_combobox_add(g->aspect_presets, _("16:9"));
   dt_bauhaus_combobox_add(g->aspect_presets, _("16:10"));
   dt_bauhaus_combobox_add(g->aspect_presets, _("10:8 in print"));
+  dt_bauhaus_combobox_add(g->aspect_presets, _("facebook cover: 850x315"));
+  dt_bauhaus_combobox_add(g->aspect_presets, _("g+ cover image: 940x180"));
 
   int act = dt_conf_get_int("plugins/darkroom/clipping/aspect_preset");
   if(act < 0 || act >= NUM_RATIOS) act = 0;
@@ -1582,9 +1584,11 @@ void _iop_clipping_update_ratios(dt_iop_module_t *self)
   g->aspect_ratios[10] = 16.0f/9.0f;
   g->aspect_ratios[11] = 16.0f/10.0f;
   g->aspect_ratios[12] = 244.5f/203.2f;
+  g->aspect_ratios[13] = 850.0f/315.0f;
+  g->aspect_ratios[14] = 940.0f/180.0f;
 
   // if adding new presets, make sure to change this as well:
-  assert(NUM_RATIOS == 13);
+  assert(NUM_RATIOS == 15);
 
   /* swap default fixed ratios for portraits */
   if (g->aspect_ratios[1] < 1.0)
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
darktable-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to