Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not refer to page in OptimizeLayerFrames #987

Merged
merged 1 commit into from Feb 19, 2018

Conversation

akihikodaki
Copy link
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practices as demonstrated in the repository.

Description

page dimension was used to create images to compare different disposal methods. However, functions used for the comparisons, namely CompareImagesBounds and IsBoundsCleared are based on the dimensions of images themselves.

Creating image with page dimension is inefficient when converting images with larger pages and therefore should be avoided.

This is what I should have done before #983. See #984 (comment).

page dimension was used to create images to compare different disposal
methods. However, functions used for the comparisons, namely
CompareImagesBounds and IsBoundsCleared are based on the dimensions of
images themselves.

Creating image with page dimension is inefficient when converting images
with larger pages and therefore should be avoided.
@urban-warrior
Copy link
Contributor

urban-warrior commented Feb 18, 2018

Optimizing images are based on the virtual page layout reflected in the image->page member. See the GIF image specification for details. There is likely a bug in optimizing images in some cases but replacing the virtual page with the actual image dimensions will likely break the optimization algorithm.

@akihikodaki
Copy link
Contributor Author

That should not be problematic because the input is assumes coalesced. We may have assertion if not sure.

@urban-warrior
Copy link
Contributor

We'll need a few days to test your assumptions before we can merge the pull. Stand by...

@urban-warrior urban-warrior merged commit b5a7073 into ImageMagick:master Feb 19, 2018
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 26, 2018
* Fix broken file format detection and potentially other features
  7.0.7.23 does not work at all for me.

Changelog:
2018-02-25  7.0.7-24 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.0-24, GIT revision 23079:7ccb76178:20180225.

2018-02-19  7.0.7-24 Cristy  <quetzlzacatenango@image...>
  * Do not refer to page in OptimizeLayerFrames (reference
    ImageMagick/ImageMagick#987).
  * PerlMagick unit tests pass again.
  * Fixed numerous use of uninitialized values, integer overflow,
    memory exceeded, and timeouts (credit to OSS Fuzz).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants