mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-07-18 23:09:49 +02:00
Safe work on streams - still need to implement predictors
This commit is contained in:
@ -200,9 +200,21 @@ pdfio_stream_t * // O - Stream or `NULL` on error
|
||||
pdfioObjOpenStream(pdfio_obj_t *obj, // I - Object
|
||||
bool decode) // I - Decode/decompress data?
|
||||
{
|
||||
// TODO: Implement me
|
||||
(void)obj;
|
||||
(void)decode;
|
||||
// Range check input...
|
||||
if (!obj)
|
||||
return (NULL);
|
||||
|
||||
return (NULL);
|
||||
// Make sure we've loaded the object dictionary...
|
||||
if (!obj->value.type)
|
||||
{
|
||||
if (!_pdfioObjLoad(obj))
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
// No stream if there is no dict or offset to a stream...
|
||||
if (obj->value.type != PDFIO_VALTYPE_DICT || !obj->stream_offset)
|
||||
return (NULL);
|
||||
|
||||
// Open the stream...
|
||||
return (_pdfioStreamOpen(obj, decode));
|
||||
}
|
||||
|
Reference in New Issue
Block a user