Bug 103399 - embed CCITT mime data
Summary: embed CCITT mime data
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
Depends on:
Reported: 2017-10-22 00:10 UTC by Adrian Johnson
Modified: 2018-08-20 21:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Support CCITT mime type (7.71 KB, patch)
2017-10-22 00:13 UTC, Adrian Johnson
Details | Splinter Review
limit image size when printing (2.88 KB, patch)
2017-10-22 00:19 UTC, Adrian Johnson
Details | Splinter Review
Don't use UNIQUE_ID with PS (1.24 KB, patch)
2017-12-12 10:07 UTC, Adrian Johnson
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Johnson 2017-10-22 00:10:41 UTC
Current cairo git master supports CCITT mime type. I'm attaching the patches I used for testing here.

When the 1.5.10 cairo snapshot is released I will bump the cairo include guards to 1.5.10.
Comment 1 Adrian Johnson 2017-10-22 00:13:23 UTC
Created attachment 134982 [details] [review]
Support CCITT mime type
Comment 2 Adrian Johnson 2017-10-22 00:19:18 UTC
Created attachment 134983 [details] [review]
limit image size when printing

Current cairo git master now allows mime images to have a different resolution to the cairo image. The mime image in the output will be scaled to the same physical size as the cairo image.

This allows us to avoid creating huge cairo images (potentially exceeding the maximum image size), that require huge amounts of memory and and very slow processing when the image is just going to be replaced with the mime data in the output.

Tested with the test case in bug 56858.
Comment 3 Carlos Garcia Campos 2017-10-28 06:02:21 UTC
Comment on attachment 134982 [details] [review]
Support CCITT mime type

Review of attachment 134982 [details] [review]:

Comment 4 Carlos Garcia Campos 2017-10-28 06:05:28 UTC
Comment on attachment 134983 [details] [review]
limit image size when printing

Review of attachment 134983 [details] [review]:


::: poppler/CairoOutputDev.cc
@@ +3282,5 @@
> +    bool requireSameSize = false;
> +#else
> +    bool requireSameSize = true;
> +#endif
> +    if (!requireSameSize || (width == widthA and height == heightA))

Comment 5 Adrian Johnson 2017-10-28 09:45:08 UTC
(In reply to Carlos Garcia Campos from comment #4)
> > +    if (!requireSameSize || (width == widthA and height == heightA))
> and?

Not sure how that got there. Might have been a last minute edit that didn't get saved before compiling. I've fixed it in my local copy and will push when cairo 1.15.10 is released.
Comment 6 Adrian Johnson 2017-12-12 10:04:22 UTC
cairo 1.5.10 has been released so I updated the version guards and pushed.
Comment 7 Adrian Johnson 2017-12-12 10:07:20 UTC
Created attachment 136095 [details] [review]
Don't use UNIQUE_ID with PS

Also related. Patch to disable UNIQUE_ID on PS output. cairo 1.5.10 PS backend stores images with UNIQUE_ID in PS memory so the image can be re-used multiple times. As we don't know how large the images are or how man times they are used, there is no benefit in enabling this.
Comment 8 GitLab Migration User 2018-08-20 21:52:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/106.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.