[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: TortoiseIDiff "compare" vs. "show difference"

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: 2007-07-20 10:44:50 CEST

On 20/07/07, Lorenz <lorenznl@yahoo.com> wrote:
> Simon Large wrote:
> >On 19/07/07, Stefan Küng <tortoisesvn@gmail.com> wrote:
> >> On 7/19/07, Simon Large <simon.tortoisesvn@googlemail.com> wrote:
> >> > On 19/07/07, Stefan Küng <tortoisesvn@gmail.com> wrote:
> >> > > On 7/19/07, Lorenz <lorenznl@yahoo.com> wrote:
> >> > >
> >> > > > The layout editor (circuit diagrams and board layouts) we are using
> >> > > > (cadsofts EAGLE) has no diff tool of its own, so I'm exporting to bmps
> >> > > > and comparing them.
> >> > >
> >> > > I know that one very well :)
>
> so you suffer from not being able to use svn:keywords too 8-(
>
>
> >> > > > For that purpose it would be nice if TortoiseIDiff could not only show
> >> > > > an overlay of both bmps, but also a difference bmp (numerical,
> >> > > > per-pixel difference).
> >> > > > One then could locate differing section easyly, zoom-in and switch
> >> > > > back to the overlay mode to examine in-detail.
> >> > > >
> >> > > > Any change such thing could be implemented?
> >> > >
> >> > > I'm sorry, but I don't understand what you mean with "difference bmp".
> >> > > Do you maybe mean instead of alpha-blending the two images over one
> >> > > another use maybe XOR (or some other combining algorithm) to 'merge'
> >> > > the images together?
> >> >
> >> > Blending = (pixelA + pixelB) / 2;
> >> >
> >> > Difference = func(pixelA - pixelB);
>
> PixD = (PixA != PixB) ? #FFF : #000

Another possibility is
if (PixA > PixB) PixD = RED;
else if (PixA < PixB) PixD = BLUE;
else PixD = WHITE;

That will show additions and subtractions separately.

> in combination with a toggle button to switch between overlay and diff
> views would be sufficient for locating the differences.
>
> >> > or something like that, so you get plain areas where the content is
> >> > identical, and hotspots where there are differences. Maybe this can be
> >> > done by making one of the images negative and using 50% alpha blend?
> >> >
> >> > That sounds like a useful feature for quickly finding what has changed
> >> > in a graphic file.
> >>
> >> you mean this?
> >> http://issues.tortoisesvn.net/index.php?do=details&task_id=300
> >
> >Well naturally I like my idea better ;-)
> >
> >PCB (gerber) viewers tend to use bright primary colours for the
> >layers, so using a bright colour to indicate change may not be that
> >useful, unless you also reduce the brightness/contrast of the rest of
> >the image at the same time.
> >
> >Another method is to display the absolute difference between pixels.
> >This might work well with a blend slider, as you get pure image at
> >either end of the slide scale, pure difference in the middle, and a
> >mix in between.
>
> Do you mean alpha blending from the first image to the difference in
> the first half of the blend silder scale and from the difference to
> the second image in the second half?

Assuming the blend varies between 0.0 at one end and 1.0 at the other,
I was thinking of something like:

PixD = abs( ((1.0 - Blend) * PixA) - (Blend * PixB) );

Now I think about it I am less convinced of its usefulness between 0.0
and 0.5 and between 0.5 and 1.0

> That would be consistent with the current user interface (but using
> three images instead of two) and would only nead a new "compare"
> button in addition to the already existing "overlay" button .
>
>
> Perhaps we should make it two new modes though,
>
> for locating differences I would prefere:
>
> PixD = (PixA != PixB) ? #FFF : #000
>
> but if someone wants to get an impression about how much two versions
> of an image differ
>
> PixD = abs(PixA - PixB)
>
> is much more significant.

Rather than have a 3rd image, why not just select the image-combining
algorithm to use?
a) normal blend (average)
b) difference
c) highlight changes

But for b) and c) only 0% 50% and 100% blends are useful.

Simon

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Jul 20 10:43:50 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.