Hi,

 >  I suppose I was thinking of a "Null transform" that wouldn't do
> anything other than send it back in a suitable format. I'm very New
> to this so I hope this isn't a stupid question.

Ah, now I understand. You need a way to ignore the color management and
only use the formatting capabilities. No, no stupid question. There is a flag for
doing that:

cmsFLAGS_NULLTRANSFORM.

You almost guessed it :-) With this flag you can specify NIL on profiles,
they will be ignored.

Your code seems fine. And wait... I can remember a mistake in 1.09, where
type TYPE_ARGB_8 was not declared in Delphi unit. Just try the 1.10, this
should solve all problems.

Regarding slow.... well, color management is slow at all, but if you only need
format translation, cmsFLAGS_NULLTRANSFORM will speed up a lot
things.

Best regards,
Marti.





----- Original Message -----
From: Jon Hopkins
To: '[EMAIL PROTECTED]'
Sent: Friday, February 28, 2003 12:58 PM
Subject: FW: [Lcms-user] Null values for input or output profiles and ARGB



            I suppose I was thinking of a "Null transform" that wouldn't do anything 
other than send it back in a suitable format.
I'm very
            New to this so I hope this isn't a stupid question.

            As for ARGB, I have written software with the new library, and I still 
can't get it to work, but if I convert to BGR_8
(windows native?) first and
Use that and convert back to ARGB it's fine but slow. I've been using the demo as a 
reference viewer to compare the results. This
is the code I've been using

          hSrc := cmsOpenProfileFromFile(PChar(SourceFile), 'r');
          hDest:= cmsOpenProfileFromFile(PChar(DestFile), 'r');          // $40099 for 
ARGB ??? $44099 40499 42099 ?

          xform := cmsCreateTransform(hSrc, TYPE_ARGB_8, hDest, TYPE_ARGB_8,
                                           INTENT_PERCEPTUAL, dwFlags);

          PicW := Image1.Width;
          PicH := Image1.Height;

          for i:= 0 TO (PicH -1) do
          begin
               cmsDoTransform(xform,
                              Image1.Scanline[i],
                              Image1.Scanline[i],
                              PicW);
         end;


            Where Image1 is a Tbitmap32. This is roughly the code I was using since 
the current version has the 2 conversion
pieces in it.
            I'm using the same src and dst scanline pointers as the src and dest pixel 
formats are the same as mentioned in the
documentation.

            Thanks,

            Jon




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to