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

Re: TortoiseIDiff - Comparison

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2006-09-26 17:44:19 CEST

Hans-Emil Skogh wrote:

> I have been looking a little at the image comparison problem now, and I
> have some more thoughts.
>
> To implement any image comparisons, one needs pixel-access to the
> images. Right now this is only available as a mem-HDC in the
> WM_PAINT-handler, and doing comparisons there is not a particularly good
> idea since a comparison may be a lengthy process.

Agreed. But you can always convert that image into a DiB and then
manipulate it from there.
As a starting point, have a look at the CDib class in
\trunk\src\Utils\MiscUI\Dib.h

> The best way would be if we could create a way to get the raw data from
> the CPicture class. Today that's not possible as I see it. Question:

The CPicture class can be extended. You could create a DiB from a normal
DC. Here are some pointers:
http://groups.google.com/group/microsoft.public.win32.programmer.gdi/browse_frm/thread/c0227ad779269215/02a6008ad41feb5c?lnk=st&q=dib+from+dc&rnum=14#02a6008ad41feb5c
http://groups.google.com/group/comp.os.ms-windows.programmer.graphics/browse_frm/thread/15d8d9a7a173022d/0c0277716e043045?lnk=st&q=dib+from+dc&rnum=16#0c0277716e043045

> What format should we use? If we change to DevIL (ditching GDI+
> altogether), it will provide the necessary methods for raw access. Is
> that the way to go?
>
> Stefan, what do you say? Am I missing some obvious way to get to the
> data nicely?

After looking closer at DevIL, I found that it's actually not that small
either. It still needs a lot of other libraries (libpng, zlib, ...) to
handle other image types. I really don't like that idea.

So I'd like to keep TortoiseIDiff small and use only what's already
installed on the system.

Stefan

-- 
        ___
   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 Tue Sep 26 17:44:26 2006

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.