shithub: libicc

Download patch

ref: 4514f7351d135f29d3f322c1512cf348c656a022
parent: 6727b8912f34a00c4a8a83b0795f9bbf96c06fe9
author: sirjofri <sirjofri@sirjofri.de>
date: Mon Apr 6 17:52:26 EDT 2026

adds readme

--- /dev/null
+++ b/README
@@ -1,0 +1,10 @@
+(Experimental) ICC color profiles library
+
+The interface is described in icc.h
+
+What works:
+
+- Load an ICC color profile from a file: iccload(fd);
+- Access metadata
+- Finding tags and accessing tag data
+- Reading MultiLocalizedUnicodeType tag data
--- a/icc.h
+++ b/icc.h
@@ -116,6 +116,7 @@
 };
 
 ICCprofile *iccload(int fd);
+void iccfree(ICCprofile*);
 char *iccgetclass(ICCprofile*);
 char *iccgetdataspace(ICCprofile*);
 char *iccgetpcs(ICCprofile*);
--- a/load.c
+++ b/load.c
@@ -266,6 +266,14 @@
 	return prof;
 }
 
+void
+iccfree(ICCprofile *prof)
+{
+	free(prof->tagdata);
+	free(prof->tags);
+	free(prof);
+}
+
 ICCTagPtr
 iccfindtag(ICCprofile *prof, u32int signature)
 {
@@ -304,5 +312,6 @@
 s15f16
 dtos15f16(double in)
 {
+	fprint(2, "not implemented yet!\n");
 	return 0;
 }
--