RE: Re: TortoiseIDiff suggestions
From: Will Wilson <willw_at_fireflyworlds.com>
Date: 2006-10-03 01:26:11 CEST
Sorry for the late response to this...
> How about using a factory pattern here for every image type?
I'd been thinking on this subject for the last few days when I remembered something I'd seen in the FreeImage documentation - FreeImage is itself based on a plugin architecture. Why not just make use of that?
I've had a brief look at the FreeImage documentation & it all seems pretty straightforward. Obviously such a usage necessitates having the FreeImage.dll around to support any external plugins, but that's a fairly minor requirement if you ask me - especially if we keep the DLL optional (as we have in the current implementation).
FreeImage also supports multiple images within the same file, as supported by icons, TIFF, DDS (cubemaps), GIF & MNG. It wouldn't be a bad idea to expose this functionality, probably just by following the lead set by the current implementation for supporting icons.
There's also nice bit of example code in the FreeImage documentation detailing a way of enumerating all supported image types and creating relevant file dialog filter strings. This could certainly be useful for the open file dialog.
Also, I was wondering if there might be a smart way to avoid manually assigning all of the supported image types to TortoiseIDiff. What about supporting a special filter "pipeline" for the diff programs? For example:
"Somefile.ext" -> File extension filter -> Diff Program A -> Diff Program B
In this model, if no exact match were found for its file extension, the file(s) to be diffed would be passed from program to program until one returned a success code. This would allow many formats to be supported without entailing any administration overhead to the user.
Thoughts?
Cheers,
|
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.