Re: Calculating actual Ink amounts from CMYK pipeline

Walker Blackwell <[email protected]> Mon, 1 Jul 2024 15:00:49 -0400
Newsgroups gmane.linux.printing.gimp-print.devel
Message-ID <[email protected]>
I can follow 60% of this . . .

If I were to force it to print the basic CMYK percentages (basically nix all the GCR combo stuff and print 40% black if that is what the pixel has for its K value no matter what)

I see that I can just say output[0] = k;

But I don’t follow the logic of ck * cg.

Maybe ideally I’m simply saying for the color outputs that it’s 1 * cg->color_balance. ?

Would this output a more dumbed down thing?

best
-Walker




> On Jul 1, 2024, at 1:24 PM, Solomon Peachy via Gimp-print-devel <[email protected]> wrote:
> 
> On Mon, Jul 01, 2024 at 11:17:40AM -0400, Walker Blackwell wrote:
>> There is some multiplication of numbers between the CMYK channels that 
>> is happening in the system at some point. Does anyone know what this 
>> multiplication is? If it’s a standard number/thing I can apply it to 
>> my backwards math.
> 
> Coincidentally, I think I ran into what you're looking for last week. 
> Have a look at do_gcr() in src/main/channels.c:
> 
> This is its main loop:
> 
>  for (i = 0; i < cg->width; i++)  // ie repeat for each pixel
>    {
>      unsigned k = output[0];
>      if (k > 0)
> 	{
> 	  int kk = gcr_lookup[k];
> 	  int ck;
> 	  if (kk > k)
> 	    kk = k;
> 	  ck = k - kk;
> 	  output[0] = kk;
> 	  output[1] += ck * cg->cyan_balance;
> 	  output[2] += ck * cg->magenta_balance;
> 	  output[3] += ck * cg->yellow_balance;
> 	  nzx.nzl |= *(unsigned long long *) output;
> 	}
>      output += cg->gcr_channels;
>    }
> 
> 
> 
> - Solomon
> -- 
> Solomon Peachy			      pizza at shaftnet dot org (email&xmpp)
>                                      @pizza:shaftnet dot org   (matrix)
> Dowling Park, FL                      speachy (libera.chat)
> _______________________________________________
> Gimp-print-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gimp-print-devel



_______________________________________________
Gimp-print-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel