mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +02:00
Add pdfioImageGetBytesPerLine API, document its use for image streams.
This commit is contained in:
@@ -571,6 +571,11 @@ pdfioStreamPuts(pdfio_stream_t *st, // I - Stream
|
||||
//
|
||||
// 'pdfioStreamRead()' - Read data from a stream.
|
||||
//
|
||||
// This function reads data from a stream. When reading decoded image data
|
||||
// from a stream, you *must* read whole scanlines. The
|
||||
// @link pdfioImageGetBytesPerLine@ function can be used to determine the
|
||||
// proper read length.
|
||||
//
|
||||
|
||||
ssize_t // O - Number of bytes read or `-1` on error
|
||||
pdfioStreamRead(
|
||||
@@ -860,7 +865,6 @@ stream_read(pdfio_stream_t *st, // I - Stream
|
||||
|
||||
if (bytes < (st->pbsize - 1))
|
||||
{
|
||||
// TODO: Support partial reads of PNG-encoded streams?
|
||||
_pdfioFileError(st->pdf, "Read buffer too small for stream.");
|
||||
return (-1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user