On Mon, 12 Nov 2007 10:46:13 +0100, Giacomo Mazzocato  
<[EMAIL PROTECTED]> wrote:

> 2007/11/10, Sven Neumann <[EMAIL PROTECTED]>:
>
>> On Sat, 2007-11-10 at 19:25 +0100, Giacomo Mazzocato wrote:
>>
>> > I've tried to reimplement it in another language
>>
>> I very much hope for you that you are respecting the license that this
>> code has been published under. Your code is GPL, right?
>
>
> Now it's for private use and I if I release it i will be GPL.
> But can you put a license on an algorithm?

Copyright only applies to the code. If you were to translate it line for  
line that may be quesionable unless you GPL it. But if you analyse the  
code to discover the algorithm and reimplement it in your own way in C or  
any other language that should be legitimate.

>
>> and in the function
>> > cdisplay_colorblind_convert with certain colors (for instance  
>> #000000) I
>> get a
>> > warning of division by zero in the section that corresponds to this in
>> the
>> > original code:
>> >  switch (colorblind->deficiency)
>> >           {
>> >           case COLORBLIND_DEFICIENCY_DEUTERANOPIA:
>> >               tmp = blue / red;
>> >               ^^^^^^^^^^
>>
>> Division by zero is handled correctly here. The result will be NaN.
>
>
> I'll do further checking on how Nan is handled as soon as I can lay a  
> hand
> on a C compiler. In particular I wonder if Nan can be less than a normal
> numberic value because the lines that follow in that function depend on
> that.
>

you should be able to find that information at www.gnu.org/software/gcc/  
or many sites offering C tutorial.


>> The most important problem is however that when I try to convert white
>> > (#ffffff) with the filter,I get #dadada for all 3 deficit simulations.
>> >
>> > #dadada is a shade of grey, but if I apply in gimp the filter to an  
>> area
>> which
>> > contains white regions, white remains white.
>>
>> If you have other display filters active, then the colors may be passed
>> through them befor they are displayed. Otherwise, no, there is no
>> further post-processing being done.
>
>
> No other filter is active but I still see white if I convert a white  
> region.
> That's strange. Can you confirm that #ffffff is converted to #dadada ?
>
> Perhaps you should just link with libcolorblind (see
>> http://colorblind.alioth.debian.org/) instead of reimplementing the
>> algorithm...
>
>
> I'll check that library, thanks for the link
> Bye,
> Giacomo


/gg
-- 

   .*.
   /V\
  (/ \)
  (   )
  ^^_^^
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to