Board index » delphi » Extract ICC profiles from TIFF and JPEG files

Extract ICC profiles from TIFF and JPEG files


2003-08-10 07:44:58 PM
delphi238
Hi,
quite long I have been searching the web for some hints or solutions on
how to extract embedded ICC profiles from TIFF and/or JPEG images
using Delphi (or some command line tools in worst case). But by now
I've found nothing useful. I found a lot on how to convert images
according to specific profiles, but the first step ist missing: how to
*get* the profile itself - or at least to determine, whether there is
a profile embedded in the file or not. I hope there is someone willing
an able to help !
Thanks in advance,
Peter
 
 

Re:Extract ICC profiles from TIFF and JPEG files

Quote
well, I assume you know something about the format of TIFF and JPEG else I
wouldn't know where to start...
Well, a bit, but not enough to implement your code right now ...
However, I had a look on the source of a different tool doing some
stuff with an embedded profile, and so I was able to find an easy
solution: you just have to look for the string "acsp" in the file,
which is the identification-String of an ICC-profile. After that, you
just have to find the size of the profile in its header and then have
to copy a block of that size in an extra file. that is all. At least it
worked out in several tests.
Quote

and btw: PNG, JPEG2000 and even BMP files may also contain
embedded ICC profiles.
I only tested JPEG, TIFF and PSD, but I guess my approach should work
even with PNG, JPEG2000 and BMP, as the profile-identifier should'nt
change.
But thanks a lot for your ideas and code, if I run into trouble with
my approach I will give yours a try.
Thanks,
Peter