Skip to content

Commit

Permalink
Fix the video validation for dimensions
Browse files Browse the repository at this point in the history
Also allow smaller sizes. The point of the check is to prevent 0x0.

Fixes #203
  • Loading branch information
sindresorhus committed Sep 18, 2020
1 parent 29cab37 commit 2760425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Gifski/VideoValidator.swift
Expand Up @@ -158,12 +158,12 @@ struct VideoValidator {

guard
let dimensions = asset.dimensions,
dimensions.width > 10,
dimensions.height > 10
dimensions.width >= 4,
dimensions.height >= 4
else {
NSAlert.showModal(
for: window,
message: "The video dimensions must be at least 10×10.",
message: "The video dimensions must be at least 4×4.",
informativeText: "The dimensions of the video are \(asset.dimensions?.formatted ?? "0×0")."
)

Expand Down

0 comments on commit 2760425

Please sign in to comment.