Skip to content

Divide by 0 on pdf images #779

Closed
Closed
@lucasderraugh

Description

@lucasderraugh

For PDF images, -[GIImageDiffView imageSizeWithoutLoadingFromPath:] fails to calculate intrinsic sizes and so CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); yields an empty dictionary.

-[GIImageDiffView desiredImageFrame:] ends up using these values of a {0, 0} frame and dividing by 0 results in a NaN exception.

Before 1.3 ships to the stable channel, we need to handle this case by defaulting to a default value or finding a quick way to calculate in the PDF case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions