File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Userland/Libraries/LibPDF Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,15 @@ PDFErrorOr<ByteBuffer> Filter::decode_ccitt(ReadonlyBytes bytes, RefPtr<DictObje
314314 damaged_rows_before_error = decode_parms->get_value (CommonNames::DamagedRowsBeforeError).get <int >();
315315 }
316316
317- // FIXME: This parameter seems crucial when reading its description, but we still
318- // achieve to decode images that have it. Figure out what to do with it.
319- (void )end_of_block;
320-
321317 if (require_end_of_line || (encoded_byte_align && k != 0 ) || damaged_rows_before_error > 0 )
322318 return Error::rendering_unsupported_error (" Unimplemented option for the CCITTFaxDecode Filter" );
323319
324320 ByteBuffer decoded {};
325321 if (k < 0 ) {
326- decoded = TRY (Gfx::CCITT::decode_ccitt_group4 (bytes, columns, rows));
322+ Gfx::CCITT::Group4Options options {
323+ .has_end_of_block = end_of_block ? Gfx::CCITT::Group4Options::HasEndOfBlock::Yes : Gfx::CCITT::Group4Options::HasEndOfBlock::No
324+ };
325+ decoded = TRY (Gfx::CCITT::decode_ccitt_group4 (bytes, columns, rows, options));
327326 } else if (k == 0 ) {
328327 Gfx::CCITT::Group3Options options {
329328 .require_end_of_line = require_end_of_line ? Gfx::CCITT::Group3Options::RequireEndOfLine::Yes : Gfx::CCITT::Group3Options::RequireEndOfLine::No,
You can’t perform that action at this time.
0 commit comments