Skip to content

locate-thumbnail: handle failures to reconstruct the crop box #5

@acdha

Description

@acdha

There are two problems here:

  1. We should have sanity checks for the crop box falling outside of the image bounds
  2. We should catch errors like the libpng failure and ensure that a non-zero exit code is returned
INFO locate_thumbnail: Attempting to locate /tmp/tmpkq9k0z-wdl-19.thumbnail/mstr_3g03352u.jpg within /tmp/tmpkq9k0z-wdl-19.thumbnail/3g03352u.tif
INFO locate_thumbnail: Found 196 matches
INFO find_homography: 135 inliers, 196 matched features
INFO get_scaled_corners: Thumbnail bounds within analyzed image: [[-2, 96], [1048, 95], [1043, 959], [2, 961]]
INFO reconstruct_thumbnail: Reconstructing thumbnail from source image
INFO reconstruct_thumbnail: Master dimensions: (1458, 1152, 3)
INFO reconstruct_thumbnail: Thumbnail dimensions: (255, 308, 3)
INFO reconstruct_thumbnail: Reconstructed thumb dimensions: (866, 0, 3) (rotation=0°)
libpng warning: Image width is zero in IHDR
libpng error: Invalid IHDR data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions