1

Say I wanted to build a system that functions like git, but for images - where would I start?

For instance, say I wanted to just have 1 image (the original) stored on disk + the diff. When the second image needs to be viewed, I rebuild it based on the original + the diff (that way I don't store two images on disk at the same time).

Can I do that in Ruby and where would I start?

Anyone can provide a nice overview, I would appreciate it. Or even some links on where to get started.

Thanks.

P.S. Assume that I have a solid grasp of Ruby (or can learn). Are there other languages I would need to know, if so...which would work best assuming that I want my solution to be OS-agnostic and work seamlessly on at least Windows & Mac.

marcamillion
  • 32,933
  • 55
  • 189
  • 380

2 Answers2

1

Take a look at Version Control for Graphics I would start looking at the source code for the projects mentioned and learn from them. The issue is that some formats will shift bytes around even if you made a small change in the image, this results in a situation that is less than ideal for VCS due to the fact that even though you might still have the same image, the program sees a 90 percent change and stores useless data.

Community
  • 1
  • 1
Devin M
  • 9,636
  • 2
  • 33
  • 46
0

The first question that comes to my mind is: will the image size increase in the future? (or will my image change in a sensible way?) If no you could just track the colour of the pixels.

If the image is going to change its size you should think to create a more complex scenario that behaves differently.

Searching on the internet I've also found this library: it could be useful to manipulate images and/or get information from them.

as-cii
  • 12,819
  • 4
  • 41
  • 43