127 #include "allheaders.h" 129 static const l_int32 INITIAL_PTR_ARRAYSIZE = 20;
160 PROCNAME(
"fpixCreate");
163 return (
FPIX *)ERROR_PTR(
"width must be > 0", procName, NULL);
165 return (
FPIX *)ERROR_PTR(
"height must be > 0", procName, NULL);
168 npix64 = (l_uint64)width * (l_uint64)height;
169 if (npix64 >= (1LL << 29)) {
170 L_ERROR(
"requested w = %d, h = %d\n", procName, width, height);
171 return (
FPIX *)ERROR_PTR(
"requested bytes >= 2^31", procName, NULL);
174 fpixd = (
FPIX *)LEPT_CALLOC(1,
sizeof(
FPIX));
179 data = (l_float32 *)LEPT_CALLOC((
size_t)width * height,
sizeof(l_float32));
182 return (
FPIX *)ERROR_PTR(
"calloc fail for data", procName, NULL);
208 PROCNAME(
"fpixCreateTemplate");
211 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, NULL);
215 return (
FPIX *)ERROR_PTR(
"fpixd not made", procName, NULL);
235 PROCNAME(
"fpixClone");
238 return (
FPIX *)ERROR_PTR(
"fpix not defined", procName, NULL);
280 l_float32 *datas, *datad;
282 PROCNAME(
"fpixCopy");
285 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, NULL);
296 return (
FPIX *)ERROR_PTR(
"fpixd not made", procName, NULL);
299 memcpy(datad, datas, bytes);
310 memcpy(datad, datas, bytes);
333 l_int32 ws, hs, wd, hd, bytes;
336 PROCNAME(
"fpixResizeImageData");
339 return ERROR_INT(
"fpixs not defined", procName, 1);
341 return ERROR_INT(
"fpixd not defined", procName, 1);
345 if (ws == wd && hs == hd)
352 if (data) LEPT_FREE(data);
353 if ((data = (l_float32 *)LEPT_MALLOC(bytes)) == NULL)
354 return ERROR_INT(
"LEPT_MALLOC fail for data", procName, 1);
378 PROCNAME(
"fpixDestroy");
381 L_WARNING(
"ptr address is null!\n", procName);
385 if ((fpix = *pfpix) == NULL)
416 PROCNAME(
"fpixGetDimensions");
419 return ERROR_INT(
"no return val requested", procName, 1);
423 return ERROR_INT(
"fpix not defined", procName, 1);
424 if (pw) *pw = fpix->
w;
425 if (ph) *ph = fpix->
h;
442 PROCNAME(
"fpixSetDimensions");
445 return ERROR_INT(
"fpix not defined", procName, 1);
461 PROCNAME(
"fpixGetWpl");
464 return ERROR_INT(
"fpix not defined", procName, UNDEF);
480 PROCNAME(
"fpixSetWpl");
483 return ERROR_INT(
"fpix not defined", procName, 1);
499 PROCNAME(
"fpixGetRefcount");
502 return ERROR_INT(
"fpix not defined", procName, UNDEF);
518 PROCNAME(
"fpixChangeRefcount");
521 return ERROR_INT(
"fpix not defined", procName, 1);
540 PROCNAME(
"fpixGetResolution");
543 return ERROR_INT(
"fpix not defined", procName, 1);
544 if (pxres) *pxres = fpix->
xres;
545 if (pyres) *pyres = fpix->
yres;
562 PROCNAME(
"fpixSetResolution");
565 return ERROR_INT(
"fpix not defined", procName, 1);
584 PROCNAME(
"fpixCopyResolution");
586 if (!fpixs || !fpixd)
587 return ERROR_INT(
"fpixs and fpixd not both defined", procName, 1);
604 PROCNAME(
"fpixGetData");
607 return (l_float32 *)ERROR_PTR(
"fpix not defined", procName, NULL);
623 PROCNAME(
"fpixSetData");
626 return ERROR_INT(
"fpix not defined", procName, 1);
653 PROCNAME(
"fpixGetPixel");
656 return ERROR_INT(
"pval not defined", procName, 1);
659 return ERROR_INT(
"fpix not defined", procName, 1);
662 if (x < 0 || x >= w || y < 0 || y >= h)
665 *pval = *(fpix->
data + y * w + x);
690 PROCNAME(
"fpixSetPixel");
693 return ERROR_INT(
"fpix not defined", procName, 1);
696 if (x < 0 || x >= w || y < 0 || y >= h)
699 *(fpix->
data + y * w + x) = val;
718 PROCNAME(
"fpixaCreate");
721 n = INITIAL_PTR_ARRAYSIZE;
723 if ((fpixa = (
FPIXA *)LEPT_CALLOC(1,
sizeof(
FPIXA))) == NULL)
724 return (
FPIXA *)ERROR_PTR(
"fpixa not made", procName, NULL);
729 if ((fpixa->
fpix = (
FPIX **)LEPT_CALLOC(n,
sizeof(
FPIX *))) == NULL) {
731 return (
FPIXA *)ERROR_PTR(
"fpixa ptrs not made", procName, NULL);
761 PROCNAME(
"fpixaCopy");
764 return (
FPIXA *)ERROR_PTR(
"fpixa not defined", procName, NULL);
772 return (
FPIXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
775 return (
FPIXA *)ERROR_PTR(
"fpixac not made", procName, NULL);
776 for (i = 0; i < fpixa->
n; i++) {
806 PROCNAME(
"fpixaDestroy");
808 if (pfpixa == NULL) {
809 L_WARNING(
"ptr address is NULL!\n", procName);
813 if ((fpixa = *pfpixa) == NULL)
819 for (i = 0; i < fpixa->
n; i++)
821 LEPT_FREE(fpixa->
fpix);
849 PROCNAME(
"fpixaAddFPix");
852 return ERROR_INT(
"fpixa not defined", procName, 1);
854 return ERROR_INT(
"fpix not defined", procName, 1);
858 else if (copyflag ==
L_COPY)
863 return ERROR_INT(
"invalid copyflag", procName, 1);
865 return ERROR_INT(
"fpixc not made", procName, 1);
870 fpixa->
fpix[n] = fpixc;
891 PROCNAME(
"fpixaExtendArray");
894 return ERROR_INT(
"fpixa not defined", procName, 1);
916 PROCNAME(
"fpixaExtendArrayToSize");
919 return ERROR_INT(
"fpixa not defined", procName, 1);
921 if (size > fpixa->
nalloc) {
924 size *
sizeof(
FPIX *))) == NULL)
925 return ERROR_INT(
"new ptr array not returned", procName, 1);
944 PROCNAME(
"fpixaGetCount");
947 return ERROR_INT(
"fpixa not defined", procName, 0);
964 PROCNAME(
"fpixaChangeRefcount");
967 return ERROR_INT(
"fpixa not defined", procName, 1);
987 PROCNAME(
"fpixaGetFPix");
990 return (
FPIX *)ERROR_PTR(
"fpixa not defined", procName, NULL);
991 if (index < 0 || index >= fpixa->
n)
992 return (
FPIX *)ERROR_PTR(
"index not valid", procName, NULL);
996 else if (accesstype ==
L_CLONE)
999 return (
FPIX *)ERROR_PTR(
"invalid accesstype", procName, NULL);
1019 PROCNAME(
"fpixaGetFPixDimensions");
1022 return ERROR_INT(
"no return val requested", procName, 1);
1026 return ERROR_INT(
"fpixa not defined", procName, 1);
1027 if (index < 0 || index >= fpixa->
n)
1028 return ERROR_INT(
"index not valid", procName, 1);
1031 return ERROR_INT(
"fpix not found!", procName, 1);
1053 PROCNAME(
"fpixaGetData");
1056 return (l_float32 *)ERROR_PTR(
"fpixa not defined", procName, NULL);
1058 if (index < 0 || index >= n)
1059 return (l_float32 *)ERROR_PTR(
"invalid index", procName, NULL);
1087 PROCNAME(
"fpixaGetPixel");
1090 return ERROR_INT(
"pval not defined", procName, 1);
1093 return ERROR_INT(
"fpixa not defined", procName, 1);
1095 if (index < 0 || index >= n)
1096 return ERROR_INT(
"invalid index into fpixa", procName, 1);
1124 PROCNAME(
"fpixaSetPixel");
1127 return ERROR_INT(
"fpixa not defined", procName, 1);
1129 if (index < 0 || index >= n)
1130 return ERROR_INT(
"invalid index into fpixa", procName, 1);
1163 PROCNAME(
"dpixCreate");
1166 return (
DPIX *)ERROR_PTR(
"width must be > 0", procName, NULL);
1168 return (
DPIX *)ERROR_PTR(
"height must be > 0", procName, NULL);
1171 npix64 = (l_uint64)width * (l_uint64)height;
1172 if (npix64 >= (1LL << 28)) {
1173 L_ERROR(
"requested w = %d, h = %d\n", procName, width, height);
1174 return (
DPIX *)ERROR_PTR(
"requested bytes >= 2^31", procName, NULL);
1177 dpix = (
DPIX *)LEPT_CALLOC(1,
sizeof(
DPIX));
1182 data = (l_float64 *)LEPT_CALLOC((
size_t)width * height,
sizeof(l_float64));
1185 return (
DPIX *)ERROR_PTR(
"calloc fail for data", procName, NULL);
1211 PROCNAME(
"dpixCreateTemplate");
1214 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, NULL);
1237 PROCNAME(
"dpixClone");
1240 return (
DPIX *)ERROR_PTR(
"dpix not defined", procName, NULL);
1281 l_int32 w, h, bytes;
1282 l_float64 *datas, *datad;
1284 PROCNAME(
"dpixCopy");
1287 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, NULL);
1298 return (
DPIX *)ERROR_PTR(
"dpixd not made", procName, NULL);
1301 memcpy(datad, datas, bytes);
1312 memcpy(datad, datas, bytes);
1327 l_int32 ws, hs, wd, hd, bytes;
1330 PROCNAME(
"dpixResizeImageData");
1333 return ERROR_INT(
"dpixs not defined", procName, 1);
1335 return ERROR_INT(
"dpixd not defined", procName, 1);
1339 if (ws == wd && hs == hd)
1344 bytes = 8 * ws * hs;
1346 if (data) LEPT_FREE(data);
1347 if ((data = (l_float64 *)LEPT_MALLOC(bytes)) == NULL)
1348 return ERROR_INT(
"LEPT_MALLOC fail for data", procName, 1);
1372 PROCNAME(
"dpixDestroy");
1375 L_WARNING(
"ptr address is null!\n", procName);
1379 if ((dpix = *pdpix) == NULL)
1410 PROCNAME(
"dpixGetDimensions");
1413 return ERROR_INT(
"no return val requested", procName, 1);
1417 return ERROR_INT(
"dpix not defined", procName, 1);
1418 if (pw) *pw = dpix->
w;
1419 if (ph) *ph = dpix->
h;
1436 PROCNAME(
"dpixSetDimensions");
1439 return ERROR_INT(
"dpix not defined", procName, 1);
1455 PROCNAME(
"dpixGetWpl");
1458 return ERROR_INT(
"dpix not defined", procName, 1);
1474 PROCNAME(
"dpixSetWpl");
1477 return ERROR_INT(
"dpix not defined", procName, 1);
1493 PROCNAME(
"dpixGetRefcount");
1496 return ERROR_INT(
"dpix not defined", procName, UNDEF);
1512 PROCNAME(
"dpixChangeRefcount");
1515 return ERROR_INT(
"dpix not defined", procName, 1);
1534 PROCNAME(
"dpixGetResolution");
1537 return ERROR_INT(
"dpix not defined", procName, 1);
1538 if (pxres) *pxres = dpix->
xres;
1539 if (pyres) *pyres = dpix->
yres;
1556 PROCNAME(
"dpixSetResolution");
1559 return ERROR_INT(
"dpix not defined", procName, 1);
1578 PROCNAME(
"dpixCopyResolution");
1580 if (!dpixs || !dpixd)
1581 return ERROR_INT(
"dpixs and dpixd not both defined", procName, 1);
1598 PROCNAME(
"dpixGetData");
1601 return (l_float64 *)ERROR_PTR(
"dpix not defined", procName, NULL);
1617 PROCNAME(
"dpixSetData");
1620 return ERROR_INT(
"dpix not defined", procName, 1);
1647 PROCNAME(
"dpixGetPixel");
1650 return ERROR_INT(
"pval not defined", procName, 1);
1653 return ERROR_INT(
"dpix not defined", procName, 1);
1656 if (x < 0 || x >= w || y < 0 || y >= h)
1659 *pval = *(dpix->
data + y * w + x);
1684 PROCNAME(
"dpixSetPixel");
1687 return ERROR_INT(
"dpix not defined", procName, 1);
1690 if (x < 0 || x >= w || y < 0 || y >= h)
1693 *(dpix->
data + y * w + x) = val;
1713 PROCNAME(
"fpixRead");
1716 return (
FPIX *)ERROR_PTR(
"filename not defined", procName, NULL);
1719 return (
FPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
1723 return (
FPIX *)ERROR_PTR(
"fpix not read", procName, NULL);
1738 l_int32 w, h, nbytes, xres, yres, version;
1742 PROCNAME(
"fpixReadStream");
1745 return (
FPIX *)ERROR_PTR(
"stream not defined", procName, NULL);
1747 if (fscanf(fp,
"\nFPix Version %d\n", &version) != 1)
1748 return (
FPIX *)ERROR_PTR(
"not a fpix file", procName, NULL);
1750 return (
FPIX *)ERROR_PTR(
"invalid fpix version", procName, NULL);
1751 if (fscanf(fp,
"w = %d, h = %d, nbytes = %d\n", &w, &h, &nbytes) != 3)
1752 return (
FPIX *)ERROR_PTR(
"read fail for data size", procName, NULL);
1759 if (fgets(buf,
sizeof(buf), fp) == NULL)
1760 return (
FPIX *)ERROR_PTR(
"fgets read fail", procName, NULL);
1761 if (sscanf(buf,
"xres = %d, yres = %d\n", &xres, &yres) != 2)
1762 return (
FPIX *)ERROR_PTR(
"read fail for xres, yres", procName, NULL);
1765 return (
FPIX *)ERROR_PTR(
"fpix not made", procName, NULL);
1768 if (fread(data, 1, nbytes, fp) != nbytes) {
1770 return (
FPIX *)ERROR_PTR(
"read error for nbytes", procName, NULL);
1794 PROCNAME(
"fpixReadMem");
1797 return (
FPIX *)ERROR_PTR(
"data not defined", procName, NULL);
1799 return (
FPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
1803 if (!fpix) L_ERROR(
"fpix not read\n", procName);
1822 PROCNAME(
"fpixWrite");
1825 return ERROR_INT(
"filename not defined", procName, 1);
1827 return ERROR_INT(
"fpix not defined", procName, 1);
1830 return ERROR_INT(
"stream not opened", procName, 1);
1834 return ERROR_INT(
"fpix not written to stream", procName, 1);
1850 l_int32 w, h, xres, yres;
1855 PROCNAME(
"fpixWriteStream");
1858 return ERROR_INT(
"stream not defined", procName, 1);
1860 return ERROR_INT(
"fpix not defined", procName, 1);
1867 nbytes =
sizeof(l_float32) * w * h;
1870 fprintf(fp,
"w = %d, h = %d, nbytes = %u\n", w, h, nbytes);
1871 fprintf(fp,
"xres = %d, yres = %d\n", xres, yres);
1872 fwrite(data, 1, nbytes, fp);
1901 PROCNAME(
"fpixWriteMem");
1903 if (pdata) *pdata = NULL;
1904 if (psize) *psize = 0;
1906 return ERROR_INT(
"&data not defined", procName, 1);
1908 return ERROR_INT(
"&size not defined", procName, 1);
1910 return ERROR_INT(
"fpix not defined", procName, 1);
1913 if ((fp = open_memstream((
char **)pdata, psize)) == NULL)
1914 return ERROR_INT(
"stream not opened", procName, 1);
1917 L_INFO(
"work-around: writing to a temp file\n", procName);
1920 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
1922 if ((fp = tmpfile()) == NULL)
1923 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
1957 PROCNAME(
"fpixEndianByteSwap");
1960 return (
FPIX *)ERROR_PTR(
"fpixs not defined", procName, fpixd);
1961 if (fpixd && (fpixs != fpixd))
1962 return (
FPIX *)ERROR_PTR(
"fpixd != fpixs", procName, fpixd);
1974 for (i = 0; i < h; i++) {
1975 for (j = 0; j < w; j++, data++) {
1977 *data = (word >> 24) |
1978 ((word >> 8) & 0x0000ff00) |
1979 ((word << 8) & 0x00ff0000) |
2011 PROCNAME(
"dpixRead");
2014 return (
DPIX *)ERROR_PTR(
"filename not defined", procName, NULL);
2017 return (
DPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
2021 return (
DPIX *)ERROR_PTR(
"dpix not read", procName, NULL);
2036 l_int32 w, h, nbytes, version, xres, yres;
2040 PROCNAME(
"dpixReadStream");
2043 return (
DPIX *)ERROR_PTR(
"stream not defined", procName, NULL);
2045 if (fscanf(fp,
"\nDPix Version %d\n", &version) != 1)
2046 return (
DPIX *)ERROR_PTR(
"not a dpix file", procName, NULL);
2048 return (
DPIX *)ERROR_PTR(
"invalid dpix version", procName, NULL);
2049 if (fscanf(fp,
"w = %d, h = %d, nbytes = %d\n", &w, &h, &nbytes) != 3)
2050 return (
DPIX *)ERROR_PTR(
"read fail for data size", procName, NULL);
2057 if (fgets(buf,
sizeof(buf), fp) == NULL)
2058 return (
DPIX *)ERROR_PTR(
"fgets read fail", procName, NULL);
2059 if (sscanf(buf,
"xres = %d, yres = %d\n", &xres, &yres) != 2)
2060 return (
DPIX *)ERROR_PTR(
"read fail for xres, yres", procName, NULL);
2063 return (
DPIX *)ERROR_PTR(
"dpix not made", procName, NULL);
2066 if (fread(data, 1, nbytes, fp) != nbytes) {
2068 return (
DPIX *)ERROR_PTR(
"read error for nbytes", procName, NULL);
2092 PROCNAME(
"dpixReadMem");
2095 return (
DPIX *)ERROR_PTR(
"data not defined", procName, NULL);
2097 return (
DPIX *)ERROR_PTR(
"stream not opened", procName, NULL);
2101 if (!dpix) L_ERROR(
"dpix not read\n", procName);
2120 PROCNAME(
"dpixWrite");
2123 return ERROR_INT(
"filename not defined", procName, 1);
2125 return ERROR_INT(
"dpix not defined", procName, 1);
2128 return ERROR_INT(
"stream not opened", procName, 1);
2132 return ERROR_INT(
"dpix not written to stream", procName, 1);
2148 l_int32 w, h, xres, yres;
2153 PROCNAME(
"dpixWriteStream");
2156 return ERROR_INT(
"stream not defined", procName, 1);
2158 return ERROR_INT(
"dpix not defined", procName, 1);
2166 nbytes =
sizeof(l_float64) * w * h;
2168 fprintf(fp,
"w = %d, h = %d, nbytes = %u\n", w, h, nbytes);
2169 fprintf(fp,
"xres = %d, yres = %d\n", xres, yres);
2170 fwrite(data, 1, nbytes, fp);
2199 PROCNAME(
"dpixWriteMem");
2201 if (pdata) *pdata = NULL;
2202 if (psize) *psize = 0;
2204 return ERROR_INT(
"&data not defined", procName, 1);
2206 return ERROR_INT(
"&size not defined", procName, 1);
2208 return ERROR_INT(
"dpix not defined", procName, 1);
2211 if ((fp = open_memstream((
char **)pdata, psize)) == NULL)
2212 return ERROR_INT(
"stream not opened", procName, 1);
2215 L_INFO(
"work-around: writing to a temp file\n", procName);
2218 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
2220 if ((fp = tmpfile()) == NULL)
2221 return ERROR_INT(
"tmpfile stream not opened", procName, 1);
2255 PROCNAME(
"dpixEndianByteSwap");
2258 return (
DPIX *)ERROR_PTR(
"dpixs not defined", procName, dpixd);
2259 if (dpixd && (dpixs != dpixd))
2260 return (
DPIX *)ERROR_PTR(
"dpixd != dpixs", procName, dpixd);
2272 for (i = 0; i < h; i++) {
2273 for (j = 0; j < 2 * w; j++, data++) {
2275 *data = (word >> 24) |
2276 ((word >> 8) & 0x0000ff00) |
2277 ((word << 8) & 0x00ff0000) |
2315 l_int32 i, j, w, h, count;
2318 PROCNAME(
"fpixPrintStream");
2321 return ERROR_INT(
"stream not defined", procName, 1);
2323 return ERROR_INT(
"fpix not defined", procName, 1);
2325 return ERROR_INT(
"sampling factor < 1f", procName, 1);
2328 fprintf(fp,
"\nFPix: w = %d, h = %d\n", w, h);
2329 for (i = 0; i < h; i += factor) {
2330 for (count = 0, j = 0; j < w; j += factor, count++) {
2332 fprintf(fp,
"val[%d, %d] = %f ", i, j, val);
2333 if ((count + 1) % 3 == 0) fprintf(fp,
"\n");
2335 if (count % 3) fprintf(fp,
"\n");
l_ok fpixCopyResolution(FPIX *fpixd, FPIX *fpixs)
fpixCopyResolution()
DPIX * dpixClone(DPIX *dpix)
dpixClone()
FPIXA * fpixaCopy(FPIXA *fpixa, l_int32 copyflag)
fpixaCopy()
void dpixDestroy(DPIX **pdpix)
dpixDestroy()
l_ok fpixaGetPixel(FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 *pval)
fpixaGetPixel()
l_ok fpixGetPixel(FPIX *fpix, l_int32 x, l_int32 y, l_float32 *pval)
fpixGetPixel()
DPIX * dpixCreate(l_int32 width, l_int32 height)
dpixCreate()
l_ok dpixChangeRefcount(DPIX *dpix, l_int32 delta)
dpixChangeRefcount()
l_ok dpixCopyResolution(DPIX *dpixd, DPIX *dpixs)
dpixCopyResolution()
l_int32 fpixaGetCount(FPIXA *fpixa)
fpixaGetCount()
l_float64 * dpixGetData(DPIX *dpix)
dpixGetData()
l_ok fpixaChangeRefcount(FPIXA *fpixa, l_int32 delta)
fpixaChangeRefcount()
l_ok fpixWriteStream(FILE *fp, FPIX *fpix)
fpixWriteStream()
l_int32 dpixGetWpl(DPIX *dpix)
dpixGetWpl()
l_ok dpixSetPixel(DPIX *dpix, l_int32 x, l_int32 y, l_float64 val)
dpixSetPixel()
l_ok dpixSetDimensions(DPIX *dpix, l_int32 w, l_int32 h)
dpixSetDimensions()
l_ok fpixResizeImageData(FPIX *fpixd, FPIX *fpixs)
fpixResizeImageData()
DPIX * dpixRead(const char *filename)
dpixRead()
l_ok dpixWrite(const char *filename, DPIX *dpix)
dpixWrite()
FILE * fopenReadFromMemory(const l_uint8 *data, size_t size)
fopenReadFromMemory()
l_ok fpixGetDimensions(FPIX *fpix, l_int32 *pw, l_int32 *ph)
fpixGetDimensions()
FPIX * fpixEndianByteSwap(FPIX *fpixd, FPIX *fpixs)
fpixEndianByteSwap()
l_ok dpixSetResolution(DPIX *dpix, l_int32 xres, l_int32 yres)
dpixSetResolution()
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_ok dpixResizeImageData(DPIX *dpixd, DPIX *dpixs)
dpixResizeImageData()
l_ok fpixSetResolution(FPIX *fpix, l_int32 xres, l_int32 yres)
fpixSetResolution()
l_ok fpixSetData(FPIX *fpix, l_float32 *data)
fpixSetData()
l_ok fpixSetPixel(FPIX *fpix, l_int32 x, l_int32 y, l_float32 val)
fpixSetPixel()
l_ok fpixaGetFPixDimensions(FPIXA *fpixa, l_int32 index, l_int32 *pw, l_int32 *ph)
fpixaGetFPixDimensions()
l_ok dpixSetWpl(DPIX *dpix, l_int32 wpl)
dpixSetWpl()
l_ok fpixWrite(const char *filename, FPIX *fpix)
fpixWrite()
l_ok dpixGetResolution(DPIX *dpix, l_int32 *pxres, l_int32 *pyres)
dpixGetResolution()
FPIX * fpixReadMem(const l_uint8 *data, size_t size)
fpixReadMem()
DPIX * dpixEndianByteSwap(DPIX *dpixd, DPIX *dpixs)
dpixEndianByteSwap()
l_ok fpixGetResolution(FPIX *fpix, l_int32 *pxres, l_int32 *pyres)
fpixGetResolution()
l_ok fpixSetDimensions(FPIX *fpix, l_int32 w, l_int32 h)
fpixSetDimensions()
l_ok fpixaSetPixel(FPIXA *fpixa, l_int32 index, l_int32 x, l_int32 y, l_float32 val)
fpixaSetPixel()
l_ok fpixPrintStream(FILE *fp, FPIX *fpix, l_int32 factor)
fpixPrintStream()
FILE * fopenWriteWinTempfile()
fopenWriteWinTempfile()
l_int32 fpixGetWpl(FPIX *fpix)
fpixGetWpl()
FPIX * fpixClone(FPIX *fpix)
fpixClone()
l_float32 * fpixaGetData(FPIXA *fpixa, l_int32 index)
fpixaGetData()
l_ok dpixGetPixel(DPIX *dpix, l_int32 x, l_int32 y, l_float64 *pval)
dpixGetPixel()
l_ok dpixWriteMem(l_uint8 **pdata, size_t *psize, DPIX *dpix)
dpixWriteMem()
DPIX * dpixReadMem(const l_uint8 *data, size_t size)
dpixReadMem()
l_float32 * fpixGetData(FPIX *fpix)
fpixGetData()
l_ok fpixChangeRefcount(FPIX *fpix, l_int32 delta)
fpixChangeRefcount()
l_ok fpixWriteMem(l_uint8 **pdata, size_t *psize, FPIX *fpix)
fpixWriteMem()
FILE * fopenWriteStream(const char *filename, const char *modestring)
fopenWriteStream()
FILE * fopenReadStream(const char *filename)
fopenReadStream()
l_uint8 * l_binaryReadStream(FILE *fp, size_t *pnbytes)
l_binaryReadStream()
l_ok dpixGetDimensions(DPIX *dpix, l_int32 *pw, l_int32 *ph)
dpixGetDimensions()
FPIX * fpixCreateTemplate(FPIX *fpixs)
fpixCreateTemplate()
FPIX * fpixCreate(l_int32 width, l_int32 height)
fpixCreate()
static l_int32 fpixaExtendArrayToSize(FPIXA *fpixa, l_int32 size)
fpixaExtendArrayToSize()
l_ok dpixWriteStream(FILE *fp, DPIX *dpix)
dpixWriteStream()
#define DPIX_VERSION_NUMBER
FPIX * fpixCopy(FPIX *fpixd, FPIX *fpixs)
fpixCopy()
FPIX * fpixRead(const char *filename)
fpixRead()
FPIX * fpixReadStream(FILE *fp)
fpixReadStream()
static l_int32 fpixaExtendArray(FPIXA *fpixa)
fpixaExtendArray()
void fpixDestroy(FPIX **pfpix)
fpixDestroy()
l_int32 fpixGetRefcount(FPIX *fpix)
fpixGetRefcount()
l_int32 dpixGetRefcount(DPIX *dpix)
dpixGetRefcount()
l_ok fpixSetWpl(FPIX *fpix, l_int32 wpl)
fpixSetWpl()
l_ok dpixSetData(DPIX *dpix, l_float64 *data)
dpixSetData()
FPIX * fpixaGetFPix(FPIXA *fpixa, l_int32 index, l_int32 accesstype)
fpixaGetFPix()
DPIX * dpixReadStream(FILE *fp)
dpixReadStream()
l_ok fpixaAddFPix(FPIXA *fpixa, FPIX *fpix, l_int32 copyflag)
fpixaAddFPix()
#define FPIX_VERSION_NUMBER