Hi, here is my final proposal, I've already submitted to the google. So welcome to comment on the register site.


1.Write a small introduction to yourself.

My name is Fufeng Yao. I'm on my second year of a master's degree in fundamental software at institute of software chinese academy of science.

2.State your preferred email address.


3.If you have chosen a nick for IRC, what is it?


4.Why do you want to participate in summer of code?

I've been looking forward to joining in some open source projects and now it's a big chance. I love programming and open source spirit, so I want to contribute and improve myself.

5.What are you studying, subject, level and school?

Now I mainly focus on the virtualization technology & the security of operating system

6.What country are you from, at what time are you most likely to be able to join IRC?

China. UTC 8:00~16:00 usually, but flexible.

Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.

Both answers are no.


1.What programs/software have you worked on before?

When I was an undergraduate, I worked on a "garage management system" and "brickbreaker game" both with a partner and some other little programming tasks such as lexical & grammar analyzer implemented by myself. Now I'm a graduate. I devote myself into my research field, but lately in my spare time, I also tried to write a sudoku app of Android just for fun.

2.Have you developed software in a team environment before (as opposed to hacking on something on your own)?

Yes. My friend and I co-completed a garage management system in Java. My workload occupied 40%.

3.Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?

No, this is my first year.

4.Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.

No, this will be my first open source project if I'm able to be accepted.

5.Photographic experience

A.What type of photos do you take, with what camera, in which format?
I have not a camera now, but I_m planning to buy one.
B.How do you organise and develop your photos?
Regretfully, I have no experience about developing photos.
C.Do you have a website/flickr account?
D.How proficient are you with post-production software, and which one(s) do you know?
I_m not familiar with post-production, but I know Photoshop is very powerful.
E.Are you familiar with basic photographic data processing (demosaicing, white balance, color management)?
Only a little, but I think I will lean fast with strong interest.

6.If you have contributed any patches to darktable, please list them below. You can also list patches that have been submitted but not committed yet, patches that were refused or patches that have not been specifically written for GSoC. This will help us find out what your work was and how you code.

I've tried to solve an easy coding task "Add tooltips to all controls and button" and submitted a patch.

I_ve submitted a patch solving the mismatch between snapshot and original.

Though both were not successful and not accepted, I became familiar with the code base, it_s the good side.

3.Communication skills

1.Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.

I can write fluent English though I'm not a native.

2.What spoken languages are you fluent in?


3.Are you good at interacting with other people?


4.Do you give constructive advice (both as a photographer and as a coder)?

Yes, I will if I have.

5.Do you receive advice well (both as a photographer and as a coder)?


6.Are you good at sorting useful criticisms from useless ones?


7.How autonomous are you when developing? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want?

Well, it depends. The GSoC idea I'll set about working on, for instance, I'd rather have certainty through extensive discussion. In addition, if there is no time limit, I'd love to discover or to explore.


1.Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?

Yes, I selected Real powerful snapshot plugin.

2.If you have invented your own project, please describe the project and the scope.

3.Why did you choose this project?

I used the darktable and found the snapshot module was not very satisfactory. It has some bugs and lacks important functions such as zooming.

This results in poor user experience and restricts the power of darktable. So I decided to improve snapshot.

4.Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".

First, I want to say I have no vacation plan this summer. So I have plenty of time to dedicate to the google summer of code.

And here is my plan which staring time is 23 May, as Google suggests. But it's not hard to find some preparing work will have already began after 25 April.

A.legacy code cleanup (1 week)
B.Implementing the side-by-side comparison between snapshot and current image. (1 week)
This idea came from discussion on IRC. Why not? The more options, the better.
C.Implementing the split comparison. (3 weeks)
This task includes two subtasks: vertical split (2 weeks) and horizontal split (1 week). Both will have the capability of zooming and dragging.
D.Implementing the free-drag comparison. (3 weeks)
This big task will be divided into 2 parts.
Part 1 (1 week): Implementing the rotation & translation of the separation line.
Part 2 (2 weeks): Implementing the combination zooming & combination dragging.
E.Optimizing current implementation (2 weeks)
F.GUI support & Debugging. (2 weeks)

5.Include as much technical detail about your implementation as you can.

A.legacy code cleanup

Current implementation of snapshot can_t adapt to the requirement of zooming and dragging. So I decide to revamp this component. I will add a pointer to dt_dev_pixelpipe_t in the struct dt_gui_snapshot and delete snapshot_image in the struct dt_gui_gtk_t. Meanwhile, delete the function of reading & writing png, add the function of creating pixelpipe because I need to record the image state when user clicked the snapshot button.

B.Implementing the side-by-side comparison between snapshot and current image

This is relatively simple. Because the two parts do not rely on each other, I just need to recompute the scale and paint snapshot and current image independently. I won_t implement the zooming cauz it will duplicate with following modes and I think it_s pretty good to give user a full view of what he has done.

There is a little trick here. If the width of image is larger than the height, I will show in top/bottom fashion. Otherwise in left/right fashion.

C.Implementing the split comparison

Current implementation of snapshot is based on vertical split. But it compares two different part of the same image. This is fine but I will add an option to compare the same part of the two images.What I need to record is the scale and the coordinate of the image. This coordinate is the offset relative to the top left of the view window. If we add the half of window_s width to the x coordinate, the image will shift right half width of window. Then we pass these parameters to the snapshot component. We use scale parameter to zoom then we cut the width down to a half and use cairo functions to draw on the view window. At last the snapshot will show on the left part of window with the same content and scale.

In order to response to the users_ input, we need add event handler. Specifically, we need modify handlers of center widget which include scroll-event, motion-notify-event, expose-event and button-press-event. When these events happen, we judge which part it happens on, left or right, then we update our parameters and pass them to the other part. At last we redraw the whole window.

For the horizontal split, it_s basically the same way to deal, we just change width into height and draw the separation line horizontally. Both situations need two pixelpipes, one for the image and one for the snapshot.

D.Implementing the free-drag comparison

For part 1, thanks to the people on IRC, I browsed the code of vignette plugin and it gives me many hints. When turning this mode on, we draw a crosshair around a circle on the line and a half circle on the endpoint of the line. We need a couple of variables to record info: (x, y) for central crosshair, (x1, 0) for intersection of top border, (x2, height) for intersection of bottom border, delta for offset angle from north up.

Using (x1, 0) and (x2, height), we can define two clip regions, then we can draw snapshot and image on each of them, which is similar to the current implementation. But this time, we must be able to zoom and drag the snapshot and image seamlessly as if they are exactly the same one.

For part 2, we have two situations:

1) If we translate the separation line, the angle won_t change, so we only need to recompute the intersections according to the new (x, y) and delta. If we rotate the separation line, we need use the (x, y) and the new delta to compute the new intersections. But both will only change the combining position, the whole image will keep consistent.

2) If we zoom and drag, except for computing the new (x, y) and the new intersections, we also need change the content in the window. This is something like split comparison I listed above. We need to record the scale and coordinate of the image in order to draw the image and snapshot on the proper position.

E.Optimizing current implementation

This is a tricky part. If I success, I can gain the improving performance. But if not, I_ve got nothing and waste of two weeks.

Currently I need to use pixelpipe to achieve my goal. An option is recording all the operations before clicking the snapshot button. When we need to use snapshot, we create the pixelpipe based on the original image and all the recorded operations. This method will save lots of memory because we allocate memory when we need, instead of keeping one pixelpipe for each snapshot. But now I_ve no idea whether this method is faster or slower than my implementation.

Another option is like current implementation, we write the whole image info into the png, not just the current view in the window. This is feasible and memory saved but reading png from disk is low speed. So this option may be not very suitable.

Anyway, I will keep researching and I hope I can find some smart solutions.

F.GUI support & Debugging

When all above is done, I think I need to add some buttons in the darkroom mode, or just utilize the right mouse button to switch between these four modes. Now this is not decided, but it_s easy to implement.

At last, I will commit my code to the community to collect feedbacks and bug reports. This will help me improve my working.

6.What do you expect to gain from this project?

I want to gain the programming experience and fun during my vacation. Finally, I want to be a long term contributor for darktable.

7.What would make you stay in the darktable community after the conclusion of GSoC?

There are two reasons.

First, as a programmer, I want to contribute my code and do what I can do to help community grow.

Second, as a user, I think darktable is cool and photographing is my hobby, so I want to use it and give my feedback to the community during my daily life.

5.Practical considerations

1.Are you familiar with any of the following tools or languages?

git (used for all commits)

I'm a elementary user and can do some basic operations

C99 (language used for all the normal source code)

Familiar. It is my principal programming language.


Not familiar, but I can learn if I need to use it.


Not familiar


Not familiar


Elementary, but it won't be a problem to implement a widget or draw something based on it.

SSE intrinsics/optimized programming

Basic concepts but no practical experience.


Like git, I started to use it lately.

2.Which tools do you normally use for development? Why do you use them?

Eclipse is my main IDE for C/C++/Java. Because eclipse provide rich tools/plugins to increase productivity. I'm very familiar with it.

3.What programming languages are you fluent in?

C, C++, Java.

4.Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably only add this number in the application for you submit to Google since the info in the wiki is available in public. We will not make any use of your number unless some case of "there is no way to contact you" does arise!

I don't mind & I will provide my phone number during my submit.

Also available in: PDF HTML TXT

Go to top