123 #include "allheaders.h" 125 static const l_int32 INITIAL_PTR_ARRAYSIZE = 20;
156 PROCNAME(
"fpixCreate");
159 return (
FPIX *)ERROR_PTR(
"width must be > 0", procName, NULL);
161 return (
FPIX *)ERROR_PTR(
"height must be > 0", procName, NULL);
164 bignum = 4L * width * height;
165 if (bignum > ((1LL << 31) - 1)) {
166 L_ERROR(
"requested w = %d, h = %d\n", procName, width, height);
167 return (
FPIX *)ERROR_PTR(
"requested bytes >= 2^31", procName, NULL);
170 if ((fpixd = (
FPIX *)LEPT_CALLOC(1,
sizeof(
FPIX))) == NULL)
171 return (
FPIX *)ERROR_PTR(
"LEPT_CALLOC fail for fpixd", procName, NULL);
176 data = (l_float32 *)LEPT_CALLOC(width * height,
sizeof(l_float32));
179 return (
FPIX *)ERROR_PTR(
"LEPT_CALLOC fail for data", procName, NULL);
206 PROCNAME(
"fpixCreateTemplate");
209 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, NULL);
232 PROCNAME(
"fpixClone");
235 return (
FPIX *)ERROR_PTR(
"fpix not defined", procName, NULL);
277 l_float32 *datas, *datad;
279 PROCNAME(
"fpixCopy");
282 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, NULL);
293 return (
FPIX *)ERROR_PTR(
"fpixd not made", procName, NULL);
296 memcpy((
char *)datad, (
char *)datas, bytes);
307 memcpy((
char*)datad, (
char*)datas, bytes);
330 l_int32 ws, hs, wd, hd, bytes;
333 PROCNAME(
"fpixResizeImageData");
336 return ERROR_INT(
"fpixs not defined", procName, 1);
338 return ERROR_INT(
"fpixd not defined", procName, 1);
342 if (ws == wd && hs == hd)
349 if (data) LEPT_FREE(data);
350 if ((data = (l_float32 *)LEPT_MALLOC(bytes)) == NULL)
351 return ERROR_INT(
"LEPT_MALLOC fail for data", procName, 1);
375 PROCNAME(
"fpixDestroy");
378 L_WARNING(
"ptr address is null!\n", procName);
382 if ((fpix = *pfpix) == NULL)
413 PROCNAME(
"fpixGetDimensions");
416 return ERROR_INT(
"no return val requested", procName, 1);
420 return ERROR_INT(
"fpix not defined", procName, 1);
421 if (pw) *pw = fpix->
w;
422 if (ph) *ph = fpix->
h;
439 PROCNAME(
"fpixSetDimensions");
442 return ERROR_INT(
"fpix not defined", procName, 1);
458 PROCNAME(
"fpixGetWpl");
461 return ERROR_INT(
"fpix not defined", procName, UNDEF);
477 PROCNAME(
"fpixSetWpl");
480 return ERROR_INT(
"fpix not defined", procName, 1);
496 PROCNAME(
"fpixGetRefcount");
499 return ERROR_INT(
"fpix not defined", procName, UNDEF);
515 PROCNAME(
"fpixChangeRefcount");
518 return ERROR_INT(
"fpix not defined", procName, 1);
537 PROCNAME(
"fpixGetResolution");
540 return ERROR_INT(
"fpix not defined", procName, 1);
541 if (pxres) *pxres = fpix->
xres;
542 if (pyres) *pyres = fpix->
yres;
559 PROCNAME(
"fpixSetResolution");
562 return ERROR_INT(
"fpix not defined", procName, 1);
581 PROCNAME(
"fpixCopyResolution");
583 if (!fpixs || !fpixd)
584 return ERROR_INT(
"fpixs and fpixd not both defined", procName, 1);
601 PROCNAME(
"fpixGetData");
604 return (l_float32 *)ERROR_PTR(
"fpix not defined", procName, NULL);
620 PROCNAME(
"fpixSetData");
623 return ERROR_INT(
"fpix not defined", procName, 1);
646 PROCNAME(
"fpixGetPixel");
649 return ERROR_INT(
"pval not defined", procName, 1);
652 return ERROR_INT(
"fpix not defined", procName, 1);
656 return ERROR_INT(
"x out of bounds", procName, 1);
658 return ERROR_INT(
"y out of bounds", procName, 1);
660 *pval = *(fpix->
data + y * w + x);
681 PROCNAME(
"fpixSetPixel");
684 return ERROR_INT(
"fpix not defined", procName, 1);
688 return ERROR_INT(
"x out of bounds", procName, 1);
690 return ERROR_INT(
"y out of bounds", procName, 1);
692 *(fpix->
data + y * w + x) = val;
711 PROCNAME(
"fpixaCreate");
714 n = INITIAL_PTR_ARRAYSIZE;
716 if ((fpixa = (
FPIXA *)LEPT_CALLOC(1,
sizeof(
FPIXA))) == NULL)
717 return (
FPIXA *)ERROR_PTR(
"fpixa not made", procName, NULL);
722 if ((fpixa->
fpix = (
FPIX **)LEPT_CALLOC(n,
sizeof(
FPIX *))) == NULL) {
724 return (
FPIXA *)ERROR_PTR(
"fpixa ptrs not made", procName, NULL);
754 PROCNAME(
"fpixaCopy");
757 return (
FPIXA *)ERROR_PTR(
"fpixa not defined", procName, NULL);
765 return (
FPIXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
768 return (
FPIXA *)ERROR_PTR(
"fpixac not made", procName, NULL);
769 for (i = 0; i < fpixa->
n; i++) {
799 PROCNAME(
"fpixaDestroy");
801 if (pfpixa == NULL) {
802 L_WARNING(
"ptr address is NULL!\n", procName);
806 if ((fpixa = *pfpixa) == NULL)
812 for (i = 0; i < fpixa->
n; i++)
814 LEPT_FREE(fpixa->
fpix);
842 PROCNAME(
"fpixaAddFPix");
845 return ERROR_INT(
"fpixa not defined", procName, 1);
847 return ERROR_INT(
"fpix not defined", procName, 1);
851 else if (copyflag ==
L_COPY)
856 return ERROR_INT(
"invalid copyflag", procName, 1);
858 return ERROR_INT(
"fpixc not made", procName, 1);
863 fpixa->
fpix[n] = fpixc;
884 PROCNAME(
"fpixaExtendArray");
887 return ERROR_INT(
"fpixa not defined", procName, 1);
909 PROCNAME(
"fpixaExtendArrayToSize");
912 return ERROR_INT(
"fpixa not defined", procName, 1);
914 if (size > fpixa->
nalloc) {
917 size *
sizeof(
FPIX *))) == NULL)
918 return ERROR_INT(
"new ptr array not returned", procName, 1);
937 PROCNAME(
"fpixaGetCount");
940 return ERROR_INT(
"fpixa not defined", procName, 0);
957 PROCNAME(
"fpixaChangeRefcount");
960 return ERROR_INT(
"fpixa not defined", procName, 1);
980 PROCNAME(
"fpixaGetFPix");
983 return (
FPIX *)ERROR_PTR(
"fpixa not defined", procName, NULL);
984 if (index < 0 || index >= fpixa->
n)
985 return (
FPIX *)ERROR_PTR(
"index not valid", procName, NULL);
989 else if (accesstype ==
L_CLONE)
992 return (
FPIX *)ERROR_PTR(
"invalid accesstype", procName, NULL);
1012 PROCNAME(
"fpixaGetFPixDimensions");
1015 return ERROR_INT(
"no return val requested", procName, 1);
1019 return ERROR_INT(
"fpixa not defined", procName, 1);
1020 if (index < 0 || index >= fpixa->
n)
1021 return ERROR_INT(
"index not valid", procName, 1);
1024 return ERROR_INT(
"fpix not found!", procName, 1);
1046 PROCNAME(
"fpixaGetData");
1049 return (l_float32 *)ERROR_PTR(
"fpixa not defined", procName, NULL);
1051 if (index < 0 || index >= n)
1052 return (l_float32 *)ERROR_PTR(
"invalid index", procName, NULL);
1080 PROCNAME(
"fpixaGetPixel");
1083 return ERROR_INT(
"pval not defined", procName, 1);
1086 return ERROR_INT(
"fpixa not defined", procName, 1);
1088 if (index < 0 || index >= n)
1089 return ERROR_INT(
"invalid index into fpixa", procName, 1);
1117 PROCNAME(
"fpixaSetPixel");
1120 return ERROR_INT(
"fpixa not defined", procName, 1);
1122 if (index < 0 || index >= n)
1123 return ERROR_INT(
"invalid index into fpixa", procName, 1);
1156 PROCNAME(
"dpixCreate");
1159 return (
DPIX *)ERROR_PTR(
"width must be > 0", procName, NULL);
1161 return (
DPIX *)ERROR_PTR(
"height must be > 0", procName, NULL);
1164 bignum = 8L * width * height;
1165 if (bignum > ((1LL << 31) - 1)) {
1166 L_ERROR(
"requested w = %d, h = %d\n", procName, width, height);
1167 return (
DPIX *)ERROR_PTR(
"requested bytes >= 2^31", procName, NULL);
1170 if ((dpix = (
DPIX *)LEPT_CALLOC(1,
sizeof(
DPIX))) == NULL)
1171 return (
DPIX *)ERROR_PTR(
"LEPT_CALLOC fail for dpix", procName, NULL);
1176 data = (l_float64 *)LEPT_CALLOC(width * height,
sizeof(l_float64));
1179 return (
DPIX *)ERROR_PTR(
"LEPT_CALLOC fail for data", procName, NULL);
1206 PROCNAME(
"dpixCreateTemplate");
1209 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, NULL);
1232 PROCNAME(
"dpixClone");
1235 return (
DPIX *)ERROR_PTR(
"dpix not defined", procName, NULL);
1276 l_int32 w, h, bytes;
1277 l_float64 *datas, *datad;
1279 PROCNAME(
"dpixCopy");
1282 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, NULL);
1293 return (
DPIX *)ERROR_PTR(
"dpixd not made", procName, NULL);
1296 memcpy((
char *)datad, (
char *)datas, bytes);
1307 memcpy((
char*)datad, (
char*)datas, bytes);
1322 l_int32 ws, hs, wd, hd, bytes;
1325 PROCNAME(
"dpixResizeImageData");
1328 return ERROR_INT(
"dpixs not defined", procName, 1);
1330 return ERROR_INT(
"dpixd not defined", procName, 1);
1334 if (ws == wd && hs == hd)
1339 bytes = 8 * ws * hs;
1341 if (data) LEPT_FREE(data);
1342 if ((data = (l_float64 *)LEPT_MALLOC(bytes)) == NULL)
1343 return ERROR_INT(
"LEPT_MALLOC fail for data", procName, 1);
1367 PROCNAME(
"dpixDestroy");
1370 L_WARNING(
"ptr address is null!\n", procName);
1374 if ((dpix = *pdpix) == NULL)
1405 PROCNAME(
"dpixGetDimensions");
1408 return ERROR_INT(
"no return val requested", procName, 1);
1412 return ERROR_INT(
"dpix not defined", procName, 1);
1413 if (pw) *pw = dpix->
w;
1414 if (ph) *ph = dpix->
h;
1431 PROCNAME(
"dpixSetDimensions");
1434 return ERROR_INT(
"dpix not defined", procName, 1);
1450 PROCNAME(
"dpixGetWpl");
1453 return ERROR_INT(
"dpix not defined", procName, 1);
1469 PROCNAME(
"dpixSetWpl");
1472 return ERROR_INT(
"dpix not defined", procName, 1);
1488 PROCNAME(
"dpixGetRefcount");
1491 return ERROR_INT(
"dpix not defined", procName, UNDEF);
1507 PROCNAME(
"dpixChangeRefcount");
1510 return ERROR_INT(
"dpix not defined", procName, 1);
1529 PROCNAME(
"dpixGetResolution");
1532 return ERROR_INT(
"dpix not defined", procName, 1);
1533 if (pxres) *pxres = dpix->
xres;
1534 if (pyres) *pyres = dpix->
yres;
1551 PROCNAME(
"dpixSetResolution");
1554 return ERROR_INT(
"dpix not defined", procName, 1);
1573 PROCNAME(
"dpixCopyResolution");
1575 if (!dpixs || !dpixd)
1576 return ERROR_INT(
"dpixs and dpixd not both defined", procName, 1);
1593 PROCNAME(
"dpixGetData");
1596 return (l_float64 *)ERROR_PTR(
"dpix not defined", procName, NULL);
1612 PROCNAME(
"dpixSetData");
1615 return ERROR_INT(
"dpix not defined", procName, 1);
1638 PROCNAME(
"dpixGetPixel");
1641 return ERROR_INT(
"pval not defined", procName, 1);
1644 return ERROR_INT(
"dpix not defined", procName, 1);
1647 if (x < 0 || x >= w)
1648 return ERROR_INT(
"x out of bounds", procName, 1);
1649 if (y < 0 || y >= h)
1650 return ERROR_INT(
"y out of bounds", procName, 1);
1652 *pval = *(dpix->
data + y * w + x);
1673 PROCNAME(
"dpixSetPixel");
1676 return ERROR_INT(
"dpix not defined", procName, 1);
1679 if (x < 0 || x >= w)
1680 return ERROR_INT(
"x out of bounds", procName, 1);
1681 if (y < 0 || y >= h)
1682 return ERROR_INT(
"y out of bounds", procName, 1);
1684 *(dpix->
data + y * w + x) = val;
1704 PROCNAME(
"fpixRead");
1707 return (
FPIX *)ERROR_PTR(
"filename not defined", procName, NULL);
1710 return (
FPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
1714 return (
FPIX *)ERROR_PTR(
"fpix not read", procName, NULL);
1729 l_int32 w, h, nbytes, xres, yres, version;
1733 PROCNAME(
"fpixReadStream");
1736 return (
FPIX *)ERROR_PTR(
"stream not defined", procName, NULL);
1738 if (fscanf(fp,
"\nFPix Version %d\n", &version) != 1)
1739 return (
FPIX *)ERROR_PTR(
"not a fpix file", procName, NULL);
1741 return (
FPIX *)ERROR_PTR(
"invalid fpix version", procName, NULL);
1742 if (fscanf(fp,
"w = %d, h = %d, nbytes = %d\n", &w, &h, &nbytes) != 3)
1743 return (
FPIX *)ERROR_PTR(
"read fail for data size", procName, NULL);
1750 if (fgets(buf,
sizeof(buf), fp) == NULL)
1751 return (
FPIX *)ERROR_PTR(
"fgets read fail", procName, NULL);
1752 if (sscanf(buf,
"xres = %d, yres = %d\n", &xres, &yres) != 2)
1753 return (
FPIX *)ERROR_PTR(
"read fail for xres, yres", procName, NULL);
1756 return (
FPIX *)ERROR_PTR(
"fpix not made", procName, NULL);
1759 if (fread(data, 1, nbytes, fp) != nbytes) {
1761 return (
FPIX *)ERROR_PTR(
"read error for nbytes", procName, NULL);
1785 PROCNAME(
"fpixReadMem");
1788 return (
FPIX *)ERROR_PTR(
"data not defined", procName, NULL);
1790 return (
FPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
1794 if (!fpix) L_ERROR(
"fpix not read\n", procName);
1813 PROCNAME(
"fpixWrite");
1816 return ERROR_INT(
"filename not defined", procName, 1);
1818 return ERROR_INT(
"fpix not defined", procName, 1);
1821 return ERROR_INT(
"stream not opened", procName, 1);
1825 return ERROR_INT(
"fpix not written to stream", procName, 1);
1841 l_int32 w, h, nbytes, xres, yres;
1845 PROCNAME(
"fpixWriteStream");
1848 return ERROR_INT(
"stream not defined", procName, 1);
1850 return ERROR_INT(
"fpix not defined", procName, 1);
1857 nbytes = w * h *
sizeof(l_float32);
1860 fprintf(fp,
"w = %d, h = %d, nbytes = %d\n", w, h, nbytes);
1861 fprintf(fp,
"xres = %d, yres = %d\n", xres, yres);
1862 fwrite(data, 1, nbytes, fp);
1891 PROCNAME(
"fpixWriteMem");
1893 if (pdata) *pdata = NULL;
1894 if (psize) *psize = 0;
1896 return ERROR_INT(
"&data not defined", procName, 1);
1898 return ERROR_INT(
"&size not defined", procName, 1);
1900 return ERROR_INT(
"fpix not defined", procName, 1);
1903 if ((fp = open_memstream((
char **)pdata, psize)) == NULL)
1904 return ERROR_INT(
"stream not opened", procName, 1);
1907 L_INFO(
"work-around: writing to a temp file\n", procName);
1910 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
1912 if ((fp = tmpfile()) == NULL)
1913 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
1947 PROCNAME(
"fpixEndianByteSwap");
1950 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, fpixd);
1951 if (fpixd && (fpixs != fpixd))
1952 return (
FPIX *)ERROR_PTR(
"fpixd != fpixs", procName, fpixd);
1964 for (i = 0; i < h; i++) {
1965 for (j = 0; j < w; j++, data++) {
1967 *data = (word >> 24) |
1968 ((word >> 8) & 0x0000ff00) |
1969 ((word << 8) & 0x00ff0000) |
2001 PROCNAME(
"dpixRead");
2004 return (
DPIX *)ERROR_PTR(
"filename not defined", procName, NULL);
2007 return (
DPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
2011 return (
DPIX *)ERROR_PTR(
"dpix not read", procName, NULL);
2026 l_int32 w, h, nbytes, version, xres, yres;
2030 PROCNAME(
"dpixReadStream");
2033 return (
DPIX *)ERROR_PTR(
"stream not defined", procName, NULL);
2035 if (fscanf(fp,
"\nDPix Version %d\n", &version) != 1)
2036 return (
DPIX *)ERROR_PTR(
"not a dpix file", procName, NULL);
2038 return (
DPIX *)ERROR_PTR(
"invalid dpix version", procName, NULL);
2039 if (fscanf(fp,
"w = %d, h = %d, nbytes = %d\n", &w, &h, &nbytes) != 3)
2040 return (
DPIX *)ERROR_PTR(
"read fail for data size", procName, NULL);
2047 if (fgets(buf,
sizeof(buf), fp) == NULL)
2048 return (
DPIX *)ERROR_PTR(
"fgets read fail", procName, NULL);
2049 if (sscanf(buf,
"xres = %d, yres = %d\n", &xres, &yres) != 2)
2050 return (
DPIX *)ERROR_PTR(
"read fail for xres, yres", procName, NULL);
2053 return (
DPIX *)ERROR_PTR(
"dpix not made", procName, NULL);
2056 if (fread(data, 1, nbytes, fp) != nbytes) {
2058 return (
DPIX *)ERROR_PTR(
"read error for nbytes", procName, NULL);
2082 PROCNAME(
"dpixReadMem");
2085 return (
DPIX *)ERROR_PTR(
"data not defined", procName, NULL);
2087 return (
DPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
2091 if (!dpix) L_ERROR(
"dpix not read\n", procName);
2110 PROCNAME(
"dpixWrite");
2113 return ERROR_INT(
"filename not defined", procName, 1);
2115 return ERROR_INT(
"dpix not defined", procName, 1);
2118 return ERROR_INT(
"stream not opened", procName, 1);
2122 return ERROR_INT(
"dpix not written to stream", procName, 1);
2138 l_int32 w, h, nbytes, xres, yres;
2142 PROCNAME(
"dpixWriteStream");
2145 return ERROR_INT(
"stream not defined", procName, 1);
2147 return ERROR_INT(
"dpix not defined", procName, 1);
2155 nbytes = w * h *
sizeof(l_float64);
2157 fprintf(fp,
"w = %d, h = %d, nbytes = %d\n", w, h, nbytes);
2158 fprintf(fp,
"xres = %d, yres = %d\n", xres, yres);
2159 fwrite(data, 1, nbytes, fp);
2188 PROCNAME(
"dpixWriteMem");
2190 if (pdata) *pdata = NULL;
2191 if (psize) *psize = 0;
2193 return ERROR_INT(
"&data not defined", procName, 1);
2195 return ERROR_INT(
"&size not defined", procName, 1);
2197 return ERROR_INT(
"dpix not defined", procName, 1);
2200 if ((fp = open_memstream((
char **)pdata, psize)) == NULL)
2201 return ERROR_INT(
"stream not opened", procName, 1);
2204 L_INFO(
"work-around: writing to a temp file\n", procName);
2207 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
2209 if ((fp = tmpfile()) == NULL)
2210 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
2244 PROCNAME(
"dpixEndianByteSwap");
2247 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, dpixd);
2248 if (dpixd && (dpixs != dpixd))
2249 return (
DPIX *)ERROR_PTR(
"dpixd != dpixs", procName, dpixd);
2261 for (i = 0; i < h; i++) {
2262 for (j = 0; j < 2 * w; j++, data++) {
2264 *data = (word >> 24) |
2265 ((word >> 8) & 0x0000ff00) |
2266 ((word << 8) & 0x00ff0000) |
2304 l_int32 i, j, w, h, count;
2307 PROCNAME(
"fpixPrintStream");
2310 return ERROR_INT(
"stream not defined", procName, 1);
2312 return ERROR_INT(
"fpix not defined", procName, 1);
2314 return ERROR_INT(
"sampling factor < 1f", procName, 1);
2317 fprintf(fp,
"\nFPix: w = %d, h = %d\n", w, h);
2318 for (i = 0; i < h; i += factor) {
2319 for (count = 0, j = 0; j < w; j += factor, count++) {
2321 fprintf(fp,
"val[%d, %d] = %f ", i, j, val);
2322 if ((count + 1) % 3 == 0) fprintf(fp,
"\n");
2324 if (count % 3) fprintf(fp,
"\n");
l_int32 fpixaChangeRefcount(FPIXA *fpixa, l_int32 delta)
fpixaChangeRefcount()
DPIX * dpixClone(DPIX *dpix)
dpixClone()
FPIXA * fpixaCopy(FPIXA *fpixa, l_int32 copyflag)
fpixaCopy()
void dpixDestroy(DPIX **pdpix)
dpixDestroy()
DPIX * dpixCreate(l_int32 width, l_int32 height)
dpixCreate()
l_int32 dpixCopyResolution(DPIX *dpixd, DPIX *dpixs)
dpixCopyResolution()
l_int32 dpixWrite(const char *filename, DPIX *dpix)
dpixWrite()
l_int32 fpixaGetCount(FPIXA *fpixa)
fpixaGetCount()
l_float64 * dpixGetData(DPIX *dpix)
dpixGetData()
l_int32 fpixResizeImageData(FPIX *fpixd, FPIX *fpixs)
fpixResizeImageData()
l_int32 dpixGetWpl(DPIX *dpix)
dpixGetWpl()
l_int32 fpixWrite(const char *filename, FPIX *fpix)
fpixWrite()
l_int32 fpixSetDimensions(FPIX *fpix, l_int32 w, l_int32 h)
fpixSetDimensions()
l_int32 dpixSetResolution(DPIX *dpix, l_int32 xres, l_int32 yres)
dpixSetResolution()
l_int32 dpixChangeRefcount(DPIX *dpix, l_int32 delta)
dpixChangeRefcount()
DPIX * dpixRead(const char *filename)
dpixRead()
FILE * fopenReadFromMemory(const l_uint8 *data, size_t size)
fopenReadFromMemory()
FPIX * fpixEndianByteSwap(FPIX *fpixd, FPIX *fpixs)
fpixEndianByteSwap()
FPIXA * fpixaCreate(l_int32 n)
fpixaCreate()
void fpixaDestroy(FPIXA **pfpixa)
fpixaDestroy()
DPIX * dpixCopy(DPIX *dpixd, DPIX *dpixs)
dpixCopy()
void * reallocNew(void **pindata, l_int32 oldsize, l_int32 newsize)
reallocNew()
DPIX * dpixCreateTemplate(DPIX *dpixs)
dpixCreateTemplate()
l_int32 fpixaGetFPixDimensions(FPIXA *fpixa, l_int32 index, l_int32 *pw, l_int32 *ph)
fpixaGetFPixDimensions()
l_int32 fpixSetWpl(FPIX *fpix, l_int32 wpl)
fpixSetWpl()
l_int32 fpixGetPixel(FPIX *fpix, l_int32 x, l_int32 y, l_float32 *pval)
fpixGetPixel()
l_int32 fpixSetResolution(FPIX *fpix, l_int32 xres, l_int32 yres)
fpixSetResolution()
l_int32 dpixGetDimensions(DPIX *dpix, l_int32 *pw, l_int32 *ph)
dpixGetDimensions()
static const l_int32 L_INSERT
FPIX * fpixReadMem(const l_uint8 *data, size_t size)
fpixReadMem()
DPIX * dpixEndianByteSwap(DPIX *dpixd, DPIX *dpixs)
dpixEndianByteSwap()
l_int32 fpixSetData(FPIX *fpix, l_float32 *data)
fpixSetData()
l_int32 fpixaAddFPix(FPIXA *fpixa, FPIX *fpix, l_int32 copyflag)
fpixaAddFPix()
l_int32 dpixSetPixel(DPIX *dpix, l_int32 x, l_int32 y, l_float64 val)
dpixSetPixel()
FILE * fopenWriteWinTempfile()
fopenWriteWinTempfile()
l_int32 fpixGetWpl(FPIX *fpix)
fpixGetWpl()
FPIX * fpixClone(FPIX *fpix)
fpixClone()
l_float32 * fpixaGetData(FPIXA *fpixa, l_int32 index)
fpixaGetData()
l_int32 fpixWriteStream(FILE *fp, FPIX *fpix)
fpixWriteStream()
DPIX * dpixReadMem(const l_uint8 *data, size_t size)
dpixReadMem()
l_int32 fpixWriteMem(l_uint8 **pdata, size_t *psize, FPIX *fpix)
fpixWriteMem()
l_float32 * fpixGetData(FPIX *fpix)
fpixGetData()
l_int32 fpixaSetPixel(FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 val)
fpixaSetPixel()
l_int32 dpixGetResolution(DPIX *dpix, l_int32 *pxres, l_int32 *pyres)
dpixGetResolution()
FILE * fopenWriteStream(const char *filename, const char *modestring)
fopenWriteStream()
l_int32 fpixCopyResolution(FPIX *fpixd, FPIX *fpixs)
fpixCopyResolution()
l_int32 dpixSetWpl(DPIX *dpix, l_int32 wpl)
dpixSetWpl()
l_int32 fpixGetDimensions(FPIX *fpix, l_int32 *pw, l_int32 *ph)
fpixGetDimensions()
FILE * fopenReadStream(const char *filename)
fopenReadStream()
l_uint8 * l_binaryReadStream(FILE *fp, size_t *pnbytes)
l_binaryReadStream()
l_int32 fpixGetResolution(FPIX *fpix, l_int32 *pxres, l_int32 *pyres)
fpixGetResolution()
FPIX * fpixCreateTemplate(FPIX *fpixs)
fpixCreateTemplate()
FPIX * fpixCreate(l_int32 width, l_int32 height)
fpixCreate()
l_int32 fpixaGetPixel(FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 *pval)
fpixaGetPixel()
l_int32 fpixChangeRefcount(FPIX *fpix, l_int32 delta)
fpixChangeRefcount()
static l_int32 fpixaExtendArrayToSize(FPIXA *fpixa, l_int32 size)
fpixaExtendArrayToSize()
l_int32 dpixSetDimensions(DPIX *dpix, l_int32 w, l_int32 h)
dpixSetDimensions()
l_int32 dpixWriteMem(l_uint8 **pdata, size_t *psize, DPIX *dpix)
dpixWriteMem()
#define DPIX_VERSION_NUMBER
l_int32 dpixSetData(DPIX *dpix, l_float64 *data)
dpixSetData()
l_int32 dpixResizeImageData(DPIX *dpixd, DPIX *dpixs)
dpixResizeImageData()
FPIX * fpixCopy(FPIX *fpixd, FPIX *fpixs)
fpixCopy()
FPIX * fpixRead(const char *filename)
fpixRead()
l_int32 fpixSetPixel(FPIX *fpix, l_int32 x, l_int32 y, l_float32 val)
fpixSetPixel()
FPIX * fpixReadStream(FILE *fp)
fpixReadStream()
l_int32 fpixPrintStream(FILE *fp, FPIX *fpix, l_int32 factor)
fpixPrintStream()
l_int32 dpixGetPixel(DPIX *dpix, l_int32 x, l_int32 y, l_float64 *pval)
dpixGetPixel()
static l_int32 fpixaExtendArray(FPIXA *fpixa)
fpixaExtendArray()
void fpixDestroy(FPIX **pfpix)
fpixDestroy()
l_int32 fpixGetRefcount(FPIX *fpix)
fpixGetRefcount()
l_int32 dpixGetRefcount(DPIX *dpix)
dpixGetRefcount()
FPIX * fpixaGetFPix(FPIXA *fpixa, l_int32 index, l_int32 accesstype)
fpixaGetFPix()
DPIX * dpixReadStream(FILE *fp)
dpixReadStream()
#define FPIX_VERSION_NUMBER
l_int32 dpixWriteStream(FILE *fp, DPIX *dpix)
dpixWriteStream()