Save work on PNG predictors. Apparently object streams are also a common thing

for newer Acrobat so we'll need to implement those, too.
This commit is contained in:
Michael R Sweet
2021-05-07 19:51:38 -04:00
parent 44325ce2d9
commit 923409ceff
3 changed files with 254 additions and 57 deletions

View File

@ -341,15 +341,28 @@ _pdfioDictGetValue(pdfio_dict_t *dict, // I - Dictionary
*match; // Matching key pair
PDFIO_DEBUG("_pdfioDictGetValue(dict=%p, key=\"%s\")\n", dict, key);
if (!dict || !dict->num_pairs || !key)
{
PDFIO_DEBUG("_pdfioDictGetValue: Returning NULL.\n");
return (NULL);
}
temp.key = key;
if ((match = bsearch(&temp, dict->pairs, dict->num_pairs, sizeof(_pdfio_pair_t), (int (*)(const void *, const void *))compare_pairs)) != NULL)
return (&match->value);
{
PDFIO_DEBUG("_pdfioDictGetValue: Match, returning ");
PDFIO_DEBUG_VALUE(&(match->value));
PDFIO_DEBUG(".\n");
return (&(match->value));
}
else
{
PDFIO_DEBUG("_pdfioDictGetValue: No match, returning NULL.\n");
return (NULL);
}
}